|
@@ -157,36 +157,36 @@ let formItem = reactive({
|
|
trainDataEnhancement: {
|
|
trainDataEnhancement: {
|
|
algorithmId: null,
|
|
algorithmId: null,
|
|
modelId: null,
|
|
modelId: null,
|
|
- params: {}
|
|
|
|
|
|
+ params: []
|
|
},
|
|
},
|
|
trainDataExpansion: {
|
|
trainDataExpansion: {
|
|
algorithmId: null,
|
|
algorithmId: null,
|
|
modelId: null,
|
|
modelId: null,
|
|
- params: {}
|
|
|
|
|
|
+ params: []
|
|
},
|
|
},
|
|
train: [{}],
|
|
train: [{}],
|
|
testDataSelect: [] as any[],
|
|
testDataSelect: [] as any[],
|
|
testDataEnhancement: {
|
|
testDataEnhancement: {
|
|
algorithmId: null,
|
|
algorithmId: null,
|
|
modelId: null,
|
|
modelId: null,
|
|
- params: {}
|
|
|
|
|
|
+ params: []
|
|
},
|
|
},
|
|
testDataExpansion: {
|
|
testDataExpansion: {
|
|
algorithmId: null,
|
|
algorithmId: null,
|
|
modelId: null,
|
|
modelId: null,
|
|
- params: {}
|
|
|
|
|
|
+ params: []
|
|
},
|
|
},
|
|
test: [{}],
|
|
test: [{}],
|
|
reasoningDataSelect: [] as any[],
|
|
reasoningDataSelect: [] as any[],
|
|
reasoningDataEnhancement: {
|
|
reasoningDataEnhancement: {
|
|
algorithmId: null,
|
|
algorithmId: null,
|
|
modelId: null,
|
|
modelId: null,
|
|
- params: {}
|
|
|
|
|
|
+ params: []
|
|
},
|
|
},
|
|
reasoningDataExpansion: {
|
|
reasoningDataExpansion: {
|
|
algorithmId: null,
|
|
algorithmId: null,
|
|
modelId: null,
|
|
modelId: null,
|
|
- params: {}
|
|
|
|
|
|
+ params: []
|
|
},
|
|
},
|
|
reasoning: [{}]
|
|
reasoning: [{}]
|
|
})
|
|
})
|
|
@@ -571,7 +571,7 @@ let items = reactive<ProForm.ItemsOptions[]>([
|
|
}
|
|
}
|
|
})
|
|
})
|
|
formItem.train[0]['modelId'] = val
|
|
formItem.train[0]['modelId'] = val
|
|
- formItem.train[0]['params'] = {}
|
|
|
|
|
|
+ formItem.train[0]['params'] = params
|
|
// (参数信息,第几页,数组名称)
|
|
// (参数信息,第几页,数组名称)
|
|
addForm(params, 5, 'train[0]', 0)
|
|
addForm(params, 5, 'train[0]', 0)
|
|
}
|
|
}
|
|
@@ -614,7 +614,11 @@ let items = reactive<ProForm.ItemsOptions[]>([
|
|
valueKey: 'id',
|
|
valueKey: 'id',
|
|
enum: null,
|
|
enum: null,
|
|
onChange: val => {
|
|
onChange: val => {
|
|
- getAgloParams(4, 'testDataEnhancement', 7, val, 0)
|
|
|
|
|
|
+ if (val === 1) {
|
|
|
|
+ return
|
|
|
|
+ } else {
|
|
|
|
+ getAgloParams(4, 'testDataEnhancement', 7, val, 0)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -652,7 +656,11 @@ let items = reactive<ProForm.ItemsOptions[]>([
|
|
valueKey: 'id',
|
|
valueKey: 'id',
|
|
enum: null,
|
|
enum: null,
|
|
onChange: val => {
|
|
onChange: val => {
|
|
- getAgloParams(5, 'testDataExpansion', 8, val, 0)
|
|
|
|
|
|
+ if (val === 1) {
|
|
|
|
+ return
|
|
|
|
+ } else {
|
|
|
|
+ getAgloParams(5, 'testDataExpansion', 8, val, 0)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -702,7 +710,7 @@ let items = reactive<ProForm.ItemsOptions[]>([
|
|
}
|
|
}
|
|
})
|
|
})
|
|
formItem.test[0]['modelId'] = val
|
|
formItem.test[0]['modelId'] = val
|
|
- formItem.test[0]['params'] = {}
|
|
|
|
|
|
+ formItem.test[0]['params'] = params
|
|
// (参数信息,第几页,数组名称)
|
|
// (参数信息,第几页,数组名称)
|
|
addForm(params, 9, 'test[0]', 0)
|
|
addForm(params, 9, 'test[0]', 0)
|
|
}
|
|
}
|
|
@@ -745,7 +753,11 @@ let items = reactive<ProForm.ItemsOptions[]>([
|
|
valueKey: 'id',
|
|
valueKey: 'id',
|
|
enum: null,
|
|
enum: null,
|
|
onChange: val => {
|
|
onChange: val => {
|
|
- getAgloParams(4, 'reasoningDataEnhancement', 11, val, 0)
|
|
|
|
|
|
+ if (val === 1) {
|
|
|
|
+ return
|
|
|
|
+ } else {
|
|
|
|
+ getAgloParams(4, 'reasoningDataEnhancement', 11, val, 0)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -783,7 +795,11 @@ let items = reactive<ProForm.ItemsOptions[]>([
|
|
valueKey: 'id',
|
|
valueKey: 'id',
|
|
enum: null,
|
|
enum: null,
|
|
onChange: val => {
|
|
onChange: val => {
|
|
- getAgloParams(5, 'reasoningDataExpansion', 12, val, 0)
|
|
|
|
|
|
+ if (val === 1) {
|
|
|
|
+ return
|
|
|
|
+ } else {
|
|
|
|
+ getAgloParams(5, 'reasoningDataExpansion', 12, val, 0)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -832,7 +848,7 @@ let items = reactive<ProForm.ItemsOptions[]>([
|
|
}
|
|
}
|
|
})
|
|
})
|
|
formItem.reasoning[0]['modelId'] = val
|
|
formItem.reasoning[0]['modelId'] = val
|
|
- formItem.reasoning[0]['params'] = {}
|
|
|
|
|
|
+ formItem.reasoning[0]['params'] = params
|
|
// (参数信息,第几页,数组名称)
|
|
// (参数信息,第几页,数组名称)
|
|
addForm(params, 13, 'reasoning[0]', 0)
|
|
addForm(params, 13, 'reasoning[0]', 0)
|
|
}
|
|
}
|
|
@@ -936,7 +952,7 @@ const onAdd = pageNum => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
formItem[`${arrayName}`][`${agloIndex}`]['modelId'] = modelId
|
|
formItem[`${arrayName}`][`${agloIndex}`]['modelId'] = modelId
|
|
- formItem[`${arrayName}`][`${agloIndex}`]['params'] = {}
|
|
|
|
|
|
+ formItem[`${arrayName}`][`${agloIndex}`]['params'] = params
|
|
addForm(params, pageNum, `${arrayName}[${agloIndex}]`, agloIndex)
|
|
addForm(params, pageNum, `${arrayName}[${agloIndex}]`, agloIndex)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -1006,6 +1022,7 @@ const addForm = (params, index, arrayName, paramsIndex) => {
|
|
prop: `${arrayName}${item.name}${paramsIndex}`,
|
|
prop: `${arrayName}${item.name}${paramsIndex}`,
|
|
span: 12,
|
|
span: 12,
|
|
rules: [{ required: item.required, pattern: item.validate }],
|
|
rules: [{ required: item.required, pattern: item.validate }],
|
|
|
|
+
|
|
show: () => {
|
|
show: () => {
|
|
return pageIndex.value === index ? true : false
|
|
return pageIndex.value === index ? true : false
|
|
},
|
|
},
|
|
@@ -1019,10 +1036,15 @@ const addForm = (params, index, arrayName, paramsIndex) => {
|
|
// 截取数组和下标
|
|
// 截取数组和下标
|
|
let array = arrayName.slice(0, -3)
|
|
let array = arrayName.slice(0, -3)
|
|
let index = arrayName.slice(-2, -1)
|
|
let index = arrayName.slice(-2, -1)
|
|
- console.log(`formItem[${array}][${index}]['params'][${label}]`)
|
|
|
|
- formItem[`${array}`][`${index}`]['params'][`${label}`] = val1
|
|
|
|
|
|
+ const item = formItem[`${array}`][`${index}`]['params'].find(item => item.name === label)
|
|
|
|
+ if (item) {
|
|
|
|
+ item.value = val1
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- formItem[`${arrayName}`]['params'][`${label}`] = val1
|
|
|
|
|
|
+ const item1 = formItem[`${arrayName}`]['params'].find(item1 => item1.name === label)
|
|
|
|
+ if (item1) {
|
|
|
|
+ item1.value = val1
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1034,6 +1056,12 @@ const agloChange = (propName, agloId) => {
|
|
if (Column) {
|
|
if (Column) {
|
|
getModelApi(agloId).then(res => {
|
|
getModelApi(agloId).then(res => {
|
|
Column.compOptions.enum = res.data as any[]
|
|
Column.compOptions.enum = res.data as any[]
|
|
|
|
+ // Column.compOptions.enum.unshift({
|
|
|
|
+ // algorithmId: null,
|
|
|
|
+ // id: 1,
|
|
|
|
+ // modelAddress: null,
|
|
|
|
+ // modelName: '基于训练生成的模型'
|
|
|
|
+ // })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1058,6 +1086,7 @@ const getAgloParams = (agloType, agloTypeName, page, modelId, paramIndex) => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
formItem[agloTypeName].modelId = modelId
|
|
formItem[agloTypeName].modelId = modelId
|
|
|
|
+ formItem[agloTypeName].params = params
|
|
// (参数信息,第几页,数组名称)
|
|
// (参数信息,第几页,数组名称)
|
|
addForm(params, page, agloTypeName, paramIndex)
|
|
addForm(params, page, agloTypeName, paramIndex)
|
|
}
|
|
}
|