| | |
| | | {{ 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 || []); |
| | |
| | | <span class="detail-title">{{ form.hiddenDesc }}</span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="隐患类型"> |
| | | <span class="detail-title">{{ form.type }}</span> |
| | | <span class="detail-title">{{ TypeLabel(form.type) }}</span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="隐患风险等级"> |
| | | <el-tag :type="getTypeTagType(form.riskLevel)"> |
| | |
| | | <script setup> |
| | | import { getToken } from "@/utils/auth"; |
| | | import pagination from "@/components/PIMTable/Pagination.vue"; |
| | | import { onMounted, ref, getCurrentInstance } from "vue"; |
| | | import { onMounted, ref, getCurrentInstance, computed } from "vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | |
| | | verifyResult: [{ required: true, message: "请选择", trigger: "change" }], |
| | | acceptDesc: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | }; |
| | | const typeList = ref([ |
| | | { |
| | | value: "设备安全", |
| | | label: "设备安全", |
| | | }, |
| | | { |
| | | value: "人员操作", |
| | | label: "人员操作", |
| | | }, |
| | | { |
| | | value: "环境风险", |
| | | label: "环境风险", |
| | | }, |
| | | { |
| | | value: "物料管控", |
| | | label: "物料管控", |
| | | }, |
| | | { |
| | | value: "其他", |
| | | label: "其他", |
| | | }, |
| | | ]); |
| | | const { hidden_danger_type } = proxy.useDict("hidden_danger_type"); |
| | | const typeList = computed(() => hidden_danger_type?.value || []); |
| | | const TypeLabel = val => { |
| | | const item = typeList.value.find(i => String(i.value) === String(val)); |
| | | return item ? item.label : val; |
| | | }; |
| | | const form2 = ref({ |
| | | rectifyActualTime: "", // 实际整改完成时间 |
| | | rectifyMeasures: "", // 整改具体措施 |
| | |
| | | label: "低风险", |
| | | }, |
| | | ]); |
| | | // 隐患类型选项 |
| | | const { type_qualification } = proxy.useDict("type_qualification"); |
| | | const { form, rules } = toRefs(data); |
| | | const { form: searchForm } = useFormData(data.searchForm); |
| | | // 产品表单弹框数据 |
| | |
| | | {{ currentKnowledge.coreResponsorUserName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="预案类型"> |
| | | <el-tag type="warning"> {{ currentKnowledge.planType }}</el-tag> |
| | | <el-tag type="warning"> {{ emergencyPlanTypeLabel(currentKnowledge.planType) }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="备注"> |
| | | {{ currentKnowledge.remark }} |
| | |
| | | label: "预案类型", |
| | | prop: "planType", |
| | | showOverflowTooltip: true, |
| | | formatData: params => { |
| | | return emergencyPlanTypeLabel(params); |
| | | }, |
| | | }, |
| | | { |
| | | label: "备注", |
| | |
| | | }; |
| | | return timeMap[efficiency] || "未知"; |
| | | }; |
| | | const emergencyPlanTypeOptions = computed(() => [ |
| | | { |
| | | value: "预防性应急预案", |
| | | label: "预防性应急预案", |
| | | }, |
| | | { |
| | | value: "应急处理预案", |
| | | label: "应急处理预案", |
| | | }, |
| | | { |
| | | value: "恢复性应急预案", |
| | | label: "恢复性应急预案", |
| | | }, |
| | | ]); |
| | | const { proxy } = getCurrentInstance(); |
| | | const { emergency_plan_type } = proxy.useDict("emergency_plan_type"); |
| | | const emergencyPlanTypeOptions = computed( |
| | | () => emergency_plan_type?.value || [] |
| | | ); |
| | | const emergencyPlanTypeLabel = val => { |
| | | const item = emergencyPlanTypeOptions.value.find( |
| | | i => String(i.value) === String(val) |
| | | ); |
| | | return item ? item.label : val; |
| | | }; |
| | | // 提交应急预案表单 |
| | | const submitForm = async () => { |
| | | try { |
| | |
| | | }; |
| | | |
| | | // 导出 |
| | | const { proxy } = getCurrentInstance(); |
| | | const { knowledge_type } = proxy.useDict("knowledge_type"); |
| | | |
| | | // 字典工具 |
| | | const knowledgeTypeOptions = computed(() => knowledge_type?.value || []); |
| | |
| | | {{ currentKnowledge.code }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="危险源类型"> |
| | | {{ getTypeLabel(currentKnowledge.type) }} |
| | | <el-tag type="info"> |
| | | {{ getTypeLabel(currentKnowledge.type) }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="所在位置"> |
| | | {{ currentKnowledge.location }} |
| | |
| | | <span>{{ form.name }}</span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="危险源类型"> |
| | | <span>{{ getTypeLabel(form.type) }}</span> |
| | | <el-tag type="info"> |
| | | {{ getTypeLabel(form.type) }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="所在位置"> |
| | | <span>{{ form.location }}</span> |