【修改】监控流程

This commit is contained in:
zhoulingpo
2023-04-29 01:09:12 +08:00
parent 0fe93ec48c
commit e5bf906c13
2 changed files with 43 additions and 26 deletions
@@ -174,7 +174,7 @@ export default {
var newValue=[] var newValue=[]
if(idsList.length>0){ if(idsList.length>0){
idsList=idsList.map(item=>{ idsList=idsList.map(item=>{
return item.id return item.reportId
}) })
reportList=reportList.map(item=>{ reportList=reportList.map(item=>{
return item.reportId return item.reportId
@@ -185,10 +185,10 @@ export default {
newValue=this.value.filter(item => newValue=this.value.filter(item =>
reportids.indexOf(item.reportId)==-1 reportids.indexOf(item.reportId)==-1
) )
this.$emit('updateTable', newValue,reportids) this.$emit('updateTable', newValue,idsList)
}else{ }else{
newValue=this.value.filter(item => newValue=this.value.filter(item =>
idsList.indexOf(item.id)==-1 idsList.indexOf(item.reportId)==-1
) )
this.$emit('updateTable', newValue,idsList) this.$emit('updateTable', newValue,idsList)
} }
@@ -220,7 +220,7 @@ export default {
if (this.$route.query.taskDefinitionKey == 'aid4' ){ if (this.$route.query.taskDefinitionKey == 'aid4' ){
if(row.id && row.id !=''){ if(row.id && row.id !=''){
// this.$api.permissionProcess.deletReport({ids:[row.id]}).then(()=>{ // 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{ }else{
this.$emit('updateTable', this.value.filter(item => item.reportId !== row.reportId),[]) this.$emit('updateTable', this.value.filter(item => item.reportId !== row.reportId),[])
+39 -22
View File
@@ -19,7 +19,7 @@
</el-row> </el-row>
</el-form> </el-form>
<el-row> <el-row>
<report-table v-model="tableData" @updateTable="(newValue,jiaVlue)=>{tableData=newValue;delData=jiaVlue}" :disabled="showTableD"></report-table> <report-table v-model="tableData" @updateTable="getV" :disabled="showTableD"></report-table>
</el-row> </el-row>
<el-row> <el-row>
<el-form ref="applicationFormRef" :model="applicationForm" label-width="150px" <el-form ref="applicationFormRef" :model="applicationForm" label-width="150px"
@@ -296,11 +296,28 @@ export default {
} }
}, },
methods: { methods: {
getV(newValue,jiaVlue)
{
debugger
if(jiaVlue &&jiaVlue.length > 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(){ delDatas(){
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
this.$api.permissionProcess.deletReport({ids:this.delData}).then(()=>{ this.$api.permissionProcess.deletReport({powerApplyList:this.delData}).then(()=>{
resolve() resolve()
}) })
@@ -426,7 +443,7 @@ export default {
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID") console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
this.$refs.assignFormRef.validate(v => { this.$refs.assignFormRef.validate(v => {
this.$refs.applicationFormRef.validate(m => { this.$refs.applicationFormRef.validate(m => {
this.$refs.processFormRef.validate(z => { this.$refs.processFormRef.validate(async z => {
if (v && m && z) { if (v && m && z) {
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm // 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
// 表格数据没有不能提交 需要提示 // 表格数据没有不能提交 需要提示
@@ -439,22 +456,12 @@ export default {
//如果不是第一次 //如果不是第一次
if (this.initShow) { if (this.initShow) {
this.JuggleSub(this.taskId).then(res=>{ let flag=await this.JuggleSub(this.taskId)
if(res){ if(flag){
if(this.delData){ console.log(this.delData,"flagflagflagflag")
this.delDatas().then(()=>{ debugger
this.organizeData() if(this.delData){
let dataJson = JSON.stringify(this.tableData) this.delDatas().then(()=>{
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() this.organizeData()
let dataJson = JSON.stringify(this.tableData) let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark}) 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, userId: this.$store.getters.userInfo.usid,
prcType: this.prcType 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 { } else {
this.isSendDraft().then(()=>{ this.isSendDraft().then(()=>{
this.organizeData() this.organizeData()