修改用户类型为5可选择整改人
This commit is contained in:
parent
1369c6b7d7
commit
20a94f2766
@ -55,10 +55,14 @@
|
||||
<view class="letBox">
|
||||
整改负责人
|
||||
</view>
|
||||
<view class="rigBox" @click="$refs.popup.open()">
|
||||
<view v-if="userInfo.accountType==5&&dangerInfo.status!=3" class="rigBox" @click="$refs.popup.open()">
|
||||
{{getUsernames()}}
|
||||
<image src="../../static/icon-down-black.png" style="width: 30rpx;height: 30rpx;margin-left: 6rpx;"
|
||||
mode=""></image>
|
||||
|
||||
</view>
|
||||
<view v-else class="rigBox">
|
||||
{{getUsernames()}}
|
||||
<image src="../../static/icon-down-black.png" style="width: 30rpx;height: 30rpx;margin-left: 6rpx;" mode=""></image>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -74,16 +78,18 @@
|
||||
<view class="letBox">
|
||||
要求完成时间
|
||||
</view>
|
||||
<picker v-if="userInfo.accountType==5&&dangerInfo.status!=3" mode="date" :start="dangerInfo.createTime" @change="selectDate">
|
||||
<picker v-if="userInfo.accountType==5&&dangerInfo.status!=3" mode="date" :start="dangerInfo.createTime"
|
||||
@change="selectDate">
|
||||
<view>
|
||||
{{dangerInfo.createTime}}
|
||||
<image src="../../static/icon-down-black.png" style="width: 30rpx;height: 30rpx;margin-left: 6rpx;" mode=""></image>
|
||||
{{dangerInfo.createTime}}
|
||||
<image src="../../static/icon-down-black.png"
|
||||
style="width: 30rpx;height: 30rpx;margin-left: 6rpx;" mode=""></image>
|
||||
</view>
|
||||
</picker>
|
||||
<view v-else class="rigBox">
|
||||
{{dangerInfo.createTime}}
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="" style="margin: 40rpx 0;">
|
||||
报警抓拍
|
||||
@ -148,15 +154,15 @@
|
||||
|
||||
<uni-popup ref="popup" type="bottom">
|
||||
<view class="uni-list">
|
||||
<view class="flex between control">
|
||||
<view class="">
|
||||
<view class="flex between control">
|
||||
<view class="">
|
||||
<text style="font-size: 28rpx;margin-right: 12rpx;">全选</text>
|
||||
<checkbox :checked="selectAll" @click="selectAllEve" />
|
||||
</view>
|
||||
<checkbox :checked="selectAll" @click="selectAllEve" />
|
||||
</view>
|
||||
<view class="colse" @click="colse">
|
||||
关闭
|
||||
</view>
|
||||
</view>
|
||||
关闭
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" style="margin-top: 30rpx;height: 320rpx;">
|
||||
<checkbox-group @change="checkUser" class="checkbox-group">
|
||||
<label class="uni-list-cell" v-for="user in changeUsers" :key="user.value">
|
||||
@ -166,7 +172,7 @@
|
||||
<view>{{user.realName}}</view>
|
||||
</label>
|
||||
</checkbox-group>
|
||||
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@ -183,7 +189,7 @@
|
||||
data() {
|
||||
return {
|
||||
dangerInfo: {},
|
||||
selectAll:false,
|
||||
selectAll: false,
|
||||
alarmType: {
|
||||
1: "烟感",
|
||||
2: "明火",
|
||||
@ -207,16 +213,16 @@
|
||||
detailsId: '',
|
||||
changeUsers: [],
|
||||
userIds: [],
|
||||
backupsUserIds:[]
|
||||
backupsUserIds: []
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
userIds(n,o){
|
||||
console.log(n,"=====")
|
||||
if(n.length==this.backupsUserIds.length){
|
||||
this.selectAll=true
|
||||
}else{
|
||||
this.selectAll=false;
|
||||
watch: {
|
||||
userIds(n, o) {
|
||||
console.log(n, "=====")
|
||||
if (n.length == this.backupsUserIds.length) {
|
||||
this.selectAll = true
|
||||
} else {
|
||||
this.selectAll = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -235,23 +241,23 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
selectAllEve(){
|
||||
this.selectAll=!this.selectAll;
|
||||
if(this.selectAll){
|
||||
this.userIds=this.changeUsers.map((item)=>{
|
||||
selectAllEve() {
|
||||
this.selectAll = !this.selectAll;
|
||||
if (this.selectAll) {
|
||||
this.userIds = this.changeUsers.map((item) => {
|
||||
return item.userId
|
||||
})
|
||||
console.log(this.userIds,"==this.userIds")
|
||||
}else{
|
||||
this.userIds=[]
|
||||
console.log(this.userIds, "==this.userIds")
|
||||
} else {
|
||||
this.userIds = []
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
selectDate(e){
|
||||
console.log(e,'date=====')
|
||||
this.dangerInfo.createTime=e.detail.value;
|
||||
selectDate(e) {
|
||||
console.log(e, 'date=====')
|
||||
this.dangerInfo.createTime = e.detail.value;
|
||||
},
|
||||
colse(){
|
||||
colse() {
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
// 多选整改人
|
||||
@ -367,12 +373,12 @@
|
||||
},
|
||||
success: res => {
|
||||
let typeList = res.result
|
||||
|
||||
let tres= typeList.find(item => item.inspectTypeName == "安全检查");
|
||||
if(tres){
|
||||
_this.inspectTypeId=tres.id
|
||||
}
|
||||
|
||||
|
||||
let tres = typeList.find(item => item.inspectTypeName == "安全检查");
|
||||
if (tres) {
|
||||
_this.inspectTypeId = tres.id
|
||||
}
|
||||
|
||||
console.log(_this.inspectTypeId, '-----检查类型')
|
||||
}
|
||||
})
|
||||
@ -388,7 +394,7 @@
|
||||
success: res => {
|
||||
_this.changeUsers = res.result
|
||||
_this.userIds = res.result[0].userId;
|
||||
_this.backupsUserIds=_this.changeUsers.map((item)=>{
|
||||
_this.backupsUserIds = _this.changeUsers.map((item) => {
|
||||
return item.userId
|
||||
})
|
||||
console.log(res.result, '-----检查人')
|
||||
@ -453,22 +459,27 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.flex{
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.flex_end{
|
||||
|
||||
.flex_end {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.between{
|
||||
|
||||
.between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.control{
|
||||
padding:0 30rpx;
|
||||
|
||||
.control {
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.colse{
|
||||
|
||||
.colse {
|
||||
font-size: 28rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.explain {
|
||||
padding: 12rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user