提交 | 用户 | 时间
|
2f0aa4
|
1 |
import request from '@/config/axios' |
d3ee81
|
2 |
import * as DataPointApi from '@/api/data/da/point' |
潘 |
3 |
import * as PredictItemApi from '@/api/model/pre/predict' |
|
4 |
import {CommonEnabled} from "@/utils/constants"; |
2f0aa4
|
5 |
|
潘 |
6 |
export interface ScheduleModelVO { |
|
7 |
id: string |
|
8 |
modelCode: string |
|
9 |
modelName: string |
|
10 |
modelType: string |
|
11 |
className: string |
|
12 |
methodName: string |
|
13 |
portLength: number |
|
14 |
paramStructure: string |
|
15 |
modelPath: string |
|
16 |
resultStrId: string |
|
17 |
invocation: string |
|
18 |
status: number, |
|
19 |
paramList: null, |
|
20 |
settingList: null |
|
21 |
} |
|
22 |
|
|
23 |
export interface ModelParamVO { |
|
24 |
modelparamportorder: number |
|
25 |
modelparamorder: number |
|
26 |
modelparamtype: string |
|
27 |
modelparamid: string |
|
28 |
datalength: number |
|
29 |
} |
|
30 |
|
cd9f11
|
31 |
export interface WorkPrecessParamVO { |
L |
32 |
processType: string |
|
33 |
} |
|
34 |
|
2f0aa4
|
35 |
export interface ScheduleModelPageReqVO extends PageParam { |
潘 |
36 |
modelCode?: string |
|
37 |
modelName?: string |
|
38 |
} |
|
39 |
|
|
40 |
// 查询ScheduleModel列表 |
|
41 |
export const getScheduleModelPage = (params: ScheduleModelPageReqVO) => { |
|
42 |
return request.get({ url: '/model/sche/model/page', params }) |
|
43 |
} |
|
44 |
|
|
45 |
// 查询ScheduleModel详情 |
|
46 |
export const getScheduleModel = (id: number) => { |
6badb7
|
47 |
return request.get({ url: '/model/sche/model/get?id=' + id}) |
2f0aa4
|
48 |
} |
潘 |
49 |
|
|
50 |
// 新增ScheduleModel |
|
51 |
export const createScheduleModel = (data: ScheduleModelVO) => { |
6badb7
|
52 |
return request.post({ url: '/model/sche/model/create', data }) |
2f0aa4
|
53 |
} |
潘 |
54 |
|
|
55 |
// 修改ScheduleModel |
|
56 |
export const updateScheduleModel = (data: ScheduleModelVO) => { |
|
57 |
return request.put({ url: '/model/sche/model/update', data }) |
|
58 |
} |
|
59 |
|
|
60 |
// 删除ScheduleModel |
|
61 |
export const deleteScheduleModel = (id: number) => { |
|
62 |
return request.delete({ url: '/model/sche/model/delete?id=' + id }) |
|
63 |
} |
|
64 |
|
6badb7
|
65 |
// 查询ScheduleModel列表 |
潘 |
66 |
export const getScheduleModelList = () => { |
|
67 |
return request.get({ url: '/model/sche/model/list'}) |
|
68 |
} |
|
69 |
|
2f0aa4
|
70 |
// 查询模型参数列表 |
d3ee81
|
71 |
export const getModelParamList = async () => { |
cd9f11
|
72 |
|
d3ee81
|
73 |
const dataPointList = ref([] as DataPointApi.DaPointVO) |
潘 |
74 |
dataPointList.value = await DataPointApi.getPointList({}) |
|
75 |
const pointList = [] |
|
76 |
if (dataPointList.value) { |
|
77 |
dataPointList.value.forEach(item => { |
|
78 |
pointList.push( |
|
79 |
{ |
|
80 |
id: item.pointNo, |
|
81 |
name: item.pointName |
|
82 |
} |
|
83 |
) |
|
84 |
}) |
|
85 |
} |
|
86 |
|
|
87 |
const predictItemList = ref([] as PredictItemApi.MmPredictItemVO) |
|
88 |
predictItemList.value = await PredictItemApi.getMmPredictItemList({ |
|
89 |
status: CommonEnabled.ENABLE, |
|
90 |
itemtypename: 'NormalItem' |
|
91 |
}) |
|
92 |
const itemList = [] |
|
93 |
if (predictItemList.value) { |
|
94 |
predictItemList.value.forEach(item => { |
|
95 |
itemList.push( |
|
96 |
{ |
|
97 |
id: item.id, |
|
98 |
name: item.itemname |
|
99 |
} |
|
100 |
) |
|
101 |
}) |
|
102 |
} |
|
103 |
return { |
|
104 |
'DATAPOINT':pointList, |
|
105 |
'PREDICTITEM': itemList |
|
106 |
} |
cd9f11
|
107 |
} |