Compare commits
No commits in common. "cc12cfdde5bd81f1386e2976b76ca1333cb1c1b3" and "65f2b7cb497761e89d5dd153863be77aaf93393e" have entirely different histories.
cc12cfdde5
...
65f2b7cb49
|
@ -75,7 +75,6 @@ import {
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const routers = useRoute();
|
const routers = useRoute();
|
||||||
import tools from "@/utils/tools";
|
|
||||||
// 返回
|
// 返回
|
||||||
const back = () => {
|
const back = () => {
|
||||||
router.back();
|
router.back();
|
||||||
|
@ -107,19 +106,8 @@ const to = (url) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: `${url}`,
|
path: `${url}`,
|
||||||
});
|
});
|
||||||
if (url == "/home/index/map") {
|
data.nowTab = url;
|
||||||
let menu = tools.data.get("menu");
|
data.menushow = false;
|
||||||
if(menu && menu.indexOf('ggfw:ystp') != -1){
|
|
||||||
data.nowTab = url;
|
|
||||||
data.menushow = false;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
data.nowTab = url;
|
|
||||||
data.menushow = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// data.nowTab = url;
|
|
||||||
// data.menushow = false;
|
|
||||||
};
|
};
|
||||||
const onMenu = (val) => {
|
const onMenu = (val) => {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { createRouter, createWebHashHistory } from "vue-router";
|
import { createRouter, createWebHashHistory } from "vue-router";
|
||||||
import http from "@/utils/request.js";
|
import http from "@/utils/request.js";
|
||||||
import tools from "@/utils/tools";
|
import tools from "@/utils/tools";
|
||||||
// import { namespaceContextKey } from "element-plus";
|
import { namespaceContextKey } from "element-plus";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
|
||||||
const routerHistory = createWebHashHistory();
|
const routerHistory = createWebHashHistory();
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
@ -139,7 +138,6 @@ const router = createRouter({
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach((to, form, next) => {
|
router.beforeEach((to, form, next) => {
|
||||||
let menu = tools.data.get("menu");
|
|
||||||
// var token = getCookie('lytoken')
|
// var token = getCookie('lytoken')
|
||||||
// // console.log('token', token)
|
// // console.log('token', token)
|
||||||
// if (token == '') {
|
// if (token == '') {
|
||||||
|
@ -161,17 +159,13 @@ router.beforeEach((to, form, next) => {
|
||||||
// next();
|
// next();
|
||||||
// }
|
// }
|
||||||
// console.log(55555, to.fullPath);
|
// console.log(55555, to.fullPath);
|
||||||
if (to.fullPath == '/home/index/map' ) {
|
// if (to.fullPath == '/home/index/map') {
|
||||||
if(!menu || menu.indexOf('ggfw:ystp') == -1){
|
|
||||||
ElMessage.error("您无权限访问该模块,若有需求请联系大数据中心!");
|
|
||||||
}else{
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
|
|
||||||
// next();
|
// next('/home/index')
|
||||||
|
// } else {
|
||||||
|
|
||||||
|
// }
|
||||||
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import axios from "axios";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import tools from "@/utils/tools";
|
import tools from "@/utils/tools";
|
||||||
import router from "../router";
|
import router from "../router";
|
||||||
// axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
|
axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
|
||||||
axios.defaults.timeout = 120000;
|
axios.defaults.timeout = 120000;
|
||||||
|
|
||||||
// HTTP request 拦截器
|
// HTTP request 拦截器
|
||||||
|
|
|
@ -137,7 +137,7 @@ const getCookie = (cname) => {
|
||||||
};
|
};
|
||||||
// 登录
|
// 登录
|
||||||
const login = () => {
|
const login = () => {
|
||||||
let backurl = tools.data.get("backUrl");
|
let backurl=tools.data.get("backUrl");
|
||||||
dd.getAuthCode()
|
dd.getAuthCode()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// let auth__code = env == "pc" ? res.auth_code : res.code;
|
// let auth__code = env == "pc" ? res.auth_code : res.code;
|
||||||
|
@ -151,9 +151,8 @@ const login = () => {
|
||||||
// var token = getCookie("lytoken");
|
// var token = getCookie("lytoken");
|
||||||
tools.data.set("token", response.data);
|
tools.data.set("token", response.data);
|
||||||
tools.data.set("type", 1);
|
tools.data.set("type", 1);
|
||||||
getMenu();
|
|
||||||
if (backurl) {
|
if (backurl) {
|
||||||
window.location.href = backurl;
|
window.location.href= backurl;
|
||||||
tools.data.remove("backUrl");
|
tools.data.remove("backUrl");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -203,17 +202,17 @@ const login = () => {
|
||||||
// console.log("Decrypted Text:", decodedText);
|
// console.log("Decrypted Text:", decodedText);
|
||||||
var tokenU = decodedText;
|
var tokenU = decodedText;
|
||||||
if (getCookie("lytoken")) {
|
if (getCookie("lytoken")) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
document.cookie = `lytoken=${tokenU}`;
|
document.cookie = `lytoken=${tokenU}`;
|
||||||
}
|
}
|
||||||
var token = getCookie("lytoken");
|
var token = getCookie("lytoken");
|
||||||
tools.data.set("token", token);
|
tools.data.set("token", token);
|
||||||
tools.data.set("type", 2);
|
tools.data.set("type", 2);
|
||||||
getMenu();
|
if (backurl) {
|
||||||
if (backurl) {
|
window.location.href= backurl;
|
||||||
window.location.href = backurl;
|
tools.data.remove("backUrl");
|
||||||
tools.data.remove("backUrl");
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
var tokenPd = getCookie("lytoken");
|
var tokenPd = getCookie("lytoken");
|
||||||
if (!tokenPd) {
|
if (!tokenPd) {
|
||||||
|
@ -221,17 +220,11 @@ const login = () => {
|
||||||
"http://220.191.238.50:996/api/login?returnURL=" +
|
"http://220.191.238.50:996/api/login?returnURL=" +
|
||||||
window.location.href;
|
window.location.href;
|
||||||
} else {
|
} else {
|
||||||
getMenu();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//头部菜单
|
|
||||||
const getMenu = () => {
|
|
||||||
http.get(`/api/ggfwyth/account/roleMenu`).then((res) => {
|
|
||||||
tools.data.set("menu", res.data);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// 清理事件监听器
|
// 清理事件监听器
|
||||||
stopDrag();
|
stopDrag();
|
||||||
|
|
|
@ -1611,7 +1611,7 @@ const movemode = () => {
|
||||||
selectedOverlay = null;
|
selectedOverlay = null;
|
||||||
sceneMove = null;
|
sceneMove = null;
|
||||||
movepoy = null;
|
movepoy = null;
|
||||||
// select = null;
|
select = null;
|
||||||
arrJWD = [[[]]];
|
arrJWD = [[[]]];
|
||||||
};
|
};
|
||||||
//移动地块
|
//移动地块
|
||||||
|
|
|
@ -795,9 +795,9 @@ onMounted(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-table--enable-row-hover .el-table__body tr:hover > td) {
|
// :deep(.el-table--enable-row-hover .el-table__body tr:hover > td) {
|
||||||
background-color: #2f4b74 !important;
|
// background-color: #2f4b74 !important;
|
||||||
}
|
// }
|
||||||
:deep(.el-table__body tr.hover-row > td.el-table__cell) {
|
:deep(.el-table__body tr.hover-row > td.el-table__cell) {
|
||||||
background-color: #2f4b74;
|
background-color: #2f4b74;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue