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

pull/5/head
chenxinying 2024-01-25 17:40:08 +08:00
commit b692cf9a6d
2 changed files with 235 additions and 153 deletions

View File

@ -9,7 +9,10 @@
</cu-custom> </cu-custom>
<scroll-view scroll-y> <scroll-view scroll-y>
<view class="spot-list"> <view class="spot-list">
<view class="spot-item" v-for="item in list" :key="item.IDENTIFICATIONPARTS_ID" @click="$noMultipleClicks(goToList,{'IDENTIFICATIONPARTS_ID':item.IDENTIFICATIONPARTS_ID,'isChecked':item.isChecked})"> <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})">
<view class="spot-img"> <view class="spot-img">
<image v-if="item.isChecked" src="../../../../static/zt-over.png" mode=""></image> <image v-if="item.isChecked" src="../../../../static/zt-over.png" mode=""></image>
<image v-else src="../../../../static/zt-ing.png" mode=""></image> <image v-else src="../../../../static/zt-ing.png" mode=""></image>
@ -18,6 +21,9 @@
<view class="text f30"> <view class="text f30">
{{item.DEPT_NAME}}--{{item.RISKUNITNAME}}--{{item.PARTSNAME}} {{item.DEPT_NAME}}--{{item.RISKUNITNAME}}--{{item.PARTSNAME}}
</view> </view>
<view v-if="item.ELECTRONIC_FENCE_ID" class="text f30">
所属电子围栏{{item.ELECTRONIC_FENCE}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -27,13 +33,16 @@
<button class="cu-btn bg-green">下一步</button> <button class="cu-btn bg-green">下一步</button>
</view> </view>
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(scan)" :permissionID="permissionID"></yk-authpup> <yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(scan)" :permissionID="permissionID">
</yk-authpup>
</view> </view>
</template> </template>
<script> <script>
import { import {
basePath,loginUser,loginSession basePath,
loginUser,
loginSession
} from '@/common/tool.js'; } from '@/common/tool.js';
import ykAuthpup from "@/components/yk-authpup/yk-authpup" import ykAuthpup from "@/components/yk-authpup/yk-authpup"
export default { export default {
@ -94,7 +103,8 @@
_this.CHECKRECORD_ID = res.data.CHECKRECORD_ID; _this.CHECKRECORD_ID = res.data.CHECKRECORD_ID;
if (res.data.checkmap) { if (res.data.checkmap) {
for (var i = 0; i < _this.list.length; i++) { for (var i = 0; i < _this.list.length; i++) {
if(res.data.checkmap[_this.list[i].IDENTIFICATIONPARTS_ID] >=_this.list[i].RISK_COUNT){ if (res.data.checkmap[_this.list[i].IDENTIFICATIONPARTS_ID] >= _this.list[
i].RISK_COUNT) {
_this.list[i].isChecked = 1 _this.list[i].isChecked = 1
} }
} }
@ -109,12 +119,61 @@
} }
}); });
}, },
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,
duration: 2000
});
}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
});
}
}
});
},
// //
goToList(e) { goToList(e) {
if (e.ELECTRONIC_FENCE_ID) {
this.getInorout(e)
}else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-list?IDENTIFICATIONPARTS_ID=' 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 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
// });
}, },
openAuth(permissionID) { openAuth(permissionID) {
@ -133,7 +192,9 @@
for (var i = 0; i < _this.list.length; i++) { for (var i = 0; i < _this.list.length; i++) {
if (_this.list[i].IDENTIFICATIONPARTS_ID == ideId) { if (_this.list[i].IDENTIFICATIONPARTS_ID == ideId) {
flag = true; flag = true;
_this.goToList({'IDENTIFICATIONPARTS_ID':_this.list[i].IDENTIFICATIONPARTS_ID}); _this.goToList({
'IDENTIFICATIONPARTS_ID': _this.list[i].IDENTIFICATIONPARTS_ID
});
break; break;
} }
} }
@ -160,7 +221,8 @@
} }
} }
uni.navigateTo({ 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:'') url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-next?listId=' +
this.listId + '&CHECKRECORD_ID=' + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '')
}); });
}, },
} }
@ -168,24 +230,27 @@
</script> </script>
<style> <style>
.spot-list{ .spot-list {}
}
.spot-cont { .spot-cont {
margin-left: 20upx; margin-left: 20upx;
flex: 1; flex: 1;
} }
.spot-cont .text { .spot-cont .text {
line-height: 1.4; line-height: 1.4;
} }
.spot-img { .spot-img {
width: 100upx; width: 100upx;
height: 100upx; height: 100upx;
} }
.spot-img image { .spot-img image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.spot-list .spot-item { .spot-list .spot-item {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,5 +1,6 @@
<template> <template>
<view style="background: url(../../static/bg-login.png) no-repeat;background-size:100% auto;height:100vh;background-color: #058cf5; position: fixed; width: 100%;"> <view
style="background: url(../../static/bg-login.png) no-repeat;background-size:100% auto;height:100vh;background-color: #058cf5; position: fixed; width: 100%;">
<!-- <view class="bottom-img"> <!-- <view class="bottom-img">
<image src="../../static/hg-bottom.png" mode=""></image> <image src="../../static/hg-bottom.png" mode=""></image>
</view> --> </view> -->
@ -19,7 +20,8 @@
<text class="">手机号码</text> <text class="">手机号码</text>
</view> </view>
<view class="m-input-view"> <view class="m-input-view">
<input v-model="userName" class="m-input" placeholder-style="color: #5caceb;font-size: 34upx;" placeholder="请输入手机号..." /> <input v-model="userName" class="m-input" placeholder-style="color: #5caceb;font-size: 34upx;"
placeholder="请输入手机号..." />
</view> </view>
</view> </view>
<view class="input-row mt30"> <view class="input-row mt30">
@ -27,8 +29,8 @@
<text class="">密码</text> <text class="">密码</text>
</view> </view>
<view class="m-input-view"> <view class="m-input-view">
<input v-model="userPwd" class="m-input" placeholder-style="color: #5caceb;font-size: 34upx;" password type="text" <input v-model="userPwd" class="m-input" placeholder-style="color: #5caceb;font-size: 34upx;"
placeholder="请输入密码..." /> password type="text" placeholder="请输入密码..." />
</view> </view>
</view> </view>
</view> </view>
@ -44,7 +46,8 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<view style="width: 100%;color: #fff;position: absolute;left: 50%;transform: translateX(-50%);bottom: 50upx;display: flex;justify-content: center;align-items: center"> <view
style="width: 100%;color: #fff;position: absolute;left: 50%;transform: translateX(-50%);bottom: 50upx;display: flex;justify-content: center;align-items: center">
<radio-group> <radio-group>
<radio :checked="radio === '1'" @click="radioChange"></radio> <radio :checked="radio === '1'" @click="radioChange"></radio>
</radio-group> </radio-group>
@ -278,11 +281,17 @@
setDeptLevel(res.data.DEPARTMENT_LEVEL); setDeptLevel(res.data.DEPARTMENT_LEVEL);
setIsRest(res.data.ISREST); setIsRest(res.data.ISREST);
setloginUser(res.data); setloginUser(res.data);
uni.setStorage({key: 'USER', data: res.data}); uni.setStorage({
key: 'USER',
data: res.data
});
const remember = {} const remember = {}
remember.username = userName remember.username = userName
remember.userPwd = userPwd remember.userPwd = userPwd
uni.setStorage({key: 'remember', data: remember}); uni.setStorage({
key: 'remember',
data: remember
});
this.getMenu() this.getMenu()
this.updatePushCid(res.data.USER_ID, this.push_clientid) this.updatePushCid(res.data.USER_ID, this.push_clientid)
} else if ("usererror" == result) { } else if ("usererror" == result) {
@ -366,13 +375,16 @@
premissionList.set('commitment', true) premissionList.set('commitment', true)
if (item.subMenu && item.subMenu.length > 0) { if (item.subMenu && item.subMenu.length > 0) {
item.subMenu.map(child => { item.subMenu.map(child => {
if (child.menu_NAME == '公司级承诺公告' && child.hasMenu) { if (child.menu_NAME == '公司级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-company', true) premissionList.set('commitment-company', true)
} }
if (child.menu_NAME == '车间级承诺公告' && child.hasMenu) { if (child.menu_NAME == '车间级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-workshop', true) premissionList.set('commitment-workshop', true)
} }
if (child.menu_NAME == '班组级承诺公告' && child.hasMenu) { if (child.menu_NAME == '班组级承诺公告' && child
.hasMenu) {
premissionList.set('commitment-team', true) premissionList.set('commitment-team', true)
} }
}) })
@ -499,10 +511,12 @@
position: fixed; position: fixed;
bottom: 0; bottom: 0;
} }
.bottom-img image { .bottom-img image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.bg-login { .bg-login {
background-color: #72b0ed; background-color: #72b0ed;
color: #1f63ae; color: #1f63ae;
@ -534,14 +548,17 @@
align-items: center; align-items: center;
padding-top: 46upx; padding-top: 46upx;
} }
.login-logo { .login-logo {
margin-right: 26upx; margin-right: 26upx;
margin-top: 10upx; margin-top: 10upx;
} }
.login-logo image { .login-logo image {
width: 100upx; width: 100upx;
height: 100upx; height: 100upx;
} }
.login-text { .login-text {
color: #fff; color: #fff;
font-size: 44upx; font-size: 44upx;