forest.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. <!--可视化公共模板 林业-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div class="leftbar" ref="left">
  10. <!-- 3 组织机构 -->
  11. <div class="forthis">
  12. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  13. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  14. <div class="i-list-con h-80" style="padding-left: 1rem;">
  15. <el-collapse accordion>
  16. <el-collapse-item v-for="(item,index) in villageTypeXlList" :key="index">
  17. <template slot="title">
  18. <div class="d-l-con sj-collapse" :class="{on:listCurrentIndex1==item.id}"
  19. v-on:click="getEventList(calendarDay,item.parentId,item.id)">
  20. <div class="d-l-l-text">
  21. <h4 class="collapse-title">{{ item.name }}</h4>
  22. </div>
  23. <div class="d-l-l-count">{{ item.value }}</div>
  24. </div>
  25. </template>
  26. </el-collapse-item>
  27. </el-collapse>
  28. <div class="i-list-con small-bottom-margin h-30">
  29. </div>
  30. </div>
  31. </dv-border-box-13>
  32. </div>
  33. </div>
  34. <!-- 地图 -->
  35. <supermap ref="supermap" style="width: 100%;height: 100vh;" class="indexSupermapClass" :mapDiv="'forestMap'"
  36. :dynamicPlotting="false"
  37. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"
  38. @showEventDialog="showEventDialog"/>
  39. <!-- 右侧 -->
  40. <div class="rightbar rightbar-index" ref="right">
  41. <div class="right-item1">
  42. </div>
  43. <div class="right-item2">
  44. <!-- 日历 -->
  45. <div class="forthis">
  46. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  47. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  48. <div class="i-list-con small-bottom-margin h-30">
  49. <dateChoose @selectDay="selectDay"></dateChoose>
  50. </div>
  51. </dv-border-box-13>
  52. </div>
  53. <!-- 事件列表 -->
  54. <div class="forthis">
  55. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  56. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  57. <div class="this-title">
  58. <span>事件列表</span>
  59. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
  60. </div>
  61. <div class="i-list-con small-bottom-margin h-44">
  62. <div class="event-list-search">
  63. <el-input
  64. placeholder="请输入内容"
  65. prefix-icon="el-icon-search"
  66. v-model="eventSearch" @change="searchEvent(eventSearch)">
  67. </el-input>
  68. </div>
  69. <div class="d-l-con padding-box nowrap" v-for="(item,index) in eventList"
  70. @click="dropLocation(item.latitude,item.longitude)" data-html2canvas-ignore>
  71. <div class="bgt-img">
  72. <img v-if="item.picturePath!=null&&item.picturePath!='' && item.pictureType=='image'"
  73. :src="item.picturePath"
  74. style="width: 93px;height: 64px" loading="lazy"/>
  75. <img v-else src="../assets/images/integrated/event-img-sub.png" style="width: 93px;height: 64px"/>
  76. </div>
  77. <div class="bgt-info">
  78. <div v-if="item.eventStatusValue=='forest_event_status_1'&&item.urgeCount==0"
  79. class="event-state-sb">
  80. <i class="el-icon-caret-left"></i>
  81. <div class="event-list-state-sb">
  82. 新上报
  83. </div>
  84. </div>
  85. <div v-if="item.eventStatusValue=='forest_event_status_1'&&item.urgeCount>0" class="event-state-cb">
  86. <i class="el-icon-caret-left"></i>
  87. <div class="event-list-state-cb">
  88. 催办
  89. </div>
  90. </div>
  91. <div v-if="item.eventStatusValue=='forest_event_status_2'" class="event-state-qs">
  92. <i class="el-icon-caret-left"></i>
  93. <div class="event-list-state-qs">
  94. 签收
  95. </div>
  96. </div>
  97. <div v-if="item.eventStatusValue=='forest_event_status_3'" class="event-state-wb">
  98. <i class="el-icon-caret-left"></i>
  99. <div class="event-list-state-wb">
  100. 误报
  101. </div>
  102. </div>
  103. <div v-if="item.eventStatusValue=='forest_event_status_4'" class="event-state-cf">
  104. <i class="el-icon-caret-left"></i>
  105. <div class="event-list-state-cf">
  106. 重复
  107. </div>
  108. </div>
  109. <div v-if="item.eventStatusValue=='forest_event_status_5'" class="event-state-bj">
  110. <i class="el-icon-caret-left"></i>
  111. <div class="event-list-state-bj">
  112. 办结
  113. </div>
  114. </div>
  115. <div v-if="item.eventStatusValue=='forest_event_status_6'" class="event-state-gd">
  116. <i class="el-icon-caret-left"></i>
  117. <div class="event-list-state-gd">
  118. 归档
  119. </div>
  120. </div>
  121. <div class="bgt-info-name">{{ item.reportor }} {{ item.eventName }}</div>
  122. <div class="bgt-info-place">
  123. <ul>
  124. <li>{{ item.createTime }}</li>
  125. </ul>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </dv-border-box-13>
  131. </div>
  132. </div>
  133. </div>
  134. <vBottomMenu ref="bottomMenu" @stopAudio="stopAudio" ></vBottomMenu>
  135. </div>
  136. <audio id="resource" ref="up" :src="audioSrc" controls style="display: none;"></audio>
  137. <eventdetailsdialog ref="eventdetailsdialog" :calendarDay="calendarDay"
  138. :bigEventTypeId="bigEventTypeId" :smallEventTypeId="smallEventTypeId"
  139. @getEventList="getEventList"></eventdetailsdialog>
  140. <firespread ref="firespread" :calendarDay="calendarDay" @getEventList="getEventList" @showEventDialog="showEventDialog"></firespread>
  141. <eventLocation ref="eventLocation"></eventLocation>
  142. <TVWall ref="TVWall"></TVWall>
  143. </div>
  144. </template>
  145. <script>
  146. import dateChoose from '@/views/date.vue'//日历
  147. /** ----------------------------------weosocket开始------------------------------------- */
  148. import Cookies from 'js-cookie'
  149. /** ----------------------------------weosocket结束------------------------------------- */
  150. import {
  151. getEventList
  152. } from '@/api/forest'
  153. import {
  154. getEventByEventType
  155. } from '@/api/village'
  156. import supermap from '@/components/supermap' //超图
  157. import supermapNotProcessed from '@/components/supermap' //超图
  158. import supermapProcessed from '@/components/supermap' //超图
  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 eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
  164. import firespread from '@/views/firespread.vue' //事件详情弹窗
  165. /** ----------------------------------摄像头预览开始------------------------------------- */
  166. import {
  167. getDahuaVideoServer
  168. } from '@/api/dahua/dahua'
  169. import DHWs from '@/dahua/lib/DHWs'
  170. /** ----------------------------------摄像头预览结束------------------------------------- */
  171. let echarts = require('echarts')
  172. export default {
  173. components: {
  174. supermap,
  175. supermapNotProcessed,
  176. supermapProcessed,
  177. vheader,
  178. vBottomMenu,
  179. eventLocation,
  180. TVWall,
  181. dateChoose,
  182. eventdetailsdialog,
  183. firespread
  184. },
  185. created() {
  186. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  187. window.showDialog = this.showDialog
  188. window.choseLayerSwitching = this.choseLayerSwitching
  189. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  190. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  191. },
  192. mounted() {
  193. this.getEventByEventType(this.getCurrentDataStr())
  194. this.getEventList(this.getCurrentDataStr(),0,0)
  195. /** ----------------------------------weosocket开始------------------------------------- */
  196. // this.initWebSocket()
  197. /** ----------------------------------weosocket结束------------------------------------- */
  198. this.selectTaskList()//获取任务
  199. setInterval(() => {
  200. if(this.calendarDay == this.getCurrentDataStr()){
  201. this.getEventList(this.getCurrentDataStr(),0,0,true);
  202. this.getEventByEventType(this.getCurrentDataStr(),true);
  203. }
  204. }, 10000)
  205. },
  206. data() {
  207. return {
  208. //警报MP3文件
  209. audioSrc:require('@/assets/jingbao.mp3'),
  210. calendarDay: this.getCurrentDataStr(),
  211. //左侧部门事件数量
  212. villageTypeXlList: [],
  213. //右侧事件列表
  214. eventList: [],
  215. eventListnew: [],
  216. eventListAll: [],
  217. eventSearch: '',//事件列表搜索
  218. listCurrentIndex1: '',
  219. bigEventTypeId: '',
  220. smallEventTypeId: '',
  221. /** ----------------------------------weosocket开始------------------------------------- */
  222. weosocket: false,
  223. websock: '',
  224. setIntervalWesocketPush: null,
  225. /** ----------------------------------weosocket结束------------------------------------- */
  226. markersList: [], //点位列表
  227. cameraList: [] //摄像头列表
  228. }
  229. },
  230. /** ----------------------------------weosocket开始------------------------------------- */
  231. destroyed() { //离开页面关闭Socket连接
  232. if (this.websock) {
  233. clearInterval(this.setIntervalWesocketPush)
  234. this.websock.close()
  235. this.websock = null
  236. }
  237. },
  238. /** ----------------------------------weosocket结束------------------------------------- */
  239. methods: {
  240. searchEvent(eventSearch) {
  241. let that = this
  242. //事件列表搜索
  243. this.eventListnew = []
  244. if (eventSearch != null && eventSearch != '') {
  245. for (var i = 0; i < this.eventListAll.length; i++) {
  246. if (this.eventListAll[i].reportor.indexOf(eventSearch) > -1) {
  247. this.eventListnew.push(this.eventListAll[i])
  248. }
  249. }
  250. this.eventList = this.eventListnew
  251. } else {
  252. this.eventList = this.eventListAll
  253. }
  254. if (this.eventList != null && this.eventList.length > 0) {
  255. for (let i = 0; i < this.eventList.length; i++) {
  256. let markersMap = {
  257. lng: 124.59,
  258. lat: 43.02,
  259. icon: 'marker',
  260. bindPopupHtml: '',
  261. click: '',
  262. parameter: '',
  263. keepBindPopup: false,
  264. isAggregation: false
  265. }
  266. if (this.eventList.length > 200) {
  267. markersMap.isAggregation = true
  268. }
  269. if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount == 0) {
  270. markersMap.click = 'showEventDialog'
  271. markersMap.icon = 'sj-icon-map-xinshangbao'
  272. }
  273. if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
  274. markersMap.click = 'showEventDialog'
  275. markersMap.icon = 'sj-icon-map-cuiban'
  276. } else if (this.eventList[i].eventStatusValue == 'forest_event_status_2') {
  277. markersMap.click = 'showEventDialog'
  278. markersMap.icon = 'sj-icon-map-qianshou'
  279. markersMap.isAggregation = false
  280. } else if (this.eventList[i].eventStatusValue == 'forest_event_status_5') {
  281. markersMap.click = 'showEventDialog'
  282. markersMap.icon = 'sj-icon-map-banjie'
  283. markersMap.isAggregation = false
  284. } else if (this.eventList[i].eventStatusValue == 'forest_event_status_6') {
  285. markersMap.click = 'showEventDialog'
  286. markersMap.icon = 'sj-icon-map-guidang'
  287. }
  288. markersMap.parameter = this.eventList[i].eventCode
  289. markersMap.lng = this.eventList[i].longitude
  290. markersMap.lat = this.eventList[i].latitude
  291. markersMap.bindPopupHtml = '<div class="map-tip">' +
  292. '<span>' +
  293. ' <div class="d-l-con">' +
  294. ' <div class="d-l-l-text">' +
  295. ' <h4>经纬度:' + this.eventList[i].longitude + ',' + this.eventList[i].latitude + '</h4>' +
  296. ' </div>' +
  297. ' </div>' +
  298. ' </span>' +
  299. '<span>' +
  300. ' <div class="d-l-con">' +
  301. ' <div class="d-l-l-text">' +
  302. ' <h4>事件名称:' + this.eventList[i].eventName + '</h4>' +
  303. ' </div>' +
  304. ' </div>' +
  305. ' </span>' +
  306. '<span>' +
  307. ' <div class="d-l-con">' +
  308. ' <div class="d-l-l-text">' +
  309. ' <h4>事件时间:' + this.eventList[i].createTime + '</h4>' +
  310. ' </div>' +
  311. ' </div>' +
  312. ' </span>'
  313. if (this.eventList[i].picturePath != null && this.eventList[i].picturePath != '' && this.eventList[i].pictureType=='image') {
  314. markersMap.bindPopupHtml += '<span>' +
  315. ' <div class="d-l-con">' +
  316. ' <div class="d-l-l-text">' +
  317. '<img src="' + this.eventList[i].picturePath + '" style="width: 150px;height: 100px"/>' +
  318. ' </div>' +
  319. ' </div>' +
  320. ' </span>'
  321. }
  322. markersMap.bindPopupHtml += '</div>'
  323. that.markersList.push(markersMap)
  324. }
  325. setTimeout(() => {
  326. that.$refs.supermap.clearM(false)
  327. that.$refs.supermap.clearM(true)
  328. that.$refs.supermap.setMarkers(that.markersList)
  329. }, 2000)
  330. } else {
  331. setTimeout(() => {
  332. that.$refs.supermap.clearM(false)
  333. that.$refs.supermap.clearM(true)
  334. }, 2000)
  335. }
  336. },
  337. dropLocation(lat, lng) {
  338. this.$refs.supermap.dropLocation(lat, lng)
  339. },
  340. showEventDialog(eventCode) {
  341. //事件信息弹出
  342. this.$refs.eventdetailsdialog.showEventDialog(eventCode)
  343. },
  344. getFirespread(eventCode){
  345. this.$refs.firespread.showEventDialog(eventCode);
  346. },
  347. getCurrentDataStr() {
  348. let date = new Date()
  349. let y = date.getFullYear()
  350. let m = date.getMonth() + 1
  351. m = m < 10 ? '0' + m : m
  352. let d = date.getDate()
  353. d = d < 10 ? '0' + d : d
  354. return y + '-' + m + '-' + d
  355. },
  356. selectDay(day) {//日历点击
  357. this.getEventByEventType(day)
  358. this.getEventList(day,0,0)
  359. this.calendarDay = day
  360. },
  361. selectTaskList() {
  362. this.$refs.bottomMenu.selectTaskList()
  363. },
  364. getEventByEventType(day,loading) {
  365. let that = this
  366. //左侧获取事件部门数量
  367. getEventByEventType({ day: day },loading).then(res => {
  368. this.villageTypeXlList = res.data
  369. })
  370. },
  371. getEventList(day,bigEventTypeId,smallEventTypeId,loading) {
  372. this.listCurrentIndex1=smallEventTypeId
  373. this.bigEventTypeId=bigEventTypeId
  374. this.smallEventTypeId=smallEventTypeId
  375. let that = this
  376. this.eventList = []
  377. this.eventListAll = []
  378. //右侧获取事件列表
  379. getEventList({
  380. day: day,
  381. eventTypeIdDl: [bigEventTypeId],
  382. eventTypeId: [smallEventTypeId]
  383. },loading).then(res => {
  384. this.eventList = res.data
  385. this.eventListAll = res.data
  386. that.markersList = []
  387. if (this.eventList != null && this.eventList.length > 0) {
  388. if(this.eventList[0].eventStatusValue == 'forest_event_status_1'){
  389. that.$refs.bottomMenu.updateAlert();
  390. that.$refs.up.play();
  391. }
  392. for (let i = 0; i < this.eventList.length; i++) {
  393. let markersMap = {
  394. lng: 124.59,
  395. lat: 43.02,
  396. icon: 'marker',
  397. bindPopupHtml: '',
  398. click: '',
  399. parameter: '',
  400. keepBindPopup: false,
  401. isAggregation: false
  402. }
  403. if (this.eventList.length > 200) {
  404. markersMap.isAggregation = true
  405. }
  406. if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount == 0) {
  407. markersMap.click = 'showEventDialog'
  408. markersMap.icon = 'sj-icon-map-xinshangbao'
  409. }
  410. if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
  411. markersMap.click = 'showEventDialog'
  412. markersMap.icon = 'sj-icon-map-cuiban'
  413. } else if (this.eventList[i].eventStatusValue == 'forest_event_status_2') {
  414. markersMap.click = 'showEventDialog'
  415. markersMap.icon = 'sj-icon-map-qianshou'
  416. markersMap.isAggregation = false
  417. } else if (this.eventList[i].eventStatusValue == 'forest_event_status_5') {
  418. markersMap.click = 'showEventDialog'
  419. markersMap.icon = 'sj-icon-map-banjie'
  420. markersMap.isAggregation = false
  421. } else if (this.eventList[i].eventStatusValue == 'forest_event_status_6') {
  422. markersMap.click = 'showEventDialog'
  423. markersMap.icon = 'sj-icon-map-guidang'
  424. }
  425. markersMap.parameter = this.eventList[i].eventCode
  426. markersMap.lng = this.eventList[i].longitude
  427. markersMap.lat = this.eventList[i].latitude
  428. markersMap.bindPopupHtml = '<div class="map-tip">' +
  429. '<span>' +
  430. ' <div class="d-l-con">' +
  431. ' <div class="d-l-l-text">' +
  432. ' <h4>经纬度:' + this.eventList[i].longitude + ',' + this.eventList[i].latitude + '</h4>' +
  433. ' </div>' +
  434. ' </div>' +
  435. ' </span>' +
  436. '<span>' +
  437. ' <div class="d-l-con">' +
  438. ' <div class="d-l-l-text">' +
  439. ' <h4>事件名称:' + this.eventList[i].eventName + '</h4>' +
  440. ' </div>' +
  441. ' </div>' +
  442. ' </span>' +
  443. '<span>' +
  444. ' <div class="d-l-con">' +
  445. ' <div class="d-l-l-text">' +
  446. ' <h4>事件时间:' + this.eventList[i].createTime + '</h4>' +
  447. ' </div>' +
  448. ' </div>' +
  449. ' </span>'
  450. if (this.eventList[i].picturePath != null && this.eventList[i].picturePath != '' && this.eventList[i].pictureType=='image') {
  451. markersMap.bindPopupHtml += '<span>' +
  452. ' <div class="d-l-con">' +
  453. ' <div class="d-l-l-text">' +
  454. '<img src="' + this.eventList[i].picturePath + '" style="width: 150px;height: 100px"/>' +
  455. ' </div>' +
  456. ' </div>' +
  457. ' </span>'
  458. }
  459. markersMap.bindPopupHtml += '</div>'
  460. that.markersList.push(markersMap)
  461. }
  462. setTimeout(() => {
  463. that.$refs.supermap.clearM(false)
  464. that.$refs.supermap.clearM(true)
  465. that.$refs.supermap.setMarkers(that.markersList)
  466. }, 2000)
  467. } else {
  468. setTimeout(() => {
  469. that.$refs.supermap.clearM(false)
  470. that.$refs.supermap.clearM(true)
  471. }, 2000)
  472. }
  473. })
  474. },
  475. stopAudio(){
  476. this.$refs.up.pause();//停止播放音乐
  477. this.$refs.up.currentTime = 0;
  478. },
  479. /** ----------------------------------weosocket开始------------------------------------- */
  480. initWebSocket() { //初始化weosocket
  481. const wsuri = 'wss://www.hmzzxc.com:10012/websocket/forest-' + Cookies.get('username')
  482. this.websock = new WebSocket(wsuri)
  483. console.log('建立websocket连接')
  484. this.websock.onopen = this.websocketonopen
  485. this.websock.onmessage = this.websocketonmessage
  486. this.websock.onerror = this.websocketonerror
  487. this.websock.onclose = this.websocketclose
  488. this.websock.onclose = this.websocketclose
  489. },
  490. websocketonopen() { //连接建立之后执行send方法发送数据
  491. console.log('websocket连接成功')
  492. this.weosocket = true
  493. this.sendPing()
  494. },
  495. websocketonerror() { //连接建立失败重连
  496. this.initWebSocket()
  497. },
  498. websocketonmessage(e) { //数据接收
  499. console.log('接收数据', e.data)
  500. },
  501. websocketsend(Data) { //数据发送
  502. this.websock.send(Data)
  503. },
  504. websocketclose(e) { //关闭
  505. console.log('断开连接', e)
  506. // clearInterval(this.setIntervalWesocketPush)
  507. this.weosocket = false
  508. },
  509. /**发送心跳
  510. * @param {number} time 心跳间隔毫秒 默认5000
  511. * @param {string} ping 心跳名称 默认字符串ping
  512. */
  513. sendPing(time = 5000, ping = {
  514. 'fromId': 'forest',
  515. 'fromUserId': Cookies.get('username'),
  516. 'toUserId': Cookies.get('username')
  517. }) {
  518. clearInterval(this.setIntervalWesocketPush)
  519. this.websock.send(JSON.stringify(ping))
  520. this.setIntervalWesocketPush = setInterval(() => {
  521. if (this.weosocket) {
  522. this.websock.send(JSON.stringify(ping))
  523. } else {
  524. this.initWebSocket()
  525. }
  526. }, time)
  527. },
  528. /** ----------------------------------weosocket结束------------------------------------- */
  529. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  530. showDialog(click) {
  531. if (click == 'eventLocation') {
  532. this.$refs.eventLocation.showEventLocation()
  533. this.$refs.supermap.isEditableLayers = false
  534. this.$refs.bottomMenu.showChild = false
  535. this.$refs.bottomMenu.showBanChild = false
  536. this.$refs.bottomMenu.showChangChild = false
  537. } else if (click == 'editableLayers') {
  538. this.$refs.bottomMenu.showChild = false
  539. this.$refs.bottomMenu.showBanChild = false
  540. this.$refs.bottomMenu.showChangChild = false
  541. if (!this.$refs.supermap.isEditableLayers) {
  542. this.$refs.supermap.isEditableLayers = true
  543. } else {
  544. this.$refs.supermap.isEditableLayers = false
  545. }
  546. } else if (click == 'layerSwitching') {
  547. this.$refs.supermap.isEditableLayers = false
  548. this.$refs.bottomMenu.showBanChild = false
  549. this.$refs.bottomMenu.showChangChild = false
  550. if (!this.$refs.bottomMenu.showChild) {
  551. this.$refs.bottomMenu.showChild = true
  552. } else {
  553. this.$refs.bottomMenu.showChild = false
  554. }
  555. } else if (click == 'TVWall') {
  556. this.$refs.TVWall.showTVWall()
  557. this.$refs.supermap.isEditableLayers = false
  558. this.$refs.bottomMenu.showChild = false
  559. this.$refs.bottomMenu.showBanChild = false
  560. this.$refs.bottomMenu.showChangChild = false
  561. } else if (click == 'forestban') {
  562. this.$refs.supermap.isEditableLayers = false
  563. this.$refs.bottomMenu.showChild = false
  564. this.$refs.bottomMenu.showChangChild = false
  565. if (!this.$refs.bottomMenu.showBanChild) {
  566. this.$refs.bottomMenu.showBanChild = true
  567. } else {
  568. this.$refs.bottomMenu.showBanChild = false
  569. }
  570. } else if (click == 'forestchang') {
  571. this.$refs.supermap.isEditableLayers = false
  572. this.$refs.bottomMenu.showBanChild = false
  573. this.$refs.bottomMenu.showChild = false
  574. if (!this.$refs.bottomMenu.showChangChild) {
  575. this.$refs.bottomMenu.showChangChild = true
  576. } else {
  577. this.$refs.bottomMenu.showChangChild = false
  578. }
  579. }
  580. },
  581. //选择图层
  582. choseLayerSwitching(url, isClear) {
  583. this.$refs.supermap.layerSwitching(url, isClear)
  584. },
  585. //选择图层(传递数组)
  586. choseLayerSwitchingList(urlList) {
  587. this.$refs.supermap.layerSwitchingList(urlList)
  588. },
  589. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  590. }
  591. }
  592. </script>
  593. <style rel="stylesheet/scss" lang="scss" scoped>
  594. @import '@/assets/styles/base.scss';
  595. </style>