From 8c84c7277018b259f5b99f26cbfd14603bc4e4c0 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 01 十一月 2023 19:39:53 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/bulletin-board-style1 into dev --- src/api/index.ts | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 708b8b2..c8e30e9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,6 +1,7 @@ import { request } from '@/common/utils' import type { CraftParamsResponse, TasksGroupByChannel } from './task' import type { PLCResponse } from './plc' +import type { Devices } from './device' export interface BaseResponse<T = any> { code: number @@ -66,6 +67,11 @@ export interface SendProcessParamsParams { procedureId: number } + +/** + * 涓嬪彂宸ヨ壓鍙傛暟 + * @param params + */ export function sendProcessParams(params: SendProcessParamsParams) { return request<BaseResponse>({ url: `v1/task/sendProcessParams`, @@ -73,3 +79,29 @@ data: params }) } + +export interface FinishTaskParams { + id: number +} + +/** + * 缁撴潫浠诲姟 + * @param params + */ +export function finishTask(params: FinishTaskParams) { + return request<BaseResponse>({ + url: `v1/task/finish/${params.id}`, + method: 'put', + data: params + }) +} + +/** + * 鑾峰彇褰撳墠闈㈡澘缁戝畾鐨勮澶囧垪琛� + */ +export function getDeviceList() { + return request<BaseResponse<Devices>>({ + url: `/v1/device/list`, + method: 'get' + }) +} -- Gitblit v1.8.0