pull/1/head
z 2024-01-13 13:46:40 +08:00
parent 6216d08511
commit a46297da57
10 changed files with 483 additions and 280 deletions

View File

@ -410,8 +410,21 @@ export default [
},
],
},
{
path: "/hazard_investigation/inspection_record/batch_printing",
meta: {
title: "批量打印",
activeMenu: "/hazard_investigation/inspection_record",
},
component: "hazard_investigation/inspection_record/batch_printing",
},
],
},
{
path: "/hazard_investigation/troubleshooting_plan",
meta: { title: "排查计划", isSubMenu: false },
component: "hazard_investigation/troubleshooting_plan/index",
},
],
},
{

View File

@ -38,15 +38,11 @@ export const getInventoryTroubleshootingOtherHiddenList = (params) =>
post("/hidden/getOtherHidden", params); // 清单排查其它隐患列表
export const getHiddenDangerDatabaseList = (params) =>
post("/hiddenLibrary/list", params); // 隐患数据库列表
export const setInventoryTroubleshootingOtherHiddenDangerAdd = (params) =>
post("/hidden/add", params); // 清单排查其它隐患添加
export const getInventoryTroubleshootingOtherHiddenDangerView = (params) =>
post("/hidden/goEdit", params); // 清单排查其它隐患查看
export const setInventoryTroubleshootingOtherHiddenDangerDelete = (params) =>
post("/hidden/delete", params); // 清单排查其它隐患删除
export const setInventoryTroubleshootingOtherHiddenDangerEdit = (params) =>
post("/hidden/edit", params); // 清单排查其它隐患修改
export const setInventoryTroubleshootingOtherHiddenDangerListAdd = (params) =>
export const setHiddenDangerAdd = (params) => post("/hidden/add", params); // 清单排查其它隐患添加
export const getHiddenDangerView = (params) => post("/hidden/goEdit", params); // 清单排查其它隐患查看
export const setHiddenDangerDelete = (params) => post("/hidden/delete", params); // 清单排查其它隐患删除
export const setHiddenDangerEdit = (params) => post("/hidden/edit", params); // 清单排查其它隐患修改
export const setHiddenDangerListAdd = (params) =>
post("/hidden/listAdd", params); // 清单排查其它隐患添加
export const setInventoryTroubleshootingSubmit = (params) =>
post("/checkrecord/add", params); // 清单排查提交
@ -66,6 +62,7 @@ export const getChecklistInspectionStatusRecordViewOtherHiddenDangerList = (
) => post("/hidden/getCheckHidden", params); // 清单检查情况检查记录查看其它隐患列表
export const getChecklistInspectionStatusRecordMap = (params) =>
post("/checkrecord/goMap", params); // 清单检查情况检查记录查看地图
export const getHiddenDangerView = (params) => post("/hidden/goEdit", params); // 清单排查隐患查看
export const getInspectionRecordList = (params) =>
post("/checkrecord/allList", params); // 检查记录管理列表
export const getTroubleshootingPlanList = (params) =>
post("/listmanager/checkPlan", params); // 排查计划列表

View File

@ -0,0 +1,276 @@
<template>
<div>
<el-divider content-position="left">清单信息</el-divider>
<el-descriptions border :column="2">
<el-descriptions-item label="清单名称">
{{ info.LIST_NAME }}
</el-descriptions-item>
<el-descriptions-item label="排查清单类型">
{{ info.SCREENTYPENAME }}
</el-descriptions-item>
<el-descriptions-item
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人' : '检查人'"
>
{{ info.USERS }}
</el-descriptions-item>
<el-descriptions-item label="检查时间">
{{ info.CHECK_TIME }}
</el-descriptions-item>
<el-descriptions-item
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人部门' : '所属部门'"
>
{{ info.DEPARTMENT_NAME }}
</el-descriptions-item>
<el-descriptions-item
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人岗位' : '所属岗位'"
>
{{ info.POST_NAME }}
</el-descriptions-item>
<el-descriptions-item label="排查周期">
{{ info.PERIODNAME }}
</el-descriptions-item>
<el-descriptions-item label="清单类型">
{{ info.TYPENAME }}
</el-descriptions-item>
<el-descriptions-item
label="排查日期"
v-if="info.LISTTYPE === 'listType0006'"
>
{{ info.START_DATE }} - {{ info.END_DATE }}
</el-descriptions-item>
<el-descriptions-item label="补录原因" :span="2" v-if="info.REASON">
{{ info.REASON }}
</el-descriptions-item>
<el-descriptions-item
label="地图"
:span="2"
class-name="print_no_use"
label-class-name="print_no_use"
v-if="entrance"
>
<el-button @click="data.mapDialogVisible = true">
<icon-international
theme="outline"
size="18"
fill="#0694f4"
:strokeWidth="3"
/>
</el-button>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="2">
<img
v-if="qianming"
:src="qianming"
style="width: 200px; height: 97px"
/>
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">检查内容</el-divider>
<div class="print_no_use">
<layout-table :data="inspectionList" :show-pagination="false">
<el-table-column label="序号" width="70" type="index" />
<el-table-column prop="RISKUNITNAME" label="风险点(单元)" />
<el-table-column prop="PARTSNAME" label="辨识部位" />
<el-table-column prop="RISK_DESCR" label="存在风险" />
<el-table-column prop="DNAME5" label="风险分级" />
<el-table-column prop="CHECK_CONTENT" label="检查内容" />
<el-table-column label="状态" width="100">
<template v-slot="{ row }">
<template v-if="row.ISNORMAL === 0">
<el-button
v-if="row.IMGCOUNT > 0"
type="primary"
text
link
@click="entrance && fnQualified(row.RECORDITEM_ID)"
>
合格
</el-button>
<div v-else></div>
</template>
<el-button
v-else-if="row.ISNORMAL === 1"
type="primary"
text
link
@click="
entrance &&
router.push({
path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
})
"
>
不合格
</el-button>
<div v-else-if="row.ISNORMAL === 2">不涉及</div>
<div v-else></div>
</template>
</el-table-column>
</layout-table>
</div>
<table class="print_use">
<tr>
<th width="55">序号</th>
<th width="125">风险点单元</th>
<th width="100">辨识部位</th>
<th>存在风险</th>
<th width="120">风险分级</th>
<th>检查内容</th>
<th width="100">状态</th>
</tr>
<tr v-for="(item, index) in inspectionList" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.RISKUNITNAME }}</td>
<td>{{ item.PARTSNAME }}</td>
<td>{{ item.RISK_DESCR }}</td>
<td>{{ item.LEVEL_NAME }}</td>
<td>{{ item.CHECK_CONTENT }}</td>
<template v-if="item.ISNORMAL === 0">
<template v-if="item.IMGCOUNT > 0">
<td>
<el-button type="primary" text link> 合格 </el-button>
</td>
</template>
<template v-else>
<td>合格</td>
</template>
</template>
<template v-else-if="item.ISNORMAL === 1">
<td>
<el-button type="primary" text link> 不合格 </el-button>
</td>
</template>
<template v-else-if="item.ISNORMAL === 2">
<td>不涉及</td>
</template>
<template v-else>
<td>存在未整改隐患</td>
</template>
</tr>
</table>
<el-divider content-position="left">其他隐患</el-divider>
<div class="print_no_use">
<layout-table :data="otherHiddenList" :show-pagination="false">
<el-table-column label="序号" width="70" type="index" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" />
<el-table-column label="操作" width="100" v-if="entrance">
<template v-slot="{ row }">
<el-button
type="primary"
text
link
@click="
router.push({
path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
})
"
>
查看
</el-button>
</template>
</el-table-column>
</layout-table>
</div>
<table class="print_use">
<tr>
<th width="55">序号</th>
<th>隐患描述</th>
</tr>
<tr v-for="(item, index) in otherHiddenList" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.HIDDENDESCR }}</td>
</tr>
</table>
<qualified
v-model:visible="data.qualifiedDialog.visible"
:file="data.qualifiedDialog.file"
/>
<map-dialog
v-model:visible="data.mapDialogVisible"
:id="checkRecordId"
:list="inspectionList"
/>
<div v-html="PRINT_STYLE" />
</div>
</template>
<script setup>
import { useRouter } from "vue-router";
import { reactive, ref } from "vue";
import {
getChecklistInspectionStatusRecordView,
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
} from "@/request/hazard_investigation.js";
import { getViewImg } from "@/request/api.js";
import { PRINT_STYLE } from "@/assets/js/constant.js";
import useListData from "@/assets/js/useListData.js";
import { addingPrefixToFile } from "@/assets/js/utils.js";
import Qualified from "./qualified.vue";
import MapDialog from "./map.vue";
// entrance:
// checklist_inspection_status
// inspection_record
//
const props = defineProps({
entrance: {
type: String,
default: "",
},
checkRecordId: {
type: String,
required: true,
default: "",
},
});
const hiddenPath = {
checklist_inspection_status:
"/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger",
inspection_record:
"/hazard_investigation/inspection_record/view/hidden_danger",
};
const router = useRouter();
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const info = ref({});
const qianming = ref("");
const data = reactive({
qualifiedDialog: {
visible: false,
file: [],
},
mapDialogVisible: false,
});
const { list: inspectionList } = useListData(
getChecklistInspectionStatusRecordView,
{
otherParams: { CHECKRECORD_ID: props.checkRecordId },
usePagination: false,
callbackFn: (list, resData) => {
info.value = resData.pd;
if (resData.qianming && resData.qianming.length > 0) {
qianming.value = VITE_FILE_URL + resData.qianming[0].FILEPATH;
}
},
}
);
const { list: otherHiddenList } = useListData(
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
{
otherParams: { CHECKRECORD_ID: props.checkRecordId },
usePagination: false,
key: "hiddenList",
}
);
const fnQualified = async (RECORDITEM_ID) => {
const resData = await getViewImg({
FOREIGN_KEY: RECORDITEM_ID,
TYPE: "14",
});
data.qualifiedDialog.file = addingPrefixToFile(resData.imgs);
data.qualifiedDialog.visible = true;
};
</script>
<style scoped lang="scss"></style>

