邓洁 : 修复bug
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
<div class="tunnel-title"></div>
|
||||
<!-- <manage-length class="tunnel-length"></manage-length>-->
|
||||
<div class="top-length">
|
||||
<span>隧道总长度: {{tunnelLength}}米</span>
|
||||
<span>当前施工长度: {{constructionLength}}米</span>
|
||||
<span>隧道总长度: {{ tunnelLength }}米</span>
|
||||
<span>当前施工长度: {{ constructionLength }}米</span>
|
||||
</div>
|
||||
<div class="top-right">
|
||||
<div class="current-site">
|
||||
@@ -80,7 +80,7 @@ import {dateFormat} from "@/utils/date.js";
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {useAuthStore} from "@/store/userstore.js";
|
||||
import {getLargeScreen, getLargeScreenInfo, getTunnelBySiteId} from "@/api/largeScreen";
|
||||
import {ElMessage,ElMessageBox} from "element-plus";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {getUserInfo} from "@/api/login";
|
||||
import {initSceneData} from "@/api/tunnelScene";
|
||||
import {getSiteDetail} from "../../api/site";
|
||||
@@ -128,7 +128,7 @@ const getUser = () => {
|
||||
currentUserId.value = res.data.user.userId
|
||||
})
|
||||
}
|
||||
const getDefaultSite=(siteId)=>{
|
||||
const getDefaultSite = (siteId) => {
|
||||
// console.log('siteList.value',siteList.value)
|
||||
// getSiteDetail(siteId).then((res) => {
|
||||
// console.log('res',res)
|
||||
@@ -139,25 +139,25 @@ const getOtherInfo = () => {
|
||||
if (res?.code === 1000) {
|
||||
routeList.value = res.data.routeList
|
||||
siteList.value = res.data.siteOption
|
||||
currentSiteId.value = res.data.siteOption[res.data.siteOption.length-1].value
|
||||
currentSite.value = res.data.siteOption[res.data.siteOption.length-1].label
|
||||
getTunnel(res.data.siteOption[res.data.siteOption.length-1].value)
|
||||
currentSiteId.value = res.data.siteOption[res.data.siteOption.length - 1].value
|
||||
currentSite.value = res.data.siteOption[res.data.siteOption.length - 1].label
|
||||
getTunnel(res.data.siteOption[res.data.siteOption.length - 1].value)
|
||||
}
|
||||
});
|
||||
};
|
||||
const getScreenInfo = (id) => {
|
||||
if(id){
|
||||
tunnelId.value=id
|
||||
if (id) {
|
||||
tunnelId.value = id
|
||||
getLargeScreen(id).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
largeScreenData.value = res.data;
|
||||
}else {
|
||||
} else {
|
||||
ElMessage.warning(res.msg)
|
||||
}
|
||||
});
|
||||
initSceneData(id).then((res) => {
|
||||
tunnelLength.value=res.data.tunnelLength
|
||||
constructionLength.value=res.data.constructionLength
|
||||
tunnelLength.value = res.data.tunnelLength
|
||||
constructionLength.value = res.data.constructionLength
|
||||
})
|
||||
}
|
||||
};
|
||||
@@ -185,16 +185,15 @@ const changeTunnel = (e) => {
|
||||
const manageSelect = (index) => {
|
||||
console.log("首页点击-", index);
|
||||
if (index == '站点管理') {
|
||||
if(currentUserId.value){
|
||||
router.push("/site"+'/'+currentUserId.value);
|
||||
if (currentUserId.value) {
|
||||
router.push("/site" + '/' + currentUserId.value);
|
||||
}
|
||||
} else if (index == '隧道管理') {
|
||||
console.log('无查看权限??',currentSiteId.value,currentUserId.value)
|
||||
// if(currentSiteId.value&¤tUserId.value){
|
||||
router.push("/tunnel/" + currentSiteId.value+'/i'+'/'+currentUserId.value);
|
||||
// }
|
||||
if (currentSiteId.value && currentUserId.value) {
|
||||
router.push("/tunnel/" + currentSiteId.value + '/i' + '/' + currentUserId.value);
|
||||
}
|
||||
} else if (index == '用户管理') {
|
||||
if(currentSiteId.value){
|
||||
if (currentSiteId.value) {
|
||||
router.push("/user/" + currentSiteId.value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user