From 0345726cb118a0967989fb64159122117b297a97 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 二月 2026 13:59:01 +0800
Subject: [PATCH] 整改限制
---
src/views/safeProduction/safetyTrainingAssessment/index.vue | 101 +++++++++++++++++++++++++++++++++++++-------------
1 files changed, 74 insertions(+), 27 deletions(-)
diff --git a/src/views/safeProduction/safetyTrainingAssessment/index.vue b/src/views/safeProduction/safetyTrainingAssessment/index.vue
index 0027c7f..cbc35b8 100644
--- a/src/views/safeProduction/safetyTrainingAssessment/index.vue
+++ b/src/views/safeProduction/safetyTrainingAssessment/index.vue
@@ -2,23 +2,14 @@
<div class="app-container">
<div class="search_form">
<div>
- <span class="search_title">璇剧▼缂栧彿锛�</span>
- <el-input v-model="searchForm.courseCode"
- style="width: 240px"
- placeholder="璇疯緭鍏ュ煿璁紪鍙锋悳绱�"
- @change="handleQuery"
- clearable
- :prefix-icon="Search" />
- <span class="search_title ml10">鍩硅鏂瑰紡锛�</span>
- <el-select v-model="searchForm.trainingMode"
- clearable
- @change="handleQuery"
- style="width: 240px">
- <el-option v-for="item in trainingModeOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value" />
- </el-select>
+ <span class="search_title">鍩硅鏃ユ湡锛�</span>
+ <el-date-picker v-model="searchForm.trainingDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ @change="handleQuery"
+ type="date"
+ placeholder="璇烽�夋嫨"
+ clearable />
<el-button type="primary"
@click="handleQuery"
style="margin-left: 10px">
@@ -65,7 +56,8 @@
<el-form ref="formRef"
:model="form"
:rules="rules"
- label-width="120px">
+ label-position="top"
+ label-width="150px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鍩硅鏃ユ湡"
@@ -94,6 +86,7 @@
prop="openingTime">
<el-time-picker v-model="form.openingTime"
placeholder="璇烽�夋嫨"
+ style="width: 100%"
value-format="HH:mm:ss"
format="HH:mm:ss"
clearable />
@@ -104,6 +97,7 @@
prop="endTime">
<el-time-picker v-model="form.endTime"
placeholder="璇烽�夋嫨"
+ style="width: 100%"
value-format="HH:mm:ss"
format="HH:mm:ss"
clearable />
@@ -187,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>
@@ -199,8 +193,9 @@
width="900px"
:close-on-click-modal="false">
<div class="knowledge-detail">
+ <div class="classtitle">璇剧▼璇︽儏</div>
<el-descriptions size="mini"
- style="margin-left: 60px;"
+ border
:column="3">
<el-descriptions-item label="璇剧▼缂栧彿:">{{ currentKnowledge.courseCode }}</el-descriptions-item>
<el-descriptions-item label="鍩硅鍐呭:">{{ currentKnowledge.trainingContent }}</el-descriptions-item>
@@ -247,11 +242,14 @@
@click="downLoadFile(endform)">闄勪欢鍒楄〃</el-button>
</el-descriptions-item>
</el-descriptions>
- <el-divider style="margin: 20px 0;" />
+ <!-- <el-divider style="margin: 20px 0;" /> -->
+ <div class="classtitle"
+ style="margin-top: 40px;margin-bottom: 30px;">璇剧▼璇勪环</div>
<el-form ref="formRef"
:model="form"
:rules="rules"
- label-width="130px">
+ label-position="top"
+ label-width="150px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="璇勪环浜�:"
@@ -326,10 +324,13 @@
</el-col>
</el-row> -->
</el-form>
+ <div class="classtitle"
+ style="margin-top: 40px;">鑰冩牳鍒楄〃</div>
<el-table style="margin-top: 20px;"
:data="endform.safeTrainingDetailsDtoList"
border
fit
+ stripe
highlight-current-row>
<el-table-column prop="nickName"
label="濮撳悕" />
@@ -362,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>
@@ -426,8 +430,7 @@
// 鍝嶅簲寮忔暟鎹�
const data = reactive({
searchForm: {
- courseCode: "",
- trainingMode: "",
+ trainingDate: "",
state: 0,
},
tableLoading: false,
@@ -626,7 +629,7 @@
{
name: "缁撴灉鏄庣粏",
type: "text",
- // disabled: row => row.state !== 2,
+ disabled: row => row.state == 0,
clickFun: row => {
viewResultDetail(row);
},
@@ -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();
};
// 閫夋嫨鍙樺寲澶勭悊
@@ -1245,4 +1284,12 @@
:deep(.danger-row td) {
color: #e95a66 !important;
}
+ .classtitle {
+ font-size: 16px;
+ font-weight: 600;
+ color: #303133;
+ border-left: 4px solid #409eff;
+ padding-left: 12px;
+ margin-bottom: 12px;
+ }
</style>
--
Gitblit v1.9.3