diff --git a/src/views/system/tags/modules/StandardDrawer.vue b/src/views/system/tags/modules/StandardDrawer.vue index 791a85e..1a138dd 100644 --- a/src/views/system/tags/modules/StandardDrawer.vue +++ b/src/views/system/tags/modules/StandardDrawer.vue @@ -38,6 +38,7 @@ @@ -48,6 +49,7 @@ @@ -69,7 +71,7 @@ type="list" v-model="form.fieldShowType" :placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')" - :disabled="disabledEdit" + :disabled="disabledEdit || fixedFieldDisabled" show-search :options="fieldShowTypeOptions" @change="fieldShowTypeChange" @@ -88,6 +90,7 @@ @change="optionContentChange" show-search :filter-option="filterOption" + :disabled="fixedFieldDisabled" > @@ -102,6 +105,7 @@ @@ -199,7 +203,7 @@ import { addTag, ajaxGetDictItems, editTag, getDictByCode, getShowAreaData, queryDictName } from '../../../../api/api' import JDictSelectTag from '../../../../components/dict/JDictSelectTag' -import { FieldType, TagsAttributeTypeEnums, TagsTypeEnums } from '../../../../enums/commonEnums' +import { FieldType, TagsAttributeTypeEnums, TagsTypeEnums, IsReadOnlyEnums } from '../../../../enums/commonEnums' export default { name: 'StandardDrawer', @@ -217,9 +221,16 @@ export default { type: String } }, + computed: { + // 固定字段不可编辑的判断 + fixedFieldDisabled () { + return (this.form.isReadOnly || this.form.isReadOnly === 0) && this.form.isReadOnly !== IsReadOnlyEnums.configurable.value + } + }, data () { return { FieldType, + IsReadOnlyEnums, canOpeFlag: process.env.VUE_APP_TAG_FLAG === '0', // 是否存在字段名称,开发环境存在 visible: false, title: '', diff --git a/src/views/system/tags/pages/StandardList.vue b/src/views/system/tags/pages/StandardList.vue index eebb8f9..856078a 100644 --- a/src/views/system/tags/pages/StandardList.vue +++ b/src/views/system/tags/pages/StandardList.vue @@ -171,7 +171,7 @@ export default { clickEvent: 'handleEdit', has: 'tag:edit', show: (record) => { - return (this.canOpeFlag && (record.isReadOnly === IsReadOnlyEnums.configurable.value)) + return this.canOpeFlag } }, // 删除