| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- /*
- * @Author: liuJie
- * @Date: 2026-02-26 13:57:24
- * @LastEditors: liuJie
- * @LastEditTime: 2026-03-06 15:28:00
- * @Describe: file describe
- */
- import { http } from '@/utils/http/axios';
- import type { QueryPageRequest, QueryPageResponse } from '@/types/basic-query';
- /**
- * 劳防用品管理 - 实体与接口
- * 基础路径: /api/personalProtectiveEquipment
- */
- /** 劳防用品实体 */
- export interface PersonalProtectiveEquipment {
- id?: number;
- jobPost?: string; // 作业(岗位)分类
- ppeCategory?: string; // 物品分类
- ppeName?: string; // 物品名称
- serviceMonths?: string; // 使用期限(月)
- status?: boolean; // 用品状态:1-启用,0-禁用
- remark?: string; // 备注
- isDeleted?: string | number; // 0-未删除,大于0(时间戳)-已删除
- createdAt?: string; // 创建时间
- updatedAt?: string; // 更新时间
- }
- /** 分页查询请求体 - 查询条件 */
- export interface QueryPersonalProtectiveEquipmentCommonPageReq {
- name?: string; // 标题
- status?: number | string; // 状态:1-启用,0-禁用
- applyDeptCode?: string; // 申请人部门CODE/申请部门编码
- applyDeptName?: string; // 申请人部门名称
- }
- /** 分页查询劳防用品列表 */
- export function queryPersonalProtectiveEquipmentList(
- query: QueryPageRequest<QueryPersonalProtectiveEquipmentCommonPageReq>,
- ) {
- return http.request<QueryPageResponse<PersonalProtectiveEquipment>>({
- url: '/personalProtectiveEquipment/queryPersonalProtectiveEquipmentList',
- method: 'post',
- data: query,
- });
- }
- /** 新增劳防用品(id 不传) */
- export function savePersonalProtectiveEquipment(data: PersonalProtectiveEquipment) {
- return http.request({
- url: '/personalProtectiveEquipment/savePersonalProtectiveEquipment',
- method: 'post',
- data,
- });
- }
- /** 编辑劳防用品(id 必传) */
- export function updatePersonalProtectiveEquipment(data: PersonalProtectiveEquipment) {
- return http.request({
- url: '/personalProtectiveEquipment/updatePersonalProtectiveEquipment',
- method: 'put',
- data,
- });
- }
- /** 查询劳防用品详情(id 必传,RequestParam) */
- export function queryPersonalProtectiveEquipmentDetail(id: number) {
- return http.request<PersonalProtectiveEquipment>({
- url: `/personalProtectiveEquipment/queryPersonalProtectiveEquipmentDetail?id=${id}`,
- method: 'post',
- });
- }
- /** 删除劳防用品(POST,传 id) */
- export function deletePersonalProtectiveEquipment(id: number) {
- return http.request({
- url: `/personalProtectiveEquipment/deletePersonalProtectiveEquipment?id=${id}`,
- method: 'delete',
- });
- }
- /**
- * 导出危险作业管理审核
- * @returns Promise<any> 导出的危险作业管理审核
- */
- export function exportPersonalProtectiveEquipment (queryParams) {
- return http.request({
- url: '/personalProtectiveEquipment/exportPersonalProtectiveEquipment',
- method: 'post',
- responseType: 'blob',
- data: queryParams,
- }, {
- isTransformResponse: false,
- });
- }
|