[update] 标签管理,固定字段编辑,展示顺序及以下的字段可以编辑
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
||||
<a-input
|
||||
v-model.trim="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||
:disabled="fixedFieldDisabled"
|
||||
:maxLength="50"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
@@ -48,6 +49,7 @@
|
||||
<a-input
|
||||
v-model.trim="form.dbFieldEnName"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||
:disabled="fixedFieldDisabled"
|
||||
:maxLength="50"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
@@ -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"
|
||||
>
|
||||
<!-- :filter-option="filterOption"-->
|
||||
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
|
||||
@@ -102,6 +105,7 @@
|
||||
<a-form-model-item :label="$t('system.tag.fieldLength')" prop="dbLength" key="dbLength">
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="form.fieldShowType === FieldType.TEXT_BOX.value ? 50 : 9999"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldLength')"
|
||||
:disabled="fixedFieldDisabled"
|
||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
@@ -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: '',
|
||||
|
||||
@@ -171,7 +171,7 @@ export default {
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'tag:edit',
|
||||
show: (record) => {
|
||||
return (this.canOpeFlag && (record.isReadOnly === IsReadOnlyEnums.configurable.value))
|
||||
return this.canOpeFlag
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
|
||||
Reference in New Issue
Block a user