【修改】监控流程
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<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-form ref="applicationFormRef" :model="applicationForm" label-width="150px"
|
||||
@@ -296,11 +296,28 @@ export default {
|
||||
}
|
||||
},
|
||||
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(){
|
||||
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user