From 11e1de7bb345bc937cce53a2ac7672476b5b4db3 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期一, 02 二月 2026 16:17:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New
---
src/views/safeProduction/safetyTrainingAssessment/index.vue | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/src/views/safeProduction/safetyTrainingAssessment/index.vue b/src/views/safeProduction/safetyTrainingAssessment/index.vue
index dde52df..cbc35b8 100644
--- a/src/views/safeProduction/safetyTrainingAssessment/index.vue
+++ b/src/views/safeProduction/safetyTrainingAssessment/index.vue
@@ -181,9 +181,9 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
@click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -363,8 +363,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>
@@ -790,9 +793,14 @@
const currentFileRow = ref(null);
const downLoadFile = row => {
currentFileRow.value = row;
- safeTrainingFileListPage({ safeTrainingId: row.id }).then(res => {
+ safeTrainingFileListPage({
+ safeTrainingId: 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;
}
});
};
@@ -844,6 +852,8 @@
// 閲嶆柊鍔犺浇鏂囦欢鍒楄〃
const listRes = await safeTrainingFileListPage({
safeTrainingId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
});
if (listRes.code === 200 && fileListRef.value) {
const fileList = (listRes.data?.records || []).map(item => ({
@@ -853,6 +863,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
// 杩斿洖鏂版枃浠朵俊鎭�
resolve({
@@ -880,6 +891,31 @@
input.click();
});
};
+ const filePagination = ref({
+ current: 1,
+ size: 10,
+ total: 0,
+ });
+ const paginationSearch = async (page, size) => {
+ filePagination.value.current = page;
+ filePagination.value.size = size;
+ const listRes = await safeTrainingFileListPage({
+ safeTrainingId: 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 {
@@ -890,6 +926,8 @@
if (currentFileRow.value && fileListRef.value) {
const listRes = await safeTrainingFileListPage({
safeTrainingId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
});
if (listRes.code === 200) {
const fileList = (listRes.data?.records || []).map(item => ({
@@ -899,6 +937,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
}
return true; // 杩斿洖 true 琛ㄧず鍒犻櫎鎴愬姛锛岀粍浠朵細鏇存柊鍒楄〃
@@ -971,7 +1010,7 @@
const pagination = obj => {
page.value.current = obj.page;
page.value.size = obj.limit;
- handleQuery();
+ getList();
};
// 閫夋嫨鍙樺寲澶勭悊
--
Gitblit v1.9.3