Ver Fonte

feat: 修改了 1.6个分屏以上不能回看 2.节目名称, 多个节目 显示编单名称 3.时间排期 去除了年月日 4.每次进入都是6分屏

fenghao há 1 ano atrás
pai
commit
d03aa803c3

+ 4 - 4
.env.development

@@ -21,11 +21,11 @@ VUE_APP_OFFLINE_MAP_PROXY = '/tiles'
 # VUE_APP_GATEWAY = '10.58.110.5'
 # VUE_APP_KEYCLOAK_OPTIONS_REALM = 'smsb-test'
 # 浪潮云
-VUE_APP_GATEWAY = 'msr.inspur.com:8084'
-VUE_APP_KEYCLOAK_OPTIONS_URL = 'https://msr.inspur.com:8084/auth'
+#VUE_APP_GATEWAY = 'msr.inspur.com:8084'
+# VUE_APP_KEYCLOAK_OPTIONS_URL = 'https://msr.inspur.com:8084/auth'
 # 深圳办公环境 测试
 # VUE_APP_GATEWAY = '10.180.88.84:8093'
 # VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://10.180.88.84:8093/auth'
 # 屏管家
-# VUE_APP_GATEWAY = '172.31.4.238'
-# VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://172.31.4.238/auth'
+ VUE_APP_GATEWAY = '172.31.4.238'
+ VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://172.31.4.238/auth'

+ 5 - 7
.env.fujian

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

+ 1 - 0
src/app.js

@@ -48,6 +48,7 @@ export default async function startApp (keycloak, auth) {
   Vue.prototype.$keycloak = keycloak
   Vue.prototype.$showLoading = showLoading
   Vue.prototype.$closeLoading = closeLoading
+  Vue.prototype.$REQUEST_LIMIT = { limit: 0 }
   Vue.prototype.$designProgram = function (id) {
     window.open(this.$router.resolve({
       name: 'program',

+ 9 - 1
src/components/service/external/DevicePlayer/index.vue

@@ -324,7 +324,15 @@ export default {
       //   return
       // }
       // this.playUrl(`${GATEWAY}/live/${this.recordConfig.stream}.flv?vhost=${vhost}&authorization=${token}&timestamp=${timestamp}&expire=${expire}`)
-      this.playUrl(`${GATEWAY}/live/${this.recordConfig.stream}.flv?vhost=__defaultVhost__`)
+      function replacePort (url, newPort) {
+        const urlObj = new URL(url)
+        urlObj.port = newPort
+        return urlObj.href.slice(0, -1) // 多出一个/
+      }
+      let url = GATEWAY
+      url = replacePort(url, ['9111', '9112', '9113'][this.$REQUEST_LIMIT.limit])
+      this.$REQUEST_LIMIT.limit = (this.$REQUEST_LIMIT.limit + 1) % 3
+      this.playUrl(`${url}/live/${this.recordConfig.stream}.flv?vhost=__defaultVhost__`)
     },
     checkOnlineStatus (delay = 5000) {
       clearTimeout(this.$checkTimer)

+ 14 - 2
src/views/visualization/v3/DeviceCalender.vue

@@ -105,11 +105,11 @@ export default {
           updateTime: data ? data.updateTime : '-',
           programName: map
             ? data?.event
-              ? data.event.target.name || EventPriorityInfo[data.event.priority]
+              ? data.event.target.name || data.event.name || EventPriorityInfo[data.event.priority]
               : '暂无节目'
             : '查询中...',
           programDesc:
-            map && data?.event ? getEventDescription(data.event) : '-',
+            map && data?.event ? this.removeDatesAndSpaces(getEventDescription(data.event)) : '-',
           status: onlineStatus === 1 && map && data?.event ? '在播' : '-'
         }
       })
@@ -126,6 +126,18 @@ export default {
     }
   },
   methods: {
+    removeDatesAndSpaces (str) {
+    // 匹配形如 "YYYY-MM-DD" 的日期以及它后面的所有空格
+      const regex = /\b\d{4}-\d{2}-\d{2}\s*/g
+      // 使用空字符串替换所有匹配项
+      const newStr = str.replace(regex, '')
+      const result = newStr.replace(/^-/, '')
+      if (result === '00:00:00 - 00:00:00') {
+        return '00:00:00 - 24:00:00'
+      }
+
+      return result
+    },
     getTimelines (refresh = true) {
       refresh && (this.programMap = null)
       getTimelines(

+ 2 - 2
src/views/visualization/v3/index.vue

@@ -114,7 +114,7 @@ export default {
       deviceList: [],
       group: {},
       timer: {},
-      count: +localStorage.getItem('MONITOR_COUNT') || 6,
+      count: 6,
       curPage: 1,
       auto: localStorage.getItem('MONITOR_AUTOCHANGE') !== '0'
     }
@@ -173,7 +173,7 @@ export default {
         return
       }
       this.count = count
-      localStorage.setItem('MONITOR_COUNT', count)
+      // localStorage.setItem('MONITOR_COUNT', count)
       this.reset()
       this.initTimer()
     },