diff --git a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue index 83442f7..2d86047 100644 --- a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue +++ b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue @@ -380,7 +380,7 @@ export default { // 分解单来源 decompositionSource: compData.standardData[0] && compData.standardData[0].decompositionSource, // 标准id - standardId: compData.standardData[0] && compData.standardData[0].id, + standardId: compData.standardData[0] && compData.standardData[0].standardId, projectId: this.projectId }) params.data.processStandardInterpretClauseList = compData.clauseData @@ -415,6 +415,18 @@ export default { params.data.processStandardInterpretClauseList = [] params.data.processStandardInterpretClauseSublistList = compData.clauseInterpretData } + // 后端取值不能为空,设置成空字符串 + const notIsNullField = [ + 'approvePersonId', // 批准人员 + 'countersignPersonIds', // 会签人员 + 'masterInterpretId', // 主解读人 + 'uploader' // 审核人员 + ] + notIsNullField.forEach(field => { + if (!params.data.processStandardInterpret[field]) { + params.data.processStandardInterpret[field] = '' + } + }) // 保存草稿信息 params.infoJsonStr = JSON.stringify({ diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue index a5214a0..f2268db 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue @@ -162,6 +162,10 @@ export default { // 更新组件内的数据 setData (data) { this.dataSource = [data.data.processStandardInterpret] + // 有数据更新下拉菜单 + if (this.dataSource.length) { + this.initInterpretGetFileByStandardId(this.dataSource[0].standardId) + } // 如果有条款列表就回显条款列表 if (data.data.processStandardInterpretClauseList && data.data.processStandardInterpretClauseList.length) { this.showClauseTable = true @@ -210,18 +214,26 @@ export default { handleAddStandardCallback (list) { console.log(list) this.dataSource = list || [] - this.decompositionSourceList = [] + this.dataSource[0].standardId = this.dataSource[0].id // 如果有条款的表格,就清空然后隐藏 this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([]) this.showClauseTable = false if (this.dataSource.length) { - interpretGetFileByStandardId({ standardId: this.dataSource[0].id }).then(res => { - if (res.success) { - this.decompositionSourceList = res.result || [] - } - }) + this.initInterpretGetFileByStandardId(this.dataSource[0].id) } }, + /** + * 获取分解单来源下拉 + * @param standardId - 标准id + */ + initInterpretGetFileByStandardId (standardId) { + this.decompositionSourceList = [] + interpretGetFileByStandardId({ standardId }).then(res => { + if (res.success) { + this.decompositionSourceList = res.result || [] + } + }) + }, // 修改分解单来源 handleChangeDecompositionSource (val) { this.decompositionSource = val diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue index c37ca32..c50e647 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue @@ -252,7 +252,7 @@ export default { } } else { // 不需要校验,直接获取各部分数据 - Object.assign({}, this.form.getFieldsValue()) + Object.assign(obj.formData, this.form.getFieldsValue()) // 选择下一步,获取新增部分的数据 if (this.isNextStep) { obj.clauseData = this.$refs.interpretationClauseTable.getData()