yangyin
2024-09-06 b01a1c6b97a120c7d7fc2a19a23ae55121277fde
src/views/project/yw/dataManage/graph/GraphIndex.vue
@@ -67,7 +67,7 @@
            <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="handleQueryTable"> 查询 </el-button>
               <el-button icon="ele-Refresh" @click="resetQuery">重置 </el-button>
               <el-button icon="ele-Plus" @click="importData()"> 导入数据 </el-button>
               <el-button icon="ele-Plus" @click="importData()" type="primary"> 导入数据 </el-button>
            </el-form-item>
         </el-form></template
      >
@@ -86,7 +86,8 @@
               highlight-current-row
            >
               <el-table-column prop="name" label="文件名称" fixed="left" show-overflow-tooltip align="left" />
               <el-table-column prop="type" width="120" label="文件格式" show-overflow-tooltip align="center" />
               <el-table-column prop="type" width="120" label="文件类型" show-overflow-tooltip align="center" />
               <el-table-column prop="size" width="120" label="文件大小" show-overflow-tooltip align="center" />
               <el-table-column prop="time" label="上传时间" show-overflow-tooltip width="280" align="center"></el-table-column>
               <el-table-column label="操作" width="80" fixed="right" show-overflow-tooltip align="center">
                  <template #default="scope">
@@ -174,7 +175,7 @@
import LeftTreeByMgr from '/@/components/tree/leftTreeByMgr.vue';
import { useQueryTable } from '/@/hooks/useQueryTable';
import { deepClone } from '/@/utils/other';
import { convertListToTree } from '/@/utils/util';
import { convertFileSize, convertListToTree } from '/@/utils/util';
const state = reactive({
   tableParams: {
      PageIndex: 1,
@@ -228,12 +229,13 @@
const categoryTableData = ref([]);
const isFormulaTableDrag = ref(false);
const getCategoryTableData = async () => {
   const res = await list_knowledge_file().finally(() => {});
   const res = await list_knowledge_file({
      group_id: currentListID.value,
   }).finally(() => {});
   if (res?.json_ok) {
      const resData = (res.values || []) as [];
      resData.forEach((item) => {
         const type = item?.name.split('.')[1];
         item.type = type;
         item.size = convertFileSize(item.size);
      });
      categoryTableData.value = resData;
   } else {
@@ -289,6 +291,7 @@
      name: 'AddGraph',
      query: {
         group_id: currentListID.value,
         title: currentTreeNode.value.title,
      },
   });
};