2024-01-16 17:24:49 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
|
|
|
|
<block slot="backText">返回</block>
|
|
|
|
|
<block slot="content">风险点(单元)列表</block>
|
|
|
|
|
<block slot="right">
|
|
|
|
|
<view @tap.stop="openAuth('CAMERA')">扫描</view>
|
|
|
|
|
</block>
|
|
|
|
|
</cu-custom>
|
|
|
|
|
<scroll-view scroll-y>
|
|
|
|
|
<view class="spot-list">
|
2024-01-25 17:29:41 +08:00
|
|
|
|
<view class="spot-item" v-for="item in list" :key="item.IDENTIFICATIONPARTS_ID" @click="$noMultipleClicks(goToList,{
|
|
|
|
|
'ELECTRONIC_FENCE_ID':item.ELECTRONIC_FENCE_ID,
|
|
|
|
|
'IDENTIFICATIONPARTS_ID':item.IDENTIFICATIONPARTS_ID,
|
|
|
|
|
'isChecked':item.isChecked})">
|
2024-01-16 17:24:49 +08:00
|
|
|
|
<view class="spot-img">
|
2024-01-25 17:29:41 +08:00
|
|
|
|
<image v-if="item.isChecked" src="../../../../static/zt-over.png" mode=""></image>
|
2024-01-16 17:24:49 +08:00
|
|
|
|
<image v-else src="../../../../static/zt-ing.png" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="spot-cont">
|
|
|
|
|
<view class="text f30">
|
|
|
|
|
{{item.DEPT_NAME}}--{{item.RISKUNITNAME}}--{{item.PARTSNAME}}
|
|
|
|
|
</view>
|
2024-01-25 17:29:41 +08:00
|
|
|
|
<view v-if="item.ELECTRONIC_FENCE_ID" class="text f30">
|
|
|
|
|
所属电子围栏:{{item.ELECTRONIC_FENCE}}
|
|
|
|
|
</view>
|
2024-01-16 17:24:49 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="cu-tabbar-height"></view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
<view class="bottom-fixed" @click="$noMultipleClicks(goNext)">
|
2024-01-25 17:29:41 +08:00
|
|
|
|
<button class="cu-btn bg-green">下一步</button>
|
2024-01-16 17:24:49 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
2024-01-25 17:29:41 +08:00
|
|
|
|
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(scan)" :permissionID="permissionID">
|
|
|
|
|
</yk-authpup>
|
2024-01-16 17:24:49 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
2024-01-25 17:29:41 +08:00
|
|
|
|
basePath,
|
|
|
|
|
loginUser,
|
|
|
|
|
loginSession
|
2024-01-16 17:24:49 +08:00
|
|
|
|
} from '@/common/tool.js';
|
2024-01-25 17:29:41 +08:00
|
|
|
|
import ykAuthpup from "@/components/yk-authpup/yk-authpup"
|
2024-01-16 17:24:49 +08:00
|
|
|
|
export default {
|
2024-01-25 17:29:41 +08:00
|
|
|
|
components: {
|
|
|
|
|
ykAuthpup
|
|
|
|
|
},
|
2024-01-16 17:24:49 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-01-25 17:29:41 +08:00
|
|
|
|
permissionID: '',
|
|
|
|
|
noClick: true,
|
|
|
|
|
initflag: false,
|
|
|
|
|
listId: '',
|
|
|
|
|
listName: '',
|
|
|
|
|
baoBaoType: '',
|
2024-01-16 17:24:49 +08:00
|
|
|
|
list: [],
|
2024-01-25 17:29:41 +08:00
|
|
|
|
dataFlag: 'noData',
|
|
|
|
|
CHECKRECORD_ID: '',
|
2024-01-16 17:24:49 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
2024-01-25 17:29:41 +08:00
|
|
|
|
onLoad(e) {
|
|
|
|
|
this.listId = e.listId;
|
|
|
|
|
this.listName = e.listName;
|
|
|
|
|
this.baoBaoType = e.baoBaoType
|
2024-01-16 17:24:49 +08:00
|
|
|
|
this.getData();
|
|
|
|
|
loginSession();
|
|
|
|
|
},
|
2024-01-25 17:29:41 +08:00
|
|
|
|
onShow(e) {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
var _this = this;
|
2024-01-25 17:29:41 +08:00
|
|
|
|
if (_this.initflag) {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
_this.initflag = false;
|
|
|
|
|
_this.list = [];
|
|
|
|
|
this.getData()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getData() {
|
|
|
|
|
var _this = this;
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '请稍候'
|
|
|
|
|
})
|
|
|
|
|
uni.request({
|
|
|
|
|
url: basePath + '/app/listmanager/getRisk',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
header: {
|
2024-01-25 17:29:41 +08:00
|
|
|
|
'Content-type': 'application/x-www-form-urlencoded'
|
2024-01-16 17:24:49 +08:00
|
|
|
|
},
|
|
|
|
|
data: {
|
|
|
|
|
LISTMANAGER_ID: _this.listId,
|
2024-01-25 17:29:41 +08:00
|
|
|
|
USER_NAME: loginUser.NAME,
|
|
|
|
|
CORPINFO_ID: loginUser.CORPINFO_ID,
|
|
|
|
|
USER_ID: loginUser.USER_ID,
|
2024-01-16 17:24:49 +08:00
|
|
|
|
},
|
|
|
|
|
success: (res) => {
|
2024-01-25 17:29:41 +08:00
|
|
|
|
if ("success" == res.data.result) {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
uni.hideLoading();
|
|
|
|
|
_this.list = res.data.varList;
|
2024-01-25 17:29:41 +08:00
|
|
|
|
_this.CHECKRECORD_ID = res.data.CHECKRECORD_ID;
|
|
|
|
|
if (res.data.checkmap) {
|
|
|
|
|
for (var i = 0; i < _this.list.length; i++) {
|
|
|
|
|
if (res.data.checkmap[_this.list[i].IDENTIFICATIONPARTS_ID] >= _this.list[
|
|
|
|
|
i].RISK_COUNT) {
|
|
|
|
|
_this.list[i].isChecked = 1
|
2024-01-16 17:24:49 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
2024-01-25 17:29:41 +08:00
|
|
|
|
icon: 'none',
|
|
|
|
|
title: '系统异常',
|
|
|
|
|
duration: 2000
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getInorout(e) {
|
|
|
|
|
uni.request({
|
|
|
|
|
url: basePath + '/app/listmanager/isInElectronicFence',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
header: {
|
|
|
|
|
'Content-type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: {
|
|
|
|
|
ELECTRONIC_FENCE_ID: e.ELECTRONIC_FENCE_ID,
|
|
|
|
|
USER_NAME: loginUser.NAME,
|
|
|
|
|
PLS_ID: loginUser.PLS_ID,
|
|
|
|
|
CORPINFO_ID: loginUser.CORPINFO_ID,
|
|
|
|
|
USER_ID: loginUser.USER_ID,
|
|
|
|
|
},
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if(res.data.code != 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: res.data.msg,
|
2024-01-16 17:24:49 +08:00
|
|
|
|
duration: 2000
|
|
|
|
|
});
|
2024-01-25 17:29:41 +08:00
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-list?IDENTIFICATIONPARTS_ID=' +
|
|
|
|
|
e.IDENTIFICATIONPARTS_ID + "&listId=" + this.listId + '&listName=' + this.listName +
|
|
|
|
|
"&CHECKRECORD_ID=" + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '') + "&baoBaoType=" +
|
|
|
|
|
this
|
|
|
|
|
.baoBaoType
|
|
|
|
|
});
|
2024-01-16 17:24:49 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//跳转事件
|
|
|
|
|
goToList(e) {
|
2024-01-25 17:29:41 +08:00
|
|
|
|
if (e.ELECTRONIC_FENCE_ID) {
|
|
|
|
|
this.getInorout(e)
|
|
|
|
|
}else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-list?IDENTIFICATIONPARTS_ID=' +
|
|
|
|
|
e.IDENTIFICATIONPARTS_ID + "&listId=" + this.listId + '&listName=' + this.listName +
|
|
|
|
|
"&CHECKRECORD_ID=" + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '') + "&baoBaoType=" +
|
|
|
|
|
this
|
|
|
|
|
.baoBaoType
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
// url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-list?IDENTIFICATIONPARTS_ID=' +
|
|
|
|
|
// e.IDENTIFICATIONPARTS_ID + "&listId=" + this.listId + '&listName=' + this.listName +
|
|
|
|
|
// "&CHECKRECORD_ID=" + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '') + "&baoBaoType=" +
|
|
|
|
|
// this
|
|
|
|
|
// .baoBaoType
|
|
|
|
|
// });
|
2024-01-16 17:24:49 +08:00
|
|
|
|
},
|
|
|
|
|
|
2024-01-25 17:29:41 +08:00
|
|
|
|
openAuth(permissionID) {
|
|
|
|
|
this.permissionID = permissionID;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$refs['authpup'].open();
|
|
|
|
|
}, 200)
|
|
|
|
|
},
|
2024-01-16 17:24:49 +08:00
|
|
|
|
|
2024-01-25 17:29:41 +08:00
|
|
|
|
scan() {
|
|
|
|
|
let _this = this;
|
2024-01-16 17:24:49 +08:00
|
|
|
|
uni.scanCode({
|
2024-01-25 17:29:41 +08:00
|
|
|
|
success: function(res) {
|
|
|
|
|
let flag = false;
|
|
|
|
|
let ideId = res.result;
|
|
|
|
|
for (var i = 0; i < _this.list.length; i++) {
|
|
|
|
|
if (_this.list[i].IDENTIFICATIONPARTS_ID == ideId) {
|
|
|
|
|
flag = true;
|
|
|
|
|
_this.goToList({
|
|
|
|
|
'IDENTIFICATIONPARTS_ID': _this.list[i].IDENTIFICATIONPARTS_ID
|
|
|
|
|
});
|
2024-01-16 17:24:49 +08:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-01-25 17:29:41 +08:00
|
|
|
|
if (!flag) {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
uni.showToast({
|
2024-01-25 17:29:41 +08:00
|
|
|
|
icon: 'none',
|
2024-01-16 17:24:49 +08:00
|
|
|
|
title: "该清单中不含此部位。",
|
|
|
|
|
duration: 2000
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-01-25 17:29:41 +08:00
|
|
|
|
//跳转事件
|
|
|
|
|
goNext(e) {
|
|
|
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
|
|
|
if (this.list[i].isChecked != 1) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: '清单未全部检查,无法提交',
|
|
|
|
|
duration: 3000
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-next?listId=' +
|
|
|
|
|
this.listId + '&CHECKRECORD_ID=' + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '')
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-01-16 17:24:49 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
2024-01-25 17:29:41 +08:00
|
|
|
|
.spot-list {}
|
2024-01-16 17:24:49 +08:00
|
|
|
|
|
2024-01-25 17:29:41 +08:00
|
|
|
|
.spot-cont {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
margin-left: 20upx;
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
2024-01-25 17:29:41 +08:00
|
|
|
|
|
|
|
|
|
.spot-cont .text {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
line-height: 1.4;
|
|
|
|
|
}
|
2024-01-25 17:29:41 +08:00
|
|
|
|
|
|
|
|
|
.spot-img {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
width: 100upx;
|
|
|
|
|
height: 100upx;
|
|
|
|
|
}
|
2024-01-25 17:29:41 +08:00
|
|
|
|
|
|
|
|
|
.spot-img image {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
2024-01-25 17:29:41 +08:00
|
|
|
|
|
|
|
|
|
.spot-list .spot-item {
|
2024-01-16 17:24:49 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 10upx;
|
|
|
|
|
margin: 20upx;
|
|
|
|
|
padding: 20upx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|