wujingjing
2024-10-21 d07f76351fa34a0f3b65d6f6f6e784aabd3a0b98
src/views/project/yw/dataManage/knowledge/Knowledge.vue
@@ -2,10 +2,10 @@
   <div class="h100 overflow-y-auto">
      <div class="flex flex-col h100">
         <el-row class="h100">
            <el-col :span="4" class="h100">
            <el-col :span="4" class="h100 px-[10px]">
               <LeftTreeByMgr
                  v-loading="treeLoading"
                  class="h100"
                  class="h100 p-[20px]"
                  ref="leftTreeRef"
                  :defaultProps="{
                     id: 'group_id',
@@ -16,6 +16,7 @@
                  title-name="分组列表"
                  :show-more-operate="false"
                  :show-add="false"
                  defaultExpandAll
                  :current-node-key="currentListID"
                  :node-icon="() => 'ele-Document'"
                  @click="handleClickNode"
@@ -129,7 +130,9 @@
import { useCompRef } from '/@/utils/types';
import { convertListToTree } from '/@/utils/util';
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);
@@ -138,11 +141,17 @@
const currentListID = computed(() => currentNode.value?.group_id);
const currentNode = ref(null);
const listTreeData = computed(() => {
   const result = convertListToTree(listData.value, {
   const byParentData = convertListToTree(listData.value, {
      ID: 'group_id',
      ParentID: 'p_group_id',
      Children: 'children',
   });
   const result = [];
   byParentData.forEach((item) => {
      if (item.group_type == OptClassificationMap[classificationEnum.Knowledge]) {
         result.push(item);
      }
   });
   return result;
});
const handleClickNode = (data) => {