From 1f1a82aae0880c10d237a32ac878c2beb3a4c162 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Mon, 30 Jun 2025 19:51:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8E=A5=E5=85=A5=E7=95=85=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- .../knowledgeDocument/component/bookFile.vue | 34 +++----------- src/views/quality/knowledgeDocument/index.vue | 43 ++++++++---------- .../knowledgeDocument/component/bookFile.vue | 43 ++++++------------ .../component/documentsEdit.vue | 5 +- .../safety/knowledgeDocument/icon/full.png | Bin 0 -> 2830 bytes .../safety/knowledgeDocument/icon/suo.png | Bin 0 -> 2463 bytes src/views/safety/knowledgeDocument/index.vue | 18 ++++++-- 8 files changed, 54 insertions(+), 91 deletions(-) create mode 100644 src/views/safety/knowledgeDocument/icon/full.png create mode 100644 src/views/safety/knowledgeDocument/icon/suo.png diff --git a/index.html b/index.html index 4e225e1..25b2d10 100644 --- a/index.html +++ b/index.html @@ -210,7 +210,7 @@ + src="http://58.17.134.85:7363/changxieoffice/web-apps/apps/api/documents/api.js"> diff --git a/src/views/quality/knowledgeDocument/component/bookFile.vue b/src/views/quality/knowledgeDocument/component/bookFile.vue index 008de99..33c8f21 100644 --- a/src/views/quality/knowledgeDocument/component/bookFile.vue +++ b/src/views/quality/knowledgeDocument/component/bookFile.vue @@ -29,6 +29,7 @@ + - + @@ -57,30 +58,15 @@ import { ref, reactive, getCurrentInstance, nextTick } from 'vue'; import { listKnowledgeDocument, getProfileDetail } from '@/api/quality/knowledgeDocument'; import { useUserStoreHook } from '@/store/modules/user'; -const emit = defineEmits(['onExport', 'onExportView']); +const emit = defineEmits(['onExport', 'onExportView', 'onBook']); const stores = useUserStoreHook(); -const { proxy } = getCurrentInstance() as any; - -const documentDetailRef = ref(); -const allTreeRef = ref(); -const baseURL: string | undefined | boolean = import.meta.env.VITE_API_URL; - const loading = ref(false); const tableData = ref([]); const isShowDialog = ref(false); -const formData = reactive({ fileName: '', projectId: stores.selectedProject.id }); -const projectList = ref([]); -const projectQuery = reactive({ name: '' }); -const pageNum = ref(1); -const pageSize = ref(10); +const formData = reactive({ fileName: '', projectId: stores.selectedProject.id, pageNum: 1, pageSize: 10 }); const total = ref(0); -const showDocumentDetail = ref(false); const emptyText = ref('暂无数据'); const treeList = ref([]); -const arrayList = ref([]); -const infoMap = ref(new Map()); -const infoList = ref([]); -const paramsQuery = reactive({ idStr: '', project: '' }); const openDialog = () => { isShowDialog.value = true; @@ -104,7 +90,7 @@ const getDataFileQuery = () => { tableData.value = []; if (res.code == 200 && res.rows?.length) { tableData.value = res.rows; - total.value = res.rows.length; + total.value = res.total; } else { emptyText.value = '没有查询到数据,请重新输入搜索'; } @@ -112,15 +98,7 @@ const getDataFileQuery = () => { }; const onBook = (row: any) => { - return; - getProfileDetail(row.id).then((res: any) => { - if (res.code == 200) { - showDocumentDetail.value = true; - nextTick(() => { - documentDetailRef.value.openDialog(res.data); - }); - } - }); + emit('onBook', row); }; const onExport = (row: any) => { diff --git a/src/views/quality/knowledgeDocument/index.vue b/src/views/quality/knowledgeDocument/index.vue index f9d6062..f01b407 100644 --- a/src/views/quality/knowledgeDocument/index.vue +++ b/src/views/quality/knowledgeDocument/index.vue @@ -93,13 +93,14 @@ - - + + +