From 23c8b8154fcf7c9251d07f028f3e14737ba4cecd Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期二, 31 十二月 2024 19:04:35 +0800 Subject: [PATCH] 调度模型下发配置 --- src/api/model/sche/model/index.ts | 48 +++++++++++++++++++++++++++++++++++++----------- 1 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/api/model/sche/model/index.ts b/src/api/model/sche/model/index.ts index 8863d31..0ac2b05 100644 --- a/src/api/model/sche/model/index.ts +++ b/src/api/model/sche/model/index.ts @@ -20,6 +20,7 @@ status: number, paramList: null, settingList: null + modelOut:null } export interface ModelParamVO { @@ -70,7 +71,7 @@ } // 查询模型参数列表 -export const getModelParamList = async () => { +export const getModelParamList = async (id) => { const dataPointList = ref([] as DataPointApi.DaPointVO) dataPointList.value = await DataPointApi.getPointList({}) @@ -80,7 +81,8 @@ pointList.push( { id: item.id, - name: item.pointName + name: item.pointName, + itemNo : item.pointNo } ) }) @@ -88,16 +90,25 @@ const predictItemList = ref([] as PredictItemApi.MmPredictItemVO) predictItemList.value = await PredictItemApi.getMmPredictItemList({ - status: CommonEnabled.ENABLE, - itemtypename: 'NormalItem' + status: CommonEnabled.ENABLE }) - const itemList = [] - if (predictItemList.value) { - predictItemList.value.forEach(item => { - itemList.push( + const normalItemList = [] + const predictNormalItemList = predictItemList.value.filter(e => e.itemtypename === 'NormalItem' && e.outPuts && e.outPuts.length > 0); + if (predictNormalItemList && predictNormalItemList.length > 0) { + // 过滤掉本身 + predictNormalItemList.filter(e => e.id !== id).forEach(item => { + normalItemList.push( { - id: item.id, - name: item.itemname + value: item.id, + label: item.itemname, + predictlength: item.predictlength, + moduleid: item.moduleid, + children: item.outPuts?.map(e => { + return { + value: e.id, + label: e.resultName + } + }) } ) }) @@ -118,9 +129,24 @@ }) } + const predictMergeItemList = predictItemList.value.filter(e => e.itemtypename === 'MergeItem' && e.outPuts && e.outPuts.length > 0); + const mergeItemList = [] + if (predictMergeItemList && predictMergeItemList.length > 0) { + // 过滤掉本身 + predictMergeItemList.filter(e => e.id !== id).forEach(item => { + mergeItemList.push( + { + id: item.outPuts[0].id, + name: item.itemname + } + ) + }) + } + return { 'DATAPOINT':pointList, - 'PREDICTITEM': itemList, + 'NormalItem': normalItemList, + 'MergeItem': mergeItemList, 'PLAN': planList, } } -- Gitblit v1.9.3