feat(sis): 新增通行权限组功能
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-07-23 14:12:02 +08:00
parent 2ad20e8ccb
commit 0d6259e335
10 changed files with 650 additions and 96 deletions

View File

@@ -1,70 +1,75 @@
import type { PageQuery, BaseEntity } from '#/api/common';
import type { PageQuery, BaseEntity } from '#/api/common'
export interface PersonVO {
/**
* 主键id
*/
id: string | number;
id: string | number
/**
* 用户id
*/
userId: string | number;
userId: string | number
/**
* 用户名称
*/
userName: string;
userName: string
/**
* 联系电话
*/
phone: string;
phone: string
/**
* 性别
*/
gender: number;
gender: number
/**
* 人脸图片
*/
img: string;
img: string
/**
* 所属单位id
*/
unitId: string | number;
unitId: string | number
/**
* 所属单位名称
*/
unitName: string;
unitName: string
/**
* 入驻位置
*/
locathon: string;
locathon: string
/**
* 入驻时间
*/
time: string;
time: string
/**
* 车牌号码
*/
carNumber: string;
carNumber: string
/**
* 状态
*/
state: number|string;
state: number | string
/**
* 备注
*/
remark: string;
remark: string
/**
* 权限组id
*/
authGroupId?: string | number
}
@@ -72,67 +77,72 @@ export interface PersonForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
id?: string | number
/**
* 用户id
*/
userId?: string | number;
userId?: string | number
/**
* 用户名称
*/
userName?: string;
userName?: string
/**
* 联系电话
*/
phone?: string;
phone?: string
/**
* 性别
*/
gender?: number;
gender?: number
/**
* 人脸图片
*/
img?: string;
img?: string
/**
* 所属单位id
*/
unitId?: string | number;
unitId?: string | number
/**
* 所属单位名称
*/
unitName?: string;
unitName?: string
/**
* 入驻位置
*/
locathon?: string;
locathon?: string
/**
* 入驻时间
*/
time?: string;
time?: string
/**
* 车牌号码
*/
carNumber?: string;
carNumber?: string
/**
* 状态
*/
state?: number;
state?: number
/**
* 备注
*/
remark?: string;
remark?: string
/**
* 权限组id
*/
authGroupId?: string | number
}
@@ -140,128 +150,128 @@ export interface PersonQuery extends PageQuery {
/**
* 用户id
*/
userId?: string | number;
userId?: string | number
/**
* 用户名称
*/
userName?: string;
userName?: string
/**
* 联系电话
*/
phone?: string;
phone?: string
/**
* 性别
*/
gender?: number;
gender?: number
/**
* 人脸图片
*/
img?: string;
img?: string
/**
* 所属单位id
*/
unitId?: string | number;
unitId?: string | number
/**
* 所属单位名称
*/
unitName?: string;
unitName?: string
/**
* 入驻位置
*/
locathon?: string;
locathon?: string
/**
* 入驻时间
*/
time?: string;
time?: string
/**
* 车牌号码
*/
carNumber?: string;
carNumber?: string
/**
* 状态
*/
state?: number;
state?: number
/**
* 日期范围参数
*/
params?: any;
params?: any
}
export interface Person extends BaseEntity{
export interface Person extends BaseEntity {
/**
* 主键id
*/
id: string | number;
id: string | number
/**
* 用户id
*/
userId: string | number;
userId: string | number
/**
* 用户名称
*/
userName: string;
userName: string
/**
* 联系电话
*/
phone: string;
phone: string
/**
* 性别
*/
gender: number;
gender: number
/**
* 人脸图片
*/
img: string;
img: string
/**
* 所属单位id
*/
unitId: string | number;
unitId: string | number
/**
* 所属单位名称
*/
unitName: string;
unitName: string
/**
* 入驻位置
*/
locathon: string;
locathon: string
/**
* 入驻时间
*/
time: string;
time: string
/**
* 车牌号码
*/
carNumber: string;
carNumber: string
/**
* 状态
*/
state: number;
state: number
/**
* 备注
*/
remark: string;
remark: string
}

View File

@@ -56,6 +56,16 @@ export interface Resident_unitVO {
*/
remark: string;
/**
* 权限组id
*/
authGroupId?: string | number;
/**
* 权限组名称
*/
authGroupName?: string;
}
export interface Resident_unitForm extends BaseEntity {

View File

@@ -0,0 +1,61 @@
import type { AuthGroupVO, AuthGroupForm, AuthGroupQuery } from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询授权组列表
* @param params
* @returns 授权组列表
*/
export function authGroupList(params?: AuthGroupQuery) {
return requestClient.get<PageResult<AuthGroupVO>>('/sis/authGroup/list', { params });
}
/**
* 导出授权组列表
* @param params
* @returns 授权组列表
*/
export function authGroupExport(params?: AuthGroupQuery) {
return commonExport('/sis/authGroup/export', params ?? {});
}
/**
* 查询授权组详情
* @param id id
* @returns 授权组详情
*/
export function authGroupInfo(id: ID) {
return requestClient.get<AuthGroupVO>(`/sis/authGroup/${id}`);
}
/**
* 新增授权组
* @param data
* @returns void
*/
export function authGroupAdd(data: AuthGroupForm) {
return requestClient.postWithMsg<void>('/sis/authGroup', data);
}
/**
* 更新授权组
* @param data
* @returns void
*/
export function authGroupUpdate(data: AuthGroupForm) {
return requestClient.putWithMsg<void>('/sis/authGroup', data);
}
/**
* 删除授权组
* @param id id
* @returns void
*/
export function authGroupRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/sis/authGroup/${id}`);
}

View File

@@ -0,0 +1,69 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface AuthGroupVO {
/**
* 主键id
*/
id: string | number;
/**
* 权限名称
*/
name: string;
/**
* 面向对象(1-单位、2-个人)
*/
groupType: number;
/**
* 是否启用(0禁用1启用)
*/
isEnable: boolean;
}
export interface AuthGroupForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 权限名称
*/
name?: string;
/**
* 面向对象(1-单位、2-个人)
*/
groupType?: number;
/**
* 是否启用(0禁用1启用)
*/
isEnable?: boolean;
}
export interface AuthGroupQuery extends PageQuery {
/**
* 权限名称
*/
name?: string;
/**
* 面向对象(1-单位、2-个人)
*/
groupType?: number;
/**
* 是否启用(0禁用1启用)
*/
isEnable?: boolean;
/**
* 日期范围参数
*/
params?: any;
}