diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 39a92414..9ef90ed6 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -313,7 +313,8 @@ export default { standardGradeClassification: [], // 企标级别映射 innerDisabledField: [], // 内部不可编辑字段 departSelectRange: [], // 选择部门的选择范围,传了就只能从这些里面选,不传就都能选 - isEditSetData: false // 正在编辑回显数据 + isEditSetData: false, // 正在编辑回显数据 + oldMainDraftingUnit: '' // 上一次的主起草单位 } }, watch: { @@ -401,13 +402,15 @@ export default { if (this.formInline.grade_classification === StandardGradeClassify.ONE_LEVEL.value || this.formInline.grade_classification === StandardGradeClassify.TWO_LEVEL.value) { // 标准等级分类是1级或者2级需要,把主起草单位追加到授权部门 - const authDeptArr = (this.formInline.auth_dept || '').split(',') + let authDeptArr = (this.formInline.auth_dept || '').split(',') + authDeptArr = authDeptArr.filter(item => item !== this.oldMainDraftingUnit) authDeptArr.push(val) this.formInline.auth_dept = authDeptArr.join(',') } else if (this.formInline.grade_classification === StandardGradeClassify.THREE_LEVEL.value) { // 标准等级分类是3级,把授权部门替换成主起草单位 this.formInline.auth_dept = val } + this.oldMainDraftingUnit = val } }, // 企标是否试行改变,标准状态需要跟着变,试行周期必填校验也跟着变