1、入驻管理

This commit is contained in:
2025-06-19 16:55:06 +08:00
parent a2ca8c2d09
commit 87fe0eb78f
10 changed files with 62 additions and 114 deletions

View File

@@ -0,0 +1,61 @@
import type { PersonVO, PersonForm, PersonQuery } 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 personList(params?: PersonQuery) {
return requestClient.get<PageResult<PersonVO>>('/property/person/list', { params });
}
/**
* 导出入驻员工列表
* @param params
* @returns 入驻员工列表
*/
export function personExport(params?: PersonQuery) {
return commonExport('/property/person/export', params ?? {});
}
/**
* 查询入驻员工详情
* @param id id
* @returns 入驻员工详情
*/
export function personInfo(id: ID) {
return requestClient.get<PersonVO>(`/property/person/${id}`);
}
/**
* 新增入驻员工
* @param data
* @returns void
*/
export function personAdd(data: PersonForm) {
return requestClient.postWithMsg<void>('/property/person', data);
}
/**
* 更新入驻员工
* @param data
* @returns void
*/
export function personUpdate(data: PersonForm) {
return requestClient.putWithMsg<void>('/property/person', data);
}
/**
* 删除入驻员工
* @param id id
* @returns void
*/
export function personRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/person/${id}`);
}

View File

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