dongyukun
2025-04-16 b451bcdf065ddfdd5c46dce49e19707870cb4fa6
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,
@@ -17,7 +18,10 @@
    predictphase: string,
    workchecked: number,
    unittransfactor: string,
    saveindex: string
    saveindex: string,
    iscumulant: number,
    cumuldivisor: number,
    cumulpoint: string
  },
  dmModuleItem: {
    id: string,
@@ -145,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
}