|
@@ -36,35 +36,67 @@
|
|
|
<el-button type="danger" @click="onSubmit">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-button type="primary" @click="onSubmit">算法镜像导入</el-button>
|
|
|
- <el-button style="margin-left: 100px;" type="primary" @click="onSubmit">选择算法镜像版本</el-button>
|
|
|
+ <el-button type="primary" @click="algorithmImport">地图更新</el-button>
|
|
|
+ <el-button type="primary" @click="algorithmImport">地图更新统计</el-button>
|
|
|
+ <el-button type="primary" @click="algorithmImport">地图续扫提醒阈值</el-button>
|
|
|
+ <el-button type="primary" @click="algorithmImport">地图续扫提醒</el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisible = true">算法镜像导入</el-button>
|
|
|
+ <el-dialog
|
|
|
+ v-model="dialogVisible"
|
|
|
+ title="请输入算法版本"
|
|
|
+ width="300"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-form :model="form" label-width="auto">
|
|
|
+ <el-form-item style="margin-bottom: 10px" label="sudo密码:">
|
|
|
+ <el-input v-model="form.sudoPassword"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="margin-bottom: 10px" label="算法版本:">
|
|
|
+ <el-input v-model="form.tag"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <!-- -->
|
|
|
+ <!-- <el-button @click="dialogVisible = false">取消</el-button>-->
|
|
|
+ <el-button type="primary" @click="algorithmImport">选择镜像文件</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-button style="margin-left: 10px;" type="primary" @click="onSubmit">算法镜像选择</el-button>
|
|
|
<el-switch
|
|
|
- v-model="algorithmContainerState"
|
|
|
- class="ml-2"
|
|
|
- inline-prompt
|
|
|
- style="margin-left: 100px;--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
- active-text="算法容器已开启"
|
|
|
- inactive-text="算法容器已关闭"
|
|
|
+ style="margin-left: 10px;"
|
|
|
+ v-model="value"
|
|
|
+ size="large"
|
|
|
+ inactive-text="算法容器"
|
|
|
/>
|
|
|
- <el-switch
|
|
|
- v-model="gazeboState"
|
|
|
- class="ml-2"
|
|
|
- inline-prompt
|
|
|
- style="margin-left: 100px; --el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
- active-text="Gazebo 已开启"
|
|
|
- inactive-text="Gazebo 已关闭"
|
|
|
- @click="gazebo"
|
|
|
- />
|
|
|
- <el-switch
|
|
|
- v-model="rvizState"
|
|
|
- class="ml-2"
|
|
|
- inline-prompt
|
|
|
- style="margin-left: 100px;--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
- active-text="Rviz 已开启"
|
|
|
- inactive-text="Rviz 已关闭"
|
|
|
- @click="rviz"
|
|
|
- />
|
|
|
- <el-button style="margin-left: 100px;" type="primary" @click="onSubmit">地图更新</el-button>
|
|
|
+<!-- <el-switch-->
|
|
|
+<!-- v-model="algorithmContainerState"-->
|
|
|
+<!-- class="ml-2"-->
|
|
|
+<!-- inline-prompt-->
|
|
|
+<!-- style="margin-left: 100px;--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"-->
|
|
|
+<!-- active-text="算法容器已开启"-->
|
|
|
+<!-- inactive-text="算法容器已关闭"-->
|
|
|
+<!-- />-->
|
|
|
+ <!-- <el-switch-->
|
|
|
+ <!-- v-model="gazeboState"-->
|
|
|
+ <!-- class="ml-2"-->
|
|
|
+ <!-- inline-prompt-->
|
|
|
+ <!-- style="margin-left: 100px; --el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"-->
|
|
|
+ <!-- active-text="Gazebo 已开启"-->
|
|
|
+ <!-- inactive-text="Gazebo 已关闭"-->
|
|
|
+ <!-- @click="gazebo"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!-- <el-switch-->
|
|
|
+ <!-- v-model="rvizState"-->
|
|
|
+ <!-- class="ml-2"-->
|
|
|
+ <!-- inline-prompt-->
|
|
|
+ <!-- style="margin-left: 100px;--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"-->
|
|
|
+ <!-- active-text="Rviz 已开启"-->
|
|
|
+ <!-- inactive-text="Rviz 已关闭"-->
|
|
|
+ <!-- @click="rviz"-->
|
|
|
+ <!-- />-->
|
|
|
+ <el-button style="margin-left: 100px;" type="primary" @click="onSubmit">仿真测试记录</el-button>
|
|
|
<br>
|
|
|
<br>
|
|
|
<el-table stripe style="background-color: rgba(255,0,0,99%);width: 100%" border :data="tableData"
|
|
@@ -79,8 +111,9 @@
|
|
|
<el-table-column prop="callbackTime" label="上报时间"/>
|
|
|
<el-table-column prop="dataStateName" label="数据状态"/>
|
|
|
<el-table-column width="100" fixed="right" label="操作">
|
|
|
+ <el-button size="small" type="danger" @click="goToDetail">生成world</el-button>
|
|
|
<el-button size="small" type="danger" @click="goToDetail">仿真测试</el-button>
|
|
|
-<!-- <el-button size="small" type="danger" @click="goToDetail">算法评价</el-button>-->
|
|
|
+ <!-- <el-button size="small" type="danger" @click="goToDetail">算法评价</el-button>-->
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
@@ -109,14 +142,46 @@ import {onBeforeMount, ref} from "vue";
|
|
|
import axios from "axios";
|
|
|
import {reactive} from 'vue'
|
|
|
import {ElTable} from "element-plus";
|
|
|
-import { useRouter } from 'vue-router'; // 导入 Vue Router 的 useRouter 钩子
|
|
|
+import {useRouter} from 'vue-router'; // 导入 Vue Router 的 useRouter 钩子
|
|
|
+
|
|
|
|
|
|
+const value = ref(true)
|
|
|
const router = useRouter();
|
|
|
const algorithmContainerState = ref(false)
|
|
|
const gazeboState = ref(false)
|
|
|
const rvizState = ref(false)
|
|
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>
|
|
|
|
|
|
+const dialogVisible = ref(false)
|
|
|
+
|
|
|
+const handleClose = (done: () => void) => {
|
|
|
+ done()
|
|
|
+}
|
|
|
+
|
|
|
+// do not use same name with ref
|
|
|
+const form = reactive({
|
|
|
+ sudoPassword: '',
|
|
|
+ tag: '',
|
|
|
+ // date1: '',
|
|
|
+ // date2: '',
|
|
|
+ // delivery: false,
|
|
|
+ // type: [],
|
|
|
+ // resource: '',
|
|
|
+ // desc: '',
|
|
|
+})
|
|
|
+const currentTag = ref('')
|
|
|
+
|
|
|
+
|
|
|
+const algorithmImport = async () => {
|
|
|
+ dialogVisible.value = false
|
|
|
+ try {
|
|
|
+ const result = await window.electronAPI.openFileManager();
|
|
|
+ console.log('用户选择的文件路径为:', result, ',版本为:', form.tag);
|
|
|
+ window.electronAPI.dockerImport(form.sudoPassword, result, form.tag)
|
|
|
+ } catch (error) {
|
|
|
+ console.error('打开文件管理器时出错:', error);
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
const goToDetail = () => {
|
|
|
router.push('/about')
|