forest.vue 60 KB

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