diff --git a/src/api/workCenter.js b/src/api/workCenter.js index 98aa9666..19afa4b2 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -27,7 +27,7 @@ const enterprisePlanApprovalSave = (params) => postAction('/process/es/initChang // 根据三个编号和年代号获取企标编号 const getEnStandardNo = (params) => postAction('/process/es/initChange/getStandardNo', params) // 根据流程id获取流程信息 -const getProcessDataById = (params) => postAction('/process/es/initChange/handle', params) +const getProcessDataById = (taskId, params) => getAction(`/process/es/initChange/handle/${taskId}`, params) // 年度制修订计划(各部门主动上报) // 发起 diff --git a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue index c8fdf4d6..d00940f2 100644 --- a/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardInitChange/PlanApprovalChangeFlow.vue @@ -576,23 +576,23 @@ export default { methods: { // 根据流程id获取数据并回显 getProcessData (taskId) { - getProcessDataById({ taskId: taskId }).then(res => { + getProcessDataById(taskId).then(res => { if (res.success) { this.model = res.result this.$nextTick(() => { // 初始化流程信息 - this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes')) + this.processInfoForm.setFieldsValue(pick(this.model.commonVO, 'prcName', 'dueTime', 'prcMes')) // 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息 // this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile')) }) // 初始化业务基本信息的申请类型和项目类别 - this.formInline.applicationCategory = this.model[0].applicationCategory - this.formInline.projectType = this.model[0].projectType + this.formInline.applicationCategory = this.model.dataList[0].applicationCategory + this.formInline.projectType = this.model.dataList[0].projectType // 初始化人员信息 todo: 发起人还没处理 if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) { this.personnelInfoData = approvalPersonalInfo.map(item => { if (item.fieldName) { - return { ...item, userList: this.model[0][item.fieldName + '_dictText'], canChoose: false } + return { ...item, userList: this.model.flowUserInfoVO[item.fieldName + '_dictText'], canChoose: false } } else { return item } @@ -601,7 +601,7 @@ export default { this.personnelInfoData = changePersonalInfo.map(item => { console.log(item) if (item.fieldName) { - return { ...item, userList: this.model[0][item.fieldName + '_dictText'], canChoose: false } + return { ...item, userList: this.model.flowUserInfoVO[item.fieldName + '_dictText'], canChoose: false } } else { return item } @@ -612,7 +612,7 @@ export default { // 是立项 this.$nextTick(() => { this.$nextTick(() => { - const param = this.model[0] + const param = this.model.dataList[0] param.enStandardSystem = param.enStandardSystem.split(',').map(item => { return { value: item } }) this.$refs.approvalBaseInfo.formInline = param }) @@ -622,7 +622,7 @@ export default { this.model[0].projectType === ProjectType.WORK_TERMINATE.value)) { // 是完成时间变更或工作终止的变更 this.$nextTick(() => { - this.$refs.changeBaseInfo.dataSource = this.model + this.$refs.changeBaseInfo.dataSource = this.model.dataList }) } else if (this.model[0].applicationCategory === ApplicationCategory.CHANGE.value && (this.model[0].projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value || @@ -630,7 +630,7 @@ export default { // 是责任部门变更或合并变更 this.$nextTick(() => { this.$nextTick(() => { - const param = this.model[0] + const param = this.model.dataList[0] if (param.enStandardSystem) { param.enStandardSystem = param.enStandardSystem.split(',').map(item => { return { value: item } }) }