From ccb00a17b9119200b8c8d29a177bcc129dd4c982 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 19 三月 2026 17:43:13 +0800
Subject: [PATCH] Merge branch 'dev_KTHG' of http://114.132.189.42:9002/r/product-inventory-management into dev_KTHG
---
src/views/safeProduction/safeQualifications/index.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 47 insertions(+), 5 deletions(-)
diff --git a/src/views/safeProduction/safeQualifications/index.vue b/src/views/safeProduction/safeQualifications/index.vue
index d7c41f9..1d067d9 100644
--- a/src/views/safeProduction/safeQualifications/index.vue
+++ b/src/views/safeProduction/safeQualifications/index.vue
@@ -207,8 +207,11 @@
v-model="fileListDialogVisible"
:show-upload-button="true"
:show-delete-button="true"
+ :is-show-pagination="true"
+ :page="filePagination"
:upload-method="handleUpload"
:delete-method="handleFileDelete"
+ @pagination="paginationSearch"
title="闄勪欢鍒楄〃" />
</div>
</template>
@@ -405,7 +408,9 @@
executionDate: "",
};
} else {
- form.value = row;
+ // 鍏抽敭锛氱紪杈戞椂涓嶈鐩存帴寮曠敤琛ㄦ牸琛屽璞★紝閬垮厤鍙栨秷/閲嶇疆鏃舵妸鍒楄〃鏁版嵁涓�璧锋竻绌�
+ // 浣跨敤娣辨嫹璐濇柇寮�寮曠敤鍏崇郴
+ form.value = JSON.parse(JSON.stringify(row || {}));
}
dialogFormVisible.value = true;
};
@@ -450,6 +455,7 @@
// 鍏抽棴寮规
const closeDia = () => {
proxy.resetForm("formRef");
+ form.value = {};
dialogFormVisible.value = false;
};
// 鍏抽棴浜у搧寮规
@@ -514,12 +520,22 @@
const fileListRef = ref(null);
const fileListDialogVisible = ref(false);
const currentFileRow = ref(null);
+ const filePagination = ref({
+ current: 1,
+ size: 10,
+ total: 0,
+ });
const downLoadFile = row => {
currentFileRow.value = row;
- fileListPage({ safeCertificationId: row.id }).then(res => {
+ fileListPage({
+ safeCertificationId: row.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
+ }).then(res => {
if (fileListRef.value) {
fileListRef.value.open(res.data.records);
}
+ filePagination.value.total = res.data.total || 0;
});
};
const currentFactoryName = ref("");
@@ -603,6 +619,8 @@
// 閲嶆柊鍔犺浇鏂囦欢鍒楄〃
const listRes = await fileListPage({
safeCertificationId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
});
if (listRes.code === 200 && fileListRef.value) {
const fileList = (listRes.data?.records || []).map(item => ({
@@ -612,6 +630,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
// 杩斿洖鏂版枃浠朵俊鎭�
resolve({
@@ -639,6 +658,26 @@
input.click();
});
};
+ const paginationSearch = async (page, size) => {
+ filePagination.value.current = page;
+ filePagination.value.size = size;
+ const listRes = await fileListPage({
+ safeCertificationId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
+ });
+ if (listRes.code === 200) {
+ const fileList = (listRes.data?.records || []).map(item => ({
+ name: item.name,
+ url: item.url,
+ id: item.id,
+ ...item,
+ }));
+
+ fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
+ }
+ };
// 鍒犻櫎闄勪欢
const handleFileDelete = async row => {
try {
@@ -649,6 +688,8 @@
if (currentFileRow.value && fileListRef.value) {
const listRes = await fileListPage({
safeCertificationId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
});
if (listRes.code === 200) {
const fileList = (listRes.data?.records || []).map(item => ({
@@ -658,6 +699,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
}
return true; // 杩斿洖 true 琛ㄧず鍒犻櫎鎴愬姛锛岀粍浠朵細鏇存柊鍒楄〃
@@ -685,9 +727,9 @@
background-color: #fef0f0 !important;
}
- :deep(.warning-row td) {
- // color: #cf1322 !important;
- }
+ /* :deep(.warning-row td) {
+ color: #cf1322 !important;
+ } */
.actions {
display: flex;
--
Gitblit v1.9.3