|
@@ -45,7 +45,7 @@ import {
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { useDialogStore, useDictionaryStore } from '@/stores'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { qaCreatQa, qaDetail } from '@/api/modules/knowledge/qa'
|
|
|
+import { qaCreatQa, qaDetail, qaUpdate } from '@/api/modules/knowledge/qa'
|
|
|
|
|
|
const router = useRouter()
|
|
|
const DictionaryStore = useDictionaryStore()
|
|
@@ -126,6 +126,17 @@ const onSubmit = () => {
|
|
|
.finally(() => {
|
|
|
state.loading = false
|
|
|
})
|
|
|
+ } else {
|
|
|
+ qaUpdate(state.form)
|
|
|
+ .then(() => {
|
|
|
+ ElMessage.success(`${titleCpt.value}成功!`)
|
|
|
+ emit('update:show', false)
|
|
|
+ emit('refresh')
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ .finally(() => {
|
|
|
+ state.loading = false
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
})
|