[update] 修改bug87504,并且属性类型去掉树形弹框特殊的两项,标签管理去掉条款拆分tab

This commit is contained in:
lideqin
2024-08-09 20:27:20 +08:00
parent 5d7d38b770
commit a78a8160a3
2 changed files with 21 additions and 5 deletions
@@ -66,11 +66,12 @@
<a-col :span="24">
<a-form-model-item :label="$t('system.tag.attributeType')" prop="fieldShowType">
<j-dict-select-tag
type="list" v-model="form.fieldShowType"
dictCode="field_show_type"
type="list"
v-model="form.fieldShowType"
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')"
:disabled="disabledEdit"
show-search
:options="fieldShowTypeOptions"
@change="fieldShowTypeChange"
/>
<!-- @change="form.dictId = undefined"-->
@@ -196,7 +197,7 @@
<script>
import { addTag, editTag, getShowAreaData, queryDictName } from '../../../../api/api'
import { addTag, ajaxGetDictItems, editTag, getDictByCode, getShowAreaData, queryDictName } from '../../../../api/api'
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
import { FieldType, TagsAttributeTypeEnums, TagsTypeEnums } from '../../../../enums/commonEnums'
@@ -326,7 +327,8 @@ export default {
contentOption: [],
contentOptionSelect: [],
contentOptionTree: [],
moduleArr: TagsTypeEnums.getItemList()
moduleArr: TagsTypeEnums.getItemList(),
fieldShowTypeOptions: [] // 属性类型下拉数据
}
},
watch: {
@@ -334,7 +336,17 @@ export default {
this.initFlags(val)
}
},
created () {
this.getFieldShowTypeOptions()
},
methods: {
getFieldShowTypeOptions () {
ajaxGetDictItems('field_show_type').then(res => {
if (res.success) {
this.fieldShowTypeOptions = res.result.filter(item => ![FieldType.TREE_MODAL_SELECT_SEARCH_DIFF.value, FieldType.TREE_MODAL_SELECT_SEARCH_CHILD.value].includes(item.value))
}
})
},
filterOption (input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -391,6 +403,10 @@ export default {
if (formData.fieldShowType === FieldType.TEXTAREA.value) {
formData.dbLength = formData.dbLength || 500
}
// 树形弹框设置treeFirstHref为固定的
if (formData.fieldShowType === FieldType.TREE_MODAL_SELECT.value) {
formData.treeFirstHref = '/laws/dictTree/page'
}
let Func = addTag
if (this.isEdit) {
Func = editTag
+1 -1
View File
@@ -26,7 +26,7 @@ export default {
tabArr: [
{ name: '外来标准法规', showText: this.$t('system.tag.foreignStandardRegulations'), value: 1, comp: StandardList },
{ name: '企业标准', showText: this.$t('system.tag.enterpriseStandards'), value: 3, comp: StandardList },
{ name: '条款拆分', showText: this.$t('system.tag.clauseSplitting'), value: 4, comp: ClauseSplittingList }
// { name: '条款拆分', showText: this.$t('system.tag.clauseSplitting'), value: 4, comp: ClauseSplittingList }
]
}
},