diff --git a/src/views/permissionApplication/components/reportTable.vue b/src/views/permissionApplication/components/reportTable.vue index eb9b908..d46dfab 100644 --- a/src/views/permissionApplication/components/reportTable.vue +++ b/src/views/permissionApplication/components/reportTable.vue @@ -160,18 +160,18 @@ export default { // 有idde console.log(this.value) debugger - let idsList=this.checkIds.filter(item=>{ + var idsList=this.checkIds.filter(item=>{ if(item.id && item.id !=''){ return item } }) - let reportList=this.checkIds.filter(item=>{ + var reportList=this.checkIds.filter(item=>{ if(!item.id ){ return item } }) - let newValue=[] + var newValue=[] if(idsList.length>0){ idsList=idsList.map(item=>{ return item.id @@ -186,6 +186,11 @@ export default { reportids.indexOf(item.reportId)==-1 ) this.$emit('updateTable', newValue,reportids) + }else{ + newValue=this.value.filter(item => + idsList.indexOf(item.id)==-1 + ) + this.$emit('updateTable', newValue,idsList) } // }) }else{ diff --git a/src/views/permissionApplication/launch.vue b/src/views/permissionApplication/launch.vue index 87fc481..dcc7caf 100644 --- a/src/views/permissionApplication/launch.vue +++ b/src/views/permissionApplication/launch.vue @@ -299,7 +299,12 @@ export default { // 真删除接口 delDatas(){ - this.$api.permissionProcess.deletReport({ids:this.delData}).then(()=>{}) + return new Promise((resolve,reject)=>{ + this.$api.permissionProcess.deletReport({ids:this.delData}).then(()=>{ + resolve() + }) + + }) }, handleCheck(name) { @@ -431,23 +436,37 @@ export default { // 调用流程数据 console.log("发送数据") // 处理表格数据 - this.organizeData() + //如果不是第一次 if (this.initShow) { this.JuggleSub(this.taskId).then(res=>{ if(res){ if(this.delData){ - this.delDatas() + 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{ + 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 + }) } - 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 - }) + } })