detail-camera.vue 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052
  1. <template>
  2. <view class="container">
  3. <!-- 设备头部信息区域 -->
  4. <view class="device-header">
  5. <view class="device-info-row">
  6. <view class="device-name-container">
  7. <text class="device-name">{{ deviceInfo.name }}</text>
  8. <view
  9. class="status-tag"
  10. :class="deviceInfo.status === 'online' ? 'status-online' : 'status-offline'"
  11. >
  12. <view class="status-dot" :class="{'offline-dot': deviceInfo.status === 'offline'}"></view>
  13. {{ deviceInfo.status === 'online' ? '在线' : '离线' }}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="device-meta-row">
  18. <view class="device-meta-item">
  19. <view class="meta-icon">
  20. <image src="/static/icons/device_icon.png" mode="aspectFit" style="width: 36rpx; height: 36rpx;"></image>
  21. </view>
  22. <text class="meta-label">设备编号:</text>
  23. <text class="meta-value">{{ deviceInfo.deviceId }}</text>
  24. </view>
  25. <view class="device-meta-item">
  26. <view class="meta-icon">
  27. <image src="/static/icons/location_icon.png" mode="aspectFit" style="width: 36rpx; height: 36rpx;"></image>
  28. </view>
  29. <text class="meta-label">安装位置:</text>
  30. <text class="meta-value">{{ deviceInfo.location }}</text>
  31. </view>
  32. <view class="device-meta-item">
  33. <view class="meta-icon">
  34. <image src="/static/icons/clock_icon.png" mode="aspectFit" style="width: 36rpx; height: 36rpx;"></image>
  35. </view>
  36. <text class="meta-label">最近更新:</text>
  37. <text class="meta-value">{{ deviceInfo.lastUpdate }}</text>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 视频预览区域 -->
  42. <view class="video-section">
  43. <view class="video-container">
  44. <image v-if="!isPlaying" src="/static/images/video-placeholder.jpg" mode="aspectFill" class="video-placeholder"></image>
  45. <!-- <video
  46. v-else
  47. id="videoPlayer"
  48. :src="deviceInfo.streamUrl"
  49. class="video-player"
  50. object-fit="cover"
  51. autoplay
  52. :controls="false"
  53. :show-center-play-btn="false"
  54. :show-fullscreen-btn="false"
  55. :show-play-btn="false"
  56. :enable-progress-gesture="false"
  57. @error="handleVideoError"
  58. ></video> -->
  59. <iframe v-else src="http://121.4.16.100:28080/#/play/wasm/ws%3A%2F%2F121.4.16.100%3A6080%2Frtp%2F34020000001110000001_34020000001320000012.live.flv"></iframe>
  60. <!-- 视频控制层 -->
  61. <view class="video-controls">
  62. <view class="control-row top-controls">
  63. <view class="signal-indicator">
  64. <image src="/static/icons/signal_icon.png" mode="aspectFit" style="width: 16px; height: 16px;"></image>
  65. <text class="signal-text">信号良好</text>
  66. </view>
  67. <view class="fullscreen-button" @click="toggleFullscreen">
  68. <image src="/static/icons/resize_icon.png" mode="aspectFit" style="width: 20px; height: 20px;"></image>
  69. </view>
  70. </view>
  71. <view class="control-row center-controls">
  72. <view v-if="!isPlaying" class="play-button" @click="togglePlayState">
  73. <image src="/static/icons/play_icon.png" mode="aspectFit" style="width: 32px; height: 32px;"></image>
  74. </view>
  75. <view v-else class="center-button-container" @click="togglePlayState">
  76. <view class="pause-icon">
  77. <image src="/static/icons/pause_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="control-row bottom-controls">
  82. <view class="video-time">{{ currentTime }}</view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <!-- 云台控制区域 -->
  88. <view class="ptz-section">
  89. <view class="section-title">云台控制</view>
  90. <view class="ptz-container">
  91. <!-- 圆形云台控制 -->
  92. <view class="ptz-circle-container">
  93. <!-- 上箭头 -->
  94. <view class="ptz-arrow ptz-up" @touchstart="controlPTZ('up', true)" @touchend="controlPTZ('up', false)">
  95. <image src="/static/icons/arrow_up_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  96. </view>
  97. <!-- 左箭头 -->
  98. <view class="ptz-arrow ptz-left" @touchstart="controlPTZ('left', true)" @touchend="controlPTZ('left', false)">
  99. <image src="/static/icons/arrow_left_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  100. </view>
  101. <!-- 中心拍照按钮 -->
  102. <view class="ptz-center" @click="takeScreenshot">
  103. <image src="/static/icons/camera_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  104. </view>
  105. <!-- 右箭头 -->
  106. <view class="ptz-arrow ptz-right" @touchstart="controlPTZ('right', true)" @touchend="controlPTZ('right', false)">
  107. <image src="/static/icons/arrow_right_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  108. </view>
  109. <!-- 下箭头 -->
  110. <view class="ptz-arrow ptz-down" @touchstart="controlPTZ('down', true)" @touchend="controlPTZ('down', false)">
  111. <image src="/static/icons/arrow_down_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  112. </view>
  113. </view>
  114. <!-- 底部操作按钮 -->
  115. <view class="ptz-bottom-controls">
  116. <view class="ptz-bottom-button" @touchstart="controlZoom('out', true)" @touchend="controlZoom('out', false)">
  117. <image src="/static/icons/zoom01_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  118. </view>
  119. <view class="ptz-bottom-button" @click="resetPTZ">
  120. <image src="/static/icons/resetPTZ_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  121. </view>
  122. <view class="ptz-bottom-button" @touchstart="controlZoom('in', true)" @touchend="controlZoom('in', false)">
  123. <image src="/static/icons/zoom02_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. <!-- 快捷功能按钮 -->
  129. <view class="quick-actions">
  130. <view class="action-button" @click="toggleVoiceIntercom">
  131. <view class="action-icon">
  132. <image src="/static/icons/Voice_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  133. </view>
  134. <text class="action-text">语音对讲</text>
  135. </view>
  136. <view class="action-button" @click="toggleMute">
  137. <view class="action-icon">
  138. <image v-if="isMuted" src="/static/icons/muted_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  139. <image v-else src="/static/icons/unmuted_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  140. </view>
  141. <text class="action-text">{{ isMuted ? '取消静音' : '静音' }}</text>
  142. </view>
  143. <view class="action-button" @click="navigateToHistory">
  144. <view class="action-icon">
  145. <image src="/static/icons/action_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  146. </view>
  147. <text class="action-text">视频回看</text>
  148. </view>
  149. </view>
  150. <!-- 告警信息列表 -->
  151. <view class="alerts-section">
  152. <view class="section-title">
  153. <text>告警信息</text>
  154. <view class="alert-badge" v-if="getUnhandledAlerts.length > 0">{{ getUnhandledAlerts.length }}</view>
  155. </view>
  156. <view class="alerts-list" v-if="getUnhandledAlerts.length > 0">
  157. <view
  158. v-for="(item, index) in getUnhandledAlerts"
  159. :key="index"
  160. class="alert-item"
  161. :class="{
  162. 'alert-urgent': item.level === 'high',
  163. 'alert-warning': item.level === 'medium',
  164. 'alert-info': item.level === 'low'
  165. }"
  166. >
  167. <view class="alert-item-icon">
  168. <image v-if="item.level === 'high'" src="/static/icons/warning_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  169. <image v-else-if="item.level === 'medium'" src="/static/icons/info_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  170. <image v-else src="/static/icons/success_icon.png" mode="aspectFit" style="width: 24px; height: 24px;"></image>
  171. </view>
  172. <view class="alert-item-info">
  173. <text class="alert-item-type">{{ item.type }}</text>
  174. <text class="alert-item-level">
  175. {{ item.level === 'high' ? '紧急' : item.level === 'medium' ? '警告' : '提示' }}
  176. </text>
  177. </view>
  178. <view class="alert-item-time">{{ item.time }}</view>
  179. </view>
  180. </view>
  181. <view v-else class="empty-alert">
  182. <text class="empty-text">暂无告警信息</text>
  183. </view>
  184. </view>
  185. </view>
  186. </template>
  187. <script>
  188. export default {
  189. data() {
  190. return {
  191. deviceInfo: {
  192. deviceId: 'DEV1001',
  193. name: '监控设备-1',
  194. status: 'online',
  195. location: '西区B2地块',
  196. lastUpdate: '5分钟前',
  197. streamUrl: 'https://demo-rtsp-server-2h4n.onrender.com/stream.mp4',
  198. alertCount: 3
  199. },
  200. isPlaying: false,
  201. isMuted: false,
  202. isRecording: false,
  203. isFullscreen: false,
  204. isVoiceActive: false,
  205. isGridView: false,
  206. isZoomMode: false,
  207. currentTime: '14:30:25',
  208. // 模拟历史录像数据
  209. recordHistory: [
  210. { id: 1, startTime: '今天 12:30', duration: '00:15:30', url: '' },
  211. { id: 2, startTime: '今天 10:15', duration: '00:05:22', url: '' },
  212. { id: 3, startTime: '昨天 18:45', duration: '00:30:10', url: '' },
  213. { id: 4, startTime: '昨天 14:20', duration: '00:10:05', url: '' }
  214. ],
  215. // 模拟告警数据
  216. alertHistory: [
  217. { id: 1, time: '今天 13:05', type: '移动侦测', status: '未处理', level: 'high' },
  218. { id: 2, time: '今天 09:30', type: '信号异常', status: '未处理', level: 'medium' },
  219. { id: 3, time: '昨天 15:45', type: '设备状态', status: '已处理', level: 'low' },
  220. { id: 4, time: '昨天 10:20', type: '遮挡告警', status: '未处理', level: 'low' }
  221. ],
  222. videoContext: null
  223. }
  224. },
  225. computed: {
  226. // 获取所有未处理的告警
  227. getUnhandledAlerts() {
  228. return this.alertHistory.filter(alert => alert.status === '未处理');
  229. }
  230. },
  231. onReady() {
  232. // 获取视频实例
  233. this.videoContext = uni.createVideoContext('videoPlayer')
  234. // 设置页面标题
  235. uni.setNavigationBarTitle({
  236. title: this.deviceInfo.name
  237. })
  238. // 模拟更新时间
  239. this.startTimeUpdate()
  240. },
  241. onLoad(options) {
  242. // 如果有传入设备ID,则获取设备信息
  243. if (options && options.id) {
  244. this.fetchDeviceInfo(options.id)
  245. }
  246. },
  247. methods: {
  248. // 获取设备信息
  249. fetchDeviceInfo(deviceId) {
  250. // 这里应该是API请求,暂时用模拟数据
  251. console.log('获取设备信息:', deviceId)
  252. // 模拟异步获取数据
  253. setTimeout(() => {
  254. // 实际应该是API请求结果
  255. }, 500)
  256. },
  257. // 播放/暂停切换
  258. togglePlayState() {
  259. if (!this.isPlaying) {
  260. // 从未播放状态切换到播放状态
  261. this.isPlaying = true;
  262. // 短暂延迟确保视频元素已加载
  263. setTimeout(() => {
  264. if (this.videoContext) {
  265. this.videoContext.play();
  266. // 振动反馈
  267. uni.vibrateShort();
  268. }
  269. }, 300);
  270. } else {
  271. // 从播放状态切换到暂停状态
  272. if (this.videoContext) {
  273. this.videoContext.pause();
  274. // 在页面上显示暂停状态
  275. uni.showToast({
  276. title: '视频已暂停',
  277. icon: 'none',
  278. duration: 1500
  279. });
  280. }
  281. }
  282. },
  283. // 静音切换
  284. toggleMute() {
  285. this.isMuted = !this.isMuted
  286. if (this.videoContext) {
  287. if (this.isMuted) {
  288. this.videoContext.mute()
  289. } else {
  290. this.videoContext.unmute()
  291. }
  292. }
  293. },
  294. // 全屏切换
  295. toggleFullscreen() {
  296. if (!this.isPlaying) {
  297. // 如果视频未播放,先开始播放
  298. this.togglePlayState();
  299. // 延迟执行全屏操作,等待视频元素加载
  300. setTimeout(() => {
  301. if (this.videoContext) {
  302. this.videoContext.requestFullScreen();
  303. this.isFullscreen = true;
  304. }
  305. }, 500);
  306. } else if (this.videoContext) {
  307. if (!this.isFullscreen) {
  308. this.videoContext.requestFullScreen();
  309. } else {
  310. this.videoContext.exitFullScreen();
  311. }
  312. this.isFullscreen = !this.isFullscreen;
  313. }
  314. },
  315. // 切换九宫格视图
  316. toggleGridView() {
  317. this.isGridView = !this.isGridView
  318. uni.showToast({
  319. title: this.isGridView ? '切换到多画面模式' : '切换到单画面模式',
  320. icon: 'none'
  321. })
  322. },
  323. // 截图
  324. takeScreenshot() {
  325. // 模拟截图功能
  326. uni.showLoading({
  327. title: '截图中...'
  328. })
  329. setTimeout(() => {
  330. uni.hideLoading()
  331. uni.showToast({
  332. title: '截图已保存',
  333. icon: 'success'
  334. })
  335. }, 1000)
  336. },
  337. // 语音对讲
  338. toggleVoiceIntercom() {
  339. this.isVoiceActive = !this.isVoiceActive
  340. if (this.isVoiceActive) {
  341. uni.showToast({
  342. title: '语音对讲已开启',
  343. icon: 'none'
  344. })
  345. } else {
  346. uni.showToast({
  347. title: '语音对讲已关闭',
  348. icon: 'none'
  349. })
  350. }
  351. },
  352. // 云台控制
  353. controlPTZ(direction, isStart) {
  354. // 模拟云台控制
  355. if (isStart) {
  356. console.log(`开始控制云台: ${direction}`)
  357. uni.vibrateShort() // 短震动反馈
  358. } else {
  359. console.log(`停止控制云台: ${direction}`)
  360. }
  361. },
  362. // 云台复位
  363. resetPTZ() {
  364. console.log('云台复位')
  365. uni.vibrateShort() // 短震动反馈
  366. uni.showToast({
  367. title: '云台已复位',
  368. icon: 'none'
  369. })
  370. },
  371. // 变焦控制
  372. controlZoom(type, isStart) {
  373. // 模拟变焦控制
  374. if (isStart) {
  375. console.log(`开始控制变焦: ${type}`)
  376. uni.vibrateShort() // 短震动反馈
  377. } else {
  378. console.log(`停止控制变焦: ${type}`)
  379. }
  380. },
  381. // 切换缩放模式
  382. toggleZoom() {
  383. this.isZoomMode = !this.isZoomMode
  384. uni.showToast({
  385. title: this.isZoomMode ? '进入缩放模式' : '退出缩放模式',
  386. icon: 'none'
  387. })
  388. },
  389. // 添加预设位
  390. addPreset() {
  391. uni.showModal({
  392. title: '添加预设位',
  393. content: '是否保存当前位置为预设位?',
  394. success: (res) => {
  395. if (res.confirm) {
  396. uni.showToast({
  397. title: '预设位已保存',
  398. icon: 'success'
  399. })
  400. }
  401. }
  402. })
  403. },
  404. // 处理告警点击
  405. handleAlert(item) {
  406. uni.navigateTo({
  407. url: `/pages/alerts/alert-detail?alertId=${item.id}&deviceId=${this.deviceInfo.deviceId}`
  408. })
  409. },
  410. // 跳转到历史视频页面
  411. navigateToHistory() {
  412. uni.navigateTo({
  413. url: `/pages/video/history?deviceId=${this.deviceInfo.deviceId}`
  414. })
  415. },
  416. // 处理视频错误
  417. handleVideoError(e) {
  418. console.error('视频播放错误:', e)
  419. uni.showToast({
  420. title: '视频播放出错,请稍后再试',
  421. icon: 'none'
  422. })
  423. },
  424. // 更新时间
  425. startTimeUpdate() {
  426. // 模拟时间更新
  427. setInterval(() => {
  428. const now = new Date()
  429. const hours = String(now.getHours()).padStart(2, '0')
  430. const minutes = String(now.getMinutes()).padStart(2, '0')
  431. const seconds = String(now.getSeconds()).padStart(2, '0')
  432. this.currentTime = `${hours}:${minutes}:${seconds}`
  433. }, 1000)
  434. }
  435. }
  436. }
  437. </script>
  438. <style>
  439. /* 基础样式 */
  440. .container {
  441. display: flex;
  442. flex-direction: column;
  443. min-height: 100vh;
  444. background-color: #F8FCF9;
  445. padding-bottom: 30rpx;
  446. }
  447. /* 设备头部样式 */
  448. .device-header {
  449. background-color: #FFFFFF;
  450. border-radius: 20rpx;
  451. padding: 26rpx 30rpx 30rpx;
  452. margin: 20rpx 30rpx 20rpx;
  453. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
  454. }
  455. .device-info-row {
  456. display: flex;
  457. justify-content: space-between;
  458. align-items: flex-start;
  459. margin-bottom: 24rpx;
  460. }
  461. .device-name-container {
  462. display: flex;
  463. flex-direction: column;
  464. align-items: flex-start;
  465. }
  466. .device-name {
  467. font-size: 34rpx;
  468. color: #333333;
  469. font-weight: 600;
  470. margin-bottom: 10rpx;
  471. }
  472. .status-tag {
  473. padding: 4rpx 12rpx 4rpx 24rpx;
  474. border-radius: 30rpx;
  475. font-size: 22rpx;
  476. font-weight: 500;
  477. flex-shrink: 0;
  478. position: relative;
  479. overflow: hidden;
  480. }
  481. .status-online {
  482. background-color: rgba(76, 175, 80, 0.1);
  483. color: #3BB44A;
  484. }
  485. .status-offline {
  486. background-color: rgba(245, 108, 108, 0.1);
  487. color: #F56C6C;
  488. padding-left: 24rpx;
  489. }
  490. .status-dot {
  491. position: absolute;
  492. width: 6rpx;
  493. height: 6rpx;
  494. background-color: #3BB44A;
  495. border-radius: 50%;
  496. top: 50%;
  497. left: 12rpx;
  498. transform: translateY(-50%);
  499. box-shadow: 0 0 4rpx rgba(76, 175, 80, 0.8);
  500. animation: blink 1.5s infinite;
  501. display: inline-block;
  502. }
  503. .status-dot.offline-dot {
  504. background-color: #F56C6C;
  505. box-shadow: 0 0 4rpx rgba(245, 108, 108, 0.8);
  506. }
  507. @keyframes blink {
  508. 0% {
  509. opacity: 0.4;
  510. }
  511. 50% {
  512. opacity: 1;
  513. }
  514. 100% {
  515. opacity: 0.4;
  516. }
  517. }
  518. .device-meta-row {
  519. display: flex;
  520. flex-direction: column;
  521. }
  522. .device-meta-item {
  523. display: flex;
  524. align-items: center;
  525. font-size: 26rpx;
  526. margin-top: 18rpx;
  527. }
  528. .meta-icon {
  529. width: 36rpx;
  530. height: 36rpx;
  531. display: flex;
  532. align-items: center;
  533. justify-content: center;
  534. margin-right: 8rpx;
  535. }
  536. .meta-label {
  537. color: #999999;
  538. min-width: 140rpx;
  539. font-size: 26rpx;
  540. }
  541. .meta-value {
  542. color: #333333;
  543. flex: 1;
  544. font-size: 26rpx;
  545. }
  546. /* 视频预览区域 */
  547. .video-section {
  548. margin: 0 30rpx 20rpx;
  549. }
  550. .video-container {
  551. position: relative;
  552. width: 100%;
  553. height: 420rpx; /* 16:9比例 */
  554. background-color: #000000;
  555. border-radius: 16rpx;
  556. overflow: hidden;
  557. box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.1);
  558. }
  559. .video-player, .video-placeholder {
  560. width: 100%;
  561. height: 100%;
  562. }
  563. .video-controls {
  564. position: absolute;
  565. top: 0;
  566. left: 0;
  567. width: 100%;
  568. height: 100%;
  569. display: flex;
  570. flex-direction: column;
  571. justify-content: space-between;
  572. padding: 20rpx;
  573. box-sizing: border-box;
  574. 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%);
  575. }
  576. .control-row {
  577. display: flex;
  578. justify-content: space-between;
  579. align-items: center;
  580. width: 100%;
  581. }
  582. .top-controls {
  583. height: 80rpx;
  584. }
  585. .center-controls {
  586. height: 120rpx;
  587. justify-content: center;
  588. align-items: center;
  589. }
  590. .bottom-controls {
  591. height: 80rpx;
  592. }
  593. .signal-indicator {
  594. display: flex;
  595. align-items: center;
  596. color: #FFFFFF;
  597. font-size: 24rpx;
  598. background-color: rgba(0, 0, 0, 0.5);
  599. padding: 8rpx 16rpx;
  600. border-radius: 30rpx;
  601. }
  602. .signal-indicator svg {
  603. margin-right: 8rpx;
  604. }
  605. .signal-text {
  606. font-weight: 500;
  607. }
  608. .fullscreen-button {
  609. width: 60rpx;
  610. height: 60rpx;
  611. display: flex;
  612. align-items: center;
  613. justify-content: center;
  614. color: #FFFFFF;
  615. background-color: rgba(0, 0, 0, 0.5);
  616. border-radius: 50%;
  617. transition: all 0.2s;
  618. }
  619. .fullscreen-button:active {
  620. background-color: rgba(76, 175, 80, 0.7);
  621. transform: scale(0.9);
  622. }
  623. .video-time {
  624. color: #FFFFFF;
  625. font-size: 26rpx;
  626. background-color: rgba(0, 0, 0, 0.5);
  627. padding: 6rpx 16rpx;
  628. border-radius: 30rpx;
  629. font-weight: 500;
  630. }
  631. .play-button {
  632. width: 100rpx;
  633. height: 100rpx;
  634. border-radius: 50%;
  635. background-color: rgba(255, 255, 255, 0.9);
  636. display: flex;
  637. align-items: center;
  638. justify-content: center;
  639. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.5);
  640. transition: all 0.2s;
  641. transform: scale(1);
  642. }
  643. .play-button:active {
  644. transform: scale(0.92);
  645. background-color: rgba(255, 255, 255, 1);
  646. }
  647. .center-button-container {
  648. width: 100%;
  649. height: 100%;
  650. display: flex;
  651. align-items: center;
  652. justify-content: center;
  653. }
  654. .pause-icon {
  655. width: 80rpx;
  656. height: 80rpx;
  657. border-radius: 50%;
  658. background-color: rgba(0, 0, 0, 0.5);
  659. display: flex;
  660. align-items: center;
  661. justify-content: center;
  662. opacity: 0;
  663. transition: opacity 0.3s;
  664. }
  665. .center-button-container:active .pause-icon {
  666. opacity: 1;
  667. background-color: rgba(76, 175, 80, 0.7);
  668. }
  669. /* 云台控制区域 */
  670. .ptz-section {
  671. margin: 0 30rpx 20rpx;
  672. background-color: #FFFFFF;
  673. border-radius: 20rpx;
  674. padding: 24rpx;
  675. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
  676. }
  677. .section-title {
  678. font-size: 30rpx;
  679. font-weight: 600;
  680. color: #333333;
  681. margin-bottom: 20rpx;
  682. padding: 0 10rpx;
  683. display: flex;
  684. align-items: center;
  685. }
  686. .alert-badge {
  687. background-color: #F56C6C;
  688. color: #FFFFFF;
  689. font-size: 22rpx;
  690. border-radius: 30rpx;
  691. padding: 2rpx 12rpx;
  692. margin-left: 12rpx;
  693. font-weight: normal;
  694. min-width: 32rpx;
  695. text-align: center;
  696. }
  697. .ptz-container {
  698. display: flex;
  699. flex-direction: column;
  700. align-items: center;
  701. padding: 20rpx 0;
  702. }
  703. .ptz-circle-container {
  704. position: relative;
  705. width: 300rpx;
  706. height: 300rpx;
  707. margin: 20rpx 0;
  708. }
  709. .ptz-arrow {
  710. position: absolute;
  711. width: 70rpx;
  712. height: 70rpx;
  713. display: flex;
  714. align-items: center;
  715. justify-content: center;
  716. background-color: #F0F9F0;
  717. border-radius: 50%;
  718. color: #3BB44A;
  719. font-size: 36rpx;
  720. transition: all 0.2s;
  721. box-shadow: 0 2rpx 10rpx rgba(76, 175, 80, 0.15);
  722. }
  723. .ptz-up {
  724. top: 0;
  725. left: 50%;
  726. transform: translateX(-50%);
  727. }
  728. .ptz-down {
  729. bottom: 0;
  730. left: 50%;
  731. transform: translateX(-50%);
  732. }
  733. .ptz-left {
  734. left: 0;
  735. top: 50%;
  736. transform: translateY(-50%);
  737. }
  738. .ptz-right {
  739. right: 0;
  740. top: 50%;
  741. transform: translateY(-50%);
  742. }
  743. .ptz-center {
  744. position: absolute;
  745. top: 50%;
  746. left: 50%;
  747. transform: translate(-50%, -50%);
  748. width: 90rpx;
  749. height: 90rpx;
  750. display: flex;
  751. align-items: center;
  752. justify-content: center;
  753. background-color: #F0F9F0;
  754. border-radius: 50%;
  755. color: #3BB44A;
  756. font-size: 36rpx;
  757. transition: all 0.2s;
  758. box-shadow: 0 2rpx 10rpx rgba(76, 175, 80, 0.15);
  759. }
  760. .ptz-arrow:active, .ptz-center:active {
  761. background-color: #3BB44A;
  762. transform-origin: center;
  763. }
  764. .ptz-arrow:active svg path, .ptz-center:active svg path {
  765. fill: #FFFFFF;
  766. }
  767. .ptz-up:active {
  768. transform: scale(0.92) translateX(-50%);
  769. }
  770. .ptz-down:active {
  771. transform: scale(0.92) translateX(-50%);
  772. }
  773. .ptz-left:active {
  774. transform: scale(0.92) translateY(-50%);
  775. }
  776. .ptz-right:active {
  777. transform: scale(0.92) translateY(-50%);
  778. }
  779. .ptz-center:active {
  780. transform: translate(-50%, -50%) scale(0.92);
  781. }
  782. .ptz-bottom-controls {
  783. display: flex;
  784. justify-content: space-between;
  785. align-items: center;
  786. width: 300rpx;
  787. margin-top: 30rpx;
  788. }
  789. .ptz-bottom-button {
  790. width: 80rpx;
  791. height: 80rpx;
  792. border-radius: 50%;
  793. background-color: #F0F9F0;
  794. display: flex;
  795. align-items: center;
  796. justify-content: center;
  797. color: #3BB44A;
  798. font-size: 32rpx;
  799. font-weight: 500;
  800. transition: all 0.2s;
  801. box-shadow: 0 2rpx 10rpx rgba(76, 175, 80, 0.1);
  802. }
  803. .ptz-bottom-button:active {
  804. background-color: #3BB44A;
  805. color: #FFFFFF;
  806. transform: scale(0.92);
  807. }
  808. .ptz-bottom-button:active svg path {
  809. fill: #FFFFFF;
  810. }
  811. /* 快捷功能按钮 */
  812. .quick-actions {
  813. display: flex;
  814. justify-content: space-evenly;
  815. margin: 0 30rpx 20rpx;
  816. background-color: #FFFFFF;
  817. border-radius: 20rpx;
  818. padding: 24rpx 30rpx;
  819. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
  820. }
  821. .action-button {
  822. display: flex;
  823. flex-direction: column;
  824. align-items: center;
  825. width: 160rpx;
  826. }
  827. .action-icon {
  828. width: 100rpx;
  829. height: 100rpx;
  830. border-radius: 50%;
  831. background-color: #F0F9F0;
  832. display: flex;
  833. align-items: center;
  834. justify-content: center;
  835. color: #3BB44A;
  836. margin-bottom: 12rpx;
  837. transition: all 0.2s;
  838. box-shadow: 0 4rpx 12rpx rgba(76, 175, 80, 0.1);
  839. }
  840. .action-icon:active {
  841. background-color: #3BB44A;
  842. transform: scale(0.92);
  843. }
  844. .action-icon:active svg path {
  845. fill: #FFFFFF;
  846. }
  847. .action-text {
  848. font-size: 24rpx;
  849. color: #666666;
  850. text-align: center;
  851. }
  852. /* 告警信息列表 */
  853. .alerts-section {
  854. margin: 0 30rpx;
  855. background-color: #FFFFFF;
  856. border-radius: 20rpx;
  857. padding: 24rpx;
  858. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
  859. }
  860. .alerts-list {
  861. display: flex;
  862. flex-direction: column;
  863. }
  864. .alert-item {
  865. display: flex;
  866. align-items: center;
  867. padding: 24rpx 20rpx;
  868. border-radius: 12rpx;
  869. margin-bottom: 16rpx;
  870. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  871. position: relative;
  872. }
  873. .alert-urgent {
  874. background-color: #FEF3F3;
  875. border-left: 4rpx solid #F56C6C;
  876. }
  877. .alert-warning {
  878. background-color: #FFF8E6;
  879. border-left: 4rpx solid #E6A23C;
  880. }
  881. .alert-info {
  882. background-color: #F2FAF5;
  883. border-left: 4rpx solid #67C23A;
  884. }
  885. .alert-item-icon {
  886. width: 50rpx;
  887. height: 50rpx;
  888. display: flex;
  889. align-items: center;
  890. justify-content: center;
  891. margin-right: 16rpx;
  892. }
  893. .alert-item-info {
  894. flex: 1;
  895. display: flex;
  896. flex-direction: column;
  897. }
  898. .alert-item-type {
  899. font-size: 28rpx;
  900. color: #333333;
  901. font-weight: 500;
  902. margin-bottom: 8rpx;
  903. }
  904. .alert-item-level {
  905. font-size: 24rpx;
  906. color: #999999;
  907. }
  908. .alert-item-time {
  909. font-size: 24rpx;
  910. color: #999999;
  911. margin-left: 16rpx;
  912. min-width: 100rpx;
  913. text-align: right;
  914. }
  915. .empty-alert {
  916. padding: 60rpx 0;
  917. display: flex;
  918. justify-content: center;
  919. align-items: center;
  920. }
  921. .empty-text {
  922. font-size: 28rpx;
  923. color: #999999;
  924. }
  925. </style>