| | |
| | | } |
| | | |
| | | export const modelRun = (params) => { |
| | | return request.post({ url: '/model/mpk/api/run', data: params }) |
| | | return request.post({ url: '/model/mpk/api/test', data: params }) |
| | | } |
| | | |
| | | export const list = () => { |
| | |
| | | formData.datas[i] = '[[]]' |
| | | } |
| | | hasModel.value = mpk.modelMethods[0].model === 1 |
| | | |
| | | // 回显参数 |
| | | if (mpk.modelMethods[0].methodSettings && mpk.modelMethods[0].methodSettings.length > 0) { |
| | | formData.modelSettings = mpk.modelMethods[0].methodSettings.map(e => { |
| | | return { |
| | | settingKey: e.settingKey, |
| | | settingValue: e.value |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
| | | |
| | |
| | | } |
| | | const methodChange = function (value) { |
| | | formData.datas = [] |
| | | for (let i = 0 ; i < methodList.value.find(e => e.methodName === value)?.dataLength ; i++) { |
| | | var method = methodList.value.find(e => e.methodName === value); |
| | | for (let i = 0 ; i < method?.dataLength ; i++) { |
| | | formData.datas[i] = '[[]]' |
| | | } |
| | | hasModel.value = methodList.value.find(e => e.methodName === value)?.model === 1 |
| | | hasModel.value = method?.model === 1 |
| | | // 回显参数 |
| | | if (method.methodSettings && method.methodSettings.length > 0) { |
| | | formData.modelSettings = method.methodSettings.map(e => { |
| | | return { |
| | | settingKey: e.settingKey, |
| | | settingValue: e.value |
| | | } |
| | | }) |
| | | }else { |
| | | formData.modelSettings = [] |
| | | } |
| | | } |
| | | |
| | | const fileList = ref([]) // 文件列表 |
| | |
| | | for (let key in formData.value) { |
| | | infoRef[key] = formData.value[key]; |
| | | } |
| | | infoRef = undefined; |
| | | }else { |
| | | // 新增 |
| | | methodSettingsRef.push({...formData.value}) |