From a3c508233dd94b50c8005ec3a5d40b91341d6434 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 29 一月 2026 17:58:30 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/safeProduction/accidentReportingRecord/index.vue | 53 ++++++++++++++++++++++++++++-------------------------
1 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/src/views/safeProduction/accidentReportingRecord/index.vue b/src/views/safeProduction/accidentReportingRecord/index.vue
index bf064cd..b38f04a 100644
--- a/src/views/safeProduction/accidentReportingRecord/index.vue
+++ b/src/views/safeProduction/accidentReportingRecord/index.vue
@@ -229,10 +229,10 @@
{{ currentKnowledge.happenLocation }}
</el-descriptions-item>
<el-descriptions-item label="浜嬫晠绛夌骇">
- {{ currentKnowledge.accidentGrade }}
+ <el-tag :type="accidentGradeType(currentKnowledge.accidentGrade)">{{ currentKnowledge.accidentGrade }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="浜嬫晠绫诲瀷">
- {{ currentKnowledge.accidentType }}
+ <el-tag type="info">{{ accidentTypeLabel(currentKnowledge.accidentType) }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="浜哄憳浼や骸鎯呭喌">
{{ currentKnowledge.personLoss }}
@@ -409,6 +409,9 @@
label: "浜嬫晠绫诲瀷",
prop: "accidentType",
showOverflowTooltip: true,
+ formatData: params => {
+ return accidentTypeLabel(params);
+ },
},
{
dataType: "action",
@@ -462,6 +465,20 @@
page.value.current = 1;
getList();
};
+ const accidentGradeType = val => {
+ switch (val) {
+ case "杞诲井浜嬫晠":
+ return "info";
+ case "涓�鑸簨鏁�":
+ return "info";
+ case "杈冨ぇ浜嬫晠":
+ return "warning";
+ case "閲嶅ぇ浜嬫晠":
+ return "danger";
+ default:
+ return "info";
+ }
+ };
const accidentGradeOptions = [
{
label: "杞诲井浜嬫晠",
@@ -480,25 +497,15 @@
value: "閲嶅ぇ浜嬫晠",
},
];
- const accidentTypeOptions = [
- {
- label: "璐d换浜嬫晠",
- value: "璐d换浜嬫晠",
- },
- {
- label: "闈炶矗浠讳簨鏁�",
- value: "闈炶矗浠讳簨鏁�",
- },
- {
- label: "鐮村潖鎬т簨鏁�",
- value: "鐮村潖鎬т簨鏁�",
- },
- {
- label: "閲嶅ぇ浜嬫晠",
- value: "閲嶅ぇ浜嬫晠",
- },
- ];
-
+ const { proxy } = getCurrentInstance();
+ const { accident_type } = proxy.useDict("accident_type");
+ const accidentTypeOptions = computed(() => accident_type?.value || []);
+ const accidentTypeLabel = val => {
+ const item = accidentTypeOptions.value.find(
+ i => String(i.value) === String(val)
+ );
+ return item ? item.label : val;
+ };
const getList = () => {
tableLoading.value = true;
safeAccidentListPage({ ...page.value, ...searchForm.value })
@@ -711,10 +718,6 @@
// 鐢ㄦ埛鍙栨秷
});
};
-
- // 瀵煎嚭
- const { proxy } = getCurrentInstance();
- const { knowledge_type } = proxy.useDict("knowledge_type");
// 瀛楀吀宸ュ叿
const knowledgeTypeOptions = computed(() => knowledge_type?.value || []);
--
Gitblit v1.9.3