From 932c3ab49ea4e911fb2c2531c29d6609ac5afefd Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期四, 02 一月 2025 10:51:37 +0800
Subject: [PATCH] itemchart bug修复。 页面优化

---
 src/api/data/plan/item/index.ts |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/api/data/plan/item/index.ts b/src/api/data/plan/item/index.ts
index 897a453..0273cbd 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 })
@@ -44,12 +50,15 @@
 
 //获取下拉集合
 export const getItemList = (params: PageParam) => {
-  return request.get({ url: '/data/plan-item/getList', params})
+  return request.get({ url: '/data/plan-item/list', 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.downloadByPost({ url: '/data/api/export-plan/history-value', data })
 }

--
Gitblit v1.9.3