| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- import { http } from '@/utils/http/axios';
- import type { QueryPageRequest, QueryPageResponse } from '@/types/basic-query';
- /**
- * 特种设备设施管理 - 实体与接口
- * 基础路径: /api/specialEquipment
- */
- /** 分页查询条件 */
- export interface SpecialEquipmentQueryParam {
- deviceName?: string; // 设备名称(模糊)
- useUnit?: string; // 使用单位(模糊)
- categoryId?: number; // 设备类别ID
- typeId?: number; // 设备种类ID
- isUseDepartment?: number; // 是否使用部门 1-是,0-否
- responsibilityDeptId?: number; // 责任部门ID
- deviceStatus?: number; // 设备状态 1-在用,2-停用,3-报废
- }
- /** 特种设备设施实体(列表 + 详情统一类型) */
- export interface SpecialEquipment {
- id?: number; // 设备主键ID
- deviceId?: string; // 设备ID,企业内部唯一标识编号
- deviceName?: string; // 设备名称
- useUnit?: string; // 使用单位名称
- categoryId?: number; // 设备类别ID
- categoryName?: string; // 设备类别名称
- typeId?: number; // 设备种类ID
- typeName?: string; // 设备种类名称
- registerCode?: string; // 注册代码
- deviceCode?: string; // 设备编码
- useDepartment?: string | number; // 使用部门名称
- responsiblePerson?: string; // 设备责任人姓名
- factoryNo?: string; // 出厂编号
- startUseDate?: string; // 启用日期 yyyy-MM-dd
- useYears?: number; // 使用年限(年)
- inspectionTime?: string; // 检测时间 yyyy-MM-dd
- assetId?: string; // 设备固资ID
- licenseNo?: string; // 使用证号
- safeLocation?: string; // 安全地点
- responsibilityDeptId?: number; // 责任部门ID
- responsibilityDeptName?: string; // 责任部门名称
- jobNo?: string; // 责任人工号
- productionDate?: string; // 生产日期 yyyy-MM-dd
- inspectionCycle?: number; // 检测周期(天)
- deviceStatus?: number; // 设备状态 1-在用,2-停用,3-报废
- deviceStatusName?: string; // 设备状态名称
- isUseDepartment?: number; // 是否使用部门 1-是,0-否
- isUseDepartmentName?: string; // 是否使用部门名称
- nextInspectionDate?: string; // 下次检测时间 yyyy-MM-dd
- remark?: string; // 备注
- attachments?: {
- file_name: string;
- url: string;
- }[]; // 附件列表
- [key: string]: any;
- useDepartmentPath?: any; // 使用部门路径(部门ID列表)
- }
- /** 分页查询特种设备设施列表 */
- export function querySpecialEquipmentPage(
- query: QueryPageRequest<SpecialEquipmentQueryParam>,
- ) {
- return http.request<QueryPageResponse<SpecialEquipment>>({
- url: '/specialEquipment/queryPage',
- method: 'post',
- data: query,
- });
- }
- /** 查询特种设备设施详情 */
- export function querySpecialEquipmentDetail(id: number) {
- return http.request<SpecialEquipment>({
- url: '/specialEquipment/queryDetail',
- method: 'get',
- params: { id },
- });
- }
- /** 新增特种设备设施 */
- export function saveSpecialEquipment(data: SpecialEquipment) {
- return http.request({
- url: '/specialEquipment/save',
- method: 'post',
- data,
- });
- }
- /** 编辑特种设备设施 */
- export function updateSpecialEquipment(data: SpecialEquipment) {
- return http.request({
- url: '/specialEquipment/update',
- method: 'put',
- data,
- });
- }
- /** 删除特种设备设施 */
- export function deleteSpecialEquipment(id: number) {
- return http.request({
- url: `/specialEquipment/delete?id=${id}`,
- method: 'delete',
- });
- }
- /**
- * 导出特种设备设施
- */
- export function exportSpecialEquipment(query: SpecialEquipmentQueryParam) {
- return http.request({
- url: '/specialEquipment/exportInventory',
- method: 'post',
- data: query,
- // params: classifyName ? { classifyName } : undefined,
- responseType: 'blob',
- }, {
- isTransformResponse: false,
- });
- }
|