monitor.vue 71 KB

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