forest.vue 58 KB

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