forest.vue 55 KB

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