From d584e0a9521eba2dc6f66b0590217bbc8dec23e7 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期二, 31 十二月 2024 18:44:38 +0800 Subject: [PATCH] 调度模型下发配置 --- src/api/model/sche/model/index.ts | 93 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 91 insertions(+), 2 deletions(-) diff --git a/src/api/model/sche/model/index.ts b/src/api/model/sche/model/index.ts index cece2cf..59807b1 100644 --- a/src/api/model/sche/model/index.ts +++ b/src/api/model/sche/model/index.ts @@ -1,4 +1,9 @@ import request from '@/config/axios' +import * as DataPointApi from '@/api/data/da/point' +import * as PredictItemApi from '@/api/model/pre/item' +import * as PlanItemApi from '@/api/data/plan/item' +import {CommonEnabled} from "@/utils/constants"; +import {getItemList, ItemVO} from "@/api/data/plan/item"; export interface ScheduleModelVO { id: string @@ -15,6 +20,7 @@ status: number, paramList: null, settingList: null + modelOut:null } export interface ModelParamVO { @@ -23,6 +29,10 @@ modelparamtype: string modelparamid: string datalength: number +} + +export interface WorkPrecessParamVO { + processType: string } export interface ScheduleModelPageReqVO extends PageParam { @@ -61,6 +71,85 @@ } // 查询模型参数列表 -export const getModelParamList = (modelparamListMap) => { - modelparamListMap['point'] = [] +export const getModelParamList = async (id) => { + + const dataPointList = ref([] as DataPointApi.DaPointVO) + dataPointList.value = await DataPointApi.getPointList({}) + const pointList = [] + if (dataPointList.value) { + dataPointList.value.forEach(item => { + pointList.push( + { + id: item.id, + name: item.pointName, + itemNo : item.pointNo + } + ) + }) + } + + const predictItemList = ref([] as PredictItemApi.MmPredictItemVO) + predictItemList.value = await PredictItemApi.getMmPredictItemList({ + status: CommonEnabled.ENABLE, + itemtypename: 'NormalItem' + }) + const normalItemList = [] + if (predictItemList.value) { + // 过滤掉本身 + predictItemList.value.filter(e => e.id !== id).forEach(item => { + normalItemList.push( + { + value: item.id, + label: item.itemname, + predictlength: item.predictlength, + children: item.outPuts?.map(e => { + return { + value: e.id, + label: e.resultName + } + }) + } + ) + }) + } + + const planItemList = ref([] as PlanItemApi.ItemVO) + planItemList.value = await PlanItemApi.getItemList({ + }) + const planList = [] + if (planItemList.value) { + planItemList.value.forEach(item => { + planList.push( + { + id: item.id, + name: item.itemName + } + ) + }) + } + + + predictItemList.value = await PredictItemApi.getMmPredictItemList({ + status: CommonEnabled.ENABLE, + itemtypename: 'MergeItem' + }) + const mergeItemList = [] + if (predictItemList.value) { + // 过滤掉本身 + predictItemList.value.filter(e => e.id !== id).forEach(item => { + mergeItemList.push( + { + id: item.id, + name: item.itemname + } + ) + }) + } + + return { + 'DATAPOINT':pointList, + 'NormalItem': normalItemList, + 'MergeItem': mergeItemList, + 'PLAN': planList, + } } -- Gitblit v1.9.3