From 291bf570b2106cb99b0e689af7d6ccaacc9e5c1c Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 25 十二月 2024 18:10:42 +0800
Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat-ui-vue3

---
 src/api/model/sche/model/index.ts |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/api/model/sche/model/index.ts b/src/api/model/sche/model/index.ts
index 386850b..d850247 100644
--- a/src/api/model/sche/model/index.ts
+++ b/src/api/model/sche/model/index.ts
@@ -88,13 +88,13 @@
 
   const predictItemList = ref([] as PredictItemApi.MmPredictItemVO)
   predictItemList.value = await PredictItemApi.getMmPredictItemList({
-    status: CommonEnabled.ENABLE,
-    itemtypename: 'NormalItem'
+    status: CommonEnabled.ENABLE
   })
   const normalItemList = []
-  if (predictItemList.value) {
+  const predictNormalItemList = predictItemList.value.filter(e => e.itemtypename === 'NormalItem' && e.outPuts && e.outPuts.length > 0);
+  if (predictNormalItemList && predictNormalItemList.length > 0) {
     // 过滤掉本身
-    predictItemList.value.filter(e => e.id !== id).forEach(item => {
+    predictNormalItemList.filter(e => e.id !== id).forEach(item => {
       normalItemList.push(
         {
           value: item.id,
@@ -127,18 +127,14 @@
     })
   }
 
-
-  predictItemList.value = await PredictItemApi.getMmPredictItemList({
-    status: CommonEnabled.ENABLE,
-    itemtypename: 'MergeItem'
-  })
+  const predictMergeItemList = predictItemList.value.filter(e => e.itemtypename === 'MergeItem' && e.outPuts && e.outPuts.length > 0);
   const mergeItemList = []
-  if (predictItemList.value) {
+  if (predictMergeItemList && predictMergeItemList.length > 0) {
     // 过滤掉本身
-    predictItemList.value.filter(e => e.id !== id).forEach(item => {
+    predictMergeItemList.filter(e => e.id !== id).forEach(item => {
       mergeItemList.push(
           {
-            id: item.id,
+            id: item.outPuts[0].id,
             name: item.itemname
           }
       )

--
Gitblit v1.9.3