|
|
@@ -61,7 +61,7 @@
|
|
|
<div v-else>
|
|
|
<el-button type="text" style="color: gray">暂未成功训练</el-button>
|
|
|
</div>
|
|
|
- <el-button type="text" @click="handleShare(scope.$index, scope.row)">部署</el-button>
|
|
|
+ <el-button type="text" @click="handleDeploy(scope.row.id)">部署</el-button>
|
|
|
<el-button type="text" class="yellow" @click="handleShare(scope.$index, scope.row)">分享</el-button>
|
|
|
<el-button type="text" class="red" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
@@ -130,6 +130,25 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog
|
|
|
+ v-model="deployVisible"
|
|
|
+ title="新建部署"
|
|
|
+ width="30%"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <el-form width="300px">
|
|
|
+ <el-form-item label="部署" required>
|
|
|
+ <el-input v-model="deployName"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="deployVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="goDeploy()" style="margin-left: 10px"> 部署 </el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
@@ -137,7 +156,7 @@
|
|
|
<script>
|
|
|
import { ref, reactive } from "vue";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
-import {getAllModel, getOneModel, train} from "../../api/model";
|
|
|
+import {addDeployment, getAllModel, getOneModel, train} from "../../api/model";
|
|
|
import {use} from "../../api/prediction";
|
|
|
import {GetAllFile} from "../../api/file";
|
|
|
import {useRoute, useRouter} from "vue-router";
|
|
|
@@ -162,6 +181,9 @@ export default {
|
|
|
const fileList=ref();
|
|
|
const multipleSelection =ref([]);
|
|
|
const tableData = ref();
|
|
|
+ let deployVisible = ref(false)
|
|
|
+ let deployName = ref()
|
|
|
+ let deployModel = ref()
|
|
|
|
|
|
const pageTotal = ref(0);
|
|
|
let pipelineVisible = ref(false)
|
|
|
@@ -321,6 +343,27 @@ export default {
|
|
|
ElMessageBox.confirm(str)
|
|
|
}
|
|
|
|
|
|
+ const handleDeploy = (id) => {
|
|
|
+ deployVisible.value = true
|
|
|
+ deployModel.value = id
|
|
|
+ }
|
|
|
+
|
|
|
+ const goDeploy = () =>{
|
|
|
+ const payload = {
|
|
|
+ userId: localStorage.getItem("ms_userId"),
|
|
|
+ modelId: deployModel.value,
|
|
|
+ deploymentName: deployName.value
|
|
|
+ }
|
|
|
+ addDeployment(payload).then(res=>{
|
|
|
+ if (res.msg === '成功'){
|
|
|
+ ElMessage.success('开始部署!')
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ ElMessage.error('无法部署!')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
const usemodelId=ref();
|
|
|
//todo模型使用
|
|
|
const editUseModel = (id) => {
|
|
|
@@ -494,6 +537,11 @@ export default {
|
|
|
useform,
|
|
|
pipelineVisible,
|
|
|
pplForm,
|
|
|
+ deployVisible,
|
|
|
+ deployName,
|
|
|
+ deployModel,
|
|
|
+ handleDeploy,
|
|
|
+ goDeploy,
|
|
|
handlePipeline,
|
|
|
pipeline,
|
|
|
handlePreList,
|