# Conflicts:
#	frontend/src/views/home/components/tree.vue
This commit is contained in:
GYYM
2024-11-12 20:39:16 +08:00
22 changed files with 806 additions and 548 deletions

View File

@@ -23,7 +23,7 @@ export const updatePqDev = (params: Device.ResPqDev) => {
//删除被检设备
export const deletePqDev = (params: string[]) => {
return http.delete(`/pqDev/delete`, params)
return http.post(`/pqDev/delete`, params)
}
//导出被检设备

View File

@@ -0,0 +1,35 @@
import type { ReqPage,ResPage } from '@/api/interface'
// 被检设备模块
export namespace Monitor {
/**
* 电能质量指标字典数据表格分页查询参数
*/
export interface ReqPqMonParams extends ReqPage{
id: string; // 装置序号id 必填
devType?: string; // 设备名称
createTime?:string; //创建时间
}
/**
* 被检设备新增、修改、根据id查询返回的对象
*/
export interface ResPqMon {
id: string; //监测点ID
code: string; //默认与谐波系统监测点ID相同
devId: string; //所属设备ID
name: string; //所属母线
num: number; //监测点序号
pt: number; //PT变比
ct: number; //CT变比
ptType:string; //接线方式,字典表
}
/**
* 被检设备表格查询分页返回的对象;
*/
export interface ResPqMonPage extends ResPage<ResPqMon> {
}
}

View File

@@ -0,0 +1,29 @@
import type { Monitor } from './interface'
import { ADMIN as rePrefix } from '@/api/config/serviceName'
import http from '@/api'
/**
* @name 被检设备管理模块
*/
//获取被检设备
export const getPqMonList = (params: Monitor.ReqPqMonParams) => {
return http.post(`/pqMon/list`, params)
}
//添加被检设备
export const addPqMon = (params: Monitor.ResPqMon) => {
return http.post(`/pqMon/add`, params)
}
//编辑被检设备
export const updatePqMon = (params: Monitor.ResPqMon) => {
return http.put(`/pqMon/update`, params)
}
//删除被检设备
export const deletePqMon = (params: string[]) => {
return http.post(`/pqMon/delete`, params)
}

View File

@@ -12,11 +12,16 @@ export namespace Role {
//角色接口
export interface RoleBO {
id?: string; //角色类型ID
id: string; //角色类型ID
name: string; //角色类型名称
code: string; //角色代码
type: number; //角色类型
remark:string; //角色描述
remark?:string; //角色描述
state:number;
createBy?:string; //
createTime?: string; // 创建时间
updateBy?: string; //
updateTime?: string; // 更新时间
}
//角色+资源

View File

@@ -1,5 +1,5 @@
import { ResPage } from '@/api/interface'
import { Role } from './interface'
import type { ResPage } from '@/api/interface'
import type { Role } from './interface'
import { ADMIN as rePrefix } from '@/api/config/serviceName'
import http from '@/api'
@@ -8,7 +8,7 @@ import http from '@/api'
*/
// 获取角色列表
export const getRoleList = (params: Role.ReqRoleParams) => {
return http.post<ResPage<Role.RoleBO>>(`/role/list`, params)
return http.get(`/sysRole/list`, params)
// return http.post<ResPage<Role.ResRoleList>>(`/RoleList_Post`, params)
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/role/list`, params)
@@ -16,17 +16,17 @@ export const getRoleList = (params: Role.ReqRoleParams) => {
// 新增角色
export const addRole = (params: Role.RoleBO) => {
return http.post(`/role/add`, params)
return http.post(`/sysRole/add`, params)
}
// 编辑角色
export const editRole = (params: Role.RoleBO) => {
return http.post(`/role/edit`, params)
return http.put(`/sysRole/edit`, params)
}
// 删除角色
export const deleteRole = (params: { id: string[] }) => {
return http.post(`/role/del`, params)
return http.post(`/sysRole/del`, params)
}
@@ -35,60 +35,3 @@ export const editRoleAndPermission = (params: Role.ReqRoleAndPermission) => {
return http.post(`/role/edit_RoleAndPermission`, params)
}
// // 获取树形用户列表
// export const getRoleTreeList = (params: Role.ReqRoleParams) => {
// return http.post<ResPage<Role.ResRoleList>>(`${rePrefix}/role/tree/list`, params)
// }
// export const addRole = (params: { id: string ; rolename: string;status: number; describe:string; }) => {
// return http.post(`/RoleList_Add`, params)
// }
// 批量添加角色
// export const BatchAddRole = (params: FormData) => {
// return http.post(`${rePrefix}/role/import`, params)
// }
// // 切换角色状态
// export const changeRoleStatus = (params: { id: string; status: number }) => {
// return http.post(`${rePrefix}/role/change`, params)
// }
// 重置用户密码
// export const resetUserPassWord = (params: { id: string }) => {
// return http.post(`${rePrefix}/role/rest_password`, params)
// }
// 导出角色数据
// export const exportRoleInfo = (params: Role.ReqRoleParams) => {
// return http.download(`${rePrefix}/role/export`, params)
// }
// 获取角色状态字典
// export const getRoleStatus = () => {
// return http.get<Role.ResStatus[]>(`${rePrefix}/role/status`)
// }
// 获取用户性别字典
// export const getUserGender = () => {
// return http.get<User.ResGender[]>(`${rePrefix}/user/gender`)
// }
// 获取角色权限列表
// export const getRoleDepartment = () => {
// return http.get<Role.ResPermissionList[]>(`${rePrefix}/role/permission`)
// }
// 获取用户角色字典
// export const getUserRole = () => {
// return http.get<User.ResRole[]>(`${rePrefix}/user/role`)
// }

View File

@@ -19,7 +19,7 @@ export const updateDictData = (params: Dict.ResDictData) => {
//删除字典数据
export const deleteDictData = (params: string[]) => {
return http.delete(`/dictData/delete`, params)
return http.post(`/dictData/delete`, params)
}
export const getDicDataById = (params: string) => {

View File

@@ -18,6 +18,6 @@ export const updateDictPq = (params: Dict.ResDictPq) => {
//删除字典类型
export const deleteDictPq = (params: string[]) => {
return http.delete(`/dictPq/delete`, params)
return http.post(`/dictPq/delete`, params)
}

View File

@@ -13,7 +13,7 @@ export const addDictTree = (params: Dict.ResDictTree) => {
//编辑字典类型
export const updateDictTree = (params: Dict.ResDictTree) => {
return http.post(`/dictTree/update`, params)
return http.put(`/dictTree/update`, params)
}
//删除字典类型

View File

@@ -18,7 +18,7 @@ export const updateDictType = (params: Dict.ResDictType) => {
//删除字典类型
export const deleteDictType = (params: string[]) => {
return http.delete(`/dictType/delete`, params)
return http.post(`/dictType/delete`, params)
}
//导出字典类型

View File

@@ -23,7 +23,7 @@ export namespace User {
*/
export interface ReqUserParams extends ReqPage{
id: string; // 装置序号用户ID 必填
name: string; //用户名(别名)
name?: string; //用户名(别名)
loginTime?: string;//最后一次登录时间
}
@@ -44,8 +44,19 @@ export namespace User {
createTime?: string;//创建时间
updateBy?: string;//更新用户
updateTime?: string;//更新时间
roleIds?: string[]; //
roleNames?:string[]; //
}
// 用户接口
export interface ResPassWordUser {
id: string; //用户ID作为唯一标识
oldPassword: string; //密码
newPassword: string; //新密码
surePassword:string;
}
/**
* 用户表格查询分页返回的对象;
*/

View File

@@ -1,5 +1,6 @@
import type { Role } from './../role/interface/index';
import type { ResPage } from '@/api/interface'
import type { User } from './interface'
import type { User} from './interface'
import { ADMIN as rePrefix } from '@/api/config/serviceName'
import http from '@/api'
@@ -8,50 +9,33 @@ import http from '@/api'
*/
// 获取用户列表
export const getUserList = (params: User.ReqUserParams) => {
return http.post(`/user/list`, params)
return http.post(`/sysUser/list`, params)
}
// 获取树形用户列表
// export const getUserTreeList = (params: User.ReqUserParams) => {
// return http.post<ResPage<User.ResUserList>>(`${rePrefix}/user/tree/list`, params)
// }
// 新增用户
export const addUser = (params: User.ResUser) => {
return http.post(`/user/add`, params)
}
// 批量添加用户
export const BatchAddUser = (params: User.ReqUserParams) => {
return http.post(`$/user/import`, params)
return http.post(`/sysUser/add`, params)
}
// 编辑用户
export const updateUser = (params: User.ResUser) => {
return http.post(`/user/update`, params)
return http.put(`/sysUser/update`, params)
}
// 删除用户
export const deleteUser = (params: string[] ) => {
return http.post(`/user/delete`, params)
return http.post(`/sysUser/delete`, params)
}
// 切换用户状态
// export const changeUserStatus = (params: { id: string; status: number }) => {
// return http.post(`${rePrefix}/user/change`, params)
// }
// 重置用户密码
// export const resetUserPassWord = (params: { id: string }) => {
// return http.post(`${rePrefix}/user/rest_password`, params)
// }
// 导出用户数据
export const exportUserInfo = (params: User.ReqUserParams) => {
return http.download(`${rePrefix}/user/export`, params)
// 获取角色列表
export const getRoleList = () => {
return http.get<Role.RoleBO>(`/sysRole/simpleList`)
}
//修改密码
export const updatePassWord = (params: User.ResPassWordUser) => {
return http.put(`/sysUser/updatePassword`,params)
}
// 获取用户状态字典
// export const getUserStatus = () => {
// return http.get<User.ResStatus[]>(`${rePrefix}/user/status`)
// }