| | |
| | | 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 |
| | |
| | | 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 |
| | | }) |
| | | } |