邓洁 : 修复bug
This commit is contained in:
@@ -46,7 +46,7 @@ const router = useRouter();
|
||||
const authStore = useAuthStore();
|
||||
const loginForm = reactive({
|
||||
// username: "admin",
|
||||
password: "12345",
|
||||
password: "",
|
||||
username: "",
|
||||
// password: "",
|
||||
code: "",
|
||||
|
||||
@@ -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 {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";
|
||||
@@ -146,23 +146,27 @@ const getOtherInfo = () => {
|
||||
});
|
||||
};
|
||||
const getScreenInfo = (id) => {
|
||||
tunnelId.value=id
|
||||
getLargeScreen(id).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
largeScreenData.value = res.data;
|
||||
}
|
||||
});
|
||||
initSceneData(id).then((res) => {
|
||||
tunnelLength.value=res.data.tunnelLength
|
||||
constructionLength.value=res.data.constructionLength
|
||||
})
|
||||
if(id){
|
||||
tunnelId.value=id
|
||||
getLargeScreen(id).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
largeScreenData.value = res.data;
|
||||
}else {
|
||||
ElMessage.warning(res.msg)
|
||||
}
|
||||
});
|
||||
initSceneData(id).then((res) => {
|
||||
tunnelLength.value=res.data.tunnelLength
|
||||
constructionLength.value=res.data.constructionLength
|
||||
})
|
||||
}
|
||||
};
|
||||
//根据站点id获取隧道信息
|
||||
const getTunnel = (id) => {
|
||||
getTunnelBySiteId(id).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
tunnelList.value = res.data
|
||||
getScreenInfo(res.data[0].value)
|
||||
getScreenInfo(res.data[0]?.value)
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -180,15 +184,16 @@ const changeTunnel = (e) => {
|
||||
}
|
||||
const manageSelect = (index) => {
|
||||
console.log("首页点击-", index);
|
||||
if (index === '站点管理') {
|
||||
if (index == '站点管理') {
|
||||
if(currentUserId.value){
|
||||
router.push("/site"+'/'+currentUserId.value);
|
||||
}
|
||||
} else if (index === '隧道管理') {
|
||||
if(currentSiteId.value&¤tUserId.value){
|
||||
router.push("/tunnel/" + currentSiteId.value+'/i'+'/'+currentUserId.value);
|
||||
}
|
||||
} else if (index === '用户管理') {
|
||||
} else if (index == '隧道管理') {
|
||||
console.log('无查看权限??',currentSiteId.value,currentUserId.value)
|
||||
// if(currentSiteId.value&¤tUserId.value){
|
||||
router.push("/tunnel/" + currentSiteId.value+'/i'+'/'+currentUserId.value);
|
||||
// }
|
||||
} else if (index == '用户管理') {
|
||||
if(currentSiteId.value){
|
||||
router.push("/user/" + currentSiteId.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user