mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 02:57:09 +08:00
refactor: 适配后端部分字典接口变化
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ref } from 'vue'
|
||||
import type { TreeNodeData } from '@arco-design/web-vue'
|
||||
import { listDeptTree } from '@/apis/system'
|
||||
import { listDeptDictTree } from '@/apis/system'
|
||||
|
||||
/** 部门模块 */
|
||||
export function useDept(options?: { onSuccess?: () => void }) {
|
||||
@@ -10,7 +10,7 @@ export function useDept(options?: { onSuccess?: () => void }) {
|
||||
const getDeptList = async (name?: string) => {
|
||||
try {
|
||||
loading.value = true
|
||||
const res = await listDeptTree({ description: name })
|
||||
const res = await listDeptDictTree({ description: name })
|
||||
deptList.value = res.data
|
||||
options?.onSuccess && options.onSuccess()
|
||||
} finally {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ref } from 'vue'
|
||||
import type { TreeNodeData } from '@arco-design/web-vue'
|
||||
import { listMenuTree } from '@/apis/system'
|
||||
import { listMenuDictTree } from '@/apis/system'
|
||||
import { listTenantPackageMenu } from '@/apis/tenant/package'
|
||||
|
||||
/** 菜单模块 */
|
||||
@@ -11,7 +11,7 @@ export function useMenu(options?: { onSuccess?: () => void }) {
|
||||
const getMenuList = async (name?: string) => {
|
||||
try {
|
||||
loading.value = true
|
||||
const res = await listMenuTree({ description: name })
|
||||
const res = await listMenuDictTree({ description: name })
|
||||
menuList.value = res.data
|
||||
options?.onSuccess && options.onSuccess()
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user