Merge remote-tracking branch 'origin/secondStage' into secondStage

This commit is contained in:
赵霄
2023-12-13 15:13:42 +08:00
3 changed files with 56 additions and 30 deletions
+31 -7
View File
@@ -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) {
+18 -18
View File
@@ -37,7 +37,7 @@
</a-col>
<a-col :span="3"></a-col>
</a-row>
<a-row style="margin-bottom: 0;">
<a-row style="margin-bottom: 2%;">
<a-col :span="3"></a-col>
<a-col :span="12">
<a-form-item>
@@ -58,22 +58,22 @@
</a-col>
<a-col :span="3"></a-col>
</a-row>
<a-row style="margin-bottom: 2%;">
<a-col :span="3"></a-col>
<a-col :span="7">
<a-form-item>
<a-checkbox v-decorator="['rememberMe', {initialValue: true, valuePropName: 'checked'}]">自动登录</a-checkbox>
</a-form-item>
</a-col>
<a-col :span="6"></a-col>
<a-col :span="5" style="text-align: right;color: #1891FF;">
<a-form-item>
<router-link :to="{ name: 'alteration'}" class="forge-password" style="float: right;">
忘记密码
</router-link>
</a-form-item>
</a-col>
</a-row>
<!--<a-row style="margin-bottom: 2%;">-->
<!-- <a-col :span="3"></a-col>-->
<!-- <a-col :span="7">-->
<!-- <a-form-item>-->
<!-- <a-checkbox v-decorator="['rememberMe', {initialValue: true, valuePropName: 'checked'}]">自动登录</a-checkbox>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :span="6"></a-col>-->
<!-- <a-col :span="5" style="text-align: right;color: #1891FF;">-->
<!-- <a-form-item>-->
<!-- <router-link :to="{ name: 'alteration'}" class="forge-password" style="float: right;">-->
<!-- 忘记密码-->
<!-- </router-link>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!--</a-row>-->
<a-row class="login-btn">
<a-col :span="3"></a-col>
<a-col :span="18">
@@ -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;
@@ -138,7 +138,7 @@
</div>
<a-form-model-item class="item-model" prop="initiator">
<user-selection :placeholder="$t('pleaseEnter')+$t('workCenter.standardPromotionProcess.contactPerson')"
type="checkbox" :nameStr="initiatorName" :disabled="disabledInitiator" :show-btn="!disabledInitiator"
type="checkbox" :nameStr="initiatorName"
v-model="formInline.initiator" />
</a-form-model-item>
</div>
@@ -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)
}
})
}