refactor: 适配后端部分字典接口变化

This commit is contained in:
2025-07-27 09:41:02 +08:00
parent 4b0aea536c
commit d7937e7905
9 changed files with 32 additions and 34 deletions

View File

@@ -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 {

View File

@@ -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 {