forked from integrated_whb/integrated_whb_vue
init
parent
6184e2c723
commit
4f53bd7e81
|
@ -568,6 +568,16 @@ export default [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/continuous_improvement/risk_analysis",
|
||||||
|
meta: { title: "风险分析", isSubMenu: false },
|
||||||
|
component: "continuous_improvement/risk_analysis/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/continuous_improvement/enterprise_report",
|
||||||
|
meta: { title: "企业报告", isSubMenu: false },
|
||||||
|
component: "continuous_improvement/enterprise_report/index",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,6 +83,13 @@ export const layoutFnGetRiskLevel = async () => {
|
||||||
});
|
});
|
||||||
return ref(resData.list);
|
return ref(resData.list);
|
||||||
};
|
};
|
||||||
|
// 风险成因
|
||||||
|
export const layoutFnGetRiskCauses = async () => {
|
||||||
|
const resData = await getLevels({
|
||||||
|
DICTIONARIES_ID: "1bacbc4c1f6544718519c0d470dfeb62",
|
||||||
|
});
|
||||||
|
return ref(resData.list);
|
||||||
|
};
|
||||||
// 部门级别
|
// 部门级别
|
||||||
export const layoutFnGetDepartmentLevel = async () => {
|
export const layoutFnGetDepartmentLevel = async () => {
|
||||||
const resData = await getLevels({
|
const resData = await getLevels({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="240px">
|
<el-form ref="formRef" :rules="defineRules" :model="form" label-width="240px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" v-if="!infoIsEmpty">
|
<el-col :span="24" v-if="!infoIsEmpty">
|
||||||
<el-form-item label="管控部门" prop="DEPTNAME">
|
<el-form-item label="管控部门" prop="DEPTNAME">
|
||||||
|
@ -204,6 +204,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
|
<slot />
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
@ -241,10 +242,14 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
rules: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:form"]);
|
const emits = defineEmits(["update:form"]);
|
||||||
const form = useVModel(props, "form", emits);
|
const form = useVModel(props, "form", emits);
|
||||||
const rules = {
|
const defineRules = {
|
||||||
USER_ID: [{ required: true, message: "管控责任人不能为空", trigger: "blur" }],
|
USER_ID: [{ required: true, message: "管控责任人不能为空", trigger: "blur" }],
|
||||||
RISK_DESCR: [
|
RISK_DESCR: [
|
||||||
{ required: true, message: "存在风险不能为空", trigger: "blur" },
|
{ required: true, message: "存在风险不能为空", trigger: "blur" },
|
||||||
|
@ -285,6 +290,7 @@ const rules = {
|
||||||
IDENTIFICATION_ID: [
|
IDENTIFICATION_ID: [
|
||||||
{ required: true, message: "辨识部位不能为空", trigger: "change" },
|
{ required: true, message: "辨识部位不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
|
...props.rules,
|
||||||
};
|
};
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const infoIsEmpty = ref(isEmpty(props.info));
|
const infoIsEmpty = ref(isEmpty(props.info));
|
||||||
|
@ -317,6 +323,9 @@ watch(
|
||||||
([LIKELIHOOD, EXPOSURE, CONSEQUENCE]) => {
|
([LIKELIHOOD, EXPOSURE, CONSEQUENCE]) => {
|
||||||
if (!LIKELIHOOD || !EXPOSURE || !CONSEQUENCE) return;
|
if (!LIKELIHOOD || !EXPOSURE || !CONSEQUENCE) return;
|
||||||
fnGetLevelName(LIKELIHOOD, EXPOSURE, CONSEQUENCE);
|
fnGetLevelName(LIKELIHOOD, EXPOSURE, CONSEQUENCE);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const fnGetUnitList = async () => {
|
const fnGetUnitList = async () => {
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const setHazardAnalysisSubmit = (params) =>
|
||||||
|
post("/riskpointanalysis/add", params); // 隐患分析提交
|
||||||
|
export const getRiskAnalysisList = (params) =>
|
||||||
|
post("/riskpointanalysis/list", params); // 风险分析列表
|
||||||
|
export const setRiskAnalysisRepulse = (params) =>
|
||||||
|
post("/riskpointanalysis/delete", params); // 风险分析打回
|
||||||
|
export const setRiskAnalysisAdopt = (params) =>
|
||||||
|
post("/riskpointanalysis/apply", params); // 风险分析通过
|
||||||
|
// 企业报告 start
|
||||||
|
|
||||||
|
// 企业报告 end
|
|
@ -0,0 +1,7 @@
|
||||||
|
<template>
|
||||||
|
<layout-card>111</layout-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup></script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,76 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="分析" :before-close="fnClose">
|
||||||
|
<layout-risk-add v-model:form="form" :rules="rules" ref="riskAddRef">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="是否生成新风险因素" prop="IS_NEW">
|
||||||
|
<el-radio-group v-model="form.IS_NEW" disabled>
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</layout-risk-add>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import LayoutRiskAdd from "@/components/risk_add/index.vue";
|
||||||
|
import { ref, watch } from "vue";
|
||||||
|
import { setHazardAnalysisSubmit } from "@/request/continuous_improvement.js";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const rules = {
|
||||||
|
IS_NEW: [{ required: true, message: "请选择", trigger: "change" }],
|
||||||
|
};
|
||||||
|
const riskAddRef = ref(null);
|
||||||
|
const fnClose = () => {
|
||||||
|
riskAddRef.value.reset();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
await riskAddRef.value.formValidate();
|
||||||
|
await setHazardAnalysisSubmit({
|
||||||
|
STATUS: 0,
|
||||||
|
ACCIDENTS: form.value.ACCIDENTS.join(","),
|
||||||
|
ACCIDENTS_NAME: riskAddRef.value.accidentsName(),
|
||||||
|
...form.value,
|
||||||
|
});
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
fnClose();
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => props.form.IDENTIFICATION_ID,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
if (oldValue) {
|
||||||
|
form.value.IS_NEW = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -124,11 +124,18 @@
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" text link> 分析 </el-button>
|
<el-button type="primary" text link @click="fnAnalysis(row)">
|
||||||
|
分析
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
</layout-card>
|
</layout-card>
|
||||||
|
<analysis
|
||||||
|
v-model:visible="data.analysisDialog.visible"
|
||||||
|
v-model:form="data.analysisDialog.form"
|
||||||
|
@get-data="fnResetPaginationTransfer"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -139,6 +146,9 @@ import useListData from "@/assets/js/useListData.js";
|
||||||
import LayoutDepartment from "@/components/department/index.vue";
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
import { getHiddenDangerList } from "@/request/hidden_danger_government.js";
|
import { getHiddenDangerList } from "@/request/hidden_danger_government.js";
|
||||||
import { layoutFnGetHazardLevel } from "@/assets/js/data_dictionary.js";
|
import { layoutFnGetHazardLevel } from "@/assets/js/data_dictionary.js";
|
||||||
|
import { nextTick, reactive } from "vue";
|
||||||
|
import Analysis from "./components/analysis.vue";
|
||||||
|
import { getRiskControlLedgerView } from "@/request/risk_control.js";
|
||||||
|
|
||||||
const stateList = [
|
const stateList = [
|
||||||
{ NAME: "未整改", ID: "1" },
|
{ NAME: "未整改", ID: "1" },
|
||||||
|
@ -152,6 +162,27 @@ const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
useListData(getHiddenDangerList, {
|
useListData(getHiddenDangerList, {
|
||||||
otherParams: { STATE: 4, DISPOSESTATE: "-1", ANALYSIS: 1 },
|
otherParams: { STATE: 4, DISPOSESTATE: "-1", ANALYSIS: 1 },
|
||||||
});
|
});
|
||||||
|
const data = reactive({
|
||||||
|
analysisDialog: {
|
||||||
|
visible: false,
|
||||||
|
form: {
|
||||||
|
DEPARTMENT_ID: "",
|
||||||
|
USER_ID: "",
|
||||||
|
RISK_UNIT_ID: "",
|
||||||
|
IDENTIFICATION_ID: "",
|
||||||
|
RISK_DESCR: "",
|
||||||
|
LIKELIHOOD: "",
|
||||||
|
EXPOSURE: "",
|
||||||
|
CONSEQUENCE: "",
|
||||||
|
LEVEL_NAME: "",
|
||||||
|
DANGER: "",
|
||||||
|
MEASURES: "",
|
||||||
|
ACCIDENTS: [],
|
||||||
|
EME_MEASURES: "",
|
||||||
|
IS_NEW: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
const fnGetDataTransfer = () => {
|
const fnGetDataTransfer = () => {
|
||||||
fnGetData({
|
fnGetData({
|
||||||
STARTTIME: searchForm.value.dates?.[0],
|
STARTTIME: searchForm.value.dates?.[0],
|
||||||
|
@ -167,6 +198,24 @@ const fnResetPaginationTransfer = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const hazardLevelList = await layoutFnGetHazardLevel();
|
const hazardLevelList = await layoutFnGetHazardLevel();
|
||||||
|
const fnAnalysis = async ({
|
||||||
|
HIDDEN_ID,
|
||||||
|
RISKPOINT_ID,
|
||||||
|
HIDDENDESCR,
|
||||||
|
RECTIFYDESCR,
|
||||||
|
}) => {
|
||||||
|
data.analysisDialog.visible = true;
|
||||||
|
await nextTick();
|
||||||
|
if (RISKPOINT_ID) {
|
||||||
|
const resData = await getRiskControlLedgerView({ RISKPOINT_ID });
|
||||||
|
resData.pd.IS_NEW = 0;
|
||||||
|
data.analysisDialog.form = resData.pd;
|
||||||
|
data.analysisDialog.form.ACCIDENTS = resData.pd.ACCIDENTS.split(",");
|
||||||
|
data.analysisDialog.form.RISK_DESCR += HIDDENDESCR;
|
||||||
|
data.analysisDialog.form.MEASURES += RECTIFYDESCR;
|
||||||
|
}
|
||||||
|
data.analysisDialog.form.HIDDEN_ID = HIDDEN_ID;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
@ -0,0 +1,146 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" title="分析" :on-close="fnClose">
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="风险单元">
|
||||||
|
{{ info.RISKUNITNAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="辨识部位">
|
||||||
|
{{ info.PARTSNAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="存在风险" :span="2">
|
||||||
|
{{ info.RISK_DESCR }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故发生的可能性">
|
||||||
|
<span v-if="info.LIKELIHOOD === 10">完全可以预料</span>
|
||||||
|
<span v-else-if="info.LIKELIHOOD === 6">相当可能</span>
|
||||||
|
<span v-else-if="info.LIKELIHOOD === 3">可能,但不经常</span>
|
||||||
|
<span v-else-if="info.LIKELIHOOD === 1">可能性小,完全意外</span>
|
||||||
|
<span v-else-if="info.LIKELIHOOD === 0.5">很不可能,可以设想</span>
|
||||||
|
<span v-else-if="info.LIKELIHOOD === 0.2">极不可能</span>
|
||||||
|
<span v-else-if="info.LIKELIHOOD === 0.1">实际不可能</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="分值">
|
||||||
|
{{ info.LIKELIHOOD }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="人员暴露于危险环境中的频繁程度">
|
||||||
|
<span v-if="info.EXPOSURE === 10">连续暴露</span>
|
||||||
|
<span v-else-if="info.EXPOSURE === 6">每天工作时间内暴露</span>
|
||||||
|
<span v-else-if="info.EXPOSURE === 3">每周一次或偶然暴露</span>
|
||||||
|
<span v-else-if="info.EXPOSURE === 2">每月一次暴露,完全意外</span>
|
||||||
|
<span v-else-if="info.EXPOSURE === 1">每年几次暴露</span>
|
||||||
|
<span v-else-if="info.EXPOSURE === 0.5">非常罕见暴露</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="分值">
|
||||||
|
{{ info.EXPOSURE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="一旦发生事故可能造成的后果">
|
||||||
|
<span v-if="info.CONSEQUENCE === 100">10人以上死亡</span>
|
||||||
|
<span v-else-if="info.CONSEQUENCE === 40">3~9人死亡</span>
|
||||||
|
<span v-else-if="info.CONSEQUENCE === 15">1~2人死亡</span>
|
||||||
|
<span v-else-if="info.CONSEQUENCE === 7">严重</span>
|
||||||
|
<span v-else-if="info.CONSEQUENCE === 3">重大,伤残</span>
|
||||||
|
<span v-else-if="info.CONSEQUENCE === 1">引人注意</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="分值">
|
||||||
|
{{ info.CONSEQUENCE }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="风险分级">
|
||||||
|
{{ info.DNAME5 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="总分值">
|
||||||
|
{{ info.DANGER }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="管控措施" :span="2">
|
||||||
|
{{ info.MEASURES }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="管控部门">
|
||||||
|
{{ info.DEPT_NAME_ALL }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="管控责任人">
|
||||||
|
{{ info.USER_ID }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="事故类型" :span="2">
|
||||||
|
{{ info.ACCIDENTS_NAME }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="应急处置措施" :span="2">
|
||||||
|
{{ info.EME_MEASURES }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="是否生成新风险因素" :span="2">
|
||||||
|
{{ info.IS_NEW === 1 ? "是" : "否" }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="风险成因" :span="2">
|
||||||
|
<el-select v-model="riskCauses" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in riskCausesList"
|
||||||
|
:key="item.DICTIONARIES_ID"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.DICTIONARIES_ID"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" @click="fnSubmit(1)">通过</el-button>
|
||||||
|
<el-button type="danger" @click="fnSubmit(0)">打回</el-button>
|
||||||
|
<el-button @click="fnClose">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useVModel } from "@vueuse/core";
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { layoutFnGetRiskCauses } from "@/assets/js/data_dictionary.js";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import {
|
||||||
|
setRiskAnalysisAdopt,
|
||||||
|
setRiskAnalysisRepulse,
|
||||||
|
} from "@/request/continuous_improvement.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "get-data"]);
|
||||||
|
const visible = useVModel(props, "visible", emits);
|
||||||
|
const riskCauses = ref("");
|
||||||
|
const riskCausesList = await layoutFnGetRiskCauses();
|
||||||
|
const fnClose = () => {
|
||||||
|
visible.value = false;
|
||||||
|
riskCauses.value = "";
|
||||||
|
};
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async (STATUS) => {
|
||||||
|
if (STATUS === 0) {
|
||||||
|
await setRiskAnalysisRepulse({
|
||||||
|
RISKPOINT_ANALYSIS_ID: props.info.RISKPOINT_ANALYSIS_ID,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (!riskCauses.value) {
|
||||||
|
ElMessage.warning("风险成因未选择");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await setRiskAnalysisAdopt({
|
||||||
|
RISKPOINT_ANALYSIS_ID: props.info.RISKPOINT_ANALYSIS_ID,
|
||||||
|
RISK_CAUSES: riskCauses.value,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
fnClose();
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,189 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="100px"
|
||||||
|
@submit.prevent="fnResetPaginationTransfer"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS">
|
||||||
|
<el-input v-model="searchForm.KEYWORDS" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="风险分级" prop="LEVELID">
|
||||||
|
<el-select v-model="searchForm.LEVELID">
|
||||||
|
<el-option
|
||||||
|
v-for="item in riskClassificationList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="部门" prop="DEPTIDS">
|
||||||
|
<layout-department
|
||||||
|
v-model="searchForm.DEPTIDS"
|
||||||
|
multiple
|
||||||
|
show-checkbox
|
||||||
|
collapse-tags
|
||||||
|
root-disabled="Y"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="事故类型">
|
||||||
|
<el-select v-model="searchForm.BIANMA" multiple>
|
||||||
|
<el-option
|
||||||
|
v-for="item in accidentTypeList"
|
||||||
|
:key="item.BIANMA"
|
||||||
|
:label="item.NAME"
|
||||||
|
:value="item.BIANMA"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="管控责任人" prop="gkzrName">
|
||||||
|
<el-input v-model="searchForm.gkzrName" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="是否审核" prop="STATUS">
|
||||||
|
<el-select v-model="searchForm.STATUS">
|
||||||
|
<el-option label="未审核" value="0" />
|
||||||
|
<el-option label="已审核" value="1" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
:data="list"
|
||||||
|
@get-data="fnGetDataTransfer"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="DEPT_NAME_ALL" label="管控部门" width="250" />
|
||||||
|
<el-table-column
|
||||||
|
prop="RISKUNITNAME"
|
||||||
|
label="风险点(单元)"
|
||||||
|
width="250"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="PARTSNAME" label="辨识部位" width="250" />
|
||||||
|
<el-table-column prop="LEVELID" label="风险分级" width="120">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<span v-if="row.LEVELID === 'levelD'" class="text-blue">
|
||||||
|
低风险/D级
|
||||||
|
</span>
|
||||||
|
<span v-else-if="row.LEVELID === 'levelC'" class="text-yellow">
|
||||||
|
一般风险/C级
|
||||||
|
</span>
|
||||||
|
<span v-else-if="row.LEVELID === 'levelB'" class="text-orange">
|
||||||
|
较大风险/B级
|
||||||
|
</span>
|
||||||
|
<span v-else-if="row.LEVELID === 'levelA'" class="text-red">
|
||||||
|
重大风险/A级
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="ACCIDENTS_NAME" label="事故类型" />
|
||||||
|
<el-table-column prop="USER_ID" label="管控责任人" width="100" />
|
||||||
|
<el-table-column prop="STATUS" label="状态" width="90">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
{{ row.STATUS === 1 ? "已审核" : "未审核" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="row.STATUS === 0"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAnalysis(row)"
|
||||||
|
>
|
||||||
|
分析
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<analysis
|
||||||
|
v-model:visible="data.analysisDialog.visible"
|
||||||
|
:info="data.analysisDialog.info"
|
||||||
|
@get-data="fnResetPaginationTransfer"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import LayoutDepartment from "@/components/department/index.vue";
|
||||||
|
import {
|
||||||
|
layoutFnGetAccidentType,
|
||||||
|
layoutFnGetRiskClassification,
|
||||||
|
} from "@/assets/js/data_dictionary.js";
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import { getRiskAnalysisList } from "@/request/continuous_improvement.js";
|
||||||
|
import { useUserStore } from "@/pinia/user.js";
|
||||||
|
import { ElMessageBox } from "element-plus";
|
||||||
|
import { cloneDeep } from "lodash-es";
|
||||||
|
import Analysis from "./components/analysis.vue";
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
|
useListData(getRiskAnalysisList);
|
||||||
|
const data = reactive({
|
||||||
|
analysisDialog: {
|
||||||
|
visible: false,
|
||||||
|
info: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const fnGetDataTransfer = () => {
|
||||||
|
fnGetData({
|
||||||
|
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||||
|
BIANMA: searchForm.value.BIANMA?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const fnResetPaginationTransfer = () => {
|
||||||
|
fnResetPagination({
|
||||||
|
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||||
|
BIANMA: searchForm.value.BIANMA?.join(","),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const riskClassificationList = await layoutFnGetRiskClassification();
|
||||||
|
const accidentTypeList = await layoutFnGetAccidentType();
|
||||||
|
const fnAnalysis = (row) => {
|
||||||
|
if (
|
||||||
|
userStore.getUserInfo.ISMAIN === "1" ||
|
||||||
|
userStore.getUserInfo.IS_SAFETY === 1
|
||||||
|
) {
|
||||||
|
data.analysisDialog.visible = true;
|
||||||
|
data.analysisDialog.info = cloneDeep(row);
|
||||||
|
} else {
|
||||||
|
ElMessageBox.alert("您无权进行此项操作");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -343,7 +343,7 @@ const fnGetData = async () => {
|
||||||
data.form = resData.pd;
|
data.form = resData.pd;
|
||||||
data.form.dates = [resData.pd.START_DATE, resData.pd.END_DATE];
|
data.form.dates = [resData.pd.START_DATE, resData.pd.END_DATE];
|
||||||
data.list = resData.varList;
|
data.list = resData.varList;
|
||||||
data.listAll = resData.varList;
|
data.listAll = [...resData.varList];
|
||||||
};
|
};
|
||||||
fnGetData();
|
fnGetData();
|
||||||
const fnGetInspectionItems = async () => {
|
const fnGetInspectionItems = async () => {
|
||||||
|
@ -389,7 +389,7 @@ const fnGetDataFilter = () => {
|
||||||
item.USERNAME?.indexOf(keyword) > -1
|
item.USERNAME?.indexOf(keyword) > -1
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
data.list = data.listAll;
|
data.list = [...data.listAll];
|
||||||
}
|
}
|
||||||
fnTableSelection();
|
fnTableSelection();
|
||||||
};
|
};
|
||||||
|
|
|
@ -476,7 +476,7 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const fnChoice = (item) => {
|
const fnChoice = (item) => {
|
||||||
data.RECTIFYDESCR = item.RECTIFYDESCR;
|
data.form.RECTIFYDESCR = item.RECTIFYDESCR;
|
||||||
};
|
};
|
||||||
const fnSubmit = debounce(
|
const fnSubmit = debounce(
|
||||||
1000,
|
1000,
|
||||||
|
|
Loading…
Reference in New Issue