From 20a94f2766e99b9a4c1001ac3a7b0c7e0f66f63e Mon Sep 17 00:00:00 2001 From: jxjgmj <1351094127@qq.com> Date: Tue, 2 Aug 2022 15:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=BA5=E5=8F=AF=E9=80=89=E6=8B=A9=E6=95=B4?= =?UTF-8?q?=E6=94=B9=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/potentialRisk/potentialRisk.vue | 111 ++++++++++++++------------ 1 file changed, 61 insertions(+), 50 deletions(-) diff --git a/pages/potentialRisk/potentialRisk.vue b/pages/potentialRisk/potentialRisk.vue index 711e16de..ac264f63 100644 --- a/pages/potentialRisk/potentialRisk.vue +++ b/pages/potentialRisk/potentialRisk.vue @@ -55,10 +55,14 @@ 整改负责人 - + + {{getUsernames()}} + + + + {{getUsernames()}} - - @@ -74,16 +78,18 @@ 要求完成时间 - + - {{dangerInfo.createTime}} - + {{dangerInfo.createTime}} + {{dangerInfo.createTime}} - + 报警抓拍 @@ -148,15 +154,15 @@ - - + + 全选 - - + + - 关闭 - - + 关闭 + + - + @@ -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 @@