From 9bde1998a8a0bc6c1ab314f8cf27c10aef016689 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期一, 30 十月 2023 20:30:09 +0800
Subject: [PATCH] feat: 通道展示组件添加查看更多逻辑;任务选中展示;添加加工信息组件

---
 src/api/index.ts |   39 +++++++++++++++++++++++++++++++--------
 1 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/src/api/index.ts b/src/api/index.ts
index 1c5ab52..1517ce2 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -1,5 +1,6 @@
 import { request } from '@/common/utils'
-import type { TasksResponse } from './task'
+import type { TasksGroupByChannel } from './task'
+import type { PLCResponse } from './plc'
 
 export interface BaseResponse<T = any> {
   code: number
@@ -7,16 +8,38 @@
   msg: string
 }
 
+export interface TaskListParams {
+  /** 1鏈畬鎴�2浠婂ぉ鏈畬鎴�3宸插畬鎴� */
+  type: 1 | 2 | 3
+  /** 閫氶亾鍙� 涓嶄紶鏌ユ墍鏈夐�氶亾鐨� */
+  channel?: number
+  /** 浠庣鍑犱釜寮�濮嬫煡锛屼粠0寮�濮� */
+  offset: number
+  /** 鏌ュ灏戞潯 */
+  limit: number
+}
+
 /**
  * 鑾峰彇浠诲姟鍒楄〃
- * @param taskMode 1: 寰呯敓浜х殑浠诲姟 2: 鐪嬫澘鍚勯�氶亾褰撳墠灞曠ず鐨勪换鍔�
+ * @param params
  */
-export function getTaskList(taskMode: 1 | 2) {
-  return request<BaseResponse<TasksResponse>>({
-    url: '/v1/task/get',
+export function getTaskList(params: TaskListParams) {
+  return request<BaseResponse<TasksGroupByChannel>>({
+    url: '/v1/task/list',
     method: 'get',
-    params: {
-      taskMode
-    }
+    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