ソースを参照

fix: 修改表格详情样式、详情视频样式

bxy 1 年間 前
コミット
2a009c6368

+ 4 - 4
src/views/datamanager/alertformdata/components/common/AlertTable.vue

@@ -24,7 +24,7 @@
           {{ getNameByType(row.source, row.issueType) }}
         </template>
       </el-table-column>
-      <el-table-column label="问题描述" prop="description" width="400" show-overflow-tooltip>
+      <el-table-column label="问题描述" prop="description" width="280" show-overflow-tooltip>
         <template #default="{ row }">
           <span>{{ getSplicedDes(row.description) }}</span>
           <span
@@ -244,9 +244,9 @@
   };
 
   const getSplicedDes = (val) => {
-    if (val.length < 20) return val;
+    if (val.length < 15) return val;
     else {
-      const temp = val.substring(0, 20);
+      const temp = val.substring(0, 14);
       return temp + '…';
     }
   };
@@ -342,7 +342,7 @@
     }
 
     .selected-row {
-      background: #ddefff;
+      background: #f3f8ff;
     }
   }
 </style>

+ 12 - 5
src/views/datamanager/alertformdata/components/common/DetailDialog.vue

@@ -18,7 +18,7 @@
           <div class="video-box" v-if="videoPaths && videoPaths.length != 0">
             <img
               src="@/assets/images/alert/video-play.png"
-              @click="videoDialogVisible = true"
+              @click="handleOpenVideo"
               style="
                 object-fit: contain;
                 width: 200px;
@@ -57,16 +57,16 @@
       </template>
     </el-dialog>
 
-    <el-dialog v-model="videoDialogVisible" class="video-dialog" align-center>
+    <el-dialog v-model="videoDialogVisible" class="video-dialog" align-center destroy-on-close>
       <video
         type="video/mp4"
         muted="true"
         preload="auto"
         :controls="true"
         autoplay
-        style="height: 620px; object-fit: contain"
+        style="object-fit: contain"
       >
-        <source :src="videoPaths![0]" />
+        <source :src="tempVideoUrl" />
       </video>
     </el-dialog>
   </div>
@@ -92,6 +92,12 @@
     return props.hasBeenChosen;
   });
 
+  const tempVideoUrl = ref('');
+  const handleOpenVideo = () => {
+    videoDialogVisible.value = true;
+    if (props.videoPaths) tempVideoUrl.value = props.videoPaths[0];
+  };
+
   const handleClose = () => {
     emits('close');
   };
@@ -215,10 +221,11 @@
     }
 
     .el-dialog__body {
-      height: 100%;
+      // height: 100%;
       padding: 0;
       display: flex;
       justify-content: center;
+      background-color: #000;
     }
   }
 </style>