From 2863d8e6d5b91b03734a715e57c8151bf7d6eded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Thu, 16 May 2024 18:06:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InspectionReport/InspectionReport.js | 4 ++- .../safetyinspection/safetyinspection.js | 32 ++++++++++++++++--- .../safetyinspection/safetyinspection.wxml | 5 ++- .../safetyinspection/safetyinspection.wxss | 8 +++++ 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js b/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js index d93557d..949ddf8 100644 --- a/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js +++ b/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js @@ -130,7 +130,8 @@ Page({ reviewTime:`${this.data.reviewTime} ${hours}:${minutes}:${seconds}`, hiddenDangeList:[...this.data.hiddenDangeList,{hazardStatus:2,hazardDesc:this.data.hazardDesc2}] , attachmentUrls:this.data.uploadImageList.map(item=>({fileName:item.originFileName,attachmentUrl:item.ossUrl.url})), - remark: '' + remark: '', + address:this.data.addressContent }).then( res => { if(res.code == 0){ @@ -157,6 +158,7 @@ Page({ }).then(({ data }) => { + console.log(data) this.setData({ companyList: data.list, }); diff --git a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js index 7853b67..620b92d 100644 --- a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js +++ b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.js @@ -1,9 +1,8 @@ - // subpages/safetyinspection/pages/safetyinspection/safetyinspection.js import { $wuxActionSheet } from '../../../../components/dist/index' const App = getApp() import { - showRecord,addRecord,inspectionStaff + showRecord,addRecord,inspectionStaff,securityCheckk } from "../../../../utils/api" const config = require('../../../../utils/config') @@ -50,6 +49,7 @@ Page({ this.showRecordData() this.toOinspectionStaff() + this.securityCheckk() }, /** @@ -91,6 +91,19 @@ Page({ */ onShareAppMessage() { }, + securityCheckk(){ + securityCheckk({ + pageNo: this.data.pageNo, + pageSize: this.data.pageSize, + }).then(({ + data + }) => { + console.log(data) + this.setData({ + companyList: data.list, + }); + }); + }, onChange(event) { console.log(event.detail); this.data.checkboxOptions.forEach((item,index)=>{ @@ -173,7 +186,17 @@ Page({ this.setData({ showPopup: true }); // 点击按钮显示弹出层 }, onClose() { - this.setData({ showPopup: false }); // 关闭弹出层 + let names = [] + this.data.arr.forEach(item=>{ + if(this.data.selectedOptions.findIndex(itemC=>itemC === item.staffId) != -1){ + names.push(item.name) + } + }) + this.setData({ + showPopup: false, + selectedNames: names, + checkPersonsIdList:this.data.selectedOptions + }); // 关闭弹出层 }, onChange1(event) { console.log(event) @@ -276,7 +299,8 @@ handelClickSave(){ reviewTime:`${this.data.reviewTime} ${hours}:${minutes}:${seconds}`, hiddenDangeList:this.data.checkboxOptions.concat(this.data.addHiddenDangeList), attachmentUrls:this.data.uploadImageList.map(item=>({fileName:item.originFileName,attachmentUrl:item.ossUrl.url})), - remark:this.data.remark + remark:this.data.remark, + address:"" } console.log(this.data.checkboxOptions.concat(this.data.addHiddenDangeList)) addRecord(form).then(res => { diff --git a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml index 3eb885a..5ee90cc 100644 --- a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml +++ b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxml @@ -151,12 +151,11 @@ 提交 - + - {{item.name}} + {{item.name}} - diff --git a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss index 9ecf0f1..a488fd4 100644 --- a/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss +++ b/subpages/safetyinspection/pages/safetyinspection/safetyinspection.wxss @@ -431,4 +431,12 @@ margin-bottom: 20rpx; text-align: left; white-space: nowrap; line-height: 42rpx; +} +.popup-content{ + margin: 20rpx; + display: flex; + +} +.checkbox{ + margin: 40rpx; } \ No newline at end of file