From 65494b72a7272842a3c1c07fda8b2e1a9eefeac1 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 31 十月 2023 17:02:59 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/bulletin-board-style1 into wn

---
 src/api/index.ts |   46 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/src/api/index.ts b/src/api/index.ts
index 336ce12..1517ce2 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -1 +1,45 @@
-export {}
+import { request } from '@/common/utils'
+import type { TasksGroupByChannel } from './task'
+import type { PLCResponse } from './plc'
+
+export interface BaseResponse<T = any> {
+  code: number
+  data: T
+  msg: string
+}
+
+export interface TaskListParams {
+  /** 1鏈畬鎴�2浠婂ぉ鏈畬鎴�3宸插畬鎴� */
+  type: 1 | 2 | 3
+  /** 閫氶亾鍙� 涓嶄紶鏌ユ墍鏈夐�氶亾鐨� */
+  channel?: number
+  /** 浠庣鍑犱釜寮�濮嬫煡锛屼粠0寮�濮� */
+  offset: number
+  /** 鏌ュ灏戞潯 */
+  limit: number
+}
+
+/**
+ * 鑾峰彇浠诲姟鍒楄〃
+ * @param params
+ */
+export function getTaskList(params: TaskListParams) {
+  return request<BaseResponse<TasksGroupByChannel>>({
+    url: '/v1/task/list',
+    method: 'get',
+    params
+  })
+}
+
+export interface ProductProgressParams {
+  channel: number
+  procedureId: number
+}
+
+export function getProductProgress(params: ProductProgressParams) {
+  return request<BaseResponse<PLCResponse>>({
+    url: '/v1/plc/productProgress',
+    method: 'post',
+    data: params
+  })
+}

--
Gitblit v1.8.0