From e5bf906c133d6b647e4c3d7407f6897c5bdb2045 Mon Sep 17 00:00:00 2001 From: zhoulingpo Date: Sat, 29 Apr 2023 01:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/reportTable.vue | 8 +-- src/views/permissionApplication/launch.vue | 61 ++++++++++++------- 2 files changed, 43 insertions(+), 26 deletions(-) diff --git a/src/views/permissionApplication/components/reportTable.vue b/src/views/permissionApplication/components/reportTable.vue index d46dfab..f1cb5d4 100644 --- a/src/views/permissionApplication/components/reportTable.vue +++ b/src/views/permissionApplication/components/reportTable.vue @@ -174,7 +174,7 @@ export default { var newValue=[] if(idsList.length>0){ idsList=idsList.map(item=>{ - return item.id + return item.reportId }) reportList=reportList.map(item=>{ return item.reportId @@ -185,10 +185,10 @@ export default { newValue=this.value.filter(item => reportids.indexOf(item.reportId)==-1 ) - this.$emit('updateTable', newValue,reportids) + this.$emit('updateTable', newValue,idsList) }else{ newValue=this.value.filter(item => - idsList.indexOf(item.id)==-1 + idsList.indexOf(item.reportId)==-1 ) this.$emit('updateTable', newValue,idsList) } @@ -220,7 +220,7 @@ export default { if (this.$route.query.taskDefinitionKey == 'aid4' ){ if(row.id && row.id !=''){ // this.$api.permissionProcess.deletReport({ids:[row.id]}).then(()=>{ - this.$emit('updateTable',this.value.filter(item => item.id !== row.id),[row.id]) + this.$emit('updateTable',this.value.filter(item => item.id !== row.id),[row.reportId]) // }) }else{ this.$emit('updateTable', this.value.filter(item => item.reportId !== row.reportId),[]) diff --git a/src/views/permissionApplication/launch.vue b/src/views/permissionApplication/launch.vue index a816974..223ef34 100644 --- a/src/views/permissionApplication/launch.vue +++ b/src/views/permissionApplication/launch.vue @@ -19,7 +19,7 @@ - + 0){ + jiaVlue.forEach(item=>{ + this.delData.push({ + prcId:this.prcId, + reportId:item + }) + }) + + this.$set(this,'delData',this.delData) + } + this.$set(this,'tableData',newValue) + // this.tableData=newValue; + // this.delData=jiaVlue + }, // 真删除接口 delDatas(){ return new Promise((resolve,reject)=>{ - this.$api.permissionProcess.deletReport({ids:this.delData}).then(()=>{ + this.$api.permissionProcess.deletReport({powerApplyList:this.delData}).then(()=>{ resolve() }) @@ -426,7 +443,7 @@ export default { console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID") this.$refs.assignFormRef.validate(v => { this.$refs.applicationFormRef.validate(m => { - this.$refs.processFormRef.validate(z => { + this.$refs.processFormRef.validate(async z => { if (v && m && z) { // 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm // 表格数据没有不能提交 需要提示 @@ -439,22 +456,12 @@ export default { //如果不是第一次 if (this.initShow) { - this.JuggleSub(this.taskId).then(res=>{ - if(res){ - if(this.delData){ - this.delDatas().then(()=>{ - this.organizeData() - let dataJson = JSON.stringify(this.tableData) - let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark}) - this.completeProcess({ - dataJson, - submitJson, - taskId: this.taskId, - userId: this.$store.getters.userInfo.usid, - prcType: this.prcType - }) - }) - }else{ + let flag=await this.JuggleSub(this.taskId) + if(flag){ + console.log(this.delData,"flagflagflagflag") + debugger + if(this.delData){ + this.delDatas().then(()=>{ this.organizeData() let dataJson = JSON.stringify(this.tableData) let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark}) @@ -465,11 +472,21 @@ export default { userId: this.$store.getters.userInfo.usid, prcType: this.prcType }) - } - + }) + }else{ + this.organizeData() + let dataJson = JSON.stringify(this.tableData) + let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark}) + this.completeProcess({ + dataJson, + submitJson, + taskId: this.taskId, + userId: this.$store.getters.userInfo.usid, + prcType: this.prcType + }) } - }) + } } else { this.isSendDraft().then(()=>{ this.organizeData()