受限空间,高处作业

pull/1/head
chenxinying 2024-02-02 14:08:57 +08:00
parent 5ea9fb929d
commit f6d550ab3e
4 changed files with 98 additions and 80 deletions

View File

@ -5,3 +5,17 @@ export const getTaskSetps = (params) =>
export const getHotWorkList = (params) => post("/hotwork/list", params); // 动火作业管理列表 export const getHotWorkList = (params) => post("/hotwork/list", params); // 动火作业管理列表
export const getHotWorkView = (params) => post("/hotwork/findById", params); // 动火作业管理查看 export const getHotWorkView = (params) => post("/hotwork/findById", params); // 动火作业管理查看
export const getHotWorkFlow = (params) => post("/hotwork/getFlowList", params); // 动火作业流程图 export const getHotWorkFlow = (params) => post("/hotwork/getFlowList", params); // 动火作业流程图
export const getConfinedSpaceList = (params) =>
post("/confinedspace/list", params); // 受限作业管理列表
export const getConfinedSpaceView = (params) =>
post("/confinedspace/findById", params); // 受限作业管理查看
export const getConfinedSpaceFlow = (params) =>
post("/confinedspace/getFlowList", params); // 受限作业流程图
export const getHighWorkList = (params) => post("/highwork/list", params); // 高处作业管理列表
export const getHighWorkView = (params) => post("/highwork/findById", params); // 高处作业管理查看
export const getHighWorkFlow = (params) =>
post("/highwork/getFlowList", params); // 高处作业流程图

View File

