From 3576bc2e689ef8ebb6b439084b00ddcec1247eb9 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 30 一月 2026 14:54:57 +0800
Subject: [PATCH] fix: 原材料、过程、出厂检验分配检验员后,其他用户编辑、提交按钮需置灰。只有分配的检验账户登录后才能编辑、提交操作。

---
 src/views/qualityManagement/processInspection/components/filesDia.vue |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/views/qualityManagement/processInspection/components/filesDia.vue b/src/views/qualityManagement/processInspection/components/filesDia.vue
index 66392f3..b0cb258 100644
--- a/src/views/qualityManagement/processInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/processInspection/components/filesDia.vue
@@ -26,38 +26,27 @@
           rowKey="id"
           :column="tableColumn"
           :tableData="tableData"
+          :page="page"
           :tableLoading="tableLoading"
           :isSelection="true"
           @selection-change="handleSelectionChange"
+          @pagination="paginationSearch"
           height="500"
       >
       </PIMTable>
-			<pagination
-				style="margin: 10px 0"
-				v-show="total > 0"
-				@pagination="paginationSearch"
-				:total="total"
-				:page="page.current"
-				:limit="page.size"
-			/>
       <template #footer>
         <div class="dialog-footer">
           <el-button @click="closeDia">鍙栨秷</el-button>
         </div>
       </template>
     </el-dialog>
+		<filePreview ref="filePreviewRef" />
   </div>
 </template>
 
 <script setup>
 import {ref} from "vue";
-import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
-import {Search} from "@element-plus/icons-vue";
-import {
-  qualityInspectParamDel,
-  qualityInspectParamInfo,
-  qualityInspectParamUpdate
-} from "@/api/qualityManagement/qualityInspectParam.js";
+import filePreview from '@/components/filePreview/index.vue'
 import {ElMessageBox} from "element-plus";
 import {getToken} from "@/utils/auth.js";
 import {
@@ -65,13 +54,13 @@
   qualityInspectFileDel,
   qualityInspectFileListPage
 } from "@/api/qualityManagement/qualityInspectFile.js";
-import Pagination from "@/components/PIMTable/Pagination.vue";
 const { proxy } = getCurrentInstance()
 const emit = defineEmits(['close'])
 
 const dialogFormVisible = ref(false);
 const currentId = ref('')
 const selectedRows = ref([]);
+const filePreviewRef = ref()
 const tableColumn = ref([
   {
     label: "鏂囦欢鍚嶇О",
@@ -88,15 +77,22 @@
         clickFun: (row) => {
           downLoadFile(row);
         },
-      }
+      },
+			{
+				name: "棰勮",
+				type: "text",
+				clickFun: (row) => {
+					lookFile(row);
+				},
+			}
     ],
   },
 ]);
 const page = reactive({
 	current: 1,
 	size: 100,
+	total: 0,
 });
-const total = ref(0);
 const tableData = ref([]);
 const fileList = ref([]);
 const tableLoading = ref(false);
@@ -117,9 +113,9 @@
 	getList();
 };
 const getList = () => {
-  qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+  qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
     tableData.value = res.data.records;
-		total.value = res.data.total;
+		page.total = res.data.total;
   })
 }
 // 琛ㄦ牸閫夋嫨鏁版嵁
@@ -158,6 +154,10 @@
 function handleUploadError() {
   proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
 }
+// 棰勮闄勪欢
+const lookFile = (row) => {
+	filePreviewRef.value.open(row.url)
+}
 // 鍒犻櫎
 const handleDelete = () => {
   let ids = [];

--
Gitblit v1.9.3