From 8ec851a57b3fb431fbb2bd13242b1faf82ba13ea 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: Mon, 27 May 2024 09:09:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=9F=A5=E4=B8=8A=E5=A0=B1=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InspectionReport/InspectionReport.js | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js b/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js index b8fd705..12ff1b9 100644 --- a/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js +++ b/subpages/InspectionReport/pages/InspectionReport/InspectionReport.js @@ -127,6 +127,17 @@ Page({ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; }, submitBiao() { + if (this.data.newContent) { + let newArr = this.data.addHiddenDangeList.concat({ + hazardDesc: this.data.newContent, + hazardStatus: 0 + }); + console.log(newArr) + this.setData({ + addHiddenDangeList: newArr, + }); + } + console.log(this.data.addHiddenDangeList); if(!this.data.companyId){ wx.showToast({ title: '请选择企业', @@ -156,7 +167,7 @@ Page({ return false } - if(this.data.checkResultFlag == 0 && this.data.checkboxValue.length<1&&!this.data.addHiddenDangeList<1){ + if(this.data.checkResultFlag == 0 && this.data.checkboxValue.length<1&&this.data.addHiddenDangeList<1){ wx.showToast({ title: '隐患明细最少输入一条', icon:'none' @@ -175,16 +186,7 @@ Page({ } }) } - if (this.data.newContent) { - let newArr = this.data.addHiddenDangeList.concat({ - hazardDesc: this.data.newContent, - hazardStatus: 0 - }); - console.log(newArr) - this.setData({ - addHiddenDangeList: newArr, - }); - } + if (this.data.hazardDesc2) { let newArr = this.data.addHiddenDangeList.concat({ hazardDesc: this.data.hazardDesc2,