|
@@ -84,12 +84,27 @@
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<div style="float: right">
|
|
<div style="float: right">
|
|
- <el-switch
|
|
|
|
- style="margin-left: 10px;"
|
|
|
|
- v-model="value"
|
|
|
|
- size="large"
|
|
|
|
- inactive-text="算法容器"
|
|
|
|
- />
|
|
|
|
|
|
+<!-- <el-switch-->
|
|
|
|
+<!-- style="margin-left: 10px;"-->
|
|
|
|
+<!-- v-model="value"-->
|
|
|
|
+<!-- size="large"-->
|
|
|
|
+<!-- inactive-text="算法容器"-->
|
|
|
|
+<!-- />-->
|
|
|
|
+ <span class="el-form-item__label" style="font-size: 14px;">算法镜像选择:</span>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="selectImageName"
|
|
|
|
+ placeholder="Select image"
|
|
|
|
+ size="default"
|
|
|
|
+ @click.native="getDockerImages('pji_nav')"
|
|
|
|
+ style="width: 180px; "
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in imageNames"
|
|
|
|
+ :key="item"
|
|
|
|
+ :label="item"
|
|
|
|
+ :value="item"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
<el-button type="primary" @click="algorithmDialogVisible = true" style="margin-left: 10px;">算法镜像导入</el-button>
|
|
<el-button type="primary" @click="algorithmDialogVisible = true" style="margin-left: 10px;">算法镜像导入</el-button>
|
|
<el-dialog
|
|
<el-dialog
|
|
v-model="algorithmDialogVisible"
|
|
v-model="algorithmDialogVisible"
|
|
@@ -101,17 +116,18 @@
|
|
<template #footer>
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
<el-form :model="algorithmForm" label-width="auto">
|
|
<el-form :model="algorithmForm" label-width="auto">
|
|
- <el-form-item style="margin-bottom: 10px" label="算法版本:">
|
|
|
|
|
|
+ <el-form-item style="margin-bottom: 10px" label="算法版本:" required>
|
|
<el-input v-model="algorithmForm.tag"/>
|
|
<el-input v-model="algorithmForm.tag"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- -->
|
|
<!-- -->
|
|
<!-- <el-button @click="algorithmDialogVisible = false">取消</el-button>-->
|
|
<!-- <el-button @click="algorithmDialogVisible = false">取消</el-button>-->
|
|
- <el-button type="primary" @click="algorithmImport">选择镜像文件</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="algorithmImport" :disabled="algorithmForm.tag == ''">选择镜像文件</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-button style="margin-left: 10px;" type="primary" @click="algorithmImport">算法镜像选择</el-button>
|
|
|
|
|
|
+<!-- <el-button style="margin-left: 10px;" type="primary" @click="getDockerImages('pji_nav')">算法镜像选择</el-button>-->
|
|
|
|
+
|
|
|
|
|
|
<!-- <el-switch-->
|
|
<!-- <el-switch-->
|
|
<!-- v-model="algorithmContainerState"-->
|
|
<!-- v-model="algorithmContainerState"-->
|
|
@@ -225,7 +241,6 @@ import {useRouter} from 'vue-router'; // 导入 Vue Router 的 useRouter 钩子
|
|
import { genFileId } from 'element-plus'
|
|
import { genFileId } from 'element-plus'
|
|
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
|
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
|
|
|
|
|
-
|
|
|
|
const value
|
|
const value
|
|
= ref(true)
|
|
= ref(true)
|
|
const update_active = ref(0)
|
|
const update_active = ref(0)
|
|
@@ -244,6 +259,8 @@ const worldDialogVisible = ref(false)
|
|
const upload = ref<UploadInstance>()
|
|
const upload = ref<UploadInstance>()
|
|
const uploadUrl = ref<string>()
|
|
const uploadUrl = ref<string>()
|
|
|
|
|
|
|
|
+const selectImageName = ref("")
|
|
|
|
+const imageNames = ref([])
|
|
|
|
|
|
const handleClose = (done: () => void) => {
|
|
const handleClose = (done: () => void) => {
|
|
done()
|
|
done()
|
|
@@ -295,6 +312,19 @@ const uploadSuccess = (response, file, fileList) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const getDockerImages = (filter_prefix) => {
|
|
|
|
+ axios.get('http://localhost:2375/v1.43/images/json').then(function (response) {
|
|
|
|
+ // console.log(response.data);
|
|
|
|
+ var images = response.data
|
|
|
|
+ .filter(d => d["RepoTags"].length > 0)
|
|
|
|
+ .map(d => d["RepoTags"][0])
|
|
|
|
+ .filter(d => d.startsWith(filter_prefix))
|
|
|
|
+ // console.log("images", images)
|
|
|
|
+ imageNames.value = images
|
|
|
|
+ }).catch(function (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ });
|
|
|
|
+}
|
|
const multipleSelection = ref<[]>([])
|
|
const multipleSelection = ref<[]>([])
|
|
|
|
|
|
// do not use same name with ref
|
|
// do not use same name with ref
|
|
@@ -407,7 +437,7 @@ const updateMap = async () => {
|
|
|
|
|
|
// 根据id下载地图更新需要的数据(压缩包)
|
|
// 根据id下载地图更新需要的数据(压缩包)
|
|
const id = ids[0]
|
|
const id = ids[0]
|
|
- const url = "http://127.0.0.1:8888/map/downloadmapzipfile?id=" + id
|
|
|
|
|
|
+ const url = "http://127.0.0.1:8888/map/download/zipfile?id=" + id
|
|
const fileName = "data-" + id + ".zip"
|
|
const fileName = "data-" + id + ".zip"
|
|
const savePath = "/home/cicv/work/pji_desktop/tmp_download/map_zip"
|
|
const savePath = "/home/cicv/work/pji_desktop/tmp_download/map_zip"
|
|
|
|
|
|
@@ -428,7 +458,7 @@ const updateMap = async () => {
|
|
|
|
|
|
const checkMapbufConsistency = async (ids) => {
|
|
const checkMapbufConsistency = async (ids) => {
|
|
try {
|
|
try {
|
|
- const response = await axios.post('http://127.0.0.1:8888/map/checkmapbufconsistency', ids)
|
|
|
|
|
|
+ const response = await axios.post('http://127.0.0.1:8888/map/check/mapbufconsistency', ids)
|
|
console.log(response.data)
|
|
console.log(response.data)
|
|
return response.data.status
|
|
return response.data.status
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -484,14 +514,14 @@ const rviz = () => {
|
|
const generateWorld = async (row) => {
|
|
const generateWorld = async (row) => {
|
|
const id = row.id
|
|
const id = row.id
|
|
const equipmentNo = row.equipmentNo
|
|
const equipmentNo = row.equipmentNo
|
|
- const sceneNo = "scene-" + id
|
|
|
|
- const url = "http://127.0.0.1:8888/map/downloadmapbagfile?id=" + id
|
|
|
|
|
|
+ const sceneNo = id
|
|
|
|
+ const url = "http://127.0.0.1:8888/map/download/mapbagfile?id=" + id
|
|
const fileName = "map-" + id + ".bag"
|
|
const fileName = "map-" + id + ".bag"
|
|
const savePath = "/home/cicv/work/pji_desktop/tmp_download/map_bag"
|
|
const savePath = "/home/cicv/work/pji_desktop/tmp_download/map_bag"
|
|
console.log("id", id)
|
|
console.log("id", id)
|
|
|
|
|
|
// 拼接world文件上传url
|
|
// 拼接world文件上传url
|
|
- uploadUrl.value = "http://127.0.0.1:8888/world/uploadworldfile?equipmentNo=" + equipmentNo + "&sceneNo=" + sceneNo
|
|
|
|
|
|
+ uploadUrl.value = "http://127.0.0.1:8888/world/upload/worldfile?equipmentNo=" + equipmentNo + "&sceneNo=" + sceneNo
|
|
console.log("uploadUrl.value=" + uploadUrl.value)
|
|
console.log("uploadUrl.value=" + uploadUrl.value)
|
|
|
|
|
|
console.log("Starting download: map.bag...")
|
|
console.log("Starting download: map.bag...")
|