From d8136d2b9065977e2607453e8fbf2e0f6b7c0158 Mon Sep 17 00:00:00 2001 From: zuoxiao <zuoxiao> Date: 星期五, 29 八月 2025 16:59:13 +0800 Subject: [PATCH] 更新监测页面,添加分页功能以提升用户体验;修改视频列表接口调用逻辑,优化数据处理;更新样式以增强可视化效果。 --- pages/stationMonitor/stationMonitor.wxml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 54 insertions(+), 6 deletions(-) diff --git a/pages/stationMonitor/stationMonitor.wxml b/pages/stationMonitor/stationMonitor.wxml index 7723357..75a93fc 100644 --- a/pages/stationMonitor/stationMonitor.wxml +++ b/pages/stationMonitor/stationMonitor.wxml @@ -87,7 +87,7 @@ </view> <view class="data-content"> <text class="data-label">绱绾�(mW/m虏)</text> - <text class="data-value">{{currentWeatherStation.uv !== null && currentWeatherStation.uv !== undefined ? currentWeatherStation.uv : '--'}}</text> + <text class="data-value">{{currentWeatherStation.uv !== null && currentWeatherStation.uv !== undefined ? currentWeatherStation.uv : '--'}} mW</text> </view> </view> @@ -98,7 +98,7 @@ </view> <view class="data-content"> <text class="data-label">鍏夌収寮哄害(lm/銕�)</text> - <text class="data-value">{{currentWeatherStation.light !== null && currentWeatherStation.light !== undefined ? currentWeatherStation.light : '--'}} lux</text> + <text class="data-value">{{currentWeatherStation.light !== null && currentWeatherStation.light !== undefined ? currentWeatherStation.light : '--'}} lm</text> </view> </view> @@ -355,6 +355,25 @@ <view class="monitoring-data"> <text class="section-title">鐩戞祴鏁版嵁</text> <view class="data-grid"> + <!-- 娉ㄨ偉娉电姸鎬� --> + <view class="data-item pump-status custom-pump-row"> + <view class="data-icon"> + <image src="/images/custompump.svg" /> + </view> + <view class="data-content"> + <text class="data-label">娉ㄨ偉娉电姸鎬�</text> + <text class="data-value {{currentFertilizerStation.alarm === 1 ? 'alarm' : 'normal'}}"> + {{currentFertilizerStation.alarm === 1 ? '鎶ヨ' : '姝e父'}} + </text> + </view> + <button wx:if="{{currentFertilizerStation.alarm === 1}}" + class="clear-fault-btn" + bind:tap="clearAlarm" + size="mini"> + 娓呴櫎鎶ヨ + </button> + </view> + <!-- 鑲ユ枡娴侀噺 --> <view class="data-item waste-flow"> <view class="data-icon"> @@ -451,17 +470,18 @@ <!-- 閿欒鐘舵�� --> <view wx:elif="{{item.urlError}}" class="video-error"> <image class="error-icon" src="/images/error.svg" /> - <text class="error-text">鑾峰彇鎾斁鍦板潃澶辫触</text> - <button class="retry-btn" bind:tap="retryGetHlsUrl" data-camera="{{item}}"> + <text class="error-text">璁惧绂荤嚎</text> + <!-- <button class="retry-btn" bind:tap="retryGetHlsUrl" data-camera="{{item}}"> <image class="retry-icon" src="/images/refresh.svg" /> <text>閲嶈瘯</text> - </button> + </button> --> </view> <!-- 姝e父鎾斁鐘舵�� --> <view wx:elif="{{item.onLine && item.hslUrl}}" class="video-wrapper"> <!-- 鐩存挱鎾斁鍣ㄧ粍浠� --> - <ezplayer class="video-wrapper-ezplayer" id="ezplayer-{{item.id}}" accessToken="{{item.accessToken}}" url="{{item.hslUrl}}" deviceSerial="{{item.deviceSerial}}" channelNo="1" plugins="capture,ptz,mirror" watermark="澶х" autoPlay="{{true}}" theme="{{ { showFullScreenBtn: true, showHdBtn: true, showTimeLine: true } }}" bind:handleError="handleError" bind:onControlEvent="onControlEvent" /> + <ezplayer class="video-wrapper-ezplayer" id="ezplayer-{{item.id}}" accessToken="{{item.accessToken}}" url="{{item.hslUrl}}" + deviceSerial="{{item.deviceSerial}}" channelNo="1" plugins="capture,ptz,mirror" watermark="澶х" autoPlay="{{true}}" theme="{{ { showFullScreenBtn: true, showHdBtn: true, showTimeLine: true } }}" bind:handleError="handleError" bind:onControlEvent="onControlEvent" /> </view> <!-- 绂荤嚎鐘舵�佹樉绀� --> @@ -481,6 +501,34 @@ </view> </view> + <!-- 鍒嗛〉缁勪欢 --> + <view wx:if="{{cameraList.length > 0}}" class="pagination"> + <view class="pagination-info"> + <text class="pagination-text">鍏� {{totalCount}} 涓憚鍍忓ご锛屽綋鍓嶇 {{currentPage}} 椤�</text> + </view> + <view class="pagination-controls"> + <!-- 涓婁竴椤垫寜閽� - 浣跨敤鍗犱綅闅愯棌 --> + <button class="pagination-btn prev-btn {{currentPage <= 1 ? 'hidden' : ''}}" + bind:tap="prevPage" + disabled="{{currentPage <= 1}}"> + <text class="btn-text">涓婁竴椤�</text> + </button> + + <view class="page-info"> + <text class="page-number">{{currentPage}}</text> + <text class="page-separator">/</text> + <text class="total-pages">{{totalPages}}</text> + </view> + + <!-- 涓嬩竴椤垫寜閽� - 浣跨敤鍗犱綅闅愯棌 --> + <button class="pagination-btn next-btn {{currentPage >= totalPages ? 'hidden' : ''}}" + bind:tap="nextPage" + disabled="{{currentPage >= totalPages}}"> + <text class="btn-text">涓嬩竴椤�</text> + </button> + </view> + </view> + <!-- 鏃犳暟鎹彁绀� --> <view wx:if="{{cameraList.length === 0}}" class="no-data"> <image class="no-data-icon" src="/images/no-data.svg" /> -- Gitblit v1.8.0