更新代码
This commit is contained in:
@@ -18,5 +18,5 @@ VITE_PWA=false
|
|||||||
VITE_API_URL=/api
|
VITE_API_URL=/api
|
||||||
|
|
||||||
# 开发环境跨域代理,支持配置多个
|
# 开发环境跨域代理,支持配置多个
|
||||||
VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]//awen
|
||||||
#VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]
|
#VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]//zwen
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import { HomeFilled, Operation } from "@element-plus/icons-vue"
|
import type { Function } from "./interface"
|
||||||
import type { Resource } from "./interface"
|
|
||||||
|
|
||||||
const resourcedata = ref<Resource.ResResourceList[]>([
|
export const functionList : Function.ResFunction[] = [
|
||||||
{
|
{
|
||||||
'id': '1',
|
'id': '1',
|
||||||
'pid':'0',
|
'pid':'0',
|
||||||
@@ -262,6 +261,5 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
|||||||
state:0,
|
state:0,
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
])
|
]
|
||||||
|
|
||||||
export default resourcedata
|
|
||||||
26
frontend/src/api/function/index.ts
Normal file
26
frontend/src/api/function/index.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import http from "@/api";
|
||||||
|
import { ADMIN as rePrefix } from "@/api/config/serviceName";
|
||||||
|
import type { Function } from "@/api/function/interface";
|
||||||
|
|
||||||
|
//获取菜单列表
|
||||||
|
export const getFunctionList = (params: Function.ReqFunctionParams) => {
|
||||||
|
return http.post(`${rePrefix}/function/list`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//添加菜单列表
|
||||||
|
export const addFunction = (params: Function.ReqFunctionParams) => {
|
||||||
|
return http.post(`${rePrefix}/function/add`,params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//删除菜单列表
|
||||||
|
export const deleteFunction = (params: { id: string[] }) => {
|
||||||
|
return http.post(`${rePrefix}/function/delete`, { data: params });
|
||||||
|
};
|
||||||
|
|
||||||
|
//编辑菜单列表
|
||||||
|
export const updateFunction = (params: Function.ReqFunctionParams) => {
|
||||||
|
return http.post(`${rePrefix}/function/update`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
44
frontend/src/api/function/interface/index.ts
Normal file
44
frontend/src/api/function/interface/index.ts
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import type { ReqPage, ResPage } from '@/api/interface'
|
||||||
|
|
||||||
|
// 菜单管理模块
|
||||||
|
export namespace Function {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单管理表格分页查询参数
|
||||||
|
*/
|
||||||
|
export interface ReqFunctionParams extends ReqPage{
|
||||||
|
name?: string; // 名称
|
||||||
|
code?: string; // 编码
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单管理新增、修改、根据id查询返回的对象
|
||||||
|
*/
|
||||||
|
export interface ResFunction {
|
||||||
|
id: string;//资源表Id
|
||||||
|
pid:string;//节点(0为根节点)
|
||||||
|
pids?:string | null;//节点上层所有节点
|
||||||
|
name: string;//名称
|
||||||
|
code:string;//资源标识
|
||||||
|
path:string;//路径
|
||||||
|
icon?:string | null;//图标
|
||||||
|
sort:number;//排序
|
||||||
|
type:number | null;//资源类型0-菜单、1-按钮、2-公共资源、3-服务间调用资源
|
||||||
|
remark?: string | null;//权限资源描述
|
||||||
|
state:number;//权限资源状态
|
||||||
|
create_By?:string | null;//创建人
|
||||||
|
create_Time?:string | null;//创建时间
|
||||||
|
update_By?:string | null;//更新人
|
||||||
|
update_Time?:string | null;//更新时间
|
||||||
|
children?: ResFunction[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单管理表格查询分页返回的对象;
|
||||||
|
*/
|
||||||
|
export interface ResFunctionPage extends ResPage<ResFunction> {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import type { DefineComponent } from "vue";
|
|
||||||
import type { DatetimeFormatProps } from "vue-i18n";
|
|
||||||
|
|
||||||
// 菜单管理模块
|
|
||||||
export namespace Resource {
|
|
||||||
// 菜单列表
|
|
||||||
export interface ResResourceList {
|
|
||||||
id: string;//资源表Id
|
|
||||||
pid:string;//节点(0为根节点)
|
|
||||||
pids?:string;//节点上层所有节点
|
|
||||||
name: string;//名称
|
|
||||||
code:string;//资源标识
|
|
||||||
path:string;//路径
|
|
||||||
icon?:string;//图标
|
|
||||||
sort:number;//排序
|
|
||||||
type?:number;//资源类型0-菜单、1-按钮、2-公共资源、3-服务间调用资源
|
|
||||||
remark?: string;//权限资源描述
|
|
||||||
state:number;//权限资源状态
|
|
||||||
create_By?:string;//创建人
|
|
||||||
create_Time?:string;//创建时间
|
|
||||||
update_By?:string;//更新人
|
|
||||||
update_Time?:string;//更新时间
|
|
||||||
children?: ResResourceList[];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,28 +1,24 @@
|
|||||||
import { Login } from './interface'
|
import { Login } from './interface'
|
||||||
import { ADMIN as rePrefix } from '@/api/config/serviceName'
|
import { ADMIN as rePrefix } from '@/api/config/serviceName'
|
||||||
import http from '@/api'
|
import http from '@/api'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name 登录模块
|
* @name 登录模块
|
||||||
*/
|
*/
|
||||||
// 用户登录
|
// 用户登录
|
||||||
export const loginApi = (params: Login.ReqLoginForm) => {
|
export const loginApi = (params: Login.ReqLoginForm) => {
|
||||||
return http.post<Login.ResLogin>(`${rePrefix}/login`, params, { loading: false })
|
// return http.post<Login.ResLogin>(`${rePrefix}/login`, params, { loading: false })
|
||||||
// return http.post<Login.ResLogin>(`/Register1`, params, { loading: false })
|
return http.post<Login.ResLogin>(`/Register1`, params, { loading: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取菜单列表
|
// 获取菜单列表
|
||||||
export const getAuthMenuListApi = () => {
|
export const getAuthMenuListApi = () => {
|
||||||
return http.get<Menu.MenuOptions[]>(`${rePrefix}/menu/list`, {}, { loading: false })
|
// return http.get<Menu.MenuOptions[]>(`${rePrefix}/menu/list`, {}, { loading: false })
|
||||||
// return http.post<Menu.MenuOptions[]>(`/Register2`, {}, { loading: false })
|
return http.post<Menu.MenuOptions[]>(`/Register2`, {}, { loading: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取按钮权限
|
// 获取按钮权限
|
||||||
export const getAuthButtonListApi = () => {
|
export const getAuthButtonListApi = () => {
|
||||||
return http.get<Login.ResAuthButtons>(`${rePrefix}/auth/buttons`, {}, { loading: false })
|
// return http.get<Login.ResAuthButtons>(`${rePrefix}/auth/buttons`, {}, { loading: false })
|
||||||
// return http.post<Login.ResAuthButtons>(`/Register3`, {}, { loading: false })
|
return http.post<Login.ResAuthButtons>(`/Register3`, {}, { loading: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户退出登录
|
// 用户退出登录
|
||||||
export const logoutApi = () => {
|
export const logoutApi = () => {
|
||||||
return http.post(`${rePrefix}/logout`)
|
return http.post(`${rePrefix}/logout`)
|
||||||
|
|||||||
Reference in New Issue
Block a user