forest.vue 56 KB

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