From 7427fcc7d9fa212404889a3fd41f985ead94c062 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 28 七月 2026 17:04:29 +0800
Subject: [PATCH] fix: 安全培训考核调整
---
src/views/safeProduction/safetyTrainingAssessment/detail.vue | 10 ++++++----
src/views/safeProduction/safetyTrainingAssessment/index.vue | 47 +++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 49 insertions(+), 8 deletions(-)
diff --git a/src/views/safeProduction/safetyTrainingAssessment/detail.vue b/src/views/safeProduction/safetyTrainingAssessment/detail.vue
index 9e3af6b..3d4f011 100644
--- a/src/views/safeProduction/safetyTrainingAssessment/detail.vue
+++ b/src/views/safeProduction/safetyTrainingAssessment/detail.vue
@@ -44,16 +44,18 @@
width="60" />
<el-table-column label="鍚嶇О"
prop="nickName"
+ align="center"
show-overflow-tooltip
- width="200" />
+ width="120" />
<el-table-column label="鎵�灞為儴闂�"
prop="deptNames"
- show-overflow-tooltip
- width="200" />
+ align="center"
+ show-overflow-tooltip />
<el-table-column label="鑱旂郴鏂瑰紡"
prop="phonenumber"
+ align="center"
show-overflow-tooltip
- width="200" />
+ width="150" />
<!-- <el-table-column label="email"
prop="email"
show-overflow-tooltip
diff --git a/src/views/safeProduction/safetyTrainingAssessment/index.vue b/src/views/safeProduction/safetyTrainingAssessment/index.vue
index 2c98308..98e5d31 100644
--- a/src/views/safeProduction/safetyTrainingAssessment/index.vue
+++ b/src/views/safeProduction/safetyTrainingAssessment/index.vue
@@ -492,6 +492,11 @@
]);
const fileList = ref([]);
+ const getTrainingState = row => Number(row?.state);
+ const isNotStartedTraining = row => getTrainingState(row) === 0;
+ const isInProgressTraining = row => getTrainingState(row) === 1;
+ const isEndedTraining = row => getTrainingState(row) === 2;
+ const hasKnownTrainingState = row => [0, 1, 2].includes(getTrainingState(row));
// 琛ㄦ牸鍒楅厤缃�
const tableColumn = ref([
@@ -582,12 +587,12 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 300,
+ width: 220,
operation: [
{
name: "绛惧埌",
type: "text",
- disabled: row => row.state !== 1,
+ show: isInProgressTraining,
clickFun: row => {
signIn(row);
},
@@ -595,7 +600,7 @@
{
name: "缂栬緫",
type: "text",
- disabled: row => row.state !== 0,
+ show: isNotStartedTraining,
clickFun: row => {
openForm("edit", row);
},
@@ -603,6 +608,7 @@
{
name: "瀵煎嚭",
type: "text",
+ show: isEndedTraining,
clickFun: row => {
exportKnowledge(row);
},
@@ -611,6 +617,7 @@
{
name: "闄勪欢",
type: "text",
+ show: hasKnownTrainingState,
clickFun: row => {
openFileDialog(row);
},
@@ -620,7 +627,7 @@
{
name: "缁撴灉鏄庣粏",
type: "text",
- disabled: row => row.state == 0,
+ show: isEndedTraining,
clickFun: row => {
viewResultDetail(row);
},
@@ -1189,6 +1196,38 @@
</script>
<style scoped>
+ .search_form {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ gap: 14px 18px;
+ min-height: 44px;
+ margin-bottom: 18px;
+ padding-bottom: 10px;
+ }
+
+ .search_form > div {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 10px;
+ }
+
+ .search_title {
+ margin-right: 4px;
+ font-weight: 600;
+ white-space: nowrap;
+ }
+
+ .table_list {
+ padding-top: 4px;
+ }
+
+ :deep(.el-tabs__header) {
+ margin-bottom: 16px;
+ }
+
.auto-refresh-info {
margin-bottom: 15px;
}
--
Gitblit v1.9.3