动火添加绑定电子围栏

pull/5/head
fangjiakai 2024-01-25 15:59:40 +08:00
parent 5e7217a392
commit 2a84c69ea0
5 changed files with 83 additions and 345 deletions

View File

@ -15,7 +15,7 @@
<navigator v-show="premission.confinedspace" class="apps-item" hover-class="none" url="/pages/application/confinedspace/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-806.png" mode=""></image>
<view v-if="confinedspace_count" class="cu-tag badge">{{confinedspace_count}}</view>
<view v-if="eight_work_count.CONFINEDSPACE_COUNT" class="cu-tag badge">{{eight_work_count.CONFINEDSPACE_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>受限空间</view>
@ -33,7 +33,7 @@
<navigator v-show="premission['blind-board']" class="apps-item" hover-class="none" url="/pages/application/blind-board/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-801.png" mode=""></image>
<view v-if="blind_board_count" class="cu-tag badge">{{blind_board_count}}</view>
<view v-if="eight_work_count.BLIND_BOARD_COUNT" class="cu-tag badge">{{eight_work_count.BLIND_BOARD_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>盲板抽堵作业</view>
@ -42,7 +42,7 @@
<navigator v-show="premission['break-ground']" class="apps-item" hover-class="none" url="/pages/application/break-ground/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-802.png" mode=""></image>
<view v-if="break_ground_count" class="cu-tag badge">{{break_ground_count}}</view>
<view v-if="eight_work_count.BREAK_GROUND_COUNT" class="cu-tag badge">{{eight_work_count.BREAK_GROUND_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>动土作业</view>
@ -51,7 +51,7 @@
<navigator v-show="premission['high-work']" class="apps-item" hover-class="none" url="/pages/application/high-work/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-803.png" mode=""></image>
<view v-if="high_work_count" class="cu-tag badge">{{high_work_count}}</view>
<view v-if="eight_work_count.HIGH_WORK_COUNT" class="cu-tag badge">{{eight_work_count.HIGH_WORK_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>高处作业</view>
@ -62,7 +62,7 @@
<navigator v-show="premission.hoisting" class="apps-item" hover-class="none" url="/pages/application/hoisting/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-804.png" mode=""></image>
<view v-if="hoisting_count" class="cu-tag badge">{{hoisting_count}}</view>
<view v-if="eight_work_count.HOISTING_COUNT" class="cu-tag badge">{{eight_work_count.HOISTING_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>吊装作业</view>
@ -71,7 +71,7 @@
<navigator v-show="premission.electricity" class="apps-item" hover-class="none" url="/pages/application/electricity/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-805.png" mode=""></image>
<view v-if="electricity_count" class="cu-tag badge">{{electricity_count}}</view>
<view v-if="eight_work_count.ELECTRICITY_COUNT" class="cu-tag badge">{{eight_work_count.ELECTRICITY_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>临时用电作业</view>
@ -80,7 +80,7 @@
<navigator v-show="premission.hotwork" class="apps-item" hover-class="none" url="/pages/application/hotwork/home">
<view class="imgs action">
<image src="../../static/icon-apps/icon-807.png" mode=""></image>
<view v-if="hotwork_count" class="cu-tag badge">{{hotwork_count}}</view>
<view v-if="eight_work_count.HOTWORK_COUNT" class="cu-tag badge">{{eight_work_count.HOTWORK_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>动火作业</view>
@ -89,7 +89,7 @@
<navigator v-show="premission['open-circuit']" class="apps-item" hover-class="none" url="/pages/application/open-circuit/home">
<view class="imgs action">
<image src="../../static/icon-apps/open-circuit.png" mode=""></image>
<view v-if="open_circuit_count" class="cu-tag badge">{{open_circuit_count}}</view>
<view v-if="eight_work_count.OPEN_CIRCUIT_COUNT" class="cu-tag badge">{{eight_work_count.OPEN_CIRCUIT_COUNT}}</view>
</view>
<view class="text-semi" style="text-align: center;">
<view>断路作业</view>
@ -135,14 +135,7 @@
return {
premission: {},
isRest :'',
confinedspace_count:0,
blind_board_count:0,
break_ground_count:0,
high_work_count:0,
hoisting_count:0,
electricity_count:0,
hotwork_count:0,
open_circuit_count:0,
eight_work_count: {},
};
},
mounted(){
@ -150,15 +143,7 @@
},
onShow() {
this.premission = Object.assign({}, premission)
console.info( this.premission)
this. confinedspace_count = 0
this.blind_board_count = 0
this.break_ground_count = 0
this.high_work_count = 0
this.hoisting_count = 0
this.electricity_count = 0
this.hotwork_count = 0
this.open_circuit_count = 0
this.eight_work_count = {}
this.getRedPoint();
},
methods: {
@ -176,169 +161,18 @@
getRedPoint(){
uni.request({
url: basePath +'/app/confinedspace/countCheck',
url: basePath + '/app/eightwork/checkWork',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.confinedspace_count += (item || 0)
})
}
}
})
uni.request({
url: basePath +'/app/blindboard/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.blind_board_count += (item || 0)
})
}
}
})
uni.request({
url: basePath +'/app/breakground/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.break_ground_count += (item || 0)
})
}
}
})
uni.request({
url: basePath +'/app/highwork/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.high_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath +'/app/hoisting/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.hoisting_count += (item || 0)
})
}
}
})
uni.request({
url: basePath +'/app/electricity/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.electricity_count += (item || 0)
})
}
}
})
uni.request({
url: basePath +'/app/hotwork/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.hotwork_count += (item || 0)
})
}
}
})
uni.request({
url: basePath +'/app/cutroad/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item=>{
this.open_circuit_count += (item || 0)
})
this.eight_work_count = res.data.count
}
}
})

