|
@@ -5,6 +5,8 @@
|
|
|
ref="table"
|
|
ref="table"
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
:datasource="datasource"
|
|
:datasource="datasource"
|
|
|
|
|
+ :need-page="true"
|
|
|
|
|
+ :toolkit="[]"
|
|
|
:selection.sync="selection"
|
|
:selection.sync="selection"
|
|
|
height="calc(100vh - 265px)"
|
|
height="calc(100vh - 265px)"
|
|
|
full-height="calc(100vh - 116px)"
|
|
full-height="calc(100vh - 116px)"
|
|
@@ -12,7 +14,7 @@
|
|
|
cache-key="systemDictDataTable"
|
|
cache-key="systemDictDataTable"
|
|
|
>
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-slot:toolbar>
|
|
|
|
|
|
|
+ <!-- <template v-slot:toolbar>
|
|
|
<dict-data-search @search="reload">
|
|
<dict-data-search @search="reload">
|
|
|
<el-button
|
|
<el-button
|
|
|
size="small"
|
|
size="small"
|
|
@@ -33,7 +35,7 @@
|
|
|
删除
|
|
删除
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</dict-data-search>
|
|
</dict-data-search>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link
|
|
<el-link
|
|
@@ -58,12 +60,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
<!-- 编辑弹窗 -->
|
|
<!-- 编辑弹窗 -->
|
|
|
- <dict-data-edit
|
|
|
|
|
- :visible.sync="showEdit"
|
|
|
|
|
- :data="current"
|
|
|
|
|
- :dict-id="dictId"
|
|
|
|
|
- @done="reload"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <dict-edit :visible.sync="showEdit" :id="id" @done="reload" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -75,13 +72,11 @@
|
|
|
removeDictionaryData,
|
|
removeDictionaryData,
|
|
|
removeDictionaryDataBatch
|
|
removeDictionaryDataBatch
|
|
|
} from '@/api/system/dictionary-data';
|
|
} from '@/api/system/dictionary-data';
|
|
|
|
|
+ import { listDictionaries, removeDictionary } from '@/api/system/dictionary';
|
|
|
|
|
+ import DictEdit from './dict-edit.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- components: { DictDataSearch, DictDataEdit },
|
|
|
|
|
- props: {
|
|
|
|
|
- // 字典id
|
|
|
|
|
- dictId: Number
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ components: { DictDataSearch, DictDataEdit, DictEdit },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
// 表格列配置
|
|
// 表格列配置
|
|
@@ -100,30 +95,39 @@
|
|
|
showOverflowTooltip: true
|
|
showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'dictDataName',
|
|
|
|
|
- label: '字典项名称',
|
|
|
|
|
- sortable: 'custom',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 120
|
|
|
|
|
|
|
+ prop: 'code',
|
|
|
|
|
+ label: '字典编码',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'dictDataCode',
|
|
|
|
|
- label: '字典项值',
|
|
|
|
|
- sortable: 'custom',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- minWidth: 110
|
|
|
|
|
|
|
+ prop: 'name',
|
|
|
|
|
+ label: '字典名称',
|
|
|
|
|
+
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'appType',
|
|
|
|
|
+ // label: '字典类型',
|
|
|
|
|
+
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // minWidth: 110
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
- prop: 'sortNumber',
|
|
|
|
|
- label: '排序号',
|
|
|
|
|
- sortable: 'custom',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- width: 90
|
|
|
|
|
|
|
+ prop: 'appType',
|
|
|
|
|
+ label: '应用类型',
|
|
|
|
|
+
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'remark',
|
|
|
|
|
+ label: '描述',
|
|
|
|
|
+
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'createTime',
|
|
prop: 'createTime',
|
|
|
label: '创建时间',
|
|
label: '创建时间',
|
|
|
- sortable: 'custom',
|
|
|
|
|
|
|
+
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110,
|
|
minWidth: 110,
|
|
|
formatter: (_row, _column, cellValue) => {
|
|
formatter: (_row, _column, cellValue) => {
|
|
@@ -145,19 +149,15 @@
|
|
|
// 当前编辑数据
|
|
// 当前编辑数据
|
|
|
current: null,
|
|
current: null,
|
|
|
// 是否显示编辑弹窗
|
|
// 是否显示编辑弹窗
|
|
|
- showEdit: false
|
|
|
|
|
|
|
+ showEdit: false,
|
|
|
|
|
+ id: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where, order }) {
|
|
datasource({ page, limit, where, order }) {
|
|
|
- return pageDictionaryData({
|
|
|
|
|
- ...where,
|
|
|
|
|
- ...order,
|
|
|
|
|
- page,
|
|
|
|
|
- limit,
|
|
|
|
|
- dictId: this.dictId
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ return listDictionaries();
|
|
|
},
|
|
},
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
@@ -165,6 +165,7 @@
|
|
|
},
|
|
},
|
|
|
/* 显示编辑 */
|
|
/* 显示编辑 */
|
|
|
openEdit(row) {
|
|
openEdit(row) {
|
|
|
|
|
+ this.id = row.id;
|
|
|
this.current = row;
|
|
this.current = row;
|
|
|
this.showEdit = true;
|
|
this.showEdit = true;
|
|
|
},
|
|
},
|
|
@@ -209,9 +210,9 @@
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
// 监听字典id变化
|
|
// 监听字典id变化
|
|
|
- dictId() {
|
|
|
|
|
- this.reload();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // dictId() {
|
|
|
|
|
+ // this.reload();
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|