|
@@ -38,7 +38,8 @@ import FormDialog from '@/components/FormDialog/index.vue'
|
|
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
import { handleTree } from '@/utils/common'
|
|
import { handleTree } from '@/utils/common'
|
|
import { listMenuApi, delMenuApi, addMenuApi, updateMenuApi, getMenuApi } from '@/api/modules/system/menu'
|
|
import { listMenuApi, delMenuApi, addMenuApi, updateMenuApi, getMenuApi } from '@/api/modules/system/menu'
|
|
-import { getDictsApi } from '@/api/modules/system/dictData'
|
|
|
|
|
|
+const { proxy } = getCurrentInstance() as ComponentInternalInstance
|
|
|
|
+const { sys_normal_disable, sys_yes_no, sys_show_hide } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_yes_no', 'sys_show_hide'))
|
|
|
|
|
|
// ProTable 实例
|
|
// ProTable 实例
|
|
const proTable = ref<ProTableInstance>()
|
|
const proTable = ref<ProTableInstance>()
|
|
@@ -118,11 +119,10 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
prop: 'status',
|
|
prop: 'status',
|
|
label: '状态',
|
|
label: '状态',
|
|
tag: true,
|
|
tag: true,
|
|
- enum: () => getDictsApi('sys_normal_disable'),
|
|
|
|
|
|
+ enum: sys_normal_disable,
|
|
search: {
|
|
search: {
|
|
el: 'tree-select'
|
|
el: 'tree-select'
|
|
- },
|
|
|
|
- fieldNames: { label: 'dictLabel', value: 'dictValue' }
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: 'perms',
|
|
prop: 'perms',
|
|
@@ -173,9 +173,7 @@ const setItemsOptions = () => {
|
|
compOptions: {
|
|
compOptions: {
|
|
elTagName: 'radio-button',
|
|
elTagName: 'radio-button',
|
|
value: '0',
|
|
value: '0',
|
|
- enum: () => getDictsApi('sys_normal_disable'),
|
|
|
|
- labelKey: 'dictLabel',
|
|
|
|
- valueKey: 'dictValue'
|
|
|
|
|
|
+ enum: sys_normal_disable.value
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -230,10 +228,8 @@ const setItemsOptions = () => {
|
|
tooltip: '选择是外链则路由地址需要以`http(s)://`开头',
|
|
tooltip: '选择是外链则路由地址需要以`http(s)://`开头',
|
|
compOptions: {
|
|
compOptions: {
|
|
elTagName: 'radio-button',
|
|
elTagName: 'radio-button',
|
|
- enum: () => getDictsApi('sys_yes_no'),
|
|
|
|
- enumKey: 'sys_yes_no',
|
|
|
|
- labelKey: 'dictLabel',
|
|
|
|
- valueKey: 'dictValue'
|
|
|
|
|
|
+ enum: sys_yes_no.value,
|
|
|
|
+ enumKey: 'sys_yes_no'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -247,9 +243,7 @@ const setItemsOptions = () => {
|
|
compOptions: {
|
|
compOptions: {
|
|
elTagName: 'radio-button',
|
|
elTagName: 'radio-button',
|
|
value: '0',
|
|
value: '0',
|
|
- enum: () => getDictsApi('sys_show_hide'),
|
|
|
|
- labelKey: 'dictLabel',
|
|
|
|
- valueKey: 'dictValue'
|
|
|
|
|
|
+ enum: sys_show_hide.value
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -327,10 +321,8 @@ const setItemsOptions = () => {
|
|
},
|
|
},
|
|
compOptions: {
|
|
compOptions: {
|
|
elTagName: 'radio-button',
|
|
elTagName: 'radio-button',
|
|
- enum: () => getDictsApi('sys_yes_no'),
|
|
|
|
- enumKey: 'sys_yes_no',
|
|
|
|
- labelKey: 'dictLabel',
|
|
|
|
- valueKey: 'dictValue'
|
|
|
|
|
|
+ enum: sys_show_hide.value,
|
|
|
|
+ enumKey: 'sys_yes_no'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
]
|