From 026d4d630d2de6253a2e17192e06abe674fdf7b0 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 二月 2026 10:30:01 +0800
Subject: [PATCH] 安全生产模块所有附件页面
---
src/views/safeProduction/safeQualifications/index.vue | 41 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/src/views/safeProduction/safeQualifications/index.vue b/src/views/safeProduction/safeQualifications/index.vue
index d7c41f9..e61a39c 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>
@@ -514,12 +517,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 +616,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 +627,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
// 杩斿洖鏂版枃浠朵俊鎭�
resolve({
@@ -639,6 +655,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 +685,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 +696,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
}
return true; // 杩斿洖 true 琛ㄧず鍒犻櫎鎴愬姛锛岀粍浠朵細鏇存柊鍒楄〃
--
Gitblit v1.9.3