浏览代码

feat: feature __EMERGENCY_PLATFORM__

Casper Dai 1 年之前
父节点
当前提交
7aa4a3c6e3
共有 4 个文件被更改,包括 45 次插入38 次删除
  1. 2 0
      .env
  2. 5 3
      .env.fujian
  3. 2 1
      feature.js
  4. 36 34
      src/router/index.js

+ 2 - 0
.env

@@ -22,6 +22,8 @@ VUE_APP_AD_ORDER_QR = 'https://msr.inspur.com'
 VUE_APP_APPLET_PAGE = 'pages/device/device'
 # 跳审
 __JUMP_REVIEW__ = 'enabled'
+# 应急广播平台
+__EMERGENCY_PLATFORM__ = 'disabled'
 
 VUE_APP_NAME = '浪潮屏媒安播云平台'
 

+ 5 - 3
.env.fujian

@@ -7,11 +7,13 @@ PLATFORM = 'fujian'
 # 短信
 __ALARM_SMS__ = 'enabled'
 
+# 下列配置块仅开启一个
+# 万福千屏
 VUE_APP_NAME = '万福千屏户外安播云平台'
-# VUE_APP_NAME = '安全宣教联播联控系统'
-
-# 万福使用,其他情况需屏蔽
 VUE_APP_THUMBNAIL_ORIGIN = 'http://192.168.10.10'
+# 五个一百
+# VUE_APP_NAME = '安全宣教联播联控系统'
+# __EMERGENCY_PLATFORM__ = 'enabled'
 
 VUE_APP_GAODE_MAP_RANGE_LEVEL = 'province'
 VUE_APP_GAODE_MAP_RANGE = '福建省'

+ 2 - 1
feature.js

@@ -31,6 +31,7 @@ module.exports = {
     ...createFeature('__ALARM_EMAIL__'),
     ...createFeature('__ALARM_WECHAT_OFFICIAL__'),
     ...createFeature('__ALARM_WECHAT_APPLAT__'),
-    ...createFeature('__JUMP_REVIEW__')
+    ...createFeature('__JUMP_REVIEW__'),
+    ...createFeature('__EMERGENCY_PLATFORM__')
   }
 }

+ 36 - 34
src/router/index.js

@@ -440,39 +440,41 @@ export const asyncRoutes = [
       }
     ]
   },
-  {
-    path: '/emergency',
-    component: Layout,
-    access: Access.MANAGE_EMERGENCY,
-    meta: { title: '应急广播', icon: 'bm' },
-    children: [
-      {
-        path: 'gis',
-        component: () => import('@/views/broadcast/emergency/gis/index'),
-        meta: { title: 'GIS地图' }
-      },
-      // {
-      //   path: 'onlne-gis',
-      //   component: () => import('@/views/broadcast/emergency/gis/OnlineMap'),
-      //   meta: { title: 'GIS地图(在线)' }
-      // },
-      {
-        path: 'task/list',
-        component: () => import('@/views/broadcast/emergency/task/list/index'),
-        meta: { title: '本地广播' }
-      },
-      {
-        path: 'task/playing',
-        component: () => import('@/views/broadcast/emergency/task/playing/index'),
-        meta: { title: '播放列表' }
-      },
-      {
-        path: 'device',
-        component: () => import('@/views/broadcast/emergency/device/index'),
-        meta: { title: '终端状态' }
-      }
-    ]
-  },
+  __EMERGENCY_PLATFORM__
+    ? {
+      path: '/emergency',
+      component: Layout,
+      access: Access.MANAGE_EMERGENCY,
+      meta: { title: '应急广播', icon: 'bm' },
+      children: [
+        {
+          path: 'gis',
+          component: () => import('@/views/broadcast/emergency/gis/index'),
+          meta: { title: 'GIS地图' }
+        },
+        // {
+        //   path: 'onlne-gis',
+        //   component: () => import('@/views/broadcast/emergency/gis/OnlineMap'),
+        //   meta: { title: 'GIS地图(在线)' }
+        // },
+        {
+          path: 'task/list',
+          component: () => import('@/views/broadcast/emergency/task/list/index'),
+          meta: { title: '本地广播' }
+        },
+        {
+          path: 'task/playing',
+          component: () => import('@/views/broadcast/emergency/task/playing/index'),
+          meta: { title: '播放列表' }
+        },
+        {
+          path: 'device',
+          component: () => import('@/views/broadcast/emergency/device/index'),
+          meta: { title: '终端状态' }
+        }
+      ]
+    }
+    : null,
   {
     path: '/d',
     component: Layout,
@@ -726,7 +728,7 @@ export const asyncRoutes = [
   },
   // 404 page must be placed at the end !!!
   { hidden: true, path: '*', redirect: '/' }
-]
+].filter(Boolean)
 
 const createRouter = () => new Router({
   // mode: 'history', // require service support