forest.vue 66 KB

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