From 62c452107417690bc1f48fe55a4cc222e9900b13 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期四, 10 四月 2025 14:58:17 +0800
Subject: [PATCH] 数据分析 添加T+L(未调整) 自动调整配置

---
 src/api/model/pre/item/index.ts |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/api/model/pre/item/index.ts b/src/api/model/pre/item/index.ts
index 9a498ee..d6511d5 100644
--- a/src/api/model/pre/item/index.ts
+++ b/src/api/model/pre/item/index.ts
@@ -1,5 +1,6 @@
 import request from '@/config/axios'
 import {UploadRequestOptions} from "element-plus/es/components/upload/src/upload";
+import {CommonEnabled} from "@/utils/constants";
 
 export interface MmPredictItemVO {
   id: string,
@@ -148,3 +149,30 @@
 export const getViewCharts = (params) => {
   return request.get({ url: `/model/pre/item/view-charts`,params})
 }
+
+export const getNormalItemList = async () => {
+  const predictItemList = await getMmPredictItemList({
+    status: CommonEnabled.ENABLE,
+    itemtypename: 'NormalItem',
+  })
+  const normalItemList = []
+  const predictNormalItemList = predictItemList.filter(e => e.outPuts && e.outPuts.length > 0);
+  if (predictNormalItemList && predictNormalItemList.length > 0) {
+    // 过滤掉本身
+    predictNormalItemList.forEach(item => {
+      normalItemList.push(
+        {
+          value: item.id,
+          label: item.itemname,
+          children: item.outPuts?.map(e => {
+            return {
+              value: e.id,
+              label: e.resultName
+            }
+          })
+        }
+      )
+    })
+  }
+  return normalItemList
+}

--
Gitblit v1.9.3