| | |
| | | <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 |
| | | > |
| | |
| | | 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"> |
| | | <el-table-column label="操作" width="120" fixed="right" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <!-- <el-button icon="ele-Tickets" size="small" text type="primary" @click="openOperateDemoPage(scope.row)"> 详情</el-button> --> |
| | | <el-tooltip effect="dark" content="删除" placement="top"> |
| | | <i |
| | | class="ywifont ywicon-shanchu !text-[17px] text-red-400 cursor-pointer" |
| | | @click="deleteCurrentFormulaRow(scope.row)" |
| | | ></i> |
| | | </el-tooltip> |
| | | <div class="space-x-2.5"> |
| | | <el-tooltip effect="dark" content="文档详情" placement="top"> |
| | | <i |
| | | class="ywifont ywicon-wendang !text-[17px] cursor-pointer text-blue-400" |
| | | @click="openOperateDemoPage(scope.row)" |
| | | ></i> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="查看" placement="top"> |
| | | <i |
| | | class="ywifont ywicon-yulan !text-[17px] cursor-pointer text-blue-400" |
| | | @click="handleViewKnowledgeFile(scope.row)" |
| | | ></i> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="删除" placement="top"> |
| | | <i |
| | | class="ywifont ywicon-shanchu !text-[17px] text-red-400 cursor-pointer" |
| | | @click="deleteCurrentFormulaRow(scope.row)" |
| | | ></i> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | 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, |
| | |
| | | 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 { |
| | |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | const handleViewKnowledgeFile = (row) => { |
| | | router.push({ |
| | | name: 'ViewFile', |
| | | query: { |
| | | id: row.id, |
| | | }, |
| | | }); |
| | | }; |
| | | //导入数据 |
| | | const importData = () => { |
| | | router.push({ |
| | | name: 'AddGraph', |
| | | query: { |
| | | group_id: currentListID.value, |
| | | title: currentTreeNode.value.title, |
| | | }, |
| | | }); |
| | | }; |