CN-1016 知识库支持卡片和table切换

This commit is contained in:
hyx
2023-05-29 13:00:28 +08:00
parent 8ea82d0e34
commit b2c76aa2c7
12 changed files with 779 additions and 291 deletions

View File

@@ -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: