Jelajahi Sumber

视频联动

qinhouyu 1 tahun lalu
induk
melakukan
79c5ce63f8
2 mengubah file dengan 33 tambahan dan 10 penghapusan
  1. 16 7
      src/views/eventdetailsdialog.vue
  2. 17 3
      src/views/firespread.vue

+ 16 - 7
src/views/eventdetailsdialog.vue

@@ -964,13 +964,15 @@
               v-for="(item, index) in depteventList"
             >
               <div class="bgt-info">
-                <div
-                  class="bgt-info-name"
-                  :class="{ on: iconCurrentIndex == item.deptId }"
-                  @click="dutysystemSelect(item.deptId, item.deptName, item.id)"
-                >
-                  {{ item.deptName }}
-                </div>
+                <el-tooltip :content="item.deptName" placement="bottom">
+                  <div style="line-height: normal"
+                       class="bgt-info-name"
+                       :class="{ on: iconCurrentIndex === item.deptId }"
+                       @click="dutysystemSelect(item.deptId, item.deptName, item.id)"
+                  >
+                    {{ truncateText(item.deptName, 12) }}
+                  </div>
+                </el-tooltip>
               </div>
             </div>
           </div>
@@ -2367,6 +2369,13 @@ export default {
     /** ----------------------------------摄像头预览结束------------------------------------- */
   },
   methods: {
+    truncateText(text, length) {
+      if (text.length <= length) {
+        return text;
+      } else {
+        return text.substr(0, length) + "...";
+      }
+    },
     closedEventDiaTool() {
       document.addEventListener("click", (e) => {
         let b = document.getElementById("eventMapToolOnly");

+ 17 - 3
src/views/firespread.vue

@@ -131,6 +131,7 @@
                        key="ziyuan">
                     <el-button
                       size="small"
+                      v-if="eventType=='1'"
                       icon="el-icon-s-grid"
                       @click="showTVWallDiaLog()"
                     >视频联动
@@ -378,9 +379,15 @@
           <div class="bottomLeft">
             <div class="leftItem d-l-con padding-box nowrap" v-for="(item,index) in depteventList">
               <div class="bgt-info">
-                <div class="bgt-info-name" :class="{on:iconCurrentIndex==item.deptId}"
-                     @click="dutysystemSelect(item.deptId,item.deptName,item.id)">{{ item.deptName }}
-                </div>
+                <el-tooltip :content="item.deptName" placement="bottom">
+                  <div style="line-height: normal"
+                       class="bgt-info-name"
+                       :class="{ on: iconCurrentIndex === item.deptId }"
+                       @click="dutysystemSelect(item.deptId, item.deptName, item.id)"
+                  >
+                    {{ truncateText(item.deptName, 12) }}
+                  </div>
+                </el-tooltip>
               </div>
             </div>
           </div>
@@ -1477,6 +1484,13 @@ export default {
     this.fireControlViewList();
   },
   methods: {
+    truncateText(text, length) {
+      if (text.length <= length) {
+        return text;
+      } else {
+        return text.substr(0, length) + "...";
+      }
+    },
     showTVWallDiaLog() {
       this.initByCameras();
       // this.$refs.TVWall.showTVWall();