fix : 风机区域细节优化

This commit is contained in:
2024-02-27 16:09:03 +08:00
parent e2afbbc011
commit bc3e7ddaea
3 changed files with 33 additions and 14 deletions

View File

@@ -87,7 +87,6 @@ import { getLargeScreen, getLargeScreenInfo, getTunnelBySiteId } from "@/api/lar
import { ElMessage, ElMessageBox } from "element-plus";
import { getUserInfo } from "@/api/login";
import { initSceneData } from "@/api/tunnelScene";
import { reactive } from "vue";
const authStore = useAuthStore();
const router = useRouter();
const previewId = reactive(router.currentRoute.value.params.tunnelId)
@@ -191,7 +190,11 @@ const getOtherInfo = () => {
currentSiteId.value = res.data.siteOption[0].value
currentSite.value = res.data.siteOption[0].label
localStorage.setItem('site', currentSite.value)
tunnelList.value = res.data.tunnelOption
if(res.data.tunnelOption.length === 0){
getTunnel(res.data.siteOption[0].value)
}else {
tunnelList.value = res.data.tunnelOption
}
if (previewId) {
tunnelList.value.forEach((item, index) => {
if (item.value == previewId) {
@@ -256,7 +259,7 @@ const getTunnel = (id) => {
if (res?.code === 1000) {
getScreenInfo(res.data[0]?.value)
tunnelName = res.data[0].label
console.log(res.data[0].label);
tunnelList.value = res.data
}
});
}