From daf28bb8d2b58858a35fbdeffa9076de9b81706c Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 06 九月 2024 11:50:31 +0800
Subject: [PATCH] 添加图标文件

---
 src/views/project/yw/dataManage/graph/GraphIndex.vue |   49 +++++++++++++++++++------------------------------
 1 files changed, 19 insertions(+), 30 deletions(-)

diff --git a/src/views/project/yw/dataManage/graph/GraphIndex.vue b/src/views/project/yw/dataManage/graph/GraphIndex.vue
index 01d0182..af642ae 100644
--- a/src/views/project/yw/dataManage/graph/GraphIndex.vue
+++ b/src/views/project/yw/dataManage/graph/GraphIndex.vue
@@ -53,21 +53,21 @@
 
 		<template #header>
 			<!-- 鏌ヨ銆侀噸缃�佹帓搴忋�佸鍔犺〃鍗� -->
-			<el-form :inline="true" :model="formulaQueryParams">
+			<el-form :inline="true" :model="graphQueryParams">
 				<el-form-item label="鍚嶇О" prop="title">
-					<el-input v-model="formulaQueryParams.title" style="width: 226.4px" placeholder="鏂囦欢鍚嶇О" clearable></el-input>
+					<el-input v-model="graphQueryParams.title" style="width: 226.4px" placeholder="鏂囦欢鍚嶇О" clearable></el-input>
 				</el-form-item>
-				<el-form-item>
-					<el-select v-model="formulaQueryParams.Code" autocomplete="off" style="width: 226.4px" clearable>
+				<!-- <el-form-item>
+					<el-select v-model="graphQueryParams.Code" autocomplete="off" style="width: 226.4px" clearable>
 						<el-option v-for="item in Object.keys(analyzeMap)" :key="item" :value="parseInt(item)" :label="analyzeMap[item]">
 						</el-option>
 					</el-select>
-				</el-form-item>
+				</el-form-item> -->
 
 				<el-form-item>
-					<el-button type="primary" icon="ele-Search"> 鏌ヨ </el-button>
-					<el-button icon="ele-Refresh">閲嶇疆 </el-button>
-					<el-button icon="ele-Plus" @click="importData()"> 瀵煎叆鏁版嵁 </el-button>
+					<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()" type="primary"> 瀵煎叆鏁版嵁 </el-button>
 				</el-form-item>
 			</el-form></template
 		>
@@ -82,11 +82,11 @@
 					class="flex-auto"
 					:row-class-name="isFormulaTableDrag ? 'cursor-move' : 'cursor-pointer'"
 					:header-cell-style="{ textAlign: 'center' }"
-					:data="categoryTableData"
+					:data="displayTableData"
 					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="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">
@@ -100,19 +100,6 @@
 						</template>
 					</el-table-column>
 				</el-table>
-				<!-- <div class="flex-0">
-					<el-pagination
-						v-model:currentPage="state.tableParams.PageIndex"
-						v-model:page-size="state.tableParams.PageSize"
-						:total="state.tableTotal"
-						:page-sizes="[10, 20, 50, 100]"
-						background
-						@size-change="handleSizeChange"
-						style="margin-bottom: 20px"
-						@current-change="handleCurrentChange"
-						layout="total, sizes, prev, pager, next, jumper"
-					/>
-				</div> -->
 			</div>
 		</template>
 		<!-- 澧炲姞銆佷慨鏀规暟鎹璇濇 -->
@@ -185,9 +172,9 @@
 } from '/@/api/knowledge/group';
 import AHMContainer from '/@/components/layout/AHMContainer.vue';
 import LeftTreeByMgr from '/@/components/tree/leftTreeByMgr.vue';
+import { useQueryTable } from '/@/hooks/useQueryTable';
 import { deepClone } from '/@/utils/other';
 import { convertListToTree } from '/@/utils/util';
-import { analyzeMap } from '/@/views/types/catalog/index';
 const state = reactive({
 	tableParams: {
 		PageIndex: 1,
@@ -241,13 +228,11 @@
 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;
-		});
 		categoryTableData.value = resData;
 	} else {
 		ElMessage.error('鑾峰彇鏂囨。鍒楄〃澶辫触' + (res?.json_msg ? `锛�${JSON.stringify(res.json_msg)}` : ''));
@@ -277,8 +262,11 @@
 //#endregion
 
 //#region ====================== 鎼滅储琛ㄦ牸锛屽琛ㄦ牸鎺掑簭 ======================
-const formulaQueryParams = ref({
+const graphQueryParams = ref({
 	title: '',
+});
+const { resetQuery, handleQueryTable, displayTableData } = useQueryTable(categoryTableData, graphQueryParams, () => {
+	displayTableData.value = categoryTableData.value;
 });
 //#endregion
 
@@ -299,6 +287,7 @@
 		name: 'AddGraph',
 		query: {
 			group_id: currentListID.value,
+			title: currentTreeNode.value.title,
 		},
 	});
 };

--
Gitblit v1.9.3