添加模型部署

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,7 +29,7 @@ export const addModel = (data: Object) => {
/** /**
* id删除模型 * id删除模型
* @param {id} id * @param {id} id
* @returns * @returns {*}
*/ */
export function delModel(id: Object) { export function delModel(id: Object) {
return request({ return request({
@ -37,3 +37,15 @@ export function delModel(id:Object) {
method: 'delete' 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> </template>
<script> <script>
import { listModel, addModel, delModel } from '@/api/workflow/model'; import { listModel, addModel, delModel, modelDeploy } from '@/api/workflow/model';
import design from './design'; import design from './design';
export default { export default {
name: 'Model', // name name: 'Model', // name
@ -141,6 +141,9 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams = {}
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.handleQuery(); this.handleQuery();
}, },
// //
@ -182,7 +185,7 @@ export default {
.confirm('是否部署模型key为【' + key + '】流程?') .confirm('是否部署模型key为【' + key + '】流程?')
.then(() => { .then(() => {
this.loading = true; this.loading = true;
return deploy(id); return modelDeploy(id);
}) })
.then(() => { .then(() => {
this.loading = false; this.loading = false;
@ -235,7 +238,7 @@ export default {
}, },
// //
clickExportZip(data) { 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);
} }
} }
}; };