diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 0700e61b..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: { @@ -332,8 +333,10 @@ export default { } } else if (val === StandardGradeClassify.ONE_LEVEL.value) { // 选的是1级 - // 带出3级的部门:起草部门 - this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds + // // 带出3级的部门:起草部门 + // this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds + // 带出主起草单位 + this.formInline.auth_dept = this.formInline.main_drafting_unit // 设置可选择项 this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '1').deptIds.split(',') this.formInline = JSON.parse(JSON.stringify(this.formInline)) @@ -343,8 +346,10 @@ export default { } } else if (val === StandardGradeClassify.TWO_LEVEL.value) { // 选的是2级 - // 带出3级的部门:起草部门 - this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds + // // 带出3级的部门:起草部门 + // this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds + // 带出主起草单位 + this.formInline.auth_dept = this.formInline.main_drafting_unit // 设置可选择项 this.departSelectRange = this.standardGradeClassification.find(item => item.level + '' === '2').deptIds.split(',') this.formInline = JSON.parse(JSON.stringify(this.formInline)) @@ -353,8 +358,10 @@ export default { this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'auth_dept') } } else if (val === StandardGradeClassify.THREE_LEVEL.value) { - // 选的是3级,授权部门带出不可编辑 - this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds + // // 选的是3级,授权部门带出不可编辑 + // this.formInline.auth_dept = this.standardGradeClassification.find(item => item.level + '' === '3').deptIds + // 选的是3级,带出主起草单位 + this.formInline.auth_dept = this.formInline.main_drafting_unit if (!this.innerDisabledField.includes('auth_dept')) { this.innerDisabledField.push('auth_dept') } @@ -389,6 +396,23 @@ export default { } } }, + // 主起草单位改变后,需要将选中的主起草单位增加到授权部门 + 'formInline.main_drafting_unit' (val) { + if (val) { + if (this.formInline.grade_classification === StandardGradeClassify.ONE_LEVEL.value || + this.formInline.grade_classification === StandardGradeClassify.TWO_LEVEL.value) { + // 标准等级分类是1级或者2级需要,把主起草单位追加到授权部门 + 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 + } + }, // 企标是否试行改变,标准状态需要跟着变,试行周期必填校验也跟着变 'formInline.try_flag' (val) { if (val && this.flag === StandardSource.ENTERPRISE.value) { diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 290164f2..5c7a8522 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -37,7 +37,7 @@ - + @@ -58,22 +58,22 @@ - - - - - 自动登录 - - - - - - - 忘记密码 - - - - + + + + + + + + + + + + + + + + @@ -430,7 +430,7 @@ function isMobile () { .user-layout-login{ z-index: 99; width: 24%; - height: 59%; + height: 50%; padding: 3% 0 3% 0; min-width: 332px; min-height: 460px; diff --git a/src/views/workCenter/standardPromotionProcess/modules/BaseInfoForm.vue b/src/views/workCenter/standardPromotionProcess/modules/BaseInfoForm.vue index 0149958f..3f96e267 100644 --- a/src/views/workCenter/standardPromotionProcess/modules/BaseInfoForm.vue +++ b/src/views/workCenter/standardPromotionProcess/modules/BaseInfoForm.vue @@ -138,7 +138,7 @@ @@ -297,11 +297,13 @@ export default { changeParticipatingUnits (val) { getLiaisonList({ deptIds: val }).then(res => { if (res.success) { - const data = res.result || '' + const data = res.result || [] + const ids = data.map(item => item.contactId).join(',') + const names = data.map(item => item.contactIdDictText).join(',') // 如果是清空,设置禁用,否则根据返回内容设置禁用 - this.disabledInitiator = val ? !!data : true - this.initiatorName = data - this.$set(this.formInline, 'initiator', data) + this.disabledInitiator = val ? !!ids : true + this.initiatorName = names + this.$set(this.formInline, 'initiator', ids) } }) }