| | |
| | | {{ 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 }} |
| | |
| | | label: "事故类型", |
| | | prop: "accidentType", |
| | | showOverflowTooltip: true, |
| | | formatData: params => { |
| | | return accidentTypeLabel(params); |
| | | }, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | 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: "轻微事故", |
| | |
| | | value: "重大事故", |
| | | }, |
| | | ]; |
| | | const accidentTypeOptions = [ |
| | | { |
| | | label: "责任事故", |
| | | value: "责任事故", |
| | | }, |
| | | { |
| | | 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 }) |
| | |
| | | // 用户取消 |
| | | }); |
| | | }; |
| | | |
| | | // 导出 |
| | | const { proxy } = getCurrentInstance(); |
| | | const { knowledge_type } = proxy.useDict("knowledge_type"); |
| | | |
| | | // 字典工具 |
| | | const knowledgeTypeOptions = computed(() => knowledge_type?.value || []); |