forest.vue 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964
  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="noticeContent">{{ noticeContent }}</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" style="padding-left: 1rem;">
  86. <div class="d-l-con-icon">
  87. <div class="icon-con" :class="{on:iconCurrentIndex==item.type}" v-for="(item,index) in resourcesList"
  88. v-on:click="fireControlViewPoint(item.type, '')">
  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. </div>
  101. </dv-border-box-13>
  102. </div>
  103. </div>
  104. <!-- 地图 -->
  105. <supermap ref="supermap" style="width: 100%;height: 100vh;" @showEventDialog="showEventDialog" :showLayer="true"
  106. @fatherMethod="fatherMethod" @sewageOutletClick="sewageOutletClick"></supermap>
  107. <!-- 右侧 -->
  108. <div class="rightbar rightbar-index" ref="right">
  109. <div class="right-item1">
  110. <!-- 天气 -->
  111. <div class="forthis">
  112. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)">
  113. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  114. <div class="i-list-con small-bottom-margin h-18">
  115. <el-row :gutter="20" v-if="todatWeather">
  116. <el-col :span="9">
  117. <div class="weather-img">
  118. <img v-if="weatherinformationWeather == 1" src="../assets/images/integrated/weather/qing-1.png">
  119. <img v-if="weatherinformationWeather == 2" src="../assets/images/integrated/weather/duoyun-2.png">
  120. <img v-if="weatherinformationWeather == 3" src="../assets/images/integrated/weather/yin-3.png">
  121. <img v-if="weatherinformationWeather == 4" src="../assets/images/integrated/weather/zhenyu-4.png">
  122. <img v-if="weatherinformationWeather == 5"
  123. src="../assets/images/integrated/weather/leizhenyu-5.png">
  124. <img v-if="weatherinformationWeather == 6"
  125. src="../assets/images/integrated/weather/leizhenyubingbao-6.png">
  126. <img v-if="weatherinformationWeather == 7"
  127. src="../assets/images/integrated/weather/yujiaxue-7.png">
  128. <img v-if="weatherinformationWeather == 8" src="../assets/images/integrated/weather/xiaoyu-8.png">
  129. <img v-if="weatherinformationWeather == 9 || weatherinformationWeather == 22"
  130. src="../assets/images/integrated/weather/zhongyu-9.png">
  131. <img v-if="weatherinformationWeather == 10 || weatherinformationWeather == 23"
  132. src="../assets/images/integrated/weather/dayu-10.png">
  133. <img v-if="weatherinformationWeather == 11 || weatherinformationWeather == 24"
  134. src="../assets/images/integrated/weather/baoyu-11.png">
  135. <img v-if="weatherinformationWeather == 12 || weatherinformationWeather == 25"
  136. src="../assets/images/integrated/weather/dabaoyu-12.png">
  137. <img v-if="weatherinformationWeather == 13 || weatherinformationWeather == 26"
  138. src="../assets/images/integrated/weather/tedabaoyu-13.png">
  139. <img v-if="weatherinformationWeather == 14"
  140. src="../assets/images/integrated/weather/zhenxue-14.png">
  141. <img v-if="weatherinformationWeather == 15"
  142. src="../assets/images/integrated/weather/xiaoxue-15.png">
  143. <img v-if="weatherinformationWeather == 16 || weatherinformationWeather == 27"
  144. src="../assets/images/integrated/weather/zhongxue-16.png">
  145. <img v-if="weatherinformationWeather == 17 || weatherinformationWeather == 28"
  146. src="../assets/images/integrated/weather/daxue-17.png">
  147. <img v-if="weatherinformationWeather == 18 || weatherinformationWeather == 29"
  148. src="../assets/images/integrated/weather/baoxue-18.png">
  149. <img v-if="weatherinformationWeather == 19" src="../assets/images/integrated/weather/wu-19.png">
  150. <img v-if="weatherinformationWeather == 20"
  151. src="../assets/images/integrated/weather/dongyu-20.png">
  152. <img v-if="weatherinformationWeather == 21"
  153. src="../assets/images/integrated/weather/shachenbao-21.png">
  154. <img v-if="weatherinformationWeather == 30"
  155. src="../assets/images/integrated/weather/fuchen-30.png">
  156. <img v-if="weatherinformationWeather == 31"
  157. src="../assets/images/integrated/weather/yangsha-31.png">
  158. <img v-if="weatherinformationWeather == 32"
  159. src="../assets/images/integrated/weather/qiangshachenbao-32.png">
  160. <span v-if="weatherinformationWeather == 1">晴</span>
  161. <span v-if="weatherinformationWeather == 2">多云</span>
  162. <span v-if="weatherinformationWeather == 3">阴</span>
  163. <span v-if="weatherinformationWeather == 4">阵雨</span>
  164. <span v-if="weatherinformationWeather == 5">雷阵雨</span>
  165. <span v-if="weatherinformationWeather == 6">雷阵雨伴有冰雹</span>
  166. <span v-if="weatherinformationWeather == 7">雨夹雪</span>
  167. <span v-if="weatherinformationWeather == 8">小雨</span>
  168. <span v-if="weatherinformationWeather == 9">中雨</span>
  169. <span v-if="weatherinformationWeather == 10">大雨</span>
  170. <span v-if="weatherinformationWeather == 11">暴雨</span>
  171. <span v-if="weatherinformationWeather == 12">大暴雨</span>
  172. <span v-if="weatherinformationWeather == 13">特大暴雨</span>
  173. <span v-if="weatherinformationWeather == 14">阵雪</span>
  174. <span v-if="weatherinformationWeather == 15">小雪</span>
  175. <span v-if="weatherinformationWeather == 16">中雪</span>
  176. <span v-if="weatherinformationWeather == 17">大雪</span>
  177. <span v-if="weatherinformationWeather == 18">暴雪</span>
  178. <span v-if="weatherinformationWeather == 19">雾</span>
  179. <span v-if="weatherinformationWeather == 20">冻雨</span>
  180. <span v-if="weatherinformationWeather == 21">沙尘暴</span>
  181. <span v-if="weatherinformationWeather == 22">小雨—中雨</span>
  182. <span v-if="weatherinformationWeather == 23">中雨—大雨</span>
  183. <span v-if="weatherinformationWeather == 24">大雨—暴雨</span>
  184. <span v-if="weatherinformationWeather == 25">暴雨—大暴雨</span>
  185. <span v-if="weatherinformationWeather == 26">大暴雨—特大暴雨</span>
  186. <span v-if="weatherinformationWeather == 27">小雪—中雪</span>
  187. <span v-if="weatherinformationWeather == 28">中雪—大雪</span>
  188. <span v-if="weatherinformationWeather == 29">大雪—暴雪</span>
  189. <span v-if="weatherinformationWeather == 30">浮尘</span>
  190. <span v-if="weatherinformationWeather == 31">扬沙</span>
  191. <span v-if="weatherinformationWeather == 32">强沙尘暴</span>
  192. </div>
  193. </el-col>
  194. <el-col :span="15">
  195. <div class="weather-info">
  196. <ul>
  197. <li>风力:{{ weatherinformationPower }}级</li>
  198. <li>低温:{{ weatherinformationLow }}℃</li>
  199. <li v-if="weatherinformationDirection == 1">风向:东风</li>
  200. <li v-if="weatherinformationDirection == 2">风向:东南风</li>
  201. <li v-if="weatherinformationDirection == 3">风向:南风</li>
  202. <li v-if="weatherinformationDirection == 4">风向:西南风</li>
  203. <li v-if="weatherinformationDirection == 5">风向:西风</li>
  204. <li v-if="weatherinformationDirection == 6">风向:西北风</li>
  205. <li v-if="weatherinformationDirection == 7">风向:北风</li>
  206. <li v-if="weatherinformationDirection == 8">风向:东北风</li>
  207. <li>高温:{{ weatherinformationHigh }}℃</li>
  208. <li>火险:{{ weatherinformationLevelValue }}
  209. </li>
  210. <li>湿度:{{ weatherinformationTemperature }}</li>
  211. </ul>
  212. </div>
  213. </el-col>
  214. </el-row>
  215. <el-row :gutter="20" v-else>
  216. <el-col :span="24">
  217. <div class="weather-img">
  218. 暂无天气信息!
  219. </div>
  220. </el-col>
  221. </el-row>
  222. <div class="firestate" v-if="todatWeather">
  223. <div
  224. :class="weatherinformationLevel == 'forest_weatherinformation_level_1' ? 'state-block1 state-on' : 'state-block1'">
  225. </div>
  226. <div
  227. :class="weatherinformationLevel == 'forest_weatherinformation_level_2' ? 'state-block2 state-on' : 'state-block2'">
  228. </div>
  229. <div
  230. :class="weatherinformationLevel == 'forest_weatherinformation_level_3' ? 'state-block3 state-on' : 'state-block3'">
  231. </div>
  232. <div
  233. :class="weatherinformationLevel == 'forest_weatherinformation_level_4' ? 'state-block4 state-on' : 'state-block4'">
  234. </div>
  235. <div
  236. :class="weatherinformationLevel == 'forest_weatherinformation_level_5' ? 'state-block5 state-on' : 'state-block5'">
  237. </div>
  238. </div>
  239. </div>
  240. </dv-border-box-13>
  241. </div>
  242. <!-- 曝光台 -->
  243. <div class="forthis">
  244. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  245. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  246. <div class="this-title">
  247. <span>超期事件</span>
  248. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  249. </div>
  250. <div class="i-list-con small-bottom-margin h-18">
  251. <div class="d-l-con padding-box nowrap" v-for="(item, index) in exposureStageList">
  252. <div class="bgt-state">
  253. <div class="bgt-state-frequency">{{ item.urgeCount }}</div>
  254. <div class="bgt-state-minute">{{ item.timeDiff }}分钟</div>
  255. </div>
  256. <div class="bgt-info">
  257. <div class="bgt-info-name">{{ item.eventName }}</div>
  258. <div class="bgt-info-place">
  259. <ul>
  260. <li>{{ item.deptNames }}</li>
  261. </ul>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. </dv-border-box-13>
  267. </div>
  268. <!-- 事件列表 -->
  269. <div class="forthis">
  270. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  271. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  272. <div class="this-title">
  273. <span>事件列表</span>
  274. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  275. </div>
  276. <div class="sj-search">
  277. <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="eventSearch"
  278. @change="getEventList(calendarDay, 10, 1, eventSearch)">
  279. </el-input>
  280. </div>
  281. <div class="i-list-con small-bottom-margin" style="height: 24vh;">
  282. <div class="d-l-con padding-box nowrap" v-for="(item, index) in eventList"
  283. @click="dropLocation(item.latitude, item.longitude,item.eventCode)" data-html2canvas-ignore>
  284. <div class="bgt-img">
  285. <img v-if="item.picturePath != null && item.picturePath != '' && item.pictureType == 'image'"
  286. :src="item.picturePath" style="width: 93px;height: 64px" loading="lazy" @error="showDefaultImg" />
  287. <img v-else src="../assets/images/integrated/event-img-sub.png" style="width: 93px;height: 64px" />
  288. </div>
  289. <div class="bgt-info">
  290. <div v-if="item.eventStatusValue == 'forest_event_status_1' && item.urgeCount == 0"
  291. class="event-state-sb">
  292. <i class="el-icon-caret-left"></i>
  293. <div class="event-list-state-sb">
  294. 新上报
  295. </div>
  296. </div>
  297. <div v-if="item.eventStatusValue == 'forest_event_status_1' && item.urgeCount > 0"
  298. class="event-state-cb">
  299. <i class="el-icon-caret-left"></i>
  300. <div class="event-list-state-cb">
  301. 催办
  302. </div>
  303. </div>
  304. <div v-if="item.eventStatusValue == 'forest_event_status_2'" class="event-state-qs">
  305. <i class="el-icon-caret-left"></i>
  306. <div class="event-list-state-qs">
  307. 签收
  308. </div>
  309. </div>
  310. <div v-if="item.eventStatusValue == 'forest_event_status_3'" class="event-state-wb">
  311. <i class="el-icon-caret-left"></i>
  312. <div class="event-list-state-wb">
  313. 误报
  314. </div>
  315. </div>
  316. <div v-if="item.eventStatusValue == 'forest_event_status_4'" class="event-state-cf">
  317. <i class="el-icon-caret-left"></i>
  318. <div class="event-list-state-cf">
  319. 重复
  320. </div>
  321. </div>
  322. <div v-if="item.eventStatusValue == 'forest_event_status_5'" class="event-state-bj">
  323. <i class="el-icon-caret-left"></i>
  324. <div class="event-list-state-bj">
  325. 办结
  326. </div>
  327. </div>
  328. <div v-if="item.eventStatusValue == 'forest_event_status_6'" class="event-state-gd">
  329. <i class="el-icon-caret-left"></i>
  330. <div class="event-list-state-gd">
  331. 归档
  332. </div>
  333. </div>
  334. <div v-if="item.eventStatusValue == 'forest_event_status_7'" class="event-state-qr">
  335. <i class="el-icon-caret-left"></i>
  336. <div class="event-list-state-qr">
  337. 确认
  338. </div>
  339. </div>
  340. <div class="bgt-info-name">{{ item.reportor }} {{ item.eventName }}</div>
  341. <div class="bgt-info-place">
  342. <ul>
  343. <li>{{ item.createTime }}</li>
  344. </ul>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <!--分页-->
  350. <div class="paging">
  351. <el-button type="button" @click="getEventList(calendarDay,10,pageNum-1,eventSearch)">上一页 </el-button>
  352. <span>第{{pageNum}}页</span>
  353. <el-button type="button" :disabled="nextbutton"
  354. @click="getEventList(calendarDay,10,pageNum+1,eventSearch)">下一页 </el-button>
  355. </div>
  356. </dv-border-box-13>
  357. </div>
  358. </div>
  359. <div class="right-item2">
  360. <!-- 日历 -->
  361. <div class="forthis">
  362. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  363. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  364. <div class="i-list-con small-bottom-margin h-30">
  365. <dateChoose @selectDay="selectDay"></dateChoose>
  366. </div>
  367. </dv-border-box-13>
  368. </div>
  369. <!-- 事件分类 -->
  370. <div class="forthis">
  371. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  372. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  373. <div class="this-title" style="cursor: pointer"
  374. @click="setEventTypeId({ eventTypeIdDl: [], eventTypeId: [] })">
  375. <span>事件分类</span>
  376. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  377. </div>
  378. <div class="i-list-con small-bottom-margin h-19">
  379. <chart v-if="showEventKind" :config="eventKind" @setEventTypeId="setEventTypeId"
  380. style="width: 90%;height: 18vh; padding:.5rem 1rem" />
  381. </div>
  382. </dv-border-box-13>
  383. </div>
  384. <!-- 上报排行 -->
  385. <div class="forthis">
  386. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  387. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  388. <div class="this-title">
  389. <span>上报排行</span>
  390. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  391. </div>
  392. <div class="i-list-con small-bottom-margin h-19">
  393. <dv-scroll-ranking-board :config="reportList" style="width: 100%;height: 300px; padding:.5rem 1rem" />
  394. </div>
  395. </dv-border-box-13>
  396. </div>
  397. </div>
  398. </div>
  399. <vBottomMenu ref="bottomMenu" @stopAudio="stopAudio"></vBottomMenu>
  400. </div>
  401. <audio id="resource" ref="up" :src="audioSrc" controls style="display: none;"></audio>
  402. <eventdetailsdialog ref="eventdetailsdialog" :calendarDay="calendarDay" @getEventList="getEventList"
  403. @getTodayEvents="getTodayEvents" @getFirespread="getFirespread" @showEventDialog="showEventDialog"
  404. @getSupermap="getSupermap"></eventdetailsdialog>
  405. <firespread ref="firespread" :calendarDay="calendarDay" @getEventList="getEventList"
  406. @getTodayEvents="getTodayEvents" @showEventDialog="showEventDialog" @getSupermap="getSupermap"
  407. @getFirespread="getFirespread" @showDialog="showDialog"></firespread>
  408. <eventLocation ref="eventLocation"></eventLocation>
  409. <TVWall ref="TVWall"></TVWall>
  410. <TVWalls2 ref="TVWalls2"></TVWalls2>
  411. <TVWalls ref="TVWalls"></TVWalls>
  412. </div>
  413. </template>
  414. <script>
  415. import dateChoose from '@/views/date.vue' //日历
  416. /** ----------------------------------weosocket开始------------------------------------- */
  417. import Cookies from 'js-cookie'
  418. /** ----------------------------------weosocket结束------------------------------------- */
  419. import {
  420. getMenuEventType,
  421. getEventPush,
  422. getLatestNotice,
  423. getTodayEvents,
  424. getWeather,
  425. selectByMenuId,
  426. getEventList,
  427. getEventByEventType,
  428. getEventByReportorOrder,
  429. getExposureStage
  430. } from '@/api/forest'
  431. import {
  432. getNearEvent
  433. } from '@/api/event'
  434. import supermap from '@/components/supermap-2.5d' //超图
  435. // import supermapNotProcessed from '@/components/supermap' //超图
  436. // import supermapProcessed from '@/components/supermap' //超图
  437. import vheader from '@/components/v-header.vue' //一体化共用头部
  438. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  439. import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
  440. import TVWall from '@/components/TVWall.vue' //电视墙弹窗
  441. import TVWalls from '@/components/TVWalls.vue' //电视墙弹窗
  442. import TVWalls2 from '@/components/TVWalls2.vue' //电视墙弹窗
  443. import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
  444. import firespread from '@/views/firespread.vue' //事件详情弹窗
  445. import {
  446. getIconBg
  447. } from '@/api/components/sookaMapIcon'; //资源底色控制文件
  448. import Firespread from "./firespread";
  449. import chart from "./from/dvCapsuleChart.vue";
  450. import {
  451. getResourcesCount,
  452. selectResourcesByLabel
  453. } from "@/api/resources"
  454. import {
  455. getUserProfile
  456. } from "@/api/system/user";
  457. import {
  458. selectConfigKey
  459. } from "@/api/system/config";
  460. import {
  461. fireControlViewList,
  462. fireControlViewPoint,
  463. getResourceDetail
  464. } from '@/api/datacenter'
  465. let echarts = require('echarts')
  466. export default {
  467. components: {
  468. chart,
  469. Firespread,
  470. supermap,
  471. // supermapNotProcessed,
  472. // supermapProcessed,
  473. vheader,
  474. vBottomMenu,
  475. eventLocation,
  476. TVWall,
  477. TVWalls,
  478. TVWalls2,
  479. dateChoose,
  480. eventdetailsdialog,
  481. firespread
  482. },
  483. created() {
  484. this.selectByMenuId(7)
  485. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  486. window.showDialog = this.showDialog
  487. window.choseLayerSwitching = this.choseLayerSwitching
  488. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  489. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  490. },
  491. metaInfo() {
  492. return {
  493. title: this.title,
  494. meta: [{
  495. charset: "utf-8"
  496. },
  497. {
  498. name: "viewport",
  499. content: "width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
  500. }
  501. ]
  502. }
  503. },
  504. mounted() {
  505. // 初始化地图数据
  506. this.getSuperMapUrl();
  507. this.getLatestNotice()
  508. setTimeout(() => {
  509. this.title = '四平市态势感知平台'
  510. }, 1000)
  511. setTimeout(() => {
  512. this.getResourcesCount();
  513. this.getTodayEvents(this.getCurrentDataStr())
  514. this.getWeather(this.getCurrentDataStr())
  515. this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum)
  516. this.getEventByEventType(this.getCurrentDataStr())
  517. this.getEventByReportorOrder(this.getCurrentDataStr())
  518. this.getExposureStage(this.getCurrentDataStr())
  519. this.getSupermap(this.getCurrentDataStr())
  520. this.getMenuEventType()
  521. }, 2000)
  522. /** ----------------------------------weosocket开始------------------------------------- */
  523. // this.initWebSocket()
  524. /** ----------------------------------weosocket结束------------------------------------- */
  525. this.bottomMenuList() //获取底部公共组件消息和任务
  526. },
  527. data() {
  528. return {
  529. nextbutton: false,
  530. title: "",
  531. // 搜索名称
  532. searchName: undefined,
  533. // 搜索类型
  534. searchType: undefined,
  535. labelList: ['warning_sign', 'bridge', 'culvert'],
  536. //警报MP3文件
  537. audioSrc: require('@/assets/jingbao.mp3'),
  538. calendarDay: this.getCurrentDataStr(),
  539. //通知公告
  540. noticeContent: '', //通知公告
  541. //左侧获取事件信息统计
  542. totalStr: '000000',
  543. totalAllEvent: 0,
  544. aiTotal: '',
  545. newReport: '',
  546. otherTotal: '',
  547. readyFinish: '',
  548. readySure: '',
  549. resourcesList: [],
  550. total: '',
  551. aiTotal_pre: '',
  552. newReport_pre: '',
  553. eventTypeIdDl: [],
  554. eventTypeId: [],
  555. otherTotal_pre: '',
  556. readyFinish_pre: '',
  557. readySure_pre: '',
  558. //右侧天气
  559. todatWeather: false,
  560. weatherinformationDirection: '',
  561. weatherinformationHigh: '',
  562. weatherinformationLevel: '',
  563. weatherinformationLevelValue: '', //火险登记中文
  564. weatherinformationLow: '',
  565. weatherinformationPower: '',
  566. weatherinformationTemperature: '',
  567. weatherinformationTime: '',
  568. weatherinformationWeather: '',
  569. //右侧曝光台
  570. exposureStageList: [],
  571. //右侧事件列表
  572. eventList: [],
  573. pageSize: 10,
  574. pageNum: 1,
  575. iconCurrentIndex: '',
  576. eventListnew: [],
  577. eventListAll: [],
  578. eventSearch: '', //事件列表搜索
  579. listCurrentIndex1: '',
  580. // ----------------------------------事件分类柱状----------------------------------------
  581. eventKind: {},
  582. showEventKind: false,
  583. // ----------------------------------上报排行----------------------------------------
  584. reportList: {
  585. data: []
  586. },
  587. /** ----------------------------------weosocket开始------------------------------------- */
  588. weosocket: false,
  589. websock: '',
  590. setIntervalWesocketPush: null,
  591. websockSid: {
  592. userId: '',
  593. eventTypeDl: '',
  594. eventType: '',
  595. },
  596. /** ----------------------------------weosocket结束------------------------------------- */
  597. /** ----------------------------------摄像头预览开始------------------------------------- */
  598. activePanel: 'key1',
  599. isLogin: false,
  600. cameraParams: [],
  601. ws: null,
  602. /** ----------------------------------摄像头预览结束------------------------------------- */
  603. markersList: [], //点位列表
  604. cameraList: [], //摄像头列表
  605. }
  606. },
  607. /** ----------------------------------weosocket开始------------------------------------- */
  608. destroyed() { //离开页面关闭Socket连接
  609. if (this.websock) {
  610. clearInterval(this.setIntervalWesocketPush)
  611. this.websock.close()
  612. this.websock = null
  613. }
  614. },
  615. /** ----------------------------------weosocket结束------------------------------------- */
  616. methods: {
  617. selectByMenuId(trafficVal) {
  618. let eventType = []
  619. let eventTypeDl = []
  620. selectByMenuId({
  621. menuId: trafficVal
  622. }).then(req => {
  623. req.data.forEach(item => {
  624. eventType.push(item.eventTypeXl)
  625. eventTypeDl.push(item.eventType)
  626. })
  627. Cookies.set("eventType",eventType)
  628. Cookies.set("eventTypeDl",eventTypeDl)
  629. })
  630. },
  631. showDefaultImg() {
  632. let img = event.srcElement;
  633. img.src =
  634. "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAABACAYAAAB4OXuGAAAE2UlEQVR4nO2b2XbaSBCGS2hhByEwCXaSizxArucJ5v1fYG5mJnbGrGIVYlHO30RYYkmM7e4Sk/7O0YVt3JL+Lv1dVS2ML3/8GZFGKTktt3q06Axo0RnQojOgRWdAi86AFp0BLToDWnQGLLmnNLJ5179EbpEuRXTDMKjV+UxG7nofpGA+ofHgm5SxpaiSy5lXLTgolKrSxpajjHGttqIGyZ6+Y+r3aLvdZOF+f0qhWCWnUJJ+HiWiLxdT2qxXKk71Kiw7Tw7JF12njAxkQnRkO6blUM5U8uCxw3qXtlOgcq1JTqG4z+m3mw0F8zHNJgOKttssaPTmsIlerLhUdW+Ofp8zTSpVG5QvVmjU+6p0LUieS+aEs9iLUyifFDyJadnktm6F9agimPm0mPm0Wi6kFUbEFemHgq9XS1EBwtOL5RoZxi4W4PN4IuaToZLriqKIJsNH6edRLjp8HFEcEwZzGvXu9/2OYDamRvvjPsKRO6sSXRXKRUf0JtkJ+tRgQtSHwUx4uvi87ZwbSsK12VRv3pJl2zQbD8QhA/WefmDR0YmOHh5z1aBXtBPcEReJrEoWykXfrNLZSKnipn5GtOWL5afPr0Ml11X3Oj8El49ye1mFC9pu1vtCCDbitu5ouZiQkTOpVGnsF1L60UKQDRZ2FT2XGJbsBQ2wmvd+/zNu+NRNY3Lm05HUaylW6iJDUglLno708FeLFLqSyGpkFimY6Krbljb+Odgq0tm4T+swoHK9Kbp7MVhEl/MJTcd9EemygH/Dx5Pg3CqKMdbeyzKYiQP+bpo2RdFWLJyH2QsWVnj9ehXSdNx7dfRjZwuZSnJ3C2sNxi+W668a+zlkoq2HiD4X1fDc2ALsfFEcfv/+xT0ZRHK92UkVaBjL7z1Qqea98A4uI9P99HLNO/Jc2AIqVoj/EqqNd6n/xVODSVS5s5VZ0SvuzdkCBfbQaN1dbAWlqne04ewPHoStqCSTote8d0dFE1oDKQsyDKo22mJyngPqgUo9PYmTUVf0flSTqa0a+G3N66QqUoB2K7p/WHDdZocsp7D/GybHshwRsecWWMvJp+oCMebUp4XkGuAcmYl00fto3R0JjoZY3G5FpA+7/4o8Pwnyba/9MbU4xuwmKt2XR3RPRvJbuOfIhOg7j/5AzsHiiMoVRxKkk9hgQJ6fBN1Lr/2JnPxTZQuhsRGS3HuFf+Op4IRddAjSaH8QFpBkPPzvp310VLR+/yGV0+NpcW9uRZpJYm14nyq8kKEgU+Hee2X1dERn4+Yu/RZAFJE/+PasRhc+M3z8h+qtWzL3YxgizURmkxRcjNt/yMT7N2yRjsUQEZ4UHBUp+i2XdBax6TF8/JtWYZAe3z5+crD3mQVYREdxgjwbXh4jGlzdrxQuL0/h8NrG6MQCGzOfDM7+jQMW0WuNdqrvgawEoh1G6yXEC+zhwounZur3XzyuDJg8/Sl9g8dC8M0bdRSx+CJDQf6+Xoc0O5iELMAiOiISLV3YwnTUffO+B6pXHFmFRXTYCPz7d0W/tcuAFp0BLToDSjwdbdVr+PqLZf2P3nup1FsqTnM1yLEXhtfirgkposNKrv1bFDLbBlLsBSV59/4v/TX1M0j2dG0zp9ApIwNadAa06Axo0RnQojOgRWdAi86AFp0BLbpqiOg74YbqU8Iw/dEAAAAASUVORK5CYII=";
  635. },
  636. //初始化地图数据
  637. getSuperMapUrl() {
  638. getUserProfile().then(response => {
  639. let mapDeptId = response.mapDeptId
  640. let num = 0;
  641. if (mapDeptId == "365") {
  642. num = 0;
  643. } else if (mapDeptId == "369") {
  644. num = 1;
  645. } else if (mapDeptId == "371") {
  646. num = 2;
  647. } else if (mapDeptId == "373") {
  648. num = 3;
  649. } else if (mapDeptId == "372") {
  650. num = 4;
  651. } else if (mapDeptId == "370") {
  652. num = 5;
  653. }
  654. this.$refs.supermap.removeAllviewer(num, -1);
  655. });
  656. },
  657. // 根据名称筛选资源点位
  658. searchByName() {
  659. this.$modal.msgSuccess("正在查询,请稍后...");
  660. this.selectResourcesByLabel(this.searchType, this.searchName);
  661. },
  662. //查询各类资源的数量
  663. getResourcesCount() {
  664. let that = this;
  665. that.resourcesList = []
  666. fireControlViewList("jiaotong").then(function(res) {
  667. for (let i = 0; i < res.data.length; i++) {
  668. if (res.data[i].type != 'centerdata_t_forest_fireteam') {
  669. that.resourcesList.push(res.data[i]);
  670. }
  671. }
  672. //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
  673. that.resourcesList.forEach(function(data, index) {
  674. let icon =
  675. "sj" +
  676. "-" +
  677. "icon" +
  678. "-" +
  679. data.type.replaceAll("_", "-").replaceAll("@", "-");
  680. console.log("icon_" + (index + 1) + "=", icon);
  681. that.$set(that.resourcesList[index], "icon", icon);
  682. //每个图标对应固定颜色
  683. that.$set(that.resourcesList[index], "bg", getIconBg(icon));
  684. });
  685. console.log(that.resourcesList)
  686. that.fireControlViewPoint("jiaotong", "");
  687. });
  688. },
  689. fireControlViewPoint(resourceTable, name) {
  690. this.iconCurrentIndex = resourceTable;
  691. // 搜索框
  692. if (name == "" || name == null || name == undefined) {
  693. name = "";
  694. } else {
  695. this.showSearch = true;
  696. }
  697. console.log("name=", name);
  698. console.log("this.showSearch=", this.showSearch);
  699. if (resourceTable == this.resourceTable) {
  700. resourceTable = "jiaotong"
  701. this.iconCurrentIndex = "jiaotong"
  702. }
  703. let that = this;
  704. that.resourceTable = resourceTable;
  705. that.markersList = [];
  706. that.source = [];
  707. fireControlViewPoint(resourceTable, name, "").then((res) => {
  708. let pointList = res.data.pointList;
  709. that.deptGroupList = res.data.deptList;
  710. if (res.data.deptList != null && res.data.deptList.length > 0) {
  711. for (let i = 0; i < res.data.deptList.length; i++) {
  712. let aa = [
  713. res.data.deptList[i].deptName,
  714. res.data.deptList[i].count,
  715. ];
  716. that.source.push(aa);
  717. }
  718. }
  719. if (res.data.pointList != null && res.data.pointList.length > 0) {
  720. for (let i = 0; i < res.data.pointList.length; i++) {
  721. if (res.data.pointList[i].indexName != 'centerdata_t_forest_fireteam') {
  722. let markersMap = {
  723. lng: res.data.pointList[i].longitude,
  724. lat: res.data.pointList[i].latitude,
  725. icon: "marker",
  726. bindPopupHtml: "",
  727. click: "",
  728. name: i,
  729. keepBindPopup: false,
  730. isAggregation: false,
  731. };
  732. that.markersList.push(
  733. this.getMarkersMap(
  734. resourceTable == "jiaotong" ? res.data.pointList[i].indexName : resourceTable,
  735. markersMap,
  736. res.data.pointList[i]
  737. )
  738. );
  739. }
  740. }
  741. }
  742. // if (this.showSearch == true) {
  743. // this.dataChat();
  744. // }
  745. that.$refs.supermap.clearM(false);
  746. that.$refs.supermap.setMarkers(that.markersList);
  747. });
  748. },
  749. getMarkersMap(resourceTable, markersMap, item) {
  750. let icon = "sj-icon-map-" + resourceTable.replaceAll("_", "-");
  751. console.log(icon)
  752. markersMap.lng = item.longitude;
  753. markersMap.lat = item.latitude;
  754. markersMap.click = "sewageOutletClick";
  755. markersMap.parameter = item;
  756. markersMap.icon = icon;
  757. markersMap.bindPopupHtml =
  758. '<div class="map-tip">' +
  759. "<span>" +
  760. ' <div class="d-l-con">' +
  761. ' <div class="d-l-l-text">' +
  762. " <h4>经纬度:" +
  763. (item.longitude ? item.longitude : "") +
  764. "," +
  765. (item.latitude ? item.latitude : "") +
  766. "</h4>" +
  767. " </div>" +
  768. " </div>" +
  769. " </span>" +
  770. "<span>" +
  771. ' <div class="d-l-con">' +
  772. ' <div class="d-l-l-text">' +
  773. " <h4>名称:" +
  774. (item.name ? item.name : "") +
  775. "</h4>" +
  776. " </div>" +
  777. " </div>" +
  778. " </span>" +
  779. // "<span>" +
  780. // ' <div class="d-l-con">' +
  781. // ' <div class="d-l-l-text">' +
  782. // " <h4>地址:" +
  783. // (item.address ? item.address : "") +
  784. // "</h4>" +
  785. // " </div>" +
  786. // " </div>" +
  787. // " </span>" +
  788. "<span>" +
  789. ' <div class="d-l-con">' +
  790. ' <div class="d-l-l-text">' +
  791. " <h4>联系人:" +
  792. (item.contacts ? item.contacts : "") +
  793. "</h4>" +
  794. " </div>" +
  795. " </div>" +
  796. " </span>" +
  797. "<span>" +
  798. ' <div class="d-l-con">' +
  799. ' <div class="d-l-l-text">' +
  800. " <h4>联系电话:" +
  801. (item.phone ? item.phone : "") +
  802. "</h4>" +
  803. " </div>" +
  804. " </div>" +
  805. " </span></div>";
  806. let that = this
  807. getResourcesCount().then(res => {
  808. this.resourcesCountList = res.data;
  809. this.resourcesCountList.forEach(function(data, index) {
  810. let icon = 'sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-").replaceAll("@", "-");
  811. that.$set(that.resourcesCountList[index], 'icon', icon);
  812. that.$set(that.resourcesCountList[index], 'bg', getIconBg(icon));
  813. })
  814. })
  815. return markersMap;
  816. },
  817. sewageOutletClick(data) {
  818. const params = Object.assign({});
  819. params.longitude = data.longitude;
  820. params.latitude = data.latitude;
  821. let data1 = null
  822. getResourceDetail(data.indexName, data.id).then(res => {
  823. data1 = res.data
  824. const treeLabels = [{
  825. id: null,
  826. labelCode: "999",
  827. labelName: "电视墙",
  828. cameraType: null,
  829. parentLabelCode: "",
  830. }, ];
  831. const labelChannels = [];
  832. if (0 < data1.cameras.length) {
  833. for (let i in data1.cameras) {
  834. treeLabels.push({
  835. id: null,
  836. labelCode: data1.cameras[i].cameraCode,
  837. labelName: data1.cameras[i].cameraName,
  838. cameraType: data1.cameras[i].cameraType,
  839. parentLabelCode: "999",
  840. });
  841. labelChannels.push({
  842. labelCode: data1.cameras[i].cameraCode,
  843. channelDates: [{
  844. channelCode: data1.cameras[i].cameraCode,
  845. channelName: data1.cameras[i].cameraName,
  846. channelSn: null,
  847. cameraType: data1.cameras[i].cameraType,
  848. online: "1",
  849. cameraCode: "1",
  850. }, ],
  851. });
  852. }
  853. const dianshiqiang = [{
  854. switchTab: "2",
  855. treeLabels: treeLabels,
  856. labelChannels: labelChannels,
  857. }, ]
  858. this.$refs.TVWalls.showTVWall1(
  859. dianshiqiang, {
  860. longitude: params.longitude,
  861. latitude: params.latitude
  862. },
  863. data1.detail
  864. );
  865. }
  866. })
  867. },
  868. //点击左侧某资源,将该资源进行落点
  869. selectResourcesByLabel(label, name) {
  870. let that = this;
  871. // 搜索框
  872. if (name == '所有') {
  873. name = undefined;
  874. } else {
  875. that.$refs.supermap.clearM();
  876. }
  877. // 搜索类型
  878. this.searchType = label;
  879. console.log(label)
  880. //每次点击,先将原有点位清空后重新落点
  881. this.markersList = [];
  882. this.resourcesList = [];
  883. selectResourcesByLabel(label, name).then(res => {
  884. console.log("res.data=", res.data)
  885. // this.resourcesList = res.data;
  886. this.resourcesList = res.data.resourceList;
  887. this.initMarkers(this.resourcesList, label.replaceAll("_", "-"));
  888. // this.initMarkers(this.resourcesList);
  889. })
  890. },
  891. initMarkers(list, type) {
  892. if (list != null && list.length > 0) {
  893. for (let i = 0; i < list.length; i++) {
  894. let markersMap = {
  895. lng: 124.59,
  896. lat: 43.02,
  897. icon: "marker",
  898. bindPopupHtml: "",
  899. click: "sewageOutletClick",
  900. parameter: list[i],
  901. keepBindPopup: false,
  902. isAggregation: false,
  903. };
  904. if (list.length > 200) {
  905. markersMap.isAggregation = true;
  906. }
  907. //根据标签确定资源的图标
  908. markersMap.icon =
  909. "traffic-resources-" +
  910. (type ?
  911. type == "sign" ?
  912. "warning_sign" :
  913. type :
  914. this.resourcesList[i].label);
  915. // markersMap.icon = 'traffic-resources-' + type;
  916. // alert(type+"=type")
  917. // alert(this.resourcesList[i].label+"=this.resourcesList[i].label")
  918. markersMap.icon = 'sj-icon-map-' + type;
  919. console.log(markersMap.icon)
  920. //markersMap.icon = 'sj-icon-map-centerdata-t-' +
  921. markersMap.parameter = this.resourcesList[i].id + "," + this.resourcesList[i].label;
  922. markersMap.parameter = this.resourcesList[i].id + "," + (type ? type : this.resourcesList[i].label);
  923. markersMap.click = '';
  924. markersMap.lng = list[i].longitude;
  925. markersMap.lat = list[i].latitude;
  926. //POP的通用部分
  927. markersMap.bindPopupHtml =
  928. '<div class="map-tip">' +
  929. "<span>" +
  930. ' <div class="d-l-con">' +
  931. ' <div class="d-l-l-text">' +
  932. " <h4>名称:" +
  933. (list[i].name ? list[i].name : "") +
  934. "</h4>" +
  935. " </div>" +
  936. " </div>" +
  937. "</span>";
  938. if (
  939. list[i].label == this.labelList[0] ||
  940. this.labelList[0].indexOf(type) != -1
  941. ) {
  942. //警示牌的POP
  943. markersMap.bindPopupHtml +=
  944. "" +
  945. "<span>" +
  946. ' <div class="d-l-con">' +
  947. ' <div class="d-l-l-text">' +
  948. " <h4>设置日期:" +
  949. ((list[i].setTime ? list[i].setTime : list[i].set_time) ?
  950. list[i].setTime ?
  951. list[i].setTime :
  952. list[i].set_time :
  953. "") +
  954. "</h4>" +
  955. " </div>" +
  956. " </div>" +
  957. "</span>" +
  958. "<span>" +
  959. ' <div class="d-l-con">' +
  960. ' <div class="d-l-l-text">' +
  961. " <h4>用途:" +
  962. (list[i].effect ? list[i].effect : "") +
  963. "</h4>" +
  964. " </div>" +
  965. " </div>" +
  966. "</span>";
  967. }
  968. if (
  969. list[i].label == this.labelList[1] ||
  970. list[i].label == this.labelList[2] ||
  971. this.labelList[1].indexOf(type) != -1 ||
  972. this.labelList[2].indexOf(type) != -1
  973. ) {
  974. //桥梁涵洞的POP
  975. markersMap.bindPopupHtml +=
  976. "" +
  977. "<span>" +
  978. ' <div class="d-l-con">' +
  979. ' <div class="d-l-l-text">' +
  980. " <h4>竣工日期:" +
  981. ((
  982. list[i].completionDate ?
  983. list[i].completionDate :
  984. list[i].completion_date
  985. ) ?
  986. list[i].completionDate ?
  987. list[i].completionDate :
  988. list[i].completion_date :
  989. "") +
  990. "</h4>" +
  991. " </div>" +
  992. " </div>" +
  993. "</span>" +
  994. "<span>" +
  995. "<span>" +
  996. ' <div class="d-l-con">' +
  997. ' <div class="d-l-l-text">' +
  998. " <h4>管理单位:" +
  999. ((
  1000. list[i].managementUnit ?
  1001. list[i].managementUnit :
  1002. list[i].management_unit
  1003. ) ?
  1004. list[i].managementUnit ?
  1005. list[i].managementUnit :
  1006. list[i].management_unit :
  1007. "") +
  1008. "</h4>" +
  1009. " </div>" +
  1010. " </div>" +
  1011. "</span>" +
  1012. "<span>" +
  1013. ' <div class="d-l-con">' +
  1014. ' <div class="d-l-l-text">' +
  1015. " <h4>联系电话:" +
  1016. ((list[i].manaTel ? list[i].manaTel : list[i].mana_tel) ?
  1017. list[i].manaTel ?
  1018. list[i].manaTel :
  1019. list[i].mana_tel :
  1020. "") +
  1021. "</h4>" +
  1022. " </div>" +
  1023. " </div>" +
  1024. "</span>" +
  1025. "<span>" +
  1026. ' <div class="d-l-con">' +
  1027. ' <div class="d-l-l-text">' +
  1028. " <h4>养护单位:" +
  1029. ((
  1030. list[i].maintenanceUnit ?
  1031. list[i].maintenanceUnit :
  1032. list[i].maintenance_unit
  1033. ) ?
  1034. list[i].maintenanceUnit ?
  1035. list[i].maintenanceUnit :
  1036. list[i].maintenance_unit :
  1037. "") +
  1038. "</h4>" +
  1039. " </div>" +
  1040. " </div>" +
  1041. "</span>" +
  1042. "<span>" +
  1043. ' <div class="d-l-con">' +
  1044. ' <div class="d-l-l-text">' +
  1045. " <h4>联系电话:" +
  1046. ((list[i].mainTel ? list[i].mainTel : list[i].main_tel) ?
  1047. list[i].mainTel ?
  1048. list[i].mainTel :
  1049. list[i].main_tel :
  1050. "") +
  1051. "</h4>" +
  1052. " </div>" +
  1053. " </div>" +
  1054. "</span>";
  1055. }
  1056. if (list[i].remark != "" && list[i].remark != null) {
  1057. //POP的备注部分
  1058. markersMap.bindPopupHtml +=
  1059. "" +
  1060. "<span>" +
  1061. ' <div class="d-l-con">' +
  1062. ' <div class="d-l-l-text">' +
  1063. " <h4>备注:" +
  1064. (list[i].remark ? list[i].remark : "") +
  1065. "</h4>" +
  1066. " </div>" +
  1067. " </div>" +
  1068. "</span>";
  1069. }
  1070. markersMap.bindPopupHtml += "</div>";
  1071. this.markersList.push(markersMap);
  1072. }
  1073. setTimeout(() => {
  1074. this.$refs.supermap.clearM();
  1075. this.$refs.supermap.setMarkers(this.markersList);
  1076. }, 2000);
  1077. }
  1078. },
  1079. getMenuEventType() {
  1080. let that = this
  1081. getMenuEventType().then(res => {
  1082. that.websockSid.userId = Cookies.get('userId')
  1083. that.websockSid.eventTypeDl = res.data.eventTypeDl
  1084. that.websockSid.eventType = res.data.eventType
  1085. that.initWebSocket(that.websockSid.userId, that.websockSid.eventTypeDl, that.websockSid.eventType)
  1086. console.log(that.websockSid)
  1087. })
  1088. },
  1089. dropLocation(lat, lng, eventCode) {
  1090. this.$refs.supermap.dropLocation(lat, lng, 18)
  1091. this.showEventDialog(eventCode, true)
  1092. },
  1093. showEventDialog(eventCode, index) {
  1094. //事件信息弹出
  1095. this.$refs.firespread.showEventDialog(eventCode, index)
  1096. },
  1097. getFirespread(eventCode) {
  1098. this.$refs.eventdetailsdialog.showEventDialog(eventCode, true);
  1099. },
  1100. getCurrentDataStr() {
  1101. let date = new Date()
  1102. let y = date.getFullYear()
  1103. let m = date.getMonth() + 1
  1104. m = m < 10 ? '0' + m : m
  1105. let d = date.getDate()
  1106. d = d < 10 ? '0' + d : d
  1107. return y + '-' + m + '-' + d
  1108. },
  1109. selectDay(day) { //日历点击
  1110. this.pageNum = 1
  1111. this.getTodayEvents(day)
  1112. this.getWeather(day)
  1113. this.getEventList(day, 10, 1)
  1114. this.getEventByEventType(day)
  1115. this.getEventByReportorOrder(day)
  1116. this.getExposureStage(day)
  1117. this.getSupermap(day);
  1118. this.calendarDay = day
  1119. },
  1120. //事件数量统计chart 样例地址http://192.144.199.210:8080/editor/index.html?chart_id=jTXf0Rv4A3oiBONB
  1121. eventChartAi(aiTotal_pre, otherTotal_pre) {
  1122. // 基于准备好的dom,初始化echarts实例
  1123. let myChart = echarts.init(document.getElementById('chart-event-ai'))
  1124. myChart.setOption({
  1125. tooltip: {
  1126. trigger: 'none'
  1127. },
  1128. grid: {
  1129. top: '65%',
  1130. left: '5%',
  1131. right: '5%'
  1132. },
  1133. yAxis: {
  1134. data: ['百分比'],
  1135. axisTick: {
  1136. show: false
  1137. },
  1138. axisLine: {
  1139. show: false
  1140. },
  1141. axisLabel: {
  1142. show: false
  1143. }
  1144. },
  1145. xAxis: {
  1146. splitLine: {
  1147. show: false
  1148. },
  1149. axisTick: {
  1150. show: false
  1151. },
  1152. axisLine: {
  1153. show: false
  1154. },
  1155. axisLabel: {
  1156. show: false
  1157. }
  1158. },
  1159. legend: {
  1160. data: ['AI', '其他'],
  1161. bottom: '5%',
  1162. textStyle: {
  1163. color: '#1FC3CE',
  1164. fontSize: 14
  1165. }
  1166. },
  1167. series: [{
  1168. // name: '最上层立体圆',
  1169. type: 'pictorialBar',
  1170. symbolSize: [10, 20],
  1171. symbolOffset: [2, 0],
  1172. z: 12,
  1173. itemStyle: {
  1174. normal: {
  1175. color: '#293CA0'
  1176. }
  1177. },
  1178. data: [{
  1179. value: 100,
  1180. symbolPosition: 'end'
  1181. }]
  1182. }, {
  1183. // name: '中间立体圆',
  1184. type: 'pictorialBar',
  1185. symbolSize: [10, 20],
  1186. symbolOffset: [2, 0],
  1187. z: 12,
  1188. itemStyle: {
  1189. normal: {
  1190. color: '#45ac8d'
  1191. }
  1192. },
  1193. data: [{
  1194. value: aiTotal_pre,
  1195. symbolPosition: 'end'
  1196. }]
  1197. }, {
  1198. // name: '最底部立体圆',
  1199. type: 'pictorialBar',
  1200. symbolSize: [10, 20],
  1201. symbolOffset: [-4, 0],
  1202. z: 12,
  1203. itemStyle: {
  1204. normal: {
  1205. color: '#196d59'
  1206. }
  1207. },
  1208. data: [otherTotal_pre]
  1209. }, {
  1210. name: 'AI',
  1211. //底部立体柱
  1212. stack: '1',
  1213. type: 'bar',
  1214. itemStyle: {
  1215. normal: {
  1216. color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
  1217. offset: 0,
  1218. color: '#29ac8f'
  1219. }, {
  1220. offset: 1,
  1221. color: '#0a3f3f'
  1222. }])
  1223. }
  1224. },
  1225. label: {
  1226. normal: {
  1227. show: true,
  1228. position: 'inside',
  1229. offset: [0, 1],
  1230. formatter: function(obj) {
  1231. return (obj.value).toLocaleString() + '%'
  1232. },
  1233. textStyle: {
  1234. align: 'center',
  1235. baseline: 'middle',
  1236. fontSize: 14,
  1237. fontWeight: '400',
  1238. color: '#fff',
  1239. textShadowColor: '#000',
  1240. textShadowBlur: '0',
  1241. textShadowOffsetX: 1,
  1242. textShadowOffsetY: 1
  1243. }
  1244. }
  1245. },
  1246. silent: true,
  1247. barWidth: 20,
  1248. barGap: '-100%', // Make series be overlap
  1249. data: [aiTotal_pre]
  1250. }, {
  1251. name: '其他',
  1252. //上部立体柱
  1253. stack: '1',
  1254. type: 'bar',
  1255. itemStyle: {
  1256. normal: {
  1257. color: '#14257B',
  1258. opacity: .7
  1259. }
  1260. },
  1261. silent: true,
  1262. barWidth: 20,
  1263. barGap: '-100%', // Make series be overlap
  1264. data: [otherTotal_pre],
  1265. // itemStyle: {
  1266. // normal: {
  1267. // color: 'rgba(29,67,243,1)',
  1268. // }
  1269. // },
  1270. label: {
  1271. normal: {
  1272. show: true,
  1273. position: 'inside',
  1274. offset: [0, 1],
  1275. formatter: function(obj) {
  1276. return (obj.value).toLocaleString() + '%'
  1277. },
  1278. textStyle: {
  1279. align: 'center',
  1280. baseline: 'middle',
  1281. fontSize: 14,
  1282. fontWeight: '400',
  1283. color: '#fff',
  1284. textShadowColor: '#000',
  1285. textShadowBlur: '0',
  1286. textShadowOffsetX: 1,
  1287. textShadowOffsetY: 1
  1288. }
  1289. }
  1290. }
  1291. }]
  1292. })
  1293. },
  1294. fatherMethod(dianshiqiang, longitude, latitude, item) {
  1295. this.$refs.TVWalls2.showTVWall(
  1296. dianshiqiang, {
  1297. longitude: longitude,
  1298. latitude: latitude,
  1299. },
  1300. item
  1301. );
  1302. },
  1303. getLatestNotice() {
  1304. //左侧获取通知公告
  1305. getLatestNotice().then(res => {
  1306. if (res.code == 200) {
  1307. this.noticeContent = res.data.noticeContent //通知公告
  1308. }
  1309. })
  1310. },
  1311. getTodayEvents(day, loading) {
  1312. let that = this
  1313. //左侧获取事件信息统计
  1314. getTodayEvents({
  1315. eventTypeIdDl: this.eventTypeIdDl.length == 0 ? Cookies.get("eventTypeDl").split(",") : this.eventTypeIdDl,
  1316. eventTypeId: this.eventTypeId.length == 0?Cookies.get("eventType").split(","): this.eventTypeId,
  1317. day: day
  1318. }, loading).then(res => {
  1319. this.aiTotal = res.data.aiTotal
  1320. this.aiTotal_pre = res.data.aiTotal_pre
  1321. this.newReport = res.data.newReport
  1322. this.newReport_pre = res.data.newReport_pre
  1323. this.otherTotal = res.data.otherTotal
  1324. this.otherTotal_pre = res.data.otherTotal_pre
  1325. this.readyFinish = res.data.readyFinish
  1326. this.readyFinish_pre = res.data.readyFinish_pre
  1327. this.readySure = res.data.readySure
  1328. this.readySure_pre = res.data.readySure_pre
  1329. this.totalStr = res.data.totalStr
  1330. this.totalAllEvent = +res.data.totalStr
  1331. this.total = res.data.total
  1332. this.eventChartAi(this.aiTotal_pre, this.otherTotal_pre)
  1333. })
  1334. },
  1335. getWeather(day) {
  1336. let that = this
  1337. //右侧获取天气信息
  1338. getWeather({
  1339. day: day
  1340. }).then(res => {
  1341. if (res.code == 200) {
  1342. if (res.data.length == 0) {
  1343. this.todatWeather = false
  1344. } else {
  1345. this.todatWeather = true
  1346. this.weatherinformationDirection = res.data[0].weatherinformationDirection
  1347. this.weatherinformationHigh = res.data[0].weatherinformationHigh
  1348. this.weatherinformationLevel = res.data[0].weatherinformationLevel
  1349. this.weatherinformationLevelValue = res.data[0].weatherinformationLevelValue
  1350. this.weatherinformationLow = res.data[0].weatherinformationLow
  1351. this.weatherinformationPower = res.data[0].weatherinformationPower
  1352. this.weatherinformationTemperature = res.data[0].weatherinformationTemperature
  1353. this.weatherinformationTime = res.data[0].weatherinformationTime
  1354. this.weatherinformationWeather = res.data[0].weatherinformationWeather
  1355. }
  1356. } else {
  1357. this.todatWeather = false
  1358. }
  1359. })
  1360. },
  1361. getSupermap(day, loading) {
  1362. let that = this
  1363. getNearEvent('', '', day, loading, that.eventTypeIdDl, that.eventTypeId).then(res => {
  1364. that.markersList = [];
  1365. if (res.data != null && res.data.length > 0) {
  1366. for (let i = 0; i < res.data.length; i++) {
  1367. let markersMap = {
  1368. lng: 124.59,
  1369. lat: 43.02,
  1370. icon: 'marker',
  1371. bindPopupHtml: '',
  1372. click: '',
  1373. parameter: '',
  1374. keepBindPopup: false,
  1375. isAggregation: false
  1376. }
  1377. if (res.data.length > 200) {
  1378. markersMap.isAggregation = true
  1379. }
  1380. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount == 0) {
  1381. markersMap.click = 'showEventDialog'
  1382. markersMap.icon = 'sj-icon-map-xinshangbao'
  1383. }
  1384. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount > 0) {
  1385. markersMap.click = 'showEventDialog'
  1386. markersMap.icon = 'sj-icon-map-cuiban'
  1387. } else if (res.data[i].eventStatusValue == 'forest_event_status_2') {
  1388. markersMap.click = 'showEventDialog'
  1389. markersMap.icon = 'sj-icon-map-qianshou'
  1390. markersMap.isAggregation = false
  1391. } else if (res.data[i].eventStatusValue == 'forest_event_status_5') {
  1392. markersMap.click = 'showEventDialog'
  1393. markersMap.icon = 'sj-icon-map-banjie'
  1394. markersMap.isAggregation = false
  1395. } else if (res.data[i].eventStatusValue == 'forest_event_status_6') {
  1396. markersMap.click = 'showEventDialog'
  1397. markersMap.icon = 'sj-icon-map-guidang'
  1398. } else if (res.data[i].eventStatusValue == 'forest_event_status_7') {
  1399. markersMap.click = 'showEventDialog'
  1400. markersMap.icon = 'sj-icon-map-queren'
  1401. }
  1402. markersMap.parameter = res.data[i].eventCode
  1403. markersMap.lng = res.data[i].longitude
  1404. markersMap.lat = res.data[i].latitude
  1405. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1406. '<span>' +
  1407. ' <div class="d-l-con">' +
  1408. ' <div class="d-l-l-text">' +
  1409. ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i].latitude + '</h4>' +
  1410. ' </div>' +
  1411. ' </div>' +
  1412. ' </span>' +
  1413. '<span>' +
  1414. ' <div class="d-l-con">' +
  1415. ' <div class="d-l-l-text">' +
  1416. ' <h4>事件名称:' + res.data[i].eventName + '</h4>' +
  1417. ' </div>' +
  1418. ' </div>' +
  1419. ' </span>' +
  1420. '<span>' +
  1421. ' <div class="d-l-con">' +
  1422. ' <div class="d-l-l-text">' +
  1423. ' <h4>事件时间:' + res.data[i].createTime + '</h4>' +
  1424. ' </div>' +
  1425. ' </div>' +
  1426. ' </span>';
  1427. if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i]
  1428. .picturePath != '') {
  1429. markersMap.bindPopupHtml += '<span>' +
  1430. ' <div class="d-l-con">' +
  1431. ' <div class="d-l-l-text">' +
  1432. '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
  1433. ' </div>' +
  1434. ' </div>' +
  1435. ' </span>'
  1436. }
  1437. markersMap.bindPopupHtml += '</div>'
  1438. that.markersList.push(markersMap)
  1439. }
  1440. setTimeout(() => {
  1441. that.$refs.supermap.clearM()
  1442. that.$refs.supermap.setMarkers(that.markersList)
  1443. }, 2000)
  1444. } else {
  1445. setTimeout(() => {
  1446. that.$refs.supermap.clearM()
  1447. that.getResourcesCount();
  1448. }, 2000)
  1449. }
  1450. })
  1451. },
  1452. setEventTypeId(data) {
  1453. let that = this
  1454. that.eventTypeIdDl = data.eventTypeIdDl
  1455. that.eventTypeId = data.eventTypeId
  1456. that.getSupermap(that.calendarDay, false)
  1457. that.getTodayEvents(that.calendarDay, false)
  1458. that.getEventByEventType(that.calendarDay, false)
  1459. that.getExposureStage(that.calendarDay, false)
  1460. that.getEventByReportorOrder(that.calendarDay, false)
  1461. that.getEventList(that.calendarDay, that.pageSize, that.pageNum, '', false)
  1462. },
  1463. getEventList(day, pageSize, pageNum, eventSearch, loading) {
  1464. let num = this.eventList.length / pageSize + 1
  1465. if (pageNum < 1) {
  1466. this.$modal.msg('当前已是第一页')
  1467. return
  1468. } else if (pageNum > this.totalAllEvent / 10 + 1) {
  1469. this.$modal.msg('当前已是最后一页')
  1470. return;
  1471. }
  1472. this.pageSize = pageSize;
  1473. this.pageNum = pageNum;
  1474. let that = this
  1475. this.eventList = []
  1476. //右侧获取事件列表
  1477. getEventList({
  1478. eventTypeIdDl: that.eventTypeIdDl.length == 0?Cookies.get("eventTypeDl").split(",") : that.eventTypeIdDl,
  1479. eventTypeId: that.eventTypeId.length == 0?Cookies.get("eventType").split(",") : that.eventTypeId,
  1480. day: day,
  1481. pageSize: pageSize,
  1482. pageNum: pageNum,
  1483. eventName: eventSearch
  1484. }, loading).then(res => {
  1485. this.eventList = res.data
  1486. if (res.data !== null && res.data.length !== 0 && res.data.length == 10) {
  1487. this.nextbutton = false
  1488. } else {
  1489. this.nextbutton = true
  1490. }
  1491. if (this.eventList != null && this.eventList.length > 0) {
  1492. if (this.eventList[0].eventStatusValue == 'forest_event_status_1') {
  1493. that.$refs.bottomMenu.updateAlert();
  1494. that.$refs.up.play();
  1495. } else {
  1496. that.$refs.bottomMenu.updateAlertFalse();
  1497. }
  1498. }
  1499. })
  1500. },
  1501. getEventByEventType(day, loading) {
  1502. let that = this
  1503. //右侧获取事件分类
  1504. getEventByEventType({
  1505. eventTypeIdDl: that.eventTypeIdDl.length == 0 ? Cookies.get("eventTypeDl").split(",") : that.eventTypeIdDl,
  1506. eventTypeId: that.eventTypeId.length == 0 ? Cookies.get("eventType").split(",") : that.eventTypeId,
  1507. day: day
  1508. }, loading).then(res => {
  1509. if (res.data != null && res.data.length > 0) {
  1510. this.showEventKind = true
  1511. this.eventKind.data = res.data
  1512. this.eventKind.colors = ['#1ce0a9', '#d6333b', '#e68d3f', '#32c5e9', '#2abc65']
  1513. this.eventKind.showValue = true
  1514. this.eventKind = {
  1515. ...this.eventKind
  1516. }
  1517. } else {
  1518. this.showEventKind = false
  1519. this.eventKind = {}
  1520. this.eventKind = {
  1521. ...this.eventKind
  1522. }
  1523. }
  1524. })
  1525. },
  1526. getEventByReportorOrder(day, loading) {
  1527. let that = this
  1528. //右侧获取上报排名
  1529. getEventByReportorOrder({
  1530. eventTypeIdDl: that.eventTypeIdDl.length == 0 ? Cookies.get("eventTypeDl").split(",") : that.eventTypeIdDl,
  1531. eventTypeId: that.eventTypeId.length == 0 ? Cookies.get("eventType").split(",") : that.eventTypeId,
  1532. day: day
  1533. }, loading).then(res => {
  1534. if (res.data != null && res.data.length > 0) {
  1535. this.reportList.data = res.data
  1536. this.reportList = {
  1537. ...this.reportList
  1538. }
  1539. } else {
  1540. this.reportList.data = []
  1541. this.reportList = {
  1542. ...this.reportList
  1543. }
  1544. }
  1545. })
  1546. },
  1547. getEventListNew() {
  1548. this.eventList = []
  1549. this.eventListAll = []
  1550. //右侧获取事件列表
  1551. getEventList({
  1552. day: this.getCurrentDataStr()
  1553. }).then(res => {
  1554. this.eventList = res.data
  1555. this.eventListAll = res.data
  1556. })
  1557. },
  1558. getWebSocketEvent(data) {
  1559. let that = this
  1560. const event = data
  1561. if (typeof data != 'object') {
  1562. event = JSON.parse(data);
  1563. }
  1564. //右侧获取事件列表
  1565. that.markersList = []
  1566. let markersMap = {
  1567. lng: 124.59,
  1568. lat: 43.02,
  1569. icon: 'marker',
  1570. bindPopupHtml: '',
  1571. click: '',
  1572. parameter: '',
  1573. keepBindPopup: false,
  1574. isAggregation: false
  1575. }
  1576. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount == 0) {
  1577. markersMap.click = 'showEventDialog'
  1578. markersMap.icon = 'sj-icon-map-xinshangbao'
  1579. }
  1580. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount > 0) {
  1581. markersMap.click = 'showEventDialog'
  1582. markersMap.icon = 'sj-icon-map-cuiban'
  1583. } else if (event.eventStatusValue == 'forest_event_status_2') {
  1584. markersMap.click = 'showEventDialog'
  1585. markersMap.icon = 'sj-icon-map-qianshou'
  1586. markersMap.isAggregation = false
  1587. } else if (event.eventStatusValue == 'forest_event_status_5') {
  1588. markersMap.click = 'showEventDialog'
  1589. markersMap.icon = 'sj-icon-map-banjie'
  1590. markersMap.isAggregation = false
  1591. } else if (event.eventStatusValue == 'forest_event_status_6') {
  1592. markersMap.click = 'showEventDialog'
  1593. markersMap.icon = 'sj-icon-map-guidang'
  1594. } else if (event.eventStatusValue == 'forest_event_status_7') {
  1595. markersMap.click = 'showEventDialog'
  1596. markersMap.icon = 'sj-icon-map-queren'
  1597. }
  1598. markersMap.parameter = event.eventCode
  1599. markersMap.lng = event.longitude
  1600. markersMap.lat = event.latitude
  1601. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1602. '<span>' +
  1603. ' <div class="d-l-con">' +
  1604. ' <div class="d-l-l-text">' +
  1605. ' <h4>经纬度:' + event.longitude + ',' + event.latitude + '</h4>' +
  1606. ' </div>' +
  1607. ' </div>' +
  1608. ' </span>' +
  1609. '<span>' +
  1610. ' <div class="d-l-con">' +
  1611. ' <div class="d-l-l-text">' +
  1612. ' <h4>事件名称:' + event.eventName + '</h4>' +
  1613. ' </div>' +
  1614. ' </div>' +
  1615. ' </span>' +
  1616. '<span>' +
  1617. ' <div class="d-l-con">' +
  1618. ' <div class="d-l-l-text">' +
  1619. ' <h4>事件时间:' + event.createTime + '</h4>' +
  1620. ' </div>' +
  1621. ' </div>' +
  1622. ' </span>';
  1623. if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
  1624. markersMap.bindPopupHtml += '<span>' +
  1625. ' <div class="d-l-con">' +
  1626. ' <div class="d-l-l-text">' +
  1627. '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
  1628. ' </div>' +
  1629. ' </div>' +
  1630. ' </span>'
  1631. }
  1632. markersMap.bindPopupHtml += '</div>'
  1633. that.markersList.push(markersMap)
  1634. setTimeout(() => {
  1635. this.$refs.supermap.clearM()
  1636. that.$refs.supermap.setMarkers(that.markersList)
  1637. }, 1000)
  1638. },
  1639. getExposureStage(day, loading) {
  1640. let that = this
  1641. //右侧获取曝光台
  1642. getExposureStage({
  1643. eventTypeIdDl: that.eventTypeIdDl.length == 0 ? Cookies.get("eventTypeDl").split(",") : that.eventTypeIdDl,
  1644. eventTypeId: that.eventTypeId.length == 0 ? Cookies.get("eventType").split(",") : that.eventTypeId,
  1645. day: day
  1646. }, loading).then(res => {
  1647. this.exposureStageList = res.data
  1648. })
  1649. },
  1650. /** ----------------------------------weosocket开始------------------------------------- */
  1651. initWebSocket(userId, eventTypeDl, eventType) { //初始化weosocket
  1652. selectConfigKey('KSH_SOCKET').then(res => {
  1653. const wsuri = res.data + userId + '/' + eventTypeDl + '/' + eventType
  1654. this.websock = new WebSocket(wsuri)
  1655. console.log('建立websocket连接')
  1656. this.websock.onopen = this.websocketonopen
  1657. this.websock.onmessage = this.websocketonmessage
  1658. this.websock.onerror = this.websocketonerror
  1659. })
  1660. },
  1661. websocketonopen() { //连接建立之后执行send方法发送数据
  1662. console.log('websocket连接成功')
  1663. this.weosocket = true
  1664. this.sendPing()
  1665. },
  1666. websocketonerror() { //连接建立失败重连
  1667. this.initWebSocket(this.websockSid.userId, this.websockSid.eventTypeDl, this.websockSid.eventType, )
  1668. },
  1669. websocketonmessage(e) { //数据接收
  1670. console.log('接收数据', e.data)
  1671. // let data = "{\"fromId\":\"forest\",\"fromUserId\":\""+Cookies.get('username')+"\",\"toUserId\":\""+Cookies.get('username')+"\"}";
  1672. let data = "{\"fromId\":\"traffic\"}";
  1673. if (this.calendarDay == this.getCurrentDataStr() && data != e.data) {
  1674. this.getTodayEvents(this.getCurrentDataStr(), false);
  1675. this.getEventByEventType(this.getCurrentDataStr(), false);
  1676. this.getEventByReportorOrder(this.getCurrentDataStr(), false);
  1677. this.getExposureStage(this.getCurrentDataStr(), false);
  1678. // 处理收到的消息
  1679. this.handleWebSoceketEvent(e.data)
  1680. this.$refs.bottomMenu.updateAlert();
  1681. this.$refs.up.play();
  1682. // thes.$refs.up.pause();//停止播放音乐
  1683. }
  1684. },
  1685. // 处理WebSocket事件
  1686. handleWebSoceketEvent(val) {
  1687. let that = this
  1688. let data = JSON.parse(val)
  1689. /**
  1690. * that.markersList.filter( item => data.eventCode == item.parameter).length == 0 如果地图中不存在当前事件则添加
  1691. * eventPush: 事件列表消息
  1692. * */
  1693. if (data.tag == "eventPush" && that.markersList.filter(item => data.eventCode == item.parameter).length == 0) {
  1694. getEventPush({
  1695. eventCode: data.eventCode
  1696. }).then((res) => {
  1697. if (res.data != undefined) {
  1698. if (res.data.eventStatusValue !== "forest_event_status_1") {
  1699. //插入到第一条
  1700. this.eventList.unshift(res.data)
  1701. // 插入后删除最后一条 保证列表中为10条数据
  1702. if (this.eventList.length > 9)
  1703. this.eventList.splice(10, 1)
  1704. // 将收到的数据在地图上添加
  1705. this.getWebSocketEvent(res.data)
  1706. }
  1707. }
  1708. })
  1709. } else {
  1710. this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum)
  1711. }
  1712. console.log(that.eventList[0])
  1713. },
  1714. websocketsend(Data) { //数据发送
  1715. this.websock.send(Data)
  1716. },
  1717. websocketclose(e) { //关闭
  1718. console.log('断开连接', e)
  1719. // clearInterval(this.setIntervalWesocketPush)
  1720. this.weosocket = false
  1721. },
  1722. /**发送心跳
  1723. * @param {number} time 心跳间隔毫秒 默认5000
  1724. * @param {string} ping 心跳名称 默认字符串ping
  1725. */
  1726. sendPing(time = 60000, ping = {
  1727. 'fromId': 'traffic'
  1728. }) {
  1729. clearInterval(this.setIntervalWesocketPush)
  1730. this.setIntervalWesocketPush = setInterval(() => {
  1731. if (this.weosocket) {
  1732. this.websock.send(JSON.stringify(ping))
  1733. } else {
  1734. // this.initWebSocket()
  1735. }
  1736. }, time)
  1737. },
  1738. stopAudio() {
  1739. this.$refs.up.pause(); //停止播放音乐
  1740. this.$refs.up.currentTime = 0;
  1741. },
  1742. /** ----------------------------------weosocket结束------------------------------------- */
  1743. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  1744. bottomMenuList() {
  1745. this.$refs.bottomMenu.selectTaskList() //获取任务列表
  1746. this.$refs.bottomMenu.selectMessageList() //获取消息列表
  1747. },
  1748. showDialog(click) {
  1749. if (click == 'eventLocation') {
  1750. this.$refs.eventLocation.showEventLocation()
  1751. this.$refs.bottomMenu.showMeasure = false
  1752. this.$refs.bottomMenu.showChild = false
  1753. this.$refs.bottomMenu.showBanChild = false
  1754. this.$refs.bottomMenu.showChangChild = false
  1755. } else if (click == 'editableLayers') {
  1756. this.$refs.bottomMenu.showChild = false
  1757. this.$refs.bottomMenu.showBanChild = false
  1758. this.$refs.bottomMenu.showChangChild = false
  1759. if (!this.$refs.bottomMenu.showMeasure) {
  1760. this.$refs.bottomMenu.showMeasure = true
  1761. } else {
  1762. this.$refs.bottomMenu.showMeasure = false
  1763. }
  1764. } else if (click == 'layerSwitching') {
  1765. this.$refs.bottomMenu.showMeasure = false
  1766. this.$refs.bottomMenu.showBanChild = false
  1767. this.$refs.bottomMenu.showChangChild = false
  1768. if (!this.$refs.bottomMenu.showChild) {
  1769. this.$refs.bottomMenu.showChild = true
  1770. } else {
  1771. this.$refs.bottomMenu.showChild = false
  1772. }
  1773. } else if (click == 'TVWall') {
  1774. this.$refs.TVWall.showTVWall()
  1775. this.$refs.bottomMenu.showMeasure = false
  1776. this.$refs.bottomMenu.showChild = false
  1777. this.$refs.bottomMenu.showBanChild = false
  1778. this.$refs.bottomMenu.showChangChild = false
  1779. } else if (click == 'forestban') {
  1780. this.$refs.bottomMenu.showMeasure = false
  1781. this.$refs.bottomMenu.showChild = false
  1782. this.$refs.bottomMenu.showChangChild = false
  1783. if (!this.$refs.bottomMenu.showBanChild) {
  1784. this.$refs.bottomMenu.showBanChild = true
  1785. } else {
  1786. this.$refs.bottomMenu.showBanChild = false
  1787. }
  1788. } else if (click == 'forestchang') {
  1789. this.$refs.bottomMenu.showMeasure = false
  1790. this.$refs.bottomMenu.showBanChild = false
  1791. this.$refs.bottomMenu.showChild = false
  1792. if (!this.$refs.bottomMenu.showChangChild) {
  1793. this.$refs.bottomMenu.showChangChild = true
  1794. } else {
  1795. this.$refs.bottomMenu.showChangChild = false
  1796. }
  1797. }
  1798. },
  1799. //选择图层
  1800. choseLayerSwitching(url, isClear) {
  1801. this.$refs.supermap.layerSwitching(url, isClear)
  1802. },
  1803. //选择图层(传递数组)
  1804. choseLayerSwitchingList(urlList) {
  1805. this.$refs.supermap.layerSwitchingList(urlList)
  1806. },
  1807. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  1808. }
  1809. }
  1810. </script>
  1811. <style rel="stylesheet/scss" lang="scss" scoped>
  1812. @import '@/assets/styles/base.scss';
  1813. .paging {
  1814. padding: .5rem .3rem;
  1815. display: flex;
  1816. justify-content: center;
  1817. align-content: center;
  1818. span {
  1819. color: #2bacf7;
  1820. display: flex;
  1821. align-items: center;
  1822. padding: 0 1rem;
  1823. }
  1824. button {
  1825. padding: 0 0.3rem;
  1826. height: 1.5rem;
  1827. background-color: #112543;
  1828. color: #2bacf7;
  1829. border: 1px solid #33467f;
  1830. }
  1831. button:hover {
  1832. padding: 0 0.3rem;
  1833. height: 1.5rem;
  1834. background-color: #112543;
  1835. color: #0ff7c5;
  1836. border: 1px solid #1d657f;
  1837. }
  1838. }
  1839. </style>
  1840. <style lang="scss">
  1841. @import '@/assets/styles/base.scss';
  1842. .bottomRight {
  1843. .el-table .el-table__header-wrapper th,
  1844. .el-table .el-table__fixed-header-wrapper th {
  1845. background-color: $searchBG;
  1846. }
  1847. .el-table td.el-table__cell,
  1848. .el-table th.el-table__cell.is-leaf {
  1849. border-bottom: 1px $tableBorder;
  1850. }
  1851. .el-table--border,
  1852. .el-table--border::after {
  1853. border: 1px $tableBorder;
  1854. background-color: $searchBG
  1855. }
  1856. .el-table--border {
  1857. .el-table--group {
  1858. border: 1px $tableBorder;
  1859. }
  1860. .el-table__cell {
  1861. border-right: 1px $tableBorder;
  1862. ;
  1863. }
  1864. }
  1865. .el-table::before {
  1866. background: $searchBG;
  1867. }
  1868. .el-table {
  1869. background: $searchBG;
  1870. color: $inBlue;
  1871. thead {}
  1872. tr {
  1873. background: $searchBG;
  1874. }
  1875. td {
  1876. text-align: center;
  1877. }
  1878. .el-table__header-wrapper {
  1879. th {
  1880. color: $inBlue;
  1881. font-size: .8rem;
  1882. }
  1883. }
  1884. thead.is-group {
  1885. .el-table__cell {
  1886. text-align: center;
  1887. background: $searchBG;
  1888. border-bottom: 1px $tableBorder;
  1889. border-right: 1px $tableBorder;
  1890. padding: 0;
  1891. font-weight: normal;
  1892. }
  1893. }
  1894. }
  1895. .el-table__empty-block {
  1896. min-height: auto;
  1897. }
  1898. .el-table__empty-text {
  1899. line-height: 30px;
  1900. }
  1901. .el-table__header {
  1902. width: auto !important
  1903. }
  1904. .el-table__empty-block {
  1905. width: auto !important
  1906. }
  1907. .el-table__body-wrapper {
  1908. .el-table__body {
  1909. width: auto !important
  1910. }
  1911. }
  1912. .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
  1913. background-color: #0f3655;
  1914. }
  1915. }
  1916. </style>