|
|
|
@ -6,6 +6,7 @@ import { DICT_TYPE, getDictOptions } from '@/utils/dict' |
|
|
|
import { getModelVersionList } from '@/api/alert/run/model/index' |
|
|
|
import { optionListApi, subSystemListApi } from '@/api/alert/model/select' |
|
|
|
import type { systemSelectParams } from '@/api/alert/model/model/optionsModel' |
|
|
|
import {setObjToUrlParams} from "@/utils"; |
|
|
|
|
|
|
|
export const columns: BasicColumn[] = [ |
|
|
|
{ |
|
|
|
@ -96,13 +97,15 @@ export const columns: BasicColumn[] = [ |
|
|
|
const optionList = await optionListApi() |
|
|
|
|
|
|
|
const systemOptions = ref<any>([]) |
|
|
|
systemOptions.value = optionList.systems |
|
|
|
// systemOptions.value = optionList.systems
|
|
|
|
export const searchFormSchema: FormSchema[] = [ |
|
|
|
{ |
|
|
|
label: '机组', |
|
|
|
field: 'unit', |
|
|
|
component: 'Select', |
|
|
|
defaultValue: optionList.units[0].id || null, |
|
|
|
// defaultValue: optionList.units[0].id || null,
|
|
|
|
defaultValue: null, |
|
|
|
|
|
|
|
colProps: { span: 4 }, |
|
|
|
|
|
|
|
componentProps: ({ schema, tableAction, formActionType, formModel }) => { |
|
|
|
@ -120,8 +123,13 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
unitId: e, |
|
|
|
typeId: formModel.type, |
|
|
|
} |
|
|
|
//如果typeId是空,则不设置system'Options
|
|
|
|
if (!param.typeId) { |
|
|
|
systemOptions.value = [] |
|
|
|
return |
|
|
|
} |
|
|
|
systemOptions.value = await subSystemListApi(param) |
|
|
|
formModel.system = systemOptions.value[0].id |
|
|
|
// formModel.system = systemOptions.value[0].id
|
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -130,7 +138,9 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
label: '系统', |
|
|
|
field: 'type', |
|
|
|
component: 'Select', |
|
|
|
defaultValue: optionList.types[0].id || null, |
|
|
|
// defaultValue: optionList.types[0].id || null,
|
|
|
|
defaultValue: null, |
|
|
|
|
|
|
|
colProps: { span: 4 }, |
|
|
|
componentProps: ({ formModel }) => { |
|
|
|
return { |
|
|
|
@ -146,6 +156,11 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
unitId: formModel.unit, |
|
|
|
typeId: e, |
|
|
|
} |
|
|
|
//如果typeId是空,则不设置system'Options
|
|
|
|
if (!param.typeId) { |
|
|
|
systemOptions.value = [] |
|
|
|
return |
|
|
|
} |
|
|
|
systemOptions.value = await subSystemListApi(param) |
|
|
|
}, |
|
|
|
} |
|
|
|
@ -155,7 +170,8 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
label: '子系统', |
|
|
|
field: 'system', |
|
|
|
component: 'Select', |
|
|
|
defaultValue: systemOptions.value[0].id || null, |
|
|
|
// defaultValue: systemOptions.value[0].id || null,
|
|
|
|
defaultValue: null, |
|
|
|
colProps: { span: 4 }, |
|
|
|
componentProps: () => { |
|
|
|
return { |
|
|
|
@ -170,10 +186,20 @@ export const searchFormSchema: FormSchema[] = [ |
|
|
|
label: '模型实例名称', |
|
|
|
field: 'mpName', |
|
|
|
component: 'Input', |
|
|
|
labelWidth: 120, |
|
|
|
labelWidth: 100, |
|
|
|
|
|
|
|
defaultValue: '', |
|
|
|
colProps: { span: 7 }, |
|
|
|
colProps: { span: 5 }, |
|
|
|
}, { |
|
|
|
label: '算法', |
|
|
|
field: 'algorithmId', |
|
|
|
component: 'Select', |
|
|
|
labelWidth: 40, |
|
|
|
componentProps: { |
|
|
|
options: [{ value: 1, label: "主成分分析(PCA)" }, { value: 2, label: "神经网络(ANN)" }], |
|
|
|
}, |
|
|
|
defaultValue: null, |
|
|
|
colProps: { span: 3 }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '状态1', |
|
|
|
|