From 70ca3fe1992a1c7a4a5ba0e6f7f8fbc979462a4b Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 31 十月 2023 20:28:29 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/bulletin-board-style1 into wn --- src/api/index.ts | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 1517ce2..708b8b2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,5 +1,5 @@ import { request } from '@/common/utils' -import type { TasksGroupByChannel } from './task' +import type { CraftParamsResponse, TasksGroupByChannel } from './task' import type { PLCResponse } from './plc' export interface BaseResponse<T = any> { @@ -36,6 +36,10 @@ procedureId: number } +/** + * 鑾峰彇PLC杩愯鏁版嵁 + * @param params + */ export function getProductProgress(params: ProductProgressParams) { return request<BaseResponse<PLCResponse>>({ url: '/v1/plc/productProgress', @@ -43,3 +47,29 @@ data: params }) } +export interface CraftParamsParams { + id: number +} + +/** + * 鑾峰彇宸ヨ壓鍙傛暟 + * @param params + */ +export function getCraftParams(params: CraftParamsParams) { + return request<BaseResponse<CraftParamsResponse>>({ + url: `v1/task/start/${params.id}`, + method: 'get', + data: params + }) +} + +export interface SendProcessParamsParams { + procedureId: number +} +export function sendProcessParams(params: SendProcessParamsParams) { + return request<BaseResponse>({ + url: `v1/task/sendProcessParams`, + method: 'post', + data: params + }) +} -- Gitblit v1.8.0