mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 02:25:06 +08:00
1. 增加字典数据接口
2. 前端接入全局字典数据
This commit is contained in:
@ -211,6 +211,8 @@ import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import IconSelect from "@/components/IconSelect";
|
||||
|
||||
import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict'
|
||||
|
||||
export default {
|
||||
name: "Menu",
|
||||
components: { Treeselect, IconSelect },
|
||||
@ -255,12 +257,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_show_hide").then(response => {
|
||||
this.visibleOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_normal_disable").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 选择图标
|
||||
@ -295,19 +291,9 @@ export default {
|
||||
this.menuOptions.push(menu);
|
||||
});
|
||||
},
|
||||
// 显示状态字典翻译
|
||||
visibleFormat(row, column) {
|
||||
if (row.menuType == "3") {
|
||||
return "";
|
||||
}
|
||||
return this.selectDictLabel(this.visibleOptions, row.visible);
|
||||
},
|
||||
// 菜单状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
if (row.menuType == "3") {
|
||||
return "";
|
||||
}
|
||||
return this.selectDictLabel(this.statusOptions, row.status);
|
||||
return getDictDataLabel(DICT_TYPE.SYS_COMMON_STATUS, row.status)
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
Reference in New Issue
Block a user