【update】标签管理全部页面的组件
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
|
||||
/*列表上方操作按钮区域*/
|
||||
.ant-card-body .table-operator {
|
||||
/*.ant-card-body .table-operator {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}*/
|
||||
|
||||
/* 列表可拖拽改变列宽 begin */
|
||||
.nio-header-th {
|
||||
@@ -27,7 +27,8 @@
|
||||
/* 列表可拖拽改变列宽 end */
|
||||
|
||||
/*列表上方操作按钮区域*/
|
||||
.ant-card-body .table-operator {
|
||||
.ant-card-body .table-operator,
|
||||
.table-operator {
|
||||
margin-bottom: 29px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,17 @@ module.exports = {
|
||||
selectSearchCenterDisplayed: '请选择搜索中心是否展示',
|
||||
selectWhetherRequired: '请选择是否必填',
|
||||
describe: '描述',
|
||||
dictionaryConfiguration: '字典配置'
|
||||
dictionaryConfiguration: '字典配置',
|
||||
documentSplitDisplay: '文档拆分模块展示',
|
||||
documentSplitList: '文档拆分列表展示',
|
||||
selectSplitListDisplay: '请选择是否文档拆分列表展示',
|
||||
// 标签项内容管理
|
||||
labelItemName: '标签项名称',
|
||||
// 字段列表
|
||||
name: '名称',
|
||||
dataValue: '数据值',
|
||||
parentName: '父级名称',
|
||||
select: '下拉选择',
|
||||
tree: '树形结构'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,16 @@ module.exports = {
|
||||
selectWhetherRequired: '请选择是否必填',
|
||||
describe: '描述',
|
||||
dictionaryConfiguration: '字典配置',
|
||||
|
||||
documentSplitDisplay: '文档拆分模块展示',
|
||||
documentSplitList: '文档拆分列表展示',
|
||||
selectSplitListDisplay: '请选择是否文档拆分列表展示',
|
||||
// 标签项内容管理
|
||||
labelItemName: '标签项名称',
|
||||
// 字段列表
|
||||
name: '名称',
|
||||
dataValue: '数据值',
|
||||
parentName: '父级名称',
|
||||
select: '下拉选择',
|
||||
tree: '树形结构'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,48 +235,48 @@ export default {
|
||||
field_show_type: '1',
|
||||
tree: []
|
||||
},
|
||||
// {
|
||||
// db_field_name: 'state',
|
||||
// db_field_txt: '状态',
|
||||
// dict_field: 'state',
|
||||
// field_show_type: '3',
|
||||
// tree: []
|
||||
// },
|
||||
// {
|
||||
// db_field_name: 'region',
|
||||
// db_field_txt: '适用地区',
|
||||
// dict_field: 'region',
|
||||
// field_show_type: '4',
|
||||
// tree: []
|
||||
// },
|
||||
// {
|
||||
// db_field_name: 'technology_territory',
|
||||
// db_field_txt: '技术领域',
|
||||
// dict_field: 'technology_territory',
|
||||
// field_show_type: '0',
|
||||
// tree: []
|
||||
// },
|
||||
// {
|
||||
// db_field_name: 'issue_time',
|
||||
// db_field_txt: '发布日期',
|
||||
// dict_field: '',
|
||||
// field_show_type: '5',
|
||||
// tree: []
|
||||
// },
|
||||
// {
|
||||
// db_field_name: 'xin1_che1_xing2_shi2_shi1_ri4_qi1',
|
||||
// db_field_txt: '新车型实施日期',
|
||||
// dict_field: '',
|
||||
// field_show_type: '5',
|
||||
// tree: []
|
||||
// },
|
||||
// {
|
||||
// db_field_name: 'implement_time',
|
||||
// db_field_txt: '在产车实施日期',
|
||||
// dict_field: '',
|
||||
// field_show_type: '5',
|
||||
// tree: []
|
||||
// }
|
||||
{
|
||||
db_field_name: 'state',
|
||||
db_field_txt: '状态',
|
||||
dict_field: 'state',
|
||||
field_show_type: '3',
|
||||
tree: []
|
||||
},
|
||||
{
|
||||
db_field_name: 'region',
|
||||
db_field_txt: '适用地区',
|
||||
dict_field: 'region',
|
||||
field_show_type: '4',
|
||||
tree: []
|
||||
},
|
||||
{
|
||||
db_field_name: 'technology_territory',
|
||||
db_field_txt: '技术领域',
|
||||
dict_field: 'technology_territory',
|
||||
field_show_type: '0',
|
||||
tree: []
|
||||
},
|
||||
{
|
||||
db_field_name: 'issue_time',
|
||||
db_field_txt: '发布日期',
|
||||
dict_field: '',
|
||||
field_show_type: '5',
|
||||
tree: []
|
||||
},
|
||||
{
|
||||
db_field_name: 'xin1_che1_xing2_shi2_shi1_ri4_qi1',
|
||||
db_field_txt: '新车型实施日期',
|
||||
dict_field: '',
|
||||
field_show_type: '5',
|
||||
tree: []
|
||||
},
|
||||
{
|
||||
db_field_name: 'implement_time',
|
||||
db_field_txt: '在产车实施日期',
|
||||
dict_field: '',
|
||||
field_show_type: '5',
|
||||
tree: []
|
||||
}
|
||||
]
|
||||
},
|
||||
methods: {
|
||||
@@ -292,26 +292,26 @@ export default {
|
||||
const params = {
|
||||
flag: this.flag
|
||||
}
|
||||
getAction(this.url.getSearchList, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.searchList = res.result
|
||||
// if (this.searchQueryList && this.searchQueryList.length > 0) {
|
||||
// for (let i = 0; i < this.searchList.length; i++) {
|
||||
// // 是要去掉这个字段的搜索??
|
||||
// if (this.searchList[i].db_field_name === 'issue_time') {
|
||||
// this.searchList.splice(i, 1)
|
||||
// i--
|
||||
// }
|
||||
// // db_field_name 说明可以被代替位置??
|
||||
// if (this.searchList[i].db_field_name === 'title') {
|
||||
// const data = this.searchList[i + 1]
|
||||
// this.searchList[i + 1] = this.searchQueryList[0]
|
||||
// this.searchList.push(data)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
})
|
||||
// getAction(this.url.getSearchList, params).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.searchList = res.result
|
||||
// // if (this.searchQueryList && this.searchQueryList.length > 0) {
|
||||
// // for (let i = 0; i < this.searchList.length; i++) {
|
||||
// // // 是要去掉这个字段的搜索??
|
||||
// // if (this.searchList[i].db_field_name === 'issue_time') {
|
||||
// // this.searchList.splice(i, 1)
|
||||
// // i--
|
||||
// // }
|
||||
// // // db_field_name 说明可以被代替位置??
|
||||
// // if (this.searchList[i].db_field_name === 'title') {
|
||||
// // const data = this.searchList[i + 1]
|
||||
// // this.searchList[i + 1] = this.searchQueryList[0]
|
||||
// // this.searchList.push(data)
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onChange (item) {
|
||||
if (this.queryParam[item] && this.queryParam[item].length > 0) {
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import EsEnums from './EsEnum'
|
||||
import DomesticList from '../views/system/tags/pages/DomesticList'
|
||||
import ForeignList from '../views/system/tags/pages/ForeignList'
|
||||
import EnterpriseList from '../views/system/tags/pages/EnterpriseList'
|
||||
import ClauseSplittingList from '../views/system/tags/pages/ClauseSplittingList'
|
||||
|
||||
export const YesOrNoEnum = new EsEnums({
|
||||
NO: { name: '否', index: 0 },
|
||||
@@ -32,3 +28,9 @@ export const TagsTypeEnums = new EsEnums({
|
||||
ENTERPRISE_LIST: { text: '企业标准', langKey: 'system.tag.enterpriseStandards', value: 3 },
|
||||
CLAUSE_SPLITTING_LIST: { text: '条款拆分', langKey: 'system.tag.clauseSplitting', value: 4 }
|
||||
})
|
||||
|
||||
// 标签类型
|
||||
export const TagsAttributeTypeEnums = {
|
||||
SELECT: { text: '下拉选择', langKey: 'system.tag.select', value: 1 },
|
||||
TREE: { text: '树形结构', langKey: 'system.tag.tree', value: 2 }
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('dict.rankingValue')">
|
||||
<a-input-number :min="1" v-model="model.sortOrder" />
|
||||
{{ $t('valueSmallerIsHigher') }}
|
||||
{{ $t('dict.valueSmallerIsHigher') }}
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
<!--展示区域新增数据-->
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
:ok-text="$t('preservation')"
|
||||
:cancel-text="$t('cancel')"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<!--所属模块-->
|
||||
<a-form-model-item :label="$t('system.tag.module')" prop="isModel">
|
||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.module')" v-model="model.isModel">
|
||||
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
|
||||
{{ translate(item.langKey) }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<!--展示区域-->
|
||||
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
|
||||
<a-input
|
||||
v-model="model.showArea"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.showArea')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
<!-- 英文名称-->
|
||||
|
||||
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="enName">
|
||||
<a-input
|
||||
v-model="model.enName"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
<!--序号-->
|
||||
<a-form-model-item :label="$t('dict.rankingValue')" prop="sortOrder">
|
||||
<a-input-number :min="1" v-model="model.sortOrder" />
|
||||
{{ $t('dict.valueSmallerIsHigher')}}
|
||||
</a-form-model-item>
|
||||
<!--<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum">-->
|
||||
<!-- <a-input-number v-model="model.orderNum"-->
|
||||
<!-- :placeholder="$t('pleaseEnter') + $t('system.tag.displayOrder')" style="width: 100%"-->
|
||||
<!-- :min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />-->
|
||||
<!--</a-form-model-item>-->
|
||||
|
||||
</a-form-model>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TagsTypeEnums } from '../../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'AreaFormModal',
|
||||
props: {
|
||||
type: {
|
||||
required: false,
|
||||
type: Number,
|
||||
// 默认显示国内法规的
|
||||
default: TagsTypeEnums.DOMESTIC_LIST.value
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title: '新增',
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 20 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 所属模块
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.module'), trigger: 'change' }
|
||||
],
|
||||
// 英文名称
|
||||
enName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
||||
trigger: 'change'
|
||||
},
|
||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
// 展示区域
|
||||
showArea: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.showArea'), trigger: 'blur' },
|
||||
{ min: 1, max: 50, message: this.$t('charactersLength'), trigger: 'blur' }
|
||||
],
|
||||
sortOrder: [
|
||||
{ required: true, message: this.$t('enterSortingNumber'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
moduleArr: TagsTypeEnums.getItemList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
// 初始化默认值
|
||||
this.edit({
|
||||
isModel: this.type
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
if (record.id) {
|
||||
|
||||
}
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
translate (key) {
|
||||
return this.$t(key)
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
// this.confirmLoading = true
|
||||
// const formData = Object.assign({}, this.model)
|
||||
// let Func
|
||||
// if (record.id) {
|
||||
// Func = ''
|
||||
// }
|
||||
// Func(formData).then(res => {
|
||||
// if (res.success) {
|
||||
// this.$message.success(res.message)
|
||||
// this.$emit('ok')
|
||||
// this.close()
|
||||
// } else {
|
||||
// this.$message.error(res.message)
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.confirmLoading = false
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.$refs.form && this.$refs.form.resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,146 @@
|
||||
<!-- 展示区域新增编辑模态框-->
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
:ok-text="$t('preservation')"
|
||||
:cancel-text="$t('cancel')"
|
||||
:footer="null"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleAdd">
|
||||
<a-icon type="plus" />
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
:bordered="true"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:scroll="{x: '100%'}"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<template slot="text" slot-scope="text">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<div slot="action" slot-scope="text, record">
|
||||
<a class="action-edit" @click="handleEdit(record.id)"
|
||||
>{{ $t('edit') }}</a>
|
||||
<a class="table-del" @click="handleDelete(record.id)"
|
||||
>{{ $t('delete') }}</a>
|
||||
</div>
|
||||
</a-table>
|
||||
</a-spin>
|
||||
<!--新增表单-->
|
||||
<area-form-modal v-bind="$props" ref="modalForm"></area-form-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { TagListMixin } from '../pages/TagListMixin'
|
||||
import AreaFormModal from './AreaFormModal'
|
||||
import { TagsTypeEnums } from '../../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'AreaModal',
|
||||
mixins: [TagListMixin],
|
||||
props: {
|
||||
type: {
|
||||
required: false,
|
||||
type: Number,
|
||||
// 默认显示国内法规的
|
||||
default: TagsTypeEnums.DOMESTIC_LIST.value
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AreaFormModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('system.tag.exhibitionAreaManagement'),
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('system.tag.showArea'),
|
||||
dataIndex: 'showArea',
|
||||
key: 'showArea',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('system.tag.attributeNameEnglish'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
dataIndex: 'enName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('system.tag.module'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
dataIndex: 'isModelName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('dict.rankingValue'),
|
||||
align: 'left',
|
||||
width: 40,
|
||||
dataIndex: 'sort'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'left',
|
||||
width: 60
|
||||
}
|
||||
],
|
||||
disableMixinCreated: true // 默认不加载数据
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show () {
|
||||
this.visible = true
|
||||
this.loadData()
|
||||
},
|
||||
handleOk () {},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.$refs.form && this.$refs.form.resetFields()
|
||||
},
|
||||
showModal () {
|
||||
this.title = this.$t('add')
|
||||
this.newVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,344 @@
|
||||
<!--条款拆分的抽屉-->
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="onClose"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
style="height: 100%;overflow: auto;"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
|
||||
<div class="drawer-container">
|
||||
<a-form-model
|
||||
:model="form"
|
||||
:rules="validatorRules"
|
||||
ref="editForm"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<!--基本信息-->
|
||||
<p class="tag-info">{{ $t('system.tag.essentialInformation') }}</p>
|
||||
<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">
|
||||
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
|
||||
{{ translate(item.langKey) }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
|
||||
<!-- 属性名称-->
|
||||
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
||||
<a-input
|
||||
v-model="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="120"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
<!-- 英文名称-->
|
||||
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
|
||||
<a-input
|
||||
v-model="form.dbFieldEnName"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="120"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
<!-- 属性类型-->
|
||||
<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"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')"
|
||||
:disabled="disabledEdit" />
|
||||
</a-form-model-item>
|
||||
|
||||
<!--选项内容-->
|
||||
<a-form-model-item v-if="isTagContent" :label="$t('system.tag.optionContent')" prop="dictId" key="dictId">
|
||||
<template>
|
||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.optionContent')" v-model="form.dictId">
|
||||
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
|
||||
{{ item.dictName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
</a-form-model-item>
|
||||
|
||||
<!--字段长度 key 值必须加,解决验证错位的问题-->
|
||||
<a-form-model-item v-if="isLength" :label="$t('system.tag.fieldLength')" prop="dbLength" key="dbLength">
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="200"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldLength')"
|
||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
|
||||
<!--展示顺序-->
|
||||
<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum">
|
||||
<a-input-number v-model="form.orderNum"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.displayOrder')" style="width: 100%"
|
||||
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
|
||||
<!--是否必填-->
|
||||
<a-form-model-item :label="$t('system.tag.required')" prop="fieldMustInput">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.required')" />
|
||||
</a-form-model-item>
|
||||
<!-- 文档拆分列表展示-->
|
||||
<template>
|
||||
<p class="tag-info">{{ $t('system.tag.documentSplitDisplay') }}</p>
|
||||
<a-divider dashed />
|
||||
|
||||
<a-form-model-item :label="$t('system.tag.documentSplitList')" prop="isShowList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('system.tag.selectSplitListDisplay')" />
|
||||
</a-form-model-item>
|
||||
|
||||
<!--是否搜索-->
|
||||
<a-form-model-item v-if="isSearch" :label="$t('system.tag.search')" prop="isQuery" key="isQuery">
|
||||
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.search')" />
|
||||
</a-form-model-item>
|
||||
</template>
|
||||
</a-form-model>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;">
|
||||
{{ $t('preservation') }}
|
||||
</a-button>
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">{{ $t('close') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
|
||||
import { TagsTypeEnums } from '../../../../enums/commonEnums'
|
||||
import { queryDictName } from '../../../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'ClauseSplittingDrawer',
|
||||
components: {
|
||||
JDictSelectTag
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
required: false,
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
title: '',
|
||||
width: 800,
|
||||
// 存储表单的数据
|
||||
form: {},
|
||||
isEdit: false,
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 所属模块
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.module'), trigger: 'change' }
|
||||
],
|
||||
// 属性名称
|
||||
dbFieldTxt: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
|
||||
dbFieldName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
// 英文名称
|
||||
dbFieldEnName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
||||
trigger: 'change'
|
||||
},
|
||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
// 属性类型
|
||||
fieldShowType: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.attributeType'), trigger: 'change' }
|
||||
],
|
||||
// 选项内容
|
||||
dictId: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.optionContent'), trigger: 'change' }
|
||||
],
|
||||
// 字段长度
|
||||
dbLength: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.fieldLength'), trigger: 'blur' }
|
||||
],
|
||||
// 展示顺序
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.displayOrder'), trigger: 'blur' }
|
||||
],
|
||||
// 是否必填
|
||||
fieldMustInput: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.required'), trigger: 'change' }
|
||||
],
|
||||
// 文档拆分列表展示
|
||||
isShowList: [
|
||||
{ required: true, message: this.$t('system.tag.selectSplitListDisplay'), trigger: 'change' }
|
||||
],
|
||||
// 是否搜索
|
||||
isQuery: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.search'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
|
||||
isTagContent: false,
|
||||
isSearch: true,
|
||||
isLength: true,
|
||||
disabledEdit: false,
|
||||
// 展示区域选项内容
|
||||
areaOptions: [],
|
||||
// 选项内容选项
|
||||
contentOption: [],
|
||||
contentOption1: [],
|
||||
contentOption2: [],
|
||||
moduleArr: TagsTypeEnums.getItemList()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.fieldShowType' (val) {
|
||||
// this.contentFlag=val
|
||||
if (val == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (val == 3 || val == 4) {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
if (val == 7) {
|
||||
this.isSearch = false
|
||||
this.form.isQuery = 0
|
||||
} else {
|
||||
this.isSearch = true
|
||||
}
|
||||
if (val == 1 || val == 8 || val == 9 || val == 10 || val == 11 || val == 'sel_user') {
|
||||
this.isLength = true
|
||||
} else {
|
||||
this.isLength = false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
translate (key) {
|
||||
return this.$t(key)
|
||||
},
|
||||
add () {
|
||||
this.edit({
|
||||
isModel: this.type
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.$refs.editForm && this.$refs.editForm.resetFields()
|
||||
this.form = Object.assign({}, record)
|
||||
this.isEdit = !!this.form.id
|
||||
this.initData()
|
||||
this.visible = true
|
||||
},
|
||||
// 初始化一些数据
|
||||
initData () {
|
||||
this.loadContent()
|
||||
},
|
||||
showDrawer () {
|
||||
this.visible = true
|
||||
},
|
||||
onClose () {
|
||||
this.visible = false
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.editForm.validate((valid) => {
|
||||
console.log('---err-----', valid)
|
||||
if (valid) {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.drawerVisible = false
|
||||
this.onClose()
|
||||
},
|
||||
// 正则替换小数点
|
||||
limitNumber (value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
test (rule, value, callback) {
|
||||
var money = /[,]|[,]/g
|
||||
if (money.test(value)) {
|
||||
callback(new Error(this.$t('disableInput') + ','))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
// 获取选项内容
|
||||
loadContent () {
|
||||
const params = {}
|
||||
queryDictName(params).then((res) => {
|
||||
if (res.success) {
|
||||
const data = [...res.result]
|
||||
this.contentOption1 = []
|
||||
this.contentOption2 = []
|
||||
data.map(res => {
|
||||
if (res.attributeType == '1') {
|
||||
this.contentOption1.push(res)
|
||||
} else if (res.attributeType == '2') {
|
||||
this.contentOption2.push(res)
|
||||
}
|
||||
})
|
||||
if (this.form.fieldShowType == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (this.form.fieldShowType == 3 || this.form.fieldShowType == '4') {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.drawer-container {
|
||||
.drawer-footer {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,397 +0,0 @@
|
||||
<!--国内法规新增字段-->
|
||||
<template>
|
||||
<div class='domestic-drawer-div'>
|
||||
<a-drawer
|
||||
:title='title'
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="onClose"
|
||||
:visible="visible"
|
||||
:maskClosable='false'
|
||||
style="height: 100%;overflow: auto;"
|
||||
>
|
||||
<div class="new-tag-drawer">
|
||||
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
|
||||
<a-form-model
|
||||
:model="form"
|
||||
:rules="validatorRules"
|
||||
ref="editForm"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-row>
|
||||
{{moduleArr}}
|
||||
<!--基本信息-->
|
||||
<p class="tag-info">{{$t('system.tag.essentialInformation')}}</p>
|
||||
<a-divider dashed/>
|
||||
<!--所属模块-->
|
||||
<a-col :span="24" >
|
||||
<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">
|
||||
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value" >
|
||||
{{translate(item.langKey)}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
||||
<a-input v-model="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||
:maxLength="120"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 英文名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
|
||||
<a-input v-model="form.dbFieldEnName" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||
:maxLength="120"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性类型-->
|
||||
<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"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')" :disabled="disabledEdit"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!--选项内容-->
|
||||
<a-col :span="24" v-if="isTagContent">
|
||||
<a-form-model-item :label="$t('system.tag.optionContent')" prop="dictId" key="dictId">
|
||||
<template>
|
||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.optionContent')" v-model="form.dictId">
|
||||
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
|
||||
{{item.dictName}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--字段长度 key 值必须加,解决验证错位的问题-->
|
||||
<a-col :span="24" v-if="isLength">
|
||||
<a-form-model-item :label="$t('system.tag.fieldLength')" prop="dbLength" key="dbLength">
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="200" :placeholder="$t('pleaseEnter') + $t('system.tag.fieldLength')"
|
||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--展示顺序-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum">
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('pleaseEnter') + $t('system.tag.displayOrder')" style="width: 100%"
|
||||
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--是否必填-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.required')" prop="fieldMustInput">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.required')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--文档库模块展示-->
|
||||
<template>
|
||||
<p class="tag-info">{{$t('system.tag.documentLibraryModuleDisplay')}}</p>
|
||||
<a-divider dashed/>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.documentLibraryListDisplay')" prop="isShowList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('system.tag.selectWhetherDisplayList')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--展示区域-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
|
||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.showArea')" v-model="form.showArea">
|
||||
<a-select-option v-for="(item) in areaOptions" :key="item.id" :value="item.id">
|
||||
{{item.showArea}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--是否搜索-->
|
||||
<a-col :span="24" v-if="isSearch">
|
||||
<a-form-model-item :label="$t('system.tag.search')" prop="isQuery" key="isQuery">
|
||||
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.search')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<!--其它模块展示-->
|
||||
<template>
|
||||
<p class="tag-info">{{$t('system.tag.displayOtherModules')}}</p>
|
||||
<a-divider dashed/>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.regulationsListDisplay')" prop="isShowLawsList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn"
|
||||
:placeholder="$t('system.tag.selectDisplayListRegulations')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--搜索中心展示-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.searchCenterDisplay')" prop="isShowSearch">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn"
|
||||
:placeholder="$t('system.tag.selectSearchCenterDisplayed')"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</template>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;">
|
||||
{{$t('preservation')}}
|
||||
</a-button>
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">{{$t('close')}}</a-button>
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { getShowAreaData, queryDictName } from '../../../../api/api'
|
||||
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
|
||||
import { TagsTypeEnums } from '../../../../enums/commonEnums'
|
||||
|
||||
console.log("---TagsTypeEnums.getItemList()------", TagsTypeEnums.getItemList())
|
||||
export default {
|
||||
name: 'DomesticDrawer',
|
||||
components: {
|
||||
JDictSelectTag
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
title: '',
|
||||
width: 800,
|
||||
// 存储表单的数据
|
||||
form: {},
|
||||
// form: this.$form.createForm(this),
|
||||
isEdit: false,
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 所属模块
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.module'), trigger: 'change' }
|
||||
],
|
||||
// 属性名称
|
||||
dbFieldTxt: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
|
||||
dbFieldName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
// 英文名称
|
||||
dbFieldEnName: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'), trigger: 'change' },
|
||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
// 属性类型
|
||||
fieldShowType: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.attributeType'), trigger: 'change' }
|
||||
],
|
||||
// 选项内容
|
||||
dictId: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.optionContent'), trigger: 'change' }
|
||||
],
|
||||
// 字段长度
|
||||
dbLength: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.fieldLength'), trigger: 'blur' }
|
||||
],
|
||||
// 展示顺序
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.displayOrder'), trigger: 'blur' }
|
||||
],
|
||||
// 是否必填
|
||||
fieldMustInput: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.required'), trigger: 'change' }
|
||||
],
|
||||
// 文档库模块展示
|
||||
isShowList: [
|
||||
{ required: true, message: this.$t('system.tag.selectWhetherDisplayList'), trigger: 'change' }
|
||||
],
|
||||
// 展示区域
|
||||
showArea: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.showArea'), trigger: 'change' }
|
||||
],
|
||||
// 是否搜索
|
||||
isQuery: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.search'), trigger: 'change' }
|
||||
],
|
||||
// 其它模块展示
|
||||
isShowLawsList: [
|
||||
{ required: true, message: this.$t('system.tag.selectDisplayListRegulations'), trigger: 'change' }
|
||||
],
|
||||
// 搜索中心展示
|
||||
isShowSearch: [
|
||||
{ required: true, message: this.$t('system.tag.selectSearchCenterDisplayed'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
|
||||
isTagContent: false,
|
||||
isSearch: true,
|
||||
isLength: true,
|
||||
disabledEdit: false,
|
||||
// 展示区域选项内容
|
||||
areaOptions: [],
|
||||
// 选项内容选项
|
||||
contentOption: [],
|
||||
contentOption1: [],
|
||||
contentOption2: [],
|
||||
moduleArr: TagsTypeEnums.getItemList()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.fieldShowType' (val) {
|
||||
// this.contentFlag=val
|
||||
if (val == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (val == 3 || val == 4) {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
if (val == 7) {
|
||||
this.isSearch = false
|
||||
this.form.isQuery = 0
|
||||
} else {
|
||||
this.isSearch = true
|
||||
}
|
||||
if (val == 1 || val == 8 || val == 9 || val == 10 || val == 11 || val == 'sel_user') {
|
||||
this.isLength = true
|
||||
} else {
|
||||
this.isLength = false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
translate(key) {
|
||||
return this.$t(key)
|
||||
},
|
||||
add () {
|
||||
this.edit({
|
||||
isModel: 1
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.$refs.editForm && this.$refs.editForm.resetFields()
|
||||
this.form = Object.assign({}, record)
|
||||
this.isEdit = !!this.form.id
|
||||
this.initData()
|
||||
this.visible = true
|
||||
},
|
||||
// 初始化一些数据
|
||||
initData () {
|
||||
this.getShowAreaData()
|
||||
this.loadContent()
|
||||
},
|
||||
showDrawer () {
|
||||
this.visible = true
|
||||
},
|
||||
onClose () {
|
||||
this.visible = false
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.editForm.validate((valid) => {
|
||||
console.log("---err-----", valid)
|
||||
if (valid) {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.drawerVisible = false
|
||||
this.onClose()
|
||||
},
|
||||
// 正则替换小数点
|
||||
limitNumber (value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
test (rule, value, callback) {
|
||||
var money = /[,]|[,]/g
|
||||
if (money.test(value)) {
|
||||
callback(new Error(this.$t('disableInput') + ','))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
// 获取展示区域下拉框数据
|
||||
getShowAreaData () {
|
||||
getShowAreaData().then(res => {
|
||||
if (res.success) {
|
||||
this.areaOptions = res.result || []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取选项内容
|
||||
loadContent () {
|
||||
const params = {}
|
||||
queryDictName(params).then((res) => {
|
||||
if (res.success) {
|
||||
const data = [...res.result]
|
||||
this.contentOption1 = []
|
||||
this.contentOption2 = []
|
||||
data.map(res => {
|
||||
if (res.attributeType == '1') {
|
||||
this.contentOption1.push(res)
|
||||
} else if (res.attributeType == '2') {
|
||||
this.contentOption2.push(res)
|
||||
}
|
||||
})
|
||||
if (this.form.fieldShowType == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (this.form.fieldShowType == 3 || this.form.fieldShowType == '4') {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang='less'>
|
||||
.new-tag-drawer {
|
||||
.drawer-footer {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<j-modal
|
||||
title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
:ok-text="$t('preservation')"
|
||||
:cancel-text="$t('cancel')"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
</a-form-model>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ModalDemo',
|
||||
data () {
|
||||
return {
|
||||
title: '新增',
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 20 }
|
||||
},
|
||||
validatorRules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
// 初始化默认值
|
||||
this.edit({})
|
||||
},
|
||||
edit (record) {
|
||||
if (record.id) {
|
||||
this.dictId = record.dictId
|
||||
}
|
||||
this.status = record.status
|
||||
this.visibleCheck = (record.status === 1)
|
||||
this.model = Object.assign({}, record)
|
||||
this.model.dictId = this.dictId
|
||||
this.model.status = this.status
|
||||
this.visible = true
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
// this.confirmLoading = true
|
||||
// const formData = Object.assign(this.model, values)
|
||||
// changePromoter(formData).then(res => {
|
||||
// if (res.success) {
|
||||
// this.$message.success(res.message)
|
||||
// this.$emit('ok')
|
||||
// this.close()
|
||||
// } else {
|
||||
// this.$message.error(res.message)
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.confirmLoading = false
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.$refs.form && this.$refs.form.resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,414 @@
|
||||
<!--国内法规新增字段-->
|
||||
<template>
|
||||
<div class="domestic-drawer-div">
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="onClose"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
style="height: 100%;overflow: auto;"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
|
||||
<div class="drawer-container">
|
||||
<a-form-model
|
||||
:model="form"
|
||||
:rules="validatorRules"
|
||||
ref="editForm"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-row>
|
||||
<!--基本信息-->
|
||||
<p class="tag-info">{{ $t('system.tag.essentialInformation') }}</p>
|
||||
<a-divider dashed />
|
||||
<!--所属模块-->
|
||||
<a-col :span="24">
|
||||
<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">
|
||||
<a-select-option v-for="item in moduleArr" :key="item.value" :value="item.value">
|
||||
{{ translate(item.langKey) }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
||||
<a-input
|
||||
v-model="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="120"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 英文名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
|
||||
<a-input
|
||||
v-model="form.dbFieldEnName"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="120"
|
||||
></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性类型-->
|
||||
<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"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.attributeType')"
|
||||
:disabled="disabledEdit" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<!--选项内容-->
|
||||
<a-col :span="24" v-if="isTagContent">
|
||||
<a-form-model-item :label="$t('system.tag.optionContent')" prop="dictId" key="dictId">
|
||||
<template>
|
||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.optionContent')" v-model="form.dictId">
|
||||
<a-select-option v-for="item in contentOption" :key="item.id" :value="item.id">
|
||||
{{ item.dictName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--字段长度 key 值必须加,解决验证错位的问题-->
|
||||
<a-col :span="24" v-if="isLength">
|
||||
<a-form-model-item :label="$t('system.tag.fieldLength')" prop="dbLength" key="dbLength">
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="200"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldLength')"
|
||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--展示顺序-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum">
|
||||
<a-input-number v-model="form.orderNum"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.displayOrder')" style="width: 100%"
|
||||
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--是否必填-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.required')" prop="fieldMustInput">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.required')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--文档库模块展示-->
|
||||
<template>
|
||||
<p class="tag-info">{{ $t('system.tag.documentLibraryModuleDisplay') }}</p>
|
||||
<a-divider dashed />
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.documentLibraryListDisplay')" prop="isShowList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('system.tag.selectWhetherDisplayList')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--展示区域-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
|
||||
<a-select :placeholder="$t('pleaseSelect') + $t('system.tag.showArea')" v-model="form.showArea">
|
||||
<a-select-option v-for="(item) in areaOptions" :key="item.id" :value="item.id">
|
||||
{{ item.showArea }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--是否搜索-->
|
||||
<a-col :span="24" v-if="isSearch">
|
||||
<a-form-model-item :label="$t('system.tag.search')" prop="isQuery" key="isQuery">
|
||||
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.search')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<!--其它模块展示-->
|
||||
<template>
|
||||
<p class="tag-info">{{ $t('system.tag.displayOtherModules') }}</p>
|
||||
<a-divider dashed />
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.regulationsListDisplay')" prop="isShowLawsList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn"
|
||||
:placeholder="$t('system.tag.selectDisplayListRegulations')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!--搜索中心展示-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('system.tag.searchCenterDisplay')" prop="isShowSearch">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn"
|
||||
:placeholder="$t('system.tag.selectSearchCenterDisplayed')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</template>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<div class="drawer-footer">
|
||||
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;">
|
||||
{{ $t('preservation') }}
|
||||
</a-button>
|
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">{{ $t('close') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { getShowAreaData, queryDictName } from '../../../../api/api'
|
||||
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
|
||||
import { TagsTypeEnums } from '../../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'StandardDrawer',
|
||||
components: {
|
||||
JDictSelectTag
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
required: false,
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
title: '',
|
||||
width: 800,
|
||||
// 存储表单的数据
|
||||
form: {},
|
||||
isEdit: false,
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 所属模块
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.module'), trigger: 'change' }
|
||||
],
|
||||
// 属性名称
|
||||
dbFieldTxt: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
|
||||
dbFieldName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'), trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
// 英文名称
|
||||
dbFieldEnName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
||||
trigger: 'change'
|
||||
},
|
||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
],
|
||||
// 属性类型
|
||||
fieldShowType: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.attributeType'), trigger: 'change' }
|
||||
],
|
||||
// 选项内容
|
||||
dictId: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.optionContent'), trigger: 'change' }
|
||||
],
|
||||
// 字段长度
|
||||
dbLength: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.fieldLength'), trigger: 'blur' }
|
||||
],
|
||||
// 展示顺序
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.displayOrder'), trigger: 'blur' }
|
||||
],
|
||||
// 是否必填
|
||||
fieldMustInput: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.required'), trigger: 'change' }
|
||||
],
|
||||
// 文档库模块展示
|
||||
isShowList: [
|
||||
{ required: true, message: this.$t('system.tag.selectWhetherDisplayList'), trigger: 'change' }
|
||||
],
|
||||
// 展示区域
|
||||
showArea: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.showArea'), trigger: 'change' }
|
||||
],
|
||||
// 是否搜索
|
||||
isQuery: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.search'), trigger: 'change' }
|
||||
],
|
||||
// 其它模块展示
|
||||
isShowLawsList: [
|
||||
{ required: true, message: this.$t('system.tag.selectDisplayListRegulations'), trigger: 'change' }
|
||||
],
|
||||
// 搜索中心展示
|
||||
isShowSearch: [
|
||||
{ required: true, message: this.$t('system.tag.selectSearchCenterDisplayed'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
|
||||
isTagContent: false,
|
||||
isSearch: true,
|
||||
isLength: true,
|
||||
disabledEdit: false,
|
||||
// 展示区域选项内容
|
||||
areaOptions: [],
|
||||
// 选项内容选项
|
||||
contentOption: [],
|
||||
contentOption1: [],
|
||||
contentOption2: [],
|
||||
moduleArr: TagsTypeEnums.getItemList()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.fieldShowType' (val) {
|
||||
// this.contentFlag=val
|
||||
if (val == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (val == 3 || val == 4) {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
if (val == 7) {
|
||||
this.isSearch = false
|
||||
this.form.isQuery = 0
|
||||
} else {
|
||||
this.isSearch = true
|
||||
}
|
||||
if (val == 1 || val == 8 || val == 9 || val == 10 || val == 11 || val == 'sel_user') {
|
||||
this.isLength = true
|
||||
} else {
|
||||
this.isLength = false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
translate (key) {
|
||||
return this.$t(key)
|
||||
},
|
||||
add () {
|
||||
this.edit({
|
||||
isModel: this.type
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
this.$refs.editForm && this.$refs.editForm.resetFields()
|
||||
this.form = Object.assign({}, record)
|
||||
this.isEdit = !!this.form.id
|
||||
this.initData()
|
||||
this.visible = true
|
||||
},
|
||||
// 初始化一些数据
|
||||
initData () {
|
||||
this.getShowAreaData()
|
||||
this.loadContent()
|
||||
},
|
||||
showDrawer () {
|
||||
this.visible = true
|
||||
},
|
||||
onClose () {
|
||||
this.visible = false
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.editForm.validate((valid) => {
|
||||
console.log('---err-----', valid)
|
||||
if (valid) {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.drawerVisible = false
|
||||
this.onClose()
|
||||
},
|
||||
// 正则替换小数点
|
||||
limitNumber (value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
test (rule, value, callback) {
|
||||
var money = /[,]|[,]/g
|
||||
if (money.test(value)) {
|
||||
callback(new Error(this.$t('disableInput') + ','))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
// 获取展示区域下拉框数据
|
||||
getShowAreaData () {
|
||||
getShowAreaData({ type: this.type }).then(res => {
|
||||
if (res.success) {
|
||||
this.areaOptions = res.result || []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取选项内容
|
||||
loadContent () {
|
||||
const params = {}
|
||||
queryDictName(params).then((res) => {
|
||||
if (res.success) {
|
||||
const data = [...res.result]
|
||||
this.contentOption1 = []
|
||||
this.contentOption2 = []
|
||||
data.map(res => {
|
||||
if (res.attributeType == '1') {
|
||||
this.contentOption1.push(res)
|
||||
} else if (res.attributeType == '2') {
|
||||
this.contentOption2.push(res)
|
||||
}
|
||||
})
|
||||
if (this.form.fieldShowType == 0) {
|
||||
this.contentOption = [...this.contentOption2]
|
||||
this.isTagContent = true
|
||||
} else if (this.form.fieldShowType == 3 || this.form.fieldShowType == '4') {
|
||||
this.contentOption = [...this.contentOption1]
|
||||
this.isTagContent = true
|
||||
} else {
|
||||
this.isTagContent = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.drawer-container {
|
||||
.drawer-footer {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,214 @@
|
||||
<!--标签管理--新增配置-->
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="800"
|
||||
:visible="visible"
|
||||
switchFullscreen
|
||||
:maskClosable="false"
|
||||
:confirmLoading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-form-model-item prop="itemText" :label="$t('system.tag.name')">
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.name')"
|
||||
v-model="model.itemText"
|
||||
:maxLength="50"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<!--英文名称-->
|
||||
<a-form-model-item prop="itemEnglishText" :label="$t('system.tag.attributeNameEnglish')">
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||
v-model="model.itemEnglishText"
|
||||
:maxLength="50"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<!--父级名称 只有树形结构时显示-->
|
||||
<a-form-model-item :label="$t('system.tag.parentName')" prop="pid" v-if="attributeType === TagsAttributeTypeEnums.TREE.value">
|
||||
<a-select v-model="form.pid" :placeholder="$t('pleaseSelect')" allowClear>
|
||||
<a-select-option :value="item.id" v-for="(item, index) in parentDataPid" :key="item.id">
|
||||
{{item.name}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<!--数据值-->
|
||||
<a-form-model-item prop="itemValue" :label="$t('system.tag.dataValue')">
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.dataValue')"
|
||||
v-model="model.itemValue"
|
||||
:maxLength="50"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item :label="$t('description')">
|
||||
<a-input :maxLength="50" v-model="model.description" :placeholder="$t('pleaseEnter') + $t('description')" @change="event => event.target.value = event.target.value.trim()"/>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item :label="$t('dict.rankingValue')">
|
||||
<a-input-number :min="1" :max="99999" v-model="model.sortOrder" />
|
||||
{{ $t('dict.valueSmallerIsHigher') }}
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TagsAttributeTypeEnums } from '../../../../enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'TagContentDictItemModal',
|
||||
props: {
|
||||
// 标签类型
|
||||
attributeType: {
|
||||
default: TagsAttributeTypeEnums.SELECT.value
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
TagsAttributeTypeEnums,
|
||||
title: this.$t('operation'),
|
||||
visible: false,
|
||||
visibleCheck: true,
|
||||
model: {},
|
||||
dictId: '',
|
||||
status: 1,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
itemText: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.name') }],
|
||||
// 英文名称
|
||||
itemEnglishText: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish') }],
|
||||
// 数据值
|
||||
itemValue: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.dataValue') }, { validator: this.validateItemValue }]
|
||||
},
|
||||
// 父级项目下拉框数据的集合
|
||||
parentDataPid: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add (dictId) {
|
||||
this.dictId = dictId
|
||||
// 初始化默认值
|
||||
this.edit({ sortOrder: 1, status: 1 })
|
||||
},
|
||||
edit (record) {
|
||||
if (record.id) {
|
||||
this.dictId = record.dictId
|
||||
}
|
||||
this.status = record.status
|
||||
this.visibleCheck = (record.status === 1)
|
||||
this.model = Object.assign({}, record)
|
||||
this.model.dictId = this.dictId
|
||||
this.model.status = this.status
|
||||
this.visible = true
|
||||
},
|
||||
onChose (checked) {
|
||||
if (checked) {
|
||||
this.status = 1
|
||||
this.visibleCheck = true
|
||||
} else {
|
||||
this.status = 0
|
||||
this.visibleCheck = false
|
||||
}
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
return
|
||||
that.confirmLoading = true
|
||||
this.model.itemText = (this.model.itemText || '').trim()
|
||||
this.model.itemValue = (this.model.itemValue || '').trim()
|
||||
this.model.description = (this.model.description || '').trim()
|
||||
this.model.status = this.status
|
||||
let obj
|
||||
if (!this.model.id) {
|
||||
obj = addDictItem(this.model)
|
||||
} else {
|
||||
obj = editDictItem(this.model)
|
||||
}
|
||||
obj.then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false
|
||||
that.close()
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.$refs.form.resetFields()
|
||||
},
|
||||
validateItemValue (rule, value, callback) {
|
||||
const param = {
|
||||
itemValue: value,
|
||||
dictId: this.dictId
|
||||
}
|
||||
if (this.model.id) {
|
||||
param.id = this.model.id
|
||||
}
|
||||
if (value) {
|
||||
const reg = new RegExp("[`_~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]")
|
||||
if (reg.test(value)) {
|
||||
callback(new Error(this.$t('dict.valueCannotContainSpecChar')))
|
||||
} else {
|
||||
// update--begin--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
|
||||
getAction('/sys/dictItem/dictItemCheck', param).then((res) => {
|
||||
if (res.success) {
|
||||
callback()
|
||||
} else {
|
||||
callback(res.message)
|
||||
}
|
||||
})
|
||||
// update--end--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
|
||||
}
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
getAllTree () {
|
||||
// getAction(`sys/category/queryPid`, {
|
||||
// sysDictId: this.record.id,
|
||||
// isTagDict: 1
|
||||
// }).then(res => {
|
||||
// this.parentDataPid = res.result
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,187 @@
|
||||
<!--标签内容管理的数据字典查询-->
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="onClose"
|
||||
:visible="visible"
|
||||
:maskClosable="false"
|
||||
style="height: 100%;overflow: auto;"
|
||||
>
|
||||
<div>
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="12">
|
||||
<a-form-item :label="$t('system.tag.name')" :labelCol="{span: 5}"
|
||||
:wrapperCol="{span: 18, offset: 1}">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('system.tag.name')"
|
||||
v-model="queryParam.dbFieldTxt"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-button class="box-button" @click="searchReset">{{ $t('reset') }}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleAdd">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('newlyAdded') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="batchDel">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
:bordered="true"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:components="drag(columns,'columns')"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:scroll="{x: '100%'}"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<template slot="text" slot-scope="text">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<div slot="action" slot-scope="text, record">
|
||||
<a class="action-edit" @click="editVisible(record.id)">{{ $t('edit') }}</a>
|
||||
<a class="table-del" @click="deleteVisible(record.id)">{{ $t('delete') }}</a>
|
||||
</div>
|
||||
</a-table>
|
||||
</div>
|
||||
<tag-content-dict-item-modal ref="modalForm" :attribute-type="attributeType" @ok="modalFormOk"></tag-content-dict-item-modal>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { TagListMixin } from '../pages/TagListMixin'
|
||||
import { ResizeColumnProvide, ResizeHeader } from '../../../../mixins/header'
|
||||
import TagContentDictItemModal from './TagContentDictItemModal'
|
||||
|
||||
export default {
|
||||
name: 'TagContentDictListDrawer',
|
||||
mixins: [TagListMixin, ResizeHeader, ResizeColumnProvide],
|
||||
components: {
|
||||
// JDictSelectTag
|
||||
TagContentDictItemModal
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
title: this.$t('system.tag.dictionaryConfiguration'),
|
||||
width: 800,
|
||||
confirmLoading: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('system.tag.name'),
|
||||
dataIndex: 'itemText',
|
||||
key: 'itemText',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
// 英文名称
|
||||
title: this.$t('system.tag.attributeNameEnglish'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: 'enName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
// {
|
||||
// title: this.$t('statisticalNodes'),
|
||||
// align: 'left',
|
||||
// dataIndex: 'statNode',
|
||||
// ellipsis: true,
|
||||
// width: 100
|
||||
// },
|
||||
{
|
||||
// 数据值
|
||||
title: this.$t('system.tag.dataValue'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: 'sortOrder',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('system.tag.describe'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: 'description',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'left',
|
||||
width: 170
|
||||
}
|
||||
],
|
||||
// 混入中查询等相关接口
|
||||
url: {},
|
||||
disableMixinCreated: true,
|
||||
// 标签类型
|
||||
attributeType: undefined
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
this.record = record
|
||||
this.attributeType = this.record.attributeType // 标签类型,用于辨别是下拉框还是树形结构
|
||||
// todo 需要判断当前标签的类型,来决定列表页是否是树形的
|
||||
this.visible = true
|
||||
this.initData()
|
||||
},
|
||||
// 初始化一些数据
|
||||
initData () {
|
||||
this.loadData(1)
|
||||
},
|
||||
onClose () {
|
||||
this.visible = false
|
||||
},
|
||||
handleCancel () {
|
||||
this.onClose()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.drawer-container {
|
||||
.drawer-footer {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.ant-btn {
|
||||
margin-left: 30px;
|
||||
margin-bottom: 30px;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -12,24 +12,32 @@
|
||||
@cancel="handleCancel">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-form-model-item :label="$t('LabeItemName')" prop="dictName" class="tag-item">
|
||||
<!--标签项名称-->
|
||||
<a-form-model-item :label="$t('system.tag.labelItemName')" prop="dictName" class="tag-item">
|
||||
<a-input
|
||||
v-model="form.dictName"
|
||||
:placeholder="$t('PleaseEnterLabelName')"
|
||||
:maxLength="50"
|
||||
v-model="model.dictName"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.labelItemName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('LabelType')" prop="attributeType" v-if="isEdit==1" class="tag-item">
|
||||
<j-dict-select-tag type="list" v-model="form.attributeType" dictCode="attribute_type"
|
||||
:placeholder="$t('PleaseSelectLabelType')"/>
|
||||
<!--标签类型-->
|
||||
<a-form-model-item :label="$t('system.tag.labelType')" prop="attributeType" class="tag-item">
|
||||
<j-dict-select-tag type="list" v-model="model.attributeType" dictCode="attribute_type"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.labelType')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('DisplayOrder')" prop="orderNum" class="tag-item">
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%"
|
||||
<!--展示顺序-->
|
||||
<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum" class="tag-item">
|
||||
<a-input-number v-model="model.orderNum" :placeholder="$t('pleaseEnter') + $t('system.tag.displayOrder')" style="width: 100%"
|
||||
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="describe" :label="$t('describe')" prop="description" class="tag-item">
|
||||
<!--描述-->
|
||||
<a-form-model-item ref="describe" :label="$t('system.tag.describe')" prop="description" class="tag-item">
|
||||
<a-input
|
||||
v-model="form.description"
|
||||
:placeholder="$t('PleaseEnterDescription')"
|
||||
v-model="model.description"
|
||||
:maxLength="500"
|
||||
:placeholder="$t('pleaseEnter') + $t('system.tag.describe')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
|
||||
@@ -40,8 +48,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
|
||||
|
||||
export default {
|
||||
name: 'TagContentModal',
|
||||
components: {
|
||||
JDictSelectTag
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title: '新增',
|
||||
@@ -58,19 +71,20 @@ export default {
|
||||
sm: { span: 20 }
|
||||
},
|
||||
validatorRules: {
|
||||
// 标签项名称
|
||||
dictName: [
|
||||
{ required: true, message: this.$t('PleaseEnterLabelName'), trigger: 'change' },
|
||||
{ min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' },
|
||||
{ validator: this.test }
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.labelItemName'), trigger: 'blur' }
|
||||
],
|
||||
// 标签类型
|
||||
attributeType: [
|
||||
{ required: true, message: this.$t('PleaseSelectLabelType'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.labelType'), trigger: 'blur' }
|
||||
],
|
||||
// 展示顺序
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.displayOrder'), trigger: 'blur' }
|
||||
],
|
||||
description: [
|
||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' }
|
||||
{ required: false, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -119,6 +133,16 @@ export default {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.$refs.form && this.$refs.form.resetFields()
|
||||
},
|
||||
// 正则替换小数点
|
||||
limitNumber (value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,132 @@
|
||||
<!--条款拆分-->
|
||||
<template>
|
||||
<div>
|
||||
条款拆分
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('system.tag.attributeName')" :labelCol="{span: 5}"
|
||||
:wrapperCol="{span: 18, offset: 1}">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||
v-model="queryParam.dbFieldTxt"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-button class="box-button" @click="searchReset">{{ $t('reset') }}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleAdd">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('newlyAdded') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="batchDel">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
:bordered="true"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:components="drag(columns,'columns')"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:scroll="{x: '100%'}"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
<template slot="text" slot-scope="text">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<div slot="action" slot-scope="text, record">
|
||||
<a class="action-edit" @click="editVisible(record.id)" v-if="record.isReadOnly===0"
|
||||
>{{ $t('edit') }}</a>
|
||||
<a class="table-del" v-if="record.isReadOnly===2 || record.isReadOnly===0" @click="deleteVisible(record.id)"
|
||||
>{{ $t('delete') }}</a>
|
||||
</div>
|
||||
</a-table>
|
||||
<clause-splitting-drawer ref="modalForm" v-bind="$props"></clause-splitting-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TagListMixin } from './TagListMixin'
|
||||
import { ResizeColumnProvide, ResizeHeader } from '../../../../mixins/header'
|
||||
import ClauseSplittingDrawer from '../modules/ClauseSplittingDrawer'
|
||||
|
||||
export default {
|
||||
name: 'ClauseSplittingList'
|
||||
name: 'ClauseSplittingList',
|
||||
mixins: [TagListMixin, ResizeHeader, ResizeColumnProvide],
|
||||
components: {
|
||||
ClauseSplittingDrawer
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
required: false,
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
// 混入中查询等相关接口
|
||||
url: {},
|
||||
filters: {
|
||||
isModel: this.type
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('system.tag.attributeName'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
dataIndex: 'dbFieldTxt'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.tag.attributeNameEnglish'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
dataIndex: 'dbFieldEnName'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.tag.attributeType'),
|
||||
align: 'left',
|
||||
width: 100,
|
||||
dataIndex: 'fieldShowTypeName'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.tag.fieldLength'),
|
||||
align: 'left',
|
||||
width: 80,
|
||||
dataIndex: 'dbLength'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.tag.displayOrder'),
|
||||
align: 'left',
|
||||
width: 80,
|
||||
dataIndex: 'orderNum'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'left',
|
||||
width: 170
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
Enterprise 企业标准
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'EnterpriseList'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,14 +0,0 @@
|
||||
<template>
|
||||
<div>海外标准
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ForeignList'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
+24
-10
@@ -73,8 +73,10 @@
|
||||
</div>
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<domestic-drawer ref="modalForm"></domestic-drawer>
|
||||
<!--新增字段-->
|
||||
<standard-drawer ref="modalForm" v-bind="$props"></standard-drawer>
|
||||
<!--区域管理模态框-->
|
||||
<area-modal ref="areaModal" v-bind="$props"></area-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -84,22 +86,30 @@ import { TagListMixin } from './TagListMixin'
|
||||
import { ResizeColumnProvide, ResizeHeader } from '../../../../mixins/header'
|
||||
|
||||
import '@assets/less/common.less'
|
||||
import DomesticDrawer from '../modules/DomesticDrawer'
|
||||
import StandardDrawer from '../modules/StandardDrawer'
|
||||
import AreaModal from '../modules/AreaModal'
|
||||
|
||||
export default {
|
||||
name: 'DomesticList',
|
||||
name: 'StandardList',
|
||||
mixins: [TagListMixin, ResizeHeader, ResizeColumnProvide],
|
||||
components: {
|
||||
DomesticDrawer
|
||||
StandardDrawer,
|
||||
AreaModal
|
||||
},
|
||||
data() {
|
||||
props: {
|
||||
type: {
|
||||
required: false,
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
// 展示区域-下拉框的数据
|
||||
areasArr: [],
|
||||
// 混入中查询等相关接口
|
||||
url: {},
|
||||
filters: {
|
||||
isModel: 1
|
||||
isModel: this.type
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
@@ -150,15 +160,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 获取展示区域下拉框数据
|
||||
getShowAreaData() {
|
||||
getShowAreaData().then(res => {
|
||||
getShowAreaData () {
|
||||
getShowAreaData({ type: this.type }).then(res => {
|
||||
if (res.success) {
|
||||
this.areasArr = res.result || []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 展示区域管理
|
||||
handleShow () {
|
||||
this.$refs.areaModal.show()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.getShowAreaData()
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,12 @@
|
||||
v-model="queryParam.dictName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('system.tag.labelType')" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||
<j-dict-select-tag type="list" v-model="queryParam.attributeType" dictCode="attribute_type"
|
||||
:placeholder="$t('pleaseSelect') + $t('system.tag.labelType')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" @click="searchReset">{{ $t('reset') }}</a-button>
|
||||
@@ -22,12 +28,12 @@
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<!--v-has="'dict:add'"-->
|
||||
<div class="operator-text" @click="handleAdd" >
|
||||
<div class="operator-text" @click="handleAdd">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('newlyAdded') }}
|
||||
</div>
|
||||
<!--v-has="'dict:logicDeleteBatch'"-->
|
||||
<div class="operator-text" @click="batchDel" >
|
||||
<div class="operator-text" @click="batchDel">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
@@ -45,8 +51,6 @@
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
@@ -65,7 +69,9 @@
|
||||
|
||||
<!-- 新增、编辑 -->
|
||||
<tag-content-modal ref="modalForm"></tag-content-modal>
|
||||
<!-- 配置属性-->
|
||||
<!--配置字典-字典列表的展示-->
|
||||
<tag-content-dict-list-drawer ref="tagContentDictListDrawer"></tag-content-dict-list-drawer>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -74,14 +80,18 @@ import '@assets/less/common.less'
|
||||
import { TagListMixin } from './TagListMixin'
|
||||
import { ResizeColumnProvide, ResizeHeader } from '../../../../mixins/header'
|
||||
import TagContentModal from '../modules/TagContentModal'
|
||||
import TagContentDictListDrawer from '../modules/TagContentDictListDrawer'
|
||||
import JDictSelectTag from '../../../../components/dict/JDictSelectTag'
|
||||
|
||||
export default {
|
||||
name: 'TagContent',
|
||||
mixins: [TagListMixin, ResizeHeader, ResizeColumnProvide],
|
||||
components: {
|
||||
TagContentModal
|
||||
TagContentModal,
|
||||
TagContentDictListDrawer,
|
||||
JDictSelectTag
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
{
|
||||
@@ -123,7 +133,7 @@ export default {
|
||||
width: 170
|
||||
}
|
||||
],
|
||||
// dataSource: [],
|
||||
dataSource: [{}],
|
||||
url: {
|
||||
list: ''
|
||||
}
|
||||
@@ -131,8 +141,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 编辑字典数据
|
||||
editDictItem(record) {
|
||||
this.$refs.dictItemList.edit(record)
|
||||
editDictItem (record) {
|
||||
this.$refs.tagContentDictListDrawer.show(record)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<a-spin :spinning="spinning">
|
||||
<a-tabs :default-active-key="1" @change="callbackTab">
|
||||
<a-tab-pane v-for='item in tabArr' :key="item.value" :tab="item.showText">
|
||||
<component :is='item.comp' :type='item.value'></component>
|
||||
<component :is='item.comp' :type='item.value' :property="item.props"></component>
|
||||
<!--<tag-table v-if="!spinning" :type='item.value'></tag-table>-->
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
@@ -13,27 +13,22 @@
|
||||
|
||||
<script>
|
||||
import TagTable from '../modules/TagTable'
|
||||
import DomesticList from './DomesticList'
|
||||
import ForeignList from './ForeignList'
|
||||
import EnterpriseList from './EnterpriseList'
|
||||
import StandardList from './StandardList'
|
||||
import ClauseSplittingList from './ClauseSplittingList'
|
||||
|
||||
export default {
|
||||
name: 'TagItem',
|
||||
components: {
|
||||
TagTable,
|
||||
DomesticList,
|
||||
ForeignList,
|
||||
EnterpriseList,
|
||||
ClauseSplittingList
|
||||
StandardList
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
spinning: false,
|
||||
tabArr: [
|
||||
{ name: '国内法规', showText: this.$t('system.tag.domesticLaws'), value: 1, comp: DomesticList, props: {} },
|
||||
{ name: '海外标准', showText: this.$t('system.tag.foreignStandards'), value: 2, comp: ForeignList },
|
||||
{ name: '企业标准', showText: this.$t('system.tag.enterpriseStandards'), value: 3, comp: EnterpriseList },
|
||||
{ name: '国内法规', showText: this.$t('system.tag.domesticLaws'), value: 1, comp: StandardList },
|
||||
{ name: '海外标准', showText: this.$t('system.tag.foreignStandards'), value: 2, comp: StandardList },
|
||||
{ name: '企业标准', showText: this.$t('system.tag.enterpriseStandards'), value: 3, comp: StandardList },
|
||||
{ name: '条款拆分', showText: this.$t('system.tag.clauseSplitting'), value: 4, comp: ClauseSplittingList }
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user