View File

@ -447,6 +447,15 @@
</view>
</picker>
</view>
<view class="cu-form-group" >
<view class="title">作业区域</view>
<picker @change="pickerPls" :value="plxIndex" :range="plsList" range-key="regName">
<view class="picker">
{{pd.PLS_NAME?pd.PLS_NAME:'请选择'}}
</view>
</picker>
</view>
</view>
<view class="wui-form-list">
@ -719,6 +728,8 @@
pd:{},//
signs:{},
measuresList:[],
plsList:[],
plxIndex:-1,
rules:[
// {name:'CHECK_NO',message:''},
{name:'WORK_CONTENT',message:'请输入作业内容'},
@ -746,6 +757,7 @@
{name:'GUARDIAN_USER_ID',message:'请选择监护人'},
{name:'CONFESS_USER_ID',message:'请选择安全交底人'},
{name:'ACCEPT_CONFESS_USER_ID',message:'请选择接受交底人'},
{name:'PLS_ID',message:'请选择电子围栏'},
],
todayDate:'',
otherAssignments:false,
@ -770,6 +782,7 @@
}
//
this.getDept();
this.getPlsList();
loginSession();
},
@ -1113,6 +1126,32 @@
}
})
},
getPlsList(){
var _this=this
uni.request({
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
url: basePath+'/app/eightwork/getPlsList',
data: {
CORPINFO_ID:loginUser.CORPINFO_ID,
},
success: function(res){
if("success" == res.data.result){
_this.plsList=res.data.varList
} else {
uni.showToast({
title: res.data.message,
duration: 2000
});
}
}
})
},
isBlankList(userType) {
switch(userType) {
case 'analyze':
@ -1583,6 +1622,13 @@
this.$forceUpdate();//
},
pickerPls(e) {
this.plxIndex = e.detail.value;
this.pd.PLS_ID=this.plsList[this.plxIndex].uuid;
this.pd.PLS_NAME=this.plsList[this.plxIndex].regName;
this.$forceUpdate();//
},
changeStartDate(e) {
this.pd.WORK_START_DATE = e
this.$forceUpdate();//

View File

@ -52,7 +52,7 @@
</view>
</view>
<view class="cu-bar btn-group" style="margin-top: 30upx;">
<button :loading="buttonloading" class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))"></button>
<button :loading="buttonloading" class="cu-btn bg-red margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(-1))"></button>
<button :loading="buttonloading" class="cu-btn bg-green margin-tb-sm lg" @click="$noMultipleClicks(goSubmit(1))"></button>
</view>
<view class="padding flex flex-direction">
@ -103,6 +103,7 @@
signtime.push(item.SIGNER_TIME)
})
},
goSubmit(APPLY_STATUS){
var _this = this;
let required = true
@ -153,7 +154,12 @@
duration: 2000
});
this.buttonloading = false
_this.goback()
if(APPLY_STATUS === 1){
uni.navigateBack({delta: 1});
}else{
uni.navigateBack({delta: 2});
}
// _this.goback()
},
fail: (err) => {
uni.hideLoading();

View File

@ -290,7 +290,7 @@
},
success: (res) => {
if (res.data != null) {
_this.stepList = [{"STEP_NAME":"请选择","STEP_ID":""},...res.data.list];
_this.stepList = [{"STEP_NAME":"请选择","STEP_ID":""},...res.data.list,{"STEP_NAME":"验收归档","STEP_ID":"99"}];
}
}
})
@ -316,6 +316,7 @@
CREATOR:_this.flow === '提交申请'?loginUser.USER_ID : '',
GASCHECK:_this.flow === '气体检测'?loginUser.USER_ID : '',
STEP_NAME: (_this.flow === '提交申请' || _this.flow === '气体检测')?'' : _this.flow,
STEP_ID: _this.STEP_ID,
KEYWORDS : _this.KEYWORDS, //
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,

View File

@ -666,162 +666,13 @@ export default {
},
getRedPoint() {
uni.request({
url: basePath + '/app/confinedspace/countCheck',
url: basePath + '/app/eightwork/checkWork',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item => {
this.eight_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath + '/app/blindboard/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item => {
this.eight_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath + '/app/breakground/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item => {
this.eight_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath + '/app/highwork/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item => {
this.eight_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath + '/app/hoisting/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item => {
this.eight_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath + '/app/electricity/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item => {
this.eight_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath + '/app/hotwork/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if ("success" == res.data.result) {
Object.values(res.data.count).forEach(item => {
this.eight_work_count += (item || 0)
})
}
}
})
uni.request({
url: basePath + '/app/cutroad/countCheck',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
tm: new Date().getTime(),
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {