完成“编辑模型配置”功能开发

This commit is contained in:
CGD
2025-04-08 10:53:59 +08:00
parent 024468adbd
commit 710b338e6d
4 changed files with 47 additions and 12 deletions
+19 -1
View File
@@ -159,5 +159,23 @@ export default {
})
}).send()
},
// 更新模型配置
updateModel(params, callback) {
const { modelType, provideCode, id, formData } = params;
RequestService.sendRequest()
.url(`${getServiceUrl()}/models/${modelType}/${provideCode}/${id}`)
.method('PUT')
.data(formData)
.success((res) => {
RequestService.clearRequestTime();
callback(res);
})
.fail((err) => {
console.error('更新模型失败:', err);
this.$message.error(err.msg || '更新模型失败');
RequestService.reAjaxFun(() => {
this.updateModel(params, callback);
});
}).send();
},
}