forest.vue 61 KB

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