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

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
+7 -23
View File
@@ -874,29 +874,13 @@ export default {
}, },
// 打开报告上传 // 打开报告上传
openReportModify(mode, row) { openReportModify(mode, row) {
this.reportF = { this.$router.push({
name: '', // 报告名称 path:'/reportprocess/launch',
mainContent: '', // 内容摘要 query:{
department: '', // 报告所属部门 id:this.$route.query.id,
fileName: '', // 文件上传 ids:row.id
fileId: '', }
year: '', // 报告年份 })
privacyLevel: undefined, //报告隐私等级
reportUserIdList: [], // 权限
confidentialLevel:undefined, //涉密等级
labelList:[] //标签
};
this.tags = []
this.mode = mode;
// this.labelList();
let rowData = JSON.parse(JSON.stringify(row));
console.log('rowData',rowData);
this.reportF = rowData;
// this.reportF.tags=JSON.parse(rowData.keyContent)
this.tags=JSON.parse(rowData.keyContent)
if(this.tags == '') this.tags =[]
this.$forceUpdate()
this.dialogReport = true;
}, },
// 获取所有用户 // 获取所有用户
sysUserList() { sysUserList() {
+2 -2
View File
@@ -89,7 +89,7 @@ export default {
}, },
PERMISSION, PERMISSION,
submitjson:{}, submitjson:{},
prcType: 4 prcType: ''
} }
}, },
created () { created () {
@@ -98,7 +98,7 @@ export default {
this.prcNum=this.$store.getters.handleProcess.prcNum this.prcNum=this.$store.getters.handleProcess.prcNum
this.prcId=this.$store.getters.handleProcess.prcId this.prcId=this.$store.getters.handleProcess.prcId
this.prcName=this.$store.getters.handleProcess.prcName this.prcName=this.$store.getters.handleProcess.prcName
this.prcType = this.$store.getters.handleProcess?.prcType
let params={ let params={
prcId: this.prcId, prcId: this.prcId,
+23 -10
View File
@@ -110,18 +110,12 @@ export default {
trigger: 'change' trigger: 'change'
}], }],
}, },
prcType: 4, prcType: '',
prcName:'' prcName:'',
ids:''
} }
}, },
async created() { 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) { if (this.$route.query.isDraft) {
this.isShowSave = true this.isShowSave = true
@@ -130,6 +124,7 @@ export default {
this.prcNum = this.$store.getters.handleProcess?.prcNum this.prcNum = this.$store.getters.handleProcess?.prcNum
this.prcId = this.$store.getters.handleProcess?.prcId this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName this.prcName = this.$store.getters.handleProcess?.prcName
this.prcType = this.$store.getters.handleProcess?.prcType
this.getProcessDetail().then(res => { this.getProcessDetail().then(res => {
if(this.processOld.submitJson !== '{}'){ if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson) let submitJson=JSON.parse(this.processOld.submitJson)
@@ -147,6 +142,7 @@ export default {
this.taskId = this.$store.getters.handleProcess.taskId this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId this.prcId = this.$store.getters.handleProcess.prcId
this.prcType = this.$store.getters.handleProcess?.prcType
this.initShow = true this.initShow = true
this.formControlname = true this.formControlname = true
await this.getProcessDetail() await this.getProcessDetail()
@@ -161,6 +157,7 @@ export default {
this.taskId = this.$store.getters.handleProcess.taskId this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId this.prcId = this.$store.getters.handleProcess.prcId
this.prcType = this.$store.getters.handleProcess?.prcType
this.formControl = true this.formControl = true
this.initShow = true this.initShow = true
this.showTableD = true this.showTableD = true
@@ -172,13 +169,29 @@ export default {
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName) this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
}) })
}else{ }else{
// 第一次进入此页面 需要清楚校验
this.isShowSave = true this.isShowSave = true
this.$store.commit('setHandleProcess','') this.$store.commit('setHandleProcess','')
this.handleReset() this.handleReset()
// 第一次进入此页面 需要依据ids区分是新增还是编辑流程
if(this.$route.query.ids){
this.prcType=5
// 调用接口
this.ids=this.$route.query.ids
this.getReportDetail()
}else{
this.prcType=4
}
} }
}, },
methods: { methods: {
// 获取报告详情
getReportDetail(){
this.$api.report.getReportDetail(this.ids).then(res=>{
this.processForm=res.data
})
},
handleReset() { handleReset() {
this.processForm={ this.processForm={
departmentName:'', departmentName:'',