index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  1. /*
  2. *@description: 资源详情
  3. *@author: yh Fu
  4. *@date: 2023-12-07 15:17:18
  5. *@version: V1.0.5
  6. */
  7. <template>
  8. <el-dialog :visible.sync="tvWallInfoVisible" custom-class="tvDialog" width="55%" center
  9. style="margin-top: 5vh !important;">
  10. <div class="container">
  11. <div class="leftContain">
  12. <div class="TVWallCustomWidth"
  13. style="width: 100% !important;height: 100% !important;box-shadow: none !important;background: none !important;">
  14. <div class="leader-info-container" style="width: 100%;height: 100%;padding: 0;">
  15. <div class="leader-info-list-con"
  16. style="width: 100% !important; overflow: hidden;margin-bottom: 0;padding:1rem;background-image: none !important;box-shadow: none !important;">
  17. <div>
  18. <el-descriptions class="margin-top bd-table" title="" :column="2" direction="horizontal"
  19. border>
  20. <el-descriptions-item>
  21. <template slot="label">
  22. <span>{{ '企业名称' }}</span>
  23. </template>
  24. <span>{{currentDeviceLabel}}</span>
  25. </el-descriptions-item>
  26. </el-descriptions>
  27. </div>
  28. <!-- 切换器 -->
  29. <el-radio-group v-model="currentRadio" @input="radioHasChanged">
  30. <el-radio-button label="传感器"></el-radio-button>
  31. <el-radio-button label="摄像头" class="cameraBtn"></el-radio-button>
  32. </el-radio-group>
  33. <!-- 传感器基础数据 -->
  34. <div class="sensorInfo" v-show="isSensorVisible">
  35. <!-- <div>-->
  36. <!-- <span title="烟感探测器">设备名称:{{ deviceInfo.eventName ? deviceInfo.eventName : '&#45;&#45;' }}</span>-->
  37. <!-- <span>状态:<span :class="currentWorkingStatus == '0' ? 'normal-state' : 'err-state' ">{{ currentWorkingStatus == '0' ? '正常' : "异常" }}</span></span>-->
  38. <!-- </div>-->
  39. <!-- <div>-->
  40. <!-- <span title="烟感探测器">信号强度:{{ deviceInfo.signalStrength ? deviceInfo.signalStrength : '&#45;&#45;' }}dBm</span>-->
  41. <!-- <span>状态:<span :class="deviceInfo.signalStrengthStatus == '0' ? 'normal-state' : 'err-state' ">{{ deviceInfo.signalStrengthStatus == '0' ? '正常' : "异常" }}</span></span>-->
  42. <!-- </div>-->
  43. <!-- <div>-->
  44. <!-- <span title="烟感探测器">实时浓度:{{ deviceInfo.smokescope ? deviceInfo.smokescope : '&#45;&#45;' }}%FT</span>-->
  45. <!-- <span>状态:<span :class="deviceInfo.smokescopeStatus == '0' ? 'normal-state' : 'err-state' ">{{ deviceInfo.smokescopeStatus == '0' ? '正常' : "异常" }}</span></span>-->
  46. <!-- </div>-->
  47. <!-- <div>-->
  48. <!-- <span title="烟感探测器">实时电压:{{ deviceInfo.cellVoltage ? deviceInfo.cellVoltage : '&#45;&#45;' }}V</span>-->
  49. <!-- <span>状态:<span :class="deviceInfo.cellVoltageStatus == '0' ? 'normal-state' : 'err-state' ">{{ deviceInfo.cellVoltageStatus == '0' ? '正常' : "异常" }}</span></span>-->
  50. <!-- </div>-->
  51. <!-- <div>-->
  52. <!-- <span title="烟感探测器">实时温度:{{ deviceInfo.temperature ? deviceInfo.temperature : '&#45;&#45;' }}℃</span>-->
  53. <!-- <span>状态:<span :class="deviceInfo.temperatureStatus == '0' ? 'normal-state' : 'err-state' ">{{ deviceInfo.temperatureStatus == '0' ? '正常' : "异常" }}</span></span>-->
  54. <!-- </div>-->
  55. <div>
  56. <span title="烟感探测器">设备名称:{{ deviceInfo.eventName ? deviceInfo.eventName : '--' }}</span>
  57. <span>状态:<span class="normal-state">正常</span></span>
  58. </div>
  59. <div>
  60. <span title="烟感探测器">信号强度:{{ deviceInfo.signalStrength ? deviceInfo.signalStrength : '--' }}dBm</span>
  61. <span>状态:<span class="normal-state">正常</span></span>
  62. </div>
  63. <div>
  64. <span title="烟感探测器">实时浓度:{{ deviceInfo.smokescope ? deviceInfo.smokescope : '--' }}%FT</span>
  65. <span>状态:<span class="normal-state">正常</span></span>
  66. </div>
  67. <div>
  68. <span title="烟感探测器">实时电压:{{ deviceInfo.cellVoltage ? deviceInfo.cellVoltage : '--' }}V</span>
  69. <span>状态:<span class="normal-state">正常</span></span>
  70. </div>
  71. <div>
  72. <span title="烟感探测器">实时温度:{{ deviceInfo.temperature ? deviceInfo.temperature : '--' }}℃</span>
  73. <span>状态:<span class="normal-state">正常</span></span>
  74. </div>
  75. <div style="margin-top: 5%;"></div>
  76. <!-- 传感器列表 -->
  77. <div class="cameraInfo">
  78. <div
  79. v-for="(e,idx) in deviceList"
  80. :key="idx"
  81. class="cameradiv device_contain"
  82. @click="currentDeviceHasChanged(e,idx)"
  83. :class="currentDevice == idx ? 'select-device' : '' "
  84. >
  85. <img
  86. :src="e.deviceImg?e.deviceImg : require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png')"
  87. style="width: 110px;height: 70px;object-fit: fill;"
  88. >
  89. <span>{{ e.deviceName }}</span>
  90. </div>
  91. </div>
  92. </div>
  93. <!-- 摄像头基础数据 -->
  94. <div class="cameraInfo" v-show="!isSensorVisible">
  95. <div
  96. v-for="(e,idx) in cameraList"
  97. :key="idx"
  98. class="cameradiv"
  99. @click="deviceShow(e,idx)"
  100. >
  101. <img
  102. :src="e.cameraImg?e.cameraImg : require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png') "
  103. style="width: 110px;height: 70px;object-fit: fill;"
  104. >
  105. <span>{{ e.cameraName }}</span>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="rightContain">
  113. <!-- 按照左侧切换器展示对应传感器/摄像头内容 -->
  114. <!-- 传感器图表 -->
  115. <div class="sernsorChart_contain" v-show="isSensorVisible">
  116. <!-- 信号强度 -->
  117. <div id="signal"></div>
  118. <!-- 实时浓度 -->
  119. <div id="concentration"></div>
  120. <!-- 实时电压 -->
  121. <div id="voltage"></div>
  122. <!-- 实时温度 -->
  123. <div id="temperature"></div>
  124. </div>
  125. <!-- 摄像头视图 -->
  126. <div class="camera_contain" v-show="!isSensorVisible">
  127. <div class="camera_list_row"
  128. v-for="(e,idx) in cameraList"
  129. :key="idx"
  130. @click="deviceShow(e)"
  131. >
  132. <img
  133. :src="e.cameraImg?e.cameraImg : require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png') "
  134. style="width: 153px;height: 94px;object-fit: fill;"
  135. >
  136. <h4>{{ e.cameraName }}</h4>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </el-dialog>
  142. </template>
  143. <script>
  144. let echarts = require("echarts");
  145. import {
  146. deviceById,
  147. getSensorDataInfoAndList, // 获取传感器信息
  148. } from '@/api/forest';
  149. export default {
  150. name: 'DeviceDialog',
  151. props: ['localMark'],
  152. data() {
  153. return {
  154. currentDevicePic: require('@/assets/images/camera-online.png'),
  155. deviceInfoList: [],
  156. //设备名称 //设备地址
  157. infoKey: [{
  158. key: 'cameraName',
  159. value: '名称'
  160. },
  161. {
  162. key: 'cameraRegion',
  163. value: '地址'
  164. }
  165. ],
  166. chuanInfoKey: [{
  167. key: 'deviceName',
  168. value: '设备名称'
  169. },
  170. {
  171. key: 'address',
  172. value: '设备地址'
  173. }
  174. ],
  175. laInfoKey: [{
  176. key: 'name',
  177. value: '名称'
  178. },
  179. {
  180. key: 'broadcastUse',
  181. value: '用途'
  182. }
  183. ],
  184. centerInfoKey: [{
  185. key: '名称',
  186. value: '设备名称'
  187. },
  188. {
  189. key: '驻地位置',
  190. value: '设备地址'
  191. }
  192. ],
  193. animalInfoKey: [{
  194. key: 'type',
  195. value: '动物名称'
  196. },
  197. {
  198. key: 'appearTime',
  199. value: '出现时间'
  200. }
  201. ],
  202. treeInfoKey: [{
  203. key: 'treesName',
  204. value: '植物名称'
  205. },
  206. {
  207. key: 'treesNumber',
  208. value: '编号'
  209. },
  210. {
  211. key: 'treesAge',
  212. value: '树龄'
  213. },
  214. {
  215. key: 'treesSpecies',
  216. value: '树种'
  217. },
  218. {
  219. key: 'treesRemarks',
  220. value: '备注'
  221. },
  222. {
  223. key: 'deptName',
  224. value: '部门名称'
  225. },
  226. {
  227. key: 'createTime',
  228. value: '事件时间'
  229. }
  230. ],
  231. currentDeviceData: null,
  232. tvWallInfoVisible: false,
  233. currentCameraParam: null,
  234. workingStatus: null,
  235. currentCenterStatus: null,
  236. currentType: null,
  237. currentRadio: '传感器',
  238. isSensorVisible: true, // 当前是否显示为传感器信息,否则为摄像头信息,默认为传感器
  239. signalOption: {
  240. color: ['#bf791f', '#bf791f', '#bf791f'], // 设置全局颜色
  241. grid: {
  242. top: '15%',
  243. left: '3%',
  244. right: '4%',
  245. bottom: '3%',
  246. containLabel: true
  247. },
  248. xAxis: {
  249. type: 'category',
  250. data: ['1:00', '2:00', '3:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00',
  251. '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00',
  252. '23:00', '24:00',
  253. ],
  254. lineStyle: {
  255. color: "#bf791f",
  256. },
  257. axisLabel: {
  258. formatter: '{value}',
  259. },
  260. splitLine: {
  261. lineStyle: {
  262. color: "#bf791f",
  263. },
  264. },
  265. axisLine: {
  266. lineStyle: {
  267. color: "#bf791f",
  268. },
  269. },
  270. },
  271. yAxis: {
  272. type: 'value',
  273. axisLabel: {
  274. formatter: '{value} dB/m',
  275. textStyle: {
  276. color: "#bf791f",
  277. },
  278. },
  279. splitLine: {
  280. lineStyle: {
  281. color: "#7f92ab",
  282. },
  283. },
  284. axisLine: {
  285. lineStyle: {
  286. color: "#bf791f",
  287. },
  288. },
  289. },
  290. series: [{
  291. data: [0.1, 0.1, 0.1, 0.1, 0.12, 0.08, 0.08, 0.1, 0.1, 0.1, 0.12, 0.08, 0.08, 0.1, 0.1,
  292. 0.1, 0.12, 0.08, 0.08, 0.12, 0.08, 0.08, 0.1, 0.1, 0.1, 0.12, 0.08, 0.08,
  293. ],
  294. type: 'line',
  295. }]
  296. },
  297. concentrationOption: {
  298. color: ['#06C562', '#06C562', '#06C562'], // 设置全局颜色
  299. grid: {
  300. top: '15%',
  301. left: '3%',
  302. right: '4%',
  303. bottom: '3%',
  304. containLabel: true
  305. },
  306. xAxis: {
  307. type: 'category',
  308. data: ['1:00', '2:00', '3:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00',
  309. '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00',
  310. '23:00', '24:00',
  311. ],
  312. splitLine: {
  313. lineStyle: {
  314. color: "#06C562",
  315. },
  316. },
  317. axisLine: {
  318. lineStyle: {
  319. color: "#06C562",
  320. },
  321. },
  322. },
  323. yAxis: {
  324. type: 'value',
  325. axisLabel: {
  326. formatter: '{value} %FT'
  327. },
  328. splitLine: {
  329. lineStyle: {
  330. color: "#7f92ab",
  331. },
  332. },
  333. axisLine: {
  334. lineStyle: {
  335. color: "#06C562",
  336. },
  337. },
  338. },
  339. series: [{
  340. data: [6.35, 6.75, 6.35, 6.75, 6.35, 6.75, 6.35, 6.75, 6.35, 6.75, 6.35, 6.75, 6.35, 6.75,
  341. 6.35, 6.75, 6.35, 6.75, 6.35, 6.75, 6.35, 6.75, 6.35, 6.75,
  342. ],
  343. type: 'line'
  344. }]
  345. },
  346. voltageOption: {
  347. color: ['#1ce7e0', '#1ce7e0', '#1ce7e0'], // 设置全局颜色
  348. grid: {
  349. top: '15%',
  350. left: '3%',
  351. right: '4%',
  352. bottom: '3%',
  353. containLabel: true
  354. },
  355. xAxis: {
  356. type: 'category',
  357. data: ['1:00', '2:00', '3:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00',
  358. '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00',
  359. '23:00', '24:00',
  360. ],
  361. splitLine: {
  362. lineStyle: {
  363. color: "#1ce7e0",
  364. },
  365. },
  366. axisLine: {
  367. lineStyle: {
  368. color: "#1ce7e0",
  369. },
  370. },
  371. },
  372. yAxis: {
  373. type: 'value',
  374. axisLabel: {
  375. formatter: '{value} V'
  376. },
  377. splitLine: {
  378. lineStyle: {
  379. color: "#7f92ab",
  380. },
  381. },
  382. axisLine: {
  383. lineStyle: {
  384. color: "#1ce7e0",
  385. },
  386. },
  387. },
  388. series: [{
  389. data: [2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85,
  390. 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85, 2.85,
  391. 2.85, 2.85,
  392. ],
  393. type: 'line'
  394. }]
  395. },
  396. temperatureOption: {
  397. color: ['#9aaf2a', '#9aaf2a', '#9aaf2a'], // 设置全局颜色
  398. grid: {
  399. top: '15%',
  400. left: '3%',
  401. right: '4%',
  402. bottom: '3%',
  403. containLabel: true
  404. },
  405. xAxis: {
  406. type: 'category',
  407. data: ['1:00', '2:00', '3:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00',
  408. '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00',
  409. '23:00', '24:00',
  410. ],
  411. splitLine: {
  412. lineStyle: {
  413. color: "#9aaf2a",
  414. },
  415. },
  416. axisLine: {
  417. lineStyle: {
  418. color: "#9aaf2a",
  419. },
  420. },
  421. },
  422. yAxis: {
  423. type: 'value',
  424. axisLabel: {
  425. formatter: '{value} ℃'
  426. },
  427. splitLine: {
  428. lineStyle: {
  429. color: "#7f92ab",
  430. },
  431. },
  432. axisLine: {
  433. lineStyle: {
  434. color: "#9aaf2a",
  435. },
  436. },
  437. },
  438. series: [{
  439. data: [23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 23, 23,
  440. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  441. ],
  442. type: 'line'
  443. }]
  444. },
  445. cameraList: [{
  446. tile: '四平市双辽市郑家屯街道工农村东',
  447. pic: require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png')
  448. },
  449. {
  450. tile: '四平市双辽市辽东街道建金良村',
  451. pic: require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png')
  452. },
  453. {
  454. tile: '四平市双辽市那木乡双城村',
  455. pic: require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png')
  456. },
  457. {
  458. tile: '四平市双辽市郑家屯街道工农村东',
  459. pic: require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png')
  460. },
  461. {
  462. tile: '四平市双辽市那木乡建新村东北',
  463. pic: require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png')
  464. },
  465. {
  466. tile: '四平市双辽市那木乡永发屯金宝村',
  467. pic: require('@/assets/images/video-plaza/shiLianWangImg/no-camera.png')
  468. },
  469. ],
  470. currentDeviceLabel:'',
  471. currentWorkingStatus:null, // 当前所选传感器设备状态 0-正常 1-异常
  472. deviceList:[], // 传感器列表
  473. currentDevice:0, // 当前选中传感器,默认索引为0
  474. currentCamera:null, // 当前选中传感器,默认不选
  475. deviceInfo:{}, // 传感器基础数据
  476. }
  477. },
  478. methods: {
  479. deviceShow(e) {
  480. this.$parent.showTVWall(e.cameraCode, e.cameraName, e.cameraType);
  481. },
  482. initChart() {
  483. let signalChart = echarts.init(document.getElementById("signal"));
  484. let concentrationChart = echarts.init(document.getElementById("concentration"));
  485. let voltageChart = echarts.init(document.getElementById("voltage"));
  486. let temperatureChart = echarts.init(document.getElementById("temperature"));
  487. signalChart.setOption(this.signalOption)
  488. concentrationChart.setOption(this.concentrationOption)
  489. voltageChart.setOption(this.voltageOption)
  490. temperatureChart.setOption(this.temperatureOption)
  491. },
  492. // 当前所选传感器发生变化
  493. currentDeviceHasChanged(e,idx){
  494. if(this.currentDevice == idx) return;
  495. this.currentDevice = idx
  496. // 更新当前设备状态
  497. this.currentWorkingStatus = e.workingStatus
  498. // this.currentDeviceLabel = e.deviceName
  499. // 获取传感器基础数据
  500. getSensorDataInfoAndList(e.deviceCode).then(res => {
  501. this.deviceInfo = res.data.info || {}
  502. // 渲染图表
  503. this.updateChart(res)
  504. })
  505. },
  506. // 当前选项卡发生变化(传感器 / 摄像头)
  507. radioHasChanged(v) {
  508. if (v == '传感器') {
  509. this.isSensorVisible = true
  510. } else {
  511. this.isSensorVisible = false
  512. }
  513. },
  514. open(data) {
  515. // 重置选项卡状态为传感器
  516. this.isSensorVisible = true
  517. this.deviceInfoList = data
  518. // 填充摄像头数据
  519. this.cameraList = data[0].cameras
  520. this.deviceList = data[0].devices
  521. this.currentWorkingStatus = data[0].devices[0].workingStatus
  522. // 获取传感器基础数据
  523. if(this.deviceList.length != 0){
  524. getSensorDataInfoAndList(this.deviceList[0].deviceCode).then(res => {
  525. this.deviceInfo = res.data.info
  526. // 渲染图表
  527. this.updateChart(res)
  528. })
  529. }
  530. // 填充传感器数据 && 调取传感器详情
  531. this.currentDeviceLabel = data[0].value
  532. // this.currentCameraParam = data
  533. this.tvWallInfoVisible = true
  534. setTimeout(() => {
  535. this.initChart()
  536. })
  537. },
  538. updateChart(res){
  539. this.signalOption.series[0].data = res.data.signalStrengthList
  540. this.concentrationOption.series[0].data = res.data.smokescopeList
  541. this.voltageOption.series[0].data = res.data.cellVoltageList
  542. this.temperatureOption.series[0].data = res.data.temperaturethList
  543. this.signalOption.xAxis.data = res.data.createTimeList
  544. this.concentrationOption.xAxis.data = res.data.createTimeList
  545. this.voltageOption.xAxis.data = res.data.createTimeList
  546. this.temperatureOption.xAxis.data = res.data.createTimeList
  547. setTimeout(() => {
  548. this.initChart()
  549. })
  550. },
  551. update(option, type) {
  552. this.currentType = type
  553. this.deviceInfoList = []
  554. this.workingStatus = option.workingStatus
  555. if (option.workingStatus == 0) {
  556. // 在线
  557. this.currentDevicePic = require('@/assets/images/camera-online.png')
  558. } else {
  559. // 离线
  560. this.currentDevicePic = require('@/assets/images/camera-offline.png')
  561. }
  562. switch (type) {
  563. case 'dataCenter':
  564. if (option.cameras.length == 0) {
  565. // 离线
  566. this.currentCenterStatus = false
  567. this.currentDevicePic = require('@/assets/images/camera-offline.png')
  568. } else {
  569. // 在线
  570. this.currentCenterStatus = true
  571. this.currentDevicePic = require('@/assets/images/camera-online.png')
  572. }
  573. if (option.pictures.length != 0) {
  574. let newArr = []
  575. option.pictures.forEach(e => {
  576. newArr.push(
  577. e
  578. )
  579. })
  580. }
  581. let newArr = []
  582. for (let key in option.detail) {
  583. newArr.push({
  584. key,
  585. value: option.detail[key]
  586. })
  587. }
  588. this.deviceInfoList = newArr
  589. break;
  590. case 'animal':
  591. if (option.cameraList.length == 0) {
  592. // 离线
  593. this.currentCenterStatus = false
  594. this.currentDevicePic = require('@/assets/images/camera-offline.png')
  595. } else {
  596. // 在线
  597. this.currentCenterStatus = true
  598. this.currentDevicePic = require('@/assets/images/camera-online.png')
  599. }
  600. let animalArr = []
  601. this.animalInfoKey.forEach(e => {
  602. animalArr.push({
  603. key: e.value,
  604. value: option[e.key]
  605. })
  606. })
  607. this.deviceInfoList = animalArr
  608. break;
  609. case 'tree':
  610. let treeArr = []
  611. this.treeInfoKey.forEach(e => {
  612. treeArr.push({
  613. key: e.value,
  614. value: option[e.key]
  615. })
  616. })
  617. this.deviceInfoList = treeArr
  618. break;
  619. case 'SHE':
  620. this.infoKey.forEach(e => {
  621. this.deviceInfoList.push({
  622. key: e.value,
  623. value: option[e.key]
  624. })
  625. })
  626. break;
  627. case 'CHUAN':
  628. this.currentDevicePic = null
  629. if (option.cameras.length == 0) {
  630. // 在线
  631. this.currentCenterStatus = false
  632. this.currentDevicePic = require('@/assets/images/camera-offline.png')
  633. } else {
  634. // 离线
  635. this.currentCameraParam = {
  636. cameras: option.cameras,
  637. longitude: option.longitude,
  638. latitude: option.latitude
  639. }
  640. this.currentCenterStatus = true
  641. this.currentDevicePic = require('@/assets/images/camera-online.png')
  642. }
  643. let chuanArr = []
  644. for (let key in option.deviceList) {
  645. chuanArr.push({
  646. key,
  647. value: option.deviceList[key]
  648. })
  649. }
  650. for (let key in option.sensorDetectionList) {
  651. chuanArr.push({
  652. key,
  653. value: option.sensorDetectionList[key]
  654. })
  655. }
  656. this.deviceInfoList = chuanArr
  657. break;
  658. case 'LA':
  659. this.laInfoKey.forEach(e => {
  660. if (e.key == 'broadcastUse') {
  661. this.deviceInfoList.push({
  662. key: e.value,
  663. value: option[e.key] == '1' ? '应急云广播' : '2' ? '智能云广播' : null
  664. })
  665. } else {
  666. this.deviceInfoList.push({
  667. key: e.value,
  668. value: option[e.key]
  669. })
  670. }
  671. })
  672. this.currentDevicePic = require('@/assets/images/cloudBroadcast.png')
  673. break;
  674. case 'Zhi':
  675. this.infoKey.forEach(e => {
  676. this.deviceInfoList.push({
  677. key: e.value,
  678. value: option[e.key]
  679. })
  680. })
  681. break;
  682. }
  683. this.tvWallInfoVisible = true
  684. },
  685. toDo() {
  686. switch (this.localMark) {
  687. case 'She':
  688. if (this.workingStatus != 0) return
  689. this.$emit('toTvWall', this.currentCameraParam)
  690. break;
  691. case 'Chuan':
  692. this.$emit('toTvWall_cgq', this.currentCameraParam)
  693. break;
  694. case 'La':
  695. this.$emit('jump')
  696. break;
  697. case 'dataCenter':
  698. if (!this.currentCenterStatus) return
  699. this.$emit('toTvWall')
  700. break;
  701. case 'animal':
  702. this.$emit('sewageOutletClick', this.currentCameraParam)
  703. break;
  704. case 'Zhi':
  705. if (this.workingStatus != 0) return
  706. this.$emit('toTvWall', this.currentCameraParam)
  707. break;
  708. }
  709. }
  710. },
  711. watch: {
  712. localMark(newVal) {
  713. switch (newVal) {
  714. case 'she':
  715. // this.currentDevicePic = require('@/assets/images/camera-online.png')
  716. break;
  717. case 'CHUAN':
  718. break;
  719. case 'la':
  720. // this.currentDevicePic = require('@/assets/images/cloudBroadcast.png')
  721. break;
  722. }
  723. }
  724. }
  725. }
  726. </script>
  727. <style rel="stylesheet/scss" lang="scss" scoped>
  728. @import '@/assets/styles/base.scss';
  729. .normal-state{
  730. color: #06C562 !important;
  731. }
  732. .err-state{
  733. color: #FF0000 !important;
  734. }
  735. ::v-deep .el-radio-group {
  736. width: 100%;
  737. .el-radio-button {
  738. width: 50%;
  739. margin-top: 10%;
  740. .el-radio-button__inner {
  741. display: block;
  742. background-color: #010518;
  743. }
  744. .el-radio-button__inner {
  745. border-left: 1px solid #2C3F73 !important;
  746. }
  747. // 选中样式
  748. .el-radio-button__orig-radio:checked+.el-radio-button__inner {
  749. background-color: #104A8F;
  750. border-color: #104A8F;
  751. }
  752. }
  753. .cameraBtn {
  754. .el-radio-button__inner {
  755. border-left: none !important;
  756. }
  757. }
  758. }
  759. .sensorInfo {
  760. margin-top: 10%;
  761. height: 75%;
  762. span {
  763. color: #2297DA;
  764. }
  765. >div{
  766. >span:nth-child(1){
  767. display: inline-block;
  768. width: 140px;
  769. white-space: nowrap;
  770. overflow: hidden;
  771. text-overflow: ellipsis;
  772. }
  773. >span:nth-child(2){
  774. float: right;
  775. }
  776. }
  777. }
  778. .cameraInfo {
  779. overflow: hidden scroll;
  780. margin-top: 10%;
  781. height: 73%;
  782. .cameradiv {
  783. img {
  784. border-radius: 5px;
  785. border: 1px solid #10539a;
  786. margin-right: 10px;
  787. margin-bottom: 10px;
  788. color: #2297DA;
  789. cursor: pointer;
  790. }
  791. color: #2297DA;
  792. cursor: pointer;
  793. >span{
  794. display: block;
  795. width: 105px !important;
  796. }
  797. }
  798. .cameradiv:hover{
  799. >span{
  800. color: #55D7FF !important;
  801. }
  802. }
  803. >div {
  804. display: flex;
  805. }
  806. >div:not(:nth-child(1)) {
  807. margin-top: 10%;
  808. }
  809. }
  810. .select-device,.select-camera{
  811. >span{
  812. color: #55D7FF !important;
  813. }
  814. }
  815. .device_contain:hover{
  816. >span{
  817. color: #55D7FF !important;
  818. }
  819. }
  820. .device_contain span{
  821. display: block;
  822. width: 105px !important;
  823. }
  824. </style>
  825. <style lang="scss">
  826. .tvDialog {
  827. margin-top: 10vh !important;
  828. height: 75%;
  829. padding-top: 0;
  830. .el-dialog__body {
  831. height: 92%;
  832. padding: 0;
  833. }
  834. .el-dialog__header {
  835. height: 8% !important;
  836. }
  837. .container {
  838. height: 100%;
  839. display: flex;
  840. background: url('~@/assets/images/tvWallBg.png') 0 0 no-repeat;
  841. background-size: 100% 100%;
  842. .leftContain {
  843. width: 24.2%;
  844. // border-right: 2px solid #153E42;
  845. .deviceInfo {
  846. height: 71%;
  847. overflow-x: scroll;
  848. white-space: nowrap;
  849. >div {
  850. text-indent: 42px;
  851. height: 10%;
  852. font-size: 15px;
  853. color: #A4A4A4;
  854. font-weight: 700;
  855. }
  856. >div:nth-child(1) {
  857. margin-top: 7%;
  858. }
  859. }
  860. .deviceInfo::-webkit-scrollbar {
  861. display: block !important;
  862. background-color: #101823;
  863. // border: 1px solid #fff;
  864. height: 10px !important;
  865. }
  866. .deviceInfo::-webkit-scrollbar-thumb {
  867. background-color: #183974;
  868. }
  869. }
  870. .rightContain {
  871. width: 73%;
  872. height: 100%;
  873. margin: 0 auto 0;
  874. .sernsorChart_contain {
  875. width: 100%;
  876. height: 100%;
  877. >div {
  878. width: 100%;
  879. height: 20%;
  880. }
  881. >div {
  882. margin-top: 4%;
  883. }
  884. }
  885. .camera_contain {
  886. display: flex;
  887. flex-wrap: wrap;
  888. align-content: flex-start;
  889. width: 100%;
  890. height: 100%;
  891. .camera_list_row {
  892. display: flex;
  893. flex-direction: column;
  894. img {
  895. margin-bottom: 10px;
  896. border-radius: 5px;
  897. border: 1px solid #10539a;
  898. cursor: pointer;
  899. }
  900. h4{
  901. color: #2297DA;
  902. cursor: pointer;
  903. text-align: center;
  904. }
  905. }
  906. .camera_list_row:hover{
  907. >h4{
  908. color: #55D7FF !important;
  909. }
  910. }
  911. >div {
  912. width: 20%;
  913. height: 20%;
  914. margin-top: 3%;
  915. }
  916. >div:nth-child(4n-3) {
  917. margin-left: 8%;
  918. }
  919. >div:not(:nth-child(4n-3)) {
  920. margin-left: 3%;
  921. }
  922. }
  923. }
  924. }
  925. }
  926. .leader-info-container {
  927. .el-descriptions-item__label {
  928. width: 77px !important;
  929. }
  930. }
  931. .bd-table {
  932. .el-descriptions__body {
  933. .el-descriptions__table {
  934. .el-descriptions-row {
  935. .el-descriptions-item__cell {
  936. border: 1px solid #2297DA;
  937. color: #2297DA;
  938. }
  939. }
  940. }
  941. }
  942. }
  943. </style>