智慧园区前端大屏
shuishen
2024-12-16 3fe27a3b570a7d6d8f8d66d0fab34d011257b56d
突发事件模拟内容调整,路由拦截跳转调整
4 files modified
32 ■■■■■ changed files
src/pages/single/index.vue 4 ●●●● patch | view | raw | blame | history
src/permission.js 18 ●●●●● patch | view | raw | blame | history
src/router/index.js 2 ●●● patch | view | raw | blame | history
src/views/pd/components/dynamicPanel.vue 8 ●●●● patch | view | raw | blame | history
src/pages/single/index.vue
@@ -136,10 +136,10 @@
    .main-container {
      position: absolute;
      top: 40px;
      top: 54px;
      left: 40px;
      right: 40px;
      bottom: 40px;
      bottom: 54px;
    }
  }
}
src/permission.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-30 17:03:57
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-10-30 17:07:40
 * @LastEditTime: 2024-12-16 19:35:12
 * @FilePath: \bigScreen\src\permission.js
 * @Description: 
 * 
@@ -22,14 +22,19 @@
  const meta = to.meta || {}
  if (token) {
    if (to.path === '/login') {
      //如果登录成功访问登录页跳转到主页
    if (!to.matched.length) {
      // 如果路由不存在
      next({ path: '/' })
    } else {
      if (token.length === 0) {
        next({ path: '/login' })
      if (to.path === '/login') {
        //如果登录成功访问登录页跳转到主页
        next({ path: '/' })
      } else {
        next()
        if (token.length === 0) {
          next({ path: '/login' })
        } else {
          next()
        }
      }
    }
  } else {
@@ -45,3 +50,4 @@
router.afterEach(to => {
})
src/router/index.js
@@ -22,7 +22,7 @@
  //   redirect: '/layout',
  // },
  {
    path: '',
    path: '/',
    redirect: '/layout',
  },
  {
src/views/pd/components/dynamicPanel.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-11-09 15:41:35
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-12-06 16:50:50
 * @LastEditTime: 2024-12-16 19:42:20
 * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
 * @Description: 
 * 
@@ -132,21 +132,21 @@
      },
      onetime: 10000,
      twoContent: '调度金龙水库清水,稀释污染团。',
      twoContent: '关闭雨水阀闸,调度金龙水库清水,稀释污染团。',
      twoPointPosition: {
        lng: 115.10488545,
        lat: 27.27678110
      },
      twotime: 13000,
      threeContent: '转输至江西粤鹏环保高新技术开发有限公司事故应急池、初期雨水池。',
      threeContent: '转输至江西粤鹏环保高新技术开发有限公司事故应急池。',
      threePointPosition: {
        lng: 115.10545135,
        lat: 27.28043872
      },
      threetime: 18000,
      fourContent: '转输至江西腾龙源环保科技有限公司事故应急池、初期雨水池。',
      fourContent: '转输至江西腾龙源环保科技有限公司事故应急池。',
      fourPointPosition: {
        lng: 115.10332118,
        lat: 27.27831698