From e2b8764a74bd84260a1878c32c3218673c0ccad8 Mon Sep 17 00:00:00 2001 From: zhoulingpo Date: Fri, 12 May 2023 10:45:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=9B=B4=E6=8E=A5=E7=BC=96=E8=BE=91=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reportProcess/launch.vue | 82 +++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 25 deletions(-) diff --git a/src/views/reportProcess/launch.vue b/src/views/reportProcess/launch.vue index 57e01a2..4eef9fd 100644 --- a/src/views/reportProcess/launch.vue +++ b/src/views/reportProcess/launch.vue @@ -19,7 +19,7 @@ 审批历史 -
+
指派信息 @@ -78,6 +78,7 @@ export default { mixins: [processMixin], data() { return { + isLevel: true, dataId:'', showTableD: false, initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true @@ -177,6 +178,12 @@ export default { this.prcType=5 // 调用接口 this.ids=this.$route.query.ids + // 如果该用户的levelId==5 就直接编辑 并且不显示指派信息 + if(this.$store.getters.userInfo.levelId=='0.5'){ + this.isLevel=false + }else{ + this.isLevel = true + } this.getReportDetail() }else{ this.prcType=4 @@ -313,38 +320,63 @@ export default { // 提交 handleSubmit() { console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID") - this.$refs.assignFormRef.validate(async v => { + if(this.isLevel){ + this.$refs.assignFormRef.validate(async v => { + this.processForm=this.$refs.basMes.form + this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags) + this.processForm.prcName=this.processForm.name + // this.processForm.labelList= JSON.stringify(this.processForm.labelList) + + let z=this.$refs.basMes.submit() + if (v && z) { + this.processForm.createUserId=this.userId + //如果不是第一次 + if (this.initShow) { + let flag=await this.JuggleSub(this.taskId) + if(flag){ + let dataJson = JSON.stringify(this.processForm) + let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid}) + this.completeProcess({ + dataJson, + submitJson, + taskId: this.taskId, + userId: this.$store.getters.userInfo.usid, + prcType: this.prcType, + reportId: this.processForm.reportId|| '' + }) + } + } else { + this.startProcess() + } + + } else { + this.$message.warning('请检查表单填写完整') + } + }) + }else{ this.processForm=this.$refs.basMes.form this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags) this.processForm.prcName=this.processForm.name // this.processForm.labelList= JSON.stringify(this.processForm.labelList) let z=this.$refs.basMes.submit() - if (v && z) { - this.processForm.createUserId=this.userId - //如果不是第一次 - if (this.initShow) { - let flag=await this.JuggleSub(this.taskId) - if(flag){ - let dataJson = JSON.stringify(this.processForm) - let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid}) - this.completeProcess({ - dataJson, - submitJson, - taskId: this.taskId, - userId: this.$store.getters.userInfo.usid, - prcType: this.prcType, - reportId: this.processForm.reportId|| '' - }) - } - } else { - this.startProcess() - } - - } else { + if(z){ + this.processForm=this.$refs.basMes.form + this.processForm.id=this.processForm.reportId + this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags) + this.$api.report.reportAdd(this.processForm).then(_ => { + this.$message.success('编辑成功'); + this.$router.push({ + path:"/userCenter/processCenter", + query:{ + id:'AEHJB8YNJ3' + } + }) + }) + }else{ this.$message.warning('请检查表单填写完整') } - }) + } }, startProcess() { //把表单都整合到form中