123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import { AxiosResponse } from 'axios'
- import { ContentType, HttpClient, RequestParams } from '/@/api/admin/http-client'
- import { HistoricalVersionRecordDto, ProjectGetPageDto } from './slelistDto'
- export class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
- /**
- * 删除项目
- * @param value 项目信息对象
- */
- deleteProject(value: ProjectGetPageDto) {
- return this.request({
- path: '/api/app/project/delete-project',
- method: 'POST',
- body: value,
- type: ContentType.Json,
- format: 'json',
- secure: true
- })
- }
- /**
- * 查询列表
- * @tags
- * @name GetList
- * @summary 查询列表
- * @request POST:'/api/app/project/get-page'
- * @secure
- */
- getList = (data: any, params: RequestParams = {}): any =>
- this.request<AxiosResponse, any>({
- path: '/api/app/project/get-page',
- method: 'POST',
- body: data,
- type: ContentType.Json,
- secure: true,
- format: 'json',
- ...params
- })
- /**
- * 上传/添加项目
- */
- uploadProject = (data: ProjectGetPageDto, params: RequestParams = {}) => {
- return this.request({
- path: '/api/app/project/upload-project',
- method: 'POST',
- body: data,
- type: ContentType.Json,
- format: 'json',
- ...params
- })
- }
- /**
- * 更新项目
- */
- updateProject = (data: ProjectGetPageDto & { id: string }, params: RequestParams = {}) => {
- return this.request({
- path: '/api/app/project/update-project',
- method: 'POST',
- body: data,
- type: ContentType.Json,
- format: 'json',
- ...params
- })
- }
- /** 获取所有项目的主键,项目名称,项目编码 */
- getProjectMainInfo = () => {
- return this.request({
- path: '/api/app/project/get-main-info',
- method: 'get',
- })
- }
- /**
- * 查询软件历史版本记录
- * @tags 软件管理
- * @name GetHistoricalVersionRecord
- * @summary 通过ID查询历史版本
- * @request POST:/api/app/software/get-historical-version-record
- * @secure
- */
- getHistory = (id: number | null, params: RequestParams = {}): Promise<AxiosResponse<HistoricalVersionRecordDto>> => {
- const requestData = id !== null ? { id } : {};
-
- return this.request({
- path: '/api/app/software/get-historical-version-record',
- method: 'POST',
- query: requestData,
- secure: true,
- format: 'json',
- ...params
- });
- }
- }
|