From 9129dee2e9ff49e51040277911e760e52e0f0c97 Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Fri, 16 Aug 2024 18:02:18 +0800
Subject: [PATCH] =?UTF-8?q?[update]=20=E6=A0=87=E7=AD=BE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=EF=BC=8C=E5=9B=BA=E5=AE=9A=E5=AD=97=E6=AE=B5=E7=BC=96=E8=BE=91?=
=?UTF-8?q?=EF=BC=8C=E5=B1=95=E7=A4=BA=E9=A1=BA=E5=BA=8F=E5=8F=8A=E4=BB=A5?=
=?UTF-8?q?=E4=B8=8B=E7=9A=84=E5=AD=97=E6=AE=B5=E5=8F=AF=E4=BB=A5=E7=BC=96?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/tags/modules/StandardDrawer.vue | 15 +++++++++++++--
src/views/system/tags/pages/StandardList.vue | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
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
}
},
// 删除