项目微调
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# title
|
# title
|
||||||
VITE_GLOB_APP_TITLE=自动检测平台
|
VITE_GLOB_APP_TITLE=PQS-9100自动检测平台
|
||||||
|
|
||||||
# 本地运行端口号
|
# 本地运行端口号
|
||||||
VITE_PORT=18091
|
VITE_PORT=18091
|
||||||
|
|||||||
5
frontend/components.d.ts
vendored
5
frontend/components.d.ts
vendored
@@ -31,17 +31,12 @@ declare module 'vue' {
|
|||||||
ElMain: typeof import('element-plus/es')['ElMain']
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
|
||||||
Loading: typeof import('./src/components/Loading/index.vue')['default']
|
Loading: typeof import('./src/components/Loading/index.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
|||||||
5
frontend/src/api/config/serviceName.ts
Normal file
5
frontend/src/api/config/serviceName.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
// 系统&用户模块前缀
|
||||||
|
export const ADMIN = "/admin";
|
||||||
|
|
||||||
|
// todo... 其他业务模块前缀
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
// 后端微服务模块前缀
|
|
||||||
export const PORT1 = "/admin";
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Login } from "@/api/interface/index";
|
import { Login } from "@/api/interface/index";
|
||||||
import { PORT1 } from "@/api/config/servicePort";
|
import { ADMIN } from "@/api/config/serviceName";
|
||||||
import http from "@/api";
|
import http from "@/api";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,20 +7,20 @@ import http from "@/api";
|
|||||||
*/
|
*/
|
||||||
// 用户登录
|
// 用户登录
|
||||||
export const loginApi = (params: Login.ReqLoginForm) => {
|
export const loginApi = (params: Login.ReqLoginForm) => {
|
||||||
return http.post<Login.ResLogin>(PORT1 + `/login`, params, { loading: false }); // 正常 post json 请求 ==> application/json
|
return http.post<Login.ResLogin>(ADMIN + `/login`, params, { loading: false }); // 正常 post json 请求 ==> application/json
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取菜单列表
|
// 获取菜单列表
|
||||||
export const getAuthMenuListApi = () => {
|
export const getAuthMenuListApi = () => {
|
||||||
return http.get<Menu.MenuOptions[]>(PORT1 + `/menu/list`, {}, { loading: false });
|
return http.get<Menu.MenuOptions[]>(ADMIN + `/menu/list`, {}, { loading: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取按钮权限
|
// 获取按钮权限
|
||||||
export const getAuthButtonListApi = () => {
|
export const getAuthButtonListApi = () => {
|
||||||
return http.get<Login.ResAuthButtons>(PORT1 + `/auth/buttons`, {}, { loading: false });
|
return http.get<Login.ResAuthButtons>(ADMIN + `/auth/buttons`, {}, { loading: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 用户退出登录
|
// 用户退出登录
|
||||||
export const logoutApi = () => {
|
export const logoutApi = () => {
|
||||||
return http.post(PORT1 + `/logout`);
|
return http.post(ADMIN + `/logout`);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import { Upload } from "@/api/interface/index";
|
|
||||||
import { PORT1 } from "@/api/config/servicePort";
|
|
||||||
import http from "@/api";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name 文件上传模块
|
|
||||||
*/
|
|
||||||
// 图片上传
|
|
||||||
export const uploadImg = (params: FormData) => {
|
|
||||||
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/img`, params);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 视频上传
|
|
||||||
export const uploadVideo = (params: FormData) => {
|
|
||||||
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params);
|
|
||||||
};
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ResPage, User } from "@/api/interface/index";
|
import { ResPage, User } from "@/api/interface/index";
|
||||||
import { PORT1 } from "@/api/config/servicePort";
|
import { ADMIN } from "@/api/config/serviceName";
|
||||||
import http from "@/api";
|
import http from "@/api";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,65 +7,65 @@ import http from "@/api";
|
|||||||
*/
|
*/
|
||||||
// 获取用户列表
|
// 获取用户列表
|
||||||
export const getUserList = (params: User.ReqUserParams) => {
|
export const getUserList = (params: User.ReqUserParams) => {
|
||||||
return http.post<ResPage<User.ResUserList>>(PORT1 + `/user/list`, params);
|
return http.post<ResPage<User.ResUserList>>(ADMIN + `/user/list`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取树形用户列表
|
// 获取树形用户列表
|
||||||
export const getUserTreeList = (params: User.ReqUserParams) => {
|
export const getUserTreeList = (params: User.ReqUserParams) => {
|
||||||
return http.post<ResPage<User.ResUserList>>(PORT1 + `/user/tree/list`, params);
|
return http.post<ResPage<User.ResUserList>>(ADMIN + `/user/tree/list`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 新增用户
|
// 新增用户
|
||||||
export const addUser = (params: { id: string }) => {
|
export const addUser = (params: { id: string }) => {
|
||||||
return http.post(PORT1 + `/user/add`, params);
|
return http.post(ADMIN + `/user/add`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 批量添加用户
|
// 批量添加用户
|
||||||
export const BatchAddUser = (params: FormData) => {
|
export const BatchAddUser = (params: FormData) => {
|
||||||
return http.post(PORT1 + `/user/import`, params);
|
return http.post(ADMIN + `/user/import`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 编辑用户
|
// 编辑用户
|
||||||
export const editUser = (params: { id: string }) => {
|
export const editUser = (params: { id: string }) => {
|
||||||
return http.post(PORT1 + `/user/edit`, params);
|
return http.post(ADMIN + `/user/edit`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除用户
|
// 删除用户
|
||||||
export const deleteUser = (params: { id: string[] }) => {
|
export const deleteUser = (params: { id: string[] }) => {
|
||||||
return http.post(PORT1 + `/user/delete`, params);
|
return http.post(ADMIN + `/user/delete`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 切换用户状态
|
// 切换用户状态
|
||||||
export const changeUserStatus = (params: { id: string; status: number }) => {
|
export const changeUserStatus = (params: { id: string; status: number }) => {
|
||||||
return http.post(PORT1 + `/user/change`, params);
|
return http.post(ADMIN + `/user/change`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 重置用户密码
|
// 重置用户密码
|
||||||
export const resetUserPassWord = (params: { id: string }) => {
|
export const resetUserPassWord = (params: { id: string }) => {
|
||||||
return http.post(PORT1 + `/user/rest_password`, params);
|
return http.post(ADMIN + `/user/rest_password`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 导出用户数据
|
// 导出用户数据
|
||||||
export const exportUserInfo = (params: User.ReqUserParams) => {
|
export const exportUserInfo = (params: User.ReqUserParams) => {
|
||||||
return http.download(PORT1 + `/user/export`, params);
|
return http.download(ADMIN + `/user/export`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取用户状态字典
|
// 获取用户状态字典
|
||||||
export const getUserStatus = () => {
|
export const getUserStatus = () => {
|
||||||
return http.get<User.ResStatus[]>(PORT1 + `/user/status`);
|
return http.get<User.ResStatus[]>(ADMIN + `/user/status`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取用户性别字典
|
// 获取用户性别字典
|
||||||
export const getUserGender = () => {
|
export const getUserGender = () => {
|
||||||
return http.get<User.ResGender[]>(PORT1 + `/user/gender`);
|
return http.get<User.ResGender[]>(ADMIN + `/user/gender`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取用户部门列表
|
// 获取用户部门列表
|
||||||
export const getUserDepartment = () => {
|
export const getUserDepartment = () => {
|
||||||
return http.get<User.ResDepartment[]>(PORT1 + `/user/department`);
|
return http.get<User.ResDepartment[]>(ADMIN + `/user/department`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取用户角色字典
|
// 获取用户角色字典
|
||||||
export const getUserRole = () => {
|
export const getUserRole = () => {
|
||||||
return http.get<User.ResRole[]>(PORT1 + `/user/role`);
|
return http.get<User.ResRole[]>(ADMIN + `/user/role`);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
/**
|
|
||||||
* 本地缓存Key
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 用户信息
|
|
||||||
export const USER_INFO = 'userInfo'
|
|
||||||
|
|
||||||
// 用户信息
|
|
||||||
export const TABS_INFO = 'tabsInfo'
|
|
||||||
|
|
||||||
// WEB端布局配置
|
|
||||||
export const STORE_CONFIG = 'storeConfig'
|
|
||||||
|
|
||||||
// 后台标签页
|
|
||||||
export const STORE_TAB_VIEW_CONFIG = 'storeTabViewConfig'
|
|
||||||
// 字典
|
|
||||||
export const DICT_DATA = 'dictData'
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
/**
|
|
||||||
* 用户相关的一些常量
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 请求头token拼接的前缀
|
|
||||||
export const TOKEN_PREFIX = 'bearer '
|
|
||||||
@@ -12,12 +12,12 @@
|
|||||||
// background-color: var(--el-header-bg-color);
|
// background-color: var(--el-header-bg-color);
|
||||||
background-color: var(--el-color-primary); //默认蓝色风格背景
|
background-color: var(--el-color-primary); //默认蓝色风格背景
|
||||||
.logo {
|
.logo {
|
||||||
width: 210px;
|
padding:0 10px 0 15px;
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
.logo-img {
|
.logo-img {
|
||||||
width: 28px;
|
width: 28px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
margin-right: 6px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
.logo-text {
|
.logo-text {
|
||||||
font-size: 21.5px;
|
font-size: 21.5px;
|
||||||
|
|||||||
Reference in New Issue
Block a user