View File

@ -1,217 +1,20 @@
<template>
<layout-card>
<div id="printContent">
<el-divider content-position="left">清单信息</el-divider>
<el-descriptions border :column="2">
<el-descriptions-item label="清单名称">
{{ info.LIST_NAME }}
</el-descriptions-item>
<el-descriptions-item label="排查清单类型">
{{ info.SCREENTYPENAME }}
</el-descriptions-item>
<el-descriptions-item
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人' : '检查人'"
>
{{ info.USERS }}
</el-descriptions-item>
<el-descriptions-item label="检查时间">
{{ info.CHECK_TIME }}
</el-descriptions-item>
<el-descriptions-item
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人部门' : '所属部门'"
>
{{ info.DEPARTMENT_NAME }}
</el-descriptions-item>
<el-descriptions-item
:label="info.BAO_BAO_TYPE === '1' ? '包保责任人岗位' : '所属岗位'"
>
{{ info.POST_NAME }}
</el-descriptions-item>
<el-descriptions-item label="排查周期">
{{ info.PERIODNAME }}
</el-descriptions-item>
<el-descriptions-item label="清单类型">
{{ info.TYPENAME }}
</el-descriptions-item>
<el-descriptions-item
label="排查日期"
v-if="info.LISTTYPE === 'listType0006'"
>
{{ info.START_DATE }} - {{ info.END_DATE }}
</el-descriptions-item>
<el-descriptions-item label="补录原因" :span="2" v-if="info.REASON">
{{ info.REASON }}
</el-descriptions-item>
<el-descriptions-item
label="地图"
:span="2"
class-name="print_no_use"
label-class-name="print_no_use"
>
<el-button @click="data.mapDialogVisible = true">
<icon-international
theme="outline"
size="18"
fill="#0694f4"
:strokeWidth="3"
/>
</el-button>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="2">
<img
v-if="qianming"
:src="qianming"
style="width: 200px; height: 97px"
/>
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">检查内容</el-divider>
<div class="print_no_use">
<layout-table :data="inspectionList" :show-pagination="false">
<el-table-column label="序号" width="70" type="index" />
<el-table-column prop="RISKUNITNAME" label="风险点(单元)" />
<el-table-column prop="PARTSNAME" label="辨识部位" />
<el-table-column prop="RISK_DESCR" label="存在风险" />
<el-table-column prop="DNAME5" label="风险分级" />
<el-table-column prop="CHECK_CONTENT" label="检查内容" />
<el-table-column label="状态" width="100">
<template v-slot="{ row }">
<template v-if="row.ISNORMAL === 0">
<el-button
v-if="row.IMGCOUNT > 0"
type="primary"
text
link
@click="fnQualified(row.RECORDITEM_ID)"
>
合格
</el-button>
<div v-else></div>
</template>
<el-button
v-else-if="row.ISNORMAL === 1"
type="primary"
text
link
@click="
router.push({
path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
})
"
>
不合格
</el-button>
<div v-else-if="row.ISNORMAL === 2">不涉及</div>
<div v-else></div>
</template>
</el-table-column>
</layout-table>
</div>
<table class="print_use">
<tr>
<th width="55">序号</th>
<th width="125">风险点单元</th>
<th width="100">辨识部位</th>
<th>存在风险</th>
<th width="120">风险分级</th>
<th>检查内容</th>
<th width="100">状态</th>
</tr>
<tr v-for="(item, index) in inspectionList" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.RISKUNITNAME }}</td>
<td>{{ item.PARTSNAME }}</td>
<td>{{ item.RISK_DESCR }}</td>
<td>{{ item.LEVEL_NAME }}</td>
<td>{{ item.CHECK_CONTENT }}</td>
<template v-if="item.ISNORMAL === 0">
<template v-if="item.IMGCOUNT > 0">
<td>
<el-button type="primary" text link> 合格 </el-button>
</td>
</template>
<template v-else>
<td>合格</td>
</template>
</template>
<template v-else-if="item.ISNORMAL === 1">
<td>
<el-button type="primary" text link> 不合格 </el-button>
</td>
</template>
<template v-else-if="item.ISNORMAL === 2">
<td>不涉及</td>
</template>
<template v-else>
<td>存在未整改隐患</td>
</template>
</tr>
</table>
<el-divider content-position="left">其他隐患</el-divider>
<div class="print_no_use">
<layout-table :data="otherHiddenList" :show-pagination="false">
<el-table-column label="序号" width="70" type="index" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" />
<el-table-column label="操作" width="100">
<template v-slot="{ row }">
<el-button
type="primary"
text
link
@click="
router.push({
path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
})
"
>
查看
</el-button>
</template>
</el-table-column>
</layout-table>
</div>
<table class="print_use">
<tr>
<th width="55">序号</th>
<th>隐患描述</th>
</tr>
<tr v-for="(item, index) in otherHiddenList" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.HIDDENDESCR }}</td>
</tr>
</table>
<inspection-record-view
:entrance="entrance"
:checkRecordId="CHECKRECORD_ID"
/>
</div>
<div class="tc mt">
<div class="tc mt-10">
<el-button v-print="'#printContent'" type="primary"></el-button>
</div>
<qualified
v-model:visible="data.qualifiedDialog.visible"
:file="data.qualifiedDialog.file"
/>
<map-dialog
v-model:visible="data.mapDialogVisible"
:id="CHECKRECORD_ID"
:list="inspectionList"
/>
<div v-html="PRINT_STYLE" />
</layout-card>
</template>
<script setup>
import { useRoute, useRouter } from "vue-router";
import { reactive, ref } from "vue";
import {
getChecklistInspectionStatusRecordView,
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
} from "@/request/hazard_investigation.js";
import { getViewImg } from "@/request/api.js";
import { PRINT_STYLE } from "@/assets/js/constant.js";
import useListData from "@/assets/js/useListData.js";
import { addingPrefixToFile } from "@/assets/js/utils.js";
import Qualified from "./components/qualified.vue";
import MapDialog from "./components/map.vue";
import InspectionRecordView from "./components/inspection_record_view.vue";
import { useRoute } from "vue-router";
defineProps({
entrance: {
@ -219,54 +22,8 @@ defineProps({
default: "checklist_inspection_status",
},
});
const hiddenPath = {
checklist_inspection_status:
"/hazard_investigation/checklist_inspection_status/inspection_record/view/hidden_danger", //
inspection_record:
"/hazard_investigation/inspection_record/view/hidden_danger", //
};
const route = useRoute();
const router = useRouter();
const { CHECKRECORD_ID } = route.query;
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const info = ref({});
const qianming = ref("");
const data = reactive({
qualifiedDialog: {
visible: false,
file: [],
},
mapDialogVisible: false,
});
const { list: inspectionList } = useListData(
getChecklistInspectionStatusRecordView,
{
otherParams: { CHECKRECORD_ID },
usePagination: false,
callbackFn: (list, resData) => {
info.value = resData.pd;
if (resData.qianming && resData.qianming.length > 0) {
qianming.value = VITE_FILE_URL + resData.qianming[0].FILEPATH;
}
},
}
);
const { list: otherHiddenList } = useListData(
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
{
otherParams: { CHECKRECORD_ID },
usePagination: false,
key: "hiddenList",
}
);
const fnQualified = async (RECORDITEM_ID) => {
const resData = await getViewImg({
FOREIGN_KEY: RECORDITEM_ID,
TYPE: "14",
});
data.qualifiedDialog.file = addingPrefixToFile(resData.imgs);
data.qualifiedDialog.visible = true;
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,24 @@
<template>
<layout-card>
<div id="printContent">
<div class="page_break" v-for="item in id" :key="item">
<inspection-record-view :checkRecordId="item" />
</div>
</div>
<div class="tc mt-10">
<el-button v-print="'#printContent'" type="primary"></el-button>
</div>
</layout-card>
</template>
<script setup>
import InspectionRecordView from "../checklist_inspection_status/components/inspection_record_view.vue";
import { useRoute } from "vue-router";
import { ref } from "vue";
const route = useRoute();
const { DATA_IDS } = route.query;
const id = ref(DATA_IDS.split(","));
</script>
<style scoped lang="scss"></style>

View File

@ -43,6 +43,11 @@
</el-button>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label-width="10px" class="end">
<el-button @click="fnBatchPrinting"> </el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
@ -51,7 +56,10 @@
:data="list"
@get-data="fnGetDataTransfer"
v-model:pagination="pagination"
ref="tableRef"
row-key="CHECKRECORD_ID"
>
<el-table-column reserve-selection type="selection" width="55" />
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
@ -155,7 +163,7 @@ import { useUserStore } from "@/pinia/user.js";
const router = useRouter();
const userStore = useUserStore();
const info = ref({});
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
useListData(getInspectionRecordList, {
otherParams: {
USER_ID: userStore.getUserInfo.USER_ID,
@ -190,6 +198,20 @@ const fnDelete = debounce(
},
{ atBegin: true }
);
const fnBatchPrinting = () => {
const selectionData = tableRef.value.getSelectionRows();
if (selectionData.length === 0) {
ElMessage.warning("请选择要打印的数据");
return;
}
const DATA_IDS = selectionData.map((item) => item.CHECKRECORD_ID).join(",");
router.push({
path: "/hazard_investigation/inspection_record/batch_printing",
query: {
DATA_IDS,
},
});
};
</script>
<style scoped></style>

View File

@ -1,9 +1,9 @@
<template>
<inspection-record entrance="inspection_record" />
<inspection-record-view entrance="inspection_record" />
</template>
<script setup>
import InspectionRecord from "../checklist_inspection_status/inspection_record_view.vue";
import InspectionRecordView from "../checklist_inspection_status/inspection_record_view.vue";
</script>
<style scoped lang="scss"></style>

View File

@ -140,7 +140,7 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="整改部门" prop="RECTIFICATIONDEPT">
<layout-department
v-model="form.RECTIFICATIONDEPT"
@ -148,7 +148,7 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="整改人" prop="RECTIFICATIONOR">
<el-select v-model="form.RECTIFICATIONOR">
<el-option
@ -204,9 +204,9 @@ import { debounce } from "throttle-debounce";
import { ElMessage } from "element-plus";
import {
getHiddenDangerDatabaseList,
setInventoryTroubleshootingOtherHiddenDangerAdd,
setInventoryTroubleshootingOtherHiddenDangerEdit,
setInventoryTroubleshootingOtherHiddenDangerListAdd,
setHiddenDangerAdd,
setHiddenDangerEdit,
setHiddenDangerListAdd,
} from "@/request/hazard_investigation.js";
import {
layoutFnGetHazardCategories,
@ -382,9 +382,7 @@ const fnSubmit = debounce(
LONGITUDE: props.longitude,
LATITUDE: props.latitude,
};
const resData = await setInventoryTroubleshootingOtherHiddenDangerAdd(
params
);
const resData = await setHiddenDangerAdd(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
if (props.hiddenType === "otherHidden") {
@ -395,14 +393,11 @@ const fnSubmit = debounce(
HAVESCHEME: 0,
};
if (props.type === "add") {
const resData =
await setInventoryTroubleshootingOtherHiddenDangerListAdd(params);
const resData = await setHiddenDangerListAdd(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
if (props.type === "edit") {
const resData = await setInventoryTroubleshootingOtherHiddenDangerEdit(
params
);
const resData = await setHiddenDangerEdit(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
}

View File

@ -240,8 +240,8 @@ import { nextTick, onMounted, reactive, ref } from "vue";
import {
getInventoryManagementView,
getInventoryTroubleshootingOtherHiddenList,
getInventoryTroubleshootingOtherHiddenDangerView,
setInventoryTroubleshootingOtherHiddenDangerDelete,
getHiddenDangerView,
setHiddenDangerDelete,
setInventoryTroubleshootingSubmit,
setChecklistInspectionStatusRecordSupplementaryRecordingSubmit,
} from "@/request/hazard_investigation.js";
@ -397,7 +397,7 @@ const fnUnqualified = async (index, row) => {
data.unQualifiedDialog.hiddenType = "unqualified";
};
const fnGetHiddenDangerView = async (HIDDEN_ID) => {
const resData = await getInventoryTroubleshootingOtherHiddenDangerView({
const resData = await getHiddenDangerView({
HIDDEN_ID,
});
data.unQualifiedDialog.form = resData.pd;
@ -448,7 +448,7 @@ const fnDeleteOtherHidden = async (HIDDEN_ID) => {
await ElMessageBox.confirm("确定要删除吗?", {
type: "warning",
});
await setInventoryTroubleshootingOtherHiddenDangerDelete({ HIDDEN_ID });
await setHiddenDangerDelete({ HIDDEN_ID });
fnGetOtherHidden();
};
const fnAddOrEditOtherHidden = async (row, type) => {

View File

@ -0,0 +1,119 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="60px"
@submit.prevent="fnGetData"
>
<el-row>
<el-col :span="6">
<el-form-item label="年份" prop="YEAR">
<el-select v-model="searchForm.YEAR" @change="fnGetData">
<el-option
v-for="item in yearList"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<h3 class="tc mb-10">{{ searchForm.YEAR }}年隐患排查计划</h3>
<layout-table :data="list" :show-pagination="false">
<el-table-column
prop="type_name"
label="检查类型【清单类型】"
width="150"
/>
<el-table-column prop="level_name" label="排查级别" width="100" />
<el-table-column
prop="period_name"
label="排查频次【排查周期】"
width="150"
/>
<el-table-column label="隐患排查要求">
<template v-slot="{ row }">
{{ dictionary[row.type_name].require }}
</template>
</el-table-column>
<el-table-column prop="check_count" label="排查任务数" width="100" />
<el-table-column prop="list_count" label="涉及排查清单数" width="120" />
<el-table-column prop="dept_count" label="涉及部门数" width="100" />
<el-table-column label="排查目的">
<template v-slot="{ row }">
{{ dictionary[row.type_name].purpose }}
</template>
</el-table-column>
</layout-table>
</layout-card>
</div>
</template>
<script setup>
import useListData from "@/assets/js/useListData.js";
import { getTroubleshootingPlanList } from "@/request/hazard_investigation.js";
import dayjs from "dayjs";
import { ref } from "vue";
const year = dayjs().year();
const dictionary = {
节假日: {
require: "按节假日检查表内容实施检查,保存检查记录、隐患通知及整改记录",
purpose: "保证节日期间各种应急物资及备用设施充足相关事项明确落实。",
},
综合: {
require: "按综合性检查表内容实施检查。保存检查记录、隐患通知及整改记录",
purpose: "以检查各级人员安全责任的落实情况为重点",
},
专业: {
require:
"按各专业性检查表内容实施检查,有问题向领导汇报。保存检查记录、隐患通知及整改记录",
purpose: "主要排查各专业正常运行情况",
},
季节性: {
require: "按各季节性检查表检查",
purpose: "根据季节特点进行预防性检查",
},
日常: {
require:
"检查人员按各自负责部门进行检查,保存检查记录、隐患通知及整改记录。",
purpose: "履行本身安全工作职责,及时发现三违行为",
},
};
const yearList = ref([]);
const fnInitYearList = () => {
for (let i = 2021; i <= year; i++) {
yearList.value.push(i);
}
};
fnInitYearList();
const { list, searchForm, fnGetData } = useListData(
getTroubleshootingPlanList,
{
usePagination: false,
defaultSearchForm: {
YEAR: year,
},
key: "planList",
callbackFn: (list) => {
for (let i = 0; i < list.length; i++) {
if (
list[i].check_count === 0 ||
list[i].list_count === 0 ||
list[i].dept_count === 0
) {
list.splice(i, 1);
i--;
}
}
},
}
);
</script>
<style scoped></style>