| | |
| | | time: Number(new Date()), |
| | | showSelectDate: false, |
| | | dangerCount: 0, //隐患项数量 |
| | | isEdit: false |
| | | isEdit: false, |
| | | files: [] |
| | | |
| | | } |
| | | }, |
| | |
| | | |
| | | 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; |
| | | // } |
| | |
| | | } |
| | | } |
| | | this.dangerCount = count; |
| | | // this.files = files; |
| | | return arr; |
| | | |
| | | }, |
| | | |
| | | setImages(key) { |
| | |
| | | // }) |
| | | // 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) { |