添加模型部署

This commit is contained in:
gssong 2023-06-04 18:06:38 +08:00
parent f0a304d6d7
commit d109253bd0
2 changed files with 21 additions and 6 deletions

View File

@ -29,11 +29,23 @@ export const addModel = (data: Object) => {
/**
* id删除模型
* @param {id} id
* @returns
* @returns {*}
*/
export function delModel(id:Object) {
export function delModel(id: Object) {
return request({
url: '/workflow/model/' + id,
method: 'delete'
})
}
/**
*
* @param {id} id
* @returns {*}
*/
export const modelDeploy = (id: String) => {
return request({
url: `/workflow/model/modelDeploy/${id}`,
method: 'post'
});
};

View File

@ -92,7 +92,7 @@
</template>
<script>
import { listModel, addModel, delModel } from '@/api/workflow/model';
import { listModel, addModel, delModel, modelDeploy } from '@/api/workflow/model';
import design from './design';
export default {
name: 'Model', // name
@ -141,6 +141,9 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {}
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.handleQuery();
},
//
@ -182,7 +185,7 @@ export default {
.confirm('是否部署模型key为【' + key + '】流程?')
.then(() => {
this.loading = true;
return deploy(id);
return modelDeploy(id);
})
.then(() => {
this.loading = false;
@ -235,7 +238,7 @@ export default {
},
//
clickExportZip(data) {
this.$download.zip('/workflow/model/export/zip/' + data.id, data.name + '-' + data.key + '-' + data.category);
this.$download.zip('/workflow/model/export/zip/' + data.id, data.name + '-' + data.key);
}
}
};