【修改】修改编辑报告流程

This commit is contained in:
zhoulingpo
2023-05-11 14:46:44 +08:00
parent 690e79964e
commit 2c40afc090
3 changed files with 32 additions and 35 deletions
+2 -2
View File
@@ -89,7 +89,7 @@ export default {
},
PERMISSION,
submitjson:{},
prcType: 4
prcType: ''
}
},
created () {
@@ -98,7 +98,7 @@ export default {
this.prcNum=this.$store.getters.handleProcess.prcNum
this.prcId=this.$store.getters.handleProcess.prcId
this.prcName=this.$store.getters.handleProcess.prcName
this.prcType = this.$store.getters.handleProcess?.prcType
let params={
prcId: this.prcId,
+23 -10
View File
@@ -110,18 +110,12 @@ export default {
trigger: 'change'
}],
},
prcType: 4,
prcName:''
prcType: '',
prcName:'',
ids:''
}
},
async created() {
// if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) {
// this.reportList(this.$route.query.ids)
// }
// 如果是从草稿进入的
if (this.$route.query.isDraft) {
this.isShowSave = true
@@ -130,6 +124,7 @@ export default {
this.prcNum = this.$store.getters.handleProcess?.prcNum
this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName
this.prcType = this.$store.getters.handleProcess?.prcType
this.getProcessDetail().then(res => {
if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson)
@@ -147,6 +142,7 @@ export default {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcType = this.$store.getters.handleProcess?.prcType
this.initShow = true
this.formControlname = true
await this.getProcessDetail()
@@ -161,6 +157,7 @@ export default {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcType = this.$store.getters.handleProcess?.prcType
this.formControl = true
this.initShow = true
this.showTableD = true
@@ -172,13 +169,29 @@ export default {
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
})
}else{
// 第一次进入此页面 需要清楚校验
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
// 第一次进入此页面 需要依据ids区分是新增还是编辑流程
if(this.$route.query.ids){
this.prcType=5
// 调用接口
this.ids=this.$route.query.ids
this.getReportDetail()
}else{
this.prcType=4
}
}
},
methods: {
// 获取报告详情
getReportDetail(){
this.$api.report.getReportDetail(this.ids).then(res=>{
this.processForm=res.data
})
},
handleReset() {
this.processForm={
departmentName:'',