forked from xxhjsb/hbt-prevention-ui
27 lines
995 B
TypeScript
27 lines
995 B
TypeScript
import BaseService from "hbt-common/service/base.service"
|
|
import type { AxiosResponse } from 'axios'
|
|
import { ActionResult } from "hbt-common/models/actionResult";
|
|
export default class UnitService extends BaseService<any>{
|
|
constructor(){
|
|
super()
|
|
}
|
|
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.prevention+'/risk/unit/list';
|
|
return this.get(url,params,true)
|
|
}
|
|
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.system+'/user/list';
|
|
return this.deleteBatch(url,params,{},true)
|
|
}
|
|
|
|
|
|
// 新增或更新
|
|
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.prevention+'/risk/unit';
|
|
if(add){
|
|
return this.post(url,params,{},showLoading)
|
|
}else{
|
|
return this.put(url,params,{},showLoading)
|
|
}
|
|
}
|
|
} |