diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js index 1402fb6a..22e0e245 100644 --- a/src/enums/commonEnums.js +++ b/src/enums/commonEnums.js @@ -18,7 +18,9 @@ export const FieldType = { FILE_UP: { text: '上传文件', value: '8' }, TEXT_BOX: { text: '文本框', value: '9' }, OPTION_SINGLE: { text: '下拉单选', value: '10' }, - OPTION_MORE: { text: '下拉多选', value: '11' } + OPTION_MORE: { text: '下拉多选', value: '11' }, + TREE: { text: '树形结构', value: '12' }, + TEXT_LINK: { text: '输入框(链接)', value: '13' } } export const TagsTypeEnums = new EsEnums({ diff --git a/src/views/system/modules/DictItemModal.vue b/src/views/system/modules/DictItemModal.vue index 001c12fa..5d64c03f 100644 --- a/src/views/system/modules/DictItemModal.vue +++ b/src/views/system/modules/DictItemModal.vue @@ -133,12 +133,18 @@ export default { this.model.description = (this.model.description || '').trim() this.model.status = this.status let obj + // 数据字典 if (!this.model.id) { - obj = addDictItem(this.model) + obj = addDictItem } else { - obj = editDictItem(this.model) + obj = editDictItem } - obj.then((res) => { + const params = Object.assign({}, this.model, { + dictId: this.dictId, // 数据字典的id + isTagDict: 0, // 是否为标签管理的表示 + delFlag: 0 // 是否删除的标识,新的接口必须增加这一个字段,可以联系后端沟通,否则不能查看 + }) + obj(params).then((res) => { if (res.success) { that.$message.success(res.message) that.$emit('ok') diff --git a/src/views/system/tags/modules/AreaFormModal.vue b/src/views/system/tags/modules/AreaFormModal.vue index 2b9b0a06..eb8043b3 100644 --- a/src/views/system/tags/modules/AreaFormModal.vue +++ b/src/views/system/tags/modules/AreaFormModal.vue @@ -104,7 +104,7 @@ export default { { min: 1, max: 50, message: this.$t('charactersLength'), trigger: 'blur' } ], sort: [ - { required: true, message: this.$t('enterSortingNumber'), trigger: 'change' } + { required: false, message: this.$t('enterSortingNumber'), trigger: 'change' } ] }, moduleArr: TagsTypeEnums.getItemList() diff --git a/src/views/system/tags/modules/AreaModal.vue b/src/views/system/tags/modules/AreaModal.vue index b867f4c3..375adc29 100644 --- a/src/views/system/tags/modules/AreaModal.vue +++ b/src/views/system/tags/modules/AreaModal.vue @@ -18,11 +18,16 @@ {{$t('add')}} +
+ + {{ $t('batchDelete') }} +
- - - -
+ - + @@ -58,6 +56,7 @@ import AreaFormModal from './AreaFormModal' import { TagsTypeEnums } from '../../../../enums/commonEnums' import { SimpleListMixin } from '../../../../mixins/SimpleListMixin' import { postAction } from '../../../../api/manage' +import JTable from '../../../../components/jero/JTable' export default { name: 'AreaModal', @@ -71,7 +70,8 @@ export default { } }, components: { - AreaFormModal + AreaFormModal, + JTable }, data () { return { @@ -104,13 +104,13 @@ export default { dataIndex: 'enName', ellipsis: true }, - { - title: this.$t('system.tag.module'), - align: 'left', - width: 100, - dataIndex: 'isModelName', - ellipsis: true - }, + // { + // title: this.$t('system.tag.module'), + // align: 'left', + // width: 100, + // dataIndex: 'isModelName', + // ellipsis: true + // }, { title: this.$t('dict.rankingValue'), align: 'left', @@ -155,6 +155,8 @@ export default { modalFormOk () { this.$emit('refresh') this.loadData() + // 清空列表选中 + this.onClearSelected() }, handleDelete: function (id) { if (!this.url.delete) { @@ -173,6 +175,7 @@ export default { if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) { that.ipagination.current -= 1 } + // 增加列表页的操作 that.$emit('refresh') that.loadData() } else { @@ -182,6 +185,41 @@ export default { } }) }, + batchDel () { + if (!this.url.deleteBatch) { + this.$message.error('请设置url.deleteBatch属性!') + return + } + if (this.selectedRowKeys.length <= 0) { + this.$message.warning('请选择一条记录!') + return + } + + const ids = this.selectedRowKeys.join() + const that = this + this.$confirm({ + title: '确认删除', + content: '是否删除选中数据?', + onOk: function () { + that.loading = true + postAction(that.url.deleteBatch, { ids: ids }).then((res) => { + if (res.success) { + // 重新计算分页问题 + that.reCalculatePage(that.selectedRowKeys.length) + that.$message.success(res.message) + that.loadData() + that.onClearSelected() + // 增加列表页的操作 + that.$emit('refresh') + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.loading = false + }) + } + }) + } } } diff --git a/src/views/system/tags/modules/ClauseSplittingDrawer.vue b/src/views/system/tags/modules/ClauseSplittingDrawer.vue index 46b4d08c..3546a953 100644 --- a/src/views/system/tags/modules/ClauseSplittingDrawer.vue +++ b/src/views/system/tags/modules/ClauseSplittingDrawer.vue @@ -115,8 +115,8 @@