forest.vue 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319
  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. <!-- 1 基本情况 -->
  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="this-title">
  15. <span>基本情况</span>
  16. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  17. </div>
  18. <div class="i-list-con h-14">
  19. <div class="d-l-con no_hover">
  20. <div class="d-l-l-text w-100p no-weight">
  21. <h4 class="line-h-1 w-100p" v-html="forestInfo">{{ forestInfo }}</h4>
  22. </div>
  23. </div>
  24. </div>
  25. </dv-border-box-13>
  26. </div>
  27. <!-- 2 事件统计-->
  28. <div class="forthis">
  29. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  30. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  31. <div class="i-list-con h-29-5">
  32. <div class="d-l-con no_hover">
  33. <div class="event-count">
  34. <div class="count-number">{{ totalStr.charAt(0) }}</div>
  35. <div class="count-number">{{ totalStr.charAt(1) }}</div>
  36. <div class="count-number">{{ totalStr.charAt(2) }}</div>
  37. <div class="count-number">{{ totalStr.charAt(3) }}</div>
  38. <div class="count-number">{{ totalStr.charAt(4) }}</div>
  39. <div class="count-number">{{ totalStr.charAt(5) }}</div>
  40. <dv-decoration-5 style="width:81%;height:15px;position: absolute; top:4.2rem;z-index: 0; " />
  41. </div>
  42. </div>
  43. <div class="d-l-con-icon">
  44. <div class="icon-con w-33 flex-d t-a-center">
  45. <dv-decoration-9
  46. style="width: 5.5rem;height: 5.5rem; color:#16e29e;font-size: 1rem;font-weight: bolder;">
  47. {{ newReport_pre }}%
  48. </dv-decoration-9>
  49. <div class="e-state"
  50. :style="{ 'background-image': `url(${require('@/assets/images/integrated/state-bg.png')})` }">
  51. <span>新上报</span> <span>{{ newReport }}</span>
  52. </div>
  53. </div>
  54. <div class="icon-con w-33 flex-d t-a-center">
  55. <dv-decoration-9
  56. style="width: 5.5rem;height: 5.5rem; color:#f18425;font-size: 1rem;font-weight: bolder;">
  57. {{ readySure_pre }}%
  58. </dv-decoration-9>
  59. <div class="e-state"
  60. :style="{ 'background-image': `url(${require('@/assets/images/integrated/state-bg.png')})` }">
  61. <span>处理中</span> <span>{{ readySure }}</span>
  62. </div>
  63. </div>
  64. <div class="icon-con w-33 flex-d t-a-center">
  65. <dv-decoration-9
  66. style="width: 5.5rem;height: 5.5rem; color:#9179f1;font-size: 1rem;font-weight: bolder;">
  67. {{ readyFinish_pre }}%
  68. </dv-decoration-9>
  69. <div class="e-state"
  70. :style="{ 'background-image': `url(${require('@/assets/images/integrated/state-bg.png')})` }">
  71. <span>已完成</span> <span>{{ readyFinish }}</span>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="d-l-con no_hover">
  76. <div id="chart-event-ai" style="width: 100%;height:6vh;"></div>
  77. </div>
  78. </div>
  79. </dv-border-box-13>
  80. </div>
  81. <!-- 3 组织机构 -->
  82. <div class="forthis">
  83. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  84. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  85. <div class="i-list-con h-27" style="padding-left: 1rem;">
  86. <el-collapse accordion>
  87. <el-collapse-item v-for="(item, index) in forestFarm" :key="index">
  88. <!-- deptId -->
  89. <template slot="title">
  90. <div class="d-l-con sj-collapse" :class="{ on: listCurrentIndex1 == item.deptId }"
  91. v-on:click="selectCameraByDeptId(item.deptId)">
  92. <div class="d-l-l-text">
  93. <h4 class="collapse-title">{{ item.deptName }}</h4>
  94. </div>
  95. <div class="d-l-l-count">{{ item.eventCount }}</div>
  96. </div>
  97. </template>
  98. </el-collapse-item>
  99. </el-collapse>
  100. </div>
  101. </dv-border-box-13>
  102. </div>
  103. </div>
  104. <!-- 地图 -->
  105. <supermap ref="supermap" style="width: 100%;height: 100vh;" class="indexSupermapClass" :mapDiv="'forestMap'"
  106. :dynamicPlotting="false" :mapSite="{ doubleClickZoom: false }" :codes="['9fa5']" :isSideBySide="false"
  107. @showEventDialog="showEventDialog"></supermap>
  108. <!-- 右侧 -->
  109. <div class="rightbar rightbar-index" ref="right">
  110. <div class="right-item1">
  111. <!-- 天气 -->
  112. <div class="forthis">
  113. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)">
  114. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  115. <div class="i-list-con small-bottom-margin h-18">
  116. <el-row :gutter="20" v-if="todatWeather">
  117. <el-col :span="9">
  118. <div class="weather-img">
  119. <img v-if="weatherinformationWeather == 1" src="../assets/images/integrated/weather/qing-1.png">
  120. <img v-if="weatherinformationWeather == 2" src="../assets/images/integrated/weather/duoyun-2.png">
  121. <img v-if="weatherinformationWeather == 3" src="../assets/images/integrated/weather/yin-3.png">
  122. <img v-if="weatherinformationWeather == 4" src="../assets/images/integrated/weather/zhenyu-4.png">
  123. <img v-if="weatherinformationWeather == 5"
  124. src="../assets/images/integrated/weather/leizhenyu-5.png">
  125. <img v-if="weatherinformationWeather == 6"
  126. src="../assets/images/integrated/weather/leizhenyubingbao-6.png">
  127. <img v-if="weatherinformationWeather == 7" src="../assets/images/integrated/weather/yujiaxue-7.png">
  128. <img v-if="weatherinformationWeather == 8" src="../assets/images/integrated/weather/xiaoyu-8.png">
  129. <img v-if="weatherinformationWeather == 9 || weatherinformationWeather == 22"
  130. src="../assets/images/integrated/weather/zhongyu-9.png">
  131. <img v-if="weatherinformationWeather == 10 || weatherinformationWeather == 23"
  132. src="../assets/images/integrated/weather/dayu-10.png">
  133. <img v-if="weatherinformationWeather == 11 || weatherinformationWeather == 24"
  134. src="../assets/images/integrated/weather/baoyu-11.png">
  135. <img v-if="weatherinformationWeather == 12 || weatherinformationWeather == 25"
  136. src="../assets/images/integrated/weather/dabaoyu-12.png">
  137. <img v-if="weatherinformationWeather == 13 || weatherinformationWeather == 26"
  138. src="../assets/images/integrated/weather/tedabaoyu-13.png">
  139. <img v-if="weatherinformationWeather == 14"
  140. src="../assets/images/integrated/weather/zhenxue-14.png">
  141. <img v-if="weatherinformationWeather == 15"
  142. src="../assets/images/integrated/weather/xiaoxue-15.png">
  143. <img v-if="weatherinformationWeather == 16 || weatherinformationWeather == 27"
  144. src="../assets/images/integrated/weather/zhongxue-16.png">
  145. <img v-if="weatherinformationWeather == 17 || weatherinformationWeather == 28"
  146. src="../assets/images/integrated/weather/daxue-17.png">
  147. <img v-if="weatherinformationWeather == 18 || weatherinformationWeather == 29"
  148. src="../assets/images/integrated/weather/baoxue-18.png">
  149. <img v-if="weatherinformationWeather == 19" src="../assets/images/integrated/weather/wu-19.png">
  150. <img v-if="weatherinformationWeather == 20" src="../assets/images/integrated/weather/dongyu-20.png">
  151. <img v-if="weatherinformationWeather == 21"
  152. src="../assets/images/integrated/weather/shachenbao-21.png">
  153. <img v-if="weatherinformationWeather == 30" src="../assets/images/integrated/weather/fuchen-30.png">
  154. <img v-if="weatherinformationWeather == 31"
  155. src="../assets/images/integrated/weather/yangsha-31.png">
  156. <img v-if="weatherinformationWeather == 32"
  157. src="../assets/images/integrated/weather/qiangshachenbao-32.png">
  158. <span v-if="weatherinformationWeather == 1">晴</span>
  159. <span v-if="weatherinformationWeather == 2">多云</span>
  160. <span v-if="weatherinformationWeather == 3">阴</span>
  161. <span v-if="weatherinformationWeather == 4">阵雨</span>
  162. <span v-if="weatherinformationWeather == 5">雷阵雨</span>
  163. <span v-if="weatherinformationWeather == 6">雷阵雨伴有冰雹</span>
  164. <span v-if="weatherinformationWeather == 7">雨夹雪</span>
  165. <span v-if="weatherinformationWeather == 8">小雨</span>
  166. <span v-if="weatherinformationWeather == 9">中雨</span>
  167. <span v-if="weatherinformationWeather == 10">大雨</span>
  168. <span v-if="weatherinformationWeather == 11">暴雨</span>
  169. <span v-if="weatherinformationWeather == 12">大暴雨</span>
  170. <span v-if="weatherinformationWeather == 13">特大暴雨</span>
  171. <span v-if="weatherinformationWeather == 14">阵雪</span>
  172. <span v-if="weatherinformationWeather == 15">小雪</span>
  173. <span v-if="weatherinformationWeather == 16">中雪</span>
  174. <span v-if="weatherinformationWeather == 17">大雪</span>
  175. <span v-if="weatherinformationWeather == 18">暴雪</span>
  176. <span v-if="weatherinformationWeather == 19">雾</span>
  177. <span v-if="weatherinformationWeather == 20">冻雨</span>
  178. <span v-if="weatherinformationWeather == 21">沙尘暴</span>
  179. <span v-if="weatherinformationWeather == 22">小雨—中雨</span>
  180. <span v-if="weatherinformationWeather == 23">中雨—大雨</span>
  181. <span v-if="weatherinformationWeather == 24">大雨—暴雨</span>
  182. <span v-if="weatherinformationWeather == 25">暴雨—大暴雨</span>
  183. <span v-if="weatherinformationWeather == 26">大暴雨—特大暴雨</span>
  184. <span v-if="weatherinformationWeather == 27">小雪—中雪</span>
  185. <span v-if="weatherinformationWeather == 28">中雪—大雪</span>
  186. <span v-if="weatherinformationWeather == 29">大雪—暴雪</span>
  187. <span v-if="weatherinformationWeather == 30">浮尘</span>
  188. <span v-if="weatherinformationWeather == 31">扬沙</span>
  189. <span v-if="weatherinformationWeather == 32">强沙尘暴</span>
  190. </div>
  191. </el-col>
  192. <el-col :span="15">
  193. <div class="weather-info">
  194. <ul>
  195. <li>风力:{{ weatherinformationPower }}级</li>
  196. <li>低温:{{ weatherinformationLow }}℃</li>
  197. <li v-if="weatherinformationDirection == 1">风向:东风</li>
  198. <li v-if="weatherinformationDirection == 2">风向:东南风</li>
  199. <li v-if="weatherinformationDirection == 3">风向:南风</li>
  200. <li v-if="weatherinformationDirection == 4">风向:西南风</li>
  201. <li v-if="weatherinformationDirection == 5">风向:西风</li>
  202. <li v-if="weatherinformationDirection == 6">风向:西北风</li>
  203. <li v-if="weatherinformationDirection == 7">风向:北风</li>
  204. <li v-if="weatherinformationDirection == 8">风向:东北风</li>
  205. <li>高温:{{ weatherinformationHigh }}℃</li>
  206. <li>火险:{{ weatherinformationLevelValue }}
  207. </li>
  208. <li>湿度:{{ weatherinformationTemperature }}</li>
  209. </ul>
  210. </div>
  211. </el-col>
  212. </el-row>
  213. <el-row :gutter="20" v-else>
  214. <el-col :span="24">
  215. <div class="weather-img">
  216. 暂无天气信息!
  217. </div>
  218. </el-col>
  219. </el-row>
  220. <div class="firestate" v-if="todatWeather">
  221. <div
  222. :class="weatherinformationLevel == 'forest_weatherinformation_level_1' ? 'state-block1 state-on' : 'state-block1'">
  223. </div>
  224. <div
  225. :class="weatherinformationLevel == 'forest_weatherinformation_level_2' ? 'state-block2 state-on' : 'state-block2'">
  226. </div>
  227. <div
  228. :class="weatherinformationLevel == 'forest_weatherinformation_level_3' ? 'state-block3 state-on' : 'state-block3'">
  229. </div>
  230. <div
  231. :class="weatherinformationLevel == 'forest_weatherinformation_level_4' ? 'state-block4 state-on' : 'state-block4'">
  232. </div>
  233. <div
  234. :class="weatherinformationLevel == 'forest_weatherinformation_level_5' ? 'state-block5 state-on' : 'state-block5'">
  235. </div>
  236. </div>
  237. </div>
  238. </dv-border-box-13>
  239. </div>
  240. <!-- 曝光台 -->
  241. <div class="forthis">
  242. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  243. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  244. <div class="this-title">
  245. <span>超期事件</span>
  246. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  247. </div>
  248. <div class="i-list-con small-bottom-margin h-18">
  249. <div class="d-l-con padding-box nowrap" v-for="(item, index) in exposureStageList">
  250. <div class="bgt-state">
  251. <div class="bgt-state-frequency">{{ item.urgeCount }}</div>
  252. <div class="bgt-state-minute">{{ item.timeDiff }}分钟</div>
  253. </div>
  254. <div class="bgt-info">
  255. <div class="bgt-info-name">{{ item.eventName }}</div>
  256. <div class="bgt-info-place">
  257. <ul>
  258. <li>{{ item.deptNames }}</li>
  259. </ul>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. </dv-border-box-13>
  265. </div>
  266. <!-- 事件列表 -->
  267. <div class="forthis">
  268. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  269. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  270. <div class="this-title">
  271. <span>事件列表</span>
  272. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  273. </div>
  274. <div class="i-list-con small-bottom-margin" style="height: 30vh;">
  275. <div class="event-list-search">
  276. <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="eventSearch"
  277. @change="getEventList(calendarDay, 10, 1, eventSearch)">
  278. </el-input>
  279. </div>
  280. <div class="d-l-con padding-box nowrap" v-for="(item, index) in eventList"
  281. @click="dropLocation(item.latitude, item.longitude,item.eventCode)" data-html2canvas-ignore>
  282. <div class="bgt-img">
  283. <img v-if="item.picturePath != null && item.picturePath != '' && item.pictureType == 'image'"
  284. :src="item.picturePath" style="width: 93px;height: 64px" loading="lazy" />
  285. <img v-else src="../assets/images/integrated/event-img-sub.png" style="width: 93px;height: 64px" />
  286. </div>
  287. <div class="bgt-info">
  288. <div v-if="item.eventStatusValue == 'forest_event_status_1' && item.urgeCount == 0"
  289. class="event-state-sb">
  290. <i class="el-icon-caret-left"></i>
  291. <div class="event-list-state-sb">
  292. 新上报
  293. </div>
  294. </div>
  295. <div v-if="item.eventStatusValue == 'forest_event_status_1' && item.urgeCount > 0"
  296. class="event-state-cb">
  297. <i class="el-icon-caret-left"></i>
  298. <div class="event-list-state-cb">
  299. 催办
  300. </div>
  301. </div>
  302. <div v-if="item.eventStatusValue == 'forest_event_status_2'" class="event-state-qs">
  303. <i class="el-icon-caret-left"></i>
  304. <div class="event-list-state-qs">
  305. 签收
  306. </div>
  307. </div>
  308. <div v-if="item.eventStatusValue == 'forest_event_status_3'" class="event-state-wb">
  309. <i class="el-icon-caret-left"></i>
  310. <div class="event-list-state-wb">
  311. 误报
  312. </div>
  313. </div>
  314. <div v-if="item.eventStatusValue == 'forest_event_status_4'" class="event-state-cf">
  315. <i class="el-icon-caret-left"></i>
  316. <div class="event-list-state-cf">
  317. 重复
  318. </div>
  319. </div>
  320. <div v-if="item.eventStatusValue == 'forest_event_status_5'" class="event-state-bj">
  321. <i class="el-icon-caret-left"></i>
  322. <div class="event-list-state-bj">
  323. 办结
  324. </div>
  325. </div>
  326. <div v-if="item.eventStatusValue == 'forest_event_status_6'" class="event-state-gd">
  327. <i class="el-icon-caret-left"></i>
  328. <div class="event-list-state-gd">
  329. 归档
  330. </div>
  331. </div>
  332. <div v-if="item.eventStatusValue == 'forest_event_status_7'" class="event-state-qr">
  333. <i class="el-icon-caret-left"></i>
  334. <div class="event-list-state-qr">
  335. 确认
  336. </div>
  337. </div>
  338. <div class="bgt-info-name">{{ item.reportor }} {{ item.eventName }}</div>
  339. <div class="bgt-info-place">
  340. <ul>
  341. <li>{{ item.createTime }}</li>
  342. </ul>
  343. </div>
  344. </div>
  345. </div>
  346. </div>
  347. <!--分页-->
  348. <div class="paging">
  349. <el-button type="button" @click="getEventList(calendarDay, 10, pageNum - 1)">上一页
  350. </el-button>
  351. <!-- <span>第0页</span> -->
  352. <el-button type="button" @click="getEventList(calendarDay, 10, pageNum + 1)">下一页
  353. </el-button>
  354. </div>
  355. </dv-border-box-13>
  356. </div>
  357. </div>
  358. <div class="right-item2">
  359. <!-- 日历 -->
  360. <div class="forthis">
  361. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  362. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  363. <div class="i-list-con small-bottom-margin h-30">
  364. <dateChoose @selectDay="selectDay"></dateChoose>
  365. </div>
  366. </dv-border-box-13>
  367. </div>
  368. <!-- 事件分类 -->
  369. <div class="forthis">
  370. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  371. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  372. <div class="this-title" style="cursor: pointer"
  373. @click="setEventTypeId({ eventTypeIdDl: [], eventTypeId: [] })">
  374. <span>事件分类</span>
  375. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  376. </div>
  377. <div class="i-list-con small-bottom-margin h-19">
  378. <chart v-if="showEventKind" :config="eventKind" @setEventTypeId="setEventTypeId"
  379. style="width: 90%;height: 18vh; padding:.5rem 1rem" />
  380. </div>
  381. </dv-border-box-13>
  382. </div>
  383. <!-- 上报排行 -->
  384. <div class="forthis">
  385. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  386. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  387. <div class="this-title">
  388. <span>上报排行</span>
  389. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  390. </div>
  391. <div class="i-list-con small-bottom-margin h-19">
  392. <dv-scroll-ranking-board :config="reportList" style="width: 100%;height: 300px; padding:.5rem 1rem" />
  393. </div>
  394. </dv-border-box-13>
  395. </div>
  396. </div>
  397. </div>
  398. <vBottomMenu ref="bottomMenu" @stopAudio="stopAudio"></vBottomMenu>
  399. </div>
  400. <audio id="resource" ref="up" :src="audioSrc" controls style="display: none;"></audio>
  401. <eventdetailsdialog ref="eventdetailsdialog" :calendarDay="calendarDay" @getEventList="getEventList"
  402. @getTodayEvents="getTodayEvents" @getFirespread="getFirespread" @getSupermap="getSupermap"></eventdetailsdialog>
  403. <firespread ref="firespread" :calendarDay="calendarDay" @getEventList="getEventList" @getTodayEvents="getTodayEvents"
  404. @showEventDialog="showEventDialog" @getSupermap="getSupermap" @showDialog="showDialog"></firespread>
  405. <eventLocation ref="eventLocation"></eventLocation>
  406. <TVWall ref="TVWall"></TVWall>
  407. </div>
  408. </template>
  409. <script>
  410. import dateChoose from '@/views/date.vue' //日历
  411. /** ----------------------------------weosocket开始------------------------------------- */
  412. import Cookies from 'js-cookie'
  413. /** ----------------------------------weosocket结束------------------------------------- */
  414. import {
  415. getMenuEventType,
  416. getEventPush,
  417. getBaseInfo,
  418. getTodayEvents,
  419. getDeptEventCount,
  420. getWeather,
  421. getEventList,
  422. getEventByEventType,
  423. getEventByReportorOrder,
  424. getExposureStage
  425. } from '@/api/forest'
  426. import {
  427. getNearEvent
  428. } from '@/api/event'
  429. import supermap from '@/components/supermap' //超图
  430. // import supermapNotProcessed from '@/components/supermap' //超图
  431. // import supermapProcessed from '@/components/supermap' //超图
  432. import vheader from '@/components/v-header.vue' //一体化共用头部
  433. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  434. import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
  435. import TVWall from '@/components/TVWall.vue' //电视墙弹窗
  436. import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
  437. import firespread from '@/views/firespread.vue' //事件详情弹窗
  438. import Firespread from "./firespread";
  439. import chart from "./from/dvCapsuleChart.vue";
  440. let echarts = require('echarts')
  441. export default {
  442. components: {
  443. chart,
  444. Firespread,
  445. supermap,
  446. // supermapNotProcessed,
  447. // supermapProcessed,
  448. vheader,
  449. vBottomMenu,
  450. eventLocation,
  451. TVWall,
  452. dateChoose,
  453. eventdetailsdialog,
  454. firespread
  455. },
  456. created() {
  457. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  458. window.showDialog = this.showDialog
  459. window.choseLayerSwitching = this.choseLayerSwitching
  460. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  461. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  462. },
  463. mounted() {
  464. this.getBaseInfo()
  465. this.getTodayEvents(this.getCurrentDataStr())
  466. this.getDeptEventCount(this.getCurrentDataStr())
  467. this.getWeather(this.getCurrentDataStr())
  468. this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum)
  469. this.getEventByEventType(this.getCurrentDataStr())
  470. this.getEventByReportorOrder(this.getCurrentDataStr())
  471. this.getExposureStage(this.getCurrentDataStr())
  472. this.getSupermap(this.getCurrentDataStr())
  473. this.getMenuEventType()
  474. /** ----------------------------------weosocket开始------------------------------------- */
  475. // this.initWebSocket()
  476. /** ----------------------------------weosocket结束------------------------------------- */
  477. setInterval(() => {
  478. if (this.calendarDay == this.getCurrentDataStr()) {
  479. this.getTodayEvents(this.getCurrentDataStr(), false);
  480. this.getDeptEventCount(this.getCurrentDataStr(), false);
  481. // this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum, '', false);
  482. this.getEventByEventType(this.getCurrentDataStr(), false);
  483. this.getEventByReportorOrder(this.getCurrentDataStr(), false);
  484. this.getExposureStage(this.getCurrentDataStr(), false);
  485. // this.getSupermap(this.getCurrentDataStr(), false);
  486. }
  487. }, 30000)
  488. this.bottomMenuList() //获取底部公共组件消息和任务
  489. },
  490. data() {
  491. return {
  492. //警报MP3文件
  493. audioSrc: require('@/assets/jingbao.mp3'),
  494. calendarDay: this.getCurrentDataStr(),
  495. //基本情况
  496. forestInfo: '', //基本情况
  497. //左侧获取事件信息统计
  498. totalStr: '000000',
  499. aiTotal: '',
  500. newReport: '',
  501. otherTotal: '',
  502. readyFinish: '',
  503. readySure: '',
  504. total: '',
  505. aiTotal_pre: '',
  506. newReport_pre: '',
  507. eventTypeIdDl: [],
  508. eventTypeId: [],
  509. otherTotal_pre: '',
  510. readyFinish_pre: '',
  511. readySure_pre: '',
  512. //左侧部门事件数量
  513. forestFarm: [],
  514. //右侧天气
  515. todatWeather: false,
  516. weatherinformationDirection: '',
  517. weatherinformationHigh: '',
  518. weatherinformationLevel: '',
  519. weatherinformationLevelValue: '', //火险登记中文
  520. weatherinformationLow: '',
  521. weatherinformationPower: '',
  522. weatherinformationTemperature: '',
  523. weatherinformationTime: '',
  524. weatherinformationWeather: '',
  525. //右侧曝光台
  526. exposureStageList: [],
  527. //右侧事件列表
  528. eventList: [],
  529. pageSize: 10,
  530. pageNum: 1,
  531. eventListnew: [],
  532. eventListAll: [],
  533. eventSearch: '', //事件列表搜索
  534. listCurrentIndex1: '',
  535. // ----------------------------------事件分类柱状----------------------------------------
  536. eventKind: {},
  537. showEventKind: false,
  538. // ----------------------------------上报排行----------------------------------------
  539. reportList: {
  540. data: []
  541. },
  542. /** ----------------------------------weosocket开始------------------------------------- */
  543. weosocket: false,
  544. websock: '',
  545. setIntervalWesocketPush: null,
  546. websockSid: {
  547. userId: '',
  548. eventTypeDl: '',
  549. eventType: '',
  550. },
  551. /** ----------------------------------weosocket结束------------------------------------- */
  552. /** ----------------------------------摄像头预览开始------------------------------------- */
  553. activePanel: 'key1',
  554. isLogin: false,
  555. cameraParams: [],
  556. ws: null,
  557. /** ----------------------------------摄像头预览结束------------------------------------- */
  558. markersList: [], //点位列表
  559. cameraList: [] //摄像头列表
  560. }
  561. },
  562. /** ----------------------------------weosocket开始------------------------------------- */
  563. destroyed() { //离开页面关闭Socket连接
  564. if (this.websock) {
  565. clearInterval(this.setIntervalWesocketPush)
  566. this.websock.close()
  567. this.websock = null
  568. }
  569. },
  570. /** ----------------------------------weosocket结束------------------------------------- */
  571. methods: {
  572. getMenuEventType() {
  573. let that = this
  574. getMenuEventType().then(res => {
  575. that.websockSid.userId = Cookies.get('userId')
  576. that.websockSid.eventTypeDl = res.data.eventTypeDl
  577. that.websockSid.eventType = res.data.eventType
  578. that.initWebSocket(that.websockSid.userId, that.websockSid.eventTypeDl, that.websockSid.eventType)
  579. console.log(that.websockSid)
  580. })
  581. },
  582. // searchEvent(pageSize,pageNum,eventSearch) {
  583. // this.pageSize = pageSize;
  584. // this.pageNum = pageNum;
  585. // let that = this
  586. // //事件列表搜索
  587. // this.eventList = []
  588. // //右侧获取事件列表
  589. // getEventList({ day: that.calendarDay,pageSize:pageSize,pageNum: pageNum ,eventName:eventSearch}).then(res => {
  590. // this.eventList = res.data
  591. // if (this.eventList != null && this.eventList.length > 0) {
  592. // if(this.eventList[0].eventStatusValue == 'forest_event_status_1'){
  593. // that.$refs.bottomMenu.updateAlert();
  594. // that.$refs.up.play();
  595. // }
  596. // }
  597. // })
  598. // },
  599. dropLocation(lat, lng,eventCode) {
  600. this.$refs.supermap.dropLocation(lat, lng,18)
  601. this.showEventDialog(eventCode)
  602. },
  603. showEventDialog(eventCode) {
  604. //事件信息弹出
  605. this.$refs.eventdetailsdialog.showEventDialog(eventCode)
  606. },
  607. getFirespread(eventCode) {
  608. this.$refs.firespread.showEventDialog(eventCode);
  609. },
  610. getCurrentDataStr() {
  611. let date = new Date()
  612. let y = date.getFullYear()
  613. let m = date.getMonth() + 1
  614. m = m < 10 ? '0' + m : m
  615. let d = date.getDate()
  616. d = d < 10 ? '0' + d : d
  617. return y + '-' + m + '-' + d
  618. },
  619. selectDay(day) { //日历点击
  620. this.getTodayEvents(day)
  621. this.getDeptEventCount(day)
  622. this.getWeather(day)
  623. this.getEventList(day, 10, 1)
  624. this.getEventByEventType(day)
  625. this.getEventByReportorOrder(day)
  626. this.getExposureStage(day)
  627. this.getSupermap(day);
  628. this.calendarDay = day
  629. },
  630. //事件数量统计chart 样例地址http://192.144.199.210:8080/editor/index.html?chart_id=jTXf0Rv4A3oiBONB
  631. eventChartAi(aiTotal_pre, otherTotal_pre) {
  632. // 基于准备好的dom,初始化echarts实例
  633. let myChart = echarts.init(document.getElementById('chart-event-ai'))
  634. myChart.setOption({
  635. tooltip: {
  636. trigger: 'none'
  637. },
  638. grid: {
  639. top: '65%',
  640. left: '5%',
  641. right: '5%'
  642. },
  643. yAxis: {
  644. data: ['百分比'],
  645. axisTick: {
  646. show: false
  647. },
  648. axisLine: {
  649. show: false
  650. },
  651. axisLabel: {
  652. show: false
  653. }
  654. },
  655. xAxis: {
  656. splitLine: {
  657. show: false
  658. },
  659. axisTick: {
  660. show: false
  661. },
  662. axisLine: {
  663. show: false
  664. },
  665. axisLabel: {
  666. show: false
  667. }
  668. },
  669. legend: {
  670. data: ['AI', '其他'],
  671. bottom: '5%',
  672. textStyle: {
  673. color: '#1FC3CE',
  674. fontSize: 14
  675. }
  676. },
  677. series: [{
  678. // name: '最上层立体圆',
  679. type: 'pictorialBar',
  680. symbolSize: [10, 20],
  681. symbolOffset: [2, 0],
  682. z: 12,
  683. itemStyle: {
  684. normal: {
  685. color: '#293CA0'
  686. }
  687. },
  688. data: [{
  689. value: 100,
  690. symbolPosition: 'end'
  691. }]
  692. }, {
  693. // name: '中间立体圆',
  694. type: 'pictorialBar',
  695. symbolSize: [10, 20],
  696. symbolOffset: [2, 0],
  697. z: 12,
  698. itemStyle: {
  699. normal: {
  700. color: '#45ac8d'
  701. }
  702. },
  703. data: [{
  704. value: aiTotal_pre,
  705. symbolPosition: 'end'
  706. }]
  707. }, {
  708. // name: '最底部立体圆',
  709. type: 'pictorialBar',
  710. symbolSize: [10, 20],
  711. symbolOffset: [-4, 0],
  712. z: 12,
  713. itemStyle: {
  714. normal: {
  715. color: '#196d59'
  716. }
  717. },
  718. data: [otherTotal_pre]
  719. }, {
  720. name: 'AI',
  721. //底部立体柱
  722. stack: '1',
  723. type: 'bar',
  724. itemStyle: {
  725. normal: {
  726. color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
  727. offset: 0,
  728. color: '#29ac8f'
  729. }, {
  730. offset: 1,
  731. color: '#0a3f3f'
  732. }])
  733. }
  734. },
  735. label: {
  736. normal: {
  737. show: true,
  738. position: 'inside',
  739. offset: [0, 1],
  740. formatter: function (obj) {
  741. return (obj.value).toLocaleString() + '%'
  742. },
  743. textStyle: {
  744. align: 'center',
  745. baseline: 'middle',
  746. fontSize: 14,
  747. fontWeight: '400',
  748. color: '#fff',
  749. textShadowColor: '#000',
  750. textShadowBlur: '0',
  751. textShadowOffsetX: 1,
  752. textShadowOffsetY: 1
  753. }
  754. }
  755. },
  756. silent: true,
  757. barWidth: 20,
  758. barGap: '-100%', // Make series be overlap
  759. data: [aiTotal_pre]
  760. }, {
  761. name: '其他',
  762. //上部立体柱
  763. stack: '1',
  764. type: 'bar',
  765. itemStyle: {
  766. normal: {
  767. color: '#14257B',
  768. opacity: .7
  769. }
  770. },
  771. silent: true,
  772. barWidth: 20,
  773. barGap: '-100%', // Make series be overlap
  774. data: [otherTotal_pre],
  775. // itemStyle: {
  776. // normal: {
  777. // color: 'rgba(29,67,243,1)',
  778. // }
  779. // },
  780. label: {
  781. normal: {
  782. show: true,
  783. position: 'inside',
  784. offset: [0, 1],
  785. formatter: function (obj) {
  786. return (obj.value).toLocaleString() + '%'
  787. },
  788. textStyle: {
  789. align: 'center',
  790. baseline: 'middle',
  791. fontSize: 14,
  792. fontWeight: '400',
  793. color: '#fff',
  794. textShadowColor: '#000',
  795. textShadowBlur: '0',
  796. textShadowOffsetX: 1,
  797. textShadowOffsetY: 1
  798. }
  799. }
  800. }
  801. }]
  802. })
  803. },
  804. getBaseInfo() {
  805. //左侧获取部门信息
  806. getBaseInfo().then(res => {
  807. if (res.code == 200) {
  808. if (res.msg == '未找到部门信息') {
  809. this.forestInfo = '未找到部门信息!'
  810. } else {
  811. this.forestInfo = res.data.baseinfo //基本情况
  812. }
  813. }
  814. })
  815. },
  816. getTodayEvents(day, loading) {
  817. let that = this
  818. //左侧获取事件信息统计
  819. getTodayEvents({ eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId, day: day }, loading).then(res => {
  820. this.aiTotal = res.data.aiTotal
  821. this.aiTotal_pre = res.data.aiTotal_pre
  822. this.newReport = res.data.newReport
  823. this.newReport_pre = res.data.newReport_pre
  824. this.otherTotal = res.data.otherTotal
  825. this.otherTotal_pre = res.data.otherTotal_pre
  826. this.readyFinish = res.data.readyFinish
  827. this.readyFinish_pre = res.data.readyFinish_pre
  828. this.readySure = res.data.readySure
  829. this.readySure_pre = res.data.readySure_pre
  830. this.totalStr = res.data.totalStr
  831. this.total = res.data.total
  832. this.eventChartAi(this.aiTotal_pre, this.otherTotal_pre)
  833. })
  834. },
  835. getDeptEventCount(day, loading) {
  836. let that = this
  837. //左侧获取事件部门数量
  838. getDeptEventCount({ eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId, day: day }, loading).then(res => {
  839. this.forestFarm = res.data
  840. })
  841. },
  842. getWeather(day) {
  843. let that = this
  844. //右侧获取天气信息
  845. getWeather({ day: day }).then(res => {
  846. if (res.code == 200) {
  847. if (res.msg == '天气未添加') {
  848. this.todatWeather = false
  849. } else {
  850. this.todatWeather = true
  851. this.weatherinformationDirection = res.data.weatherinformationDirection
  852. this.weatherinformationHigh = res.data.weatherinformationHigh
  853. this.weatherinformationLevel = res.data.weatherinformationLevel
  854. this.weatherinformationLevelValue = res.data.weatherinformationLevelValue
  855. this.weatherinformationLow = res.data.weatherinformationLow
  856. this.weatherinformationPower = res.data.weatherinformationPower
  857. this.weatherinformationTemperature = res.data.weatherinformationTemperature
  858. this.weatherinformationTime = res.data.weatherinformationTime
  859. this.weatherinformationWeather = res.data.weatherinformationWeather
  860. }
  861. } else {
  862. this.todatWeather = false
  863. }
  864. })
  865. },
  866. getSupermap(day, loading) {
  867. let that = this
  868. getNearEvent('', '', day, loading, that.eventTypeIdDl, that.eventTypeId).then(res => {
  869. that.markersList = [];
  870. if (res.data != null && res.data.length > 0) {
  871. for (let i = 0; i < res.data.length; i++) {
  872. let markersMap = {
  873. lng: 124.59,
  874. lat: 43.02,
  875. icon: 'marker',
  876. bindPopupHtml: '',
  877. click: '',
  878. parameter: '',
  879. keepBindPopup: false,
  880. isAggregation: false
  881. }
  882. if (res.data.length > 200) {
  883. markersMap.isAggregation = true
  884. }
  885. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount == 0) {
  886. markersMap.click = 'showEventDialog'
  887. markersMap.icon = 'sj-icon-map-xinshangbao'
  888. }
  889. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount > 0) {
  890. markersMap.click = 'showEventDialog'
  891. markersMap.icon = 'sj-icon-map-cuiban'
  892. } else if (res.data[i].eventStatusValue == 'forest_event_status_2') {
  893. markersMap.click = 'showEventDialog'
  894. markersMap.icon = 'sj-icon-map-qianshou'
  895. markersMap.isAggregation = false
  896. } else if (res.data[i].eventStatusValue == 'forest_event_status_5') {
  897. markersMap.click = 'showEventDialog'
  898. markersMap.icon = 'sj-icon-map-banjie'
  899. markersMap.isAggregation = false
  900. } else if (res.data[i].eventStatusValue == 'forest_event_status_6') {
  901. markersMap.click = 'showEventDialog'
  902. markersMap.icon = 'sj-icon-map-guidang'
  903. } else if (res.data[i].eventStatusValue == 'forest_event_status_7') {
  904. markersMap.click = 'showEventDialog'
  905. markersMap.icon = 'sj-icon-map-queren'
  906. }
  907. markersMap.parameter = res.data[i].eventCode
  908. markersMap.lng = res.data[i].longitude
  909. markersMap.lat = res.data[i].latitude
  910. markersMap.bindPopupHtml = '<div class="map-tip">' +
  911. '<span>' +
  912. ' <div class="d-l-con">' +
  913. ' <div class="d-l-l-text">' +
  914. ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i].latitude + '</h4>' +
  915. ' </div>' +
  916. ' </div>' +
  917. ' </span>' +
  918. '<span>' +
  919. ' <div class="d-l-con">' +
  920. ' <div class="d-l-l-text">' +
  921. ' <h4>事件名称:' + res.data[i].eventName + '</h4>' +
  922. ' </div>' +
  923. ' </div>' +
  924. ' </span>' +
  925. '<span>' +
  926. ' <div class="d-l-con">' +
  927. ' <div class="d-l-l-text">' +
  928. ' <h4>事件时间:' + res.data[i].createTime + '</h4>' +
  929. ' </div>' +
  930. ' </div>' +
  931. ' </span>';
  932. if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
  933. markersMap.bindPopupHtml += '<span>' +
  934. ' <div class="d-l-con">' +
  935. ' <div class="d-l-l-text">' +
  936. '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
  937. ' </div>' +
  938. ' </div>' +
  939. ' </span>'
  940. }
  941. markersMap.bindPopupHtml += '</div>'
  942. that.markersList.push(markersMap)
  943. }
  944. setTimeout(() => {
  945. that.$refs.supermap.clearM(false)
  946. that.$refs.supermap.clearM(true)
  947. that.$refs.supermap.setMarkers(that.markersList)
  948. }, 2000)
  949. } else {
  950. setTimeout(() => {
  951. that.$refs.supermap.clearM(false)
  952. that.$refs.supermap.clearM(true)
  953. }, 2000)
  954. }
  955. })
  956. },
  957. setEventTypeId(data) {
  958. // let data = {eventTypeIdDl: [], eventTypeId: []}
  959. // let data = {eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId}
  960. let that = this
  961. that.eventTypeIdDl = data.eventTypeIdDl
  962. that.eventTypeId = data.eventTypeId
  963. that.getSupermap(that.calendarDay, false)
  964. that.getTodayEvents(that.calendarDay, false)
  965. that.getEventByEventType(that.calendarDay, false)
  966. that.getExposureStage(that.calendarDay, false)
  967. that.getEventByReportorOrder(that.calendarDay, false)
  968. that.getDeptEventCount(that.calendarDay, false)
  969. that.getEventList(that.calendarDay, that.pageSize, that.pageNum, '', false)
  970. },
  971. getEventList(day, pageSize, pageNum, eventSearch, loading) {
  972. if (pageNum < 1) {
  973. this.$modal.msg('当前已是第一页')
  974. return;
  975. }
  976. this.pageSize = pageSize;
  977. this.pageNum = pageNum;
  978. let that = this
  979. this.eventList = []
  980. //右侧获取事件列表
  981. getEventList({ eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId, day: day, pageSize: pageSize, pageNum: pageNum, eventName: eventSearch }, loading).then(res => {
  982. this.eventList = res.data
  983. if (this.eventList != null && this.eventList.length > 0) {
  984. if (this.eventList[0].eventStatusValue == 'forest_event_status_1') {
  985. that.$refs.bottomMenu.updateAlert();
  986. that.$refs.up.play();
  987. } else {
  988. that.$refs.bottomMenu.updateAlertFalse();
  989. }
  990. }
  991. })
  992. },
  993. getEventByEventType(day, loading) {
  994. let that = this
  995. //右侧获取事件分类
  996. getEventByEventType({ eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId, day: day }, loading).then(res => {
  997. if (res.data != null && res.data.length > 0) {
  998. this.showEventKind = true
  999. this.eventKind.data = res.data
  1000. this.eventKind.colors = ['#1ce0a9', '#d6333b', '#e68d3f', '#32c5e9', '#2abc65']
  1001. this.eventKind.showValue = true
  1002. this.eventKind = { ...this.eventKind }
  1003. } else {
  1004. this.showEventKind = false
  1005. this.eventKind = {}
  1006. this.eventKind = { ...this.eventKind }
  1007. }
  1008. })
  1009. },
  1010. getEventByReportorOrder(day, loading) {
  1011. let that = this
  1012. //右侧获取上报排名
  1013. getEventByReportorOrder({ eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId, day: day }, loading).then(res => {
  1014. if (res.data != null && res.data.length > 0) {
  1015. this.reportList.data = res.data
  1016. this.reportList = { ...this.reportList }
  1017. } else {
  1018. this.reportList.data = []
  1019. this.reportList = { ...this.reportList }
  1020. }
  1021. })
  1022. },
  1023. getEventListNew() {
  1024. this.eventList = []
  1025. this.eventListAll = []
  1026. //右侧获取事件列表
  1027. getEventList({ day: this.getCurrentDataStr() }).then(res => {
  1028. this.eventList = res.data
  1029. this.eventListAll = res.data
  1030. })
  1031. },
  1032. getWebSocketEvent(data) {
  1033. let that = this
  1034. const event = data
  1035. //右侧获取事件列表
  1036. that.markersList = []
  1037. let markersMap = {
  1038. lng: 124.59,
  1039. lat: 43.02,
  1040. icon: 'marker',
  1041. bindPopupHtml: '',
  1042. click: '',
  1043. parameter: '',
  1044. keepBindPopup: false,
  1045. isAggregation: false
  1046. }
  1047. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount == 0) {
  1048. markersMap.click = 'showEventDialog'
  1049. markersMap.icon = 'sj-icon-map-xinshangbao'
  1050. }
  1051. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount > 0) {
  1052. markersMap.click = 'showEventDialog'
  1053. markersMap.icon = 'sj-icon-map-cuiban'
  1054. } else if (event.eventStatusValue == 'forest_event_status_2') {
  1055. markersMap.click = 'showEventDialog'
  1056. markersMap.icon = 'sj-icon-map-qianshou'
  1057. markersMap.isAggregation = false
  1058. } else if (event.eventStatusValue == 'forest_event_status_5') {
  1059. markersMap.click = 'showEventDialog'
  1060. markersMap.icon = 'sj-icon-map-banjie'
  1061. markersMap.isAggregation = false
  1062. } else if (event.eventStatusValue == 'forest_event_status_6') {
  1063. markersMap.click = 'showEventDialog'
  1064. markersMap.icon = 'sj-icon-map-guidang'
  1065. } else if (event.eventStatusValue == 'forest_event_status_7') {
  1066. markersMap.click = 'showEventDialog'
  1067. markersMap.icon = 'sj-icon-map-queren'
  1068. }
  1069. markersMap.parameter = event.eventCode
  1070. markersMap.lng = event.longitude
  1071. markersMap.lat = event.latitude
  1072. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1073. '<span>' +
  1074. ' <div class="d-l-con">' +
  1075. ' <div class="d-l-l-text">' +
  1076. ' <h4>经纬度:' + event.longitude + ',' + event.latitude + '</h4>' +
  1077. ' </div>' +
  1078. ' </div>' +
  1079. ' </span>' +
  1080. '<span>' +
  1081. ' <div class="d-l-con">' +
  1082. ' <div class="d-l-l-text">' +
  1083. ' <h4>事件名称:' + event.eventName + '</h4>' +
  1084. ' </div>' +
  1085. ' </div>' +
  1086. ' </span>' +
  1087. '<span>' +
  1088. ' <div class="d-l-con">' +
  1089. ' <div class="d-l-l-text">' +
  1090. ' <h4>事件时间:' + event.createTime + '</h4>' +
  1091. ' </div>' +
  1092. ' </div>' +
  1093. ' </span>';
  1094. if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
  1095. markersMap.bindPopupHtml += '<span>' +
  1096. ' <div class="d-l-con">' +
  1097. ' <div class="d-l-l-text">' +
  1098. '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
  1099. ' </div>' +
  1100. ' </div>' +
  1101. ' </span>'
  1102. }
  1103. markersMap.bindPopupHtml += '</div>'
  1104. that.markersList.push(markersMap)
  1105. setTimeout(() => {
  1106. that.$refs.supermap.setMarkers(that.markersList)
  1107. }, 1000)
  1108. },
  1109. getExposureStage(day, loading) {
  1110. let that = this
  1111. //右侧获取曝光台
  1112. getExposureStage({ eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId, day: day }, loading).then(res => {
  1113. this.exposureStageList = res.data
  1114. })
  1115. },
  1116. /** ----------------------------------weosocket开始------------------------------------- */
  1117. initWebSocket(userId, eventTypeDl, eventType) { //初始化weosocket
  1118. const wsuri = 'ws://127.0.0.1:10003/eventPush/' + userId + '/' + eventTypeDl + '/' + eventType
  1119. this.websock = new WebSocket(wsuri)
  1120. console.log('建立websocket连接')
  1121. this.websock.onopen = this.websocketonopen
  1122. this.websock.onmessage = this.websocketonmessage
  1123. this.websock.onerror = this.websocketonerror
  1124. },
  1125. websocketonopen() { //连接建立之后执行send方法发送数据
  1126. console.log('websocket连接成功')
  1127. this.weosocket = true
  1128. this.sendPing()
  1129. },
  1130. websocketonerror() { //连接建立失败重连
  1131. this.initWebSocket(this.websockSid.userId, this.websockSid.eventTypeDl, this.websockSid.eventType,)
  1132. },
  1133. websocketonmessage(e) { //数据接收
  1134. console.log('接收数据', e.data)
  1135. // let data = "{\"fromId\":\"forest\",\"fromUserId\":\""+Cookies.get('username')+"\",\"toUserId\":\""+Cookies.get('username')+"\"}";
  1136. let data = "{\"fromId\":\"traffic\"}";
  1137. if (this.calendarDay == this.getCurrentDataStr() && data != e.data) {
  1138. // 处理收到的消息
  1139. this.handleWebSoceketEvent(e.data)
  1140. // this.getEventListNew();
  1141. // this.getTodayEvents(this.getCurrentDataStr());
  1142. // this.getDeptEventCount(this.getCurrentDataStr());
  1143. // this.getEventByEventType(this.getCurrentDataStr());
  1144. // this.getEventByReportorOrder(this.getCurrentDataStr());
  1145. // this.$refs.bottomMenu.updateAlert();
  1146. // this.$refs.up.play();
  1147. // thes.$refs.up.pause();//停止播放音乐
  1148. }
  1149. },
  1150. // 处理WebSocket事件
  1151. handleWebSoceketEvent(val) {
  1152. let that = this
  1153. let data = JSON.parse(val)
  1154. /**
  1155. * that.markersList.filter( item => data.eventCode == item.parameter).length == 0 如果地图中不存在当前事件则添加
  1156. * eventPush: 事件列表消息
  1157. * */
  1158. if (data.tag == "eventPush" && that.markersList.filter(item => data.eventCode == item.parameter).length == 0) {
  1159. getEventPush({ eventCode: data.eventCode }).then((res) => {
  1160. if (res.data != undefined) {
  1161. //插入到第一条
  1162. this.eventList.unshift(res.data)
  1163. // 插入后删除最后一条 保证列表中为10条数据
  1164. if (this.eventList.length > 9)
  1165. this.eventList.splice(10, 1)
  1166. // 将收到的数据在地图上添加
  1167. this.getWebSocketEvent(res.data)
  1168. }
  1169. })
  1170. }
  1171. console.log(that.eventList[0])
  1172. },
  1173. websocketsend(Data) { //数据发送
  1174. this.websock.send(Data)
  1175. },
  1176. websocketclose(e) { //关闭
  1177. console.log('断开连接', e)
  1178. // clearInterval(this.setIntervalWesocketPush)
  1179. this.weosocket = false
  1180. },
  1181. /**发送心跳
  1182. * @param {number} time 心跳间隔毫秒 默认5000
  1183. * @param {string} ping 心跳名称 默认字符串ping
  1184. */
  1185. sendPing(time = 60000, ping = {
  1186. 'fromId': 'traffic'
  1187. }) {
  1188. clearInterval(this.setIntervalWesocketPush)
  1189. this.setIntervalWesocketPush = setInterval(() => {
  1190. if (this.weosocket) {
  1191. this.websock.send(JSON.stringify(ping))
  1192. } else {
  1193. // this.initWebSocket()
  1194. }
  1195. }, time)
  1196. },
  1197. stopAudio() {
  1198. this.$refs.up.pause(); //停止播放音乐
  1199. this.$refs.up.currentTime = 0;
  1200. },
  1201. /** ----------------------------------weosocket结束------------------------------------- */
  1202. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  1203. bottomMenuList() {
  1204. this.$refs.bottomMenu.selectTaskList()//获取任务列表
  1205. this.$refs.bottomMenu.selectMessageList()//获取消息列表
  1206. },
  1207. showDialog(click) {
  1208. if (click == 'eventLocation') {
  1209. this.$refs.eventLocation.showEventLocation()
  1210. this.$refs.supermap.isEditableLayers = false
  1211. this.$refs.bottomMenu.showChild = false
  1212. this.$refs.bottomMenu.showBanChild = false
  1213. this.$refs.bottomMenu.showChangChild = false
  1214. } else if (click == 'editableLayers') {
  1215. this.$refs.bottomMenu.showChild = false
  1216. this.$refs.bottomMenu.showBanChild = false
  1217. this.$refs.bottomMenu.showChangChild = false
  1218. if (!this.$refs.supermap.isEditableLayers) {
  1219. this.$refs.supermap.isEditableLayers = true
  1220. } else {
  1221. this.$refs.supermap.isEditableLayers = false
  1222. }
  1223. } else if (click == 'layerSwitching') {
  1224. this.$refs.supermap.isEditableLayers = false
  1225. this.$refs.bottomMenu.showBanChild = false
  1226. this.$refs.bottomMenu.showChangChild = false
  1227. if (!this.$refs.bottomMenu.showChild) {
  1228. this.$refs.bottomMenu.showChild = true
  1229. } else {
  1230. this.$refs.bottomMenu.showChild = false
  1231. }
  1232. } else if (click == 'TVWall') {
  1233. this.$refs.TVWall.showTVWall()
  1234. this.$refs.supermap.isEditableLayers = false
  1235. this.$refs.bottomMenu.showChild = false
  1236. this.$refs.bottomMenu.showBanChild = false
  1237. this.$refs.bottomMenu.showChangChild = false
  1238. } else if (click == 'forestban') {
  1239. this.$refs.supermap.isEditableLayers = false
  1240. this.$refs.bottomMenu.showChild = false
  1241. this.$refs.bottomMenu.showChangChild = false
  1242. if (!this.$refs.bottomMenu.showBanChild) {
  1243. this.$refs.bottomMenu.showBanChild = true
  1244. } else {
  1245. this.$refs.bottomMenu.showBanChild = false
  1246. }
  1247. } else if (click == 'forestchang') {
  1248. this.$refs.supermap.isEditableLayers = false
  1249. this.$refs.bottomMenu.showBanChild = false
  1250. this.$refs.bottomMenu.showChild = false
  1251. if (!this.$refs.bottomMenu.showChangChild) {
  1252. this.$refs.bottomMenu.showChangChild = true
  1253. } else {
  1254. this.$refs.bottomMenu.showChangChild = false
  1255. }
  1256. }
  1257. },
  1258. //选择图层
  1259. choseLayerSwitching(url, isClear) {
  1260. this.$refs.supermap.layerSwitching(url, isClear)
  1261. },
  1262. //选择图层(传递数组)
  1263. choseLayerSwitchingList(urlList) {
  1264. this.$refs.supermap.layerSwitchingList(urlList)
  1265. },
  1266. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  1267. }
  1268. }
  1269. </script>
  1270. <style rel="stylesheet/scss" lang="scss" scoped>
  1271. @import '@/assets/styles/base.scss';
  1272. .paging {
  1273. padding: .5rem .3rem;
  1274. display: flex;
  1275. justify-content: center;
  1276. align-content: center;
  1277. span {
  1278. color: #2bacf7;
  1279. display: flex;
  1280. align-items: center;
  1281. padding: 0 1rem;
  1282. }
  1283. button {
  1284. padding: 0 0.3rem;
  1285. height: 1.5rem;
  1286. background-color: #112543;
  1287. color: #2bacf7;
  1288. border: 1px solid #33467f;
  1289. }
  1290. button:hover {
  1291. padding: 0 0.3rem;
  1292. height: 1.5rem;
  1293. background-color: #112543;
  1294. color: #0ff7c5;
  1295. border: 1px solid #1d657f;
  1296. }
  1297. }</style>