Browse Source

修改

dev_kxc
xzt 11 months ago
parent
commit
4e3d018ef4
  1. 23
      jwtech-admin-page/src/router/index.js
  2. 14
      jwtech-admin-page/src/views/gateway/earlyWarningDivisionSituation.vue
  3. 3
      jwtech-admin-page/src/views/gateway/fundControlSituation.vue
  4. 24
      jwtech-admin-page/src/views/gateway/index.vue
  5. 16
      jwtech-admin-page/src/views/gateway/projectDistributionADiagram.vue

23
jwtech-admin-page/src/router/index.js

@ -117,7 +117,7 @@ export const constantRoutes = [
hidden: true hidden: true
}, },
{ {
path: '', path: '/',
component: Layout, component: Layout,
redirect: 'welcome', redirect: 'welcome',
children: [ children: [
@ -209,18 +209,29 @@ const router = new Router({
// 注册一个全局前置守卫 // 注册一个全局前置守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (to.path === "/singleLogin") { if (to.path === "/singleLogin") {
console.log("单点登录设置token", to.query.token); //判断当前路由是否需要进行权限控制 console.log("单点登录设置token", to.query.token); //判断当前路由是否需要进行权限控制
if (to.query.token) { if (to.query.token) {
setToken(to.query.token); setToken(to.query.token);
let toPath
if (to.query.page === 'null') { if (to.query.page === 'null') {
next("/welcome") toPath="/largeScreen"
// next("/welcome")
} else if (to.query.page) { } else if (to.query.page) {
next(to.query.page) toPath=to.query.page
// next(to.query.page)
} else { } else {
next("/welcome") toPath="/largeScreen"
// next("/welcome")
} }
isLegal().then(res => {
console.log("singleLogin--resres", res);
if (!res.data) {
next("/legalLinkProject")
} else {
next(toPath)
}
})
} }
} }
// else if (to.path !== '/gateway' || to.path !== '/gateway/earlyWarningDivisionSituation' || to.path !== '/gateway/fundControlSituation' || to.path !== '/gateway/projectDistributionADiagram') { // else if (to.path !== '/gateway' || to.path !== '/gateway/earlyWarningDivisionSituation' || to.path !== '/gateway/fundControlSituation' || to.path !== '/gateway/projectDistributionADiagram') {
@ -232,7 +243,7 @@ router.beforeEach((to, from, next) => {
else if (from.path === '/login' && to.path !== '/legalLinkProject' && to.path !== '/largeScreen') { else if (from.path === '/login' && to.path !== '/legalLinkProject' && to.path !== '/largeScreen') {
// console.log(54546486,isLegal()); // console.log(54546486,isLegal());
isLegal().then(res => { isLegal().then(res => {
console.log("resres", res); console.log("login--resres", res);
if (!res.data) { if (!res.data) {
next("/legalLinkProject") next("/legalLinkProject")
} else { } else {

14
jwtech-admin-page/src/views/gateway/earlyWarningDivisionSituation.vue

@ -129,7 +129,7 @@
</div> </div>
<!-- svg --> <!-- svg -->
<svg width="0" height="0"> <svg width="0" height="0" style="display: none">
<defs> <defs>
<linearGradient id="green" x1="0%" y1="0%" x2="100%" y2="0%"> <linearGradient id="green" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color: #12c299; stop-opacity: 1" /> <stop offset="0%" style="stop-color: #12c299; stop-opacity: 1" />
@ -137,7 +137,7 @@
</linearGradient> </linearGradient>
</defs> </defs>
</svg> </svg>
<svg width="0" height="0"> <svg width="0" height="0" style="display: none">
<defs> <defs>
<linearGradient id="orange" x1="0%" y1="0%" x2="100%" y2="0%"> <linearGradient id="orange" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color: #ff6400; stop-opacity: 1" /> <stop offset="0%" style="stop-color: #ff6400; stop-opacity: 1" />
@ -317,20 +317,23 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
width: 1200px; // width: 1200px;
width: 100%;
height: 488px; height: 488px;
background: #fff; background: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.page_left { .page_left {
width: 808px; // width: 808px;
// width: 67%;
flex: 1;
height: 100%; height: 100%;
// border: 1px solid red; // border: 1px solid red;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.left_head { .left_head {
width: 792px; // width: 792px;
height: 76px; height: 76px;
background: #f3feff; background: #f3feff;
padding: 16px 24px; padding: 16px 24px;
@ -412,6 +415,7 @@ export default {
} }
.page_right { .page_right {
width: 384px; width: 384px;
// width: 32%;
height: 100%; height: 100%;
// border: 1px solid red; // border: 1px solid red;
background: #fff; background: #fff;

3
jwtech-admin-page/src/views/gateway/fundControlSituation.vue

@ -353,7 +353,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
width: 1200px; // width: 1200px;
width: 100%;
height: 348px; height: 348px;
background: #fff; background: #fff;
display: flex; display: flex;

24
jwtech-admin-page/src/views/gateway/index.vue

@ -1,3 +1,27 @@
<template> <template>
<router-view /> <router-view />
</template> </template>
//
<script>
// import { returnToken } from "@/api/login";
// import { setToken, removeToken } from "@/utils/auth";
// export default {
// data() {
// return {
// parmas: {
// token: null,
// },
// };
// },
// created() {
// console.log("this.$route", this.$route);
// this.parmas.token = this.$route.query.token;
// returnToken(this.parmas).then((res) => {
// // console.log("token", res.token);
// let token = res.token;
// setToken(token);
// });
// },
// };
//
</script>

16
jwtech-admin-page/src/views/gateway/projectDistributionADiagram.vue

@ -93,6 +93,9 @@ export default {
queryParams: { queryParams: {
adcd: null, adcd: null,
}, },
parmas: {
token: null,
},
}; };
}, },
@ -100,7 +103,7 @@ export default {
console.log("this.$route", this.$route); console.log("this.$route", this.$route);
this.parmas.token = this.$route.query.token; this.parmas.token = this.$route.query.token;
returnToken(this.parmas).then((res) => { returnToken(this.parmas).then((res) => {
// console.log("token", res); console.log("有效token", res);
let token = res.token; let token = res.token;
setToken(token); setToken(token);
this.getTreeData(); this.getTreeData();
@ -141,7 +144,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
width: 1200px; // width: 1200px;
width: 100%;
background: #fff; background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -249,7 +253,8 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.info_left { .info_left {
width: 240px; // width: 240px;
width: 22%;
height: 464px; height: 464px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -284,8 +289,9 @@ export default {
} }
} }
.info_right { .info_right {
width: 800px; // width: 800px;
height: 600px; width: 70%;
// height: 600px;
// border: 1px solid red; // border: 1px solid red;
& > img { & > img {
width: 100%; width: 100%;

Loading…
Cancel
Save