From 6735472129b9814ca45c5756c6c720cf24d17948 Mon Sep 17 00:00:00 2001
From: houzhongjian <houzhongyi@126.com>
Date: 星期三, 06 十一月 2024 14:10:35 +0800
Subject: [PATCH] 将摄像头模块名dev修改为video

---
 src/api/model/sche/model/index.ts |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 50 insertions(+), 6 deletions(-)

diff --git a/src/api/model/sche/model/index.ts b/src/api/model/sche/model/index.ts
index 4a557dd..b0bf106 100644
--- a/src/api/model/sche/model/index.ts
+++ b/src/api/model/sche/model/index.ts
@@ -1,4 +1,7 @@
 import request from '@/config/axios'
+import * as DataPointApi from '@/api/data/da/point'
+import * as PredictItemApi from '@/api/model/pre/predict'
+import {CommonEnabled} from "@/utils/constants";
 
 export interface ScheduleModelVO {
   id: string
@@ -25,6 +28,10 @@
   datalength: number
 }
 
+export interface WorkPrecessParamVO {
+  processType: string
+}
+
 export interface ScheduleModelPageReqVO extends PageParam {
   modelCode?: string
   modelName?: string
@@ -37,12 +44,12 @@
 
 // 查询ScheduleModel详情
 export const getScheduleModel = (id: number) => {
-  return request.get({ url: `/model/sche/model/info/${id}`})
+  return request.get({ url: '/model/sche/model/get?id=' + id})
 }
 
 // 新增ScheduleModel
 export const createScheduleModel = (data: ScheduleModelVO) => {
-  return request.post({ url: '/model/sche/model/add', data })
+  return request.post({ url: '/model/sche/model/create', data })
 }
 
 // 修改ScheduleModel
@@ -55,9 +62,46 @@
   return request.delete({ url: '/model/sche/model/delete?id=' + id })
 }
 
-// 查询模型参数列表
-export const getModelParamList = () => {
-  let modelparamListMap = []
+// 查询ScheduleModel列表
+export const getScheduleModelList = () => {
+  return request.get({ url: '/model/sche/model/list'})
+}
 
-  return modelparamListMap
+// 查询模型参数列表
+export const getModelParamList = async () => {
+
+  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
+        }
+      )
+    })
+  }
+
+  const predictItemList = ref([] as PredictItemApi.MmPredictItemVO)
+  predictItemList.value = await PredictItemApi.getMmPredictItemList({
+    status: CommonEnabled.ENABLE,
+    itemtypename: 'NormalItem'
+  })
+  const itemList = []
+  if (predictItemList.value) {
+    predictItemList.value.forEach(item => {
+      itemList.push(
+        {
+          id: item.id,
+          name:  item.itemname
+        }
+      )
+    })
+  }
+  return {
+    'DATAPOINT':pointList,
+    'PREDICTITEM': itemList
+  }
 }

--
Gitblit v1.9.3