diff --git a/src/views/modules/kpi/kpisubpositiondetail.vue b/src/views/modules/kpi/kpisubpositiondetail.vue index 88e59218..1e33ccc5 100644 --- a/src/views/modules/kpi/kpisubpositiondetail.vue +++ b/src/views/modules/kpi/kpisubpositiondetail.vue @@ -23,12 +23,12 @@ { if (this.dataForm.id) { @@ -302,13 +301,12 @@ export default { } if (type ===2){ this.checkDiction[index].childDiction[index1].images.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1, name: res.data.fileName }) + this.hideUpload[(index+1)*(index1+99)] = this.checkDiction[index].childDiction[index1].images.length >= 6 }else { this.checkDiction[index].images.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1, name: res.data.fileName }) + this.hideUploadBig[index] = this.checkDiction[index].images.length >= 6 } - - - this.hideUpload = this.dataForm.images.length >= 6 }, handelError () { this.loading = false @@ -332,9 +330,9 @@ export default { let item = this.checkDiction[index].childDiction[index1].images[i] if (item.url === file.url) { this.checkDiction[index].childDiction[index1].images.splice(i, 1) - this.hideUpload = this.checkDiction[index].childDiction[index1].images.length >= 6 + this.hideUpload[(index+1)*(index1+99)] = this.checkDiction[index].childDiction[index1].images.length >= 6 } - this.hideUpload = this.checkDiction[index].childDiction[index1].images.length >= 6 + this.hideUpload[(index+1)*(index1+99)] = this.checkDiction[index].childDiction[index1].images.length >= 6 } }else { for (var i = 0; i < this.checkDiction[index].images.length; i++) { @@ -343,7 +341,7 @@ export default { this.checkDiction[index].images.splice(i, 1) } } - this.hideUpload = this.checkDiction[index].images.length >= 6 + this.hideUploadBig[index] = this.checkDiction[index].images.length >= 6 } }, @@ -457,28 +455,62 @@ export default { return this.$message.error(res.msg) } this.checkDiction = res.data + for (let i =0;i< this.checkDiction.length;i++) { + let x = this.checkDiction[i].childDiction; + if (x.length>0){ + for (let j = 0; j < x.length; j++) { + if (this.status === '1'){ + this.hideUpload[(i+1)*(j+99)] = true; + } + if (this.status === '2'){ + this.hideUpload[(i+1)*(j+99)] = true; + } + if (this.status === '3'){ + this.hideUpload[(i+1)*(j+99)] = true; + } + if (x[j].images.length === 6){ + this.hideUpload[(i+1)*(j+99)] = true; + } + } + }else { + if (this.status === '1'){ + this.hideUploadBig[i] = true; + } + if (this.status === '2'){ + this.hideUploadBig[i] = true; + } + if (this.status === '3'){ + this.hideUploadBig[i] = true; + } + if (this.checkDiction[i].images.length === 6){ + this.hideUploadBig[i] = true; + } + } + } this.pageloading = false }).catch(() => {}) }, // 表单提交 dataFormSubmitHandle: debounce(function () { + console.log(this.hideUpload) // 统计项非0校验 let remindInfo = '' for (var i = 0; i < this.checkDiction.length; i++) { let childSub = this.checkDiction[i].childDiction; + let label = this.checkDiction[i].label; if (childSub.length>0){ for (let b = 0; b -