Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from Jzow/master
Browse files Browse the repository at this point in the history
Add a new API to fix known errors
  • Loading branch information
Jzow authored Sep 22, 2023
2 parents ab3c357 + b6f38fb commit 39bed9d
Show file tree
Hide file tree
Showing 32 changed files with 948 additions and 8,671 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
},
"dependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@axolo/tree-array": "^0.1.0",
"@iconify/iconify": "^3.1.1",
"@logicflow/core": "^1.2.9",
"@logicflow/extension": "^1.2.9",
Expand Down
19 changes: 12 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<template>
<ConfigProvider :locale="getAntdLocale">
<ConfigProvider :locale="getAntdLocale" :theme="isDark ? darkTheme : {}">
<AppProvider>
<RouterView />
</AppProvider>
</ConfigProvider>
</template>

<script lang="ts" setup>
import { ConfigProvider } from 'ant-design-vue';
import { AppProvider } from '@/components/Application';
import { useTitle } from '@/hooks/web/useTitle';
import { useLocale } from '@/locales/useLocale';
import 'dayjs/locale/zh-cn';
import { ConfigProvider } from 'ant-design-vue';
import { AppProvider } from '@/components/Application';
import { useTitle } from '@/hooks/web/useTitle';
import { useLocale } from '@/locales/useLocale';
// support Multi-language
const { getAntdLocale } = useLocale();
import 'dayjs/locale/zh-cn';
import { useDarkModeTheme } from '@/hooks/setting/useDarkModeTheme';
// Listening to page changes and dynamically changing site titles
useTitle();
// support Multi-language
const { getAntdLocale } = useLocale();
const { isDark, darkTheme } = useDarkModeTheme();
// Listening to page changes and dynamically changing site titles
useTitle();
</script>
14 changes: 14 additions & 0 deletions src/api/sys/dept.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {
DeptListItem,
GetDeptInfoModel,
} from './model/dpetModel';

import { defHttp } from '/@/utils/http/axios';
import {BaseDataResp} from "@/api/model/baseModel";

enum Api {
DeptList = '/dept/userDeptRel',
}

export const getDeptList = (params?: DeptListItem) =>
defHttp.get<BaseDataResp<GetDeptInfoModel>>({ url: Api.DeptList, params });
7 changes: 4 additions & 3 deletions src/api/sys/menu.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { defHttp } from '/@/utils/http/axios';
import { getMenuListResultModel } from './model/menuModel';
import {BaseDataResp} from "@/api/model/baseModel";
import {MenuListResp} from "@/api/sys/model/menuModel";

enum Api {
GetMenuList = '/getMenuList',
GetMenuList = '/sysRole/menu',
}

/**
* @description: Get user menu based on id
*/

export const getMenuList = () => {
return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList });
return defHttp.get<BaseDataResp<MenuListResp>>({ url: Api.GetMenuList });
};
24 changes: 24 additions & 0 deletions src/api/sys/model/dpetModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import {BasicFetchResult} from "@/api/model/baseModel";

export interface DeptListItem {
organizationName: string;
leader: string;
}

export interface GetDeptInfoModel {
// 机构id
id: string | number;
// 机构编号
deptNumber: string;
// 机构名称
deptName: string;
// 备注
remark: string;
// 父级部门id
parentId: string;
// 排序
sort: number;
}


export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;
39 changes: 37 additions & 2 deletions src/api/sys/model/menuModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { RouteMeta } from 'vue-router';

import { BaseListResp } from '../../model/baseModel';
export interface RouteItem {
path: string;
component: any;
Expand All @@ -11,7 +11,42 @@ export interface RouteItem {
children?: RouteItem[];
}

export interface MenuPageResp {
total: number;
data: RouteItem[];
}

export interface MenuInfo {
id: number;
type?: number;
parentId?: number;
path?: string;
name?: string;
redirect?: string;
component?: string;
sort?: number;
disabled?: boolean;
meta: Meta;
}

interface Meta {
title?: string;
icon?: string;
hideMenu?: boolean;
hideBreadcrumb?: boolean;
ignoreKeepAlive?: boolean;
hideTab?: boolean;
frameSrc?: string;
carryParam?: boolean;
hideChildrenInMenu?: boolean;
affix?: boolean;
dynamicLevel?: number;
realPath?: string;
}

export type MenuListResp = BaseListResp<MenuInfo>;

/**
* @description: Get menu return value
*/
export type getMenuListResultModel = RouteItem[];
export type RoleMenuResp = BaseListResp<RouteItem>;
18 changes: 8 additions & 10 deletions src/api/sys/model/userModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,17 @@ export interface LoginResultModel {
*/
export interface GetUserInfoModel {
// 用户id
userId: string | number;
id: string | number;
// 用户名
username: string;
// 昵称
name: string;
// 头像
avatar: string;
// 介绍
desc?: string;
// 用户首页
homePath: string;
// 用户角色
roles?: string[];
// 邮箱
email: string;
// 电话
phoneNumber: string;
// 状态
status: number;
// 用户角色名称
roleName: string[];
roleName: string;
}
Loading

0 comments on commit 39bed9d

Please sign in to comment.