From 6b35989783d91899169f89e21a7d3734d8cadc1d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期日, 04 一月 2026 15:19:54 +0800
Subject: [PATCH] 1.海川开心
---
src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue | 51 +++++++++++++++++++++++++++++++++------------------
1 files changed, 33 insertions(+), 18 deletions(-)
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
index cdce2c5..eb46972 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
@@ -4,6 +4,7 @@
v-model="dialogFormVisible"
title="涓婁紶闄勪欢"
width="50%"
+ draggable
@close="closeDia"
>
<div style="margin-bottom: 10px;text-align: right">
@@ -29,7 +30,9 @@
:tableLoading="tableLoading"
:isSelection="true"
@selection-change="handleSelectionChange"
- height="600"
+ height="500"
+ :page="page"
+ @pagination="pagination"
>
</PIMTable>
<template #footer>
@@ -38,18 +41,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 {
@@ -68,14 +66,6 @@
label: "鏂囦欢鍚嶇О",
prop: "name",
},
- // {
- // label: "涓婁紶浜�",
- // prop: "createUser",
- // },
- // {
- // label: "涓婁紶鏃堕棿",
- // prop: "createTime",
- // },
{
dataType: "action",
label: "鎿嶄綔",
@@ -87,13 +77,27 @@
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);
+const filePreviewRef = ref()
const headers = ref({
Authorization: "Bearer " + getToken(),
});
@@ -105,9 +109,16 @@
currentId.value = row.id;
getList()
}
+const pagination = (obj) => {
+ page.current = obj.page;
+ page.size = obj.limit;
+ getList();
+};
+
const getList = () => {
- qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+ qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
tableData.value = res.data.records;
+ page.total = res.data.total;
})
}
// 琛ㄦ牸閫夋嫨鏁版嵁
@@ -147,6 +158,10 @@
const downLoadFile = (row) => {
proxy.$download.name(row.url);
}
+// 棰勮闄勪欢
+const lookFile = (row) => {
+ filePreviewRef.value.open(row.url)
+}
// 鍒犻櫎
const handleDelete = () => {
let ids = [];
--
Gitblit v1.9.3