import BaseService from "hbt-common/service/base.service" import type { AxiosResponse } from 'axios' import { ActionResult } from "hbt-common/models/actionResult"; export default class DeviceService extends BaseService{ constructor(){ super() } public selectByPage(params: any):Promise>>{ const url = this.prefix.prevention+'/device/inventory/getList'; return this.get(url,params) } public selectById(id):Promise>>{ const url = this.prefix.prevention+'/device/inventory/detail?id='+id; return this.get(url,null,true) } // 新增或更新 public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise>>{ if(add){ const url = this.prefix.prevention+'/device/inventory/add'; return this.post(url,params,{},showLoading) }else{ const url = this.prefix.prevention+'/device/inventory/update'; return this.put(url,params,{},showLoading) } } public deleteByIds(params):Promise>>{ const url = this.prefix.prevention +'/device/inventory'; return this.deleteBatch(url,params,{},true) } public selectByPage2(params: any):Promise>>{ const url = this.prefix.prevention+'/device/inventory/getList'; return this.get(url,params) } //检查项目 public selectProjectByPage(params: any):Promise>>{ const url = this.prefix.prevention+'/device/item/list'; return this.get(url,params) } }