monitor.vue 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670
  1. <!--监控中心-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div class="leftbar" :class="indentleft" ref="left">
  10. <div class="forthis">
  11. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  12. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  13. <div class="this-title">
  14. <span>事态感知</span>
  15. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  16. </div>
  17. <div class="i-list-con h-73">
  18. <div class="d-l-con-icon">
  19. <div class="icon-con w-33 m-btm-no" :class="{on:onShe}" @click="sheClick">
  20. <!-- -->
  21. <div class="icon icon-dot"></div>
  22. <div class="icon-text">
  23. <h6>{{ visuForestCloudMapDeviceBOList[0].deviceCount }}</h6>
  24. <h5>{{ visuForestCloudMapDeviceBOList[0].deviceName }}</h5>
  25. </div>
  26. </div>
  27. <div class="icon-con w-33 m-btm-no" :class="{on:onChuan}" @click="chuanClick">
  28. <div class="icon icon-dot"></div>
  29. <div class="icon-text">
  30. <h6>{{ sensorNum }}</h6>
  31. <h5>传感器</h5>
  32. </div>
  33. </div>
  34. <div class="icon-con w-33 m-btm-no" :class="{on:onLa}" @click="laClick">
  35. <div class="icon icon-dot"></div>
  36. <div class="icon-text">
  37. <h6>{{ loudspeakerNum }}</h6>
  38. <h5>云广播</h5>
  39. </div>
  40. </div>
  41. </div>
  42. <!-- <div class="overflow-y" style="height: 33vh;">-->
  43. <!-- <el-collapse accordion>-->
  44. <!-- <el-collapse-item v-for="(item,index) in region" :key="index">-->
  45. <!-- &lt;!&ndash; deptId &ndash;&gt;-->
  46. <!-- <template slot="title">-->
  47. <!-- <div class="d-l-con sj-collapse" :class="{on:listCurrentIndex1==item.deptId}"-->
  48. <!-- v-on:click="selectCameraByDeptId(item.deptId)">-->
  49. <!-- <div class="d-l-l-text">-->
  50. <!-- <h4 class="collapse-title">{{ item.deptName }}</h4>-->
  51. <!-- </div>-->
  52. <!-- <div class="d-l-l-count">{{ item.deptCount }}</div>-->
  53. <!-- </div>-->
  54. <!-- </template>-->
  55. <!-- </el-collapse-item>-->
  56. <!-- </el-collapse>-->
  57. <!-- </div>-->
  58. <!-- &lt;!&ndash; 横向柱状 echart &ndash;&gt;-->
  59. <!-- <div class="overflow-y" style="height: 33vh;">-->
  60. <!-- <div id="camera-chart" style="width: 100%;height:33vh;"></div>-->
  61. <!-- </div>-->
  62. <div class="sj-search">
  63. <el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small"
  64. prefix-icon="el-icon-search" />
  65. </div>
  66. <div class="i-list-con" style="height: 62vh">
  67. <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
  68. :filter-node-method="filterNode" ref="tree" node-key="id" :default-expanded-keys="[100]"
  69. @node-click="handleNodeClick" />
  70. </div>
  71. </div>
  72. </dv-border-box-13>
  73. </div>
  74. </div>
  75. <!-- 地图 -->
  76. <supermap ref="supermap" style="width: 100%;height: 100vh;" @fatherMethod="fatherMethod" @preview="preview" @jump="jump">
  77. </supermap>
  78. <!-- 右侧 -->
  79. <div class="rightbar" :class="indentright" ref="right">
  80. <div class="forthis">
  81. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  82. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  83. <div class="this-title">
  84. <span>列表</span>
  85. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  86. </div>
  87. <div class="sj-search"> <el-input v-model="rightDeptName" :placeholder="placeholderMsg" clearable size="small"
  88. prefix-icon="el-icon-search" /></div>
  89. <div class="i-list-con" style="height: 37vh;">
  90. <div class="d-l-con" v-for="(item,index) in visuForestCloudCameraBOListSearch"
  91. :class="{on:listCurrentIndex2 == index}" v-on:click="dropLocation(item.latitude,item.longitude,index)">
  92. <div class="d-l-l-text">
  93. <i class="iconfont icon-sxt" :class="jkListIcon"></i>
  94. <h4>{{ item.cameraName }}</h4>
  95. <!-- <h4 v-if="onChuan" v-html="cgqData[index]"></h4>-->
  96. </div>
  97. </div>
  98. </div>
  99. </dv-border-box-13>
  100. </div>
  101. <div class="forthis">
  102. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  103. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  104. <div class="this-title">
  105. <span>重点区域</span>
  106. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  107. </div>
  108. <div class="i-list-con h-25">
  109. <div class="d-l-con" v-for="(item,index) in keyAreaList" :class="{on:listCurrentIndex3 == index}"
  110. @click="getRegionalFlag(item.id,index)">
  111. <div class="d-l-l-text">
  112. <i class="i-small"></i>
  113. <h4>{{ item.areaName }}</h4>
  114. </div>
  115. </div>
  116. </div>
  117. </dv-border-box-13>
  118. </div>
  119. </div>
  120. <vBottomMenu ref="bottomMenu"></vBottomMenu>
  121. <!-- <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">-->
  122. <!-- <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img-->
  123. <!-- src="@/assets/images/mascot.png"/></div>-->
  124. <!-- </el-tooltip>-->
  125. </div>
  126. <eventLocation ref="eventLocation"></eventLocation>
  127. <TVWall ref="TVWall"></TVWall>
  128. <TVWalls ref="TVWalls"></TVWalls>
  129. <el-dialog :title="cameraTitle" :visible.sync="cameraVisible" v-if="cameraVisible" customClass="videoCustomWidth"
  130. @close="cancelEventLocationShow()">
  131. <div style="width:1020px;height:625px;position:relative;">
  132. <!--视频窗口展示---海康-->
  133. <div id="playWnd" class="playWnd" style="left: 0px; top: 0px;"></div>
  134. </div>
  135. </el-dialog>
  136. </div>
  137. </template>
  138. <script>
  139. import {
  140. selectDeviceType,
  141. selectCameraByDeptId,
  142. getSensorListByDeptId,
  143. getDlblistBydeptId,
  144. selectKeyAreaList,
  145. getRegionalFlag,
  146. notCoverPlaces,
  147. getCamerasByDeptId,
  148. getMonitorDeviceAndDataList, getDlblistBydeptId_direct, selectDeviceType_direct
  149. } from '@/api/monitor'
  150. import {
  151. treeselect
  152. } from '@/api/system/dept'
  153. import supermap from '@/components/supermap-2.5d' //超图
  154. import vheader from '@/components/v-header.vue' //一体化共用头部
  155. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  156. import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
  157. import TVWall from '@/components/TVWall.vue' //电视墙弹窗
  158. import TVWalls from '@/components/TVWalls.vue' //电视墙弹窗
  159. /** ----------------------------------摄像头预览开始------------------------------------- */
  160. import {
  161. getDahuaVideoServer
  162. } from '@/api/dahua/dahua'
  163. import {
  164. getHaiKangVideoServer
  165. } from '@/api/haikang/haikang'
  166. import DHWs from '@/dahua/lib/DHWs'
  167. /** ----------------------------------摄像头预览结束------------------------------------- */
  168. // import echarts from 'echarts'
  169. let echarts = require('echarts')
  170. import Cookies from 'js-cookie';
  171. import {getUserProfile} from "@/api/system/user";
  172. export default {
  173. components: {
  174. supermap,
  175. vheader,
  176. vBottomMenu,
  177. eventLocation,
  178. TVWalls,
  179. TVWall
  180. },
  181. created() {
  182. /** ----------------------------------摄像头预览开始------------------------------------- */
  183. const DHWsInstance = DHWs.getInstance()
  184. this.ws = DHWsInstance
  185. /** ----------------------------------摄像头预览结束------------------------------------- */
  186. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  187. window.showDialog = this.showDialog
  188. window.choseLayerSwitching = this.choseLayerSwitching
  189. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  190. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  191. },
  192. mounted() {
  193. // 初始化地图数据
  194. this.getSuperMapUrl();
  195. setTimeout(() => {
  196. this.selectKeyAreaList()
  197. this.bottomMenuList() //获取底部公共组件消息和任务
  198. this.getTreeselect()
  199. this.deptId = Cookies.get("deptId");
  200. // this.chuanSet()
  201. this.getMonitorDeviceAndDataLists()
  202. this.getDlblistBydeptIds(-1)
  203. this.selectDeviceType(-1)
  204. // this.getNotCoverPlaces(this.deptId);
  205. // this.showTVWall();
  206. }, 2000)
  207. },
  208. data() {
  209. return {
  210. jkListIcon:'sj-icon-jkzx',
  211. //摄像头名称
  212. rightDeptName: undefined,
  213. visuForestCloudCameraBOListSearch: [],
  214. tempList: [],
  215. // 部门名称
  216. cgqData: [],
  217. deptName: undefined,
  218. deptId: '',
  219. // 部门树选项
  220. deptOptions: undefined,
  221. defaultProps: {
  222. children: 'children',
  223. label: 'label'
  224. },
  225. listCurrentIndex1: '-1',
  226. listCurrentIndex2: '-1',
  227. listCurrentIndex3: '-1',
  228. graphicsList: [], //重点区域
  229. /** ----------------------------------摄像头预览开始------------------------------------- */
  230. //大华
  231. activePanel: 'key1',
  232. isLogin: false,
  233. cameraParams: [],
  234. ws: null,
  235. //海康
  236. cameraTitle: '',
  237. cameraVisible: false,
  238. initCount: 0,
  239. pubKey: '',
  240. oWebControl: null,
  241. /** ----------------------------------摄像头预览结束------------------------------------- */
  242. visuForestCloudMapDeviceBOList: [{
  243. deviceCount: 0,
  244. deviceName: "摄像头"
  245. }],
  246. visuForestCloudCameraBOList: [],
  247. cameraMarkersList: [],
  248. sourceData: [],
  249. keyAreaList: [], //重点区域
  250. iframeBoo: true,
  251. open: false,
  252. iframeVue: null,
  253. activeName: 'info',
  254. radio: '1',
  255. region: [],
  256. //左右缩进
  257. indentStyle: '',
  258. indentleft: '',
  259. indentright: '',
  260. indentText: '收起左右栏',
  261. indentdisabled: false,
  262. placeholderMsg: "请输入摄像头名称",
  263. domId: 'dom1',
  264. localMark: "she",
  265. onShe: false,
  266. onChuan: false,
  267. onLa: false,
  268. colors: "green",
  269. sensorNum: 0,
  270. loudspeakerNum: 0,
  271. values: Math.random()
  272. }
  273. },
  274. watch: {
  275. // 根据名称筛选部门树
  276. deptName(val) {
  277. this.$refs.tree.filter(val)
  278. },
  279. rightDeptName(val) {
  280. if(['chuan','la'].includes(this.localMark)){
  281. this.visuForestCloudCameraBOListSearch = [];
  282. for (let i in this.tempList) {
  283. if (this.tempList[i].cameraName.indexOf(val) != -1) {
  284. this.visuForestCloudCameraBOListSearch.push(this.tempList[i]);
  285. }
  286. }
  287. }
  288. else{
  289. this.visuForestCloudCameraBOListSearch = [];
  290. for (let i in this.visuForestCloudCameraBOList) {
  291. if (this.visuForestCloudCameraBOList[i].cameraName.indexOf(val) != -1) {
  292. this.visuForestCloudCameraBOListSearch.push(this.visuForestCloudCameraBOList[i]);
  293. }
  294. }
  295. }
  296. }
  297. },
  298. methods: {
  299. getNotCoverPlaces(deptId) {
  300. let that = this;
  301. notCoverPlaces(deptId).then((res) => {
  302. if (res.data != null && Array.isArray(res.data)) {
  303. that.$refs.supermap.setGraphicsListMultiple(res.data,"rgba(23,22,22,0)", 0.8);
  304. }
  305. })
  306. },
  307. //初始化地图数据
  308. getSuperMapUrl(){
  309. getUserProfile().then(response => {
  310. let mapDeptId=response.mapDeptId
  311. let num = 0;
  312. if (mapDeptId == "365") {
  313. num = 0;
  314. } else if (mapDeptId == "369") {
  315. num = 1;
  316. } else if (mapDeptId == "371") {
  317. num = 2;
  318. } else if (mapDeptId == "373") {
  319. num = 3;
  320. } else if (mapDeptId == "372") {
  321. num = 4;
  322. } else if (mapDeptId == "370") {
  323. num = 5;
  324. }
  325. this.$refs.supermap.removeAllviewer(num, -1);
  326. });
  327. },
  328. jump() { // 跳转云广播页面
  329. window.open("https://sts.sty1818.com");
  330. },
  331. // setcgqValue: function() {
  332. // let that = this
  333. // for (let i = 0; i < that.visuForestCloudCameraBOListSearch.length; i++) {
  334. // var color = "green";
  335. // var value = Math.random();
  336. // var up = "▲";
  337. // var down = "▼";
  338. // if (value > 0.5) {
  339. // color = "red";
  340. // value = value + "" + up;
  341. // } else {
  342. // value = value + "" + down;
  343. // }
  344. // that.cgqData.push("<span style='color:" + color + "'>" + value + "</span>")
  345. // }
  346. // setInterval(function() {
  347. // var color = "green";
  348. // var value = Math.random();
  349. // var up = "▲";
  350. // var down = "▼";
  351. // if (value > 0.5) {
  352. // color = "red";
  353. // value = value + "" + up;
  354. // } else {
  355. // value = value + "" + down;
  356. // }
  357. // that.cgqData.push("<span style='color:" + color + "'>" + value + "</span>")
  358. // if (that.cgqData.length > that.visuForestCloudCameraBOListSearch.length) {
  359. // console.log(that.cgqData)
  360. // that.cgqData.splice(0, 1)
  361. // }
  362. // }, 5000)
  363. // },
  364. /* 电视墙替换开始 */
  365. showTVWall(channelCode, channelName,type) {
  366. let tvListJson = [{
  367. "switchTab": "2",
  368. "treeLabels": [{
  369. "id": null,
  370. "labelCode": "999",
  371. "labelName": "电视墙",
  372. "cameraType": null,
  373. "parentLabelCode": ""
  374. },
  375. {
  376. "id": "spcamera00010",
  377. "labelCode": channelCode,
  378. "labelName": channelName,
  379. "cameraType": type,
  380. "parentLabelCode": "999"
  381. }
  382. ],
  383. "labelChannels": [{
  384. "labelCode": channelCode,
  385. "channelDates": [{
  386. "channelCode": channelCode,
  387. "channelName": channelName,
  388. "channelSn": null,
  389. "cameraType": type,
  390. "online": "1",
  391. "cameraCode": "1"
  392. }]
  393. }]
  394. }]
  395. this.$refs.TVWall.showTVWall(tvListJson, [{
  396. "channelId": channelCode
  397. }]);
  398. this.$refs.bottomMenu.showMeasure = false;
  399. this.$refs.bottomMenu.showChild = false;
  400. this.$refs.bottomMenu.showBanChild = false;
  401. this.$refs.bottomMenu.showChangChild = false;
  402. },
  403. /* 电视墙替换结束 */
  404. /** 部门树*/
  405. // 查询部门下拉树结构
  406. getTreeselect() {
  407. treeselect().then(response => {
  408. console.log(response.data)
  409. this.deptOptions = response.data
  410. })
  411. },
  412. // 筛选节点
  413. filterNode(value, data) {
  414. if (!value) return true
  415. return data.label.indexOf(value) !== -1
  416. },
  417. // 节点单击事件
  418. handleNodeClick(data) {
  419. let that = this
  420. that.deptId = data.id
  421. console.log("节点单击事件", data, that.localMark);
  422. // that.$refs.supermap.clearG()
  423. // this.findCameraByDept(data.id)
  424. if (that.localMark == 'she') {
  425. that.selectCameraByDeptId(data.id);
  426. getCamerasByDeptId(data.id).then(res => {
  427. that.$refs.TVWalls.showTVWall(res.data, {
  428. longitude: data.deptLongitude,
  429. latitude: data.deptLatitude
  430. });
  431. })
  432. } else if (that.localMark == 'chuan') {
  433. that.getMonitorDeviceAndDataList()
  434. } else if (that.localMark == 'la') {
  435. that.getDlblistBydeptId()
  436. }
  437. },
  438. sheClick() {
  439. this.onLa = false
  440. this.onShe = true
  441. this.onChuan = false
  442. this.localMark = 'she'
  443. this.placeholderMsg = "请输入摄像头名称"
  444. this.deptId = Cookies.get("deptId");
  445. this.selectDeviceType()
  446. // this.getNotCoverPlaces(this.deptId);
  447. this.jkListIcon = 'sj-icon-jkzx'
  448. },
  449. laClick() {
  450. this.onLa = true
  451. this.onShe = false
  452. this.onChuan = false
  453. this.localMark = 'la'
  454. this.placeholderMsg = "请输入云广播名称"
  455. this.deptId = Cookies.get("deptId");
  456. this.getDlblistBydeptId()
  457. // this.$refs.supermap.clearG();
  458. this.jkListIcon = 'sj-icon-labaguangbo'
  459. },
  460. chuanClick() {
  461. this.onLa = false
  462. this.onShe = false
  463. this.onChuan = true
  464. this.localMark = 'chuan'
  465. this.placeholderMsg = "请输入传感器名称"
  466. this.deptId = Cookies.get("deptId");
  467. this.getMonitorDeviceAndDataList()
  468. // this.$refs.supermap.clearG();
  469. this.jkListIcon = 'sj-icon-centerdata-t-firecontrol-fire-pressure-sensor'
  470. },
  471. chuanSet() {
  472. let that = this
  473. setInterval(function() {
  474. that.getMonitorDeviceAndDataList()
  475. }, 300000)
  476. },
  477. //传感器2
  478. getMonitorDeviceAndDataLists() {
  479. let that = this
  480. getMonitorDeviceAndDataList(that.deptId).then((res) => {
  481. that.sensorNum = res.data.length
  482. })
  483. },
  484. // 云广播
  485. getDlblistBydeptId() {
  486. let that = this;
  487. let markersList = [];
  488. getDlblistBydeptId_direct(that.deptId).then(function(res) {
  489. // that.loudspeakerNum = res.data.length
  490. that.visuForestCloudCameraBOListSearch = []
  491. that.tempList = []
  492. if (res.data != null && res.data.length > 0) {
  493. for (let j = 0; j < res.data.length; j++) {
  494. let dat = {
  495. cameraName: res.data[j].name,
  496. longitude: res.data[j].longitude,
  497. latitude: res.data[j].latitude,
  498. }
  499. that.visuForestCloudCameraBOListSearch.push(dat)
  500. }
  501. that.tempList = that.visuForestCloudCameraBOListSearch
  502. for (let i = 0; i < res.data.length; i++) {
  503. let markersMap = {
  504. lng: 124.59,
  505. lat: 43.02,
  506. icon: "big-horn",
  507. bindPopupHtml: '<div class="map-tip">' +
  508. "<span>" +
  509. ' <div class="d-l-con">' +
  510. ' <div class="d-l-l-text">' +
  511. " <h4>名称:" +
  512. (res.data[i].name ? res.data[i].name : "") +
  513. "</h4>" +
  514. " </div>" +
  515. " </div>" +
  516. " </span>" +
  517. "<span>" +
  518. ' <div class="d-l-con">' +
  519. ' <div class="d-l-l-text">' +
  520. " <h4>位置:" +
  521. (res.data[i].position ? res.data[i].position : "") +
  522. "</h4>" +
  523. " </div>" +
  524. " </div>" +
  525. " </span>" +
  526. "<span>" +
  527. ' <div class="d-l-con">' +
  528. ' <div class="d-l-l-text">' +
  529. " <h4>备注:" +
  530. (res.data[i].remark ? res.data[i].remark : "") +
  531. "</h4>" +
  532. " </div>" +
  533. " </div>" +
  534. " </span>" +
  535. "<span>" +
  536. ' <div class="d-l-con">' +
  537. ' <div class="d-l-l-text">' +
  538. " <h4>经纬度:" +
  539. res.data[i].longitude + "," + res.data[i].latitude +
  540. "</h4>" +
  541. " </div>" +
  542. " </div>" +
  543. " </span>" +
  544. "</div>",
  545. click: "jump",
  546. parameter: "",
  547. name: "",
  548. keepBindPopup: false,
  549. isAggregation: false,
  550. };
  551. if (res.data[i].broadcastUse == '1') {
  552. markersMap.icon = "big-horn-emergency";
  553. }else if(res.data[i].broadcastUse == '2'){
  554. markersMap.icon = "big-horn";
  555. }
  556. markersMap.lng = res.data[i].longitude;
  557. markersMap.lat = res.data[i].latitude;
  558. markersList.push(markersMap);
  559. }
  560. setTimeout(() => {
  561. that.$refs.supermap.clearM();
  562. that.$refs.supermap.clearMRadius()
  563. that.$refs.supermap.setMarkers(markersList);
  564. }, 2000);
  565. } else {
  566. setTimeout(() => {
  567. that.$refs.supermap.clearM();
  568. that.$refs.supermap.clearMRadius()
  569. }, 2000);
  570. }
  571. })
  572. .catch(function(error) {
  573. console.error(error);
  574. });
  575. },
  576. getDlblistBydeptIds() {
  577. let that = this;
  578. getDlblistBydeptId_direct(that.deptId).then(function(res) {
  579. that.loudspeakerNum = res.data.length
  580. })
  581. .catch(function(error) {
  582. console.error(error);
  583. });
  584. },
  585. getMonitorDeviceAndDataList() {
  586. let list = []
  587. let markersList = [];
  588. getMonitorDeviceAndDataList(this.deptId).then((res) => {
  589. this.visuForestCloudCameraBOListSearch = []
  590. this.tempList = []
  591. list = res.data
  592. //this.sensorNum = list.length
  593. list.forEach(item => {
  594. let dat = {
  595. cameraName: item.deviceName,
  596. longitude: item.longitude,
  597. latitude: item.latitude,
  598. }
  599. this.visuForestCloudCameraBOListSearch.push(dat)
  600. this.tempList = that.visuForestCloudCameraBOListSearch
  601. let markersMap = {
  602. lng: 124.59,
  603. lat: 43.02,
  604. icon: "marker",
  605. bindPopupHtml: '<div class="map-tip">' +
  606. "<span>" +
  607. ' <div class="d-l-con">' +
  608. ' <div class="d-l-l-text">' +
  609. " <h4>名称:" +
  610. (item.deviceName ? item.deviceName : "") +
  611. "</h4>" +
  612. " </div>" +
  613. " </div>" +
  614. " </span>" +
  615. "<span>" +
  616. ' <div class="d-l-con">' +
  617. ' <div class="d-l-l-text">' +
  618. " <h4>类型:" +
  619. (item.brand ? item.brand : "") +
  620. "</h4>" +
  621. " </div>" +
  622. " </div>" +
  623. " </span>" +
  624. "<span>" +
  625. ' <div class="d-l-con">' +
  626. ' <div class="d-l-l-text">' +
  627. " <h4>经纬度:" +
  628. item.longitude + "," + item.latitude +
  629. "</h4>" +
  630. " </div>" +
  631. " </div>" +
  632. " </span>" +
  633. "</div>",
  634. click: "",
  635. parameter: "",
  636. name: "",
  637. keepBindPopup: false,
  638. isAggregation: false,
  639. };
  640. if (item.deviceType == 1) { // 水质传感器
  641. markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
  642. if(item.workingStatus == '0'){// 在线
  643. markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
  644. }else {// 离线
  645. markersMap.icon = "sj-icon-map-not-centerdata-water-quality-sensor";
  646. }
  647. markersMap.bindPopupHtml += '<div class="map-tip">' +
  648. "<span>" +
  649. ' <div class="d-l-con">' +
  650. ' <div class="d-l-l-text">' +
  651. " <h4>水中PH:" +
  652. (item.data.waterPh ? item.data.waterPh + "pH" : "0pH") +
  653. "</h4>" +
  654. " </div>" +
  655. " </div>" +
  656. " </span>" +
  657. "<span>" +
  658. ' <div class="d-l-con">' +
  659. ' <div class="d-l-l-text">' +
  660. " <h4>化学需氧量:" +
  661. (item.data.cod ? item.data.cod + "mg/L" : "0mg/L") +
  662. "</h4>" +
  663. " </div>" +
  664. " </div>" +
  665. " </span>" +
  666. "<span>" +
  667. ' <div class="d-l-con">' +
  668. ' <div class="d-l-l-text">' +
  669. " <h4>氨氮:" +
  670. (item.data.ammoniaNitrogen ? item.data.ammoniaNitrogen + "mg/L" : "0mg/L") +
  671. "</h4>" +
  672. " </div>" +
  673. " </div>" +
  674. " </span>" +
  675. "<span>" +
  676. ' <div class="d-l-con">' +
  677. ' <div class="d-l-l-text">' +
  678. " <h4>水温:" +
  679. (item.data.waterTemperature ? item.data.waterTemperature + "°C" : "0°C") +
  680. "</h4>" +
  681. " </div>" +
  682. " </div>" +
  683. " </span>" +
  684. "</div>";
  685. } else if (item.deviceType == '002') { // 水尺
  686. markersMap.icon = "sj-icon-map-centerdata_water_gauge";
  687. if(item.workingStatus == '0'){// 在线
  688. markersMap.icon = "sj-icon-map-centerdata_water_gauge";
  689. }else {// 离线
  690. markersMap.icon = "sj-icon-map-not-centerdata-water-gauge";
  691. }
  692. } else if (item.deviceType == '003') { // 水文监测设备
  693. markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
  694. if(item.workingStatus == '0'){// 在线
  695. markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
  696. }else {// 离线
  697. markersMap.icon = "sj-icon-map-not-centerdata-soil-monitoring-equipment";
  698. markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
  699. }
  700. } else if (item.deviceType == 2) { // 土壤监测设备
  701. markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
  702. if(item.workingStatus == '0'){// 在线
  703. markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
  704. }else {// 离线
  705. markersMap.icon = "sj-icon-map-not-centerdata-soil-monitoring-equipment";
  706. }
  707. markersMap.bindPopupHtml += '<div class="map-tip">' +
  708. "<span>" +
  709. ' <div class="d-l-con">' +
  710. ' <div class="d-l-l-text">' +
  711. " <h4>钾含量:" +
  712. (item.data.potassium ? item.data.potassium + "mg/kg" : "0mg/kg") +
  713. "</h4>" +
  714. " </div>" +
  715. " </div>" +
  716. " </span>" +
  717. "<span>" +
  718. ' <div class="d-l-con">' +
  719. ' <div class="d-l-l-text">' +
  720. " <h4>导电率:" +
  721. (item.data.conductivity ? item.data.conductivity + "us/cm" : "0us/cm") +
  722. "</h4>" +
  723. " </div>" +
  724. " </div>" +
  725. " </span>" +
  726. "<span>" +
  727. ' <div class="d-l-con">' +
  728. ' <div class="d-l-l-text">' +
  729. " <h4>氮含量:" +
  730. (item.data.nitrogen ? item.data.nitrogen + "mg/kg" : "0mg/kg") +
  731. "</h4>" +
  732. " </div>" +
  733. " </div>" +
  734. " </span>" +
  735. "<span>" +
  736. ' <div class="d-l-con">' +
  737. ' <div class="d-l-l-text">' +
  738. " <h4>温度:" +
  739. (item.data.temperature ? item.data.temperature + "°C" : "0°C") +
  740. "</h4>" +
  741. " </div>" +
  742. " </div>" +
  743. " </span>" +
  744. "<span>" +
  745. ' <div class="d-l-con">' +
  746. ' <div class="d-l-l-text">' +
  747. " <h4>ph值:" +
  748. (item.data.ph ? item.data.ph + "PH" : "0PH") +
  749. "</h4>" +
  750. " </div>" +
  751. " </div>" +
  752. " </span>" +
  753. "<span>" +
  754. ' <div class="d-l-con">' +
  755. ' <div class="d-l-l-text">' +
  756. " <h4>湿度:" +
  757. (item.data.humidity ? item.data.humidity + "%RH" : "0%RH") +
  758. "</h4>" +
  759. " </div>" +
  760. " </div>" +
  761. " </span>" +
  762. "<span>" +
  763. ' <div class="d-l-con">' +
  764. ' <div class="d-l-l-text">' +
  765. " <h4>磷含量:" +
  766. (item.data.phosphorus ? item.data.phosphorus + "mg/kg" : "0mg/kg") +
  767. "</h4>" +
  768. " </div>" +
  769. " </div>" +
  770. " </span>" +
  771. "</div>";
  772. } else if (item.deviceType == 4) { // 病虫害监测站
  773. markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
  774. if(item.workingStatus == '0'){// 在线
  775. markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
  776. }else {// 离线
  777. markersMap.icon = "sj-icon-map-not-centerdata-pest-and-disease-monitoring-station";
  778. }
  779. } else if (item.deviceType == 5) { // 大气传感器
  780. markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
  781. if(item.workingStatus == '0'){// 在线
  782. markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
  783. }else {// 离线
  784. markersMap.icon = "sj-icon-map-not-centerdata-atmospheric-sensor";
  785. }
  786. markersMap.bindPopupHtml += '<div class="map-tip">' +
  787. "<span>" +
  788. ' <div class="d-l-con">' +
  789. ' <div class="d-l-l-text">' +
  790. " <h4>二氧化硫:" +
  791. (item.data.sulfurDioxide ? item.data.sulfurDioxide + "ug/m³" : "0ug/m³") +
  792. "</h4>" +
  793. " </div>" +
  794. " </div>" +
  795. " </span>" +
  796. "<span>" +
  797. ' <div class="d-l-con">' +
  798. ' <div class="d-l-l-text">' +
  799. " <h4>一氧化碳:" +
  800. (item.data.carbonMonoxide ? item.data.carbonMonoxide + "ug/m³" : "0ug/m³") +
  801. "</h4>" +
  802. " </div>" +
  803. " </div>" +
  804. " </span>" +
  805. "<span>" +
  806. ' <div class="d-l-con">' +
  807. ' <div class="d-l-l-text">' +
  808. " <h4>温度:" +
  809. (item.data.temperature ? item.data.temperature + "°C" : "0°C") +
  810. "</h4>" +
  811. " </div>" +
  812. " </div>" +
  813. " </span>" +
  814. "<span>" +
  815. ' <div class="d-l-con">' +
  816. ' <div class="d-l-l-text">' +
  817. " <h4>二氧化氮:" +
  818. (item.data.nitrogenDioxide ? item.data.nitrogenDioxide + "ug/m³" : "0ug/m³") +
  819. "</h4>" +
  820. " </div>" +
  821. " </div>" +
  822. " </span>" +
  823. "</div>";
  824. } else if (item.deviceType == 6) { // 水压传感器
  825. markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
  826. if(item.workingStatus == '0'){// 在线
  827. markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
  828. }else {// 离线
  829. markersMap.icon = "sj-icon-map-not-centerdata-water-pressure-sensor";
  830. }
  831. markersMap.bindPopupHtml += '<div class="map-tip">' +
  832. "<span>" +
  833. ' <div class="d-l-con">' +
  834. ' <div class="d-l-l-text">' +
  835. " <h4>下限警报使能:" +
  836. (item.data.thresholdLowEnable ? item.data.thresholdLowEnable + "MPa" : "0MPa") +
  837. "</h4>" +
  838. " </div>" +
  839. " </div>" +
  840. " </span>" +
  841. "<span>" +
  842. ' <div class="d-l-con">' +
  843. ' <div class="d-l-l-text">' +
  844. " <h4>上限警报使能:" +
  845. (item.data.thresholdHighEnable ? item.data.thresholdHighEnable + "MPa" : "0MPa") +
  846. "</h4>" +
  847. " </div>" +
  848. " </div>" +
  849. " </span>" +
  850. "<span>" +
  851. ' <div class="d-l-con">' +
  852. ' <div class="d-l-l-text">' +
  853. " <h4>水压力值:" +
  854. (item.data.hydraulicValue ? item.data.hydraulicValue + "MPa" : "0MPa") +
  855. "</h4>" +
  856. " </div>" +
  857. " </div>" +
  858. " </span>" +
  859. "<span>" +
  860. ' <div class="d-l-con">' +
  861. ' <div class="d-l-l-text">' +
  862. " <h4>水压下限阈值:" +
  863. (item.data.hydraulicThresholdMin ? item.data.hydraulicThresholdMin + "MPa" : "0MPa") +
  864. "</h4>" +
  865. " </div>" +
  866. " </div>" +
  867. " </span>" +
  868. "<span>" +
  869. ' <div class="d-l-con">' +
  870. ' <div class="d-l-l-text">' +
  871. " <h4>水压上限阈值:" +
  872. (item.data.hydraulicThresholdMax ? item.data.hydraulicThresholdMax + "MPa" : "0MPa") +
  873. "</h4>" +
  874. " </div>" +
  875. " </div>" +
  876. " </span>" +
  877. "</div>";
  878. } else if (item.deviceType == 7) //水流速传感器
  879. {
  880. markersMap.icon = "sj-icon-map-centerdata_water_flow_rate";
  881. if(item.workingStatus == '0'){// 在线
  882. markersMap.icon = "sj-icon-map-centerdata_water_flow_rate";
  883. }else {// 离线
  884. markersMap.icon = "sj-icon-map-not-centerdata-water-flow-rate";
  885. }
  886. markersMap.bindPopupHtml += '<div class="map-tip">' +
  887. "<span>" +
  888. ' <div class="d-l-con">' +
  889. ' <div class="d-l-l-text">' +
  890. " <h4>瞬时流速:" +
  891. (item.data.Q2 ? item.data.Q2 + "m/s" : "0m/s") +
  892. "</h4>" +
  893. " </div>" +
  894. " </div>" +
  895. " </span>" +
  896. "<span>" +
  897. ' <div class="d-l-con">' +
  898. ' <div class="d-l-l-text">' +
  899. " <h4>瞬时流量:" +
  900. (item.data.CQ1 ? item.data.CQ1 + "m³/s" : "0m³/s") +
  901. "</h4>" +
  902. " </div>" +
  903. " </div>" +
  904. " </span></div>";
  905. }
  906. markersMap.lng = item.longitude;
  907. markersMap.lat = item.latitude;
  908. markersList.push(markersMap);
  909. })
  910. console.log(markersList)
  911. })
  912. setTimeout(() => {
  913. this.$refs.supermap.clearM();
  914. this.$refs.supermap.clearMRadius()
  915. this.$refs.supermap.setMarkers(markersList);
  916. }, 2000);
  917. },
  918. // 传感器
  919. getSensorListByDeptId() {
  920. let that = this;
  921. let markersList = [];
  922. getSensorListByDeptId(that.deptId).then(function(res) {
  923. that.visuForestCloudCameraBOListSearch = []
  924. // that.sensorNum = res.data.length
  925. if (res.data != null && res.data.length > 0) {
  926. for (let j = 0; j < res.data.length; j++) {
  927. let dat = {
  928. cameraName: res.data[j].deviceName,
  929. longitude: res.data[j].longitude,
  930. latitude: res.data[j].latitude,
  931. }
  932. that.visuForestCloudCameraBOListSearch.push(dat)
  933. }
  934. for (let i = 0; i < res.data.length; i++) {
  935. let markersMap = {
  936. lng: 124.59,
  937. lat: 43.02,
  938. icon: "marker",
  939. bindPopupHtml: "",
  940. click: "",
  941. parameter: "",
  942. name: i,
  943. keepBindPopup: false,
  944. isAggregation: false,
  945. };
  946. if (res.data[i].deviceType == 1) { // 水质传感器
  947. markersMap.icon = "sj-icon-map-centerdata_water_quality_sensor";
  948. } else if (res.data[i].deviceType == '002') { // 水尺
  949. markersMap.icon = "sj-icon-map-centerdata_water_gauge";
  950. } else if (res.data[i].deviceType == '003') { // 水文监测设备
  951. markersMap.icon = "sj-icon-map-centerdata_hydrological_monitoring_equipment";
  952. } else if (res.data[i].deviceType == 2) { // 土壤监测设备
  953. markersMap.icon = "sj-icon-map-centerdata_soil_monitoring_equipment";
  954. } else if (res.data[i].deviceType == 4) { // 病虫害监测站
  955. markersMap.icon = "sj-icon-map-centerdata_pest_and_disease_monitoring_station";
  956. } else if (res.data[i].deviceType == 5) { // 大气传感器
  957. markersMap.icon = "sj-icon-map-centerdata_atmospheric_sensor";
  958. } else if (res.data[i].deviceType == 6) { // 水压传感器
  959. markersMap.icon = "sj-icon-map-centerdata_water_pressure_sensor";
  960. }
  961. markersMap.lng = res.data[i].longitude;
  962. markersMap.lat = res.data[i].latitude;
  963. markersList.push(markersMap);
  964. }
  965. // that.setcgqValue()
  966. setTimeout(() => {
  967. that.$refs.supermap.clearM();
  968. that.$refs.supermap.clearMRadius()
  969. that.$refs.supermap.setMarkers(markersList);
  970. }, 2000);
  971. } else {
  972. setTimeout(() => {
  973. that.$refs.supermap.clearM();
  974. that.$refs.supermap.clearMRadius()
  975. }, 2000);
  976. }
  977. that.onLa = false
  978. that.onShe = false
  979. that.onChuan = true
  980. })
  981. .catch(function(error) {
  982. console.error(error);
  983. });
  984. },
  985. getSensorListByDeptIds() {
  986. let that = this;
  987. getSensorListByDeptId(that.deptId).then(function(res) {
  988. that.sensorNum = res.data.length
  989. taht.onLa = false
  990. this.onShe = false
  991. this.onChuan = true
  992. })
  993. .catch(function(error) {
  994. console.error(error);
  995. });
  996. },
  997. selectKeyAreaList() {
  998. this.keyAreaList = []
  999. //获取重点区域列表
  1000. let that = this
  1001. selectKeyAreaList().then(res => {
  1002. that.keyAreaList = res.data
  1003. })
  1004. },
  1005. getRegionalFlag(id,index) {
  1006. //获取重点区域
  1007. this.listCurrentIndex3 = index
  1008. let that = this
  1009. getRegionalFlag(id).then(res => {
  1010. that.graphicsList = []
  1011. //地图标记
  1012. let latLngs = JSON.parse(res.data.data.latLngs!=null?res.data.data.latLngs:'[]')
  1013. if (latLngs.length > 0) {
  1014. for (let i = 0; i < latLngs.length; i++) {
  1015. that.graphicsList.push(latLngs[i].lng);
  1016. that.graphicsList.push(latLngs[i].lat);
  1017. }
  1018. setTimeout(() => {
  1019. that.$refs.supermap.clearG()
  1020. that.$refs.supermap.setGraphicsList(this.graphicsList, 'red', 0.8)
  1021. }, 1000)
  1022. } else {
  1023. that.$refs.supermap.clearG()
  1024. }
  1025. })
  1026. },
  1027. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  1028. bottomMenuList() {
  1029. this.$refs.bottomMenu.selectTaskList() //获取任务列表
  1030. this.$refs.bottomMenu.selectMessageList() //获取消息列表
  1031. },
  1032. showDialog(click) {
  1033. if (click == 'eventLocation') {
  1034. this.$refs.eventLocation.showEventLocation()
  1035. this.$refs.bottomMenu.showMeasure = false
  1036. this.$refs.bottomMenu.showChild = false
  1037. this.$refs.bottomMenu.showBanChild = false
  1038. this.$refs.bottomMenu.showChangChild = false
  1039. } else if (click == 'editableLayers') {
  1040. this.$refs.bottomMenu.showChild = false
  1041. this.$refs.bottomMenu.showBanChild = false
  1042. this.$refs.bottomMenu.showChangChild = false
  1043. if (!this.$refs.bottomMenu.showMeasure) {
  1044. this.$refs.bottomMenu.showMeasure = true
  1045. } else {
  1046. this.$refs.bottomMenu.showMeasure = false
  1047. }
  1048. } else if (click == 'layerSwitching') {
  1049. this.$refs.bottomMenu.showMeasure = false
  1050. this.$refs.bottomMenu.showBanChild = false
  1051. this.$refs.bottomMenu.showChangChild = false
  1052. if (!this.$refs.bottomMenu.showChild) {
  1053. this.$refs.bottomMenu.showChild = true
  1054. } else {
  1055. this.$refs.bottomMenu.showChild = false
  1056. }
  1057. } else if (click == 'TVWall') {
  1058. this.$refs.TVWall.showTVWall()
  1059. this.$refs.bottomMenu.showMeasure = false
  1060. this.$refs.bottomMenu.showChild = false
  1061. this.$refs.bottomMenu.showBanChild = false
  1062. this.$refs.bottomMenu.showChangChild = false
  1063. } else if (click == 'forestban') {
  1064. this.$refs.bottomMenu.showMeasure = false
  1065. this.$refs.bottomMenu.showChild = false
  1066. this.$refs.bottomMenu.showChangChild = false
  1067. if (!this.$refs.bottomMenu.showBanChild) {
  1068. this.$refs.bottomMenu.showBanChild = true
  1069. } else {
  1070. this.$refs.bottomMenu.showBanChild = false
  1071. }
  1072. } else if (click == 'forestchang') {
  1073. this.$refs.bottomMenu.showMeasure = false
  1074. this.$refs.bottomMenu.showBanChild = false
  1075. this.$refs.bottomMenu.showChild = false
  1076. if (!this.$refs.bottomMenu.showChangChild) {
  1077. this.$refs.bottomMenu.showChangChild = true
  1078. } else {
  1079. this.$refs.bottomMenu.showChangChild = false
  1080. }
  1081. }
  1082. },
  1083. //选择图层
  1084. choseLayerSwitching(url, isClear) {
  1085. this.$refs.supermap.layerSwitching(url, isClear)
  1086. },
  1087. //选择图层(传递数组)
  1088. choseLayerSwitchingList(urlList) {
  1089. this.$refs.supermap.layerSwitchingList(urlList)
  1090. },
  1091. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  1092. selectDeviceType() {
  1093. //获取左侧动态感知设备
  1094. let that = this
  1095. selectDeviceType(that.deptId).then(res => {
  1096. // selectDeviceType_direct({deptId:that.deptId,type:7}).then(res => {
  1097. that.cameraMarkersList = []
  1098. that.tempList = []
  1099. that.visuForestCloudMapDeviceBOList = res.data.visuForestCloudMapDeviceBOList
  1100. that.tempList = res.data.visuForestCloudMapDeviceBOList
  1101. that.region = res.data.visuForestCloudTodaySjfbBOList
  1102. if (res.data.visuForestCloudTodaySjfbBOList != null && res.data.visuForestCloudTodaySjfbBOList
  1103. .length > 0) {
  1104. for (let i = 0; i < res.data.visuForestCloudTodaySjfbBOList.length; i++) {
  1105. let aa = []
  1106. aa.push(res.data.visuForestCloudTodaySjfbBOList[i].deptName)
  1107. aa.push(Number(res.data.visuForestCloudTodaySjfbBOList[i].deptCount))
  1108. this.sourceData.push(aa)
  1109. }
  1110. }
  1111. that.visuForestCloudCameraBOList = res.data.visuForestCloudCameraBOList
  1112. that.visuForestCloudCameraBOListSearch = res.data.visuForestCloudCameraBOList
  1113. if (res.data.visuForestCloudCameraBOList != null && res.data.visuForestCloudCameraBOList.length > 0) {
  1114. for (let i = 0; i < res.data.visuForestCloudCameraBOList.length; i++) {
  1115. let markersMap = {
  1116. lng: 124.59,
  1117. lat: 43.02,
  1118. icon: 'camera',
  1119. bindPopupHtml: '',
  1120. click: 'preview',
  1121. parameter: '',
  1122. name: i,
  1123. keepBindPopup: false,
  1124. isAggregation: false
  1125. }
  1126. if (res.data.visuForestCloudCameraBOList[i].cameraUse == 1) {
  1127. if (res.data.visuForestCloudCameraBOList[i].workingStatus == '0') {
  1128. markersMap.icon = 'sj-icon-map-centerdata-slmonitor'
  1129. markersMap.click='preview'
  1130. } else {
  1131. markersMap.icon = 'sj-icon-map-not-centerdata-slmonitor'
  1132. markersMap.click=''
  1133. }
  1134. }
  1135. else if (res.data.visuForestCloudCameraBOList[i].cameraUse == 2) {
  1136. if (res.data.visuForestCloudCameraBOList[i].workingStatus == '0') {
  1137. markersMap.icon = 'camera'
  1138. markersMap.click='preview'
  1139. } else {
  1140. markersMap.icon = 'camera-not'
  1141. markersMap.click=''
  1142. }
  1143. }
  1144. else if (res.data.visuForestCloudCameraBOList[i].cameraUse == 3) {
  1145. if (res.data.visuForestCloudCameraBOList[i].workingStatus == '0') {
  1146. markersMap.icon = 'sj-icon-map-centerdata-slmonitor-traffic'
  1147. markersMap.click='preview'
  1148. } else {
  1149. markersMap.icon = 'sj-icon-map-not-centerdata-slmonitor-traffic'
  1150. markersMap.click=''
  1151. }
  1152. }
  1153. else if (res.data.visuForestCloudCameraBOList[i].cameraUse == 5) {
  1154. if (res.data.visuForestCloudCameraBOList[i].workingStatus == '0') {
  1155. markersMap.icon = 'sj-icon-map-centerdata-river_camera'
  1156. markersMap.click='preview'
  1157. } else {
  1158. markersMap.icon = 'sj-icon-map-not-centerdata-river_camera'
  1159. markersMap.click=''
  1160. }
  1161. }
  1162. else if (res.data.visuForestCloudCameraBOList[i].cameraUse == 4) {
  1163. if (res.data.visuForestCloudCameraBOList[i].workingStatus == '0') {
  1164. markersMap.icon = 'sj-icon-map-centerdata-sand-quarry-camera'
  1165. markersMap.click='preview'
  1166. } else {
  1167. markersMap.icon = 'sj-icon-map-not-centerdata-sand-quarry-camera'
  1168. markersMap.click=''
  1169. }
  1170. }
  1171. if (res.data.visuForestCloudCameraBOList[i].channelCode != null) {
  1172. markersMap.parameter = {
  1173. code: res.data.visuForestCloudCameraBOList[i].cameraCode,
  1174. name: res.data.visuForestCloudCameraBOList[i].cameraName,
  1175. type: res.data.visuForestCloudCameraBOList[i].cameraType
  1176. }
  1177. } else {
  1178. markersMap.parameter = []
  1179. }
  1180. markersMap.lng = res.data.visuForestCloudCameraBOList[i].longitude
  1181. markersMap.lat = res.data.visuForestCloudCameraBOList[i].latitude
  1182. markersMap.radius = res.data.visuForestCloudCameraBOList[i].cameraRadius
  1183. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1184. '<span>' +
  1185. ' <div class="d-l-con">' +
  1186. ' <div class="d-l-l-text">' +
  1187. ' <h4>经纬度:' + res.data.visuForestCloudCameraBOList[i].longitude +
  1188. ',' + res.data.visuForestCloudCameraBOList[i].latitude + '</h4>' +
  1189. ' </div>' +
  1190. ' </div>' +
  1191. ' </span>' +
  1192. '<span>' +
  1193. ' <div class="d-l-con">' +
  1194. ' <div class="d-l-l-text">' +
  1195. ' <h4>摄像头名称:' + res.data.visuForestCloudCameraBOList[i]
  1196. .cameraName + '</h4>' +
  1197. ' </div>' +
  1198. ' </div>' +
  1199. ' </span>' +
  1200. '<span>' +
  1201. ' <div class="d-l-con">' +
  1202. ' <div class="d-l-l-text">' +
  1203. ' <h4>网络运营商:' + (res.data.visuForestCloudCameraBOList[i].operatorType == "1" ? "联通" :
  1204. (res.data.visuForestCloudCameraBOList[i].operatorType == "2" ? "移动":
  1205. (res.data.visuForestCloudCameraBOList[i].operatorType == "3" ? "电信": "无"))) + '</h4>' +
  1206. ' </div>' +
  1207. ' </div>' +
  1208. ' </span>' +
  1209. '<span>' +
  1210. ' <div class="d-l-con">' +
  1211. ' <div class="d-l-l-text">' +
  1212. ' <h4>摄像头半径:' + res.data.visuForestCloudCameraBOList[i]
  1213. .cameraRadius + '米</h4>' +
  1214. ' </div>' +
  1215. ' </div>' +
  1216. ' </span>' +
  1217. '</div>'
  1218. this.cameraMarkersList.push(markersMap)
  1219. // cameraAccount: "1"
  1220. // cameraCode: "1000010"
  1221. // cameraFactory: "2"
  1222. // cameraIp: "1"
  1223. // cameraName: "2"
  1224. // cameraPasword: "2"
  1225. // cameraPort: 2
  1226. // cameraRadius: 20
  1227. // cameraRegion: "3"
  1228. // dataDeptId: null
  1229. // dataStatus: null
  1230. // eventType: null
  1231. // height: "11"
  1232. // id: "0d165fc362514f79b12a899ea66295fd"
  1233. // latitude: "49.325625"
  1234. // longitude: "125.3333"
  1235. }
  1236. setTimeout(() => {
  1237. that.$refs.supermap.clearM();
  1238. that.$refs.supermap.clearMRadius()
  1239. that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
  1240. }, 3000)
  1241. } else {
  1242. setTimeout(() => {
  1243. that.$refs.supermap.clearM();
  1244. that.$refs.supermap.clearMRadius()
  1245. }, 1000)
  1246. }
  1247. })
  1248. },
  1249. dropLocation(lat, lng, index) {
  1250. this.listCurrentIndex2 = index
  1251. this.$refs.supermap.dropLocation(lat, lng, 15)
  1252. },
  1253. selectCameraByDeptId(depId) {
  1254. this.listCurrentIndex1 = depId
  1255. let that = this
  1256. that.cameraMarkersList = []
  1257. that.visuForestCloudCameraBOList = []
  1258. selectCameraByDeptId(depId).then(res => {
  1259. //根据设备类型查看列表
  1260. that.visuForestCloudCameraBOList = res.data
  1261. that.visuForestCloudCameraBOListSearch = res.data
  1262. if (res.data != null && res.data.length > 0) {
  1263. for (let i = 0; i < res.data.length; i++) {
  1264. let markersMap = {
  1265. lng: 124.59,
  1266. lat: 43.02,
  1267. icon: 'camera',
  1268. bindPopupHtml: '',
  1269. click: 'preview',
  1270. parameter: '',
  1271. name: i,
  1272. keepBindPopup: false,
  1273. isAggregation: false
  1274. }
  1275. if (res.data[i].channelCode != null) {
  1276. markersMap.parameter = {
  1277. code: res.data[i].cameraCode,
  1278. name: res.data[i].cameraName,
  1279. type: res.data[i].cameraType
  1280. }
  1281. } else {
  1282. markersMap.parameter = []
  1283. }
  1284. if (res.data[i].cameraUse == 1) {
  1285. if (res.data[i].workingStatus == '0') {
  1286. markersMap.icon = 'sj-icon-map-centerdata-slmonitor'
  1287. markersMap.click='preview'
  1288. } else {
  1289. markersMap.icon = 'sj-icon-map-not-centerdata-slmonitor'
  1290. markersMap.click=''
  1291. }
  1292. }
  1293. else if (res.data[i].cameraUse == 2) {
  1294. if (res.data[i].workingStatus == '0') {
  1295. markersMap.icon = 'camera'
  1296. markersMap.click='preview'
  1297. } else {
  1298. markersMap.icon = 'camera-not'
  1299. markersMap.click=''
  1300. }
  1301. }
  1302. else if (res.data[i].cameraUse == 3) {
  1303. if (res.data[i].workingStatus == '0') {
  1304. markersMap.icon = 'sj-icon-map-centerdata-slmonitor-traffic'
  1305. markersMap.click='preview'
  1306. } else {
  1307. markersMap.icon = 'sj-icon-map-not-centerdata-slmonitor-traffic'
  1308. markersMap.click=''
  1309. }
  1310. }
  1311. else if (res.data[i].cameraUse == 5) {
  1312. if (res.data[i].workingStatus == '0') {
  1313. markersMap.icon = 'sj-icon-map-centerdata-river_camera'
  1314. markersMap.click='preview'
  1315. } else {
  1316. markersMap.icon = 'sj-icon-map-not-centerdata-river_camera'
  1317. markersMap.click=''
  1318. }
  1319. }
  1320. else if (res.data[i].cameraUse == 4) {
  1321. if (res.data[i].workingStatus == '0') {
  1322. markersMap.icon = 'sj-icon-map-centerdata-sand-quarry-camera'
  1323. markersMap.click='preview'
  1324. } else {
  1325. markersMap.icon = 'sj-icon-map-not-centerdata-sand-quarry-camera'
  1326. markersMap.click=''
  1327. }
  1328. }
  1329. markersMap.lng = res.data[i].longitude
  1330. markersMap.lat = res.data[i].latitude
  1331. markersMap.radius = res.data[i].cameraRadius
  1332. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1333. '<span>' +
  1334. ' <div class="d-l-con">' +
  1335. ' <div class="d-l-l-text">' +
  1336. ' <h4>经纬度:' + res.data[i].longitude +
  1337. ',' + res.data[i].latitude + '</h4>' +
  1338. ' </div>' +
  1339. ' </div>' +
  1340. ' </span>' +
  1341. '<span>' +
  1342. ' <div class="d-l-con">' +
  1343. ' <div class="d-l-l-text">' +
  1344. ' <h4>摄像头名称:' + res.data[i]
  1345. .cameraName + '</h4>' +
  1346. ' </div>' +
  1347. ' </div>' +
  1348. ' </span>' +
  1349. '<span>' +
  1350. ' <div class="d-l-con">' +
  1351. ' <div class="d-l-l-text">' +
  1352. ' <h4>网络运营商:' + (res.data[i].operatorType == "1" ? "联通" :
  1353. (res.data[i].operatorType == "2" ? "移动":
  1354. (res.data[i].operatorType == "3" ? "电信": "无"))) + '</h4>' +
  1355. ' </div>' +
  1356. ' </div>' +
  1357. ' </span>' +
  1358. '<span>' +
  1359. ' <div class="d-l-con">' +
  1360. ' <div class="d-l-l-text">' +
  1361. ' <h4>摄像头半径:' + res.data[i]
  1362. .cameraRadius + '米</h4>' +
  1363. ' </div>' +
  1364. ' </div>' +
  1365. ' </span>' +
  1366. '</div>'
  1367. this.cameraMarkersList.push(markersMap)
  1368. }
  1369. setTimeout(() => {
  1370. that.$refs.supermap.clearMRadius()
  1371. that.$refs.supermap.clearM();
  1372. that.$refs.supermap.setMarkersRadius(this.cameraMarkersList)
  1373. }, 3000)
  1374. } else {
  1375. setTimeout(() => {
  1376. that.$refs.supermap.clearM();
  1377. that.$refs.supermap.clearMRadius()
  1378. }, 1000)
  1379. }
  1380. })
  1381. },
  1382. //吉祥物收起左右框
  1383. indent() {
  1384. let list = document.getElementsByClassName('el-tooltip__popper')
  1385. list[list.length - 1].style.display = 'none'
  1386. if (this.indentStyle == '') {
  1387. this.indentStyle = 'indent-style'
  1388. this.indentleft = 'indent-left'
  1389. this.indentright = 'indent-right'
  1390. this.indentText = '展开左右栏'
  1391. } else if (this.indentText == '展开左右栏') {
  1392. this.indentStyle = ''
  1393. this.indentleft = ''
  1394. this.indentright = ''
  1395. this.indentText = '收起左右栏'
  1396. }
  1397. },
  1398. /** ----------------------------------摄像头预览开始------------------------------------- */
  1399. alertLogin: function() {
  1400. this.$modal.msg('登录中....')
  1401. },
  1402. alertLoginSuccess: function() {
  1403. this.$modal.msgSuccess('登录成功!')
  1404. },
  1405. alertLoginFailed: function() {
  1406. this.$modal.msgError('登陆失败!')
  1407. },
  1408. alertReinstall: function() {
  1409. this.$modal.msgWarning('请重新安装客户端')
  1410. },
  1411. cancelEventLocationShow() {
  1412. if (this.oWebControl != null) {
  1413. this.oWebControl.JS_HideWnd() // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
  1414. this.oWebControl.JS_Disconnect().then(function() { // 断开与插件服务连接成功
  1415. },
  1416. function() { // 断开与插件服务连接失败
  1417. })
  1418. }
  1419. },
  1420. fatherMethod(dianshiqiang, longitude, latitude, item) {
  1421. this.$refs.TVWalls.showTVWall(
  1422. dianshiqiang, {
  1423. longitude: longitude,
  1424. latitude: latitude,
  1425. },
  1426. item
  1427. );
  1428. },
  1429. /** 预览按钮操作 */
  1430. preview(cameraParam) {
  1431. this.showTVWall(cameraParam.code, cameraParam.name,cameraParam.type);
  1432. },
  1433. /** 预览按钮操作 */
  1434. preview_废弃(cameraParam) {
  1435. if (cameraParam.type == '1') {
  1436. getDahuaVideoServer().then(newResponse => {
  1437. console.log(newResponse)
  1438. this.ws.detectConnectQt().then(res => {
  1439. if (res) { // 连接客户端成功
  1440. this.alertLogin()
  1441. this.ws.login({
  1442. loginIp: newResponse.loginIp,
  1443. loginPort: newResponse.loginPort,
  1444. userName: newResponse.userName,
  1445. userPwd: newResponse.userPwd,
  1446. token: '',
  1447. https: 1
  1448. })
  1449. this.ws.on('loginState', (res) => {
  1450. this.isLogin = res
  1451. console.log('---res-----', res)
  1452. if (res) {
  1453. this.alertLoginSuccess()
  1454. this.activePanel = 'key2'
  1455. this.realTimeVideoDialog(cameraParam.code)
  1456. } else {
  1457. this.alertLoginFailed()
  1458. }
  1459. })
  1460. } else { // 连接客户端失败
  1461. this.alertReinstall()
  1462. }
  1463. })
  1464. })
  1465. } else if (cameraParam.type == '0') {
  1466. let that = this
  1467. that.cameraVisible = true
  1468. getHaiKangVideoServer({
  1469. cameraCode: cameraParam.code
  1470. }).then(newResponse => {
  1471. that.cameraTitle = '摄像头-' + newResponse.data.cameraName
  1472. that.initPlugin(newResponse.data.appkey, newResponse.data.loginIp, newResponse.data.secret, newResponse
  1473. .data.loginPort)
  1474. setTimeout(function() {
  1475. that.playhk(newResponse.data.channelCode)
  1476. }, 5000)
  1477. })
  1478. }
  1479. },
  1480. realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
  1481. if (!this.isLogin) {
  1482. this.$Message.info('正在登陆客户端,请稍等......')
  1483. return false
  1484. }
  1485. const params = [cameraParams];
  1486. this.ws.openVideo(params)
  1487. },
  1488. /** ----------------------------------摄像头预览结束------------------------------------- */
  1489. /** ----------------------------------海康摄像头预览开始------------------------------------- */
  1490. // 创建播放实例
  1491. initPlugin(newappkey, newloginIp, newsecret, newloginPort) {
  1492. let that = this
  1493. that.oWebControl = new WebControl({
  1494. szPluginContainer: 'playWnd', // 指定容器id
  1495. iServicePortStart: 15900, // 指定起止端口号,建议使用该值
  1496. iServicePortEnd: 15909,
  1497. szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11', // 用于IE10使用ActiveX的clsid
  1498. cbConnectSuccess: function() { // 创建WebControl实例成功
  1499. that.oWebControl.JS_StartService('window', { // WebControl实例创建成功后需要启动服务
  1500. dllPath: './VideoPluginConnect.dll' // 值"./VideoPluginConnect.dll"写死
  1501. }).then(function() { // 启动插件服务成功
  1502. that.oWebControl.JS_SetWindowControlCallback({ // 设置消息回调
  1503. cbIntegrationCallBack: cbIntegrationCallBack
  1504. })
  1505. that.oWebControl.JS_CreateWnd('playWnd', 1020, 600).then(
  1506. function() { //JS_CreateWnd创建视频播放窗口,宽高可设定
  1507. that.init(newappkey, newloginIp, newsecret, newloginPort) // 创建播放实例成功后初始化
  1508. })
  1509. }, function() { // 启动插件服务失败
  1510. })
  1511. },
  1512. cbConnectError: function() { // 创建WebControl实例失败
  1513. that.oWebControl = null
  1514. $('#playWnd').html('插件未启动,正在尝试启动,请稍候...<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  1515. WebControl.JS_WakeUp('VideoWebPlugin://') // 程序未启动时执行error函数,采用wakeup来启动程序
  1516. initCount++
  1517. if (initCount < 3) {
  1518. setTimeout(function() {
  1519. that.initPlugin(newappkey, newloginIp, newsecret, newloginPort)
  1520. }, 3000)
  1521. } else {
  1522. $('#playWnd').html('插件启动失败,请检查插件是否安装!<a href="./hk/VideoWebPlugin.exe">点击下载插件</a>')
  1523. }
  1524. },
  1525. cbConnectClose: function(bNormalClose) {
  1526. // 异常断开:bNormalClose = false
  1527. // JS_Disconnect正常断开:bNormalClose = true
  1528. console.log('cbConnectClose')
  1529. that.oWebControl = null
  1530. }
  1531. })
  1532. },
  1533. //播放海康摄像头
  1534. playhk(channelCode) {
  1535. var cameraIndexCode = channelCode //获取输入的监控点编号值,必填
  1536. var streamMode = 0 //主子码流标识:0-主码流,1-子码流
  1537. var transMode = 1 //传输协议:0-UDP,1-TCP
  1538. var gpuMode = 0 //是否启用GPU硬解,0-不启用,1-启用
  1539. var wndId = -1 //播放窗口序号(在2x2以上布局下可指定播放窗口)
  1540. cameraIndexCode = cameraIndexCode.replace(/(^\s*)/g, '')
  1541. cameraIndexCode = cameraIndexCode.replace(/(\s*$)/g, '')
  1542. this.oWebControl.JS_RequestInterface({
  1543. funcName: 'startPreview',
  1544. argument: JSON.stringify({
  1545. cameraIndexCode: cameraIndexCode, //监控点编号
  1546. streamMode: streamMode, //主子码流标识
  1547. transMode: transMode, //传输协议
  1548. gpuMode: gpuMode, //是否开启GPU硬解
  1549. wndId: wndId //可指定播放窗口
  1550. })
  1551. })
  1552. },
  1553. //初始化
  1554. init(newappkey, newloginIp, newsecret, newloginPort) {
  1555. let that = this
  1556. that.getPubKey(function() {
  1557. ////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
  1558. var appkey = newappkey //综合安防管理平台提供的appkey,必填
  1559. var secret = that.setEncrypt(newsecret) //综合安防管理平台提供的secret,必填
  1560. var ip = newloginIp //综合安防管理平台IP地址,必填
  1561. var playMode = 0 //初始播放模式:0-预览,1-回放
  1562. var port = Number(newloginPort) //综合安防管理平台端口,若启用HTTPS协议,默认443
  1563. var snapDir = 'D:\\SnapDir' //抓图存储路径
  1564. var videoDir = 'D:\\VideoDir' //紧急录像或录像剪辑存储路径
  1565. var layout = '1x1' //playMode指定模式的布局
  1566. var enableHTTPS = 1 //是否启用HTTPS协议与综合安防管理平台交互,这里总是填1
  1567. var encryptedFields = 'secret' //加密字段,默认加密领域为secret
  1568. var showToolbar = 1 //是否显示工具栏,0-不显示,非0-显示
  1569. var showSmart = 1 //是否显示智能信息(如配置移动侦测后画面上的线框),0-不显示,非0-显示
  1570. var buttonIDs = '0,16,256,257,258,259,260,512,513,514,515,516,517,768,769' //自定义工具条按钮
  1571. ////////////////////////////////// 请自行修改以上变量值 ////////////////////////////////////
  1572. that.oWebControl.JS_RequestInterface({
  1573. funcName: 'init',
  1574. argument: JSON.stringify({
  1575. appkey: appkey, //API网关提供的appkey
  1576. secret: secret, //API网关提供的secret
  1577. ip: ip, //API网关IP地址
  1578. playMode: playMode, //播放模式(决定显示预览还是回放界面)
  1579. port: port, //端口
  1580. snapDir: snapDir, //抓图存储路径
  1581. videoDir: videoDir, //紧急录像或录像剪辑存储路径
  1582. layout: layout, //布局
  1583. enableHTTPS: enableHTTPS, //是否启用HTTPS协议
  1584. encryptedFields: encryptedFields, //加密字段
  1585. showToolbar: showToolbar, //是否显示工具栏
  1586. showSmart: showSmart, //是否显示智能信息
  1587. buttonIDs: buttonIDs //自定义工具条按钮
  1588. })
  1589. }).then(function(oData) {
  1590. that.oWebControl.JS_Resize(1020, 600) // 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
  1591. })
  1592. })
  1593. },
  1594. //获取公钥
  1595. getPubKey(callback) {
  1596. let that = this
  1597. that.oWebControl.JS_RequestInterface({
  1598. funcName: 'getRSAPubKey',
  1599. argument: JSON.stringify({
  1600. keyLength: 1024
  1601. })
  1602. }).then(function(oData) {
  1603. console.log(oData)
  1604. if (oData.responseMsg.data) {
  1605. that.pubKey = oData.responseMsg.data
  1606. callback()
  1607. }
  1608. })
  1609. },
  1610. //RSA加密
  1611. setEncrypt(value) {
  1612. var encrypt = new JSEncrypt()
  1613. encrypt.setPublicKey(this.pubKey)
  1614. return encrypt.encrypt(value)
  1615. },
  1616. /** ----------------------------------海康摄像头预览结束------------------------------------- */
  1617. }
  1618. }
  1619. // 推送消息
  1620. function cbIntegrationCallBack(oData) {
  1621. console.log(JSON.stringify(oData.responseMsg))
  1622. }
  1623. </script>
  1624. <style rel="stylesheet/scss" lang="scss" scoped>
  1625. @import '@/assets/styles/base.scss';
  1626. .playWnd {
  1627. margin: 4px 0 0 8px;
  1628. width: 1020px;
  1629. /*播放容器的宽和高设定*/
  1630. height: 600px;
  1631. border: 1px solid red;
  1632. }
  1633. </style>