From 0d21bc334ff8e175c6bd409f21b3ef8bbb7b2c87 Mon Sep 17 00:00:00 2001
From: dongyukun <1208714201@qq.com>
Date: 星期五, 08 十一月 2024 10:58:00 +0800
Subject: [PATCH] 查询时间秒位格式化 默认时间值格式化bug

---
 src/api/data/plan/item/index.ts |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/api/data/plan/item/index.ts b/src/api/data/plan/item/index.ts
index 897a453..e42e999 100644
--- a/src/api/data/plan/item/index.ts
+++ b/src/api/data/plan/item/index.ts
@@ -17,6 +17,12 @@
   itemCategory: string
 }
 
+export interface PlanChartReqVO {
+  itemNos?: [],
+  start?: Date,
+  end?: Date,
+}
+
 // 查询列表
 export const getItemPage = (params: PageParam) => {
   return request.get({ url: '/data/plan-item/page', params })
@@ -47,9 +53,12 @@
   return request.get({ url: '/data/plan-item/getList', params})
 }
 
-export const validateAsNumber = (rule, value, callback) => {
-  const regex = /^(\-|\+)?\d+(\.\d+)?$/;
-  if (!regex.test(value)) {
-    callback(new Error('请输入数字!'));
-  }
+// 查询Plan图表
+export const getPlanChart = (data: PlanChartReqVO) => {
+  return request.post({ url: '/data/api/query-plans/chart', data })
+}
+
+// 导出Plan值
+export const exportPlanValue = (data: PlanChartReqVO) => {
+  return request.post({ url: '/data/api/export-plan/history-value', data })
 }

--
Gitblit v1.9.3