import BaseService from "hbt-common/service/base.service" import type { AxiosResponse } from 'axios' import { ActionResult } from "hbt-common/models/actionResult"; export default class JobHazardService extends BaseService{ constructor(){ super() } public selectByPage(params: any):Promise>>{ const url = this.prefix.prevention+'/job/anal/getList'; return this.get(url,params,true) } public deleteByIds(params):Promise>>{ const url = this.prefix.prevention+'/job/anal/delete'; return this.deleteBatch(url,params,{},true) } public selectById(id):Promise>>{ const url = this.prefix.prevention+'/job/anal/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+'/job/anal/add'; return this.post(url,params,{},showLoading) }else{ const url = this.prefix.prevention+'/job/anal/update'; return this.put(url,params,{},showLoading) } } // 存草稿 public addOrDraft(params: any, add: boolean,showLoading?:boolean): Promise>>{ const url = this.prefix.prevention+'/job/anal/addDraft'; return this.post(url,params,{},showLoading) } //查询作业活动 public selectWorkByUnit(params: any):Promise>>{ const url = this.prefix.prevention+'/job/inventory/filter/list'; return this.post(url,params,{},true) } }