From 5c2a12a0436d01b48439528864811777af9aae68 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 01 十一月 2023 15:28:27 +0800
Subject: [PATCH] 集群状态的组件开发 缺背景图
---
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