trp:上一次代码提交冲突解决
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<div id="main">
|
||||
<div class="box-top">
|
||||
<manage-btn
|
||||
v-model="selectIndex"
|
||||
@select="manageSelect"
|
||||
:list="routeList"
|
||||
v-if="showMenu && isPreview"
|
||||
/>
|
||||
<!-- <manage-btn v-model="selectIndex" @select="manageSelect" :list="routeList" v-if="showMenu&&isPreview" />-->
|
||||
<tunnel-title v-if="showTunnelTitle" />
|
||||
<div class="top-length">
|
||||
<span>隧道总长度: {{ tunnelLength }}米</span>
|
||||
<span class="all-btn" @click="startSimulate">开始模拟</span>
|
||||
<span class="all-btn" @click="startSimulate" v-if="isStartSimulate"
|
||||
>开始模拟</span
|
||||
>
|
||||
<div v-else>
|
||||
<span class="all-btn" @click="simulatedBlasting">模拟爆破</span>
|
||||
<span class="all-btn" @click="endSimulate">结束模拟</span>
|
||||
</div>
|
||||
<!-- <span class="all-btn" :style="{color:!isPreview?'#f7b500':'#0BE9FA'}" @click="changeTunnelSimulateMode(false)">编辑模式</span>-->
|
||||
</div>
|
||||
<div class="top-right" v-if="isPreview">
|
||||
@@ -333,6 +334,7 @@ const showFanLoading = ref(0);
|
||||
const showUsedLoading = ref(0);
|
||||
const showWindLoading = ref(0);
|
||||
const showBadLoading = ref(0);
|
||||
const isStartSimulate = ref(true);
|
||||
const drawerRight = ref(true);
|
||||
const showMenu = ref(false);
|
||||
const currentSiteId = ref(0);
|
||||
@@ -413,7 +415,12 @@ onMounted(() => {
|
||||
showFan.value = true;
|
||||
});
|
||||
});
|
||||
const startSimulate = () => {};
|
||||
const startSimulate = () => {
|
||||
isStartSimulate.value = false;
|
||||
};
|
||||
const endSimulate = () => {
|
||||
isStartSimulate.value = true;
|
||||
};
|
||||
const changeName = (id) => {
|
||||
for (let item of equipmentOption.value) {
|
||||
if (item.value === id) {
|
||||
@@ -637,7 +644,9 @@ const getTunnel = (id) => {
|
||||
});
|
||||
};
|
||||
const changeTunnel = (e) => {
|
||||
socket.close();
|
||||
if (socket) {
|
||||
socket.close();
|
||||
}
|
||||
let newObj = {};
|
||||
tunnelList.value.forEach((item, index) => {
|
||||
if (index === e) {
|
||||
@@ -674,10 +683,14 @@ const manageSelect = (index) => {
|
||||
router.push("/user/" + localStorage.getItem("currentSiteId"));
|
||||
}
|
||||
}
|
||||
socket.close();
|
||||
if (socket) {
|
||||
socket.close();
|
||||
}
|
||||
};
|
||||
const handleChangeSite = debounce((item) => {
|
||||
socket.close();
|
||||
if (socket) {
|
||||
socket.close();
|
||||
}
|
||||
currentSite.value = item.label;
|
||||
currentSiteId.value = item.value;
|
||||
getTunnel(item.value);
|
||||
@@ -834,6 +847,7 @@ const initWebSocket = () => {
|
||||
color: #f7b500;
|
||||
}
|
||||
}
|
||||
|
||||
#main {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user