| | |
| | | import { onMounted, reactive, ref } from 'vue'; |
| | | import { useRoute, useRouter } from 'vue-router'; |
| | | import { update_docvector_name } from '/@/api/knowledge/docvector'; |
| | | import mittBus from '/@/utils/mitt'; |
| | | import { verifiyNumberInteger } from '/@/utils/toolsValidate'; |
| | | import mittBus from '/@/utils/mitt'; |
| | | // 定义变量内容 |
| | | const state = reactive({ |
| | | soliderValue: 0, |
| | |
| | | id: state.editKnowledgeForm.knowlg_id, |
| | | title: state.editKnowledgeForm.title, |
| | | prompt: state.editKnowledgeForm.prompt, |
| | | publish: 'N', |
| | | publish: '', |
| | | create_time: currentTime, |
| | | user_name: '', |
| | | scope: state.editKnowledgeForm.scope, |
| | | }; |
| | | mittBus.emit('addKnowledgeBaseObj', obj); |
| | | mittBus.emit('updateKnowledgeBaseObj', obj); |
| | | router.push({ name: 'Knowledge' }); |
| | | } |
| | | }; |
| | |
| | | import { SupervisorPublished, supervisorPublishedMap } from '/@/views/project/yw/lowCode/sqlAmis/types'; |
| | | import { OptClassificationMap, classificationEnum } from '/@/views/types/metrics'; |
| | | import knowledgeLeft from '/static/images/knowledge/data_type_1.png'; |
| | | import item from 'element-plus/es/components/space/src/item'; |
| | | const router = useRouter(); |
| | | //#region ====================== 左侧树数据,tree init ====================== |
| | | const leftTreeRef = useCompRef(LeftTreeByMgr); |
| | |
| | | mittBus.on('addKnowledgeBaseObj', (obj) => { |
| | | knowledgeBaseList.value.push(obj); |
| | | }); |
| | | mittBus.on('updateKnowledgeBaseObj', (formValue) => { |
| | | const foundIndex = knowledgeBaseList.value.findIndex((item) => item.id === formValue.id); |
| | | if (foundIndex > -1) { |
| | | knowledgeBaseList.value[foundIndex] = { |
| | | ...knowledgeBaseList.value[foundIndex], |
| | | ...formValue, |
| | | }; |
| | | } |
| | | }); |
| | | }); |
| | | </script> |
| | | <style scoped lang="scss"> |