【修改】修改报告上传流程

This commit is contained in:
zhoulingpo
2023-05-09 09:20:54 +08:00
parent 4bd06f2360
commit 64bee0eb7d
15 changed files with 660 additions and 368 deletions
+41 -94
View File
@@ -3,7 +3,9 @@
<div class="process_box">
<process-header v-if="$route.query.isBegin || $route.query.isDraft" :title="'发起流程'"></process-header>
<process-header v-else-if="$route.query.type == 'yiban'" :title="'已办流程'" :proceesNum="prcNum"></process-header>
<process-header v-else :title="'发起人修改'" :proceesNum="prcNum"></process-header>
<process-header v-else-if=" $route.query.taskDefinitionKey == 'reEdit'" :title="'发起人修改'" :proceesNum="prcNum"></process-header>
<process-header v-else="" :title="'发起流程'" ></process-header>
<div class="procedure">
<div class="process_content">
@@ -23,29 +25,16 @@
:rules="assignFormRules" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="选择一级审批人:" prop="oneApprove">
<el-form-item label="选择审批人:" prop="oneApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.oneApproveName"
@click.native="handleCheck('spr1')"
placeholder="请选择一级审批人员"></el-input>
placeholder="请选择审批人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="选择二级审批人员:" prop="twoApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName"
@click.native="handleCheck('spr2')"
placeholder="请选择二级审批人员"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="说明:" prop="remark">
<el-input type="textarea" :disabled="formControl" v-model="assignForm.remark" placeholder="请输入说明"></el-input>
</el-form-item>
<el-col :span="9" style="margin-left: 5px">
<el-button size="medium" type="primary" @click="handleCheck('spr1')">选取</el-button>
</el-col>
</el-row>
</el-form>
</div>
</div>
@@ -113,55 +102,26 @@ export default {
prcName: '',
privacyLevel: '',
},
processFormRule: {
prcName: [{
required: true,
message: '请输入流程名称',
trigger: 'change'
}, {
max: 100,
message: '申请原因最多填写100字符',
trigger: 'change'
}]
},
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
assignFormRules: {
oneApprove: [{
required: true,
message: '请选择一级审批人',
message: '请选择审批人',
trigger: 'change'
}],
twoApprove: [{
required: true,
message: '请选择二级审批人员',
trigger: 'change'
}],
remark: [{
max: 500, message: '说明最多填写500字符'
}]
},
prcType: 2,
prcType: 4,
prcName:''
}
},
async created() {
// 第一次进入此页面 需要清楚校验
if (this.$route.query.isBegin) {
// if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) {
// this.reportList(this.$route.query.ids)
// }
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
}
// 如果是从草稿进入的
if (this.$route.query.isDraft) {
this.isShowSave = true
@@ -170,16 +130,11 @@ export default {
this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName
this.getDraftDetail().then(res => {
this.$set(this.processForm,'prcName', this.prcName)
if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson)
this.processForm=JSON.parse(this.processOld.dataJson)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
}
this.$nextTick(()=>{
this.$refs.processFormRef.clearValidate()
@@ -188,51 +143,56 @@ export default {
})
}
if (this.$route.query.taskDefinitionKey == 'reEdit' ) {
else if (this.$route.query.taskDefinitionKey == 'reEdit' ) {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcName = this.$store.getters.handleProcess.prcName
this.prcName = JSON.stringify(this.prcName)
this.initShow = true
this.formControlname = true
this.$set(this.processForm,'prcName',this.$route.query.prcName)
await this.getProcessDetail()
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.processForm=JSON.parse(this.processOld.dataJson)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
}
if (this.$route.query.type == 'yiban') {
else if (this.$route.query.type == 'yiban') {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcName = this.$store.getters.handleProcess.prcName
this.formControl = true
this.initShow = true
this.showTableD = true
this.$set(this.processForm,'prcName', this.prcName)
this.getProcessDetail().then((res) => {
let submitJson = JSON.parse(this.processOld.submitJson)
this.processForm=JSON.parse(this.processOld.dataJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
})
}else{
// 第一次进入此页面 需要清楚校验
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
}
},
methods: {
handleReset() {
this.processForm.prcName = ''
if(this.$route.query.taskDefinitionKey == 'reEdit'){
this.processForm.prcName = this.prcName
this.processForm={
departmentName:'',
department:'',
name:'',
year:'',
labelList:'',
confidentialLevel:'',
secrecyLast:'',
privacyLevel:'',
tags:'',
mainContent:'',
fileId:'',
fileName:'',
}
this.applicationForm = {
applyReason: '',
@@ -244,6 +204,7 @@ export default {
twoApprove: ''
}
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
})
@@ -283,25 +244,11 @@ export default {
}
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
},
// 获取表格列表 吧查询到的值传给子组件
reportList(ids) {
this.$api.permissionProcess.getReportLisy({
pageSize:1000,
pageNo:1,
ids: ids.split(',')
}).then(({data}) => {
this.tableData = data.records.map(item => {
item.reportId = item['id']
delete item['id']
return item
})
})
},
// 保存
handleSave(){
this.saveLoading = true
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
let dataJson = JSON.stringify(this.processForm)
let params = {
prcName: this.processForm.prcName,
@@ -332,8 +279,8 @@ export default {
handleSubmit() {
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
this.$refs.assignFormRef.validate(async v => {
debugger
this.processForm=this.$refs.basMes.form
this.processForm.prcName=this.processForm.name
let z=this.$refs.basMes.submit()
if (v && z) {
//如果不是第一次
@@ -341,7 +288,7 @@ export default {
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,approvalOpinion:this.assignForm.remark})
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
this.completeProcess({
dataJson,
submitJson,
@@ -371,7 +318,7 @@ export default {
}
form.approvalOpinion = this.assignForm.remark
form.prcType = this.prcType
form.prcName = this.processForm.prcName
form.prcName = this.processForm.name
form.userId = this.$store.getters.userInfo.usid
form.bpnId = this.$store.getters.handleProcess?.id
//...this.applicationForm,...this.processForm,