Merge remote-tracking branch 'origin/dev' into dev

pull/1/head
fangjiakai 2024-02-05 09:28:04 +08:00
commit aade1f3c01
58 changed files with 2641 additions and 705 deletions

27
package-lock.json generated
View File

@ -33,6 +33,7 @@
"relation-graph": "^2.1.24",
"throttle-debounce": "^5.0.0",
"v-viewer": "^3.0.11",
"vant": "^4.8.4",
"vue": "^3.4.3",
"vue-countup-v3": "^1.4.1",
"vue-draggable-plus": "^0.3.4",
@ -1421,6 +1422,19 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/@vant/popperjs": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"node_modules/@vant/use": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/@vant/use/-/use-1.6.0.tgz",
"integrity": "sha512-PHHxeAASgiOpSmMjceweIrv2AxDZIkWXyaczksMoWvKV2YAYEhoizRuk/xFnKF+emUIi46TsQ+rvlm/t2BBCfA==",
"peerDependencies": {
"vue": "^3.0.0"
}
},
"node_modules/@vitejs/plugin-basic-ssl": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.1.0.tgz",
@ -5695,6 +5709,19 @@
"vue": "^3.0.0"
}
},
"node_modules/vant": {
"version": "4.8.4",
"resolved": "https://registry.npmmirror.com/vant/-/vant-4.8.4.tgz",
"integrity": "sha512-2ompmogS76pFWUDrQGYNXAENWxisJXqv0+eIqt7mGo1TJJXcUikQ5sfRjX8W3HTkTe1FxV7lzuI3QrW01i043g==",
"dependencies": {
"@vant/popperjs": "^1.3.0",
"@vant/use": "^1.6.0",
"@vue/shared": "^3.0.0"
},
"peerDependencies": {
"vue": "^3.0.0"
}
},
"node_modules/viewerjs": {
"version": "1.11.6",
"resolved": "https://registry.npmmirror.com/viewerjs/-/viewerjs-1.11.6.tgz",

View File

@ -35,6 +35,7 @@
"relation-graph": "^2.1.24",
"throttle-debounce": "^5.0.0",
"v-viewer": "^3.0.11",
"vant": "^4.8.4",
"vue": "^3.4.3",
"vue-countup-v3": "^1.4.1",
"vue-draggable-plus": "^0.3.4",

View File

@ -316,3 +316,9 @@ div::-webkit-scrollbar-track {
display: none;
}
}
.mobile {
padding: 10px;
background-color: #fafafa;
min-height: 100vh;
}

View File

