| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051 |
- <template>
- <view class="container">
- <!-- 设备头部信息区域 -->
- <view class="device-header">
- <view class="device-info-row">
- <view class="device-name-container">
- <text class="device-name">{{ deviceInfo.name }}</text>
- <view
- class="status-tag"
- :class="deviceInfo.status === 'online' ? 'status-online' : 'status-offline'"
- >
- <view class="status-dot" :class="{'offline-dot': deviceInfo.status === 'offline'}"></view>
- {{ deviceInfo.status === 'online' ? '在线' : '离线' }}
- </view>
- </view>
- </view>
-
- <view class="device-meta-row">
- <view class="device-meta-item">
- <view class="meta-icon">
- <image src="/static/icons/device_icon.png" mode="aspectFit" style="width: 36rpx; height: 36rpx;"></image>
- </view>
- <text class="meta-label">设备编号:</text>
- <text class="meta-value">{{ deviceInfo.deviceId }}</text>
- </view>
-
- <view class="device-meta-item">
- <view class="meta-icon">
- <image src="/static/icons/location_icon.png" mode="aspectFit" style="width: 36rpx; height: 36rpx;"></image>
- </view>
- <text class="meta-label">安装位置:</text>
- <text class="meta-value">{{ deviceInfo.location }}</text>
- </view>
-
- <view class="device-meta-item">
- <view class="meta-icon">
- <image src="/static/icons/clock_icon.png" mode="aspectFit" style="width: 36rpx; height: 36rpx;"></image>
- </view>
- <text class="meta-label">最近更新:</text>
- <text class="meta-value">{{ deviceInfo.lastUpdate }}</text>
- </view>
- </view>
- </view>
-
- <!-- 视频预览区域 -->
- <view class="video-section">
- <view class="video-container">
- <image v-if="!isPlaying" src="/static/images/video-placeholder.jpg" mode="aspectFill" class="video-placeholder"></image>
- <video
- v-else
- id="videoPlayer"
- :src="deviceInfo.streamUrl"
- class="video-player"
- object-fit="cover"
- autoplay
- :controls="false"
- :show-center-play-btn="false"
- :show-fullscreen-btn="false"
- :show-play-btn="false"
- :enable-progress-gesture="false"
- @error="handleVideoError"
- ></video>
-
- <!-- 视频控制层 -->
- <view class="video-controls">
- <view class="control-row top-controls">
- <view class="signal-indicator">
- <image src="/static/icons/signal_icon.png" mode="aspectFit" style="width: 16px; height: 16px;"></image>
- <text class="signal-text">信号良好</text>
- </view>
-
- <view class="fullscreen-button" @click="toggleFullscreen">
- <image src="/static/icons/resize_icon.png" mode="aspectFit" style="width: 20px; height: 20px;"></image>
- </view>
- </view>
-
- <view class="control-row center-controls">
- <view v-if="!isPlaying" class="play-button" @click="togglePlayState">
- <image src="/static/icons/play_icon.png" mode="aspectFit" style="width: 32px; height: 32px;"></image>
- </view>
- <view v-else class="center-button-container" @click="togglePlayState">
- <view class="pause-icon">
- <image src="/static/icons/pause_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
- </view>
- </view>
-
- <view class="control-row bottom-controls">
- <view class="video-time">{{ currentTime }}</view>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 云台控制区域 -->
- <view class="ptz-section">
- <view class="section-title">云台控制</view>
-
- <view class="ptz-container">
- <!-- 圆形云台控制 -->
- <view class="ptz-circle-container">
- <!-- 上箭头 -->
- <view class="ptz-arrow ptz-up" @touchstart="controlPTZ('up', true)" @touchend="controlPTZ('up', false)">
- <image src="/static/icons/arrow_up_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
-
- <!-- 左箭头 -->
- <view class="ptz-arrow ptz-left" @touchstart="controlPTZ('left', true)" @touchend="controlPTZ('left', false)">
- <image src="/static/icons/arrow_left_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
-
- <!-- 中心拍照按钮 -->
- <view class="ptz-center" @click="takeScreenshot">
- <image src="/static/icons/camera_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
-
- <!-- 右箭头 -->
- <view class="ptz-arrow ptz-right" @touchstart="controlPTZ('right', true)" @touchend="controlPTZ('right', false)">
- <image src="/static/icons/arrow_right_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
-
- <!-- 下箭头 -->
- <view class="ptz-arrow ptz-down" @touchstart="controlPTZ('down', true)" @touchend="controlPTZ('down', false)">
- <image src="/static/icons/arrow_down_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
- </view>
-
- <!-- 底部操作按钮 -->
- <view class="ptz-bottom-controls">
- <view class="ptz-bottom-button" @touchstart="controlZoom('out', true)" @touchend="controlZoom('out', false)">
- <image src="/static/icons/zoom01_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
-
- <view class="ptz-bottom-button" @click="resetPTZ">
- <image src="/static/icons/resetPTZ_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
-
- <view class="ptz-bottom-button" @touchstart="controlZoom('in', true)" @touchend="controlZoom('in', false)">
- <image src="/static/icons/zoom02_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 快捷功能按钮 -->
- <view class="quick-actions">
- <view class="action-button" @click="toggleVoiceIntercom">
- <view class="action-icon">
- <image src="/static/icons/Voice_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
- <text class="action-text">语音对讲</text>
- </view>
-
- <view class="action-button" @click="toggleMute">
- <view class="action-icon">
- <image v-if="isMuted" src="/static/icons/muted_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- <image v-else src="/static/icons/unmuted_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
- <text class="action-text">{{ isMuted ? '取消静音' : '静音' }}</text>
- </view>
-
- <view class="action-button" @click="navigateToHistory">
- <view class="action-icon">
- <image src="/static/icons/action_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
- <text class="action-text">视频回看</text>
- </view>
- </view>
-
- <!-- 告警信息列表 -->
- <view class="alerts-section">
- <view class="section-title">
- <text>告警信息</text>
- <view class="alert-badge" v-if="getUnhandledAlerts.length > 0">{{ getUnhandledAlerts.length }}</view>
- </view>
-
- <view class="alerts-list" v-if="getUnhandledAlerts.length > 0">
- <view
- v-for="(item, index) in getUnhandledAlerts"
- :key="index"
- class="alert-item"
- :class="{
- 'alert-urgent': item.level === 'high',
- 'alert-warning': item.level === 'medium',
- 'alert-info': item.level === 'low'
- }"
- >
- <view class="alert-item-icon">
- <image v-if="item.level === 'high'" src="/static/icons/warning_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- <image v-else-if="item.level === 'medium'" src="/static/icons/info_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- <image v-else src="/static/icons/success_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
- </view>
-
- <view class="alert-item-info">
- <text class="alert-item-type">{{ item.type }}</text>
- <text class="alert-item-level">
- {{ item.level === 'high' ? '紧急' : item.level === 'medium' ? '警告' : '提示' }}
- </text>
- </view>
-
- <view class="alert-item-time">{{ item.time }}</view>
- </view>
- </view>
-
- <view v-else class="empty-alert">
- <text class="empty-text">暂无告警信息</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- deviceInfo: {
- deviceId: 'DEV1001',
- name: '监控设备-1',
- status: 'online',
- location: '西区B2地块',
- lastUpdate: '5分钟前',
- streamUrl: 'https://demo-rtsp-server-2h4n.onrender.com/stream.mp4',
- alertCount: 3
- },
- isPlaying: false,
- isMuted: false,
- isRecording: false,
- isFullscreen: false,
- isVoiceActive: false,
- isGridView: false,
- isZoomMode: false,
- currentTime: '14:30:25',
- // 模拟历史录像数据
- recordHistory: [
- { id: 1, startTime: '今天 12:30', duration: '00:15:30', url: '' },
- { id: 2, startTime: '今天 10:15', duration: '00:05:22', url: '' },
- { id: 3, startTime: '昨天 18:45', duration: '00:30:10', url: '' },
- { id: 4, startTime: '昨天 14:20', duration: '00:10:05', url: '' }
- ],
- // 模拟告警数据
- alertHistory: [
- { id: 1, time: '今天 13:05', type: '移动侦测', status: '未处理', level: 'high' },
- { id: 2, time: '今天 09:30', type: '信号异常', status: '未处理', level: 'medium' },
- { id: 3, time: '昨天 15:45', type: '设备状态', status: '已处理', level: 'low' },
- { id: 4, time: '昨天 10:20', type: '遮挡告警', status: '未处理', level: 'low' }
- ],
- videoContext: null
- }
- },
-
- computed: {
- // 获取所有未处理的告警
- getUnhandledAlerts() {
- return this.alertHistory.filter(alert => alert.status === '未处理');
- }
- },
-
- onReady() {
- // 获取视频实例
- this.videoContext = uni.createVideoContext('videoPlayer')
-
- // 设置页面标题
- uni.setNavigationBarTitle({
- title: this.deviceInfo.name
- })
-
- // 模拟更新时间
- this.startTimeUpdate()
- },
-
- onLoad(options) {
- // 如果有传入设备ID,则获取设备信息
- if (options && options.id) {
- this.fetchDeviceInfo(options.id)
- }
- },
-
- methods: {
- // 获取设备信息
- fetchDeviceInfo(deviceId) {
- // 这里应该是API请求,暂时用模拟数据
- console.log('获取设备信息:', deviceId)
- // 模拟异步获取数据
- setTimeout(() => {
- // 实际应该是API请求结果
- }, 500)
- },
-
- // 播放/暂停切换
- togglePlayState() {
- if (!this.isPlaying) {
- // 从未播放状态切换到播放状态
- this.isPlaying = true;
-
- // 短暂延迟确保视频元素已加载
- setTimeout(() => {
- if (this.videoContext) {
- this.videoContext.play();
- // 振动反馈
- uni.vibrateShort();
- }
- }, 300);
- } else {
- // 从播放状态切换到暂停状态
- if (this.videoContext) {
- this.videoContext.pause();
-
- // 在页面上显示暂停状态
- uni.showToast({
- title: '视频已暂停',
- icon: 'none',
- duration: 1500
- });
- }
- }
- },
-
- // 静音切换
- toggleMute() {
- this.isMuted = !this.isMuted
- if (this.videoContext) {
- if (this.isMuted) {
- this.videoContext.mute()
- } else {
- this.videoContext.unmute()
- }
- }
- },
-
- // 全屏切换
- toggleFullscreen() {
- if (!this.isPlaying) {
- // 如果视频未播放,先开始播放
- this.togglePlayState();
- // 延迟执行全屏操作,等待视频元素加载
- setTimeout(() => {
- if (this.videoContext) {
- this.videoContext.requestFullScreen();
- this.isFullscreen = true;
- }
- }, 500);
- } else if (this.videoContext) {
- if (!this.isFullscreen) {
- this.videoContext.requestFullScreen();
- } else {
- this.videoContext.exitFullScreen();
- }
- this.isFullscreen = !this.isFullscreen;
- }
- },
-
- // 切换九宫格视图
- toggleGridView() {
- this.isGridView = !this.isGridView
- uni.showToast({
- title: this.isGridView ? '切换到多画面模式' : '切换到单画面模式',
- icon: 'none'
- })
- },
-
- // 截图
- takeScreenshot() {
- // 模拟截图功能
- uni.showLoading({
- title: '截图中...'
- })
-
- setTimeout(() => {
- uni.hideLoading()
- uni.showToast({
- title: '截图已保存',
- icon: 'success'
- })
- }, 1000)
- },
-
- // 语音对讲
- toggleVoiceIntercom() {
- this.isVoiceActive = !this.isVoiceActive
-
- if (this.isVoiceActive) {
- uni.showToast({
- title: '语音对讲已开启',
- icon: 'none'
- })
- } else {
- uni.showToast({
- title: '语音对讲已关闭',
- icon: 'none'
- })
- }
- },
-
- // 云台控制
- controlPTZ(direction, isStart) {
- // 模拟云台控制
- if (isStart) {
- console.log(`开始控制云台: ${direction}`)
- uni.vibrateShort() // 短震动反馈
- } else {
- console.log(`停止控制云台: ${direction}`)
- }
- },
-
- // 云台复位
- resetPTZ() {
- console.log('云台复位')
- uni.vibrateShort() // 短震动反馈
- uni.showToast({
- title: '云台已复位',
- icon: 'none'
- })
- },
-
- // 变焦控制
- controlZoom(type, isStart) {
- // 模拟变焦控制
- if (isStart) {
- console.log(`开始控制变焦: ${type}`)
- uni.vibrateShort() // 短震动反馈
- } else {
- console.log(`停止控制变焦: ${type}`)
- }
- },
-
- // 切换缩放模式
- toggleZoom() {
- this.isZoomMode = !this.isZoomMode
- uni.showToast({
- title: this.isZoomMode ? '进入缩放模式' : '退出缩放模式',
- icon: 'none'
- })
- },
-
- // 添加预设位
- addPreset() {
- uni.showModal({
- title: '添加预设位',
- content: '是否保存当前位置为预设位?',
- success: (res) => {
- if (res.confirm) {
- uni.showToast({
- title: '预设位已保存',
- icon: 'success'
- })
- }
- }
- })
- },
-
- // 处理告警点击
- handleAlert(item) {
- uni.navigateTo({
- url: `/pages/alerts/alert-detail?alertId=${item.id}&deviceId=${this.deviceInfo.deviceId}`
- })
- },
-
- // 跳转到历史视频页面
- navigateToHistory() {
- uni.navigateTo({
- url: `/pages/video/history?deviceId=${this.deviceInfo.deviceId}`
- })
- },
-
- // 处理视频错误
- handleVideoError(e) {
- console.error('视频播放错误:', e)
- uni.showToast({
- title: '视频播放出错,请稍后再试',
- icon: 'none'
- })
- },
-
- // 更新时间
- startTimeUpdate() {
- // 模拟时间更新
- setInterval(() => {
- const now = new Date()
- const hours = String(now.getHours()).padStart(2, '0')
- const minutes = String(now.getMinutes()).padStart(2, '0')
- const seconds = String(now.getSeconds()).padStart(2, '0')
- this.currentTime = `${hours}:${minutes}:${seconds}`
- }, 1000)
- }
- }
- }
- </script>
- <style>
- /* 基础样式 */
- .container {
- display: flex;
- flex-direction: column;
- min-height: 100vh;
- background-color: #F8FCF9;
- padding-bottom: 30rpx;
- }
- /* 设备头部样式 */
- .device-header {
- background-color: #FFFFFF;
- border-radius: 20rpx;
- padding: 26rpx 30rpx 30rpx;
- margin: 20rpx 30rpx 20rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
- }
- .device-info-row {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- margin-bottom: 24rpx;
- }
- .device-name-container {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- }
- .device-name {
- font-size: 34rpx;
- color: #333333;
- font-weight: 600;
- margin-bottom: 10rpx;
- }
- .status-tag {
- padding: 4rpx 12rpx 4rpx 24rpx;
- border-radius: 30rpx;
- font-size: 22rpx;
- font-weight: 500;
- flex-shrink: 0;
- position: relative;
- overflow: hidden;
- }
- .status-online {
- background-color: rgba(76, 175, 80, 0.1);
- color: #3BB44A;
- }
- .status-offline {
- background-color: rgba(245, 108, 108, 0.1);
- color: #F56C6C;
- padding-left: 24rpx;
- }
- .status-dot {
- position: absolute;
- width: 6rpx;
- height: 6rpx;
- background-color: #3BB44A;
- border-radius: 50%;
- top: 50%;
- left: 12rpx;
- transform: translateY(-50%);
- box-shadow: 0 0 4rpx rgba(76, 175, 80, 0.8);
- animation: blink 1.5s infinite;
- display: inline-block;
- }
- .status-dot.offline-dot {
- background-color: #F56C6C;
- box-shadow: 0 0 4rpx rgba(245, 108, 108, 0.8);
- }
- @keyframes blink {
- 0% {
- opacity: 0.4;
- }
- 50% {
- opacity: 1;
- }
- 100% {
- opacity: 0.4;
- }
- }
- .device-meta-row {
- display: flex;
- flex-direction: column;
- }
- .device-meta-item {
- display: flex;
- align-items: center;
- font-size: 26rpx;
- margin-top: 18rpx;
- }
- .meta-icon {
- width: 36rpx;
- height: 36rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 8rpx;
- }
- .meta-label {
- color: #999999;
- min-width: 140rpx;
- font-size: 26rpx;
- }
- .meta-value {
- color: #333333;
- flex: 1;
- font-size: 26rpx;
- }
- /* 视频预览区域 */
- .video-section {
- margin: 0 30rpx 20rpx;
- }
- .video-container {
- position: relative;
- width: 100%;
- height: 420rpx; /* 16:9比例 */
- background-color: #000000;
- border-radius: 16rpx;
- overflow: hidden;
- box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.1);
- }
- .video-player, .video-placeholder {
- width: 100%;
- height: 100%;
- }
- .video-controls {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- padding: 20rpx;
- box-sizing: border-box;
- background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.4) 100%);
- }
- .control-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- }
- .top-controls {
- height: 80rpx;
- }
- .center-controls {
- height: 120rpx;
- justify-content: center;
- align-items: center;
- }
- .bottom-controls {
- height: 80rpx;
- }
- .signal-indicator {
- display: flex;
- align-items: center;
- color: #FFFFFF;
- font-size: 24rpx;
- background-color: rgba(0, 0, 0, 0.5);
- padding: 8rpx 16rpx;
- border-radius: 30rpx;
- }
- .signal-indicator svg {
- margin-right: 8rpx;
- }
- .signal-text {
- font-weight: 500;
- }
- .fullscreen-button {
- width: 60rpx;
- height: 60rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #FFFFFF;
- background-color: rgba(0, 0, 0, 0.5);
- border-radius: 50%;
- transition: all 0.2s;
- }
- .fullscreen-button:active {
- background-color: rgba(76, 175, 80, 0.7);
- transform: scale(0.9);
- }
- .video-time {
- color: #FFFFFF;
- font-size: 26rpx;
- background-color: rgba(0, 0, 0, 0.5);
- padding: 6rpx 16rpx;
- border-radius: 30rpx;
- font-weight: 500;
- }
- .play-button {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- background-color: rgba(255, 255, 255, 0.9);
- display: flex;
- align-items: center;
- justify-content: center;
- box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.5);
- transition: all 0.2s;
- transform: scale(1);
- }
- .play-button:active {
- transform: scale(0.92);
- background-color: rgba(255, 255, 255, 1);
- }
- .center-button-container {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .pause-icon {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- align-items: center;
- justify-content: center;
- opacity: 0;
- transition: opacity 0.3s;
- }
- .center-button-container:active .pause-icon {
- opacity: 1;
- background-color: rgba(76, 175, 80, 0.7);
- }
- /* 云台控制区域 */
- .ptz-section {
- margin: 0 30rpx 20rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx;
- padding: 24rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
- }
- .section-title {
- font-size: 30rpx;
- font-weight: 600;
- color: #333333;
- margin-bottom: 20rpx;
- padding: 0 10rpx;
- display: flex;
- align-items: center;
- }
- .alert-badge {
- background-color: #F56C6C;
- color: #FFFFFF;
- font-size: 22rpx;
- border-radius: 30rpx;
- padding: 2rpx 12rpx;
- margin-left: 12rpx;
- font-weight: normal;
- min-width: 32rpx;
- text-align: center;
- }
- .ptz-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 20rpx 0;
- }
- .ptz-circle-container {
- position: relative;
- width: 300rpx;
- height: 300rpx;
- margin: 20rpx 0;
- }
- .ptz-arrow {
- position: absolute;
- width: 70rpx;
- height: 70rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #F0F9F0;
- border-radius: 50%;
- color: #3BB44A;
- font-size: 36rpx;
- transition: all 0.2s;
- box-shadow: 0 2rpx 10rpx rgba(76, 175, 80, 0.15);
- }
- .ptz-up {
- top: 0;
- left: 50%;
- transform: translateX(-50%);
- }
- .ptz-down {
- bottom: 0;
- left: 50%;
- transform: translateX(-50%);
- }
- .ptz-left {
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- }
- .ptz-right {
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- }
- .ptz-center {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 90rpx;
- height: 90rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #F0F9F0;
- border-radius: 50%;
- color: #3BB44A;
- font-size: 36rpx;
- transition: all 0.2s;
- box-shadow: 0 2rpx 10rpx rgba(76, 175, 80, 0.15);
- }
- .ptz-arrow:active, .ptz-center:active {
- background-color: #3BB44A;
- transform-origin: center;
- }
- .ptz-arrow:active svg path, .ptz-center:active svg path {
- fill: #FFFFFF;
- }
- .ptz-up:active {
- transform: scale(0.92) translateX(-50%);
- }
- .ptz-down:active {
- transform: scale(0.92) translateX(-50%);
- }
- .ptz-left:active {
- transform: scale(0.92) translateY(-50%);
- }
- .ptz-right:active {
- transform: scale(0.92) translateY(-50%);
- }
- .ptz-center:active {
- transform: translate(-50%, -50%) scale(0.92);
- }
- .ptz-bottom-controls {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 300rpx;
- margin-top: 30rpx;
- }
- .ptz-bottom-button {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- background-color: #F0F9F0;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #3BB44A;
- font-size: 32rpx;
- font-weight: 500;
- transition: all 0.2s;
- box-shadow: 0 2rpx 10rpx rgba(76, 175, 80, 0.1);
- }
- .ptz-bottom-button:active {
- background-color: #3BB44A;
- color: #FFFFFF;
- transform: scale(0.92);
- }
- .ptz-bottom-button:active svg path {
- fill: #FFFFFF;
- }
- /* 快捷功能按钮 */
- .quick-actions {
- display: flex;
- justify-content: space-evenly;
- margin: 0 30rpx 20rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx;
- padding: 24rpx 30rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
- }
- .action-button {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 160rpx;
- }
- .action-icon {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- background-color: #F0F9F0;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #3BB44A;
- margin-bottom: 12rpx;
- transition: all 0.2s;
- box-shadow: 0 4rpx 12rpx rgba(76, 175, 80, 0.1);
- }
- .action-icon:active {
- background-color: #3BB44A;
- transform: scale(0.92);
- }
- .action-icon:active svg path {
- fill: #FFFFFF;
- }
- .action-text {
- font-size: 24rpx;
- color: #666666;
- text-align: center;
- }
- /* 告警信息列表 */
- .alerts-section {
- margin: 0 30rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx;
- padding: 24rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
- }
- .alerts-list {
- display: flex;
- flex-direction: column;
- }
- .alert-item {
- display: flex;
- align-items: center;
- padding: 24rpx 20rpx;
- border-radius: 12rpx;
- margin-bottom: 16rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
- position: relative;
- }
- .alert-urgent {
- background-color: #FEF3F3;
- border-left: 4rpx solid #F56C6C;
- }
- .alert-warning {
- background-color: #FFF8E6;
- border-left: 4rpx solid #E6A23C;
- }
- .alert-info {
- background-color: #F2FAF5;
- border-left: 4rpx solid #67C23A;
- }
- .alert-item-icon {
- width: 50rpx;
- height: 50rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 16rpx;
- }
- .alert-item-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .alert-item-type {
- font-size: 28rpx;
- color: #333333;
- font-weight: 500;
- margin-bottom: 8rpx;
- }
- .alert-item-level {
- font-size: 24rpx;
- color: #999999;
- }
- .alert-item-time {
- font-size: 24rpx;
- color: #999999;
- margin-left: 16rpx;
- min-width: 100rpx;
- text-align: right;
- }
- .empty-alert {
- padding: 60rpx 0;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .empty-text {
- font-size: 28rpx;
- color: #999999;
- }
- </style>
|