From 04bc1dbb0a2f0ed846c7202b8c880a4eae46a6a7 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 16 十二月 2025 10:57:48 +0800
Subject: [PATCH] 1.海川开心-质量管理附件修改
---
src/views/qualityManagement/processInspection/components/filesDia.vue | 48 +++++++++++++++++++++++++++++++-----------------
1 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/src/views/qualityManagement/processInspection/components/filesDia.vue b/src/views/qualityManagement/processInspection/components/filesDia.vue
index 008479c..768ea5b 100644
--- a/src/views/qualityManagement/processInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/processInspection/components/filesDia.vue
@@ -29,7 +29,9 @@
:tableLoading="tableLoading"
:isSelection="true"
@selection-change="handleSelectionChange"
- height="600"
+ height="500"
+ :page="page"
+ @pagination="pagination"
>
</PIMTable>
<template #footer>
@@ -38,18 +40,13 @@
</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 {
@@ -63,19 +60,12 @@
const dialogFormVisible = ref(false);
const currentId = ref('')
const selectedRows = ref([]);
+const filePreviewRef = ref()
const tableColumn = ref([
{
label: "鏂囦欢鍚嶇О",
prop: "name",
},
- // {
- // label: "涓婁紶浜�",
- // prop: "createUser",
- // },
- // {
- // label: "涓婁紶鏃堕棿",
- // prop: "createTime",
- // },
{
dataType: "action",
label: "鎿嶄綔",
@@ -87,10 +77,23 @@
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);
@@ -105,11 +108,18 @@
currentId.value = row.id;
getList()
}
+
const getList = () => {
qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
tableData.value = res.data.records;
+ page.total = res.data.total;
})
}
+const pagination = (obj) => {
+ page.current = obj.page;
+ page.size = obj.limit;
+ getList();
+};
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
selectedRows.value = selection;
@@ -146,6 +156,10 @@
function handleUploadError() {
proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
}
+// 棰勮闄勪欢
+const lookFile = (row) => {
+ filePreviewRef.value.open(row.url)
+}
// 鍒犻櫎
const handleDelete = () => {
let ids = [];
--
Gitblit v1.9.3