Lou
2024-04-12 501897d1f0643963fd1d8d10deae6befcb381bc3
subPackage/counterfraud/addReport.vue
@@ -124,7 +124,8 @@
            time: Number(new Date()),
            showSelectDate: false,
            dangerCount: 0, //隐患项数量
            isEdit: false
            isEdit: false,
            files: []
         }
      },
@@ -223,16 +224,28 @@
         getSelected() {
            let arr = [];
            let files = [];
            let count = 0;
            for (let i = 0, ii = this.questionList.length; i < ii; i++) {
               for (let k = 0, kk = this.questionList[i].children.length; k < kk; k++) {
                  // if (this.questionList[i].children[k].state != null) {
                  arr.push({
                     itemId: this.questionList[i].children[k].id,
                     // state: this.questionList[i].children[k].state,
                     imageUrls: this.setImages(this.questionList[i].children[k].urls),
                     // remark: this.questionList[i].children[k].remark || ""
                  })
                  if (this.questionList[i].children[k].urls.length) {
                     // files.push(this.questionList[i].children[k].id)
                     arr.push({
                        itemId: this.questionList[i].children[k].id,
                        // state: this.questionList[i].children[k].state,
                        imageUrls: this.setImages(this.questionList[i].children[k].urls),
                        // remark: this.questionList[i].children[k].remark || ""
                     })
                  }
                  // arr.push({
                  //    itemId: this.questionList[i].children[k].id,
                  //    imageUrls: this.setImages(this.questionList[i].children[k].urls),
                  // })
                  // if (this.questionList[i].children[k].state == 0) {
                  //    count += 1;
                  // }
@@ -240,7 +253,9 @@
               }
            }
            this.dangerCount = count;
            // this.files = files;
            return arr;
         },
         setImages(key) {
@@ -302,11 +317,15 @@
            //    })
            //    this.info.imageUrls = urls.join(",")
            // }
            this.info.taskPlaceRecordVOList = this.getSelected()
            console.log("data===>", this.getSelected());
            if (!this.getSelected().length) {
               this.$showTips("您还没有上传附件");
               return;
            } else {
               this.info.taskPlaceRecordVOList = this.getSelected()
            }
            if (this.isEdit) {
               this.info.status = 1;
               updateCounterfraudReport(this.info).then(res => {
                  uni.hideLoading();
                  if (res.code == 200) {