diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index dec41838..4bfe39d6 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -179,6 +179,13 @@ export const PayState = new EsEnums({
nonPayment: { text: '未支付', value: '2' }
})
+// 标签管理-只读状态的数据字段
+export const IsReadOnlyEnums = {
+ configurable: { text: '非固定字段', value: 0 },
+ fixed: { text: '固定的', value: 1 },
+ subConfigurable: { text: '字段固定,内部可配', value: 2 }
+}
+
// 标准法规入库/变更流程
export const FGEntryChangeProcessNode = {
initiate: { text: '法规工程师发起', value: '1', btn: ['save', 'submit'] },
diff --git a/src/views/system/DictItemList.vue b/src/views/system/DictItemList.vue
index 137db192..370b16d7 100644
--- a/src/views/system/DictItemList.vue
+++ b/src/views/system/DictItemList.vue
@@ -43,7 +43,7 @@
- {{ $t('newlyAdded') }}
+ {{ $t('newlyAdded') }}
@@ -62,9 +62,9 @@
>
- {{ $t('edit') }}
+ {{ $t('edit') }}
- handleDelete(record.id)">
+ handleDelete(record.id)" v-if="record.isReadOnly === IsReadOnlyEnums.subConfigurable.value || record.isReadOnly === IsReadOnlyEnums.configurable.value">
{{ $t('delete') }}
@@ -83,6 +83,7 @@ import { filterObj } from '@/utils/util'
import DictItemModal from './modules/DictItemModal'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import JInput from '@/components/jero/JInput'
+import { IsReadOnlyEnums } from '../../enums/commonEnums'
export default {
name: 'DictItemList',
@@ -90,6 +91,7 @@ export default {
components: { DictItemModal, JInput },
data () {
return {
+ IsReadOnlyEnums,
columns: [
{
title: this.$t('name'),
@@ -124,6 +126,7 @@ export default {
delFlag: '1',
status: []
},
+ isReadOnly: IsReadOnlyEnums.configurable.value,
title: this.$t('operation'),
visible: false,
screenWidth: 1000,
@@ -162,6 +165,7 @@ export default {
edit (record) {
if (record.id) {
this.dictId = record.id
+ this.isReadOnly = record.isReadOnly // 父级readonly的值 用于判断是否可以编辑
}
this.queryParam = {}
this.form.resetFields()
diff --git a/src/views/system/modules/DictItemModal.vue b/src/views/system/modules/DictItemModal.vue
index 1b1089b1..0475fc1f 100644
--- a/src/views/system/modules/DictItemModal.vue
+++ b/src/views/system/modules/DictItemModal.vue
@@ -74,6 +74,7 @@
// import pick from 'lodash.pick'
import { addDictItem, editDictItem } from '@/api/api'
import { getAction } from '@api/manage'
+import { IsReadOnlyEnums } from '../../../enums/commonEnums'
export default {
name: 'DictItemModal',
@@ -149,9 +150,11 @@ export default {
} else {
obj = editDictItem
}
- const params = Object.assign({}, this.model, {
- dictId: this.dictId, // 数据字典的id
+ const params = Object.assign({
isTagDict: 0, // 是否为标签管理的表示
+ isReadOnly: IsReadOnlyEnums.configurable.value // 是否可以操作,默认是可配的
+ }, this.model, {
+ dictId: this.dictId, // 数据字典的id
delFlag: 0 // 是否删除的标识,新的接口必须增加这一个字段,可以联系后端沟通,否则不能查看
})
obj(params).then((res) => {
diff --git a/src/views/system/tags/modules/ClauseSplittingDrawer.vue b/src/views/system/tags/modules/ClauseSplittingDrawer.vue
index 1864e8f2..a4ed347f 100644
--- a/src/views/system/tags/modules/ClauseSplittingDrawer.vue
+++ b/src/views/system/tags/modules/ClauseSplittingDrawer.vue
@@ -63,6 +63,7 @@
@@ -74,6 +75,7 @@
v-model="form.dictId"
show-search
:filter-option="filterOption"
+ @change="optionContentChange"
>
{{ item.dictName }}
@@ -291,6 +293,18 @@ export default {
onClose () {
this.visible = false
},
+ fieldShowTypeChange (e) {
+ this.form.dictId = undefined
+ // 很重要,必须要复制一下,否则不能重新赋值成功
+ this.form = { ...this.form }
+ this.$forceUpdate()
+ },
+ optionContentChange (e) {
+ this.form.dictId = e
+ // 很重要,必须要复制一下,否则不能重新赋值成功
+ this.form = { ...this.form }
+ this.$forceUpdate()
+ },
handleOk () {
this.$refs.editForm.validate((valid) => {
console.log('---err-----', valid)
@@ -347,7 +361,7 @@ export default {
val = val + ''
// this.contentFlag=val
// 树形结构
- if (val === FieldType.TREE.value) {
+ if (val === FieldType.TREE.value || val === FieldType.TREE_SINGLE.value || val === FieldType.TREE_MODAL_SELECT.value) {
this.contentOption = [...this.contentOptionTree]
this.isTagContent = true
} else if (val === FieldType.OPTION_SINGLE.value || val === FieldType.OPTION_MORE.value) {
diff --git a/src/views/system/tags/modules/StandardDrawer.vue b/src/views/system/tags/modules/StandardDrawer.vue
index 611ddff4..389f9bf1 100644
--- a/src/views/system/tags/modules/StandardDrawer.vue
+++ b/src/views/system/tags/modules/StandardDrawer.vue
@@ -83,7 +83,7 @@
-
+
{{ item.dictName }}
@@ -359,13 +359,17 @@ export default {
onClose () {
this.visible = false
},
- fieldShowTypeChange(e) {
- console.log(e, '----------')
- // this.form.dictId = undefined
- // this.$refs.editForm.resetFields({
- // dictId: undefined
- // })
- // this.$forceUpdate()
+ fieldShowTypeChange (e) {
+ this.form.dictId = undefined
+ // 很重要,必须要复制一下,否则不能重新赋值成功
+ this.form = { ...this.form }
+ this.$forceUpdate()
+ },
+ optionContentChange (e) {
+ this.form.dictId = e
+ // 很重要,必须要复制一下,否则不能重新赋值成功
+ this.form = { ...this.form }
+ this.$forceUpdate()
},
handleOk () {
this.$refs.editForm.validate((valid) => {
diff --git a/src/views/system/tags/modules/TagContentDictItemModal.vue b/src/views/system/tags/modules/TagContentDictItemModal.vue
index 8197759f..c9f18201 100644
--- a/src/views/system/tags/modules/TagContentDictItemModal.vue
+++ b/src/views/system/tags/modules/TagContentDictItemModal.vue
@@ -74,7 +74,7 @@