songshankun
2023-11-02 19378c283f19ee0b023b3cd73fbdd331eed2fe17
src/api/index.ts
@@ -2,6 +2,7 @@
import type { CraftParamsResponse, TasksGroupByChannel } from './task'
import type { PLCResponse } from './plc'
import type { Devices } from './device'
import type { CraftModel } from './craftModel'
export interface BaseResponse<T = any> {
  code: number
@@ -105,3 +106,38 @@
    method: 'get'
  })
}
export interface CraftModelListParams {
  procedureId: number
  page: number
  pageSize: number
  number: string
}
/**
 * 获取工艺模型列表
 * @param params
 */
export function apiGetCraftModelList(params: CraftModelListParams) {
  return request<BaseResponse<CraftModel[]>>({
    url: '/v1/processModel/list',
    method: 'get',
    params
  })
}
export interface UpdateCraftPrams {
  procedureId: number
}
/**
 * 更新工艺模型
 * @param params
 */
export function updateCraftParams(params: UpdateCraftPrams) {
  return request<BaseResponse>({
    url: '/v1/task/updateProcessParams',
    method: 'post',
    data: params
  })
}