动火作业流程图

pull/1/head
fangjiakai 2024-02-20 09:50:15 +08:00
parent 273c90be57
commit 976d62cfaf
4 changed files with 23 additions and 4 deletions

View File

@ -4,7 +4,7 @@
<template v-for="(item, index) in flowList" :key="index"> <template v-for="(item, index) in flowList" :key="index">
<el-step :title="item.STEP_NAME" :status="fnGetStatus(item)"> <el-step :title="item.STEP_NAME" :status="fnGetStatus(item)">
<template #description> <template #description>
<div>{{ item.ACT_USER_NAME || item.SIGN_USER }}</div> <div>{{ fnGetShowStepUser(item) }}</div>
<div>{{ item.ACT_TIME }}</div> <div>{{ item.ACT_TIME }}</div>
</template> </template>
</el-step> </el-step>
@ -30,6 +30,11 @@ const props = defineProps({
required: true, required: true,
default: () => {}, default: () => {},
}, },
flowing: {
type: Object,
required: true,
default: () => {},
},
}); });
const emits = defineEmits(["update:visible"]); const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits); const visible = useVModel(props, "visible", emits);
@ -43,6 +48,17 @@ const fnGetStatus = (step) => {
return "process"; return "process";
} }
}; };
const fnGetShowStepUser = (step) => {
console.log(props);
if (step.ACT_USER_NAME) {
return step.ACT_USER_NAME;
} else if (step.SIGN_USER) {
return step.SIGN_USER;
} else if (step.CAN_SKIP && !props.flowing[step.ACTOR_FIELD]) {
return "已跳过";
}
};
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@ -140,6 +140,7 @@
<flow-chart <flow-chart
v-model:visible="data.flowChartDialog.visible" v-model:visible="data.flowChartDialog.visible"
:flow-list="data.flowChartDialog.flowList" :flow-list="data.flowChartDialog.flowList"
:flowing="data.flowChartDialog.flowing"
/> />
<layout-video <layout-video
:src="data.videoDialog.src" :src="data.videoDialog.src"
@ -195,6 +196,7 @@ const data = reactive({
flowChartDialog: { flowChartDialog: {
visible: false, visible: false,
flowList: {}, flowList: {},
flowing: {},
}, },
videoDialog: { videoDialog: {
visible: false, visible: false,
@ -202,9 +204,10 @@ const data = reactive({
}, },
}); });
const fnFlowChart = async (HOTWORK_ID) => { const fnFlowChart = async (HOTWORK_ID) => {
const { flowList } = await getHotWorkFlow({ HOTWORK_ID }); const { flowList, flowingWork } = await getHotWorkFlow({ HOTWORK_ID });
data.flowChartDialog.visible = true; data.flowChartDialog.visible = true;
data.flowChartDialog.flowList = flowList; data.flowChartDialog.flowList = flowList;
data.flowChartDialog.flowing = flowingWork;
}; };
</script> </script>

View File

@ -23,7 +23,7 @@
filterable filterable
v-model="searchForm.UNITS_ID" v-model="searchForm.UNITS_ID"
clearable clearable
placeholder="请选择状态" placeholder="请选择相关方"
> >
<el-option <el-option
v-for="item in data.unitsList" v-for="item in data.unitsList"

View File

@ -13,7 +13,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="事故级别" prop="CHECKTIME"> <el-form-item label="检查时间" prop="CHECKTIME">
<el-date-picker <el-date-picker
v-model="searchForm.CHECKTIME" v-model="searchForm.CHECKTIME"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"