[fix 86965] 功能安全中心成员二级和三级不能新增联系人

This commit is contained in:
danshihao
2024-07-09 11:36:33 +08:00
parent 27ecc0e753
commit c43aa5c026
2 changed files with 9 additions and 2 deletions
+8 -2
View File
@@ -2,7 +2,7 @@
<!-- 在点击组件时获取联系人列表-->
<div>
<a-row>
<a-col :span="20">
<a-col :span="canAdd ? 20 : 24">
<a-select :value="value"
v-bind="$attrs"
v-on="$listeners"
@@ -14,7 +14,7 @@
<a-select-option v-for="item in contactsList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select>
</a-col>
<a-col :span="4" class="form-btn">
<a-col :span="4" class="form-btn" v-if="canAdd">
<a-button icon="plus" v-bind="$attrs" @click="addContacts"></a-button>
</a-col>
</a-row>
@@ -50,6 +50,12 @@ export default {
return {}
}
},
// 是否可以新增:true--可以;false--不可以
canAdd: {
type: Boolean,
required: false,
default: true
},
value: {
type: [String, Object],
required: false,
@@ -34,6 +34,7 @@
v-decorator="[`contactsList[${index}].contactsId`, {rules: [{ required: index === 0, validator: index === 0 ? validateContactRequired : validateContact }],validateTrigger: 'change'}]"
:maxLength='50'
:ref="`selectContacts${index}`"
:can-add="isSafetyCenter"
:customListFn="isSafetyCenter ? null : getContactsByCompanyBySafetyCenter"
:customListParams="isSafetyCenter ? {} : customListParams"
@ok="addContactsOneOk"></select-contacts>