@ -330,6 +330,15 @@ export default [
component:
"hazard_investigation/inventory_management/insurance_coverage",
},
{
path: "/hazard_investigation/inventory_management/insurance_coverage_custom",
meta: {
title: "设置包保责任类型",
activeMenu: "/hazard_investigation/inventory_management",
},
component:
"hazard_investigation/inventory_management/insurance_coverage_custom",
},
{
path: "/hazard_investigation/inventory_management/add",
meta: {
@ -1090,10 +1099,71 @@ export default [
component:
"safety_environmental_management/hazard_assignment_acceptance/hidden_list",
},
{
path: "/safety_environmental_management/hazard_assignment_acceptance/assign/assign",
meta: {
title: "指派",
activeMenu:
"/safety_environmental_management/hazard_assignment_acceptance",
},
component:
"safety_environmental_management/hazard_assignment_acceptance/assign",
},
{
path: "/safety_environmental_management/hazard_assignment_acceptance/assign/acceptance",
meta: {
title: "验收",
activeMenu:
"/safety_environmental_management/hazard_assignment_acceptance",
},
component:
"safety_environmental_management/hazard_assignment_acceptance/acceptance",
},
],
},
{
path: "/safety_environmental_management/hazard_assignment_acceptance/acceptance",
meta: {
title: "验收",
activeMenu:
"/safety_environmental_management/hazard_assignment_acceptance",
},
component: "children",
children: [
{
path: "",
component:
"safety_environmental_management/hazard_assignment_acceptance/hidden_list",
},
{
path: "/safety_environmental_management/hazard_assignment_acceptance/acceptance/assign",
meta: {
title: "指派",
activeMenu:
"/safety_environmental_management/hazard_assignment_acceptance",
},
component:
"safety_environmental_management/hazard_assignment_acceptance/acceptance",
},
{
path: "/safety_environmental_management/hazard_assignment_acceptance/acceptance/acceptance",
meta: {
title: "验收",
activeMenu:
"/safety_environmental_management/hazard_assignment_acceptance",
},
component:
"safety_environmental_management/hazard_assignment_acceptance/acceptance",
},
],
},
],
},
{
path: "/safety_environmental_management/hazard_management",
meta: { title: "隐患管理", isSubMenu: false },
component: "safety_environmental_management/hazard_management/index",
},
],
},
{

View File

@ -9,7 +9,7 @@
<span v-else-if="data.info.SOURCE === '4'"> 安全环保检查 </span>
<span v-else-if="data.info.SOURCE === '5'"> 安全环保检查 </span>
</el-descriptions-item>
<template v-if="data.info.SOURCE === '2'">
<template v-if="data.info.SOURCE === '2' && listType === '1'">
<el-descriptions-item label="风险点(单元)">
{{ data.info.RISK_UNIT }}
</el-descriptions-item>
@ -26,6 +26,23 @@
{{ data.info.CHECK_CONTENT }}
</el-descriptions-item>
</template>
<template v-if="data.info.SOURCE === '2' && listType === '2'">
<el-descriptions-item label="检查类别">
{{ data.info.BR_CHECK_CATEGORY_NAME }}
</el-descriptions-item>
<el-descriptions-item label="检查项目">
{{ data.info.BR_CHECK_ITEM_NAME }}
</el-descriptions-item>
<el-descriptions-item label="检查内容">
{{ data.info.BR_CHECK_CONTENT }}
</el-descriptions-item>
<el-descriptions-item label="检查标准">
{{ data.info.BR_CHECK_STANDARD }}
</el-descriptions-item>
<el-descriptions-item label="参考依据">
{{ data.info.BR_REFERENCE_BASIS }}
</el-descriptions-item>
</template>
<el-descriptions-item label="隐患级别">
{{ data.info.HIDDENLEVELNAME }}
</el-descriptions-item>
@ -243,7 +260,10 @@ import { reactive, watchEffect } from "vue";
import { getFileSuffix } from "@/assets/js/utils.js";
import { VideoPlay } from "@element-plus/icons-vue";
import LayoutVideo from "@/components/video/index.vue";
import { getHiddenDangerView } from "@/request/hazard_investigation.js";
import {
getHiddenDangerView,
getCustomHiddenDangerView,
} from "@/request/hazard_investigation.js";
defineOptions({
name: "LayoutHiddenView",
@ -255,6 +275,11 @@ const props = defineProps({
required: true,
default: "",
},
listType: {
type: String,
required: true,
default: "",
},
});
const emits = defineEmits(["throw-data"]);
const data = reactive({
@ -271,9 +296,12 @@ const data = reactive({
},
});
const fnGetData = async () => {
const resData = await getHiddenDangerView({
HIDDEN_ID: props.hiddenId,
});
const resData =
props.listType === "1"
? await getHiddenDangerView({
HIDDEN_ID: props.hiddenId,
})
: await getCustomHiddenDangerView({ HIDDEN_ID: props.hiddenId });
data.info = resData.pd;
data.hs = resData.hs;
data.checkList = resData.checkList;

View File

@ -0,0 +1,216 @@
<template>
<div class="mobile">
<van-cell-group>
<van-cell title="隐患来源">
<template #value>
<span v-if="data.info.SOURCE === '1'"> </span>
<span v-else-if="data.info.SOURCE === '2'"> 隐患排查 </span>
<span v-else-if="data.info.SOURCE === '3'"> 隐患排查 </span>
</template>
</van-cell>
<template v-if="data.info.SOURCE === '2'">
<van-cell title="风险点(单元)" :value="data.info.RISK_UNIT" />
<van-cell title="辨识部位" :value="data.info.IDENTIFICATION" />
<van-cell title="存在风险" :label="data.info.RISK_DESCR" />
<van-cell title="风险分级" :value="data.info.LEVEL" />
<van-cell title="检查内容" :label="data.info.CHECK_CONTENT" />
</template>
<van-cell title="隐患级别" :value="data.info.HIDDENLEVELNAME" />
<van-cell title="隐患状态">
<template #value>
<span v-if="data.info.STATE === '1'"> </span>
<span v-else-if="data.info.STATE === '2'"> 已整改 </span>
<span v-else-if="data.info.STATE === '3'"> 已验收 </span>
</template>
</van-cell>
<van-cell title="隐患描述" :label="data.info.HIDDENDESCR" />
<van-cell title="隐患部位" :value="data.info.HIDDENPART" />
<van-cell title="隐患发现部门" :value="data.info.HIDDENFINDDEPTNAME" />
<van-cell title="发现人" :value="data.info.CREATORNAME" />
<van-cell title="发现时间" :value="data.info.CREATTIME" />
<van-cell title="隐患处置">
<template #value>
<span v-if="data.info.RECTIFICATIONTYPE === '1'"> </span>
<span v-else-if="data.info.RECTIFICATIONTYPE === '2'">
限期整改
</span>
</template>
</van-cell>
<van-cell
v-if="data.info.RECTIFICATIONTYPE === '2'"
title="整改期限"
:value="data.info.RECTIFICATIONDEADLINE"
/>
<van-cell title="隐患图片">
<template #label>
<img
v-for="(item, index) in data.hImgs"
:key="item"
:src="item"
width="100"
height="100"
class="ml-10"
@click="fnImagePreview(data.hImgs, index)"
/>
</template>
</van-cell>
<template v-if="data.info.STATE >= 3">
<van-cell title="整改描述" :value="data.info.RECTIFYDESCR" />
<van-cell title="整改部门" :value="data.info.RECTIFICATIONDEPTNAME" />
<van-cell title="整改人" :value="data.info.RECTIFICATIONORNAME" />
<van-cell title="整改时间" :value="data.info.RECTIFICATIONTIME" />
<van-cell title="整改后图片">
<template #label>
<img
v-for="(item, index) in data.rImgs"
:key="item"
:src="item"
width="100"
height="100"
class="ml-10"
@click="fnImagePreview(data.rImgs, index)"
/>
</template>
</van-cell>
<van-cell title="整改计划">
<template #value>
{{ data.info.HAVEPLAN === "0" ? "无" : "" }}
{{ data.info.HAVEPLAN === "1" ? "有" : "" }}
</template>
</van-cell>
<van-cell title="计划图片" v-if="data.info.HAVEPLAN === '1'">
<template #label>
<img
v-for="(item, index) in data.pImgs"
:key="item"
:src="item"
alt=""
width="100"
height="100"
class="ml-10"
@click="fnImagePreview(data.pImgs, index)"
/>
</template>
</van-cell>
<van-cell title="整改方案" v-if="data.info.RECTIFICATIONTYPE === '2'">
<template #value>
{{ data.info.HAVESCHEME === "0" ? "无" : "" }}
{{ data.info.HAVESCHEME === "1" ? "有" : "" }}
</template>
</van-cell>
<template v-if="data.hs && data.info.HAVESCHEME === '1'">
<van-cell title="排查日期" :value="data.hs.SCREENINGDATE" />
<van-cell title="隐患清单" :value="data.hs.LISTNAME" />
<van-cell title="治理标准要求" :value="data.hs.GOVERNSTANDARDS" />
<van-cell title="治理方法" :value="data.hs.GOVERNMETHOD" />
<van-cell title="经费和物资的落实" :value="data.hs.EXPENDITURE" />
<van-cell title="负责治理人员" :value="data.hs.PRINCIPAL" />
<van-cell title="工时安排" :value="data.hs.PROGRAMMING" />
<van-cell title="时限要求" :value="data.hs.TIMELIMITFOR" />
<van-cell title="工作要求" :value="data.hs.JOBREQUIREMENT" />
<van-cell title="其他事项" :value="data.hs.OTHERBUSINESS" />
<van-cell title="方案图片">
<template #label>
<img
v-for="(item, index) in data.sImgs"
:key="item"
:src="item"
width="100"
height="100"
class="ml-10"
@click="fnImagePreview(data.sImgs, index)"
/>
</template>
</van-cell>
</template>
</template>
<template
v-if="data.info.STATE >= 4 && data.info.RECTIFICATIONTYPE === '2'"
>
<template v-for="(item, index) in data.checkList" :key="index">
<van-cell title="验收描述" :value="item.CHECKDESCR" />
<van-cell title="是否合格">
<template #value>
<span v-if="item.STATUS === '1'"> </span>
<span v-else-if="item.STATUS === '0'"> </span>
</template>
</van-cell>
<van-cell title="验收部门" :value="item.CHECKDEPTNAME" />
<van-cell title="验收人" :value="item.CHECKORNAME" />
<van-cell title="验收时间" :value="item.CHECK_TIME" />
<van-cell title="验收图片">
<template #label>
<img
v-for="(item1, index1) in item.cImgs"
:key="index1"
:src="item1"
alt=""
width="100"
height="100"
class="ml-10"
@click="fnImagePreview(item.cImgs, index1)"
/>
</template>
</van-cell>
</template>
</template>
</van-cell-group>
</div>
</template>
<script setup>
import { reactive } from "vue";
import { showImagePreview } from "vant";
import "vant/es/image-preview/style";
import { geHiddenDangerView } from "@/request/mobile.js";
import { useRoute } from "vue-router";
import { getFileSuffix } from "@/assets/js/utils.js";
const route = useRoute();
const { HIDDEN_ID } = route.query;
const FILE_URL = import.meta.env.VITE_FILE_URL;
const data = reactive({
info: {},
hImgs: [],
rImgs: [],
pImgs: [],
sImgs: [],
});
const fnGetData = async () => {
const resData = await geHiddenDangerView({
HIDDEN_ID,
});
data.info = resData.pd;
data.hs = resData.hs;
data.checkList = resData.checkList;
for (let i = 0; i < resData.hImgs.length; i++) {
if (getFileSuffix(resData.hImgs[i].FILEPATH) !== "mp4") {
data.hImgs.push(FILE_URL + resData.hImgs[i].FILEPATH);
}
}
for (let i = 0; i < resData.rImgs.length; i++) {
data.rImgs.push(FILE_URL + resData.rImgs[i].FILEPATH);
}
for (let i = 0; i < resData.sImgs.length; i++) {
data.sImgs.push(FILE_URL + resData.sImgs[i].FILEPATH);
}
for (let i = 0; i < resData.pImgs.length; i++) {
data.pImgs.push(FILE_URL + resData.pImgs[i].FILEPATH);
}
for (let i = 0; i < resData.checkList.length; i++) {
for (let j = 0; j < resData.checkList[i].cImgs.length; j++) {
resData.checkList[i].cImgs[j] =
FILE_URL + resData.checkList[i].cImgs[j].FILEPATH;
}
}
};
fnGetData();
const fnImagePreview = (images, startPosition) => {
showImagePreview({
images,
startPosition,
});
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,117 @@
<template>
<div class="mobile">
<van-tabs v-model:active="tabsActive" sticky>
<van-tab title="检查记录" name="1">
<van-search
v-model="searchForm.KEYWORDS"
show-action
:clearable="false"
placeholder="请输入搜索关键词"
@search="fnGetIdentifyingPartsInspectionRecordList"
>
<template #action>
<div @click="fnGetIdentifyingPartsInspectionRecordList"></div>
</template>
</van-search>
<van-cell-group
v-for="(item, index) in inspectionRecordList"
:key="index"
class="mt-10"
@click="
$router.push({
path: '/mobile/identifying_parts/inspection_record',
query: {
CHECKRECORD_ID: item.CHECKRECORD_ID,
IDENTIFICATIONPARTS_ID,
},
})
"
>
<van-cell title="检查清单" :value="item.LISTMANAGERNAME" />
<van-cell title="检查时间" :value="item.CHECK_TIME" />
<van-cell title="检查人" :value="item.USERNAME" />
</van-cell-group>
</van-tab>
<van-tab title="风险分布" name="2">
<van-cell-group>
<van-cell :title="info.RISKUNITNAME" :value="info.PARTSNAME" />
<van-cell title="存在风险">
<template #label>
<div v-for="(item, index) in infoList" :key="index" class="mt-10">
{{ index + 1 }}. {{ item.RISK_DESCR }}
</div>
</template>
</van-cell>
<van-cell title="主要管控措施">
<template #label>
<div v-for="(item, index) in infoList" :key="index" class="mt-10">
{{ index + 1 }}. {{ item.MEASURES }}
</div>
</template>
</van-cell>
<van-cell title="管控部门" :value="info.DEPTNAME" />
<van-cell title="事故类型" :label="info.ACCIDENTS_NAME" />
<van-cell title="风险等级">
<template #value>
<span v-if="LEVELID === 'levelD'" class="text-blue">
低风险/D级
</span>
<span v-else-if="LEVELID === 'levelC'" class="text-yellow">
一般风险/C级
</span>
<span v-else-if="LEVELID === 'levelB'" class="text-orange">
较大风险/B级
</span>
<span v-else-if="LEVELID === 'levelA'" class="text-red">
重大风险/A级
</span>
</template>
</van-cell>
</van-cell-group>
</van-tab>
</van-tabs>
</div>
</template>
<script setup>
import { ref } from "vue";
import {
getIdentifyingPartsInfo,
getIdentifyingPartsInfoList,
getIdentifyingPartsInspectionRecordList,
} from "@/request/mobile.js";
import { useRoute } from "vue-router";
import useListData from "@/assets/js/useListData.js";
const route = useRoute();
const { IDENTIFICATIONPARTS_ID, LEVELID } = route.query;
const tabsActive = ref("1");
const info = ref({});
const { list: infoList } = useListData(getIdentifyingPartsInfoList, {
otherParams: { CHECK_IDENTIFICATION_ID: IDENTIFICATIONPARTS_ID },
usePagination: false,
});
const {
list: inspectionRecordList,
searchForm,
fnGetData: fnGetIdentifyingPartsInspectionRecordList,
} = useListData(getIdentifyingPartsInspectionRecordList, {
otherParams: { IDENTIFICATIONPARTS_ID },
usePagination: false,
});
const fnGetData = async () => {
const resData = await getIdentifyingPartsInfo({
IDENTIFICATIONPARTS_ID,
});
info.value = resData.pd;
};
fnGetData();
</script>
<style scoped lang="scss">
.mt-10 {
&:first-child {
margin-top: 0;
}
}
</style>

View File

@ -0,0 +1,133 @@
<template>
<div class="mobile">
<van-cell-group v-for="(item, index) in list" :key="index" class="mt-10">
<van-cell title="存在风险" :label="item.RISK_DESCR" />
<van-cell title="检查内容">
<template #label>
{{ item.CHECK_CONTENT }}
<van-checkbox-group
:model-value="item.ISNORMAL"
direction="horizontal"
>
<van-checkbox :name="0">合格</van-checkbox>
<van-checkbox :name="1" checked-color="red"> 不合格 </van-checkbox>
<van-icon
name="info-o"
color="blue"
v-if="item.ISNORMAL.includes(1)"
@click="
$router.push({
path,
query: { HIDDEN_ID: item.HIDDEN_ID },
})
"
/>
</van-checkbox-group>
</template>
</van-cell>
</van-cell-group>
<div id="map_container" style="width: 100%; height: 500px" />
<van-cell-group>
<van-cell title="检查人" :value="info.USERS" />
<van-cell title="检查部位" :value="info.PARTSNAME" />
<van-cell title="检查时间" :value="info.CHECK_TIME" />
</van-cell-group>
</div>
</template>
<script setup>
import { onBeforeUnmount, onMounted, ref } from "vue";
import {
getInspectionRecordInfo,
getInspectionRecordMapInfo,
} from "@/request/mobile.js";
import { useRoute } from "vue-router";
defineProps({
path: {
type: String,
default: "/mobile/identifying_parts/hidden_danger_view",
},
});
const _50 = new URL("/src/assets/images/map/50.png", import.meta.url).href;
const _h = new URL("/src/assets/images/map/h.png", import.meta.url).href;
let mapInstance;
const route = useRoute();
const { CHECKRECORD_ID, IDENTIFICATIONPARTS_ID } = route.query;
const info = ref({});
const list = ref([]);
const fnGetData = async () => {
const resData = await getInspectionRecordInfo({
IDENTIFICATIONPARTS_ID,
CHECKRECORD_ID,
});
for (let i = 0; i < resData.varList.length; i++) {
resData.varList[i].ISNORMAL = [resData.varList[i].ISNORMAL];
}
resData.pd.PARTSNAME = resData.idData?.PARTSNAME;
info.value = resData.pd;
list.value = resData.varList;
};
const fnGetDataMap = async () => {
const resData = await getInspectionRecordMapInfo({
CHECKRECORD_ID,
loading: false,
});
fnMapInit(resData.cinfo.LONGITUDE, resData.cinfo.LATITUDE, resData);
};
const fnMapInit = (LONGITUDE, LATITUDE, resData) => {
mapInstance = new window.BMapGL.Map("map_container");
mapInstance.centerAndZoom(
new window.BMapGL.Point(
LONGITUDE || "116.3972282409668",
LATITUDE || "39.90960456049752"
),
3
);
mapInstance.enableScrollWheelZoom(true);
fnAddPoint(resData);
};
onMounted(async () => {
await fnGetData();
await fnGetDataMap();
});
const fnAddPoint = (resData) => {
for (let i = 0; i < resData.varList.length; i++) {
const myIcon = new window.BMapGL.Icon(_50, new window.BMapGL.Size(23, 25));
const pt = new window.BMapGL.Point(
resData.varList[i].LONGITUDE,
resData.varList[i].LATITUDE
);
const marker = new window.BMapGL.Marker(pt, {
icon: myIcon,
});
mapInstance.addOverlay(marker);
}
for (let i = 0; i < resData.hdList.length; i++) {
const myIcon = new window.BMapGL.Icon(_h, new window.BMapGL.Size(23, 25));
const pt = new window.BMapGL.Point(
resData.hdList[i].LONGITUDE,
resData.hdList[i].LATITUDE
);
const marker = new window.BMapGL.Marker(pt, {
icon: myIcon,
});
mapInstance.addOverlay(marker);
}
const myIcon4 = new window.BMapGL.Icon(_50, new window.BMapGL.Size(23, 25));
const pt4 = new window.BMapGL.Point(
resData.checkrecord.LONGITUDE,
resData.checkrecord.LATITUDE
);
const marker4 = new window.BMapGL.Marker(pt4, {
icon: myIcon4,
});
mapInstance.addOverlay(marker4);
};
onBeforeUnmount(() => {
mapInstance && mapInstance.destroy();
mapInstance = null;
});
</script>
<style scoped></style>

View File

@ -0,0 +1,246 @@
<template>
<div class="mobile">
<van-collapse v-model="activeName" accordion>
<van-collapse-item title="基本信息" name="1">
<van-cell-group>
<van-cell title="企业名称" :value="info.CORP_NAME" />
<van-cell title="邮政编码" :value="info.POSTAL_CODE" />
<van-cell title="统一社会信用代码" :value="info.CODE" />
<van-cell title="属地" :value="info.COMPANY_AREA" />
<van-cell title="经济类型" :value="info.ECO_TYPE_NAME" />
<van-cell title="所属行业" :value="info.CORP_TYPE_NAME" />
<van-cell title="企业状态" :value="info.CORP_STATE_NAME" />
<van-cell title="经度" :value="info.LONGITUDE" />
<van-cell title="纬度" :value="info.LATITUDE" />
<van-cell title="主要负责人" :value="info.CONTACTS" />
<van-cell title="主要负责人电话" :value="info.CONTACTS_PHONE" />
<van-cell title="法定代表人" :value="info.LR_NAME" />
<van-cell title="法人手机号" :value="info.LR_PHONE" />
<van-cell title="占地面积(㎡)" :value="info.AREA_COVERED" />
<van-cell title="职工人数(人)" :value="info.EMPLOYEES" />
<van-cell title="成立时间" :value="info.CREATE_DATE" />
<van-cell title="注册资金(万元)" :value="info.REGCAPITAL" />
<van-cell title="资产总额(万元)" :value="info.TOTALASSETS" />
<van-cell title="隶属关系" :value="info.SUBORDINATIONNAME" />
<van-cell title="企业类型">
<template>
{{ info.CORP_OF_TYPE_NAME ? info.CORP_OF_TYPE_NAME : "" }}
{{ info.CORP_OF_TYPE_NAME && info.CORP_OF_TYPE_NAME2 ? "/" : "" }}
{{ info.CORP_OF_TYPE_NAME2 ? info.CORP_OF_TYPE_NAME2 : "" }}
</template>
</van-cell>
<van-cell
title="市行业监管部门"
:value="info.INDUSTRY_DEPARTMENTName"
/>
<van-cell title="规模" :value="info.SCALE_NAME" />
<van-cell title="是否规模以上">
<template>
{{ info.SCALE_TYPE === "0" ? "否" : "" }}
{{ info.SCALE_TYPE === "1" ? "是" : "" }}
</template>
</van-cell>
<van-cell title="培训行业类型" :value="info.TRAINTYPE_NAME" />
<van-cell title="企业可新建用户数量" :value="info.USERS_NUM" />
<van-cell title="单位经营地址" :value="info.ADDRESS_BUSINESS" />
<van-cell title="四色图" v-if="info.FOURTYPE === '1'">
<template #label>
<van-image
width="100"
height="100"
v-for="(item, index) in four_images"
:src="item"
:key="item"
@click="fnImagePreview(four_images, index)"
/>
</template>
</van-cell>
<van-cell title="营业执照">
<template #label>
<van-image
width="100"
height="100"
v-for="(item, index) in bus_images"
:src="item"
:key="item"
@click="fnImagePreview(bus_images, index)"
/>
</template>
</van-cell>
</van-cell-group>
</van-collapse-item>
<van-collapse-item title="安全负责人信息" name="2">
<van-cell-group inset>
<van-cell title="姓名" :value="info.SAFETY_NAME" />
<van-cell title="职务" :value="info.SAFETY_POST" />
<van-cell title="单位电话" :value="info.SAFETY_NUMBER" />
<van-cell title="手机号码" :value="info.SAFETY_PHONE" />
</van-cell-group>
</van-collapse-item>
<van-collapse-item title="企业相关属性" name="4">
<van-cell-group inset>
<van-cell title="有无职业卫生信息">
{{
info.WHETHER_HYGIENE === undefined
? ""
: info.WHETHER_HYGIENE === 0
? "无"
: "有"
}}
</van-cell>
<van-cell title="有无重大危险源">
{{
info.WHETHER_HAZARDS === undefined
? ""
: info.WHETHER_HAZARDS === 0
? "无"
: "有"
}}
</van-cell>
<van-cell title="是否有稀缺大型应急物资">
{{
info.WHETHER_SCARCE === undefined
? ""
: info.WHETHER_SCARCE === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否涉及危化品">
{{
info.WHETHER_CHEMICALS === undefined
? ""
: info.WHETHER_CHEMICALS === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="有无特种设备">
{{
info.WHETHER_SPECIALEQUIPMENT === undefined
? ""
: info.WHETHER_SPECIALEQUIPMENT === 0
? "无"
: "有"
}}
</van-cell>
<van-cell title="有无特种作业人员">
{{
info.WHETHER_SPECIALPEOPLE === undefined
? ""
: info.WHETHER_SPECIALPEOPLE === 0
? "无"
: "有"
}}
</van-cell>
<van-cell title="是否涉及煤气">
{{
info.WHETHER_COALGAS === undefined
? ""
: info.WHETHER_COALGAS === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否属于消防重点单位">
{{
info.WHETHER_FIRE === undefined
? ""
: info.WHETHER_FIRE === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否在受限空间作业">
{{
info.WHETHER_CONFINED === undefined
? ""
: info.WHETHER_CONFINED === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否存在涉爆粉尘作业">
{{
info.WHETHER_POWDER === undefined
? ""
: info.WHETHER_POWDER === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否涉及防雷防静电">
{{
info.WHETHER_LIGHTNING === undefined
? ""
: info.WHETHER_LIGHTNING === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否持有放射源">
{{
info.WHETHER_ACTINOGEN === undefined
? ""
: info.WHETHER_ACTINOGEN === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否涉及液氨制冷">
{{
info.WHETHER_LIQUIDAMMONIA === undefined
? ""
: info.WHETHER_LIQUIDAMMONIA === 0
? "否"
: "是"
}}
</van-cell>
<van-cell title="是否涉及危化品管道">
{{
info.WHETHER_PIPELINE === undefined
? ""
: info.WHETHER_PIPELINE === 0
? "否"
: "是"
}}
</van-cell>
</van-cell-group>
</van-collapse-item>
</van-collapse>
</div>
</template>
<script setup>
import { ref } from "vue";
import { getInformationView } from "@/request/mobile.js";
import { useRoute } from "vue-router";
import { showImagePreview } from "vant";
const route = useRoute();
const { CORPINFO_ID } = route.query;
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const activeName = ref("1");
const info = ref({});
const bus_images = ref([]);
const four_images = ref([]);
const fnGetData = async () => {
const resData = await getInformationView({ CORPINFO_ID });
for (let i = 0; i < resData.fourImgs.length; i++) {
four_images.value.push(VITE_FILE_URL + resData.fourImgs[i].FILEPATH);
}
for (let i = 0; i < resData.busImgs.length; i++) {
bus_images.value.push(VITE_FILE_URL + resData.busImgs[i].FILEPATH);
}
info.value = resData.pd;
};
fnGetData();
const fnImagePreview = (images, startPosition) => {
showImagePreview({
images,
startPosition,
});
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,53 @@
<template>
<div class="mobile">
<van-search
v-model="searchForm.KEYWORDS"
show-action
:clearable="false"
placeholder="请输入搜索关键词"
@search="fnGetData"
>
<template #action>
<div @click="fnGetData"></div>
</template>
</van-search>
<van-cell-group
v-for="(item, index) in list"
:key="index"
class="mt-10"
@click="
$router.push({
path: '/mobile/risk_point/inspection_record',
query: {
CHECKRECORD_ID: item.CHECKRECORD_ID,
IDENTIFICATIONPARTS_ID,
},
})
"
>
<van-cell title="检查清单" :value="item.LISTMANAGERNAME" />
<van-cell title="检查时间" :value="item.CHECK_TIME" />
<van-cell title="检查人" :value="item.USERNAME" />
</van-cell-group>
</div>
</template>
<script setup>
import { getRiskPointCheckList } from "@/request/mobile.js";
import { useRoute } from "vue-router";
import useListData from "@/assets/js/useListData.js";
const route = useRoute();
const { IDENTIFICATIONPARTS_ID } = route.query;
const { list, searchForm, fnGetData } = useListData(getRiskPointCheckList, {
otherParams: { IDENTIFICATIONPARTS_ID },
});
</script>
<style scoped lang="scss">
.mt-10 {
&:first-child {
margin-top: 0;
}
}
</style>

View File

@ -0,0 +1,9 @@
<template>
<hidden-danger-view />
</template>
<script setup>
import HiddenDangerView from "../identifying_parts/hidden_danger_view.vue";
</script>
<style scoped></style>

View File

@ -0,0 +1,74 @@
<template>
<div class="mobile">
<van-search
v-model="searchForm.KEYWORDS"
show-action
:clearable="false"
placeholder="请输入搜索关键词"
@search="fnGetData"
>
<template #action>
<div @click="fnGetData"></div>
</template>
</van-search>
<van-cell-group
v-for="(item, index) in list"
:key="index"
class="mt-10"
@click="
$router.push({
path: '/mobile/risk_point/checklist',
query: {
IDENTIFICATIONPARTS_ID: item.IDENTIFICATIONPARTS_ID,
},
})
"
>
<van-cell title="部位名称" :value="item.PARTSNAME" />
<van-cell title="风险等级">
<template #value>
<span v-if="item.LEVELID === 'levelD'" class="text-blue">
低风险/D级
</span>
<span v-else-if="item.LEVELID === 'levelC'" class="text-yellow">
一般风险/C级
</span>
<span v-else-if="item.LEVELID === 'levelB'" class="text-orange">
较大风险/B级
</span>
<span v-else-if="item.LEVELID === 'levelA'" class="text-red">
重大风险/A级
</span>
</template>
</van-cell>
<van-cell title="风险点(单元)" :value="item.RISKUNITNAME" />
<van-cell title="管控部门" :value="item.DEPT_NAME" />
</van-cell-group>
</div>
</template>
<script setup>
import { getRiskPointList } from "@/request/mobile.js";
import { useRoute } from "vue-router";
import useListData from "@/assets/js/useListData.js";
const route = useRoute();
const { RISKUNIT_ID } = route.query;
const { list, fnGetData, searchForm } = useListData(getRiskPointList, {
otherParams: {
RISK_UNIT_ID: RISKUNIT_ID,
IS_APP: 1,
showCount: 1000,
currentPage: 1,
},
usePagination: false,
});
</script>
<style scoped lang="scss">
.mt-10 {
&:first-child {
margin-top: 0;
}
}
</style>

View File

@ -0,0 +1,9 @@
<template>
<inspection-record path="/mobile/risk_point/hidden_danger_view" />
</template>
<script setup>
import InspectionRecord from "../identifying_parts/inspection_record.vue";
</script>
<style scoped></style>

View File

@ -1,4 +1,4 @@
import { post } from "@/request/axios.js";
import { post, upload } from "@/request/axios.js";
export const getInventoryManagementList = (params) =>
post("/listmanager/list", params); // 清单管理列表
@ -21,7 +21,7 @@ export const setInventoryManagementInsuranceCoverageList = (params) =>
export const setInventoryManagementInsuranceCoverageSave = (params) =>
post("/listmanager/saveBaoBaoType", params); // 清单管理设置包保责任类型提交
export const getInventoryManagementInspectionItems = (params) =>
post("/richeckitem/itemlistAllsk", params); // 清单管理检查项列表
post("/riskcheckitem/itemlistAll", params); // 清单管理检查项列表
export const getInventoryManagementOtherRiskList = (params) =>
post("/riskcheckitem/list", params); // 清单管理选择其他存在风险列表
export const setInventoryManagementAdd = (params) =>
@ -69,7 +69,7 @@ export const getChecklistInspectionStatusRecordMap = (params) =>
export const getInspectionRecordList = (params) =>
post("/checkrecord/allList", params); // 检查记录管理列表
export const getTroubleshootingPlanList = (params) =>
post("/listmanager/checkPlan", params); // 排查计划列表
post("/listmanager/mergeCheckPlan", params); // 排查计划列表
export const getCustomList = (params) =>
post("/hiddenstandardCustom/list", params); // 隐患排查清单管理列表
@ -86,7 +86,7 @@ export const getCheckstandardCommonList = (params) =>
export const setCheckStandardManagementAdd = (params) =>
post("/hiddenstandardCustom/add", params); // 隐患排查清单管理新增
export const setCheckStandardManagementEdit = (params) =>
post("/listmanager/hiddencheckedit", params); // 隐患排查清单管理修改
post("/hiddenstandardCustom/edit", params); // 隐患排查清单管理修改
export const getCheckStandardManagementView = (params) =>
post("/hiddenstandardCustom/goEdit", params); // 隐患排查清单管理查看
export const getCheckStandardOtherHiddenList = (params) =>
@ -95,6 +95,10 @@ export const setCheckStandardSupplementaryRecordingSubmit = (params) =>
post("/customCheckrecord/recording", params); // 隐患排查清单检查情况检查记录补录提交
export const setCheckStandardSubmit = (params) =>
post("/customCheckrecord/add", params); // 清单排查提交
export const setCommonItemEdit = (params) =>
post("/hiddenstandardCommon/edit", params); // 隐患排查检查标准修改
export const setCustomImport = (params) =>
upload("/hiddenstandardCustom/readExcel", params); // 导入隐患排查清单
export const getDeleteCustomList = (params) => post("/customStop/list", params); // 删除清单管理列表
export const setDeleteCustomRecovery = (params) =>
post("/customStop/restore", params); // 删除清单管理恢复
@ -105,5 +109,22 @@ export const getCustomCheckRecordList = (params) =>
post("/customCheckrecord/list", params); // 隐患清单排查列表
export const getCustomCheckRecordView = (params) =>
post("/customCheckrecord/goEdit", params); // 隐患清单排查查询单个
export const setCustomHiddenDangerAdd = (params) =>
post("/customHidden/add", params); // 隐患清单其它隐患添加
export const getCustomHiddenDangerView = (params) =>
post("/customHidden/goEdit", params); // 隐患清单排查其它隐患查看
export const setCustomHiddenDangerDelete = (params) =>
post("/customHidden/delete", params); // 隐患清单排查其它隐患删除
export const setCustomHiddenDangerEdit = (params) =>
post("/customHidden/edit", params); // 隐患清单排查其它隐患修改
export const setCustomHiddenDangerListAdd = (params) =>
post("/customHidden/listAdd", params); // 清单排查其它隐患添加
export const setDeleteCustommCheckrecord = (params) =>
post("/customCheckrecord/delete", params); // 删除隐患清单排查记录
export const setCustomInsuranceCoverageList = (params) =>
post("/customLabelFactory/termList", params); // 隐患排查清单管理设置包保责任类型选择列表
export const setCustomInsuranceCoverageSave = (params) =>
post("/hiddenstandardCustom/saveBaoBaoType", params); // 清单管理设置包保责任类型提交
export const getCustomCheckListOtherHiddenList = (params) =>
post("/customHidden/getCheckHidden", params); // 隐患清单检查情况检查记录查看其它隐患列表

19
src/request/mobile.js Normal file
View File

@ -0,0 +1,19 @@
import { post } from "@/request/axios.js";
export const getInformationView = (params) =>
post("/app/corpinfo/goEdit", params); // 企业信息
export const getIdentifyingPartsInfo = (params) =>
post("/app/identificationparts/goEdit", params); // 辨识部位详情
export const getIdentifyingPartsInspectionRecordList = (params) =>
post("/app/checkrecord/recordByIde", params); // 辨识部位检查记录列表
export const getIdentifyingPartsInfoList = (params) =>
post("/app/riskpoint/getForIdentification", params); // 辨识部位存在风险、主要管控措施列表
export const getInspectionRecordInfo = (params) =>
post("/app/checkrecord/goEditWeui", params); // 检查记录详情
export const getInspectionRecordMapInfo = (params) =>
post("/app/checkrecord/goMapWeui", params); // 检查记录地图
export const geHiddenDangerView = (params) =>
post("/app/hidden/goEditWeui", params); // 隐患详情
export const getRiskPointList = (params) => post("/app/riskpoint/list", params); // 风险点单元列表
export const getRiskPointCheckList = (params) =>
post("/app/checkrecord/recordByIde", params); // 风险点单元检查清单列表

View File

@ -32,3 +32,9 @@ export const getHazardAssignmentAcceptanceList = (params) =>
post("/safetyenvironmental/checkList", params); // 隐患指派与验收列表
export const getHazardAssignmentAcceptanceHiddenList = (params) =>
post("/hidden/listForAhZp", params); // 隐患指派与验收隐患列表
export const setHazardAssignmentAcceptanceAssign = (params) =>
post("/hidden/assign", params); // 隐患指派与验收隐患指派
export const setHazardAssignmentAcceptanceAcceptance = (params) =>
post("/hidden/finalcheck", params); // 隐患指派与验收隐患验收
export const getHazardManagementList = (params) =>
post("/hidden/listForSafetyEnvironmental", params); // 隐患管理列表

View File

@ -1,6 +1,6 @@
import { createRouter, createWebHashHistory } from "vue-router";
import layout from "../layout/index.vue";
// import children from "../components/children/index.vue";
import children from "../components/children/index.vue";
const routes = [
{
@ -35,6 +35,61 @@ const routes = [
meta: { title: "BI", isBreadcrumb: false, isMenu: false },
component: () => import("@/views/BI/index"),
},
{
path: "/mobile",
meta: { isBreadcrumb: false, isMenu: false, isLogin: false },
component: children,
children: [
{
path: "information",
component: () => import("@/mobile/information/index"),
},
{
path: "identifying_parts",
component: children,
children: [
{
path: "index",
component: () => import("@/mobile/identifying_parts/index.vue"),
},
{
path: "inspection_record",
component: () =>
import("@/mobile/identifying_parts/inspection_record.vue"),
},
{
path: "hidden_danger_view",
component: () =>
import("@/mobile/identifying_parts/hidden_danger_view.vue"),
},
],
},
{
path: "risk_point",
component: children,
children: [
{
path: "index",
component: () => import("@/mobile/risk_point/index.vue"),
},
{
path: "checklist",
component: () => import("@/mobile/risk_point/checklist.vue"),
},
{
path: "inspection_record",
component: () =>
import("@/mobile/risk_point/inspection_record.vue"),
},
{
path: "hidden_danger_view",
component: () =>
import("@/mobile/risk_point/hidden_danger_view.vue"),
},
],
},
],
},
{
path: "/404",
name: "/404",

View File

@ -4,8 +4,13 @@
<div class="tc mt-20">
<h1>{{ info.CORP_NAME }}</h1>
</div>
<!-- TODO-->
<layout-qr-code :src="info.CORPINFO_ID" />
<layout-qr-code
:src="
locationOrigin +
'/#/mobile/information?CORPINFO_ID=' +
info.CORPINFO_ID
"
/>
</div>
<template #footer>
<el-button @click="visible = false">关闭</el-button>
@ -32,6 +37,7 @@ const props = defineProps({
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
const locationOrigin = window.location.origin;
</script>
<style scoped lang="scss"></style>

View File

@ -98,7 +98,7 @@
entrance &&
router.push({
path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
query: { HIDDEN_ID: row.HIDDEN_ID, LIST_TYPE: listType },
})
"
>
@ -187,7 +187,7 @@
entrance &&
router.push({
path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
query: { HIDDEN_ID: row.HIDDEN_ID, LIST_TYPE: listType },
})
"
>
@ -259,7 +259,7 @@
@click="
router.push({
path: hiddenPath[entrance],
query: { HIDDEN_ID: row.HIDDEN_ID },
query: { HIDDEN_ID: row.HIDDEN_ID, LIST_TYPE: listType },
})
"
>
@ -303,6 +303,7 @@ import {
getChecklistInspectionStatusRecordView,
getCustomCheckRecordView,
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
getCustomCheckListOtherHiddenList,
} from "@/request/hazard_investigation.js";
import { getViewImg } from "@/request/api.js";
import { PRINT_STYLE } from "@/assets/js/constant.js";
@ -349,7 +350,7 @@ const data = reactive({
mapDialogVisible: false,
});
const { list: inspectionList } = useListData(
props.listType === 1
props.listType === "1"
? getChecklistInspectionStatusRecordView
: getCustomCheckRecordView,
{
@ -364,7 +365,9 @@ const { list: inspectionList } = useListData(
}
);
const { list: otherHiddenList } = useListData(
getChecklistInspectionStatusRecordViewOtherHiddenDangerList,
props.listType === "1"
? getChecklistInspectionStatusRecordViewOtherHiddenDangerList
: getCustomCheckListOtherHiddenList,
{
otherParams: { CHECKRECORD_ID: props.checkRecordId },
usePagination: false,

View File

@ -116,7 +116,7 @@
DATESTART: row.DATESTART,
DATEEND: row.DATEEND,
LIST_TYPE: LIST_TYPE,
LIST_ID,
ID: LIST_ID,
},
})
"

View File

@ -1,9 +1,19 @@
<template>
<inspection entrance="supplementaryRecording" />
<inspection entrance="supplementaryRecording" v-if="LIST_TYPE === '1'" />
<inspection-custom
entrance="supplementaryRecording"
v-if="LIST_TYPE === '2'"
/>
</template>
<script setup>
import Inspection from "../inventory_troubleshooting/inspect.vue";
import InspectionCustom from "../inventory_troubleshooting/inspect_custom.vue";
import { useRoute } from "vue-router";
const route = useRoute();
const { LIST_TYPE } = route.query;
</script>
<style scoped></style>

View File

@ -235,9 +235,9 @@ const fnRecovery = debounce(
async (ID) => {
await ElMessageBox.confirm("确定要恢复吗?", { type: "warning" });
if (tabName.name === "risk") {
await setDeleteInventoryManagementRecovery({ ID });
await setDeleteInventoryManagementRecovery({ LISTMANAGER_ID: ID });
} else {
await setDeleteCustomRecovery({ ID });
await setDeleteCustomRecovery({ CUSTOM_ID: ID });
}
ElMessage.success("恢复成功");

View File

@ -1,6 +1,6 @@
<template>
<layout-card>
<layout-hidden-view :hidden-id="HIDDEN_ID" />
<layout-hidden-view :hidden-id="HIDDEN_ID" :list-type="LIST_TYPE" />
</layout-card>
</template>
@ -9,7 +9,7 @@ import LayoutHiddenView from "@/components/hidden_view/index.vue";
import { useRoute } from "vue-router";
const route = useRoute();
const { HIDDEN_ID } = route.query;
const { HIDDEN_ID, LIST_TYPE } = route.query;
</script>
<style scoped lang="scss"></style>

View File

@ -132,8 +132,8 @@
CHECKRECORD_ID: row.CHECKRECORD_ID,
DATESTART: row.DATESTART,
DATEEND: row.DATEEND,
LISTMANAGER_ID: row.LISTMANAGER_ID,
LIST_TYPE,
ID: row.LISTMANAGER_ID,
LIST_TYPE:row.LIST_TYPE,
},
})
"

View File

@ -66,21 +66,7 @@
</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-form-item label="负责人" prop="USER_ID">
<el-select v-model="data.form.USER_ID">
<el-option
v-for="item in data.userList"
@ -208,11 +194,16 @@
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="操作类型">
<el-table-column prop="CHECK_CONTENT" label="检查内容" width="200" />
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="200" />
<el-table-column prop="REFERENCE_BASIS" label="参考依据" width="200" />
<el-table-column prop="CHECK_QUALIFIED" label="检查合格项" width="200" />
<el-table-column
prop="CHECK_UNQUALIFIED"
label="检查不合格项"
width="200"
/>
<el-table-column label="操作类型" width="100">
<template v-slot="{ row }">
<span v-if="row.OPERATION_TYPE === 1"></span>
<span v-if="row.OPERATION_TYPE === 2"></span>
@ -231,9 +222,11 @@
:category-data="data.categoryList"
@submit="fnAddStandardSubmit"
/>
<select-checkstandard
<select-custom
v-model:visible="data.selectStandardDialogVisible"
v-model:list-data="data.listAll"
:standard-data="data.checkStandardList"
:category-data="data.categoryList"
@submit="fnSelectStandardSubmit"
/>
</layout-card>
@ -257,6 +250,7 @@ import {
} from "@/request/data_dictionary.js";
import { useRoute, useRouter } from "vue-router";
import {
getCheckStandardManagementView,
setCheckStandardManagementAdd,
setCheckStandardManagementEdit,
} from "@/request/hazard_investigation.js";
@ -264,11 +258,11 @@ 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";
import SelectCustom from "./components/select_custom.vue";
const route = useRoute();
const router = useRouter();
const { LISTMANAGER_ID } = route.query;
const { ID } = route.query;
const userStore = useUserStore();
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
const rules = {
@ -329,7 +323,6 @@ const data = reactive({
CHECK_QUALIFIED: "",
CHECK_UNQUALIFIED: "",
OPERATION_TYPE: "",
COMMON_ITEM_SORT: "",
letItemType: "",
letCategoryType: "",
},
@ -342,13 +335,15 @@ 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 fnGetData = async () => {
if (!ID) return;
const resData = await getCheckStandardManagementView({ ID });
data.form = resData.pd;
data.form.dates = [resData.pd.START_DATE, resData.pd.END_DATE];
data.list = resData.varList;
data.listAll = [...resData.varList];
};
fnGetData();
const fnDepartmentChange = () => {
data.postList = [];
data.userList = [];
@ -394,7 +389,6 @@ const fnTableSelection = async () => {
});
};
const fnAddStandardSubmit = (item) => {
console.log(item);
data.list.push(item);
data.listAll.push(item);
fnTableSelection();
@ -423,7 +417,7 @@ const fnSubmit = debounce(
END_DATE: data.form.dates[1],
BAO_BAO_TYPE: data.form.BAO_BAO_TYPE || "0",
};
!LISTMANAGER_ID
!ID
? await setCheckStandardManagementAdd(params)
: await setCheckStandardManagementEdit(params);
ElMessage.success("保存成功");
@ -451,7 +445,6 @@ const fnCheckStandard = async () => {
});
};
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);

View File

@ -9,44 +9,71 @@
<el-col :span="24">
<el-form-item label="检查类别" prop="CHECK_CATEGORY">
<layout-select-create
v-if="type === 'add'"
:list="categoryData"
v-model="data.CHECK_CATEGORY_NAME"
@change="goChange"
/>
<el-input
v-if="type !== 'add'"
disabled
v-model="form.CHECK_CATEGORY_NAME"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查项目" prop="CHECK_ITEM">
<layout-select-create
v-if="type === 'add'"
:list="data.itemData"
v-model="data.CHECK_ITEM_NAME"
@change="goChange"
/>
<el-input
v-if="type !== 'add'"
disabled
v-model="form.CHECK_ITEM_NAME"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查内容" prop="CHECK_CONTENT">
<el-input v-model="form.CHECK_CONTENT" />
<el-input
v-model="form.CHECK_CONTENT"
placeholder="请输入检查内容"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查标准" prop="CHECK_STANDARD">
<el-input v-model="form.CHECK_STANDARD" />
<el-input
v-model="form.CHECK_STANDARD"
placeholder="请输入检查标准"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="参考依据" prop="REFERENCE_BASIS">
<el-input v-model="form.REFERENCE_BASIS" />
<el-input
v-model="form.REFERENCE_BASIS"
placeholder="请输入参考依据"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查合格项" prop="CHECK_QUALIFIED">
<el-input v-model="form.CHECK_QUALIFIED" />
<el-input
v-model="form.CHECK_QUALIFIED"
placeholder="请输入检查合格项"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查不合格项" prop="CHECK_UNQUALIFIED">
<el-input v-model="form.CHECK_UNQUALIFIED" />
<el-input
v-model="form.CHECK_UNQUALIFIED"
placeholder="请输入检查不合格项"
/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -57,14 +84,6 @@
</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>
@ -102,6 +121,11 @@ const props = defineProps({
required: true,
default: () => [],
},
listData: {
type: Array,
required: true,
default: () => [],
},
type: {
type: String,
required: true,
@ -122,16 +146,6 @@ const data = reactive({
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";
@ -141,7 +155,10 @@ const goChange = (event) => {
form.value.CHECK_CATEGORY_NAME = data.CHECK_CATEGORY_NAME;
}
if (form.value.letCategoryType === "select" && event) {
data.itemData = [];
getItemList(data.CHECK_CATEGORY_NAME);
} else {
data.itemData = [];
}
if (fnFindValueInList(data.itemData, data.CHECK_ITEM_NAME)) {
form.value.letItemType = "select";
@ -188,7 +205,7 @@ const rules = {
],
REFERENCE_BASIS: [
{
required: true,
required: false,
message: "参考依据不能为空",
trigger: "change",
},

View File

@ -0,0 +1,276 @@
<template>
<el-dialog
v-model="visible"
title="导入排查清单"
:before-close="fnClose"
width="70%"
>
<el-divider content-position="left">隐患排查清单信息</el-divider>
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="6">
<el-form-item label="清单名称" prop="NAME">
<el-input v-model="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="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="form.BAO_BAO_TYPE === '1'" :span="6">
<el-form-item label="任务类型" prop="TASK_TYPE">
<el-select v-model="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="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="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 label="负责人" prop="USER_ID">
<el-select v-model="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="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="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="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="form.TYPE === 'listType0005' || form.TYPE === 'listType0006'"
:key="form.TYPE"
:span="6"
>
<el-form-item label="排查日期" prop="dates">
<el-date-picker
v-model="form.dates"
:disabled-date="
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">导入Excel文件</el-divider>
<el-form-item prop="file">
<layout-upload v-model:file-list="form.file" accept=".xls" />
</el-form-item>
<template #footer>
<el-button @click="fnExportTemplates"></el-button>
<el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"> </el-button>
</template>
</el-dialog>
</template>
<script setup>
import { reactive, ref, watchEffect } from "vue";
import { useVModels } from "@vueuse/core";
import { debounce } from "throttle-debounce";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
import LayoutDepartment from "@/components/department/index.vue";
import { useUserStore } from "@/pinia/user.js";
import {
layoutFnGetInventoryType,
layoutFnGetTaskType,
layoutFnGetTroubleshootingCycle,
layoutFnGetTroubleshootingType,
} from "@/assets/js/data_dictionary.js";
import { getPostListAll, getUserListAll } from "@/request/data_dictionary.js";
import LayoutUpload from "@/components/upload/index.vue";
import { ElMessage, ElMessageBox } from "element-plus";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
form: {
type: Object,
required: true,
default: () => ({}),
},
});
const VITE_TEMPLATE_URL = import.meta.env.VITE_TEMPLATE_URL;
const emits = defineEmits(["update:visible", "update:form", "submit"]);
const { visible, form } = useVModels(props, emits);
const formRef = ref(null);
const userStore = useUserStore();
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
const taskTypeList = await layoutFnGetTaskType();
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();
const inventoryTypeList = await layoutFnGetInventoryType();
const data = reactive({
nameValue: "",
CHECK_CATEGORY_NAME: "",
CHECK_ITEM_NAME: "",
standardData: props.standardData,
itemData: [],
postList: [],
importDialogVisible: false,
});
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" }],
file: [{ required: true, message: "附件不能为空", trigger: "change" }],
};
const fnDepartmentChange = () => {
data.postList = [];
data.userList = [];
form.value.POST_ID = "";
form.value.USER_IDS = [];
form.value.USER_ID = "";
};
const fnPostChange = () => {
data.userList = [];
form.value.USER_IDS = [];
form.value.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 fnClose = () => {
// form.value.resetFields();
visible.value = false;
};
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
if (!form.value.file[0]) {
ElMessage.warning("请上传文件!");
}
form.value.FFILE = form.value.file[0].raw;
form.value.FFILEName = form.value.file[0].name;
emits("submit", form.value);
fnClose();
},
{ atBegin: true }
);
const fnExportTemplates = async () => {
await ElMessageBox.confirm("确定要下载excel模板吗", { type: "warning" });
window.open(
VITE_TEMPLATE_URL + "/template/hiddenDangerCheckStandardTemplate.xls"
);
};
watchEffect(() => {
if (form.value.DEPARTMENT_ID) fnGetPost(form.value.DEPARTMENT_ID);
if (form.value.POST_ID) fnGetUser(form.value.POST_ID);
});
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,59 @@
<template>
<el-dialog v-model="visible" title="设置包保责任类型">
<layout-table :data="list" :show-pagination="false">
<el-table-column type="index" label="序号" width="55" />
<el-table-column prop="DESCRIBE" label="描述" />
<el-table-column label="操作" width="100px">
<template v-slot="{ row }">
<el-button type="primary" text link @click="fnCheck(row)">
选择
</el-button>
</template>
</el-table-column>
</layout-table>
<template #footer>
<el-button @click="fnClose"></el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
import useListData from "@/assets/js/useListData.js";
import { setCustomInsuranceCoverageList } from "@/request/hazard_investigation.js";
import { watchEffect } from "vue";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
info: {
type: Object,
required: true,
default: () => ({}),
},
});
const emits = defineEmits(["update:visible", "check"]);
const visible = useVModel(props, "visible", emits);
const { list, fnGetData } = useListData(setCustomInsuranceCoverageList, {
usePagination: false,
immediate: false,
});
watchEffect(() => {
if (props.visible)
fnGetData({
WORK_TYPE: props.info.TASK_TYPE_NUM,
});
});
const fnClose = () => {
visible.value = false;
};
const fnCheck = (row) => {
emits("check", row);
fnClose();
};
</script>
<style scoped lang="scss"></style>

View File

@ -77,6 +77,13 @@
<el-button native-type="reset" @click="fnResetPaginationTransfer">
重置
</el-button>
<el-button
v-if="name !== 'risk'"
type="primary"
@click="data.importCustomDialogVisible.visible = true"
>
导入
</el-button>
</el-form-item>
</el-col>
</el-row>
@ -95,7 +102,7 @@
</template>
</el-table-column>
<el-table-column prop="NAME" label="清单名称" />
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
<el-table-column prop="POST_NAME" label="岗位" />
<el-table-column
prop="USER_NAME"
@ -143,10 +150,15 @@
text
link
@click="
router.push({
path: '/hazard_investigation/inventory_management/print',
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
})
name === 'risk'
? router.push({
path: '/hazard_investigation/inventory_management/print',
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
})
: router.push({
path: '/hazard_investigation/inventory_management/print_custom',
query: { ID: row.CUSTOM_ID },
})
"
>
打印
@ -171,10 +183,15 @@
text
link
@click="
router.push({
path: '/hazard_investigation/inventory_management/edit',
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
})
name === 'risk'
? router.push({
path: '/hazard_investigation/inventory_management/edit',
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
})
: router.push({
path: '/hazard_investigation/inventory_management/edit_custom',
query: { ID: row.CUSTOM_ID },
})
"
>
修改
@ -240,10 +257,15 @@
text
link
@click="
router.push({
path: '/hazard_investigation/inventory_management/insurance_coverage',
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
})
name === 'risk'
? router.push({
path: '/hazard_investigation/inventory_management/insurance_coverage',
query: { LISTMANAGER_ID: row.LISTMANAGER_ID },
})
: router.push({
path: '/hazard_investigation/inventory_management/insurance_coverage_custom',
query: { ID: row.CUSTOM_ID },
})
"
>
设置包保责任类型
@ -259,7 +281,7 @@
path:
name === 'risk'
? '/hazard_investigation/inventory_management/add'
: '/hazard_investigation/inventory_management/check_standard_add',
: '/hazard_investigation/inventory_management/add_custom',
})
"
>
@ -283,6 +305,7 @@
</layout-table>
<list-qr-code
:info="data.listQrCodeDialog.info"
:type="data.listQrCodeDialog.TYPE"
v-model:visible="data.listQrCodeDialog.visible"
/>
<inspection-route
@ -290,6 +313,11 @@
v-model:list="data.inspectionRouteDialog.list"
:info="data.inspectionRouteDialog.info"
/>
<import-custom
v-model:visible="data.importCustomDialogVisible.visible"
v-model:form="data.importCustomDialogVisible.form"
@submit="fnSubmitImport"
/>
</div>
</template>
@ -316,6 +344,7 @@ import {
setCustomBatchDeleteTemporary,
setCustomDisable,
setCustomEnable,
setCustomImport,
setInventoryManagementBatchDelete,
setInventoryManagementBatchDeleteTemporary,
setInventoryManagementDisable,
@ -324,6 +353,7 @@ import {
import ListQrCode from "./list_qr_code.vue";
import InspectionRoute from "./inspection_route.vue";
import { useRouter } from "vue-router";
import ImportCustom from "./import_custom.vue";
const tabName = defineProps({
name: {
@ -348,12 +378,32 @@ const data = reactive({
listQrCodeDialog: {
visible: false,
info: {},
TYPE: "",
},
inspectionRouteDialog: {
visible: false,
list: [],
info: {},
},
importCustomDialogVisible: {
visible: false,
form: {
NAME: "",
BAO_BAO_TYPE: "",
TASK_TYPE: "",
DEPARTMENT_ID: "",
POST_ID: "",
USER_IDS: [],
USER_ID: "",
SCREENTYPE: "",
PERIOD: "",
TYPE: "",
dates: [],
file: [],
FFILE: [],
FFILEName: "",
},
},
});
const fnGetDataTransfer = () => {
fnGetData({
@ -367,6 +417,7 @@ const fnResetPaginationTransfer = () => {
};
const fnListQRCode = (row) => {
data.listQrCodeDialog.visible = true;
data.listQrCodeDialog.TYPE = tabName.name;
data.listQrCodeDialog.info = row;
};
const fnInspectionRoute = async (row) => {
@ -478,6 +529,11 @@ const fnInheritanceList = () => {
},
});
};
const fnSubmitImport = async (formData) => {
const resData = await setCustomImport(formData);
ElMessage.success(resData.msg);
fnResetPagination();
};
</script>
<style scoped></style>

View File

@ -22,7 +22,9 @@
{{ info.TYPENAME }}
</el-descriptions-item>
</el-descriptions>
<layout-qr-code :src="info.LISTMANAGER_ID" />
<layout-qr-code
:src="type === 'risk' ? info.LISTMANAGER_ID : info.CUSTOM_ID"
/>
<el-divider content-position="left">APP-待排查-清单扫描</el-divider>
</div>
<template #footer>
@ -42,6 +44,11 @@ const props = defineProps({
required: true,
default: false,
},
type: {
type: String,
required: true,
default: String,
},
info: {
type: Object,
required: true,

View File

@ -1,37 +1,45 @@
<template>
<el-dialog title="选择其他检查标准" v-model="visible" width="1500">
<el-form
ref="formRef"
: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-form-item label="检查类型" prop="KEYWORDS" label-width="100px">
<el-select
v-model="searchForm.CHECK_CATEGORY"
@change="getLevelData"
>
<el-option
v-for="item in data.categoryList"
:key="item.DICTIONARY_ID"
:label="item.DICTIONARY_NAME"
:value="item.DICTIONARY_ID"
v-for="item in categoryData"
: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 label="检查项目" prop="DEPARTMENT_ID">
<el-form-item
label="检查项目"
prop="DEPARTMENT_ID"
label-width="100px"
>
<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"
v-for="item in data.itemData"
: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 label="检查内容">
<el-form-item label="检查内容" label-width="100px">
<el-input
v-model="searchForm.OTHERKEYWORDS"
placeholder="请输入关键字"
@ -41,7 +49,7 @@
<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 native-type="reset" @click="fnResetPaginationTransfer">
重置
</el-button>
</el-form-item>
@ -56,22 +64,23 @@
row-key="CUSTOM_ITEM_ID"
>
<el-table-column reserve-selection type="selection" width="55" />
<el-table-column label="序号" width="70">
<el-table-column label="序号" width="55">
<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_CATEGORY_NAME" label="检查类别" width="90" />
<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="操作类型">
<el-table-column prop="CHECK_CONTENT" label="检查内容" width="200" />
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="200" />
<el-table-column prop="REFERENCE_BASIS" label="参考依据" width="200" />
<el-table-column prop="CHECK_QUALIFIED" label="检查合格项" width="200" />
<el-table-column
prop="CHECK_UNQUALIFIED"
label="检查不合格项"
width="200"
/>
<el-table-column label="操作类型" width="100">
<template v-slot="{ row }">
<span v-if="row.OPERATION_TYPE === 1"></span>
<span v-if="row.OPERATION_TYPE === 2"></span>
@ -79,7 +88,7 @@
</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 type="primary" text link @click="goEdit(row)"
>修改</el-button
>
</template>
@ -90,16 +99,29 @@
<el-button type="primary" @click="fnSubmit"> </el-button>
</template>
</el-dialog>
<add-checkstandard
title="修改检查标准"
type="edit"
v-model:visible="data.editOrEditDialog.visible"
v-model:form="data.editOrEditDialog.form"
@submit="fnEditStandardSubmit"
/>
</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 {
getCheckstandardCommonList,
setCommonItemEdit,
} from "@/request/hazard_investigation.js";
import { reactive, ref, watch } from "vue";
import { serialNumber } from "@/assets/js/utils.js";
import { differenceWith } from "lodash-es";
import { ElMessage } from "element-plus";
import AddCheckstandard from "@/views/hazard_investigation/inventory_management/components/checkstandard_add.vue";
import useFormValidate from "@/assets/js/useFormValidate.js";
const props = defineProps({
visible: {
@ -112,11 +134,24 @@ const props = defineProps({
required: true,
default: () => [],
},
standardData: {
type: Array,
required: true,
default: () => [],
},
categoryData: {
type: Array,
required: true,
default: () => [],
},
});
const formRef = ref(null);
const data = reactive({
checkStandardList: [],
categoryList: [],
itemList: [],
itemData: [],
editOrEditDialog: {
visible: false,
form: {},
},
});
const emits = defineEmits(["update:visible", "submit"]);
const visible = useVModel(props, "visible", emits);
@ -125,23 +160,15 @@ const { list, searchForm, pagination, fnGetData, fnResetPagination, tableRef } =
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) => {
searchForm.value.CHECK_ITEM = "";
data.itemData = [];
props.standardData.forEach((item) => {
if (
item.PARENT_ID !== "0" &&
item.PARENT_IDS.contains(searchForm.CHECK_CATEGORY)
item.PARENT_IDS.includes(searchForm.value.CHECK_CATEGORY)
) {
this.itemList.push(item);
data.itemData.push(item);
}
});
};
@ -167,6 +194,27 @@ const fnSubmit = debounce(
},
{ atBegin: true }
);
const goEdit = (row) => {
data.editOrEditDialog.form = row;
data.editOrEditDialog.visible = true;
};
const fnEditStandardSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
const params = {
...data.editOrEditDialog.form,
};
await setCommonItemEdit(params);
ElMessage.success("保存成功");
},
{ atBegin: true }
);
const fnResetPaginationTransfer = () => {
searchForm.value = [];
data.itemData = [];
fnResetPagination();
};
</script>
<style scoped lang="scss"></style>

View File

@ -1,385 +0,0 @@
<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>

View File

@ -0,0 +1,127 @@
<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.DEPARTMENT_NAME }}
</el-descriptions-item>
<el-descriptions-item label="包保责任人岗位">
{{ 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="包保责任人">
{{ info.USER_NAME }}
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">检查内容</el-divider>
<layout-table :data="list" :show-pagination="false">
<el-table-column type="index" label="序号" width="55" />
<el-table-column
prop="CHECK_CATEGORY_NAME"
label="检查类别"
width="120"
/>
<el-table-column prop="CHECK_ITEM_NAME" label="检查项目" width="120" />
<el-table-column prop="CHECK_CONTENT" label="检查内容" width="200" />
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="200" />
<el-table-column prop="REFERENCE_BASIS" label="参考依据" width="200" />
<el-table-column prop="CHECK_QUALIFIED" label="检查合格项" width="150" />
<el-table-column
prop="CHECK_UNQUALIFIED"
label="检查不合格项"
width="150"
/>
<el-table-column label="操作类型" width="100">
<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="BAO_BAO_NUM_NAME"
label="包保任务对应项"
width="150"
/>
<el-table-column label="操作">
<template v-slot="{ row, $index }">
<el-button type="primary" text link @click="fnSelect(row, $index)">
选择
</el-button>
</template>
</el-table-column>
</layout-table>
<div class="tc mt-10">
<el-button type="primary" @click="fnSubmit"></el-button>
</div>
<insurance-coverage-select-custom
v-model:visible="data.selectDialog.visible"
:info="data.selectDialog.info"
@check="fnCheck"
/>
</layout-card>
</template>
<script setup>
import {
getCheckStandardManagementView,
setCustomInsuranceCoverageSave,
} from "@/request/hazard_investigation.js";
import { useRoute, useRouter } from "vue-router";
import { reactive, ref } from "vue";
import { debounce } from "throttle-debounce";
import { ElMessage } from "element-plus";
import InsuranceCoverageSelectCustom from "./components/insurance_coverage_select_custom.vue";
import useListData from "@/assets/js/useListData.js";
const route = useRoute();
const router = useRouter();
const { ID } = route.query;
const info = ref({});
const data = reactive({
selectDialog: {
visible: false,
info: {},
index: 111,
},
});
const { list } = useListData(getCheckStandardManagementView, {
otherParams: { ID },
usePagination: false,
callbackFn: (list, resData) => {
info.value = resData.pd;
},
});
const fnSelect = (row, index) => {
data.selectDialog.visible = true;
data.selectDialog.info = row;
data.selectDialog.index = index;
};
const fnCheck = (row) => {
list.value[data.selectDialog.index].BAO_BAO_NUM_NAME = row.DESCRIBE;
list.value[data.selectDialog.index].BAO_BAO_NUM = row.TASK_NUM;
};
const fnSubmit = debounce(
1000,
async () => {
await setCustomInsuranceCoverageSave({
list: JSON.stringify(list.value),
});
ElMessage.success("保存成功");
router.back();
},
{ atBegin: true }
);
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,136 @@
<template>
<layout-card>
<div id="printContainer">
<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="排查日期"
:span="2"
v-if="info.TYPE === 'listType0006'"
>
{{ info.START_DATE }} - {{ info.END_DATE }}
</el-descriptions-item>
<template v-if="info.BAO_BAO_TYPE === '1'">
<el-descriptions-item label="是否包保责任人任务">
</el-descriptions-item>
<el-descriptions-item label="包保责任人">
{{ info.USER_NAME }}
</el-descriptions-item>
</template>
</el-descriptions>
<el-divider content-position="left">检查内容</el-divider>
<div class="print_no_use">
<layout-table :data="list" :show-pagination="false">
<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="200" />
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="200" />
<el-table-column
prop="REFERENCE_BASIS"
label="参考依据"
width="200"
/>
<el-table-column
prop="CHECK_QUALIFIED"
label="检查合格项"
width="200"
/>
<el-table-column
prop="CHECK_UNQUALIFIED"
label="检查不合格项"
width="200"
/>
<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>
<table class="print_use">
<thead>
<tr>
<th width="50">序号</th>
<th width="100">检查类别</th>
<th width="100">检查项目</th>
<th width="100">检查内容</th>
<th>检查标准</th>
<th>检查合格项</th>
<th>检查不合格项</th>
<th width="100">操作类型</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in list" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.CHECK_CATEGORY_NAME }}</td>
<td>{{ item.CHECK_ITEM_NAME }}</td>
<td>{{ item.CHECK_CONTENT }}</td>
<td>{{ item.CHECK_STANDARD }}</td>
<td>{{ item.CHECK_QUALIFIED }}</td>
<td>{{ item.CHECK_UNQUALIFIED }}</td>
<td>{{ item.OPERATION_TYPE === 1 ? "选择" : "填写" }}</td>
</tr>
</tbody>
</table>
</div>
<div class="tc mt-10">
<el-button v-print="'#printContainer'" type="primary"> </el-button>
</div>
<div v-html="PRINT_STYLE" />
</layout-card>
</template>
<script setup>
import { getCheckStandardManagementView } from "@/request/hazard_investigation.js";
import { useRoute } from "vue-router";
import { ref } from "vue";
import { PRINT_STYLE } from "@/assets/js/constant.js";
import useListData from "@/assets/js/useListData.js";
const route = useRoute();
const { ID } = route.query;
const info = ref({});
const { list } = useListData(getCheckStandardManagementView, {
otherParams: { ID },
usePagination: false,
callbackFn: (list, resData) => {
info.value = resData.pd;
},
});
</script>
<style scoped lang="scss"></style>

View File

@ -2,6 +2,11 @@
<el-dialog v-model="visible" title="检查照片" :on-close="fnClose">
<el-form ref="formRef" :model="form" label-width="100px">
<el-row>
<el-col v-if="writeresults" :span="24">
<el-form-item label="检查结果" prop="CHECK_RESULT">
<el-input v-model="form.CHECK_RESULT" placeholder="请输入检查结果" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检查照片" prop="file">
<layout-upload
@ -46,8 +51,18 @@ const props = defineProps({
required: true,
default: "",
},
writeresults: {
type: Boolean,
required: false,
default: false,
},
index: {
type: Number,
required: false,
default: 0,
},
});
const emits = defineEmits(["update:visible", "update:form"]);
const emits = defineEmits(["update:visible", "update:form", "submit"]);
const { visible, form } = useVModels(props, emits);
const formRef = ref(null);
const fnClose = () => {
@ -65,6 +80,7 @@ const fnSubmit = debounce(
formData.append("FOREIGN_KEY", props.id);
formData.append("TYPE", 14);
await setUploadImg(formData);
emits("submit", form.value.CHECK_RESULT, props.index);
fnClose();
ElMessage.success("保存成功");
},

View File

@ -24,8 +24,11 @@ import { debounce } from "throttle-debounce";
import { ElMessage } from "element-plus";
import {
setHiddenDangerAdd,
setCustomHiddenDangerAdd,
setHiddenDangerEdit,
setCustomHiddenDangerEdit,
setHiddenDangerListAdd,
setCustomHiddenDangerListAdd,
} from "@/request/hazard_investigation.js";
import { setUploadImg } from "@/request/api.js";
import LayoutHiddenAdd from "@/components/hidden_add/index.vue";
@ -47,11 +50,18 @@ const props = defineProps({
required: true,
default: () => ({}),
},
// title
type: {
type: String,
required: true,
default: "",
},
// 1 2
listType: {
type: Number,
required: false,
default: 1,
},
hiddenType: {
type: String,
required: true,
@ -92,7 +102,9 @@ const fnSubmit = debounce(
HIDDENTYPE2: form.value.HIDDENTYPE[1],
HIDDENTYPE3: form.value.HIDDENTYPE[2],
HIDDENTYPE_NAME: hiddenAddRef.value.hiddenDangerTypeLabel(),
// id
LISTMANAGER_ID: props.listManagerId,
CUSTOM_ID: props.listManagerId,
};
if (props.hiddenType === "unqualified") {
if (!props.longitude && !props.latitude) {
@ -101,6 +113,7 @@ const fnSubmit = debounce(
}
params = {
...params,
// 2
SOURCE: "2",
RISK_UNIT: props.info.RISKUNITNAME,
IDENTIFICATION: props.info.PARTSNAME,
@ -113,7 +126,10 @@ const fnSubmit = debounce(
LONGITUDE: props.longitude,
LATITUDE: props.latitude,
};
const resData = await setHiddenDangerAdd(params);
const resData =
props.listType === 1
? await setHiddenDangerAdd(params)
: await setCustomHiddenDangerAdd(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
if (props.hiddenType === "otherHidden") {
@ -124,11 +140,17 @@ const fnSubmit = debounce(
HAVESCHEME: 0,
};
if (props.type === "add") {
const resData = await setHiddenDangerListAdd(params);
const resData =
props.listType === 1
? await setHiddenDangerListAdd(params)
: await setCustomHiddenDangerListAdd(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
if (props.type === "edit") {
const resData = await setHiddenDangerEdit(params);
const resData =
props.listType === 1
? await setHiddenDangerEdit(params)
: await setCustomHiddenDangerEdit(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
}
@ -144,7 +166,7 @@ const fnSubmit = debounce(
if (form.value.rectifyImgs[i].raw)
await fnUploadImage(currentHiddenId, form.value.rectifyImgs[i].raw, 4);
}
emits("submit", currentHiddenId);
emits("submit", currentHiddenId, form.value.HIDDENDESCR);
ElMessage.success("保存成功");
fnClose();
},

View File

@ -262,7 +262,6 @@ import {
setHiddenDangerDelete,
setInventoryTroubleshootingSubmit,
setChecklistInspectionStatusRecordSupplementaryRecordingSubmit,
getCheckStandardManagementView,
} from "@/request/hazard_investigation.js";
import { useRoute, useRouter } from "vue-router";
import useListData from "@/assets/js/useListData.js";
@ -284,7 +283,7 @@ import { WarningFilled } from "@element-plus/icons-vue";
const route = useRoute();
const router = useRouter();
const { LIST_ID, CHECKRECORD_ID, DATEEND, DATESTART, LIST_TYPE } = route.query;
const { ID, CHECKRECORD_ID, DATEEND, DATESTART } = route.query;
// entrance: supplementaryRecording
const props = defineProps({
entrance: {
@ -338,32 +337,24 @@ const data = reactive({
},
},
});
const { list: inspectionList } = useListData(
LIST_TYPE === "1"
? getInventoryManagementView
: getCheckStandardManagementView,
{
otherParams:
LIST_TYPE === "1" ? { LISTMANAGER_ID: LIST_ID } : { ID: LIST_ID },
usePagination: false,
callbackFn: (list, resData) => {
if (LIST_TYPE === "1") {
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;
}
}
const { list: inspectionList } = useListData(getInventoryManagementView, {
otherParams: { LISTMANAGER_ID: 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;
},
}
);
}
info.value = resData.pd;
},
});
const { list: otherHiddenList, fnGetData: fnGetOtherHidden } = useListData(
getInventoryTroubleshootingOtherHiddenList,
{
otherParams: { LIST_ID },
otherParams: { LISTMANAGER_ID: ID },
usePagination: false,
key: "hiddenList",
}
@ -510,7 +501,7 @@ const fnSubmit = debounce(
const inspectedList = cloneDeep(data.form.inspectedList);
if (inspectedList.length > 0) inspectedList.splice(0, 1);
const params = {
LIST_ID,
LISTMANAGER_ID: ID,
LIST_NAME: info.value.NAME,
CHECK_TIME: data.form.CHECK_TIME,
DESCR: data.form.DESCR,

View File

@ -37,23 +37,20 @@
<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_RESULT" label="检查结果" />
<el-table-column label="操作" width="280">
<el-table-column
prop="CHECK_CATEGORY_NAME"
label="检查类别"
width="150"
/>
<el-table-column prop="CHECK_ITEM_NAME" label="检查项目" width="150" />
<el-table-column prop="CHECK_CONTENT" label="检查内容" width="200" />
<el-table-column prop="CHECK_STANDARD" label="检查标准" width="250" />
<el-table-column prop="REFERENCE_BASIS" label="参考依据" width="250" />
<el-table-column prop="CHECK_RESULT" label="检查结果" width="200" />
<el-table-column label="操作">
<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-radio-group :disabled="row.HASHIDDEN > 0" v-model="row.ISNORMAL">
<el-radio :label="0" @click.prevent="fnQualified($index, row)">
合格
<el-tooltip
content="注意:补录时,不允许添加隐患"
@ -84,14 +81,12 @@
<el-divider content-position="left">其他隐患</el-divider>
<div class="tr mb-10">
<el-button
v-if="data.canDoCheck"
:disabled="entrance === 'supplementaryRecording'"
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" />
@ -100,7 +95,6 @@
<template v-slot="{ row }">
<el-button
type="primary"
:disabled="data.canDoCheck"
text
link
@click="fnAddOrEditOtherHidden(row, 'edit')"
@ -109,7 +103,6 @@
</el-button>
<el-button
type="primary"
:disabled="data.canDoCheck"
text
link
@click="fnDeleteOtherHidden(row.HIDDEN_ID)"
@ -191,7 +184,6 @@
<el-col :span="2">
<el-form-item label-width="10px">
<el-button
:disabled="!data.canDoCheck"
type="primary"
v-if="index === 0"
@click="fnAddInspectedList"
@ -199,7 +191,6 @@
添加
</el-button>
<el-button
:disabled="!data.canDoCheck"
type="danger"
v-if="index !== 0"
@click="data.form.inspectedList.splice(index, 1)"
@ -228,26 +219,28 @@
</el-row>
</el-form>
<div class="tc mt-10">
<el-button :disabled="!data.canDoCheck" type="primary" @click="fnSubmit"
>保存</el-button
>
<el-button 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"
:index="data.qualifiedDialog.index"
:writeresults="data.qualifiedDialog.writeresults"
@submit="fnResultsSubmit"
/>
<un-qualified
v-model:visible="data.unQualifiedDialog.visible"
v-model:form="data.unQualifiedDialog.form"
:list-manager-id="ID"
:type="data.unQualifiedDialog.type"
:hidden-type="data.unQualifiedDialog.hiddenType"
:info="{ ...data.unQualifiedDialog.info, ...info.value }"
:longitude="data.longitude"
:latitude="data.latitude"
:list-type="2"
@submit="fnHiddenSubmit"
/>
<!-- <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>
@ -255,8 +248,8 @@
import { nextTick, onMounted, reactive, ref } from "vue";
import {
getCheckStandardOtherHiddenList,
getHiddenDangerView,
setHiddenDangerDelete,
getCustomHiddenDangerView,
setCustomHiddenDangerDelete,
getCheckStandardManagementView,
setCheckStandardSupplementaryRecordingSubmit,
setCheckStandardSubmit,
@ -264,6 +257,8 @@ import {
import { useRoute, useRouter } from "vue-router";
import useListData from "@/assets/js/useListData.js";
import LayoutDepartment from "@/components/department/index.vue";
import UnQualified from "./components/un_qualified.vue";
import {
addingPrefixToFile,
getFileSuffix,
@ -298,8 +293,6 @@ const info = ref({});
const data = reactive({
longitude: 0,
latitude: 0,
//
canDoCheck: true,
form: {
CHECK_TIME: "",
REASON: "",
@ -307,6 +300,8 @@ const data = reactive({
},
qualifiedDialog: {
visible: false,
writeresults: false,
index: 0,
RECORDITEM_ID: "",
form: { file: [] },
},
@ -338,11 +333,11 @@ const { list: inspectionList } = useListData(getCheckStandardManagementView, {
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;
if (props.entrance === "supplementaryRecording") {
continue;
}
list[i].CHECK_RESULT = "不涉及";
if (list[i].HASHIDDEN <= 0) list[i].ISNORMAL = 2;
}
info.value = resData.pd;
},
@ -368,6 +363,24 @@ onMounted(() => {
data.latitude = r.latitude;
});
});
const fnResultsSubmit = (CHECK_RESULT, index) => {
inspectionList.value[index].CHECK_RESULT = CHECK_RESULT;
};
const fnHiddenSubmit = (currentHiddenId, HIDDENDESCR) => {
const { hiddenType, index } = data.unQualifiedDialog;
if (hiddenType === "unqualified") {
inspectionList.value[index].ISNORMAL = 1;
inspectionList.value[index].HIDDEN_ID = currentHiddenId;
inspectionList.value[index].CHECK_RESULT = HIDDENDESCR;
inspectionList.value[index].CHECK_UNQUALIFIED = HIDDENDESCR;
nextTick();
}
if (hiddenType === "otherHidden") {
fnGetOtherHidden();
}
};
const fnDisabledDate = (time) => {
if (DATEEND && DATESTART)
return (
@ -376,10 +389,20 @@ const fnDisabledDate = (time) => {
);
else return false;
};
//
const fnQualified = async (index, row) => {
row.CHECK_RESULT = row.CHECK_QUALIFIED;
if (row.HASHIDDEN > 0) return;
// OPERATION_TYPE 1 2
if (row.OPERATION_TYPE === 1) {
row.CHECK_RESULT = row.CHECK_QUALIFIED;
data.qualifiedDialog.writeresults = false;
} else {
data.qualifiedDialog.writeresults = true;
data.qualifiedDialog.form.CHECK_RESULT =
row.CHECK_RESULT !== "不涉及" ? row.CHECK_RESULT : "";
}
data.qualifiedDialog.visible = true;
data.qualifiedDialog.index = index;
await nextTick();
data.qualifiedDialog.RECORDITEM_ID = row.RECORDITEM_ID;
if (row.ISNORMAL === 1) fnRemoveUnqualified(index);
@ -392,10 +415,12 @@ const fnQualified = async (index, row) => {
}
inspectionList.value[index].ISNORMAL = 0;
};
//
const fnNotInvolved = (index, row) => {
if (row.HASHIDDEN > 0 || props.entrance === "supplementaryRecording") return;
fnRemoveUnqualified(index);
inspectionList.value[index].ISNORMAL = 2;
row.CHECK_RESULT = "不涉及";
};
const fnRemoveUnqualified = (index) => {
inspectionList.value[index].HIDDEN_ID = "";
@ -414,11 +439,12 @@ const fnUnqualified = async (index, row) => {
await fnGetHiddenDangerView(inspectionList.value[index].HIDDEN_ID);
}
data.unQualifiedDialog.info = row;
data.unQualifiedDialog.form.HIDDENDESCR = row.CHECK_UNQUALIFIED;
data.unQualifiedDialog.index = index;
data.unQualifiedDialog.hiddenType = "unqualified";
};
const fnGetHiddenDangerView = async (HIDDEN_ID) => {
const resData = await getHiddenDangerView({
const resData = await getCustomHiddenDangerView({
HIDDEN_ID,
});
data.unQualifiedDialog.form = resData.pd;
@ -469,7 +495,7 @@ const fnDeleteOtherHidden = async (HIDDEN_ID) => {
await ElMessageBox.confirm("确定要删除吗?", {
type: "warning",
});
await setHiddenDangerDelete({ HIDDEN_ID });
await setCustomHiddenDangerDelete({ HIDDEN_ID });
fnGetOtherHidden();
};
const fnAddOrEditOtherHidden = async (row, type) => {
@ -478,6 +504,7 @@ const fnAddOrEditOtherHidden = async (row, type) => {
data.unQualifiedDialog.type = type;
data.unQualifiedDialog.info = row;
data.unQualifiedDialog.hiddenType = "otherHidden";
data.unQualifiedDialog.form.HIDDENDESCR = "";
if (type === "edit") await fnGetHiddenDangerView(row.HIDDEN_ID);
};
const fnSubmit = debounce(

View File

@ -89,7 +89,7 @@
查看
</el-button>
<el-button
v-if="row.isUserself && buttonJurisdiction.del"
v-if="row.isUserself && buttonJurisdiction.edit"
type="primary"
text
link

View File

@ -50,6 +50,8 @@
<span v-if="row.SOURCE === '1'"></span>
<span v-else-if="row.SOURCE === '2'">隐患排查</span>
<span v-else-if="row.SOURCE === '3'">隐患排查</span>
<span v-else-if="row.SOURCE === '4'"> 安全环保检查 </span>
<span v-else-if="row.SOURCE === '5'"> 安全环保检查 </span>
</template>
</el-table-column>
<el-table-column

View File

@ -50,6 +50,8 @@
<span v-if="row.SOURCE === '1'"></span>
<span v-else-if="row.SOURCE === '2'">隐患排查</span>
<span v-else-if="row.SOURCE === '3'">隐患排查</span>
<span v-else-if="row.SOURCE === '4'"> 安全环保检查 </span>
<span v-else-if="row.SOURCE === '5'"> 安全环保检查 </span>
</template>
</el-table-column>
<el-table-column
@ -97,7 +99,7 @@
查看
</el-button>
<el-button
v-if="buttonJurisdiction.del"
v-if="buttonJurisdiction.edit"
type="primary"
text
link

View File

@ -447,6 +447,7 @@ const fnInspectDepartmentChange = async (event, index) => {
};
const fnRectificationDepartmentChange = async (event) => {
data.form.RECTIFICATIONOR = "";
data.rectifierUserList = [];
const resData = await getUserListAll({
DEPARTMENT_ID: event,
});

View File

@ -133,7 +133,7 @@
</layout-card>
<flow-chart
v-model:visible="data.flowChartDialog.visible"
:flowList="data.flowChartDialog.flowList"
:flow-list="data.flowChartDialog.flowList"
/>
</div>
</template>

View File

@ -124,7 +124,7 @@ const fnClose = () => {
const fnRemoveRegName = debounce(
1000,
async () => {
form.value.ELECTRONIC_FENCE = "";
form.value.ELECTRONIC_FENCE_NAME = "";
form.value.ELECTRONIC_FENCE_ID = "";
},
{ atBegin: true }

View File

@ -18,8 +18,15 @@
{{ item.DEPT_NAME }}
</el-descriptions-item>
</el-descriptions>
<!-- TODO-->
<layout-qr-code :src="item.IDENTIFICATIONPARTS_ID + item.LEVELID" />
<layout-qr-code
:src="
locationOrigin +
'/#/mobile/identifying_parts/index?IDENTIFICATIONPARTS_ID=' +
item.IDENTIFICATIONPARTS_ID +
'&LEVELID=' +
item.LEVELID
"
/>
</div>
</div>
<template #footer>
@ -47,6 +54,7 @@ const props = defineProps({
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
const locationOrigin = window.location.origin;
</script>
<style scoped lang="scss"></style>

View File

@ -17,8 +17,13 @@
{{ item.HEADMAN }}
</el-descriptions-item>
</el-descriptions>
<!-- TODO-->
<layout-qr-code :src="item.RISKUNIT_ID" />
<layout-qr-code
:src="
locationOrigin +
'/#/mobile/risk_point/index?RISKUNIT_ID=' +
item.RISKUNIT_ID
"
/>
</div>
</div>
<template #footer>
@ -46,6 +51,7 @@ const props = defineProps({
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
const locationOrigin = window.location.origin;
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,113 @@
<template>
<layout-card>
<layout-hidden-view :hidden-id="HIDDEN_ID" @throw-data="info = $event" />
<el-divider content-position="left">安全环保检查验收</el-divider>
<el-form ref="formRef" :model="form" :rules="rules" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item label="是否合格" prop="FINAL_CHECK">
<el-radio-group ref="FINAL_CHECK" v-model="form.FINAL_CHECK">
<el-radio label="1"></el-radio>
<el-radio label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="FINAL_CHECKTIME" label="验收时间">
<el-date-picker
v-model="form.FINAL_CHECKTIME"
type="date"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="FINAL_CHECKDESCR" label="验收意见">
<el-input
v-model="form.FINAL_CHECKDESCR"
type="textarea"
:autosize="{ minRows: 3 }"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="file" label="验收图片">
<layout-upload
v-model:file-list="form.file"
accept=".jpg,.jpeg,.png"
list-type="picture-card"
:limit="99"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="mt-10 tc">
<el-button type="primary" @click="fnSubmit"></el-button>
</div>
</layout-card>
</template>
<script setup>
import LayoutHiddenView from "@/components/hidden_view/index.vue";
import { useRoute, useRouter } from "vue-router";
import { ref } from "vue";
import LayoutUpload from "@/components/upload/index.vue";
import { debounce } from "throttle-debounce";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import { setHazardAssignmentAcceptanceAcceptance } from "@/request/safety_environmental_management.js";
import { setUploadImg } from "@/request/api.js";
const route = useRoute();
const router = useRouter();
const { HIDDEN_ID, INSPECTION_ID } = route.query;
const rules = {
FINAL_CHECK: [
{ required: true, message: "请选择是否合格", trigger: "change" },
],
FINAL_CHECKTIME: [
{ required: true, message: "请选择验收时间", trigger: "change" },
],
FINAL_CHECKDESCR: [
{ required: true, message: "请输入验收意见", trigger: "blur" },
],
file: [{ required: true, message: "请上传验收图片", trigger: "change" }],
};
const info = ref({});
const form = ref({
FINAL_CHECK: "1",
FINAL_CHECKTIME: "",
FINAL_CHECKDESCR: "",
file: [],
});
const formRef = ref(null);
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
await setHazardAssignmentAcceptanceAcceptance({
...form.value,
...info.value,
INSPECTION_ID,
});
await fnUploadImage();
ElMessage.success("提交成功");
router.back();
},
{ atBegin: true }
);
const fnUploadImage = async () => {
const formData = new FormData();
for (let i = 0; i < form.value.file.length; i++) {
if (form.value.file[i].raw)
formData.append("FFILE", form.value.file[i].raw);
}
formData.append("FOREIGN_KEY", HIDDEN_ID);
formData.append("TYPE", 50);
await setUploadImg(formData);
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,108 @@
<template>
<layout-card>
<layout-hidden-view :hidden-id="HIDDEN_ID" @throw-data="info = $event" />
<el-divider content-position="left">隐患整改</el-divider>
<el-form ref="formRef" :model="form" :rules="rules" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item label="隐患级别" prop="HIDDENLEVELNAME">
<el-input v-model="info.HIDDENLEVELNAME" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改完成期限" prop="RECTIFICATIONDEADLINE">
<el-date-picker
v-model="form.RECTIFICATIONDEADLINE"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
type="date"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改负责人部门" prop="RECTIFICATIONDEPT">
<layout-department
v-model="form.RECTIFICATIONDEPT"
@update:model-value="fnRectificationDepartmentChange"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改人" prop="RECTIFICATIONOR">
<el-select v-model="form.RECTIFICATIONOR">
<el-option
v-for="item in rectifierUserList"
:key="item.USER_ID"
:label="item.NAME"
:value="item.USER_ID"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="mt-10 tc">
<el-button type="primary" @click="fnSubmit"></el-button>
</div>
</layout-card>
</template>
<script setup>
import LayoutHiddenView from "@/components/hidden_view/index.vue";
import { useRoute, useRouter } from "vue-router";
import { ref } from "vue";
import LayoutDepartment from "@/components/department/index.vue";
import { getUserListAll } from "@/request/data_dictionary.js";
import { debounce } from "throttle-debounce";
import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElMessage } from "element-plus";
import { setHazardAssignmentAcceptanceAssign } from "@/request/safety_environmental_management.js";
const route = useRoute();
const router = useRouter();
const { HIDDEN_ID, INSPECTION_ID } = route.query;
const rules = {
RECTIFICATIONDEADLINE: [
{ required: true, message: "请选择整改完成期限", trigger: "change" },
],
RECTIFICATIONDEPT: [
{ required: true, message: "请选择整改负责人部门", trigger: "change" },
],
RECTIFICATIONOR: [
{ required: true, message: "请选择整改人", trigger: "change" },
],
};
const info = ref({});
const form = ref({
RECTIFICATIONDEADLINE: "",
RECTIFICATIONDEPT: "",
RECTIFICATIONOR: "",
});
const formRef = ref(null);
const rectifierUserList = ref([]);
const fnRectificationDepartmentChange = async (event) => {
form.value.RECTIFICATIONOR = "";
rectifierUserList.value = [];
const resData = await getUserListAll({
DEPARTMENT_ID: event,
});
rectifierUserList.value = resData.userList;
};
const fnSubmit = debounce(
1000,
async () => {
await useFormValidate(formRef);
await setHazardAssignmentAcceptanceAssign({
HIDDEN_STATUS: "-2",
INSPECTION_ID,
...form.value,
...info.value,
});
ElMessage.success("提交成功");
router.back();
},
{ atBegin: true }
);
</script>
<style scoped lang="scss"></style>

View File

@ -19,17 +19,7 @@
</el-table-column>
<el-table-column label="操作" width="120">
<template #default="{ row }">
<el-button
type="primary"
text
link
@click="
router.push({
path: '/safety_environmental_management/hazard_assignment_acceptance/view',
query: { INSPECTION_ID: row.INSPECTION_ID },
})
"
>
<el-button type="primary" text link @click="fnView(row.HIDDEN_ID)">
查看
</el-button>
<el-button
@ -40,7 +30,15 @@
type="primary"
text
link
@click="goAssign(row, '-2')"
@click="
router.push({
path: `${route.path}/assign`,
query: {
HIDDEN_ID: row.HIDDEN_ID,
INSPECTION_ID,
},
})
"
>
指派
</el-button>
@ -53,7 +51,15 @@
type="primary"
text
link
@click="goAccept(row)"
@click="
router.push({
path: `${route.path}/acceptance`,
query: {
HIDDEN_ID: row.HIDDEN_ID,
INSPECTION_ID,
},
})
"
>
验收
</el-button>
@ -61,6 +67,10 @@
</el-table-column>
</layout-table>
</layout-card>
<view-hidden
v-model:visible="data.viewDialog.visible"
:id="data.viewDialog.HIDDEN_ID"
/>
</div>
</template>
@ -70,6 +80,8 @@ import { serialNumber, translationStatus } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData.js";
import { getHazardAssignmentAcceptanceHiddenList } from "@/request/safety_environmental_management.js";
import { useUserStore } from "@/pinia/user.js";
import ViewHidden from "../safety_environmental/components/view_hidden.vue";
import { reactive } from "vue";
const stateList = [
{ ID: "101", NAME: "待整改" },
@ -83,15 +95,24 @@ const stateList = [
];
const router = useRouter();
const route = useRoute();
console.log(route);
const { INSPECTION_ID } = route.query;
const userStore = useUserStore();
const USER_ID = userStore.getUserInfo.USER_ID;
const { list, pagination, fnGetData } = useListData(
getHazardAssignmentAcceptanceHiddenList,
{
otherParams: { INSPECTION_ID },
}
{ otherParams: { INSPECTION_ID } }
);
const data = reactive({
viewDialog: {
visible: false,
HIDDEN_ID: "",
},
});
const fnView = (HIDDEN_ID) => {
data.viewDialog.visible = true;
data.viewDialog.HIDDEN_ID = HIDDEN_ID;
};
</script>
<style scoped></style>

View File

@ -7,24 +7,22 @@
@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-col :span="6">
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
</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-col :span="6">
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<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-col :span="6">
<el-form-item label="检查类型" prop="INSPECTION_TYPE">
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
</el-form-item>
@ -40,8 +38,8 @@
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="检查状态" prop="INSPECTION_STATUS">
<el-col :span="6">
<el-form-item label="隐患处理状态" prop="INSPECTION_STATUS">
<el-select v-model="searchForm.INSPECTION_STATUS">
<el-option
v-for="item in stateList"
@ -52,7 +50,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<el-form-item label="检查题目" prop="INSPECTION_SUBJECT">
<el-select v-model="searchForm.INSPECTION_SUBJECT">
<el-option
@ -86,7 +84,7 @@
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column prop="INSPECTED_DEPARTMENT_NAMES" label="被检查单位" />
<el-table-column prop="INSPECTED_DEPARTMENT_NAME" label="被检查单位" />
<el-table-column
prop="INSPECTED_SITEUSER_NAME"
label="被检查单位现场负责人"
@ -175,23 +173,18 @@
import { useRouter } from "vue-router";
import { serialNumber, translationStatus } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData.js";
import LayoutDepartment from "@/components/department/index.vue";
import LayoutInspectionType from "@/components/inspection_type/index.vue";
import { getHazardAssignmentAcceptanceList } from "@/request/safety_environmental_management.js";
import { useUserStore } from "@/pinia/user.js";
const stateList = [
{ ID: "0", NAME: "待检查人核实" },
{ ID: "1", NAME: "检查人核实中" },
{ ID: "2", NAME: "待被检查人确认" },
{ ID: "3-7", 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: "安全" },

View File

@ -0,0 +1,202 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="100px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="隐患发现人" prop="CREATOR_NAME">
<el-input v-model="searchForm.CREATOR_NAME" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="隐患描述" prop="HIDDENDESCR">
<el-input v-model="searchForm.HIDDENDESCR" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="隐患状态" prop="HIDDEN_STATUS">
<el-select v-model="searchForm.HIDDEN_STATUS">
<el-option
v-for="item in hiddenStatusList"
:key="item.ID"
:label="item.NAME"
:value="item.ID"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<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="6">
<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="fnResetPagination">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
>
<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="INSPECTION_DEPARTMENT_NAME" label="检查部门" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" />
<el-table-column prop="CREATOR_NAME" label="隐患发现人" />
<el-table-column label="隐患状态" width="120">
<template v-slot="{ row }">
{{ translationStatus(row.HIDDEN_STATUS, hiddenStatusList) }}
</template>
</el-table-column>
<el-table-column label="检查状态" width="120">
<template v-slot="{ row }">
{{
fnTranslateInspection(row.INSPECTION_STATUS, row.HIDDEN_STATUS)
}}
</template>
</el-table-column>
<el-table-column
prop="INSPECTION_SUBJECT"
label="检查题目"
width="120"
/>
<el-table-column label="操作" width="120">
<template #default="{ row }">
<el-button type="primary" text link @click="fnView(row.HIDDEN_ID)">
查看
</el-button>
<el-button
type="primary"
text
link
@click="fnFlowChart(row.HIDDEN_ID)"
>
流程图
</el-button>
</template>
</el-table-column>
</layout-table>
</layout-card>
<flow-chart
v-model:visible="data.flowChartDialog.visible"
:id="data.flowChartDialog.HIDDEN_ID"
type="hidden"
/>
<view-hidden
v-model:visible="data.viewDialog.visible"
:id="data.viewDialog.HIDDEN_ID"
/>
</div>
</template>
<script setup>
import { serialNumber, translationStatus } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData.js";
import { getHazardManagementList } from "@/request/safety_environmental_management.js";
import FlowChart from "../safety_environmental/components/flow_chart.vue";
import ViewHidden from "../safety_environmental/components/view_hidden.vue";
import { reactive } from "vue";
const stateList = [
{ ID: "3", NAME: "待指派整改人" },
{ ID: "4", NAME: "指派中" },
{ ID: "5", NAME: "指派完成" },
{ ID: "6", NAME: "检查待验收" },
{ ID: "7", NAME: "检查已验收" },
{ ID: "8", NAME: "已归档" },
];
const inspectionQuestionList = [
{ ID: "安全", NAME: "安全" },
{ ID: "环保", NAME: "环保" },
{ ID: "综合", NAME: "综合" },
];
const hiddenStatusList = [
{ ID: "101", NAME: "待指派整改人" },
{ ID: "-2", NAME: "待确认" },
{ ID: "1", NAME: "未整改" },
{ ID: "2", NAME: "已整改" },
{ ID: "4", NAME: "已验收" },
{ ID: "10", NAME: "验收打回" },
{ ID: "7", NAME: "待处理的特殊隐患" },
{ ID: "8", NAME: "已处理的特殊隐患" },
{ ID: "-1", NAME: "已过期" },
{ ID: "16", NAME: "确认打回" },
];
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getHazardManagementList);
const data = reactive({
flowChartDialog: {
visible: false,
HIDDEN_ID: "",
},
viewDialog: {
visible: false,
HIDDEN_ID: "",
},
});
const fnTranslateInspection = (INSPECTION_STATUS, HIDDEN_STATUS) => {
for (let i = 0; i < stateList.length; i++) {
if (stateList[i].ID === "6") {
if (HIDDEN_STATUS === "4") {
return "检查已验收";
}
} else if (stateList[i].ID === INSPECTION_STATUS) return stateList[i].NAME;
}
};
const fnFlowChart = (HIDDEN_ID) => {
data.flowChartDialog.visible = true;
data.flowChartDialog.HIDDEN_ID = HIDDEN_ID;
};
const fnView = (HIDDEN_ID) => {
data.viewDialog.visible = true;
data.viewDialog.HIDDEN_ID = HIDDEN_ID;
};
</script>
<style scoped></style>

View File

@ -7,24 +7,22 @@
@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-col :span="6">
<el-form-item label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
</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-col :span="6">
<el-form-item label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<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-col :span="6">
<el-form-item label="检查类型" prop="INSPECTION_TYPE">
<layout-inspection-type v-model="searchForm.INSPECTION_TYPE" />
</el-form-item>
@ -40,7 +38,7 @@
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<el-form-item label="检查状态" prop="INSPECTION_STATUS">
<el-select v-model="searchForm.INSPECTION_STATUS">
<el-option
@ -52,7 +50,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<el-form-item label="检查题目" prop="INSPECTION_SUBJECT">
<el-select v-model="searchForm.INSPECTION_SUBJECT">
<el-option
@ -158,7 +156,6 @@ import { useRouter } from "vue-router";
import { serialNumber, translationStatus } from "@/assets/js/utils";
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 {
getInspectedPersonConfirmHiddenCount,
@ -173,11 +170,6 @@ const stateList = [
{ 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: "被检查人申辩" },
];

View File

@ -8,15 +8,13 @@
>
<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 label="被检查单位" prop="INSPECTED_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTED_DEPARTMENT_NAME" />
</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 label="检查部门" prop="INSPECTION_DEPARTMENT_NAME">
<el-input v-model="searchForm.INSPECTION_DEPARTMENT_NAME" />
</el-form-item>
</el-col>
<el-col :span="4">
@ -157,7 +155,6 @@ import { useRouter } from "vue-router";
import { serialNumber, translationStatus } from "@/assets/js/utils";
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 { getInspectorsVerifyManagementList } from "@/request/safety_environmental_management.js";
import { reactive } from "vue";
@ -170,8 +167,8 @@ const stateList = [
{ ID: "3", NAME: "待指派整改人" },
{ ID: "4", NAME: "指派中" },
{ ID: "5", NAME: "指派完成" },
{ ID: "6", NAME: "检查待验收" },
{ ID: "7", NAME: "检查已验收" },
{ ID: "6", NAME: "待验收" },
{ ID: "7", NAME: "已验收" },
{ ID: "8", NAME: "已归档" },
{ ID: "-1", NAME: "检查人核实打回" },
{ ID: "-2", NAME: "被检查人申辩" },

View File

@ -254,12 +254,15 @@ import {
setSafetyEnvironmentalAdd,
setSafetyEnvironmentalEdit,
} from "@/request/safety_environmental_management.js";
import { setUploadImg, setUploadVideo } from "@/request/api.js";
import { setUploadImg } from "@/request/api.js";
import dayjs from "dayjs";
const route = useRoute();
const router = useRouter();
const userStore = useUserStore();
const USER_ID = userStore.getUserInfo.USER_ID;
const NAME = userStore.getUserInfo.NAME;
const DEPARTMENT_ID = userStore.getUserInfo.DEPARTMENT_ID;
const { INSPECTION_ID } = route.query;
const rules = {
INSPECTION_SUBJECT: [
@ -371,12 +374,7 @@ watchEffect(() => {
});
const fnAddHidden = () => {
data.addHiddenDialog.visible = true;
data.addHiddenDialog.hazardDiscovererList = [
{
NAME: userStore.getUserInfo.NAME,
USER_ID: userStore.getUserInfo.USER_ID,
},
];
data.addHiddenDialog.hazardDiscovererList = [];
const inspectorList = data.form.inspectorList;
for (let i = 0; i < inspectorList.length; i++) {
const inspectionUserList = inspectorList[i].inspectionUserList;
@ -389,6 +387,13 @@ const fnAddHidden = () => {
}
}
}
if (
!data.addHiddenDialog.hazardDiscovererList.some(
(item) => USER_ID === item.USER_ID
)
) {
data.addHiddenDialog.hazardDiscovererList.unshift({ NAME, USER_ID });
}
};
const fnAddHiddenSubmit = (item) => {
data.form.hiddenList.push(item);
@ -398,22 +403,18 @@ const fnSubmit = debounce(
async () => {
await useFormValidate(formRef);
const inspectorList = [...data.form.inspectorList];
if (
!inspectorList.some(
(item) => userStore.getUserInfo.USER_ID === item.INSPECTION_USER_ID
)
) {
if (!inspectorList.some((item) => USER_ID === item.INSPECTION_USER_ID)) {
inspectorList.push({
INSPECTION_INSPECTOR_ID: "",
INSPECTION_DEPARTMENT_ID: userStore.getUserInfo.DEPARTMENT_ID,
INSPECTION_USER_ID: userStore.getUserInfo.USER_ID,
INSPECTION_DEPARTMENT_ID: DEPARTMENT_ID,
INSPECTION_USER_ID: USER_ID,
});
}
let hiddenList = [];
if (!INSPECTION_ID) {
const resData = await setSafetyEnvironmentalAdd({
...data.form,
HIDDENFINDDEPT: userStore.getUserInfo.DEPARTMENT_ID,
HIDDENFINDDEPT: DEPARTMENT_ID,
INSPECTORJSON: JSON.stringify(inspectorList),
SITUATIONJSON: JSON.stringify(data.form.situationList),
HIDDENJSON: JSON.stringify(data.form.hiddenList),
@ -435,7 +436,7 @@ const fnSubmit = debounce(
hiddenList[i].HIDDEN_ID,
data.form.hiddenList[i].hiddenImgs
);
await fnUploadVideo(
await fnUploadImage(
hiddenList[i].HIDDEN_ID,
data.form.hiddenList[i].videoFiles
);
@ -454,15 +455,6 @@ const fnUploadImage = async (HIDDEN_ID, files) => {
formData.append("TYPE", 3);
await setUploadImg(formData);
};
const fnUploadVideo = async (HIDDEN_ID, files) => {
const formData = new FormData();
for (let i = 0; i < files.length; i++) {
formData.append("FFILE", files[i]);
}
formData.append("FOREIGN_KEY", HIDDEN_ID);
formData.append("TYPE", 102);
await setUploadVideo(formData);
};
</script>
<style scoped lang="scss"></style>

View File

@ -71,12 +71,12 @@ const graphOptions = ref({
defaultNodeWidth: 200,
});
const fnGetData = async () => {
if (props.type === "list") {
if (props.type === "inspect") {
const { nodes, from } = await getSafetyEnvironmentalListFlowChart({
INSPECTION_ID: props.id,
});
fnSeeksGraph(nodes, from);
} else if (props.type === "view") {
} else if (props.type === "hidden") {
const { nodes, from } = await getSafetyEnvironmentalViewFlowChart({
HIDDEN_ID: props.id,
});

View File

@ -87,7 +87,7 @@
</el-form>
<template #footer>
<el-button @click="fnClose"></el-button>
<el-button @click="fnSubmit"></el-button>
<el-button type="primary" @click="fnSubmit"></el-button>
</template>
</el-dialog>
</template>

View File

@ -215,7 +215,7 @@
<flow-chart
v-model:visible="data.flowChartDialog.visible"
:id="data.flowChartDialog.INSPECTION_ID"
type="list"
type="inspect"
/>
<defense
v-model:visible="data.defenseDialog.visible"

View File

@ -136,7 +136,7 @@
<flow-chart
v-model:visible="data.flowChartDialog.visible"
:id="data.flowChartDialog.HIDDEN_ID"
type="view"
type="hidden"
/>
<view-hidden
v-model:visible="data.viewDialog.visible"