From 5808f76456ca0d40de5074f132b73a5a488e3e13 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 09 Dec 2025 09:12:03 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v9.0/9.0.1' into test
---
src/views/dataCenter/dataCenter.vue | 112 ++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 89 insertions(+), 23 deletions(-)
diff --git a/src/views/dataCenter/dataCenter.vue b/src/views/dataCenter/dataCenter.vue
index 7b77d2d..130dfb8 100644
--- a/src/views/dataCenter/dataCenter.vue
+++ b/src/views/dataCenter/dataCenter.vue
@@ -18,7 +18,7 @@
<!-- 文件夹 -->
<div v-if="switchFolders" class="dataTable">
<el-table
-
+ border
class="custom-header custom-body"
v-loading="loadings"
element-loading-text=""
@@ -35,7 +35,7 @@
}}
</template>
</el-table-column>
- <el-table-column property="recordName" label="任务名称" show-overflow-tooltip />
+ <el-table-column property="name" label="任务名称" show-overflow-tooltip />
<el-table-column property="regionName" label="所属区域">
<template #default="scope">
<span>{{scope.row.city_name ? scope.row.city_name :'--'}},{{scope.row.area_name ? scope.row.area_name :'--'}}</span>
@@ -53,6 +53,16 @@
>
</template>
</el-table-column>
+ <template #empty>
+ <el-empty
+ class="custom-empty"
+ :image-size="100"
+ >
+ <template #description>
+ <span class="custom-text">暂无数据</span>
+ </template>
+ </el-empty>
+ </template>
</el-table>
</div>
<!-- 表格部分 -->
@@ -93,13 +103,15 @@
<el-table-column property="link" label="缩略图" width="120">
<template #default="scope">
- <img
+ <div v-if="scope.row?.resultType === 5" class="videoItem1">
+ <img
class="quanjing"
@click="clickpanorama(scope.row)"
- v-if="scope.row?.resultType === 5"
+
:src="scope.row?.smallUrl"
alt=""
/>
+ </div>
<!-- 视频 -->
<div v-else-if="scope.row?.resultType === 1" class="videoItem1">
<img
@@ -116,20 +128,23 @@
/>
</div>
<!-- 正射 -->
- <el-image
- v-else-if="scope.row?.resultType === 4"
+ <div v-else-if="scope.row?.resultType === 4" class="videoItem1">
+ <el-image
+
:src="getzsSmallImg(scope.row?.link)"
:preview-src-list="[getzsSmallImg(scope.row?.link)]"
fit="cover"
preview-teleported
/>
- <el-image
- v-else
+ </div>
+ <div v-else class="videoItem1">
+ <el-image
:src="scope.row?.smallUrl"
:preview-src-list="[scope.row?.showUrl]"
fit="cover"
preview-teleported
/>
+ </div>
</template>
</el-table-column>
<el-table-column prop="jobTime" label="任务时间" />
@@ -166,10 +181,20 @@
>
</template>
</el-table-column>
+ <template #empty>
+ <el-empty
+ class="custom-empty"
+ :image-size="100"
+ >
+ <template #description>
+ <span class="custom-text">暂无数据</span>
+ </template>
+ </el-empty>
+ </template>
</el-table>
</div>
<!-- 分页 -->
- <div class="pagination">
+ <div class="pagination" v-if="!switchFolders ? tableData.length > 0 : folderList.length > 0">
<el-pagination
:current-page="switchFolders ? FolderListParams.page : jobListParams.current"
:page-size="switchFolders ? FolderListParams.page_size : jobListParams.size"
@@ -184,6 +209,7 @@
<!-- 查看弹框 -->
<el-dialog
v-model="dialogVisible"
+ class="ztzf-dialog-mange"
width="60%"
append-to-body
@close="dialogClose"
@@ -204,7 +230,7 @@
class="videoItem"
ref="videoRefs"
controls
- autoplay
+
:src="dialogDetailList.link"
></video>
<!-- 地图 -->
@@ -241,7 +267,7 @@
<div>
拍摄机巢:{{ dialogDetailList?.nestName ? dialogDetailList?.nestName : '--' }}
</div>
- <div v-if="dialogDetailList?.resultType != 4">
+ <div v-if="dialogDetailList?.resultType == 0">
照片位置:{{ _.round(dialogDetailList?.longitude, 3) }},{{
_.round(dialogDetailList?.latitude, 3)
}}
@@ -292,6 +318,7 @@
<!-- 视频预览 -->
<el-dialog
:title="currentVideoTitle"
+ class="ztzf-dialog-mange"
modal-class="videoDialog"
append-to-body
width="54%"
@@ -302,11 +329,13 @@
>
<div class="video-container">
<video
- style="width: 100%"
+ style="width: 100%;height: 500px"
class="videoBox"
ref="videoRefs"
controls
- autoplay
+ preload="auto"
+ @play="handleVideoPlay"
+ @ended="handleVideoEnded(index)"
:src="currentVideoUrl"
></video>
</div>
@@ -362,6 +391,23 @@
const currentAreaPosition = ref({ height: 1987280, latitude: 27.636112, longitude: 115.732975 });
let handler = null;
const switchFolders = ref(false)
+// 视频播放事件处理
+const handleVideoPlay = (event) => {
+ if (event.target.playbackRate !== 0.75) {
+ event.target.playbackRate = 0.75
+
+ }
+}
+const handleVideoEnded = index => {
+ // 获取当前视频
+ const video = videoRefs.value[index]
+
+ // 重置视频播放时间为 0
+ video.currentTime = 0
+
+ // 重新加载视频
+ video.load()
+}
function bytesToMB(bytes, decimalPlaces = 2) {
if (typeof bytes !== 'number' || bytes < 0) return '0';
return (bytes / 1048576).toFixed(decimalPlaces) + ' MB';
@@ -498,6 +544,7 @@
.then(res => {
folderList.value = res.data.data.records.map(i => ({ ...i, checked: false }))
total.value = res.data.data.total
+
})
.finally(() => {
loadings.value = false;
@@ -908,6 +955,12 @@
height: 0;
flex: 1;
overflow: auto;
+ :deep(.el-scrollbar__view) {
+ height: 100%;
+ }
+ :deep(.el-table--fit,.el-scrollbar__view) {
+ height: 100%;
+ }
.look {
color: #1c5cff;
@@ -1005,17 +1058,30 @@
width: 76px;
height: 72px;
}
+
.videoItem1 {
- .playBox {
- width: 20px;
- height: 20px;
- position: absolute;
- top: 46%;
- left: 43%;
- transform: translate(-50%, -50%);
- cursor: pointer;
- }
- }
+ position: relative;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+
+ min-height: 80px;
+}
+
+.playBox {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ cursor: pointer;
+
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+
+ z-index: 1;
+}
.videoDialog :deep(.el-dialog) {
height: 600px;
width: 54%;
--
Gitblit v1.9.3