ソースを参照

bi需求修改
sxy修复问题

DarkMastar 6 ヶ月 前
コミット
0b6d03d4c8

+ 3 - 2
public/config.js

@@ -1,5 +1,6 @@
 const configPage={
-  // "httpServe":'http://172.102.1.185:81/prod-api'
-  "httpServe":'/prod-api'
+  "httpServe":'http://127.0.0.1:8081'
+  // "httpServe":'/prod-api'
+  // "httpServe":'http://407rm551yp60.vicp.fun'
 }
 module.exports={configPage}

+ 1 - 1
src/components/Jessibuca/index.vue

@@ -203,7 +203,7 @@ export default {
           useMSE: false,
           useOffscreen: false,
           useWCS: location.hostname === 'localhost' || location.protocol === 'https',
-          useWebFullScreen: false,
+          useWebFullScreen: true,
           videoBuffer: 0,
           wasmDecodeAudioSyncVideo: true,
           wasmDecodeErrorReplay: true,

+ 1 - 2
src/layout/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div lass="app-container" style="height: 100%">
+  <div class="app-container" style="height: 100%">
     <el-row v-if="toLivePreview===true" style="display: flex; width: 100%;height: 100%">
       <!--设备树-->
       <div class="tree-card" style="width: 220px">
@@ -2271,7 +2271,6 @@ export default {
     display: flex;
     flex-direction: column;
     border: none;
-    height: 85vh;
     min-height: calc(100vh - 84px);
     padding: 0px 0px;
     background-color: transparent;

+ 3 - 3
src/permission.js

@@ -10,7 +10,7 @@ import Cookies from 'js-cookie'
 
 NProgress.configure({ showSpinner: false })
 
-const whiteList = ['/login', '/register','/index?toLivePreview=true']
+const whiteList = ['/login', '/register']
 
 router.beforeEach((to, from, next) => {
   // 如何存在标识
@@ -18,11 +18,11 @@ router.beforeEach((to, from, next) => {
   // 然后再存token的回调 调跳转你看看代码
   // 手上没代码 是可以的,之前写过看看我写的有问题没
   console.log(to,from,next,666)
-  localStorage.setItem('route',JSON.stringify(to))
+  localStorage.setItem('query',JSON.stringify(to.query))
   let toLivePreview=new URLSearchParams(window.location.search).get('toLivePreview')
   if ((to.path === '/index' && to.query.toLivePreview === 'true')|| (to.path === '/index' &&to.query.toVideoPlayback === 'true')) {
     // 已登录则直接进入
-    if (!getToken()) {
+    if (getToken()) {
       next()
       return
     }

+ 2 - 2
src/utils/request.js

@@ -82,9 +82,9 @@ service.interceptors.response.use(res => {
     if (res.request.responseType ===  'blob' || res.request.responseType ===  'arraybuffer') {
       return res.data
     }
-    console.log(JSON.parse(localStorage.getItem('route')))
+    console.log(JSON.parse(localStorage.getItem('query')))
     if (code === 401) {
-      if(JSON.parse(localStorage.getItem('route')).query.toLivePreview||JSON.parse(localStorage.getItem('route')).query.toVideoPlayback){
+      if(JSON.parse(localStorage.getItem('query')).toLivePreview||JSON.parse(localStorage.getItem('query')).toVideoPlayback){
         if (!isRelogin.show) {
           isRelogin.show = true;
           MessageBox.confirm('视频监视界面长期无操作,页面将被刷新', '系统提示', {

+ 40 - 3
src/views/livePreview/components/videoBox1.vue

@@ -1,6 +1,6 @@
 <template>
-  <el-card style="border: none;border-radius: 0;" :body-style="{ padding: '0px', background: 'transparent' }">
-    <el-row class='mainBox'>
+  <el-card style="border: none;border-radius: 0;height: 100%;background-color: transparent" :body-style="{ padding: '0px', background: 'transparent',textAlign:'-webkit-center' }">
+    <el-row class='mainBox' :style="mainBoxStyle">
       <el-col :span='number' v-for='(item, index) in boxList.slice(boxListIndex)' :key='item.boxId'
         :id="'childBox_' + item.boxId" class='childBox' :style='{ height: heightActive }'
         @click.native='setActiveBox(item)' @dblclick.native="changeToOne(item)"
@@ -32,6 +32,8 @@ export default {
     return {
       clickBoxId: '',
       showRedBorder: true,
+      mainBoxStyle: {}, // 动态样式
+      resizeObserver: null,
     }
   },
   computed: {
@@ -89,8 +91,43 @@ export default {
   },
   mounted() {
     // this.rectZoomInit()
+    this.updateMainBoxSize();
+    // 使用 ResizeObserver 监听容器变化
+    this.resizeObserver = new ResizeObserver(() => this.updateMainBoxSize());
+    this.resizeObserver.observe(this.$el);
+
+    // 监听窗口变化
+    window.addEventListener('resize', this.updateMainBoxSize);
+  },
+  beforeDestroy() {
+    this.resizeObserver?.disconnect();
+    window.removeEventListener('resize', this.updateMainBoxSize);
   },
   methods: {
+    updateMainBoxSize() {
+      const container = this.$el;
+      const containerWidth = container.clientWidth;
+      const containerHeight = container.clientHeight;
+
+      // 计算基于宽和高的两种情况
+      const heightBasedOnWidth = containerWidth * 9 / 16;
+      const widthBasedOnHeight = containerHeight * 16 / 9;
+
+      // 选择合适的基准,确保容器不会超出父元素
+      if (heightBasedOnWidth <= containerHeight) {
+        // 以宽为基准,高度会有剩余空间
+        this.mainBoxStyle = {
+          width: `${containerWidth}px`,
+          height: `${heightBasedOnWidth}px`,
+        };
+      } else {
+        // 以高为基准,宽度会有剩余空间
+        this.mainBoxStyle = {
+          width: `${widthBasedOnHeight}px`,
+          height: `${containerHeight}px`,
+        };
+      }
+    },
     // 双击窗口转换成单画面播放
     changeToOne(item) {
       console.log(this.boxList)
@@ -166,7 +203,7 @@ export default {
 
 <style lang="less" scoped>
 .mainBox {
-  padding-bottom: 90px;
+  //padding-bottom: 90px;
   width: 100%;
   aspect-ratio: 16/9;
   margin: 0px;

+ 17 - 4
src/views/videoPlayback/bigVideoPlayback.vue

@@ -511,9 +511,20 @@ export default {
           selectType: this.selectType
         }).then((res) => {
           let s1 = [];
-          if (res.data !== "") {
+          if (res.data && res.data.length > 0) {
             res.data.forEach((item) => {
-              s1.push(formatDate2(item.Start));
+              let startDate = new Date(item.Start.split(' ')[0]);
+              let endDate = new Date(item.End.split(' ')[0]);
+
+              while (startDate <= endDate) {
+                // 使用 formatDate2 来格式化日期
+                let currentDateStr = formatDate2(startDate);
+                if (!s1.includes(currentDateStr)) {
+                  s1.push(currentDateStr);
+                }
+                // 日期加一天
+                startDate.setDate(startDate.getDate() + 1);
+              }
             });
           }
           this.markDay = s1;
@@ -798,8 +809,10 @@ export default {
   color: #ffffff;
 }
 
-::v-deep .wh_content_item>.wh_isMark {
-  background-color: #6e7a89 !important;
+::v-deep .wh_content_item .wh_isMark {
+  background-color: #6e7a89 !important; /* 这是您原来的背景色,可以保留或修改 */
+  color: #26e847 !important; /* 将字体颜色修改为绿色 */
+  font-weight: bold; /* 可以加粗以突出显示 */
 }
 
 ::v-deep .wh_item_date:hover {

+ 1 - 0
src/views/videoPlayback/index.vue

@@ -777,6 +777,7 @@ export default {
 ::v-deep .wh_content_item .wh_other_dayhide {
   color: transparent;
   pointer-events: none;
+  display: none;
 }
 
 ::v-deep .wh_content_item .wh_isToday {