From 8d837b97ffb27e4e26f067c1febde353bfdf91cf Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 23 Apr 2021 09:16:27 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jfpt-Vue

---
 src/views/policeTracking/policeTracking.vue |   41 ++++++++++++++++++++++++++++++++---------
 1 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 52073f2..02ffe9c 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -2,7 +2,7 @@
   <el-row>
     <el-col :span="12">
       <div style="background: #fff; height: 100%">
-        <el-card class="trackClass" style="overflow-y: auto;">
+        <el-card class="trackClass" style="overflow-y: auto">
           <div
             style="margin-top: 20px"
             role="tab"
@@ -145,7 +145,7 @@
               </el-col>
               <el-col span="12">
                 <el-form-item label="历史视频">
-                  <el-button type="primary" @click.stop="oldVideoSatart = true"
+                  <el-button type="primary" @click.stop="oldOpenVideo"
                     >视频播放
                   </el-button>
                 </el-form-item>
@@ -435,7 +435,9 @@
                   :key="index"
                   :src="item"
                   :preview-src-list="srcList"
+                  v-show="imgSrc.length > 0"
                 ></el-image>
+                <span v-show="imgSrc.length == 0">暂无现场图片</span>
               </el-card>
             </div>
             <div class="block">
@@ -462,7 +464,9 @@
                   :src="feedbackVideo"
                   style="width: 100%; height: 100%; object-fit: fill"
                   controls
+                  v-show="feedbackVideo != ''"
                 ></video>
+                <span v-show="feedbackVideo == ''">暂无现场视频</span>
               </div>
             </div>
           </div>
@@ -509,7 +513,9 @@
           id="old_video"
           style="width: 100%; height: 100%; object-fit: fill"
           controls
+          v-show="vaddress != ''"
         ></video>
+        <span v-show="vaddress == ''">暂无历史视频</span>
       </el-dialog>
     </el-col>
   </el-row>
@@ -517,7 +523,7 @@
 
 <script>
 import axios from "axios";
-
+import { getclient } from "@/api/real/real";
 export default {
   inject: ["reload"],
   data() {
@@ -805,6 +811,8 @@
               });
             }
           });
+
+          console.log(that.tableData, 789, 10)
         });
     },
 
@@ -841,7 +849,8 @@
           jid: this.form.id,
         },
       }).then((resdata) => {
-        this.audios = resdata.data.data.records;
+        if (resdata.data.data.records.length > 0)
+          this.audios = resdata.data.data.records;
       });
     },
 
@@ -853,11 +862,25 @@
           jid: this.form.id,
         },
       }).then((resdata) => {
-        console.log(resdata.data.data[0], 56569);
-        this.security = resdata.data.data[0].List[0];
-        this.imgSrc = resdata.data.data[0].tp;
-        this.srcList = resdata.data.data[0].tp;
-        this.feedbackVideo = resdata.data.data[0].sp[0];
+        if (resdata.data.data[0].List.length > 0)
+          this.security = resdata.data.data[0].List[0];
+        if (resdata.data.data[0].tp.length > 0) {
+          this.imgSrc = resdata.data.data[0].tp;
+          this.srcList = resdata.data.data[0].tp;
+        }
+        if (resdata.data.data[0].sp.length > 0) {
+          this.feedbackVideo = resdata.data.data[0].sp[0];
+        }
+      });
+    },
+
+    oldOpenVideo() {
+      getclient(this.form.id).then((res) => {
+        if (res.data.data.vaddress != "") {
+          this.vaddress = res.data.data.vaddress;
+        }
+        this.oldVideoSatart = true;
+        console.log(this.oldVideoSatart);
       });
     },
   },

--
Gitblit v1.9.3