diff --git a/src/common/lang/workCenter/en.js b/src/common/lang/workCenter/en.js index 442deaf..4ccd1ba 100644 --- a/src/common/lang/workCenter/en.js +++ b/src/common/lang/workCenter/en.js @@ -116,7 +116,8 @@ module.exports = { reviewersPerson: 'Reviewer', approvedPerson: 'Approved personnel', batchEdit: 'Bulk edit', - pleaseSelectInterpreter: 'Select at least one piece of data for each department involved to interpret' + pleaseSelectInterpreter: 'Select at least one piece of data for each department involved to interpret', + pleaseSelectClause: 'Please select terms' }, // 流程配置 processConfig: { diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js index b6b3733..949c669 100644 --- a/src/common/lang/workCenter/zh.js +++ b/src/common/lang/workCenter/zh.js @@ -116,7 +116,8 @@ module.exports = { reviewersPerson: '审核人员', approvedPerson: '批准人员', batchEdit: '批量编辑', - pleaseSelectInterpreter: '至少选择一条数据的各涉及部门解读人' + pleaseSelectInterpreter: '至少选择一条数据的各涉及部门解读人', + pleaseSelectClause: '请选择条款' }, // 流程配置 processConfig: { diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js index fab4a8d..37514a7 100644 --- a/src/enums/commonEnums.js +++ b/src/enums/commonEnums.js @@ -257,3 +257,8 @@ export const IsDistribute = { DISTRIBUTE: { text: '是', value: '1' }, NOT_DISTRIBUTE: { text: '否', value: '2' } } + +// 标准解读流程-分解单来源 +export const DecompositionSource = { + NO_INPUT: { text: '不带入', value: 'noncarry' } +} diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue index 0dff852..ec9f21d 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue @@ -62,7 +62,7 @@ import StandardSelectionModal from '@comp/selection/StandardSelectionModal' import { interpretGetClauseList, interpretGetFileByStandardId } from '@api/workCenter' import { randomUUID } from '@/utils/util' -import { StandardSource } from '@/enums/commonEnums' +import { DecompositionSource, StandardSource } from '@/enums/commonEnums' import InterpretationClauseTable from '@views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable' export default { @@ -165,6 +165,11 @@ export default { // 校验失败就标记true obj._flag = true } + // 如果是不带入,就提示选择条款 + if (this.dataSource.length && (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value)) { + this.$message.warn('workCenter.standardInterpretationProcess.pleaseSelectClause') + obj._flag = true + } } // 选择的标准列表 obj.standardData = this.dataSource @@ -205,6 +210,16 @@ export default { // 如果有条款的表格,就清空然后隐藏 this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([]) this.showClauseTable = true + // 如果是不带入,不需要请求,直接将标准数据带入 + if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) { + this.$nextTick(() => { + this.$refs.interpretationClauseTable.setData([{ + itemTitle: this.dataSource[0].standardName, + itemNum: this.dataSource[0].standardNumber + }]) + }) + return + } this.loading = true interpretGetClauseList({ standardId: this.dataSource[0].id, @@ -231,6 +246,7 @@ export default { this.showClauseTable = false if (this.dataSource.length) { this.dataSource[0].standardId = this.dataSource[0].id + this.dataSource[0].decompositionSource = DecompositionSource.NO_INPUT.value this.initInterpretGetFileByStandardId(this.dataSource[0].id) } },