forest.vue 57 KB

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