CN-1016 知识库支持卡片和table切换
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { chartTableOrderOptionsMapping, storageKey } from '@/utils/constants'
|
||||
import { getWidthByLanguage } from '@/utils/tools'
|
||||
import { put, patch } from '@/utils/http'
|
||||
import { api } from '@/utils/api'
|
||||
export default {
|
||||
props: {
|
||||
tableData: {
|
||||
@@ -99,6 +101,21 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
changeStatus (status, id) {
|
||||
const statusNum = status ? 1 : 0
|
||||
patch(api.knowledgeBaseEnable, { list: [{ knowledgeId: id, status: 0 }] }).then(response => {
|
||||
if (response.code === 200) {
|
||||
|
||||
} else {
|
||||
console.error(response)
|
||||
if (response.message) {
|
||||
this.$message.error(response.message)
|
||||
} else {
|
||||
this.$message.error('Something went wrong...')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOperation ([command, row]) {
|
||||
switch (command) {
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user