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 @@
+
{{ filterfilenPath(scope.row.filePath) }}
@@ -45,7 +46,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 @@
-
-
+
+
+
查看修改文件
-
-
+
@@ -179,16 +180,13 @@ type KnowledgeDocumentOption = {
fileName: string;
children?: KnowledgeDocumentOption[];
};
-// import documentDetail from '/@/views/OnlineEngineering/comm/documentsDetail/index.vue';
-// import documentsEdit from '/@/views/OnlineEngineering/comm/documentsEdit/index.vue';
-// import profileData from '/@/views/OnlineEngineering/profileData/index.vue';
-// import uploadFileder from '/@/views/OnlineEngineering/comm/uploadFileder/index.vue';
-// import fileOnline from '/@/views/OnlineEngineering/profileEngineering/fileOnline/index.vue';
-// import moveFile from '/@/views/OnlineEngineering/profileEngineering/moveFile/index.vue';
+import DocumentsEdit from '@/views/safety/knowledgeDocument/component/documentsEdit.vue';
+import documentsDeailsVue from '@/views/safety/knowledgeDocument/component/documentsDeails.vue';
import RecyclingStation from './component/recyclingStation.vue';
import { useUserStoreHook } from '@/store/modules/user';
import bookFile from './component/bookFile.vue';
+
const activeName = ref('first');
const { proxy } = getCurrentInstance() as any;
// 获取用户 store
@@ -245,7 +243,7 @@ const state = reactive({
parentName: '',
selectedNodeId: null,
projectId: currentProject.value?.id || '',
- acceptType: ['.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx'],
+ acceptType: ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'],
draggableCheck: true,
activeName: ''
});
@@ -418,15 +416,10 @@ const updateName = (row) => {
editName(row, '请输入文件名称', 1);
};
const handleView = (row) => {
- // getProfileDetail(row.id).then((res: any) => {
- // if (res.code == 200) {
- // // 查看文档
- // state.showDocumentDetail = true;
- // nextTick(() => {
- // documentDetailRef.value.openDialog(res.data);
- // });
- // }
- // });
+ state.showDocumentDetail = true;
+ nextTick(() => {
+ documentDetailRef.value.openDialog(row);
+ });
};
// 关闭在线编辑弹框
const onClose = () => {
@@ -440,7 +433,7 @@ const updataView = (row) => {
// 修改文档
state.showdocumentDataEdit = true;
nextTick(() => {
- documentDataEditRef.value.openDialog(row, '/zm/api/v1/system/busConstructionUser/complaintBoxAddTwo');
+ documentDataEditRef.value.openDialog(row, '/quality/knowledgeDocument/changxie/callback/');
});
};
// 删除文件及文件夹
diff --git a/src/views/safety/knowledgeDocument/component/bookFile.vue b/src/views/safety/knowledgeDocument/component/bookFile.vue
index bf1f99d..c450c7e 100644
--- a/src/views/safety/knowledgeDocument/component/bookFile.vue
+++ b/src/views/safety/knowledgeDocument/component/bookFile.vue
@@ -29,6 +29,8 @@
+
+
{{ filterfilenPath(scope.row.filePath) }}
@@ -45,7 +47,7 @@
-
+
@@ -53,34 +55,23 @@
-