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中