【update】标签内容管理-接口联调
This commit is contained in:
+7
-1
@@ -109,6 +109,10 @@ const editAreaData = (params) => postAction('/tag/LawsArea/edit', params)
|
|||||||
const addTag = (params) => postAction('/tag/lawsTag/add', params)
|
const addTag = (params) => postAction('/tag/lawsTag/add', params)
|
||||||
// 标签管理- 编辑
|
// 标签管理- 编辑
|
||||||
const editTag = (params) => postAction('/tag/lawsTag/edit', params)
|
const editTag = (params) => postAction('/tag/lawsTag/edit', params)
|
||||||
|
// 标签内容管理- 新增
|
||||||
|
const addCategoryItem = (params) => postAction('/sys/category/add', params)
|
||||||
|
const editCategoryItem = (params) => postAction('/sys/category/edit', params)
|
||||||
|
|
||||||
// 通过文件的id获取文件的相应信息
|
// 通过文件的id获取文件的相应信息
|
||||||
const getFileInfo = (params) => getAction('/sys/oss/file/queryById', params)
|
const getFileInfo = (params) => getAction('/sys/oss/file/queryById', params)
|
||||||
|
|
||||||
@@ -175,5 +179,7 @@ export {
|
|||||||
getFileInfo,
|
getFileInfo,
|
||||||
|
|
||||||
addTag,
|
addTag,
|
||||||
editTag
|
editTag,
|
||||||
|
addCategoryItem,
|
||||||
|
editCategoryItem
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,13 @@
|
|||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
// 表格内操作列按钮的样式
|
||||||
|
.ant-table-tbody .table-action a{
|
||||||
|
margin: 0 8px;
|
||||||
|
}
|
||||||
|
.ant-table-tbody .table-action a:nth-of-type(1) {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*列表页面弹出modal*/
|
/*列表页面弹出modal*/
|
||||||
.ant-modal-cust-warp {
|
.ant-modal-cust-warp {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ module.exports = {
|
|||||||
documentLibraryListDisplay: '文档库列表展示',
|
documentLibraryListDisplay: '文档库列表展示',
|
||||||
selectWhetherDisplayList: '请选择是否文档库列表展示',
|
selectWhetherDisplayList: '请选择是否文档库列表展示',
|
||||||
search: '是否搜索',
|
search: '是否搜索',
|
||||||
|
isSort: '是否排序',
|
||||||
displayOtherModules: '其它模块展示',
|
displayOtherModules: '其它模块展示',
|
||||||
regulationsListDisplay: '法规清单展示',
|
regulationsListDisplay: '法规清单展示',
|
||||||
selectDisplayListRegulations: '请选择法规清单是否展示',
|
selectDisplayListRegulations: '请选择法规清单是否展示',
|
||||||
|
|||||||
@@ -23,9 +23,13 @@ module.exports = {
|
|||||||
required: '是否必填',
|
required: '是否必填',
|
||||||
optionContent: '选项内容',
|
optionContent: '选项内容',
|
||||||
documentLibraryModuleDisplay: '文档库模块展示',
|
documentLibraryModuleDisplay: '文档库模块展示',
|
||||||
|
|
||||||
documentLibraryListDisplay: '文档库列表展示',
|
documentLibraryListDisplay: '文档库列表展示',
|
||||||
selectWhetherDisplayList: '请选择是否文档库列表展示',
|
selectWhetherDisplayList: '请选择是否文档库列表展示',
|
||||||
|
isShowDetail: '详情页展示',
|
||||||
|
isShowDetailMessage: '请选择是否详情页展示',
|
||||||
search: '是否搜索',
|
search: '是否搜索',
|
||||||
|
isSort: '是否排序',
|
||||||
displayOtherModules: '其它模块展示',
|
displayOtherModules: '其它模块展示',
|
||||||
regulationsListDisplay: '法规清单展示',
|
regulationsListDisplay: '法规清单展示',
|
||||||
selectDisplayListRegulations: '请选择法规清单是否展示',
|
selectDisplayListRegulations: '请选择法规清单是否展示',
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
@change="tableOnChange"
|
@change="tableOnChange"
|
||||||
>
|
>
|
||||||
<span slot="operation" slot-scope="text, record">
|
<tempalte slot="operation" slot-scope="text, record">
|
||||||
<a v-for="(ol, index) in operationList" :key="index" @click="operationClick(ol,record)">
|
<a v-for="(ol, index) in operationList" :key="index" @click="operationClick(ol,record)">
|
||||||
<span v-if="ol.text === $t('cancelCollection')" v-has="ol.has" class="text">
|
<span v-if="ol.text === $t('cancelCollection')" v-has="ol.has" class="text">
|
||||||
{{ !record.collectFlag || record.collectFlag === 0 ? $t('collection') :$t('cancelCollection') }}
|
{{ !record.collectFlag || record.collectFlag === 0 ? $t('collection') :$t('cancelCollection') }}
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
{{ ol.text }}
|
{{ ol.text }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</tempalte>
|
||||||
<span slot="detailClick" slot-scope="text, record">
|
<span slot="detailClick" slot-scope="text, record">
|
||||||
<a class="textName" :title="text" @click="detailClick(record)">
|
<a class="textName" :title="text" @click="detailClick(record)">
|
||||||
{{text}}
|
{{text}}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
<template slot="serialNumber" slot-scope="text, record">
|
<template slot="serialNumber" slot-scope="text, record">
|
||||||
<a class="table-del" @click="onDetail(record)">{{text}}</a>
|
<a class="table-del" @click="onDetail(record)">{{text}}</a>
|
||||||
</template>
|
</template>
|
||||||
<div slot="action" slot-scope="text, record">
|
<div slot="action" slot-scope="text, record">
|
||||||
<!--取消收藏-->
|
<!--取消收藏-->
|
||||||
<a class="table-del" @click="onCancel(record)">{{$t('personalCenter.collection.cancelCollection')}}</a>
|
<a class="table-del" @click="onCancel(record)">{{$t('personalCenter.collection.cancelCollection')}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div slot="action" slot-scope="text, record">
|
<div slot="action" class="table-action" slot-scope="text, record">
|
||||||
<a class="action-edit" @click="handleEdit(record)" v-has="'area:edit'"
|
<a class="action-edit" @click="handleEdit(record)" v-has="'area:edit'"
|
||||||
>{{ $t('edit') }}</a>
|
>{{ $t('edit') }}</a>
|
||||||
<a class="table-del" @click="handleDelete(record.id)" v-has="'area:delete'"
|
<a class="table-del" @click="handleDelete(record.id)" v-has="'area:delete'"
|
||||||
|
|||||||
@@ -99,8 +99,9 @@
|
|||||||
:placeholder="$t('pleaseSelect') + $t('system.tag.required')" />
|
:placeholder="$t('pleaseSelect') + $t('system.tag.required')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--文档库模块展示-->
|
|
||||||
<template>
|
<template>
|
||||||
|
<!--文档库模块展示-->
|
||||||
<p class="tag-info">{{ $t('system.tag.documentLibraryModuleDisplay') }}</p>
|
<p class="tag-info">{{ $t('system.tag.documentLibraryModuleDisplay') }}</p>
|
||||||
<a-divider dashed />
|
<a-divider dashed />
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -109,6 +110,13 @@
|
|||||||
:placeholder="$t('system.tag.selectWhetherDisplayList')" />
|
:placeholder="$t('system.tag.selectWhetherDisplayList')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<!--详情页展示-->
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item :label="$t('system.tag.isShowDetail')" prop="isShowForm">
|
||||||
|
<j-dict-select-tag type="list" v-model="form.isShowForm" dictCode="yn"
|
||||||
|
:placeholder="$t('system.tag.isShowDetailMessage')" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
<!--展示区域-->
|
<!--展示区域-->
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
|
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
|
||||||
@@ -126,6 +134,13 @@
|
|||||||
:placeholder="$t('pleaseSelect') + $t('system.tag.search')" />
|
:placeholder="$t('pleaseSelect') + $t('system.tag.search')" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<!--是否排序-->
|
||||||
|
<a-col :span="24" v-if="isSearch">
|
||||||
|
<a-form-model-item :label="$t('system.tag.isSort')" prop="sortFlag" key="sortFlag">
|
||||||
|
<j-dict-select-tag type="list" v-model="form.sortFlag" dictCode="yn"
|
||||||
|
:placeholder="$t('pleaseSelect') + $t('system.tag.isSort')" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
</template>
|
</template>
|
||||||
<!--其它模块展示-->
|
<!--其它模块展示-->
|
||||||
<template>
|
<template>
|
||||||
@@ -244,6 +259,10 @@ export default {
|
|||||||
isShowList: [
|
isShowList: [
|
||||||
{ required: true, message: this.$t('system.tag.selectWhetherDisplayList'), trigger: 'change' }
|
{ required: true, message: this.$t('system.tag.selectWhetherDisplayList'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
|
// 详情页展示
|
||||||
|
isShowForm: [
|
||||||
|
{ required: true, message: this.$t('system.tag.isShowDetailMessage'), trigger: 'change' }
|
||||||
|
],
|
||||||
// 展示区域
|
// 展示区域
|
||||||
showArea: [
|
showArea: [
|
||||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.showArea'), trigger: 'change' }
|
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.showArea'), trigger: 'change' }
|
||||||
@@ -252,6 +271,10 @@ export default {
|
|||||||
isQuery: [
|
isQuery: [
|
||||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.search'), trigger: 'change' }
|
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.search'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
|
// 是否排序
|
||||||
|
sortFlag: [
|
||||||
|
{ required: true, message: this.$t('pleaseSelect') + this.$t('system.tag.isSort'), trigger: 'change' }
|
||||||
|
],
|
||||||
// 其它模块展示
|
// 其它模块展示
|
||||||
isShowLawsList: [
|
isShowLawsList: [
|
||||||
{ required: true, message: this.$t('system.tag.selectDisplayListRegulations'), trigger: 'change' }
|
{ required: true, message: this.$t('system.tag.selectDisplayListRegulations'), trigger: 'change' }
|
||||||
@@ -276,24 +299,26 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
// 具体值对应关系可以去commonEnums.js中查看 FieldType
|
||||||
'form.fieldShowType' (val) {
|
'form.fieldShowType' (val) {
|
||||||
|
val = val + ''
|
||||||
// this.contentFlag=val
|
// this.contentFlag=val
|
||||||
if (val == 0) {
|
if (val === '0') {
|
||||||
this.contentOption = [...this.contentOption2]
|
this.contentOption = [...this.contentOption2]
|
||||||
this.isTagContent = true
|
this.isTagContent = true
|
||||||
} else if (val == 3 || val == 4) {
|
} else if (val === '3' || val === '4') {
|
||||||
this.contentOption = [...this.contentOption1]
|
this.contentOption = [...this.contentOption1]
|
||||||
this.isTagContent = true
|
this.isTagContent = true
|
||||||
} else {
|
} else {
|
||||||
this.isTagContent = false
|
this.isTagContent = false
|
||||||
}
|
}
|
||||||
if (val == 7) {
|
if (val === '7') {
|
||||||
this.isSearch = false
|
this.isSearch = false
|
||||||
this.form.isQuery = 0
|
this.form.isQuery = 0
|
||||||
} else {
|
} else {
|
||||||
this.isSearch = true
|
this.isSearch = true
|
||||||
}
|
}
|
||||||
if (val == 1 || val == 8 || val == 9 || val == 10 || val == 11 || val == 'sel_user') {
|
if (val === '1' || val === '8' || val === '9' || val === '10' || val === '11' || val === 'sel_user') {
|
||||||
this.isLength = true
|
this.isLength = true
|
||||||
} else {
|
} else {
|
||||||
this.isLength = false
|
this.isLength = false
|
||||||
@@ -306,12 +331,14 @@ export default {
|
|||||||
},
|
},
|
||||||
add () {
|
add () {
|
||||||
this.edit({
|
this.edit({
|
||||||
isModel: this.type
|
isModel: this.type, // 默认所属模块
|
||||||
|
isShowForm: 1 // 默认在详情页展示
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
this.$refs.editForm && this.$refs.editForm.resetFields()
|
this.$refs.editForm && this.$refs.editForm.resetFields()
|
||||||
this.form = Object.assign({}, record)
|
this.form = Object.assign({}, record)
|
||||||
|
this.form.isModel = Number(this.form.isModel)
|
||||||
this.isEdit = !!this.form.id
|
this.isEdit = !!this.form.id
|
||||||
this.initData()
|
this.initData()
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
|||||||
@@ -22,17 +22,17 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!--英文名称-->
|
<!--英文名称-->
|
||||||
<a-form-model-item prop="itemEnglishText" :label="$t('system.tag.attributeNameEnglish')">
|
<a-form-model-item prop="enName" :label="$t('system.tag.attributeNameEnglish')">
|
||||||
<a-input
|
<a-input
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||||
v-model="model.itemEnglishText"
|
v-model="model.enName"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
@change="event => event.target.value = event.target.value.trim()"
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!--父级名称 只有树形结构时显示-->
|
<!--父级名称 只有树形结构时显示-->
|
||||||
<a-form-model-item :label="$t('system.tag.parentName')" prop="pid" v-if="attributeType === TagsAttributeTypeEnums.TREE.value">
|
<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 v-model="model.pid" :placeholder="$t('pleaseSelect')" allowClear>
|
||||||
<a-select-option :value="item.id" v-for="(item, index) in parentDataPid" :key="item.id">
|
<a-select-option :value="item.id" v-for="(item, index) in parentDataPid" :key="item.id">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -63,13 +63,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TagsAttributeTypeEnums } from '../../../../enums/commonEnums'
|
import { TagsAttributeTypeEnums } from '../../../../enums/commonEnums'
|
||||||
|
import { addDictItem, editDictItem, addCategoryItem, editCategoryItem } from '../../../../api/api'
|
||||||
|
import { getAction } from '../../../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TagContentDictItemModal',
|
name: 'TagContentDictItemModal',
|
||||||
props: {
|
props: {
|
||||||
// 标签类型
|
// 标签类型
|
||||||
attributeType: {
|
attributeType: {
|
||||||
default: TagsAttributeTypeEnums.SELECT.value
|
default: TagsAttributeTypeEnums.SELECT.value,
|
||||||
|
type: Number
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -91,14 +94,22 @@ export default {
|
|||||||
},
|
},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
itemText: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.name') }],
|
// 名称
|
||||||
|
itemText: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.name'), trigger: 'blur' }],
|
||||||
// 英文名称
|
// 英文名称
|
||||||
itemEnglishText: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish') }],
|
enName: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'), trigger: 'blur' }],
|
||||||
// 数据值
|
// 数据值
|
||||||
itemValue: [{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.dataValue') }, { validator: this.validateItemValue }]
|
itemValue: [
|
||||||
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.dataValue'), trigger: 'blur' },
|
||||||
|
{ validator: this.validateItemValue, trigger: 'blur' }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// 父级项目下拉框数据的集合
|
// 父级项目下拉框数据的集合
|
||||||
parentDataPid: []
|
parentDataPid: [],
|
||||||
|
treeFunc: {
|
||||||
|
add: 'sys/category/add',
|
||||||
|
edit: 'sys/category/edit',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -116,6 +127,10 @@ export default {
|
|||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.model.dictId = this.dictId
|
this.model.dictId = this.dictId
|
||||||
this.model.status = this.status
|
this.model.status = this.status
|
||||||
|
// 树形结构的时候 获取父级名称的全部接口
|
||||||
|
if (this.attributeType === TagsAttributeTypeEnums.TREE.value) {
|
||||||
|
this.getAllTree()
|
||||||
|
}
|
||||||
this.visible = true
|
this.visible = true
|
||||||
},
|
},
|
||||||
onChose (checked) {
|
onChose (checked) {
|
||||||
@@ -130,34 +145,46 @@ export default {
|
|||||||
// 确定
|
// 确定
|
||||||
handleOk () {
|
handleOk () {
|
||||||
const that = this
|
const that = this
|
||||||
|
console.log(1111)
|
||||||
// 触发表单验证
|
// 触发表单验证
|
||||||
this.$refs.form.validate(valid => {
|
this.$refs.form.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
return
|
|
||||||
that.confirmLoading = true
|
that.confirmLoading = true
|
||||||
this.model.itemText = (this.model.itemText || '').trim()
|
// 启用、禁用的标识
|
||||||
this.model.itemValue = (this.model.itemValue || '').trim()
|
that.model.status = that.status
|
||||||
this.model.description = (this.model.description || '').trim()
|
|
||||||
this.model.status = this.status
|
|
||||||
let obj
|
let obj
|
||||||
if (!this.model.id) {
|
|
||||||
obj = addDictItem(this.model)
|
// 树形结构
|
||||||
|
if (this.attributeType === TagsAttributeTypeEnums.TREE.value) {
|
||||||
|
if (!this.model.id) {
|
||||||
|
obj = addCategoryItem
|
||||||
|
} else {
|
||||||
|
obj = editCategoryItem
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
obj = editDictItem(this.model)
|
// 数据字典
|
||||||
|
if (!this.model.id) {
|
||||||
|
obj = addDictItem
|
||||||
|
} else {
|
||||||
|
obj = editDictItem
|
||||||
|
}
|
||||||
}
|
}
|
||||||
obj.then((res) => {
|
const params = Object.assign({}, this.model, {
|
||||||
|
dictId: this.dictId, // 数据字典的id
|
||||||
|
isTagDict: 1, // 是否为标签管理的表示
|
||||||
|
delFlag: 0 // 是否删除的标识,新的接口必须增加这一个字段,可以联系后端沟通
|
||||||
|
})
|
||||||
|
obj(params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.$emit('ok')
|
that.$emit('ok')
|
||||||
|
that.close()
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message)
|
that.$message.error(res.message)
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
that.confirmLoading = false
|
that.confirmLoading = false
|
||||||
that.close()
|
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -198,12 +225,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAllTree () {
|
getAllTree () {
|
||||||
// getAction(`sys/category/queryPid`, {
|
// TODO 获取所有的树形结构
|
||||||
// sysDictId: this.record.id,
|
getAction(`sys/category/childList`, {
|
||||||
// isTagDict: 1
|
sysDictId: this.dictId,
|
||||||
// }).then(res => {
|
isTagDict: 1
|
||||||
// this.parentDataPid = res.result
|
}).then(res => {
|
||||||
// })
|
this.parentDataPid = res.result
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,9 +61,9 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div slot="action" slot-scope="text, record">
|
<div slot="action" class="table-action" slot-scope="text, record">
|
||||||
<a class="action-edit" @click="editVisible(record.id)">{{ $t('edit') }}</a>
|
<a class="action-edit" @click="handleEdit(record)">{{ $t('edit') }}</a>
|
||||||
<a class="table-del" @click="deleteVisible(record.id)">{{ $t('delete') }}</a>
|
<a class="table-del" @click="handleDelete(record.id)">{{ $t('delete') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -76,6 +76,7 @@ import '@assets/less/common.less'
|
|||||||
import { ResizeColumnProvide, ResizeHeader } from '../../../../mixins/header'
|
import { ResizeColumnProvide, ResizeHeader } from '../../../../mixins/header'
|
||||||
import TagContentDictItemModal from './TagContentDictItemModal'
|
import TagContentDictItemModal from './TagContentDictItemModal'
|
||||||
import { SimpleListMixin } from '../../../../mixins/SimpleListMixin'
|
import { SimpleListMixin } from '../../../../mixins/SimpleListMixin'
|
||||||
|
import { TagsAttributeTypeEnums } from '../../../../enums/commonEnums'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TagContentDictListDrawer',
|
name: 'TagContentDictListDrawer',
|
||||||
@@ -122,7 +123,7 @@ export default {
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
width: 100,
|
width: 100,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: 'sortOrder',
|
dataIndex: 'itemValue',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -141,17 +142,51 @@ export default {
|
|||||||
width: 170
|
width: 170
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
// 树形结构对应的接口
|
||||||
|
treeUrl: {
|
||||||
|
list: 'sys/category/queryPageList',
|
||||||
|
delete: 'sys/category/delete',
|
||||||
|
deleteBatch: 'sys/category/deleteBatch'
|
||||||
|
},
|
||||||
|
dictUrl: {
|
||||||
|
list: 'sys/dictItem/page',
|
||||||
|
delete: '/sys/dictItem/delete',
|
||||||
|
deleteBatch: '/sys/dictItem/deleteBatch'
|
||||||
|
},
|
||||||
// 混入中查询等相关接口
|
// 混入中查询等相关接口
|
||||||
url: {},
|
url: {
|
||||||
|
list: 'sys/dictItem/page',
|
||||||
|
// 数据字典的相关接口
|
||||||
|
delete: '/sys/dictItem/delete',
|
||||||
|
deleteBatch: '/sys/dictItem/deleteBatch'
|
||||||
|
// delete: 'sys/dictItem/logicDelete', // TODO weilai
|
||||||
|
// deleteBatch: 'sys/dictItem/logicDeleteBatch', // TODO weilai
|
||||||
|
// deleteBatch: 'sys/category/logicDeleteBatch', // TODO weilai 树形结构的
|
||||||
|
|
||||||
|
},
|
||||||
|
// // 其他的查询条件
|
||||||
|
filters: {
|
||||||
|
dictId: '' // 列表页数据字典的值
|
||||||
|
},
|
||||||
disableMixinCreated: true,
|
disableMixinCreated: true,
|
||||||
// 标签类型
|
// 标签类型
|
||||||
attributeType: undefined
|
attributeType: undefined
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show (record) {
|
show (record) {
|
||||||
this.record = record
|
this.record = record
|
||||||
this.attributeType = this.record.attributeType // 标签类型,用于辨别是下拉框还是树形结构
|
this.attributeType = Number(this.record.attributeType) // 标签类型,用于辨别是下拉框还是树形结构
|
||||||
|
// 不同的标签类型 调用不同的接口
|
||||||
|
if (this.attributeType === TagsAttributeTypeEnums.SELECT.value) {
|
||||||
|
this.url = { ...this.dictUrl }
|
||||||
|
} else {
|
||||||
|
this.url = { ...this.treeUrl }
|
||||||
|
}
|
||||||
|
this.filters.dictId = record.id
|
||||||
// todo 需要判断当前标签的类型,来决定列表页是否是树形的
|
// todo 需要判断当前标签的类型,来决定列表页是否是树形的
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.initData()
|
this.initData()
|
||||||
@@ -165,6 +200,16 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
this.onClose()
|
this.onClose()
|
||||||
|
},
|
||||||
|
handleAdd () {
|
||||||
|
this.$refs.modalForm.add(this.record.id)
|
||||||
|
this.$refs.modalForm.title = this.$t('newlyAdded')
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
|
handleEdit (record) {
|
||||||
|
this.$refs.modalForm.edit(record)
|
||||||
|
this.$refs.modalForm.title = this.$t('edit')
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
:placeholder="$t('pleaseSelect') + $t('system.tag.labelType')"/>
|
:placeholder="$t('pleaseSelect') + $t('system.tag.labelType')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!--展示顺序-->
|
<!--展示顺序-->
|
||||||
|
{{model.orderNum}}
|
||||||
<a-form-model-item :label="$t('system.tag.displayOrder')" prop="orderNum" class="tag-item">
|
<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%"
|
<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"/>
|
:min="1" :max="99999" :formatter="limitNumber" :parser="limitNumber"/>
|
||||||
@@ -116,6 +117,10 @@ export default {
|
|||||||
Func = editDict
|
Func = editDict
|
||||||
}
|
}
|
||||||
const formData = Object.assign({}, this.model)
|
const formData = Object.assign({}, this.model)
|
||||||
|
// 重要,设置为标签内容
|
||||||
|
formData.isTagDict = 1
|
||||||
|
// 设置为非固定字段,为啥不清楚
|
||||||
|
// formData.isReadOnly = 0
|
||||||
Func(formData).then(res => {
|
Func(formData).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class='tag-table-container'>
|
|
||||||
{{type}}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'TagTable',
|
|
||||||
props:{
|
|
||||||
type: {
|
|
||||||
type: Number,
|
|
||||||
required: false,
|
|
||||||
default: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div slot="action" slot-scope="text, record">
|
<div slot="action" class="table-action" slot-scope="text, record">
|
||||||
<a class="action-edit" @click="handleEdit(record)" v-has="'tag:edit'" v-if="record.isReadOnly===0"
|
<a class="action-edit" @click="handleEdit(record)" v-has="'tag:edit'" v-if="record.isReadOnly===0"
|
||||||
>{{ $t('edit') }}</a>
|
>{{ $t('edit') }}</a>
|
||||||
<a class="table-del" v-if="record.isReadOnly===2 || record.isReadOnly===0" v-has="'tag:logicDelete'" @click="handleDelete(record.id)"
|
<a class="table-del" v-if="record.isReadOnly===2 || record.isReadOnly===0" v-has="'tag:logicDelete'" @click="handleDelete(record.id)"
|
||||||
@@ -83,7 +83,11 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
// 混入中查询等相关接口
|
// 混入中查询等相关接口
|
||||||
url: {},
|
url: {
|
||||||
|
list: 'tag/lawsTag/page',
|
||||||
|
delete: 'tag/lawsTag/logicDelete',
|
||||||
|
deleteBatch: 'tag/lawsTag/logicDeleteBatch'
|
||||||
|
},
|
||||||
filters: {
|
filters: {
|
||||||
isModel: this.type
|
isModel: this.type
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,8 +66,8 @@
|
|||||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
<!--TODO 需要查看下是否有这个字段,并且看一下判断是否必然-->
|
||||||
<div slot="action" slot-scope="text, record">
|
<div slot="action" class="table-action" slot-scope="text, record">
|
||||||
<a class="action-edit" @click="handleEdit(record)" v-if="record.isReadOnly===0" v-has="'tag:edit'"
|
<a class="action-edit" @click="handleEdit(record)" v-if="record.isReadOnly===0" v-has="'tag:edit'"
|
||||||
>{{ $t('edit') }}</a>
|
>{{ $t('edit') }}</a>
|
||||||
<a class="table-del" v-if="record.isReadOnly===2 || record.isReadOnly===0" v-has="'tag:logicDelete'" @click="handleDelete(record.id)"
|
<a class="table-del" v-if="record.isReadOnly===2 || record.isReadOnly===0" v-has="'tag:logicDelete'" @click="handleDelete(record.id)"
|
||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
areasArr: [],
|
areasArr: [],
|
||||||
// 混入中查询等相关接口
|
// 混入中查询等相关接口
|
||||||
url: {
|
url: {
|
||||||
list: 'tag/lawsTag/list',
|
list: 'tag/lawsTag/page',
|
||||||
delete: 'tag/lawsTag/logicDelete',
|
delete: 'tag/lawsTag/logicDelete',
|
||||||
deleteBatch: 'tag/lawsTag/logicDeleteBatch'
|
deleteBatch: 'tag/lawsTag/logicDeleteBatch'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<div slot="action" slot-scope="text, record">
|
<div slot="action" class="table-action" slot-scope="text, record">
|
||||||
<a class="action-dict" @click="editDictItem(record)">{{ $t('system.tag.dictionaryConfiguration') }}</a>
|
<a class="action-dict" @click="editDictItem(record)">{{ $t('system.tag.dictionaryConfiguration') }}</a>
|
||||||
<!--v-if="record.id != '1635543933669818369'" v-has="'dict:edit'"-->
|
<!--v-if="record.id != '1635543933669818369'" v-has="'dict:edit'"-->
|
||||||
<a class="action-edit" @click="handleEdit(record)">{{ $t('edit') }}</a>
|
<a class="action-edit" @click="handleEdit(record)">{{ $t('edit') }}</a>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</a-table>
|
</a-table>
|
||||||
|
|
||||||
<!-- 新增、编辑 -->
|
<!-- 新增、编辑 -->
|
||||||
<tag-content-modal ref="modalForm"></tag-content-modal>
|
<tag-content-modal ref="modalForm" @ok="modalFormOk"></tag-content-modal>
|
||||||
<!--配置字典-字典列表的展示-->
|
<!--配置字典-字典列表的展示-->
|
||||||
<tag-content-dict-list-drawer ref="tagContentDictListDrawer"></tag-content-dict-list-drawer>
|
<tag-content-dict-list-drawer ref="tagContentDictListDrawer"></tag-content-dict-list-drawer>
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ export default {
|
|||||||
title: this.$t('system.tag.labelType'),
|
title: this.$t('system.tag.labelType'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'attributeTypeName',
|
dataIndex: 'attributeType_dictText',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,14 +11,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TagTable from '../modules/TagTable'
|
|
||||||
import StandardList from './StandardList'
|
import StandardList from './StandardList'
|
||||||
import ClauseSplittingList from './ClauseSplittingList'
|
import ClauseSplittingList from './ClauseSplittingList'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TagItem',
|
name: 'TagItem',
|
||||||
components: {
|
components: {
|
||||||
TagTable,
|
|
||||||
StandardList
|
StandardList
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -39,7 +38,7 @@ export default {
|
|||||||
this.spinning = true
|
this.spinning = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.spinning = false
|
this.spinning = false
|
||||||
}, 1000)
|
}, 100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user