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