From 2d4577f9997ce981ebd548ff6986f6839ba14429 Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周二, 06 5月 2025 13:33:55 +0800
Subject: [PATCH] 添加基础表
---
HIAWms/web/src/components/Table/api.ts | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/HIAWms/web/src/components/Table/api.ts b/HIAWms/web/src/components/Table/api.ts
new file mode 100644
index 0000000..f44fea4
--- /dev/null
+++ b/HIAWms/web/src/components/Table/api.ts
@@ -0,0 +1,27 @@
+import sdk from 'sdk'
+const { request } = sdk.utils
+
+export const getListData = (params = {}, url: string) => {
+ const query = new URLSearchParams(params).toString()
+ const str = query ? `?${query}` : ''
+ return request.get(url + str)
+}
+
+/**
+ * 鎺掑簭妯$増鎺掑簭
+ * @param body
+ * @param urlTpl /api/v1/processmanagement/worksection/{id}/adjustsort/{sort}
+ * @returns
+ */
+export const adjustSort = (
+ body: {
+ id: string
+ sort: number
+ },
+ urlTpl: string
+) => {
+ const url = urlTpl
+ .replace('{id}', body.id)
+ .replace('{sort}', String(body.sort))
+ return request.put(url, body)
+}
--
Gitblit v1.9.3