From b9d0c0b5aa43658da4b66e4d66c9a9ede0b1fa08 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期五, 06 六月 2025 10:05:33 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/api/model/sche/model/index.ts | 75 +++++++++++++++++++++++++++++-------- 1 files changed, 59 insertions(+), 16 deletions(-) diff --git a/src/api/model/sche/model/index.ts b/src/api/model/sche/model/index.ts index 386850b..7a2609b 100644 --- a/src/api/model/sche/model/index.ts +++ b/src/api/model/sche/model/index.ts @@ -4,6 +4,8 @@ import * as PlanItemApi from '@/api/data/plan/item' import {CommonEnabled} from "@/utils/constants"; import {getItemList, ItemVO} from "@/api/data/plan/item"; +import * as ItemApi from '@/api/data/ind/item/item' +import {getPointSimpleList} from "@/api/data/da/point"; export interface ScheduleModelVO { id: string @@ -20,6 +22,7 @@ status: number, paramList: null, settingList: null + modelOut:null } export interface ModelParamVO { @@ -73,14 +76,15 @@ export const getModelParamList = async (id) => { const dataPointList = ref([] as DataPointApi.DaPointVO) - dataPointList.value = await DataPointApi.getPointList({}) + dataPointList.value = await DataPointApi.getPointSimpleList({}) const pointList = [] if (dataPointList.value) { dataPointList.value.forEach(item => { pointList.push( { id: item.id, - name: item.pointName + name: item.pointName, + itemNo : item.pointNo } ) }) @@ -88,13 +92,37 @@ const predictItemList = ref([] as PredictItemApi.MmPredictItemVO) predictItemList.value = await PredictItemApi.getMmPredictItemList({ - status: CommonEnabled.ENABLE, - itemtypename: 'NormalItem' + status: CommonEnabled.ENABLE }) - const normalItemList = [] - if (predictItemList.value) { + predictItemList.value = predictItemList.value.filter(e => e.outPuts && e.outPuts.length > 0); + + const allPredictItemList = [] + const predictAllItemList = predictItemList.value; + if (predictAllItemList && predictAllItemList.length > 0) { // 过滤掉本身 - predictItemList.value.filter(e => e.id !== id).forEach(item => { + predictAllItemList.filter(e => e.id !== id).forEach(item => { + allPredictItemList.push( + { + value: item.id, + label: item.itemname, + predictlength: item.predictlength, + moduleid: item.moduleid, + children: item.outPuts?.map(e => { + return { + value: e.id, + label: e.resultName + } + }) + } + ) + }) + } + + const normalItemList = [] + const predictNormalItemList = predictItemList.value.filter(e => e.itemtypename === 'NormalItem'); + if (predictNormalItemList && predictNormalItemList.length > 0) { + // 过滤掉本身 + predictNormalItemList.filter(e => e.id !== id).forEach(item => { normalItemList.push( { value: item.id, @@ -121,26 +149,38 @@ planList.push( { id: item.id, - name: item.itemName + name: item.itemName, + itemNo: item.itemNo } ) }) } - - predictItemList.value = await PredictItemApi.getMmPredictItemList({ - status: CommonEnabled.ENABLE, - itemtypename: 'MergeItem' - }) + const predictMergeItemList = predictItemList.value.filter(e => e.itemtypename === 'MergeItem'); 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 } + ) + }) + } + + // 指标数据 + const indItemList = await ItemApi.getItemList({}) + const indList = [] + if (indItemList) { + indItemList.forEach(item => { + indList.push( + { + id: item.id, + name: item.itemName, + itemNo: item.itemNo + } ) }) } @@ -149,6 +189,9 @@ 'DATAPOINT':pointList, 'NormalItem': normalItemList, 'MergeItem': mergeItemList, + 'allPredictItemList': allPredictItemList, 'PLAN': planList, + 'IND': indList, + 'IND_ASCII': indList, } } -- Gitblit v1.9.3