@ -16,13 +16,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" v-if="entrance === 'job_data'"> <el-col :span="6" v-if="entrance === 'job_data'">
<el-form-item label="状态" prop="APPLY_STATUS"> <el-form-item label="状态" prop="STEP_ID">
<el-select v-model="searchForm.APPLY_STATUS"> <el-select v-model="searchForm.STEP_ID">
<el-option <el-option
v-for="item in stateList" v-for="item in stepList"
:key="item.ID" :key="item.STEP_ID"
:label="item.NAME" :label="item.STEP_NAME"
:value="item.ID" :value="item.STEP_ID"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -53,15 +53,14 @@
<el-table-column prop="APPLY_USER_NAME" label="申请人" /> <el-table-column prop="APPLY_USER_NAME" label="申请人" />
<el-table-column prop="ANALYZE_USER_NAME" label="分析人" /> <el-table-column prop="ANALYZE_USER_NAME" label="分析人" />
<el-table-column prop="CONFIRM_USER_NAME" label="作业负责人" /> <el-table-column prop="CONFIRM_USER_NAME" label="作业负责人" />
<el-table-column prop="APPROVE_USER_NAME" label="所在单位负责人" /> <el-table-column prop="LEADER_USER_NAME" label="所在单位负责人" />
<el-table-column prop="ACCEPT_USER_NAME" label="验收部门负责人" /> <el-table-column prop="ACCEPT_USER_NAME" label="验收部门负责人" />
<el-table-column label="审核状态"> <el-table-column label="审核状态">
<template v-slot="{ row }"> <template v-slot="{ row }">
{{ <span v-if="row.STEP_ID === 0"></span>
entrance === "job_data" <span v-else-if="row.STATUS === -2">气体检测打回</span>
? translationStatus(row.APPLY_STATUS, stateList) <span v-else-if="row.STEP_ID !== -1">{{ row.NEXT_STEP_NAME }}</span>
: "已归档" <span v-else>{{ row.STEP_NAME }}</span>
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="250"> <el-table-column label="操作" width="250">
@ -69,9 +68,8 @@
<el-button <el-button
v-if=" v-if="
entrance === 'job_data' && entrance === 'job_data' &&
row.APPLY_STATUS !== '6' && row.STATUS > -1 &&
row.APPLY_STATUS !== '-99' && row.NEXT_STEP_ID !== 99
row.APPLY_STATUS !== '-98'
" "
type="primary" type="primary"
text text
@ -92,7 +90,7 @@
type="primary" type="primary"
text text
link link
@click="fnFlowChart(row)" @click="fnFlowChart(row.CONFINEDSPACE_ID)"
v-if="entrance === 'job_data'" v-if="entrance === 'job_data'"
> >
流程图 流程图
@ -119,18 +117,22 @@
</layout-card> </layout-card>
<flow-chart <flow-chart
v-model:visible="data.flowChartDialog.visible" v-model:visible="data.flowChartDialog.visible"
:info="data.flowChartDialog.info" :flowList="data.flowChartDialog.flowList"
/> />
</div> </div>
</template> </template>
<script setup> <script setup>
import { serialNumber, translationStatus } from "@/assets/js/utils.js"; import { serialNumber } from "@/assets/js/utils.js";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import useListData from "@/assets/js/useListData.js"; import useListData from "@/assets/js/useListData.js";
import { getConfinedSpaceList } from "@/request/confined_space.js"; import { reactive, ref } from "vue";
import { reactive } from "vue";
import FlowChart from "./components/flow_chart.vue"; import FlowChart from "./components/flow_chart.vue";
import {
getConfinedSpaceFlow,
getTaskSetps,
getConfinedSpaceList,
} from "@/request/eight_work.js";
const props = defineProps({ const props = defineProps({
entrance: { entrance: {
@ -138,32 +140,34 @@ const props = defineProps({
default: "job_data", default: "job_data",
}, },
}); });
const stateList = [
{ ID: "0", NAME: "受限空间作业待提交" }, const stepList = ref([]);
{ ID: "1", NAME: "作业负责人待审核" },
{ ID: "4", NAME: "所在单位待审核" }, const getStepList = async () => {
{ ID: "5", NAME: "待验收" }, const { list } = await getTaskSetps({ TASK_ID: 1 });
{ ID: "6", NAME: "验收归档" }, stepList.value = [
{ ID: "-4", NAME: "作业负责人审核打回" }, { STEP_NAME: "请选择", STEP_ID: "" },
{ ID: "-5", NAME: "所在单位审核打回" }, ...list,
{ ID: "-6", NAME: "验收打回" }, { STEP_NAME: "验收归档", STEP_ID: "99" },
{ ID: "-99", NAME: "已作废(监护人未签字)" },
{ ID: "-98", NAME: "已作废(未进行气体检测)" },
]; ];
};
getStepList();
const router = useRouter(); const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } = const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getConfinedSpaceList, { useListData(getConfinedSpaceList, {
otherParams: props.entrance === "archive" ? { APPLY_STATUS: "6" } : {}, otherParams: props.entrance === "archive" ? { STEP_ID: "99" } : {},
}); });
const data = reactive({ const data = reactive({
flowChartDialog: { flowChartDialog: {
visible: false, visible: false,
info: {}, flowList: {},
}, },
}); });
const fnFlowChart = (info) => { const fnFlowChart = async (CONFINEDSPACE_ID) => {
const { flowList } = await getConfinedSpaceFlow({ CONFINEDSPACE_ID });
data.flowChartDialog.visible = true; data.flowChartDialog.visible = true;
data.flowChartDialog.info = info; data.flowChartDialog.flowList = flowList;
}; };
</script> </script>

View File

@ -16,13 +16,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" v-if="entrance === 'job_data'"> <el-col :span="6" v-if="entrance === 'job_data'">
<el-form-item label="状态" prop="APPLY_STATUS"> <el-form-item label="状态" prop="STEP_ID">
<el-select v-model="searchForm.APPLY_STATUS"> <el-select v-model="searchForm.STEP_ID">
<el-option <el-option
v-for="item in stateList" v-for="item in stepList"
:key="item.ID" :key="item.STEP_ID"
:label="item.NAME" :label="item.STEP_NAME"
:value="item.ID" :value="item.STEP_ID"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -50,12 +50,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="CHECK_NO" label="编号" show-overflow-tooltip /> <el-table-column prop="CHECK_NO" label="编号" show-overflow-tooltip />
<el-table-column prop="APPLY_USER" label="填写人" /> <el-table-column prop="APPLY_USER_NAME" label="申请人" />
<el-table-column <el-table-column prop="CONFIRM_USER_NAME" label="作业负责人" />
prop="CONSTRUCTION_USER_NAME"
label="作业负责人"
show-overflow-tooltip
/>
<el-table-column label="所在单位负责人" show-overflow-tooltip> <el-table-column label="所在单位负责人" show-overflow-tooltip>
<template v-slot="{ row }"> <template v-slot="{ row }">
{{ row.LEADER_USER_NAME || " 已跳过" }} {{ row.LEADER_USER_NAME || " 已跳过" }}
@ -76,19 +72,21 @@
label="验收部门负责人" label="验收部门负责人"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column label="审核状态"> <el-table-column label="审核状态" width="170">
<template v-slot="{ row }"> <template v-slot="{ row }">
{{ <span v-if="row.STEP_ID === 0"></span>
entrance === "job_data" <span v-else-if="row.STEP_ID !== -1">{{ row.NEXT_STEP_NAME }}</span>
? translationStatus(row.APPLY_STATUS, stateList) <span v-else>{{ row.STEP_NAME }}</span>
: "已归档"
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="250"> <el-table-column label="操作" width="250">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-button <el-button
v-if="entrance === 'job_data' && row.APPLY_STATUS !== '6'" v-if="
entrance === 'job_data' &&
row.STATUS > -1 &&
row.NEXT_STEP_ID !== 99
"
type="primary" type="primary"
text text
link link
@ -108,7 +106,7 @@
type="primary" type="primary"
text text
link link
@click="fnFlowChart(row)" @click="fnFlowChart(row.HIGHWORK_ID)"
v-if="entrance === 'job_data'" v-if="entrance === 'job_data'"
> >
流程图 流程图
@ -135,18 +133,22 @@
</layout-card> </layout-card>
<flow-chart <flow-chart
v-model:visible="data.flowChartDialog.visible" v-model:visible="data.flowChartDialog.visible"
:info="data.flowChartDialog.info" :flowList="data.flowChartDialog.flowList"
/> />
</div> </div>
</template> </template>
<script setup> <script setup>
import { serialNumber, translationStatus } from "@/assets/js/utils.js"; import { serialNumber } from "@/assets/js/utils.js";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import useListData from "@/assets/js/useListData.js"; import useListData from "@/assets/js/useListData.js";
import { reactive } from "vue"; import { reactive, ref } from "vue";
import FlowChart from "./components/flow_chart.vue"; import FlowChart from "./components/flow_chart.vue";
import { getHighList } from "@/request/high.js"; import {
getHighWorkFlow,
getHighWorkList,
getTaskSetps,
} from "@/request/eight_work.js";
const props = defineProps({ const props = defineProps({
entrance: { entrance: {
@ -154,34 +156,32 @@ const props = defineProps({
default: "job_data", default: "job_data",
}, },
}); });
const stateList = [ const stepList = ref([]);
{ ID: "0", NAME: "高处作业待提交" },
{ ID: "1", NAME: "作业负责人待审核" }, const getStepList = async () => {
{ ID: "2", NAME: "所在单位待审核" }, const { list } = await getTaskSetps({ TASK_ID: 1 });
{ ID: "3", NAME: "审核部门待审核" }, stepList.value = [
{ ID: "4", NAME: "审批部门待审核" }, { STEP_NAME: "请选择", STEP_ID: "" },
{ ID: "5", NAME: "待验收" }, ...list,
{ ID: "6", NAME: "验收归档" }, { STEP_NAME: "验收归档", STEP_ID: "99" },
{ ID: "-2", NAME: "作业负责人审核打回" },
{ ID: "-3", NAME: "所在单位审核打回" },
{ ID: "-4", NAME: "审核部门审核打回" },
{ ID: "-5", NAME: "审批部门审核打回" },
{ ID: "-6", NAME: "验收打回" },
]; ];
};
getStepList();
const router = useRouter(); const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } = const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getHighList, { useListData(getHighWorkList, {
otherParams: props.entrance === "archive" ? { APPLY_STATUS: "6" } : {}, otherParams: props.entrance === "archive" ? { STEP_ID: "99" } : {},
}); });
const data = reactive({ const data = reactive({
flowChartDialog: { flowChartDialog: {
visible: false, visible: false,
info: {}, flowList: {},
}, },
}); });
const fnFlowChart = (info) => { const fnFlowChart = async (HIGHWORK_ID) => {
const { flowList } = await getHighWorkFlow({ HIGHWORK_ID });
data.flowChartDialog.visible = true; data.flowChartDialog.visible = true;
data.flowChartDialog.info = info; data.flowChartDialog.flowList = flowList;
}; };
</script> </script>

View File

@ -169,7 +169,7 @@ getStepList();
const router = useRouter(); const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } = const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getHotWorkList, { useListData(getHotWorkList, {
otherParams: props.entrance === "archive" ? { APPLY_STATUS: "8" } : {}, otherParams: props.entrance === "archive" ? { STEP_ID: "99" } : {},
}); });
const data = reactive({ const data = reactive({
flowChartDialog: { flowChartDialog: {