[update] 标签管理,固定字段编辑,展示顺序及以下的字段可以编辑
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
||||||
<a-input
|
<a-input
|
||||||
v-model.trim="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
v-model.trim="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||||
|
:disabled="fixedFieldDisabled"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
<a-input
|
<a-input
|
||||||
v-model.trim="form.dbFieldEnName"
|
v-model.trim="form.dbFieldEnName"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||||
|
:disabled="fixedFieldDisabled"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -69,7 +71,7 @@
|
|||||||
type="list"
|
type="list"
|
||||||
v-model="form.fieldShowType"
|
v-model="form.fieldShowType"
|
||||||
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')"
|
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')"
|
||||||
:disabled="disabledEdit"
|
:disabled="disabledEdit || fixedFieldDisabled"
|
||||||
show-search
|
show-search
|
||||||
:options="fieldShowTypeOptions"
|
:options="fieldShowTypeOptions"
|
||||||
@change="fieldShowTypeChange"
|
@change="fieldShowTypeChange"
|
||||||
@@ -88,6 +90,7 @@
|
|||||||
@change="optionContentChange"
|
@change="optionContentChange"
|
||||||
show-search
|
show-search
|
||||||
:filter-option="filterOption"
|
:filter-option="filterOption"
|
||||||
|
:disabled="fixedFieldDisabled"
|
||||||
>
|
>
|
||||||
<!-- :filter-option="filterOption"-->
|
<!-- :filter-option="filterOption"-->
|
||||||
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
|
<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-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"
|
<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')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldLength')"
|
||||||
|
:disabled="fixedFieldDisabled"
|
||||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -199,7 +203,7 @@
|
|||||||
|
|
||||||
import { addTag, ajaxGetDictItems, editTag, getDictByCode, getShowAreaData, queryDictName } from '../../../../api/api'
|
import { addTag, ajaxGetDictItems, editTag, getDictByCode, getShowAreaData, queryDictName } from '../../../../api/api'
|
||||||
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
|
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
|
||||||
import { FieldType, TagsAttributeTypeEnums, TagsTypeEnums } from '../../../../enums/commonEnums'
|
import { FieldType, TagsAttributeTypeEnums, TagsTypeEnums, IsReadOnlyEnums } from '../../../../enums/commonEnums'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardDrawer',
|
name: 'StandardDrawer',
|
||||||
@@ -217,9 +221,16 @@ export default {
|
|||||||
type: String
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 固定字段不可编辑的判断
|
||||||
|
fixedFieldDisabled () {
|
||||||
|
return (this.form.isReadOnly || this.form.isReadOnly === 0) && this.form.isReadOnly !== IsReadOnlyEnums.configurable.value
|
||||||
|
}
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
FieldType,
|
FieldType,
|
||||||
|
IsReadOnlyEnums,
|
||||||
canOpeFlag: process.env.VUE_APP_TAG_FLAG === '0', // 是否存在字段名称,开发环境存在
|
canOpeFlag: process.env.VUE_APP_TAG_FLAG === '0', // 是否存在字段名称,开发环境存在
|
||||||
visible: false,
|
visible: false,
|
||||||
title: '',
|
title: '',
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export default {
|
|||||||
clickEvent: 'handleEdit',
|
clickEvent: 'handleEdit',
|
||||||
has: 'tag:edit',
|
has: 'tag:edit',
|
||||||
show: (record) => {
|
show: (record) => {
|
||||||
return (this.canOpeFlag && (record.isReadOnly === IsReadOnlyEnums.configurable.value))
|
return this.canOpeFlag
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
|
|||||||
Reference in New Issue
Block a user