forked from xxhjsb/hbt-prevention-ui
48 lines
1.8 KiB
TypeScript
48 lines
1.8 KiB
TypeScript
import BaseService from "hbt-common/service/base.service"
|
|
import type { AxiosResponse } from 'axios'
|
|
import { ActionResult } from "hbt-common/models/actionResult";
|
|
export default class LeaderService extends BaseService<any>{
|
|
constructor(){
|
|
super()
|
|
}
|
|
// 查询列表
|
|
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.prevention+'/process/structure/list';
|
|
return this.get(url,params,true)
|
|
}
|
|
// 批量删除
|
|
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.prevention+'/process/structure/delete';
|
|
return this.deleteBatch(url,params,{},showLoading)
|
|
}
|
|
|
|
// 新增或更新
|
|
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
|
|
|
if(add){
|
|
const url = this.prefix.prevention+'/process/structure/add';
|
|
return this.post(url,params,{},showLoading)
|
|
}else{
|
|
const url = this.prefix.prevention+'/process/structure/update';
|
|
return this.put(url,params,{},showLoading)
|
|
}
|
|
}
|
|
//获取领导机构编号
|
|
public getNumber(params:any):Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.prevention+'/process/structure/number';
|
|
return this.get(url,params)
|
|
}
|
|
|
|
//查询详情
|
|
public getListDetail(params:any):Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.prevention+'/process/structure/detail';
|
|
return this.get(url,params)
|
|
}
|
|
|
|
public getFileUrls(params):Promise<AxiosResponse<ActionResult<any>>>{
|
|
const url = this.prefix.file+'/getSysFiles';
|
|
return this.get(url,params,false)
|
|
}
|
|
|
|
}
|