【变更】文档拆分

This commit is contained in:
赵霄
2024-01-26 10:07:41 +08:00
parent 2b264b772e
commit 68d04a9954
5 changed files with 58 additions and 9 deletions
@@ -24,7 +24,11 @@
<a-divider dashed />
<!--所属模块-->
<a-form-model-item :label="$t('system.tag.module')" prop="isModel">
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.module')" disabled v-model="form.isModel" show-search :filter-option="filterOption">
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.module')"
disabled
v-model="form.isModel"
show-search
:filter-option="filterOption">
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
{{ translate(item.langKey) }}
</a-select-option>
@@ -49,7 +53,7 @@
></a-input>
</a-form-model-item>
<!-- 字段名称 正式环境 需要注释掉开发环境可以先留着方便使用-->
<a-col :span="24" v-if="canOpeFlag">
<a-col :span="24" v-if="canOpeFlag">
<a-form-model-item :label="$t('system.tag.fieldName')" prop="dbFieldName">
<a-input
v-model.trim="form.dbFieldName"
@@ -103,6 +107,12 @@
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn"
:placeholder="$t('pleaseSelect') + $t('system.tag.required')" />
</a-form-model-item>
<!--使用范围-->
<a-form-model-item :label="$t('system.tag.usableRange')" prop="usableRange">
<j-multi-select-tag v-model="form.usableRange"
:options="usableRangeOptions"
:placeholder="$t('pleaseSelect') + $t('system.tag.usableRange')" />
</a-form-model-item>
<!-- 文档拆分列表展示-->
<template>
<p class="tag-info">{{ $t('system.tag.documentSplitDisplay') }}</p>
@@ -156,8 +166,8 @@
<script>
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
import { FieldType, TagsAttributeTypeEnums, TagsTypeEnums } from '../../../../enums/commonEnums'
import { addTag, editTag, queryDictName } from '../../../../api/api'
import { FieldType, StandardSource, TagsAttributeTypeEnums, TagsTypeEnums } from '../../../../enums/commonEnums'
import { addTag, ajaxGetDictItems, editTag, queryDictName } from '../../../../api/api'
export default {
name: 'ClauseSplittingDrawer',
@@ -235,6 +245,10 @@ export default {
fieldMustInput: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.required'), trigger: 'change' }
],
// 使用范围
usableRange: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.usableRange'), trigger: 'change' }
],
// 文档拆分列表展示
isShowList: [
{ required: true, message: this.$t('system.tag.selectSplitListDisplay'), trigger: 'change' }
@@ -255,7 +269,8 @@ export default {
contentOption: [],
contentOptionSelect: [],
contentOptionTree: [],
moduleArr: TagsTypeEnums.getItemList()
moduleArr: TagsTypeEnums.getItemList(),
usableRangeOptions: []
}
},
watch: {
@@ -286,6 +301,14 @@ export default {
// 初始化一些数据
initData () {
this.loadContent()
this.getUsableRangeOptions()
},
getUsableRangeOptions () {
ajaxGetDictItems('standard_source').then(res => {
if (res.success) {
this.usableRangeOptions = (res.result || []).filter(tt => tt.value !== StandardSource.OVERSEAS.value)
}
})
},
showDrawer () {
this.visible = true
@@ -379,7 +402,7 @@ export default {
this.isSearch = true
}
// 输入框(字符串) 文本框
if (val === FieldType.TEXT_BOX.value|| val === 'sel_user') {
if (val === FieldType.TEXT_BOX.value || val === 'sel_user') {
this.isLength = true
} else {
this.isLength = false