forest.vue 78 KB

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