forest.vue 58 KB

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