forest.vue 55 KB

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