forked from integrated_whb/integrated_whb_vue
Merge remote-tracking branch 'origin/dev' into dev
commit
998b8413b7
|
@ -330,6 +330,15 @@ export default [
|
|||
},
|
||||
component: "hazard_investigation/inventory_management/add",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inventory_management/check_standard_add",
|
||||
meta: {
|
||||
title: "新增",
|
||||
activeMenu: "/hazard_investigation/inventory_management",
|
||||
},
|
||||
component:
|
||||
"hazard_investigation/inventory_management/check_standard_add",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inventory_management/edit",
|
||||
meta: {
|
||||
|
@ -384,6 +393,15 @@ export default [
|
|||
},
|
||||
component: "hazard_investigation/inventory_troubleshooting/inspect",
|
||||
},
|
||||
{
|
||||
path: "/hazard_investigation/inventory_troubleshooting/standard_inspect",
|
||||
meta: {
|
||||
title: "开始检查",
|
||||
activeMenu: "/hazard_investigation/inventory_troubleshooting",
|
||||
},
|
||||
component:
|
||||
"hazard_investigation/inventory_troubleshooting/standard_inspect",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -927,6 +945,56 @@ export default [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management",
|
||||
redirect: "/safety_environmental_management/safety_environmental",
|
||||
meta: { title: "安全、环保检查管理", model: MODEL["1"] },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "/safety_environmental_management/safety_environmental",
|
||||
meta: { title: "安全、环保检查", isSubMenu: false },
|
||||
component: "children",
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component:
|
||||
"safety_environmental_management/safety_environmental/index",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/safety_environmental/add",
|
||||
meta: {
|
||||
title: "新增",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/safety_environmental",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/safety_environmental/add",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/safety_environmental/edit",
|
||||
meta: {
|
||||
title: "编辑",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/safety_environmental",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/safety_environmental/add",
|
||||
},
|
||||
{
|
||||
path: "/safety_environmental_management/safety_environmental/view",
|
||||
meta: {
|
||||
title: "查看",
|
||||
activeMenu:
|
||||
"/safety_environmental_management/safety_environmental",
|
||||
},
|
||||
component:
|
||||
"safety_environmental_management/safety_environmental/view",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/off_duty_management",
|
||||
redirect: "/off_duty_management/leave",
|
||||
|
|
|
@ -6,6 +6,7 @@ import {
|
|||
getDepartmentTree,
|
||||
getLevelsCorp,
|
||||
getElectronicFenceTree,
|
||||
getListSelectTree,
|
||||
} from "@/request/data_dictionary.js";
|
||||
import { ref } from "vue";
|
||||
|
||||
|
@ -388,6 +389,13 @@ export const layoutFnGetElectronicFenceTree = async (params) => {
|
|||
const resData = await getElectronicFenceTree(params);
|
||||
return ref(JSON.parse(resData.zTreeNodes));
|
||||
};
|
||||
// 检查类型树
|
||||
export const layoutFnGetInspectionTypeTree = async () => {
|
||||
const resData = await getListSelectTree({
|
||||
DICTIONARIES_ID: "60e6481d96e44a5390ff5c347c4d1ffe",
|
||||
});
|
||||
return ref(JSON.parse(resData.zTreeNodes));
|
||||
};
|
||||
// 无法确定DICTIONARIES_ID的数据字典
|
||||
export const layoutFnGetLevels = async (DICTIONARIES_ID) => {
|
||||
const resData = await getLevels({ DICTIONARIES_ID });
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
<template>
|
||||
<el-tree-select
|
||||
ref="treeSelectRef"
|
||||
v-model="modelValue"
|
||||
:data="data"
|
||||
:props="{
|
||||
value: 'id',
|
||||
children: 'nodes',
|
||||
label: 'name',
|
||||
}"
|
||||
node-key="id"
|
||||
:render-after-expand="false"
|
||||
accordion
|
||||
check-strictly
|
||||
:clearable="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { layoutFnGetInspectionTypeTree } from "@/assets/js/data_dictionary";
|
||||
import { ref } from "vue";
|
||||
import { useVModel } from "@vueuse/core";
|
||||
|
||||
defineOptions({
|
||||
name: "LayoutInspectionType",
|
||||
});
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:modelValue"]);
|
||||
const modelValue = useVModel(props, "modelValue", emits);
|
||||
const treeSelectRef = ref(null);
|
||||
const getCurrentNode = () => {
|
||||
return treeSelectRef.value.getCurrentNode();
|
||||
};
|
||||
defineExpose({
|
||||
getCurrentNode,
|
||||
});
|
||||
const data = await layoutFnGetInspectionTypeTree();
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -19,7 +19,7 @@
|
|||
"
|
||||
>
|
||||
<div>{{ item.NAME }}</div>
|
||||
<div>
|
||||
<div v-if="isDelete">
|
||||
<el-icon @click.stop="fnDelete(index)">
|
||||
<circle-close />
|
||||
</el-icon>
|
||||
|
@ -47,6 +47,10 @@ const props = defineProps({
|
|||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
isDelete: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:modelValue", "delete-option"]);
|
||||
const modelValue = useVModel(props, "modelValue", emits);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:height="300"
|
||||
:is-crop="false"
|
||||
:line-width="6"
|
||||
line-color="red"
|
||||
line-color="#fff"
|
||||
/>
|
||||
<template #footer>
|
||||
<el-button @click="fnReset">重签</el-button>
|
||||
|
|
|
@ -45,12 +45,18 @@ export const getDepartmentTree = (params) =>
|
|||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 部门树
|
||||
// 电子围栏树
|
||||
export const getElectronicFenceTree = (params) =>
|
||||
post("/electronicfence/listTree", {
|
||||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 下拉选择树
|
||||
export const getListSelectTree = (params) =>
|
||||
post("/dictionaries/listSelectTree", {
|
||||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 获取岗位
|
||||
export const getPostListAll = (params) =>
|
||||
post("/post/listAll", {
|
||||
|
@ -78,3 +84,9 @@ export const getHiddenDangerType = async () => {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 获取数据字典-检查类别
|
||||
export const getStandardLevels = () =>
|
||||
post("/hiddenstandardDictionary/list", {
|
||||
loading: false,
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ export const setInventoryManagementInsuranceCoverageList = (params) =>
|
|||
export const setInventoryManagementInsuranceCoverageSave = (params) =>
|
||||
post("/listmanager/saveBaoBaoType", params); // 清单管理设置包保责任类型提交
|
||||
export const getInventoryManagementInspectionItems = (params) =>
|
||||
post("/riskcheckitem/itemlistAll", params); // 清单管理检查项列表
|
||||
post("/richeckitem/itemlistAllsk", params); // 清单管理检查项列表
|
||||
export const getInventoryManagementOtherRiskList = (params) =>
|
||||
post("/riskcheckitem/list", params); // 清单管理选择其他存在风险列表
|
||||
export const setInventoryManagementAdd = (params) =>
|
||||
|
@ -34,6 +34,8 @@ export const setDeleteInventoryManagementRecovery = (params) =>
|
|||
post("/stoplistmanager/restore", params); // 删除清单管理恢复
|
||||
export const getInventoryTroubleshootingList = (params) =>
|
||||
post("/listmanager/checkList", params); // 清单排查列表
|
||||
export const getRiskStandardList = (params) =>
|
||||
post("/listmanager/riskStandardCheckList", params); // 清单排查列表
|
||||
export const getInventoryTroubleshootingOtherHiddenList = (params) =>
|
||||
post("/hidden/getOtherHidden", params); // 清单排查其它隐患列表
|
||||
export const getHiddenDangerDatabaseList = (params) =>
|
||||
|
@ -46,8 +48,10 @@ export const setHiddenDangerListAdd = (params) =>
|
|||
post("/hidden/listAdd", params); // 清单排查其它隐患添加
|
||||
export const setInventoryTroubleshootingSubmit = (params) =>
|
||||
post("/checkrecord/add", params); // 清单排查提交
|
||||
export const getChecklistInspectionStatusList = (params) =>
|
||||
post("/listmanager/recordList", params); // 清单检查情况列表
|
||||
// export const getChecklistInspectionStatusList = (params) =>
|
||||
// post("/listmanager/recordList", params); // 清单检查情况列表
|
||||
export const getRiskStandardStatusList = (params) =>
|
||||
post("/listmanager/riskStandardRecordList", params); // 清单检查情况列表
|
||||
export const getChecklistInspectionStatusRecordList = (params) =>
|
||||
post("/checkrecord/list", params); // 清单检查情况检查记录列表
|
||||
export const setChecklistInspectionStatusRecordDelete = (params) =>
|
||||
|
@ -66,3 +70,28 @@ export const getInspectionRecordList = (params) =>
|
|||
post("/checkrecord/allList", params); // 检查记录管理列表
|
||||
export const getTroubleshootingPlanList = (params) =>
|
||||
post("/listmanager/checkPlan", params); // 排查计划列表
|
||||
|
||||
export const getCustomList = (params) =>
|
||||
post("/hiddenstandardCustom/list", params); // 隐患排查清单管理列表
|
||||
export const setCustomDisable = (params) =>
|
||||
post("/hiddenstandardCustom/delete", params); // 隐患排查清单管理禁用
|
||||
export const setCustomEnable = (params) =>
|
||||
post("/hiddenstandardCustom/enable", params); // 清单管理启用
|
||||
export const setCustomBatchDeleteTemporary = (params) =>
|
||||
post("/hiddenstandardCustom/deleteAlltemp", params); // 隐患排查清单管理批量删除临时清单
|
||||
export const setCustomBatchBatchDelete = (params) =>
|
||||
post("/hiddenstandardCustom/deleteAll", params); // 清单管理批量删除
|
||||
export const getCheckstandardCommonList = (params) =>
|
||||
post("/hiddenstandardCommon/list", params); // 隐患排清单管理选择其他检查标准
|
||||
export const setCheckStandardManagementAdd = (params) =>
|
||||
post("/hiddenstandardCustom/add", params); // 隐患排查清单管理新增
|
||||
export const setCheckStandardManagementEdit = (params) =>
|
||||
post("/listmanager/hiddencheckedit", params); // 隐患排查清单管理修改
|
||||
export const getCheckStandardManagementView = (params) =>
|
||||
post("/hiddenstandardCustom/goEdit", params); // 隐患排查清单管理查看
|
||||
export const getCheckStandardOtherHiddenList = (params) =>
|
||||
post("/customHidden/getOtherHidden", params); // 隐患排查清单排查其它隐患列表
|
||||
export const setCheckStandardSupplementaryRecordingSubmit = (params) =>
|
||||
post("/customCheckrecord/recording", params); // 隐患排查清单检查情况检查记录补录提交
|
||||
export const setCheckStandardSubmit = (params) =>
|
||||
post("/customCheckrecord/add", params); // 清单排查提交
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
|
||||
export const getSafetyEnvironmentalList = (params) =>
|
||||
post("/safetyenvironmental/list", params); // 安全环保管理列表
|
||||
export const getSafetyEnvironmentalFlowChart = (params) =>
|
||||
post("/safetyenvironmental/getFlow", params); // 安全环保管理流程图
|
||||
export const setSafetyEnvironmentalDelete = (params) =>
|
||||
post("/safetyenvironmental/hide", params); // 安全环保管理删除
|
||||
export const setSafetyEnvironmentalDefense = (params) =>
|
||||
post("/safetyenvironmental/explain", params); // 安全环保管理申辩
|
|
@ -15,6 +15,14 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单种类" prop="LIST_TYPE">
|
||||
<el-select v-model="searchForm.LIST_TYPE">
|
||||
<el-option label="风险管控清单" value="1" />
|
||||
<el-option label="隐患排查清单" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="周期内检查状态" prop="STATUS">
|
||||
<el-select v-model="searchForm.STATUS">
|
||||
|
@ -137,6 +145,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column label="清单种类">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.list_type === '1'">风险管控清单</span>
|
||||
<span v-if="row.list_type === '2'">隐患排查清单</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
|
@ -219,7 +233,7 @@ import {
|
|||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingCycle,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { getChecklistInspectionStatusList } from "@/request/hazard_investigation.js";
|
||||
import { getRiskStandardStatusList } from "@/request/hazard_investigation.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
@ -229,7 +243,7 @@ const router = useRouter();
|
|||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getChecklistInspectionStatusList);
|
||||
useListData(getRiskStandardStatusList);
|
||||
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
|
|
|
@ -0,0 +1,252 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</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
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单类型" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
: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="RISKCHECKLISTTYPE">
|
||||
<el-select v-model="searchForm.RISKCHECKLISTTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
: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="LISTINGLEVEL">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</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>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
row-key="LISTMANAGER_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="人员"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="PERIODNAME"
|
||||
label="排查周期"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="SCREENTYPENAME"
|
||||
label="排查类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TYPENAME"
|
||||
label="清单类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template #default> 已删除 </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/delete_inventory_management/view',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnRecovery(row.LISTMANAGER_ID)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
彻底删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getDeleteInventoryManagementList,
|
||||
setDeleteInventoryManagementRecovery,
|
||||
setInventoryManagementBatchDelete,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getDeleteInventoryManagementList, {
|
||||
LIST_TYPE: name === "risk" ? "1" : "2",
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const buttonJurisdiction = await useButtonJurisdiction("stoplistmanager");
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnRecovery = debounce(
|
||||
1000,
|
||||
async (LISTMANAGER_ID) => {
|
||||
await ElMessageBox.confirm("确定要恢复吗?", { type: "warning" });
|
||||
await setDeleteInventoryManagementRecovery({ LISTMANAGER_ID });
|
||||
ElMessage.success("恢复成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm(
|
||||
"删除之后该清单无法恢复,确认要删除选中的数据吗?",
|
||||
{ type: "warning" }
|
||||
);
|
||||
const DATA_IDS = selectionData.map((item) => item.LISTMANAGER_ID).join(",");
|
||||
await setInventoryManagementBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -1,247 +1,37 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</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
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单类型" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
: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="RISKCHECKLISTTYPE">
|
||||
<el-select v-model="searchForm.RISKCHECKLISTTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
: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="LISTINGLEVEL">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</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
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
row-key="LISTMANAGER_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="人员"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="PERIODNAME"
|
||||
label="排查周期"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="SCREENTYPENAME"
|
||||
label="排查类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TYPENAME"
|
||||
label="清单类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template #default> 已删除 </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/delete_inventory_management/view',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnRecovery(row.LISTMANAGER_ID)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
彻底删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
<layout-card>
|
||||
<el-tabs v-model="name" @tab-change="fnTabChange">
|
||||
<el-tab-pane label="风险管控清单" name="risk" lazy>
|
||||
<list name="risk" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="隐患排查清单" name="checkStandard" lazy>
|
||||
<list name="checkStandard" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getDeleteInventoryManagementList,
|
||||
setDeleteInventoryManagementRecovery,
|
||||
setInventoryManagementBatchDelete,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
import List from "./components/list.vue";
|
||||
import { useRouter, useRoute, onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getDeleteInventoryManagementList);
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const buttonJurisdiction = await useButtonJurisdiction("stoplistmanager");
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
const route = useRoute();
|
||||
const defaultName = "risk";
|
||||
const name = ref(route.query.name || defaultName);
|
||||
onBeforeRouteUpdate((to, from, next) => {
|
||||
name.value = to.query.name || defaultName;
|
||||
next();
|
||||
});
|
||||
const fnTabChange = (name) => {
|
||||
router.replace({
|
||||
path: "/hazard_investigation/delete_inventory_management",
|
||||
query: {
|
||||
name,
|
||||
},
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnRecovery = debounce(
|
||||
1000,
|
||||
async (LISTMANAGER_ID) => {
|
||||
await ElMessageBox.confirm("确定要恢复吗?", { type: "warning" });
|
||||
await setDeleteInventoryManagementRecovery({ LISTMANAGER_ID });
|
||||
ElMessage.success("恢复成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm(
|
||||
"删除之后该清单无法恢复,确认要删除选中的数据吗?",
|
||||
{ type: "warning" }
|
||||
);
|
||||
const DATA_IDS = selectionData.map((item) => item.LISTMANAGER_ID).join(",");
|
||||
await setInventoryManagementBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-divider content-position="left">清单信息</el-divider>
|
||||
<el-divider content-position="left">风险管控清单信息</el-divider>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
|
|
|
@ -0,0 +1,461 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-divider content-position="left">隐患排查清单信息</el-divider>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="NAME">
|
||||
<el-input v-model="data.form.NAME" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
label="是否包保责任人任务"
|
||||
prop="BAO_BAO_TYPE"
|
||||
label-width="160px"
|
||||
>
|
||||
<el-select v-model="data.form.BAO_BAO_TYPE">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '0', NAME: '否' },
|
||||
{ BIANMA: '1', NAME: '是' },
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="data.form.BAO_BAO_TYPE === '1'" :span="6">
|
||||
<el-form-item label="任务类型" prop="TASK_TYPE">
|
||||
<el-select v-model="data.form.TASK_TYPE">
|
||||
<el-option
|
||||
v-for="item in taskTypeList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="DEPARTMENT_ID" label="部门">
|
||||
<layout-department
|
||||
v-model="data.form.DEPARTMENT_ID"
|
||||
@update:model-value="fnDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="岗位" prop="POST_ID">
|
||||
<el-select v-model="data.form.POST_ID" @change="fnPostChange">
|
||||
<el-option
|
||||
v-for="item in data.postList"
|
||||
:key="item.POST_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.POST_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item v-if="!LISTMANAGER_ID" label="负责人" prop="USER_IDS">
|
||||
<el-select v-model="data.form.USER_IDS" multiple>
|
||||
<el-option
|
||||
v-for="item in data.userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-else-if="LISTMANAGER_ID"
|
||||
label="负责人"
|
||||
prop="USER_ID"
|
||||
>
|
||||
<el-select v-model="data.form.USER_ID">
|
||||
<el-option
|
||||
v-for="item in data.userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="排查类型" prop="SCREENTYPE">
|
||||
<el-select v-model="data.form.SCREENTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
: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="PERIOD">
|
||||
<el-select v-model="data.form.PERIOD">
|
||||
<el-option
|
||||
v-for="item in troubleshootingCycleList"
|
||||
: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="TYPE">
|
||||
<el-select v-model="data.form.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
v-if="
|
||||
data.form.TYPE === 'listType0005' ||
|
||||
data.form.TYPE === 'listType0006'
|
||||
"
|
||||
:key="data.form.TYPE"
|
||||
:span="6"
|
||||
>
|
||||
<el-form-item label="排查日期" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="data.form.dates"
|
||||
:disabled-date="
|
||||
data.form.TYPE === 'listType0006' ? fnDisabledDate : null
|
||||
"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="left">检查内容</el-divider>
|
||||
<el-form
|
||||
:model="data.searchForm"
|
||||
label-width="60px"
|
||||
@submit.prevent="fnGetDataFilter"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="关键字" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="data.searchForm.KEYWORDS"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</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="fnGetDataFilter">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item class="end">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="data.selectStandardDialogVisible = true"
|
||||
>
|
||||
选择其他检查标准
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="data.addOrEditDialog.visible = true"
|
||||
>
|
||||
添加检查标准
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="data.list"
|
||||
:show-pagination="false"
|
||||
max-height="400"
|
||||
row-key="RISKCHECKITEM_ID"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="序号" width="55" />
|
||||
<el-table-column
|
||||
prop="CHECK_CATEGORY_NAME"
|
||||
label="检查类别"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column prop="CHECK_ITEM_NAME" label="检查项目" width="180" />
|
||||
<el-table-column prop="CHECK_CONTENT" label="检查内容" width="300" />
|
||||
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="180" />
|
||||
<el-table-column prop="CHECK_QUALIFIED" label="检查合格项" width="180" />
|
||||
<el-table-column prop="CHECK_UNQUALIFIED" label="检查不合格项" />
|
||||
<el-table-column label="操作类型">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.OPERATION_TYPE === 1">选择</span>
|
||||
<span v-if="row.OPERATION_TYPE === 2">填写</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">保存</el-button>
|
||||
</div>
|
||||
<add-checkstandard
|
||||
title="添加检查标准"
|
||||
type="add"
|
||||
v-model:visible="data.addOrEditDialog.visible"
|
||||
v-model:form="data.addOrEditDialog.form"
|
||||
:standard-data="data.checkStandardList"
|
||||
:category-data="data.categoryList"
|
||||
@submit="fnAddStandardSubmit"
|
||||
/>
|
||||
<select-checkstandard
|
||||
v-model:visible="data.selectStandardDialogVisible"
|
||||
v-model:list-data="data.listAll"
|
||||
@submit="fnSelectStandardSubmit"
|
||||
/>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick, reactive, ref, watchEffect } from "vue";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTaskType,
|
||||
layoutFnGetTroubleshootingCycle,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import {
|
||||
getPostListAll,
|
||||
getStandardLevels,
|
||||
getUserListAll,
|
||||
} from "@/request/data_dictionary.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import {
|
||||
setCheckStandardManagementAdd,
|
||||
setCheckStandardManagementEdit,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import AddCheckstandard from "@/views/hazard_investigation/inventory_management/components/checkstandard_add.vue";
|
||||
import SelectCheckstandard from "./components/select_checkstandard.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { LISTMANAGER_ID } = route.query;
|
||||
const userStore = useUserStore();
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const rules = {
|
||||
NAME: [{ required: true, message: "清单名称不能为空", trigger: "blur" }],
|
||||
BAO_BAO_TYPE: [
|
||||
{
|
||||
required: true,
|
||||
message: "是否包保责任人任务不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
TASK_TYPE: [
|
||||
{ required: true, message: "任务类型不能为空", trigger: "change" },
|
||||
],
|
||||
DEPARTMENT_ID: [
|
||||
{ required: true, message: "部门不能为空", trigger: "change" },
|
||||
],
|
||||
POST_ID: [{ required: true, message: "岗位不能为空", trigger: "change" }],
|
||||
USER_IDS: [{ required: true, message: "负责人不能为空", trigger: "change" }],
|
||||
USER_ID: [{ required: true, message: "负责人不能为空", trigger: "change" }],
|
||||
SCREENTYPE: [
|
||||
{ required: true, message: "排查类型不能为空", trigger: "change" },
|
||||
],
|
||||
PERIOD: [{ required: true, message: "排查周期不能为空", trigger: "change" }],
|
||||
TYPE: [{ required: true, message: "清单类型不能为空", trigger: "change" }],
|
||||
dates: [{ required: true, message: "排查日期不能为空", trigger: "change" }],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const tableRef = ref(null);
|
||||
const data = reactive({
|
||||
form: {
|
||||
NAME: "",
|
||||
BAO_BAO_TYPE: "",
|
||||
TASK_TYPE: "",
|
||||
DEPARTMENT_ID: "",
|
||||
POST_ID: "",
|
||||
USER_IDS: [],
|
||||
USER_ID: "",
|
||||
SCREENTYPE: "",
|
||||
PERIOD: "",
|
||||
TYPE: "",
|
||||
dates: [],
|
||||
},
|
||||
postList: [],
|
||||
userList: [],
|
||||
list: [],
|
||||
listAll: [],
|
||||
searchForm: {},
|
||||
selectStandardDialogVisible: false,
|
||||
addOrEditDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
CHECK_CATEGORY_NAME: "",
|
||||
CHECK_ITEM_NAME: "",
|
||||
CHECK_CONTENT: "",
|
||||
CHECK_STANDARD: "",
|
||||
REFERENCE_BASIS: "",
|
||||
CHECK_QUALIFIED: "",
|
||||
CHECK_UNQUALIFIED: "",
|
||||
OPERATION_TYPE: "",
|
||||
COMMON_ITEM_SORT: "",
|
||||
letItemType: "",
|
||||
letCategoryType: "",
|
||||
},
|
||||
},
|
||||
checkStandardList: [],
|
||||
categoryList: [],
|
||||
itemList: [],
|
||||
});
|
||||
const taskTypeList = await layoutFnGetTaskType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
// const fnGetInspectionItems = async () => {
|
||||
// const resData = await getCheckStandardManagementInspectionItems();
|
||||
// data.list = [...tableRef.value.getSelectionRows(), ...resData.varList];
|
||||
// data.listAll = [...tableRef.value.getSelectionRows(), ...resData.varList];
|
||||
// await fnTableSelection();
|
||||
// };
|
||||
// fnGetInspectionItems();
|
||||
const fnDepartmentChange = () => {
|
||||
data.postList = [];
|
||||
data.userList = [];
|
||||
data.form.POST_ID = "";
|
||||
data.form.USER_IDS = [];
|
||||
data.form.USER_ID = "";
|
||||
};
|
||||
const fnPostChange = () => {
|
||||
data.userList = [];
|
||||
data.form.USER_IDS = [];
|
||||
data.form.USER_ID = "";
|
||||
};
|
||||
const fnGetPost = async (DEPARTMENT_ID) => {
|
||||
const resData = await getPostListAll({ DEPARTMENT_ID });
|
||||
data.postList = resData.postList;
|
||||
};
|
||||
const fnGetUser = async (POST_ID) => {
|
||||
const resData = await getUserListAll({ POST_ID });
|
||||
data.userList = resData.userList;
|
||||
};
|
||||
const fnDisabledDate = (time) => {
|
||||
return time.getTime() < Date.now();
|
||||
};
|
||||
const fnGetDataFilter = () => {
|
||||
const keyword = data.searchForm.KEYWORDS;
|
||||
if (keyword) {
|
||||
data.list = data.listAll.filter(
|
||||
(item) =>
|
||||
item.CHECK_ITEM_NAME?.indexOf(keyword) > -1 ||
|
||||
item.CHECK_CONTENT?.indexOf(keyword) > -1 ||
|
||||
item.CHECK_STANDARD?.indexOf(keyword) > -1
|
||||
);
|
||||
} else {
|
||||
data.list = [...data.listAll];
|
||||
}
|
||||
fnTableSelection();
|
||||
};
|
||||
const fnTableSelection = async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
await nextTick();
|
||||
selectionData.forEach((item) => {
|
||||
tableRef.value.toggleRowSelection(item);
|
||||
});
|
||||
};
|
||||
const fnAddStandardSubmit = (item) => {
|
||||
console.log(item);
|
||||
data.list.push(item);
|
||||
data.listAll.push(item);
|
||||
fnTableSelection();
|
||||
};
|
||||
const fnSelectStandardSubmit = (listData) => {
|
||||
data.list.push(...listData);
|
||||
data.listAll.push(...listData);
|
||||
fnTableSelection();
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.error("请选择检查内容");
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
...data.form,
|
||||
USER_IDS: data.form.USER_IDS?.join(","),
|
||||
LISTITEM: JSON.stringify(selectionData),
|
||||
BAO_BAO_DEPARTMENT_ID: data.form.DEPARTMENT_ID,
|
||||
BAO_BAO_USER_ID: data.form.USER_ID,
|
||||
START_DATE: data.form.dates[0],
|
||||
END_DATE: data.form.dates[1],
|
||||
BAO_BAO_TYPE: data.form.BAO_BAO_TYPE || "0",
|
||||
};
|
||||
!LISTMANAGER_ID
|
||||
? await setCheckStandardManagementAdd(params)
|
||||
: await setCheckStandardManagementEdit(params);
|
||||
ElMessage.success("保存成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnCheckStandard = async () => {
|
||||
const list = await getStandardLevels();
|
||||
list.varList.forEach((item) => {
|
||||
data.checkStandardList.push({
|
||||
DICTIONARIES_ID: item.DICTIONARY_ID,
|
||||
NAME: item.DICTIONARY_NAME,
|
||||
PARENT_IDS: item.PARENT_IDS,
|
||||
PARENT_ID: item.PARENT_ID,
|
||||
});
|
||||
if (item.PARENT_ID === "0") {
|
||||
data.categoryList.push({
|
||||
DICTIONARIES_ID: item.DICTIONARY_ID,
|
||||
NAME: item.DICTIONARY_NAME,
|
||||
PARENT_IDS: item.PARENT_IDS,
|
||||
PARENT_ID: item.PARENT_ID,
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
fnCheckStandard();
|
||||
console.log(data.checkStandardList);
|
||||
watchEffect(() => {
|
||||
if (data.form.DEPARTMENT_ID) fnGetPost(data.form.DEPARTMENT_ID);
|
||||
if (data.form.POST_ID) fnGetUser(data.form.POST_ID);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,221 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="title ? title : type === 'add' ? '新增' : '修改'"
|
||||
:before-close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="240px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查类别" prop="CHECK_CATEGORY">
|
||||
<layout-select-create
|
||||
:list="categoryData"
|
||||
v-model="data.CHECK_CATEGORY_NAME"
|
||||
@change="goChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查项目" prop="CHECK_ITEM">
|
||||
<layout-select-create
|
||||
:list="data.itemData"
|
||||
v-model="data.CHECK_ITEM_NAME"
|
||||
@change="goChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查内容" prop="CHECK_CONTENT">
|
||||
<el-input v-model="form.CHECK_CONTENT" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查标准" prop="CHECK_STANDARD">
|
||||
<el-input v-model="form.CHECK_STANDARD" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="参考依据" prop="REFERENCE_BASIS">
|
||||
<el-input v-model="form.REFERENCE_BASIS" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查合格项" prop="CHECK_QUALIFIED">
|
||||
<el-input v-model="form.CHECK_QUALIFIED" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查不合格项" prop="CHECK_UNQUALIFIED">
|
||||
<el-input v-model="form.CHECK_UNQUALIFIED" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="操作类型" prop="OPERATION_TYPE">
|
||||
<el-select v-model="form.OPERATION_TYPE">
|
||||
<el-option :value="1" label="选择" />
|
||||
<el-option :value="2" label="填写" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="排序" prop="COMMON_ITEM_SORT">
|
||||
<el-input-number
|
||||
:min="1"
|
||||
:precision="0"
|
||||
v-model="form.COMMON_ITEM_SORT"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import LayoutSelectCreate from "@/components/select_create/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
standardData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
categoryData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "submit"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const formRef = ref(null);
|
||||
const data = reactive({
|
||||
nameValue: "",
|
||||
CHECK_CATEGORY_NAME: "",
|
||||
CHECK_ITEM_NAME: "",
|
||||
standardData: props.standardData,
|
||||
itemData: [],
|
||||
});
|
||||
// const fnCheckStandard = async () => {
|
||||
// const list = await layoutFnGetCheckStandard();
|
||||
// data.checkStandardList = list;
|
||||
// list.forEach((item) => {
|
||||
// if (item.PARENT_ID === "0") {
|
||||
// data.categoryList.push(item);
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// fnCheckStandard();
|
||||
const goChange = (event) => {
|
||||
if (fnFindValueInList(props.categoryData, data.CHECK_CATEGORY_NAME)) {
|
||||
form.value.letCategoryType = "select";
|
||||
form.value.CHECK_CATEGORY_NAME = data.nameValue;
|
||||
} else {
|
||||
form.value.letCategoryType = "value";
|
||||
form.value.CHECK_CATEGORY_NAME = data.CHECK_CATEGORY_NAME;
|
||||
}
|
||||
if (form.value.letCategoryType === "select" && event) {
|
||||
getItemList(data.CHECK_CATEGORY_NAME);
|
||||
}
|
||||
if (fnFindValueInList(data.itemData, data.CHECK_ITEM_NAME)) {
|
||||
form.value.letItemType = "select";
|
||||
form.value.CHECK_ITEM_NAME = data.nameValue;
|
||||
} else {
|
||||
form.value.letItemType = "value";
|
||||
form.value.CHECK_ITEM_NAME = data.CHECK_ITEM_NAME;
|
||||
}
|
||||
};
|
||||
const getItemList = (val) => {
|
||||
data.standardData.forEach((item) => {
|
||||
if (item.PARENT_ID !== "0" && item.PARENT_IDS.includes(val)) {
|
||||
data.itemData.push(item);
|
||||
}
|
||||
});
|
||||
};
|
||||
const fnFindValueInList = (list, value) => {
|
||||
let existence = false;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].DICTIONARIES_ID === value) {
|
||||
existence = true;
|
||||
data.nameValue = list[i].NAME;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return existence;
|
||||
};
|
||||
const rules = {
|
||||
CHECK_CATEGORY_NAME: [
|
||||
{ required: true, message: "检查类别不能为空", trigger: "blur" },
|
||||
],
|
||||
CHECK_ITEM_NAME: [
|
||||
{ required: true, message: "检查项目不能为空", trigger: "blur" },
|
||||
],
|
||||
CHECK_CONTENT: [
|
||||
{ required: true, message: "检查内容不能为空", trigger: "change" },
|
||||
],
|
||||
CHECK_STANDARD: [
|
||||
{
|
||||
required: true,
|
||||
message: "检查标准不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
REFERENCE_BASIS: [
|
||||
{
|
||||
required: true,
|
||||
message: "参考依据不能为空",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
CHECK_QUALIFIED: [
|
||||
{ required: true, message: "检查合格项不能为空", trigger: "change" },
|
||||
],
|
||||
CHECK_UNQUALIFIED: [
|
||||
{ required: true, message: "检查不合格项不能为空", trigger: "blur" },
|
||||
],
|
||||
OPERATION_TYPE: [
|
||||
{ required: true, message: "操作类型不能为空", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
const fnClose = () => {
|
||||
// form.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
emits("submit", form.value);
|
||||
fnClose();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,483 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</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
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单类型" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
: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="RISKCHECKLISTTYPE">
|
||||
<el-select v-model="searchForm.RISKCHECKLISTTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
: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="LISTINGLEVEL">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</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>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
:row-key="name === 'risk' ? LISTMANAGER_ID : CUSTOM_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="人员"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="PERIODNAME"
|
||||
label="排查周期"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="SCREENTYPENAME"
|
||||
label="排查类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TYPENAME"
|
||||
label="清单类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.ISDELETE === '0'">启用</span>
|
||||
<span v-else-if="row.ISDELETE === '1'">禁用</span>
|
||||
<span v-else-if="row.ISDELETE === '-99'">未开始</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="470">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/print',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnListQRCode(row)"
|
||||
>
|
||||
清单二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
(row.cdcount === 0 &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit) &&
|
||||
row.TYPE !== 'listType0006') ||
|
||||
row.ISDELETE === '-99'
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/edit',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '0' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
name === 'risk'
|
||||
? fnDisable(row.LISTMANAGER_ID)
|
||||
: fnDisable(row.CUSTOM_ID)
|
||||
"
|
||||
>
|
||||
禁用
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '1' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
name === 'risk'
|
||||
? fnEnable(row.LISTMANAGER_ID)
|
||||
: fnEnable(row.CUSTOM_ID)
|
||||
"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/part_qr_code',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
v-if="name === 'risk'"
|
||||
>
|
||||
部位二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnInspectionRoute(row)"
|
||||
v-if="name === 'risk'"
|
||||
>
|
||||
巡检路线
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.TASK_TYPE && row.TASK_TYPE !== ''"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/insurance_coverage',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
设置包保责任类型
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path:
|
||||
name === 'risk'
|
||||
? '/hazard_investigation/inventory_management/add'
|
||||
: '/hazard_investigation/inventory_management/check_standard_add',
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="fnInheritanceList"
|
||||
v-if="name === 'risk'"
|
||||
>
|
||||
继承清单
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
<list-qr-code
|
||||
:info="data.listQrCodeDialog.info"
|
||||
v-model:visible="data.listQrCodeDialog.visible"
|
||||
/>
|
||||
<inspection-route
|
||||
v-model:visible="data.inspectionRouteDialog.visible"
|
||||
v-model:list="data.inspectionRouteDialog.list"
|
||||
:info="data.inspectionRouteDialog.info"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { reactive } from "vue";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getCustomList,
|
||||
getInventoryManagementList,
|
||||
getInventoryManagementRouteView,
|
||||
setCustomBatchBatchDelete,
|
||||
setCustomBatchDeleteTemporary,
|
||||
setCustomDisable,
|
||||
setCustomEnable,
|
||||
setInventoryManagementBatchDelete,
|
||||
setInventoryManagementBatchDeleteTemporary,
|
||||
setInventoryManagementDisable,
|
||||
setInventoryManagementEnable,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import ListQrCode from "./list_qr_code.vue";
|
||||
import InspectionRoute from "./inspection_route.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const tabName = defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
tabName.name === "risk"
|
||||
? useListData(getInventoryManagementList)
|
||||
: useListData(getCustomList);
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const buttonJurisdiction = await useButtonJurisdiction("listmanager");
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const data = reactive({
|
||||
listQrCodeDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
inspectionRouteDialog: {
|
||||
visible: false,
|
||||
list: [],
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnListQRCode = (row) => {
|
||||
data.listQrCodeDialog.visible = true;
|
||||
data.listQrCodeDialog.info = row;
|
||||
};
|
||||
const fnInspectionRoute = async (row) => {
|
||||
const resData = await getInventoryManagementRouteView({
|
||||
LISTMANAGER_ID: row.LISTMANAGER_ID,
|
||||
});
|
||||
data.inspectionRouteDialog.list = resData.varList;
|
||||
data.inspectionRouteDialog.info = row;
|
||||
data.inspectionRouteDialog.visible = true;
|
||||
};
|
||||
const fnDisable = debounce(
|
||||
1000,
|
||||
async (ID) => {
|
||||
await ElMessageBox.confirm("确定要禁用吗?", { type: "warning" });
|
||||
if (tabName.name === "risk") {
|
||||
await setInventoryManagementDisable({ ID });
|
||||
} else {
|
||||
await setCustomDisable({ ID });
|
||||
}
|
||||
ElMessage.success("禁用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnEnable = debounce(
|
||||
1000,
|
||||
async (ID) => {
|
||||
await ElMessageBox.confirm("确定要启用吗?", { type: "warning" });
|
||||
if (tabName.name === "risk") {
|
||||
await setInventoryManagementEnable({ ID });
|
||||
} else {
|
||||
await setCustomEnable({ ID });
|
||||
}
|
||||
ElMessage.success("启用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
const DATA_IDS1 = [];
|
||||
const DATA_IDS2 = [];
|
||||
selectionData.forEach((item) => {
|
||||
if (item.TYPE === "listType0006") {
|
||||
if (tabName.name === "risk") {
|
||||
DATA_IDS1.push(item.LISTMANAGER_ID);
|
||||
} else {
|
||||
DATA_IDS1.push(item.CUSTOM_ID);
|
||||
}
|
||||
} else {
|
||||
if (tabName.name === "risk") {
|
||||
DATA_IDS2.push(item.LISTMANAGER_ID);
|
||||
} else {
|
||||
DATA_IDS2.push(item.CUSTOM_ID);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (DATA_IDS1.length > 0) {
|
||||
await ElMessageBox.confirm(
|
||||
"临时清单会彻底被删除不可恢复,确定要删除吗?",
|
||||
{ type: "warning" }
|
||||
);
|
||||
if (tabName.name === "risk") {
|
||||
await setInventoryManagementBatchDeleteTemporary({
|
||||
DATA_IDS: DATA_IDS1.join(","),
|
||||
});
|
||||
} else {
|
||||
await setCustomBatchDeleteTemporary({
|
||||
DATA_IDS: DATA_IDS1.join(","),
|
||||
});
|
||||
}
|
||||
} else {
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
if (tabName.name === "risk") {
|
||||
await setInventoryManagementBatchDelete({
|
||||
DATA_IDS: DATA_IDS2.join(","),
|
||||
});
|
||||
} else {
|
||||
await setCustomBatchBatchDelete({ DATA_IDS: DATA_IDS2.join(",") });
|
||||
}
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnInheritanceList = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要继承的清单");
|
||||
return;
|
||||
}
|
||||
if (selectionData.length > 1) {
|
||||
ElMessage.warning("只能选择一个清单");
|
||||
return;
|
||||
}
|
||||
router.push({
|
||||
path: "/hazard_investigation/inventory_management/inheritance_list",
|
||||
query: {
|
||||
LISTMANAGER_ID: selectionData[0].LISTMANAGER_ID,
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
<el-dialog title="选择其他检查标准" v-model="visible" width="1500">
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="60px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查类型" prop="KEYWORDS" @change="getLevelData">
|
||||
<el-select v-model="searchForm.CHECK_CATEGORY">
|
||||
<el-option
|
||||
v-for="item in data.categoryList"
|
||||
:key="item.DICTIONARY_ID"
|
||||
:label="item.DICTIONARY_NAME"
|
||||
:value="item.DICTIONARY_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查项目" prop="DEPARTMENT_ID">
|
||||
<el-select v-model="searchForm.CHECK_ITEM">
|
||||
<el-option
|
||||
v-for="item in data.itemList"
|
||||
:key="item.DICTIONARY_ID"
|
||||
:label="item.DICTIONARY_ID"
|
||||
:value="item.DICTIONARY_NAME"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查内容">
|
||||
<el-input
|
||||
v-model="searchForm.OTHERKEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</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="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetData"
|
||||
row-key="CUSTOM_ITEM_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="CHECK_CATEGORY_NAME"
|
||||
label="检查类别"
|
||||
width="105"
|
||||
/>
|
||||
<el-table-column prop="CHECK_ITEM_NAME" label="检查项目" width="90" />
|
||||
<el-table-column prop="CHECK_CONTENT" label="检查内容" />
|
||||
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="100" />
|
||||
<el-table-column prop="CHECK_QUALIFIED" label="检查合格项" width="90" />
|
||||
<el-table-column prop="CHECK_UNQUALIFIED" label="检查不合格项" />
|
||||
<el-table-column label="操作类型">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.OPERATION_TYPE === 1">选择</span>
|
||||
<span v-if="row.OPERATION_TYPE === 2">填写</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="OPERATION_TYPE" label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<el-button type="primary" text link @click="edit(row)"
|
||||
>修改</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { getCheckstandardCommonList } from "@/request/hazard_investigation.js";
|
||||
import { reactive, watch } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { differenceWith } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
listData: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const data = reactive({
|
||||
checkStandardList: [],
|
||||
categoryList: [],
|
||||
itemList: [],
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "submit"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getCheckstandardCommonList, {
|
||||
immediate: false,
|
||||
clearSelection: false,
|
||||
});
|
||||
// const fnCheckStandard = async () => {
|
||||
// const list = await layoutFnGetCheckStandard();
|
||||
// data.checkStandardList = list;
|
||||
// list.forEach((item) => {
|
||||
// if (item.PARENT_ID === "0") {
|
||||
// data.categoryList.push(item);
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// fnCheckStandard();
|
||||
const getLevelData = () => {
|
||||
data.checkStandardList.forEach((item) => {
|
||||
if (
|
||||
item.PARENT_ID !== "0" &&
|
||||
item.PARENT_IDS.contains(searchForm.CHECK_CATEGORY)
|
||||
) {
|
||||
this.itemList.push(item);
|
||||
}
|
||||
});
|
||||
};
|
||||
const stop = watch(
|
||||
() => props.visible,
|
||||
(value) => {
|
||||
if (value) {
|
||||
fnGetData();
|
||||
stop && stop();
|
||||
}
|
||||
}
|
||||
);
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
() => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
const listData = differenceWith(selectionData, props.listData);
|
||||
fnClose();
|
||||
emits("submit", listData);
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,385 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row
|
||||
>{{ name }}
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</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
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单类型" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
: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="RISKCHECKLISTTYPE">
|
||||
<el-select v-model="searchForm.RISKCHECKLISTTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
: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="LISTINGLEVEL">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</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>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
:row-key="CUSTOM_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="人员"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="PERIODNAME"
|
||||
label="排查周期"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="SCREENTYPENAME"
|
||||
label="排查类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TYPENAME"
|
||||
label="清单类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.ISDELETE === '0'">启用</span>
|
||||
<span v-else-if="row.ISDELETE === '1'">禁用</span>
|
||||
<span v-else-if="row.ISDELETE === '-99'">未开始</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="470">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/print',
|
||||
query: { CUSTOM_ID: row.CUSTOM_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnListQRCode(row)"
|
||||
>
|
||||
清单二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
(row.cdcount === 0 &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit) &&
|
||||
row.TYPE !== 'listType0006') ||
|
||||
row.ISDELETE === '-99'
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/edit',
|
||||
query: { CUSTOM_ID: row.CUSTOM_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '0' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDisable(row.CUSTOM_ID)"
|
||||
>
|
||||
禁用
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '1' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnEnable(row.CUSTOM_ID)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.TASK_TYPE && row.TASK_TYPE !== ''"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/insurance_coverage',
|
||||
query: { CUSTOM_ID: row.CUSTOM_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
设置包保责任类型
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path:
|
||||
name === 'risk'
|
||||
? '/hazard_investigation/inventory_management/add'
|
||||
: '/hazard_investigation/inventory_management/check_standard_add',
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
<list-qr-code
|
||||
:info="data.listQrCodeDialog.info"
|
||||
v-model:visible="data.listQrCodeDialog.visible"
|
||||
/>
|
||||
<inspection-route
|
||||
v-model:visible="data.inspectionRouteDialog.visible"
|
||||
v-model:list="data.inspectionRouteDialog.list"
|
||||
:info="data.inspectionRouteDialog.info"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { reactive } from "vue";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getInventoryManagementList,
|
||||
setCustomBatchBatchDelete,
|
||||
setCustomBatchDeleteTemporary,
|
||||
setCustomDisable,
|
||||
setCustomEnable,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import ListQrCode from "./list_qr_code.vue";
|
||||
import InspectionRoute from "./inspection_route.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getInventoryManagementList);
|
||||
// getCustomList
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const buttonJurisdiction = await useButtonJurisdiction("listmanager");
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const data = reactive({
|
||||
listQrCodeDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
inspectionRouteDialog: {
|
||||
visible: false,
|
||||
list: [],
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnListQRCode = (row) => {
|
||||
data.listQrCodeDialog.visible = true;
|
||||
data.listQrCodeDialog.info = row;
|
||||
};
|
||||
const fnDisable = debounce(
|
||||
1000,
|
||||
async (ID) => {
|
||||
await ElMessageBox.confirm("确定要禁用吗?", { type: "warning" });
|
||||
await setCustomDisable({ ID });
|
||||
ElMessage.success("禁用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnEnable = debounce(
|
||||
1000,
|
||||
async (ID) => {
|
||||
await ElMessageBox.confirm("确定要启用吗?", { type: "warning" });
|
||||
await setCustomEnable({ ID });
|
||||
ElMessage.success("启用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
const DATA_IDS1 = [];
|
||||
const DATA_IDS2 = [];
|
||||
selectionData.forEach((item) => {
|
||||
if (item.TYPE === "listType0006") {
|
||||
DATA_IDS1.push(item.CUSTOM_ID);
|
||||
DATA_IDS2.push(item.CUSTOM_ID);
|
||||
}
|
||||
});
|
||||
if (DATA_IDS1.length > 0) {
|
||||
await ElMessageBox.confirm(
|
||||
"临时清单会彻底被删除不可恢复,确定要删除吗?",
|
||||
{ type: "warning" }
|
||||
);
|
||||
await setCustomBatchDeleteTemporary({
|
||||
DATA_IDS: DATA_IDS1.join(","),
|
||||
});
|
||||
} else {
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
await setCustomBatchBatchDelete({ DATA_IDS: DATA_IDS2.join(",") });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -1,423 +1,37 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</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
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单类型" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
: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="RISKCHECKLISTTYPE">
|
||||
<el-select v-model="searchForm.RISKCHECKLISTTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
: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="LISTINGLEVEL">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</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
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
row-key="LISTMANAGER_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="人员"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="PERIODNAME"
|
||||
label="排查周期"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="SCREENTYPENAME"
|
||||
label="排查类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TYPENAME"
|
||||
label="清单类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.ISDELETE === '0'">启用</span>
|
||||
<span v-else-if="row.ISDELETE === '1'">禁用</span>
|
||||
<span v-else-if="row.ISDELETE === '-99'">未开始</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="470">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/print',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnListQRCode(row)"
|
||||
>
|
||||
清单二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
(row.cdcount === 0 &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit) &&
|
||||
row.TYPE !== 'listType0006') ||
|
||||
row.ISDELETE === '-99'
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/edit',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '0' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDisable(row.LISTMANAGER_ID)"
|
||||
>
|
||||
禁用
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '1' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnEnable(row.LISTMANAGER_ID)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/part_qr_code',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
部位二维码
|
||||
</el-button>
|
||||
<el-button type="primary" text link @click="fnInspectionRoute(row)">
|
||||
巡检路线
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.TASK_TYPE && row.TASK_TYPE !== ''"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/insurance_coverage',
|
||||
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
设置包保责任类型
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/hazard_investigation/inventory_management/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
<el-button type="primary" @click="fnInheritanceList">
|
||||
继承清单
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<list-qr-code
|
||||
:info="data.listQrCodeDialog.info"
|
||||
v-model:visible="data.listQrCodeDialog.visible"
|
||||
/>
|
||||
<inspection-route
|
||||
v-model:visible="data.inspectionRouteDialog.visible"
|
||||
v-model:list="data.inspectionRouteDialog.list"
|
||||
:info="data.inspectionRouteDialog.info"
|
||||
/>
|
||||
</div>
|
||||
<layout-card>
|
||||
<el-tabs v-model="name" @tab-change="fnTabChange">
|
||||
<el-tab-pane label="风险管控清单" name="risk" lazy>
|
||||
<list name="risk" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="隐患排查清单" name="checkStandard" lazy>
|
||||
<list name="checkStandard" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { reactive } from "vue";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getInventoryManagementList,
|
||||
getInventoryManagementRouteView,
|
||||
setInventoryManagementBatchDelete,
|
||||
setInventoryManagementBatchDeleteTemporary,
|
||||
setInventoryManagementDisable,
|
||||
setInventoryManagementEnable,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import ListQrCode from "./components/list_qr_code.vue";
|
||||
import InspectionRoute from "./components/inspection_route.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
import List from "./components/list.vue";
|
||||
import { useRouter, useRoute, onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getInventoryManagementList);
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const buttonJurisdiction = await useButtonJurisdiction("listmanager");
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const data = reactive({
|
||||
listQrCodeDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
inspectionRouteDialog: {
|
||||
visible: false,
|
||||
list: [],
|
||||
info: {},
|
||||
},
|
||||
const route = useRoute();
|
||||
const defaultName = "risk";
|
||||
const name = ref(route.query.name || defaultName);
|
||||
onBeforeRouteUpdate((to, from, next) => {
|
||||
name.value = to.query.name || defaultName;
|
||||
next();
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnListQRCode = (row) => {
|
||||
data.listQrCodeDialog.visible = true;
|
||||
data.listQrCodeDialog.info = row;
|
||||
};
|
||||
const fnInspectionRoute = async (row) => {
|
||||
const resData = await getInventoryManagementRouteView({
|
||||
LISTMANAGER_ID: row.LISTMANAGER_ID,
|
||||
});
|
||||
data.inspectionRouteDialog.list = resData.varList;
|
||||
data.inspectionRouteDialog.info = row;
|
||||
data.inspectionRouteDialog.visible = true;
|
||||
};
|
||||
const fnDisable = debounce(
|
||||
1000,
|
||||
async (LISTMANAGER_ID) => {
|
||||
await ElMessageBox.confirm("确定要禁用吗?", { type: "warning" });
|
||||
await setInventoryManagementDisable({ LISTMANAGER_ID });
|
||||
ElMessage.success("禁用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnEnable = debounce(
|
||||
1000,
|
||||
async (LISTMANAGER_ID) => {
|
||||
await ElMessageBox.confirm("确定要启用吗?", { type: "warning" });
|
||||
await setInventoryManagementEnable({ LISTMANAGER_ID });
|
||||
ElMessage.success("启用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
const DATA_IDS1 = [];
|
||||
const DATA_IDS2 = [];
|
||||
selectionData.forEach((item) => {
|
||||
if (item.TYPE === "listType0006") {
|
||||
DATA_IDS1.push(item.LISTMANAGER_ID);
|
||||
} else {
|
||||
DATA_IDS2.push(item.LISTMANAGER_ID);
|
||||
}
|
||||
});
|
||||
if (DATA_IDS1.length > 0) {
|
||||
await ElMessageBox.confirm(
|
||||
"临时清单会彻底被删除不可恢复,确定要删除吗?",
|
||||
{ type: "warning" }
|
||||
);
|
||||
await setInventoryManagementBatchDeleteTemporary({
|
||||
DATA_IDS: DATA_IDS1.join(","),
|
||||
});
|
||||
} else {
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
await setInventoryManagementBatchDelete({ DATA_IDS: DATA_IDS2.join(",") });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnInheritanceList = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要继承的清单");
|
||||
return;
|
||||
}
|
||||
if (selectionData.length > 1) {
|
||||
ElMessage.warning("只能选择一个清单");
|
||||
return;
|
||||
}
|
||||
router.push({
|
||||
path: "/hazard_investigation/inventory_management/inheritance_list",
|
||||
const fnTabChange = (name) => {
|
||||
router.replace({
|
||||
path: "/hazard_investigation/inventory_management",
|
||||
query: {
|
||||
LISTMANAGER_ID: selectionData[0].LISTMANAGER_ID,
|
||||
name,
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
@ -15,6 +15,14 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单种类" prop="KEYWORDS">
|
||||
<el-select v-model="searchForm.LIST_TYPE">
|
||||
<el-option label="风险管控清单" value="1" />
|
||||
<el-option label="隐患排查清单" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
|
@ -91,6 +99,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="list_type" label="清单种类">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.list_type === '1'">风险管控清单</span>
|
||||
<span v-if="row.list_type === '2'">隐患排查清单</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
|
@ -124,7 +138,7 @@
|
|||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnInspect(row.LISTMANAGER_ID)"
|
||||
@click="fnInspect(row.LISTMANAGER_ID, row.list_type)"
|
||||
>
|
||||
开始检查
|
||||
</el-button>
|
||||
|
@ -143,14 +157,14 @@ import {
|
|||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetTroubleshootingCycle,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { getInventoryTroubleshootingList } from "@/request/hazard_investigation.js";
|
||||
import { getRiskStandardList } from "@/request/hazard_investigation.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
||||
const router = useRouter();
|
||||
let ISREST = "";
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getInventoryTroubleshootingList, {
|
||||
useListData(getRiskStandardList, {
|
||||
callbackFn: (list, resData) => {
|
||||
ISREST = resData.ISREST;
|
||||
},
|
||||
|
@ -167,14 +181,17 @@ const fnResetPaginationTransfer = () => {
|
|||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnInspect = (LISTMANAGER_ID) => {
|
||||
const fnInspect = (ID, LIST_TYPE) => {
|
||||
if (ISREST === "1") {
|
||||
ElMessageBox.alert("您处于离岗状态,无需检查清单");
|
||||
return;
|
||||
}
|
||||
router.push({
|
||||
path: "/hazard_investigation/inventory_troubleshooting/inspect",
|
||||
query: { LISTMANAGER_ID },
|
||||
path:
|
||||
LIST_TYPE === "1"
|
||||
? "/hazard_investigation/inventory_troubleshooting/inspect"
|
||||
: "/hazard_investigation/inventory_troubleshooting/standard_inspect",
|
||||
query: { ID },
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,531 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-divider content-position="left">清单信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="清单名称">
|
||||
{{ info.NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="排查清单类型">
|
||||
{{ info.SCREENTYPENAME }}
|
||||
</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.TYPE === 'listType0006'"
|
||||
>
|
||||
{{ info.START_DATE }} - {{ info.END_DATE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="包保责任人" v-if="info.BAO_BAO_TYPE === '1'">
|
||||
{{ info.USER_NAME }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="left">检查内容</el-divider>
|
||||
<layout-table :data="inspectionList" :show-pagination="false">
|
||||
<el-table-column label="序号" width="70" type="index" />
|
||||
<el-table-column prop="CHECK_CATEGORY_NAME" label="检查类别" />
|
||||
<el-table-column prop="CHECK_ITEM_NAME" label="检查项目" />
|
||||
<el-table-column prop="CHECK_CONTENT" label="检查内容" />
|
||||
<el-table-column prop="CHECK_STANDARD" label="检查标准" />
|
||||
<el-table-column prop="CHECK_QUALIFIED" label="检查合格项" />
|
||||
<el-table-column prop="CHECK_UNQUALIFIED" label="检查不合格项" />
|
||||
<el-table-column label="操作类型">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.OPERATION_TYPE === 1">选择</span>
|
||||
<span v-if="row.OPERATION_TYPE === 2">填写</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="280">
|
||||
<template v-slot="{ row, $index }">
|
||||
<el-radio-group
|
||||
v-if="data.canDoCheck"
|
||||
:disabled="row.HASHIDDEN > 0"
|
||||
v-model="row.ISNORMAL"
|
||||
>
|
||||
<el-radio
|
||||
:label="0"
|
||||
:disabled="!data.canDoCheck"
|
||||
@click.prevent="fnQualified($index, row)"
|
||||
>
|
||||
合格
|
||||
<el-tooltip
|
||||
content="注意:补录时,不允许添加隐患"
|
||||
placement="top"
|
||||
v-if="entrance === 'supplementaryRecording'"
|
||||
>
|
||||
<el-icon><warning-filled /></el-icon>
|
||||
</el-tooltip>
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:label="1"
|
||||
:disabled="entrance === 'supplementaryRecording'"
|
||||
@click.prevent="fnUnqualified($index, row)"
|
||||
>
|
||||
不合格
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:label="2"
|
||||
:disabled="entrance === 'supplementaryRecording'"
|
||||
@click.prevent="fnNotInvolved($index, row)"
|
||||
>
|
||||
不涉及
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
<el-divider content-position="left">其他隐患</el-divider>
|
||||
<div class="tr mb-10">
|
||||
<el-button
|
||||
v-if="data.canDoCheck"
|
||||
type="primary"
|
||||
@click="fnAddOrEditOtherHidden({}, 'add')"
|
||||
:disabled="entrance === 'supplementaryRecording'"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button disabled v-else type="primary">添加</el-button>
|
||||
</div>
|
||||
<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="280">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="data.canDoCheck"
|
||||
text
|
||||
link
|
||||
@click="fnAddOrEditOtherHidden(row, 'edit')"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="data.canDoCheck"
|
||||
text
|
||||
link
|
||||
@click="fnDeleteOtherHidden(row.HIDDEN_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查时间" prop="CHECK_TIME">
|
||||
<el-date-picker
|
||||
v-model="data.form.CHECK_TIME"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="这里输入检查时间"
|
||||
:disabled-date="fnDisabledDate"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template
|
||||
v-for="(item, index) in data.form.inspectedList"
|
||||
:key="item.id"
|
||||
>
|
||||
<el-col :span="11">
|
||||
<el-form-item
|
||||
label="检查部门"
|
||||
:prop="'inspectedList.' + index + '.DEPARTMENT_ID'"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: '请选择检查部门',
|
||||
trigger: 'change',
|
||||
}"
|
||||
>
|
||||
<layout-department
|
||||
v-model="item.DEPARTMENT_ID"
|
||||
@update:model-value="fnInspectDepartmentChange($event, index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item
|
||||
label="检查人"
|
||||
:prop="'inspectedList.' + index + '.USER_ID'"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: '请选择检查人',
|
||||
trigger: 'change',
|
||||
}"
|
||||
>
|
||||
<el-select
|
||||
:model-value="item.USER_ID"
|
||||
@change="
|
||||
verifyDuplicateSelection(
|
||||
data.form.inspectedList,
|
||||
index,
|
||||
'USER_ID',
|
||||
$event
|
||||
)
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in item.userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button
|
||||
:disabled="!data.canDoCheck"
|
||||
type="primary"
|
||||
v-if="index === 0"
|
||||
@click="fnAddInspectedList"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="!data.canDoCheck"
|
||||
type="danger"
|
||||
v-if="index !== 0"
|
||||
@click="data.form.inspectedList.splice(index, 1)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="24" v-if="entrance === 'supplementaryRecording'">
|
||||
<el-form-item label="补录原因" prop="REASON">
|
||||
<el-input v-model="data.form.REASON" type="textarea" autosize />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="DESCR">
|
||||
<el-input
|
||||
v-model="data.form.DESCR"
|
||||
type="textarea"
|
||||
:autosize="{
|
||||
minRows: 3,
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button :disabled="!data.canDoCheck" type="primary" @click="fnSubmit"
|
||||
>保存</el-button
|
||||
>
|
||||
</div>
|
||||
<qualified
|
||||
v-model:visible="data.qualifiedDialog.visible"
|
||||
v-model:form="data.qualifiedDialog.form"
|
||||
:id="data.qualifiedDialog.RECORDITEM_ID"
|
||||
/>
|
||||
<!-- <un-qualified-->
|
||||
<!-- v-model:visible="data.unQualifiedDialog.visible"-->
|
||||
<!-- v-model:form="data.unQualifiedDialog.form"-->
|
||||
<!-- :type="data.unQualifiedDialog.type"-->
|
||||
<!-- :hidden-type="data.unQualifiedDialog.hiddenType"-->
|
||||
<!-- :custom-id="CUSTOM_ID"-->
|
||||
<!-- :info="{ ...data.unQualifiedDialog.info, ...info.value }"-->
|
||||
<!-- :longitude="data.longitude"-->
|
||||
<!-- :latitude="data.latitude"-->
|
||||
<!-- @submit="fnHiddenSubmit"-->
|
||||
<!-- />-->
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick, onMounted, reactive, ref } from "vue";
|
||||
import {
|
||||
getCheckStandardOtherHiddenList,
|
||||
getHiddenDangerView,
|
||||
setHiddenDangerDelete,
|
||||
getCheckStandardManagementView,
|
||||
setCheckStandardSupplementaryRecordingSubmit,
|
||||
setCheckStandardSubmit,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import {
|
||||
addingPrefixToFile,
|
||||
getFileSuffix,
|
||||
verifyDuplicateSelection,
|
||||
} from "@/assets/js/utils.js";
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
import { getViewImg } from "@/request/api.js";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import Qualified from "./components/qualified.vue";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { WarningFilled } from "@element-plus/icons-vue";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { ID, CHECKRECORD_ID, DATEEND, DATESTART } = route.query;
|
||||
const props = defineProps({
|
||||
entrance: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const rules = {
|
||||
CHECK_TIME: [
|
||||
{ required: true, message: "请选择检查时间", trigger: "change" },
|
||||
],
|
||||
REASON: [{ required: true, message: "请输入补录原因", trigger: "blur" }],
|
||||
};
|
||||
const formRef = ref(null);
|
||||
const info = ref({});
|
||||
const data = reactive({
|
||||
longitude: 0,
|
||||
latitude: 0,
|
||||
// 是否可以清单排查
|
||||
canDoCheck: true,
|
||||
form: {
|
||||
CHECK_TIME: "",
|
||||
REASON: "",
|
||||
inspectedList: [],
|
||||
},
|
||||
qualifiedDialog: {
|
||||
visible: false,
|
||||
RECORDITEM_ID: "",
|
||||
form: { file: [] },
|
||||
},
|
||||
unQualifiedDialog: {
|
||||
visible: false,
|
||||
type: "",
|
||||
index: "",
|
||||
hiddenType: "",
|
||||
info: {},
|
||||
form: {
|
||||
HIDDENPART: "",
|
||||
HIDDENDESCR: "",
|
||||
HIDDENLEVEL: "",
|
||||
HIDDEN_CATEGORY: "",
|
||||
HIDDENTYPE: [],
|
||||
hiddenImgs: [],
|
||||
videoFiles: [],
|
||||
RECTIFICATIONTYPE: "2",
|
||||
RECTIFYDESCR: "",
|
||||
rectifyImgs: [],
|
||||
RECTIFICATIONDEADLINE: "",
|
||||
RECTIFICATIONDEPT: "",
|
||||
RECTIFICATIONOR: "",
|
||||
},
|
||||
},
|
||||
});
|
||||
const { list: inspectionList } = useListData(getCheckStandardManagementView, {
|
||||
otherParams: { ID },
|
||||
usePagination: false,
|
||||
callbackFn: (list, resData) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].HASHIDDEN <= 0) list[i].ISNORMAL = 0;
|
||||
if (list[i].ELECTRONIC_FENCE_ID) {
|
||||
// 存在电子围栏禁止清单排查
|
||||
data.canDoCheck = false;
|
||||
}
|
||||
}
|
||||
info.value = resData.pd;
|
||||
},
|
||||
});
|
||||
const { list: otherHiddenList, fnGetData: fnGetOtherHidden } = useListData(
|
||||
getCheckStandardOtherHiddenList,
|
||||
{
|
||||
otherParams: { ID },
|
||||
usePagination: false,
|
||||
key: "hiddenList",
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
const geolocation = new window.BMapGL.Geolocation();
|
||||
geolocation.getCurrentPosition(async (r) => {
|
||||
if (!r) {
|
||||
await ElMessageBox.alert("获取位置信息失败,请刷新重试", {
|
||||
type: "warning",
|
||||
});
|
||||
window.location.reload();
|
||||
}
|
||||
data.longitude = r.longitude;
|
||||
data.latitude = r.latitude;
|
||||
});
|
||||
});
|
||||
const fnDisabledDate = (time) => {
|
||||
if (DATEEND && DATESTART)
|
||||
return (
|
||||
time.getTime() > new Date(DATEEND).getTime() ||
|
||||
time.getTime() < new Date(DATESTART).getTime()
|
||||
);
|
||||
else return false;
|
||||
};
|
||||
const fnQualified = async (index, row) => {
|
||||
if (row.HASHIDDEN > 0) return;
|
||||
data.qualifiedDialog.visible = true;
|
||||
await nextTick();
|
||||
data.qualifiedDialog.RECORDITEM_ID = row.RECORDITEM_ID;
|
||||
if (row.ISNORMAL === 1) fnRemoveUnqualified(index);
|
||||
else if (row.ISNORMAL !== 1) {
|
||||
const resData = await getViewImg({
|
||||
FOREIGN_KEY: row.RECORDITEM_ID,
|
||||
TYPE: "14",
|
||||
});
|
||||
data.qualifiedDialog.form.file = addingPrefixToFile(resData.imgs);
|
||||
}
|
||||
inspectionList.value[index].ISNORMAL = 0;
|
||||
};
|
||||
const fnNotInvolved = (index, row) => {
|
||||
if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return;
|
||||
fnRemoveUnqualified(index);
|
||||
inspectionList.value[index].ISNORMAL = 2;
|
||||
};
|
||||
const fnRemoveUnqualified = (index) => {
|
||||
inspectionList.value[index].HIDDEN_ID = "";
|
||||
};
|
||||
const fnUnqualified = async (index, row) => {
|
||||
if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return;
|
||||
data.unQualifiedDialog.visible = true;
|
||||
await nextTick();
|
||||
if (
|
||||
inspectionList.value[index].ISNORMAL === 0 ||
|
||||
inspectionList.value[index].ISNORMAL === 2
|
||||
)
|
||||
data.unQualifiedDialog.type = "add";
|
||||
else if (inspectionList.value[index].ISNORMAL === 1) {
|
||||
data.unQualifiedDialog.type = "edit";
|
||||
await fnGetHiddenDangerView(inspectionList.value[index].HIDDEN_ID);
|
||||
}
|
||||
data.unQualifiedDialog.info = row;
|
||||
data.unQualifiedDialog.index = index;
|
||||
data.unQualifiedDialog.hiddenType = "unqualified";
|
||||
};
|
||||
const fnGetHiddenDangerView = async (HIDDEN_ID) => {
|
||||
const resData = await getHiddenDangerView({
|
||||
HIDDEN_ID,
|
||||
});
|
||||
data.unQualifiedDialog.form = resData.pd;
|
||||
const HIDDENTYPE = [];
|
||||
const videoFiles = [];
|
||||
const hiddenImgs = [];
|
||||
for (let i = 0; i < resData.hImgs.length; i++) {
|
||||
if (getFileSuffix(resData.hImgs[i].FILEPATH) === "mp4")
|
||||
videoFiles.push(...addingPrefixToFile([resData.hImgs[i]]));
|
||||
else hiddenImgs.push(...addingPrefixToFile([resData.hImgs[i]]));
|
||||
}
|
||||
data.unQualifiedDialog.form.videoFiles = videoFiles;
|
||||
data.unQualifiedDialog.form.hiddenImgs = hiddenImgs;
|
||||
data.unQualifiedDialog.form.rectifyImgs = addingPrefixToFile(resData.rImgs);
|
||||
if (resData.pd.HIDDENTYPE1) HIDDENTYPE.push(resData.pd.HIDDENTYPE1);
|
||||
if (resData.pd.HIDDENTYPE2) HIDDENTYPE.push(resData.pd.HIDDENTYPE2);
|
||||
if (resData.pd.HIDDENTYPE3) HIDDENTYPE.push(resData.pd.HIDDENTYPE3);
|
||||
data.unQualifiedDialog.form.HIDDENTYPE = HIDDENTYPE;
|
||||
};
|
||||
// const fnHiddenSubmit = (currentHiddenId) => {
|
||||
// const { hiddenType, index } = data.unQualifiedDialog;
|
||||
// if (hiddenType === "unqualified") {
|
||||
// inspectionList.value[index].ISNORMAL = 1;
|
||||
// inspectionList.value[index].HIDDEN_ID = currentHiddenId;
|
||||
// }
|
||||
// if (hiddenType === "otherHidden") {
|
||||
// fnGetOtherHidden();
|
||||
// }
|
||||
// };
|
||||
const fnAddInspectedList = () => {
|
||||
data.form.inspectedList.push({
|
||||
id: Math.random(),
|
||||
DEPARTMENT_ID: "",
|
||||
USER_ID: "",
|
||||
userList: [],
|
||||
});
|
||||
};
|
||||
fnAddInspectedList();
|
||||
const fnInspectDepartmentChange = async (event, index) => {
|
||||
data.form.inspectedList[index].USER_ID = "";
|
||||
const resData = await getUserListAll({
|
||||
DEPARTMENT_ID: event,
|
||||
NOMAIN: "1",
|
||||
});
|
||||
data.form.inspectedList[index].userList = resData.userList;
|
||||
};
|
||||
const fnDeleteOtherHidden = async (HIDDEN_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
await setHiddenDangerDelete({ HIDDEN_ID });
|
||||
fnGetOtherHidden();
|
||||
};
|
||||
const fnAddOrEditOtherHidden = async (row, type) => {
|
||||
data.unQualifiedDialog.visible = true;
|
||||
await nextTick();
|
||||
data.unQualifiedDialog.type = type;
|
||||
data.unQualifiedDialog.info = row;
|
||||
data.unQualifiedDialog.hiddenType = "otherHidden";
|
||||
if (type === "edit") await fnGetHiddenDangerView(row.HIDDEN_ID);
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
const items = [];
|
||||
const ids = [];
|
||||
for (let i = 0; i < inspectionList.value.length; i++) {
|
||||
const item = {};
|
||||
item.CUSTOM_ITEM_ID = inspectionList.value[i].CUSTOM_ITEM_ID;
|
||||
item.ISNORMAL = inspectionList.value[i].ISNORMAL;
|
||||
item.RECORDITEM_ID = inspectionList.value[i].RECORDITEM_ID;
|
||||
items.push(item);
|
||||
if (inspectionList.value[i].ISNORMAL === 1)
|
||||
ids.push(inspectionList.value[i].HIDDEN_ID);
|
||||
}
|
||||
const inspectedList = cloneDeep(data.form.inspectedList);
|
||||
if (inspectedList.length > 0) inspectedList.splice(0, 1);
|
||||
const params = {
|
||||
ID,
|
||||
LIST_NAME: info.value.NAME,
|
||||
CHECK_TIME: data.form.CHECK_TIME,
|
||||
DESCR: data.form.DESCR,
|
||||
ITEMS: JSON.stringify(items),
|
||||
IDS: ids.join(","),
|
||||
CHECKDEPT: data.form.inspectedList[0].DEPARTMENT_ID,
|
||||
CHECKOR: data.form.inspectedList[0].USER_ID,
|
||||
OTHER: JSON.stringify(inspectedList),
|
||||
LONGITUDE: data.longitude,
|
||||
LATITUDE: data.latitude,
|
||||
};
|
||||
if (props.entrance === "supplementaryRecording") {
|
||||
params.REASON = data.form.REASON;
|
||||
params.CHECKRECORD_ID = CHECKRECORD_ID;
|
||||
await setCheckStandardSupplementaryRecordingSubmit(params);
|
||||
} else await setCheckStandardSubmit(params);
|
||||
ElMessage.success("操作成功");
|
||||
router.back();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,258 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="180px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查题目" prop="INSPECTION_SUBJECT">
|
||||
<el-radio-group v-model="data.form.INSPECTION_SUBJECT">
|
||||
<el-radio label="安全">安全</el-radio>
|
||||
<el-radio label="环保">环保</el-radio>
|
||||
<el-radio label="综合">综合</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="data.form.INSPECTED_DEPARTMENT_ID"
|
||||
@update:model-value="fnInspectedDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="被检查单位现场负责人"
|
||||
prop="INSPECTED_SITEUSER_ID"
|
||||
>
|
||||
<el-select v-model="data.form.INSPECTED_SITEUSER_ID">
|
||||
<el-option
|
||||
v-for="item in data.inspectedSiteUserList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查场所" prop="INSPECTION_PLACE">
|
||||
<el-input v-model="data.form.INSPECTION_PLACE" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查人意见" prop="INSPECTION_USER_OPINION">
|
||||
<el-input
|
||||
v-model="data.form.INSPECTION_USER_OPINION"
|
||||
:autosize="{ minRows: 3 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查人" prop="INSPECTION_USER_SIGN_IMG">
|
||||
<layout-sign v-model="data.form.INSPECTION_USER_SIGN_IMG" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检查类型" prop="INSPECTION_TYPE">
|
||||
<layout-inspection-type v-model="data.form.INSPECTION_TYPE" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检查开始时间" prop="INSPECTION_TIME_START">
|
||||
<el-date-picker
|
||||
v-model="data.form.INSPECTION_TIME_START"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
type="datetime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检查结束时间" prop="INSPECTION_TIME_END">
|
||||
<el-date-picker
|
||||
v-model="data.form.INSPECTION_TIME_END"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
type="datetime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="left">检查人员</el-divider>
|
||||
</el-col>
|
||||
<el-col :span="24" class="tr mb-10">
|
||||
<el-button type="primary" @click="fnAddInspectorList">
|
||||
添加检查人员
|
||||
</el-button>
|
||||
</el-col>
|
||||
<template
|
||||
v-for="(item, index) in data.form.inspectorList"
|
||||
:key="item.id"
|
||||
>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="检查人员部门" prop="INSPECTION_DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="item.INSPECTION_DEPARTMENT_ID"
|
||||
@update:model-value="
|
||||
fnInspectionDepartmentChange($event, index)
|
||||
"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="检查人员" prop="INSPECTION_USER_ID">
|
||||
<div
|
||||
style="
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
"
|
||||
>
|
||||
<el-select v-model="item.INSPECTION_USER_ID">
|
||||
<el-option
|
||||
v-for="data in item.inspectionUserList"
|
||||
:key="data.USER_ID"
|
||||
:label="data.NAME"
|
||||
:value="data.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
v-if="index !== 0"
|
||||
type="danger"
|
||||
class="ml-10"
|
||||
@click="data.form.inspectorList.splice(index, 1)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="left">检查情况</el-divider>
|
||||
</el-col>
|
||||
<el-col :span="24" class="tr mb-10">
|
||||
<el-button type="primary" @click="fnAddSituationList">
|
||||
添加检查情况
|
||||
</el-button>
|
||||
</el-col>
|
||||
<template
|
||||
v-for="(item, index) in data.form.situationList"
|
||||
:key="item.id"
|
||||
>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="检查情况" prop="SITUATION">
|
||||
<div
|
||||
style="
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.SITUATION"
|
||||
:autosize="{ minRows: 3 }"
|
||||
type="textarea"
|
||||
/>
|
||||
<el-button
|
||||
v-if="index !== 0"
|
||||
class="ml-10"
|
||||
type="danger"
|
||||
@click="data.form.situationList.splice(index, 1)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="left">发现问题</el-divider>
|
||||
</el-col>
|
||||
<el-col :span="24" class="tr mb-10">
|
||||
<el-button type="primary"> 添加发现问题 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<layout-table :data="data.form.hiddenList" :show-pagination="false">
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
</layout-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, watchEffect } from "vue";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutSign from "@/components/sign/index.vue";
|
||||
import { getUserListAll } from "@/request/data_dictionary.js";
|
||||
import LayoutInspectionType from "@/components/inspection_type/index.vue";
|
||||
|
||||
const rules = {};
|
||||
const formRef = ref(null);
|
||||
const data = reactive({
|
||||
form: {
|
||||
INSPECTION_SUBJECT: "安全",
|
||||
INSPECTED_DEPARTMENT_ID: "",
|
||||
INSPECTED_SITEUSER_ID: "",
|
||||
INSPECTION_PLACE: "",
|
||||
INSPECTION_USER_OPINION: "",
|
||||
INSPECTION_USER_SIGN_IMG: "",
|
||||
INSPECTION_TYPE: "",
|
||||
INSPECTION_TIME_START: "",
|
||||
INSPECTION_TIME_END: "",
|
||||
inspectorList: [],
|
||||
situationList: [],
|
||||
hiddenList: [],
|
||||
},
|
||||
inspectedSiteUserList: [],
|
||||
});
|
||||
const fnAddInspectorList = () => {
|
||||
data.form.inspectorList.push({
|
||||
INSPECTION_DEPARTMENT_ID: "",
|
||||
INSPECTION_USER_ID: "",
|
||||
inspectionUserList: [],
|
||||
id: Math.random(),
|
||||
});
|
||||
};
|
||||
fnAddInspectorList();
|
||||
const fnAddSituationList = () => {
|
||||
data.form.situationList.push({
|
||||
SITUATION: "",
|
||||
id: Math.random(),
|
||||
});
|
||||
};
|
||||
fnAddSituationList();
|
||||
const fnInspectedDepartmentChange = () => {
|
||||
data.inspectedSiteUserList.value = [];
|
||||
data.form.INSPECTED_SITEUSER_ID = "";
|
||||
};
|
||||
const fnGetInspectedSitUserList = async (DEPARTMENT_ID) => {
|
||||
const { userList } = await getUserListAll({ DEPARTMENT_ID });
|
||||
data.inspectedSiteUserList.value = userList;
|
||||
};
|
||||
const fnInspectionDepartmentChange = (value, index) => {
|
||||
data.form.inspectorList[index].INSPECTION_USER_ID = "";
|
||||
data.form.inspectorList[index].inspectionUserList = [];
|
||||
fnGetInspectionSitUserList(value, index);
|
||||
};
|
||||
const fnGetInspectionSitUserList = async (DEPARTMENT_ID, index) => {
|
||||
const { userList } = await getUserListAll({ DEPARTMENT_ID });
|
||||
data.form.inspectorList[index].inspectionUserList = userList;
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (data.form.INSPECTED_DEPARTMENT_ID)
|
||||
fnGetInspectedSitUserList(data.form.INSPECTED_DEPARTMENT_ID);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,126 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="申辩处理" :on-close="fnClose">
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="130px">
|
||||
<el-form-item label="申辩人">
|
||||
<img
|
||||
v-viewer
|
||||
:src="VITE_FILE_URL + info.INSPECTED_SITEUSER_SIGN_IMG"
|
||||
style="width: 100px; height: 100px"
|
||||
alt=""
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申辩时间">
|
||||
<el-input :model-value="info.INSPECTED_SITEUSER_SIGN_TIME" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="申辩说明">
|
||||
<el-input
|
||||
:model-value="info.INSPECTED_EXPLAIN"
|
||||
disabled
|
||||
type="textarea"
|
||||
autosize
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申辩附件" v-if="info.INSPECTED_EXPLAIN_FILEPATH">
|
||||
<el-input :model-value="info.INSPECTED_EXPLAIN_FILENAME" disabled />
|
||||
<el-button type="primary" @click="fnDownloadFile(info.INSPECTION_ID)">
|
||||
下载
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="申辩是否成立" prop="INSPECTION_STATUS">
|
||||
<el-radio v-model="form.INSPECTION_STATUS" label="3">否</el-radio>
|
||||
<el-radio v-model="form.INSPECTION_STATUS" label="-2">是</el-radio>
|
||||
</el-form-item>
|
||||
<template v-if="form.INSPECTION_STATUS === '3'">
|
||||
<el-form-item label="不成立理由内容" prop="INSPECTED_EXPLAIN_REFUSE">
|
||||
<el-input
|
||||
v-model="form.INSPECTED_EXPLAIN_REFUSE"
|
||||
:autosize="{ minRows: 3 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认人" prop="INSPECTION_ORIGINATOR_SIGN_IMG">
|
||||
<layout-sign v-model="form.INSPECTION_ORIGINATOR_SIGN_IMG" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取 消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit">确 定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { reactive, ref } from "vue";
|
||||
import LayoutSign from "@/components/sign/index.vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { setSafetyEnvironmentalDefense } from "@/request/safety_environmental_management.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
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 VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const rules = {
|
||||
INSPECTION_STATUS: [
|
||||
{ required: true, message: "请选择申辩是否成立", trigger: "change" },
|
||||
],
|
||||
INSPECTED_EXPLAIN_REFUSE: [
|
||||
{ required: true, message: "请输入不成立理由内容", trigger: "blur" },
|
||||
],
|
||||
INSPECTION_ORIGINATOR_SIGN_IMG: [
|
||||
{ required: true, message: "请签字", trigger: "change" },
|
||||
],
|
||||
};
|
||||
const form = reactive({
|
||||
INSPECTION_STATUS: "3",
|
||||
INSPECTED_EXPLAIN_REFUSE: "",
|
||||
INSPECTION_ORIGINATOR_SIGN_IMG: "",
|
||||
});
|
||||
const formRef = ref(null);
|
||||
const fnDownloadFile = (INSPECTION_ID) => {
|
||||
window.location.href =
|
||||
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||
"safetyenvironmental/download?INSPECTION_ID=" +
|
||||
INSPECTION_ID;
|
||||
};
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef.value);
|
||||
if (form.INSPECTION_STATUS === "3") {
|
||||
await setSafetyEnvironmentalDefense({ ...props.info, ...form.value });
|
||||
ElMessage.success("申辩处理成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
} else {
|
||||
await router.push({
|
||||
path: "/safety_environmental_management/safety_environmental/edit",
|
||||
query: { INSPECTION_ID: props.info.INSPECTION_ID },
|
||||
});
|
||||
}
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,79 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="流程图" width="80%">
|
||||
<div style="height: calc(100vh - 200px)">
|
||||
<RelationGraph ref="relationGraphRef" :options="graphOptions" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import RelationGraph from "relation-graph/vue3";
|
||||
import { ref, watchEffect } from "vue";
|
||||
import { getSafetyEnvironmentalFlowChart } from "@/request/safety_environmental_management.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
const relationGraphRef = ref(null);
|
||||
const graphOptions = ref({
|
||||
disableDragNode: "false",
|
||||
layouts: [
|
||||
{
|
||||
label: "中心",
|
||||
layoutName: "tree",
|
||||
layoutClassName: "seeks-layout-center",
|
||||
defaultJunctionPoint: "border",
|
||||
defaultNodeShape: 0,
|
||||
defaultLineShape: 1,
|
||||
min_per_width: 300,
|
||||
max_per_width: 600,
|
||||
min_per_height: 40,
|
||||
max_per_height: 60,
|
||||
from: "left",
|
||||
},
|
||||
],
|
||||
buttonloading: false,
|
||||
defaultLineMarker: {
|
||||
markerWidth: 12,
|
||||
markerHeight: 12,
|
||||
refX: 6,
|
||||
refY: 6,
|
||||
data: "M2,2 L10,6 L2,10 L6,6 L2,2",
|
||||
},
|
||||
defaultNodeShape: 1,
|
||||
defaultLineShape: 2,
|
||||
defaultJunctionPoint: "lr",
|
||||
defaultNodeBorderWidth: 0,
|
||||
backgroundColor: "#08163b",
|
||||
defaultLineColor: "rgba(0, 186, 189, 1)",
|
||||
defaultNodeColor: "rgba(0, 206, 209, 1)",
|
||||
defaultNodeHeight: 150,
|
||||
defaultNodeWidth: 200,
|
||||
});
|
||||
const fnGetData = async () => {
|
||||
const { nodes, from } = await getSafetyEnvironmentalFlowChart({
|
||||
INSPECTION_ID: props.id,
|
||||
});
|
||||
fnSeeksGraph(nodes, from);
|
||||
};
|
||||
const fnSeeksGraph = (nodes, links) => {
|
||||
relationGraphRef.value.setJsonData({ nodes, links }, () => {});
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (visible.value) fnGetData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,344 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_ID">
|
||||
<layout-department v-model="searchForm.INSPECTED_DEPARTMENT_ID" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="searchForm.INSPECTION_DEPARTMENT_ID"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查发起人" prop="INSPECTION_ORIGINATOR_NAME">
|
||||
<el-input v-model="searchForm.INSPECTION_ORIGINATOR_NAME" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查类型" prop="INSPECTION_TYPE">
|
||||
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检查时间" prop="dates">
|
||||
<el-date-picker
|
||||
v-model="searchForm.dates"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
range-separator="至"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查状态" prop="INSPECTION_STATUS">
|
||||
<el-select v-model="searchForm.INSPECTION_STATUS">
|
||||
<el-option
|
||||
v-for="item in stateList"
|
||||
:key="item.ID"
|
||||
:label="item.NAME"
|
||||
:value="item.ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="隐患描述" prop="HIDDENDESCR">
|
||||
<el-input v-model="searchForm.HIDDENDESCR" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="检查题目" prop="INSPECTION_SUBJECT">
|
||||
<el-select v-model="searchForm.INSPECTION_SUBJECT">
|
||||
<el-option
|
||||
v-for="item in inspectionQuestionList"
|
||||
:key="item.ID"
|
||||
:label="item.NAME"
|
||||
:value="item.ID"
|
||||
/>
|
||||
</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>
|
||||
<div class="mtb-10">
|
||||
{{
|
||||
INSPECT_NAME_MAP[searchForm.INSPECTION_SUBJECT] || "安全环保总数"
|
||||
}}:
|
||||
<b>
|
||||
<i>{{ safetyTotal }}</i>
|
||||
</b>
|
||||
<span class="pl-10">
|
||||
涉及隐患总数:
|
||||
<b>
|
||||
<i>{{ hiddenTotal }}</i>
|
||||
</b>
|
||||
</span>
|
||||
</div>
|
||||
<layout-table
|
||||
:data="list"
|
||||
@get-data="fnGetDataTransfer"
|
||||
v-model:pagination="pagination"
|
||||
ref="tableRef"
|
||||
row-key="INSPECTION_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="INSPECTED_DEPARTMENT_NAMES" label="被检查单位" />
|
||||
<el-table-column
|
||||
prop="INSPECTED_SITEUSER_NAME"
|
||||
label="被检查单位现场负责人"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" label="检查部门" />
|
||||
<el-table-column
|
||||
prop="INSPECTION_ORIGINATOR_NAME"
|
||||
label="检查发起人"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" />
|
||||
<el-table-column prop="HIDDEN_COUNT" label="涉及隐患数" width="120" />
|
||||
<el-table-column label="检查时间" width="270">
|
||||
<template v-slot="{ row }">
|
||||
<span>
|
||||
自 {{ row.INSPECTION_TIME_START }} 至
|
||||
{{ row.INSPECTION_TIME_END }} 止
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{ translationStatus(row.INSPECTION_STATUS, stateList) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="INSPECTION_SUBJECT" label="检查题目" />
|
||||
<el-table-column label="操作" width="270">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/safety_environmental/view',
|
||||
query: { INSPECTION_ID: row.INSPECTION_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnFlowChart(row.INSPECTION_ID)"
|
||||
>
|
||||
流程图
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit && row.INSPECTION_STATUS === '-1'"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/safety_environmental/edit',
|
||||
query: { INSPECTION_ID: row.INSPECTION_ID },
|
||||
})
|
||||
"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.INSPECTION_ORIGINATOR_ID === USER_ID &&
|
||||
row.INSPECTION_STATUS === '-2'
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDefense(row)"
|
||||
>
|
||||
申辩处理
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del && row.INSPECTION_SOURCE !== '4'"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row.INSPECTION_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_environmental_management/safety_environmental/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
新建检查
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<flow-chart
|
||||
v-model:visible="data.flowChartDialog.visible"
|
||||
:id="data.flowChartDialog.INSPECTION_ID"
|
||||
/>
|
||||
<defense
|
||||
v-model:visible="data.defenseDialog.visible"
|
||||
:info="data.defenseDialog.info"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { serialNumber, translationStatus } from "@/assets/js/utils";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutInspectionType from "@/components/inspection_type/index.vue";
|
||||
import {
|
||||
getSafetyEnvironmentalList,
|
||||
setSafetyEnvironmentalDelete,
|
||||
} from "@/request/safety_environmental_management.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import { reactive, ref } from "vue";
|
||||
import FlowChart from "./components/flow_chart.vue";
|
||||
import Defense from "./components/defense.vue";
|
||||
|
||||
const stateList = [
|
||||
{ ID: "0", NAME: "待检查人核实" },
|
||||
{ ID: "1", NAME: "检查人核实中" },
|
||||
{ ID: "2", NAME: "待被检查人确认" },
|
||||
{ ID: "3", NAME: "待指派整改人" },
|
||||
{ ID: "4", NAME: "指派中" },
|
||||
{ ID: "5", NAME: "指派完成" },
|
||||
{ ID: "6", NAME: "检查待验收" },
|
||||
{ ID: "7", NAME: "检查已验收" },
|
||||
{ ID: "8", NAME: "已归档" },
|
||||
{ ID: "-1", NAME: "检查人核实打回" },
|
||||
{ ID: "-2", NAME: "被检查人申辩" },
|
||||
];
|
||||
const inspectionQuestionList = [
|
||||
{ ID: "安全", NAME: "安全" },
|
||||
{ ID: "环保", NAME: "环保" },
|
||||
{ ID: "综合", NAME: "综合" },
|
||||
];
|
||||
const INSPECT_NAME_MAP = {
|
||||
安全: "安全检查总数",
|
||||
环保: "环保检查总数",
|
||||
综合: "安全检查总数",
|
||||
};
|
||||
const safetyTotal = ref(0);
|
||||
const hiddenTotal = ref(0);
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const router = useRouter();
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getSafetyEnvironmentalList, {
|
||||
callbackFn: (list, resData) => {
|
||||
safetyTotal.value = resData.safetyTotal;
|
||||
hiddenTotal.value = resData.hiddenTotal;
|
||||
},
|
||||
});
|
||||
const data = reactive({
|
||||
flowChartDialog: {
|
||||
visible: false,
|
||||
INSPECTION_ID: "",
|
||||
},
|
||||
defenseDialog: {
|
||||
visible: false,
|
||||
info: {
|
||||
INSPECTION_ID: "",
|
||||
INSPECTED_SITEUSER_SIGN_IMG: "",
|
||||
INSPECTED_SITEUSER_SIGN_TIME: "",
|
||||
INSPECTED_EXPLAIN: "",
|
||||
INSPECTED_EXPLAIN_FILENAME: "",
|
||||
INSPECTED_EXPLAIN_FILEPATH: "",
|
||||
},
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
INSPECTION_TIME_START: searchForm.value.dates?.[0],
|
||||
INSPECTION_TIME_END: searchForm.value.dates?.[1],
|
||||
});
|
||||
};
|
||||
const buttonJurisdiction = await useButtonJurisdiction("safetyenvironmental");
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (INSPECTION_ID) => {
|
||||
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||
await setSafetyEnvironmentalDelete({ INSPECTION_ID, hide: "1" });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnFlowChart = (INSPECTION_ID) => {
|
||||
data.flowChartDialog.visible = true;
|
||||
data.flowChartDialog.INSPECTION_ID = INSPECTION_ID;
|
||||
};
|
||||
const fnDefense = ({
|
||||
INSPECTED_SITEUSER_SIGN_IMG,
|
||||
INSPECTED_SITEUSER_SIGN_TIME,
|
||||
INSPECTED_EXPLAIN,
|
||||
INSPECTED_EXPLAIN_FILENAME,
|
||||
INSPECTED_EXPLAIN_FILEPATH,
|
||||
INSPECTION_ID,
|
||||
}) => {
|
||||
data.defenseDialog.visible = true;
|
||||
data.defenseDialog.info.INSPECTED_SITEUSER_SIGN_IMG =
|
||||
INSPECTED_SITEUSER_SIGN_IMG;
|
||||
data.defenseDialog.info.INSPECTED_SITEUSER_SIGN_TIME =
|
||||
INSPECTED_SITEUSER_SIGN_TIME;
|
||||
data.defenseDialog.info.INSPECTED_EXPLAIN = INSPECTED_EXPLAIN;
|
||||
data.defenseDialog.info.INSPECTED_EXPLAIN_FILENAME =
|
||||
INSPECTED_EXPLAIN_FILENAME;
|
||||
data.defenseDialog.info.INSPECTED_EXPLAIN_FILEPATH =
|
||||
INSPECTED_EXPLAIN_FILEPATH;
|
||||
data.defenseDialog.info.INSPECTION_ID = INSPECTION_ID;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,7 @@
|
|||
<template>
|
||||
<layout-card></layout-card>
|
||||
</template>
|
||||
|
||||
<script setup></script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
Loading…
Reference in New Issue