forest.vue 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326
  1. <!--可视化公共模板 林业-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div class="leftbar" ref="left">
  10. <!-- 1 基本情况 -->
  11. <div class="forthis">
  12. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  13. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  14. <div class="this-title">
  15. <span>基本情况</span>
  16. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
  17. </div>
  18. <div class="i-list-con h-14">
  19. <div class="d-l-con no_hover">
  20. <div class="d-l-l-text w-100p no-weight">
  21. <h4 class="line-h-1 w-100p" v-html="forestInfo">{{ forestInfo }}</h4>
  22. </div>
  23. </div>
  24. </div>
  25. </dv-border-box-13>
  26. </div>
  27. <!-- 2 事件统计-->
  28. <div class="forthis">
  29. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  30. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  31. <div class="i-list-con h-29-5">
  32. <div class="d-l-con no_hover">
  33. <div class="event-count">
  34. <div class="count-number">{{ totalStr.charAt(0) }}</div>
  35. <div class="count-number">{{ totalStr.charAt(1) }}</div>
  36. <div class="count-number">{{ totalStr.charAt(2) }}</div>
  37. <div class="count-number">{{ totalStr.charAt(3) }}</div>
  38. <div class="count-number">{{ totalStr.charAt(4) }}</div>
  39. <div class="count-number">{{ totalStr.charAt(5) }}</div>
  40. <dv-decoration-5
  41. style="width:81%;height:15px;position: absolute; top:4.2rem;z-index: 0; "/>
  42. </div>
  43. </div>
  44. <div class="d-l-con-icon">
  45. <div class="icon-con w-33 flex-d t-a-center">
  46. <dv-decoration-9
  47. style="width: 5.5rem;height: 5.5rem; color:#16e29e;font-size: 1rem;font-weight: bolder;">
  48. {{ newReport_pre }}%
  49. </dv-decoration-9>
  50. <div class="e-state"
  51. :style="{'background-image':`url(${require('@/assets/images/integrated/state-bg.png')})`}">
  52. <span>新上报</span> <span>{{ newReport }}</span>
  53. </div>
  54. </div>
  55. <div class="icon-con w-33 flex-d t-a-center">
  56. <dv-decoration-9
  57. style="width: 5.5rem;height: 5.5rem; color:#f18425;font-size: 1rem;font-weight: bolder;">
  58. {{ readySure_pre }}%
  59. </dv-decoration-9>
  60. <div class="e-state"
  61. :style="{'background-image':`url(${require('@/assets/images/integrated/state-bg.png')})`}">
  62. <span>处理中</span> <span>{{ readySure }}</span>
  63. </div>
  64. </div>
  65. <div class="icon-con w-33 flex-d t-a-center">
  66. <dv-decoration-9
  67. style="width: 5.5rem;height: 5.5rem; color:#9179f1;font-size: 1rem;font-weight: bolder;">
  68. {{ readyFinish_pre }}%
  69. </dv-decoration-9>
  70. <div class="e-state"
  71. :style="{'background-image':`url(${require('@/assets/images/integrated/state-bg.png')})`}">
  72. <span>已完成</span> <span>{{ readyFinish }}</span>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="d-l-con no_hover">
  77. <div id="chart-event-ai" style="width: 100%;height:6vh;"></div>
  78. </div>
  79. </div>
  80. </dv-border-box-13>
  81. </div>
  82. <!-- 3 组织机构 -->
  83. <div class="forthis">
  84. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  85. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  86. <div class="i-list-con h-27" style="padding-left: 1rem;">
  87. <el-collapse accordion>
  88. <el-collapse-item v-for="(item,index) in forestFarm" :key="index">
  89. <!-- deptId -->
  90. <template slot="title">
  91. <div class="d-l-con sj-collapse" :class="{on:listCurrentIndex1==item.deptId}"
  92. v-on:click="selectCameraByDeptId(item.deptId)">
  93. <div class="d-l-l-text">
  94. <h4 class="collapse-title">{{ item.deptName }}</h4>
  95. </div>
  96. <div class="d-l-l-count">{{ item.eventCount }}</div>
  97. </div>
  98. </template>
  99. </el-collapse-item>
  100. </el-collapse>
  101. </div>
  102. </dv-border-box-13>
  103. </div>
  104. </div>
  105. <!-- 地图 -->
  106. <supermap ref="supermap" style="width: 100%;height: 100vh;" ></supermap>
  107. <!-- 右侧 -->
  108. <div class="rightbar rightbar-index" ref="right">
  109. <div class="right-item1">
  110. <!-- 天气 -->
  111. <div class="forthis">
  112. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" >
  113. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  114. <div class="i-list-con small-bottom-margin h-18">
  115. <el-row :gutter="20" v-if="todatWeather">
  116. <el-col :span="9">
  117. <div class="weather-img">
  118. <img v-if="weatherinformationWeather==1"
  119. src="../assets/images/integrated/weather/qing-1.png">
  120. <img v-if="weatherinformationWeather==2"
  121. src="../assets/images/integrated/weather/duoyun-2.png">
  122. <img v-if="weatherinformationWeather==3"
  123. src="../assets/images/integrated/weather/yin-3.png">
  124. <img v-if="weatherinformationWeather==4"
  125. src="../assets/images/integrated/weather/zhenyu-4.png">
  126. <img v-if="weatherinformationWeather==5"
  127. src="../assets/images/integrated/weather/leizhenyu-5.png">
  128. <img v-if="weatherinformationWeather==6"
  129. src="../assets/images/integrated/weather/leizhenyubingbao-6.png">
  130. <img v-if="weatherinformationWeather==7"
  131. src="../assets/images/integrated/weather/yujiaxue-7.png">
  132. <img v-if="weatherinformationWeather==8"
  133. src="../assets/images/integrated/weather/xiaoyu-8.png">
  134. <img v-if="weatherinformationWeather==9||weatherinformationWeather==22"
  135. src="../assets/images/integrated/weather/zhongyu-9.png">
  136. <img v-if="weatherinformationWeather==10||weatherinformationWeather==23"
  137. src="../assets/images/integrated/weather/dayu-10.png">
  138. <img v-if="weatherinformationWeather==11||weatherinformationWeather==24"
  139. src="../assets/images/integrated/weather/baoyu-11.png">
  140. <img v-if="weatherinformationWeather==12||weatherinformationWeather==25"
  141. src="../assets/images/integrated/weather/dabaoyu-12.png">
  142. <img v-if="weatherinformationWeather==13||weatherinformationWeather==26"
  143. src="../assets/images/integrated/weather/tedabaoyu-13.png">
  144. <img v-if="weatherinformationWeather==14"
  145. src="../assets/images/integrated/weather/zhenxue-14.png">
  146. <img v-if="weatherinformationWeather==15"
  147. src="../assets/images/integrated/weather/xiaoxue-15.png">
  148. <img v-if="weatherinformationWeather==16||weatherinformationWeather==27"
  149. src="../assets/images/integrated/weather/zhongxue-16.png">
  150. <img v-if="weatherinformationWeather==17||weatherinformationWeather==28"
  151. src="../assets/images/integrated/weather/daxue-17.png">
  152. <img v-if="weatherinformationWeather==18||weatherinformationWeather==29"
  153. src="../assets/images/integrated/weather/baoxue-18.png">
  154. <img v-if="weatherinformationWeather==19"
  155. src="../assets/images/integrated/weather/wu-19.png">
  156. <img v-if="weatherinformationWeather==20"
  157. src="../assets/images/integrated/weather/dongyu-20.png">
  158. <img v-if="weatherinformationWeather==21"
  159. src="../assets/images/integrated/weather/shachenbao-21.png">
  160. <img v-if="weatherinformationWeather==30"
  161. src="../assets/images/integrated/weather/fuchen-30.png">
  162. <img v-if="weatherinformationWeather==31"
  163. src="../assets/images/integrated/weather/yangsha-31.png">
  164. <img v-if="weatherinformationWeather==32"
  165. src="../assets/images/integrated/weather/qiangshachenbao-32.png">
  166. <span v-if="weatherinformationWeather==1">晴</span>
  167. <span v-if="weatherinformationWeather==2">多云</span>
  168. <span v-if="weatherinformationWeather==3">阴</span>
  169. <span v-if="weatherinformationWeather==4">阵雨</span>
  170. <span v-if="weatherinformationWeather==5">雷阵雨</span>
  171. <span v-if="weatherinformationWeather==6">雷阵雨伴有冰雹</span>
  172. <span v-if="weatherinformationWeather==7">雨夹雪</span>
  173. <span v-if="weatherinformationWeather==8">小雨</span>
  174. <span v-if="weatherinformationWeather==9">中雨</span>
  175. <span v-if="weatherinformationWeather==10">大雨</span>
  176. <span v-if="weatherinformationWeather==11">暴雨</span>
  177. <span v-if="weatherinformationWeather==12">大暴雨</span>
  178. <span v-if="weatherinformationWeather==13">特大暴雨</span>
  179. <span v-if="weatherinformationWeather==14">阵雪</span>
  180. <span v-if="weatherinformationWeather==15">小雪</span>
  181. <span v-if="weatherinformationWeather==16">中雪</span>
  182. <span v-if="weatherinformationWeather==17">大雪</span>
  183. <span v-if="weatherinformationWeather==18">暴雪</span>
  184. <span v-if="weatherinformationWeather==19">雾</span>
  185. <span v-if="weatherinformationWeather==20">冻雨</span>
  186. <span v-if="weatherinformationWeather==21">沙尘暴</span>
  187. <span v-if="weatherinformationWeather==22">小雨—中雨</span>
  188. <span v-if="weatherinformationWeather==23">中雨—大雨</span>
  189. <span v-if="weatherinformationWeather==24">大雨—暴雨</span>
  190. <span v-if="weatherinformationWeather==25">暴雨—大暴雨</span>
  191. <span v-if="weatherinformationWeather==26">大暴雨—特大暴雨</span>
  192. <span v-if="weatherinformationWeather==27">小雪—中雪</span>
  193. <span v-if="weatherinformationWeather==28">中雪—大雪</span>
  194. <span v-if="weatherinformationWeather==29">大雪—暴雪</span>
  195. <span v-if="weatherinformationWeather==30">浮尘</span>
  196. <span v-if="weatherinformationWeather==31">扬沙</span>
  197. <span v-if="weatherinformationWeather==32">强沙尘暴</span>
  198. </div>
  199. </el-col>
  200. <el-col :span="15">
  201. <div class="weather-info">
  202. <ul>
  203. <li>风力:{{ weatherinformationPower }}级</li>
  204. <li>低温:{{ weatherinformationLow }}℃</li>
  205. <li v-if="weatherinformationDirection==1">风向:东风</li>
  206. <li v-if="weatherinformationDirection==2">风向:东南风</li>
  207. <li v-if="weatherinformationDirection==3">风向:南风</li>
  208. <li v-if="weatherinformationDirection==4">风向:西南风</li>
  209. <li v-if="weatherinformationDirection==5">风向:西风</li>
  210. <li v-if="weatherinformationDirection==6">风向:西北风</li>
  211. <li v-if="weatherinformationDirection==7">风向:北风</li>
  212. <li v-if="weatherinformationDirection==8">风向:东北风</li>
  213. <li>高温:{{ weatherinformationHigh }}℃</li>
  214. <li>火险:{{ weatherinformationLevelValue }}
  215. </li>
  216. <li>湿度:{{ weatherinformationTemperature }}</li>
  217. </ul>
  218. </div>
  219. </el-col>
  220. </el-row>
  221. <el-row :gutter="20" v-else>
  222. <el-col :span="24">
  223. <div class="weather-img">
  224. 暂无天气信息!
  225. </div>
  226. </el-col>
  227. </el-row>
  228. <div class="firestate" v-if="todatWeather">
  229. <div
  230. :class="weatherinformationLevel=='forest_weatherinformation_level_1'? 'state-block1 state-on':'state-block1'">
  231. </div>
  232. <div
  233. :class="weatherinformationLevel=='forest_weatherinformation_level_2'? 'state-block2 state-on':'state-block2'">
  234. </div>
  235. <div
  236. :class="weatherinformationLevel=='forest_weatherinformation_level_3'? 'state-block3 state-on':'state-block3'">
  237. </div>
  238. <div
  239. :class="weatherinformationLevel=='forest_weatherinformation_level_4'? 'state-block4 state-on':'state-block4'">
  240. </div>
  241. <div
  242. :class="weatherinformationLevel=='forest_weatherinformation_level_5'? 'state-block5 state-on':'state-block5'">
  243. </div>
  244. </div>
  245. </div>
  246. </dv-border-box-13>
  247. </div>
  248. <!-- 曝光台 -->
  249. <div class="forthis">
  250. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  251. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  252. <div class="this-title">
  253. <span>超期事件</span>
  254. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
  255. </div>
  256. <div class="i-list-con small-bottom-margin h-18">
  257. <div class="d-l-con padding-box nowrap" v-for="(item,index) in exposureStageList">
  258. <div class="bgt-state">
  259. <div class="bgt-state-frequency">{{ item.urgeCount }}</div>
  260. <div class="bgt-state-minute">{{ item.timeDiff }}分钟</div>
  261. </div>
  262. <div class="bgt-info">
  263. <div class="bgt-info-name">{{ item.eventName }}</div>
  264. <div class="bgt-info-place">
  265. <ul>
  266. <li>{{ item.deptNames }}</li>
  267. </ul>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. </dv-border-box-13>
  273. </div>
  274. <!-- 事件列表 -->
  275. <div class="forthis">
  276. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  277. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  278. <div class="this-title">
  279. <span>事件列表</span>
  280. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
  281. </div>
  282. <div class="i-list-con small-bottom-margin" style="height: 30vh;">
  283. <div class="event-list-search">
  284. <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="eventSearch"
  285. @change="getEventList(calendarDay,10,1,eventSearch)">
  286. </el-input>
  287. </div>
  288. <div class="d-l-con padding-box nowrap" v-for="(item,index) in eventList"
  289. @click="dropLocation(item.latitude,item.longitude,item.eventCode)" data-html2canvas-ignore>
  290. <div class="bgt-img">
  291. <img v-if="item.picturePath!=null&&item.picturePath!=''&& item.pictureType=='image'"
  292. :src="item.picturePath" style="width: 93px;height: 64px" loading="lazy"/>
  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. 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. created() {
  475. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  476. window.showDialog = this.showDialog
  477. window.choseLayerSwitching = this.choseLayerSwitching
  478. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  479. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  480. },
  481. mounted() {
  482. this.getBaseInfo()
  483. this.getTodayEvents(this.getCurrentDataStr())
  484. this.getDeptEventCount(this.getCurrentDataStr())
  485. this.getWeather(this.getCurrentDataStr())
  486. this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum)
  487. this.getEventByEventType(this.getCurrentDataStr())
  488. this.getEventByReportorOrder(this.getCurrentDataStr())
  489. this.getExposureStage(this.getCurrentDataStr())
  490. this.getSupermap(this.getCurrentDataStr())
  491. this.getMenuEventType()
  492. /** ----------------------------------weosocket开始------------------------------------- */
  493. // this.initWebSocket()
  494. /** ----------------------------------weosocket结束------------------------------------- */
  495. this.bottomMenuList() //获取底部公共组件消息和任务
  496. },
  497. data() {
  498. return {
  499. //警报MP3文件
  500. audioSrc: require('@/assets/jingbao.mp3'),
  501. calendarDay: this.getCurrentDataStr(),
  502. //基本情况
  503. forestInfo: '', //基本情况
  504. //左侧获取事件信息统计
  505. totalStr: '000000',
  506. aiTotal: '',
  507. newReport: '',
  508. otherTotal: '',
  509. readyFinish: '',
  510. readySure: '',
  511. total: '',
  512. aiTotal_pre: '',
  513. newReport_pre: '',
  514. otherTotal_pre: '',
  515. readyFinish_pre: '',
  516. readySure_pre: '',
  517. //左侧部门事件数量
  518. forestFarm: [],
  519. //右侧天气
  520. todatWeather: false,
  521. weatherinformationDirection: '',
  522. weatherinformationHigh: '',
  523. weatherinformationLevel: '',
  524. weatherinformationLevelValue: '', //火险登记中文
  525. weatherinformationLow: '',
  526. weatherinformationPower: '',
  527. weatherinformationTemperature: '',
  528. weatherinformationTime: '',
  529. weatherinformationWeather: '',
  530. //右侧曝光台
  531. exposureStageList: [],
  532. //右侧事件列表
  533. eventList: [],
  534. pageSize: 10,
  535. pageNum: 1,
  536. eventTypeIdDl:[],
  537. eventTypeId:[],
  538. eventListnew: [],
  539. eventListAll: [],
  540. eventSearch: '', //事件列表搜索
  541. listCurrentIndex1: '',
  542. // ----------------------------------事件分类柱状----------------------------------------
  543. eventKind: {},
  544. showEventKind: false,
  545. // ----------------------------------上报排行----------------------------------------
  546. reportList: {
  547. data: []
  548. },
  549. /** ----------------------------------weosocket开始------------------------------------- */
  550. weosocket: false,
  551. websock: '',
  552. setIntervalWesocketPush: null,
  553. websockSid: {
  554. userId: '',
  555. eventTypeDl: '',
  556. eventType: '',
  557. },
  558. /** ----------------------------------weosocket结束------------------------------------- */
  559. /** ----------------------------------摄像头预览开始------------------------------------- */
  560. activePanel: 'key1',
  561. isLogin: false,
  562. cameraParams: [],
  563. ws: null,
  564. /** ----------------------------------摄像头预览结束------------------------------------- */
  565. markersList: [], //点位列表
  566. cameraList: [] //摄像头列表
  567. }
  568. },
  569. /** ----------------------------------weosocket开始------------------------------------- */
  570. destroyed() { //离开页面关闭Socket连接
  571. if (this.websock) {
  572. clearInterval(this.setIntervalWesocketPush)
  573. this.websock.close()
  574. this.websock = null
  575. }
  576. },
  577. /** ----------------------------------weosocket结束------------------------------------- */
  578. methods: {
  579. getMenuEventType() {
  580. let that = this
  581. getMenuEventType().then(res => {
  582. that.websockSid.userId = Cookies.get('userId')
  583. that.websockSid.eventTypeDl = res.data.eventTypeDl
  584. that.websockSid.eventType = res.data.eventType
  585. that.initWebSocket(that.websockSid.userId, that.websockSid.eventTypeDl, that.websockSid.eventType)
  586. console.log(that.websockSid)
  587. })
  588. },
  589. setEventTypeId(data) {
  590. // let data = {eventTypeIdDl: [], eventTypeId: []}
  591. // let data = {eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId}
  592. let that = this
  593. that.eventTypeIdDl = data.eventTypeIdDl
  594. that.eventTypeId = data.eventTypeId
  595. that.getSupermap(that.calendarDay, false)
  596. that.getTodayEvents(that.calendarDay, false)
  597. that.getEventByEventType(that.calendarDay, false)
  598. that.getExposureStage(that.calendarDay, false)
  599. that.getEventByReportorOrder(that.calendarDay, false)
  600. that.getDeptEventCount(that.calendarDay, false)
  601. that.getEventList(that.calendarDay, that.pageSize, that.pageNum, '', false)
  602. },
  603. // searchEvent(pageSize,pageNum,eventSearch) {
  604. // this.pageSize = pageSize;
  605. // this.pageNum = pageNum;
  606. // let that = this
  607. // //事件列表搜索
  608. // this.eventList = []
  609. // //右侧获取事件列表
  610. // getEventList({ day: that.calendarDay,pageSize:pageSize,pageNum: pageNum ,eventName:eventSearch}).then(res => {
  611. // this.eventList = res.data
  612. // if (this.eventList != null && this.eventList.length > 0) {
  613. // if(this.eventList[0].eventStatusValue == 'forest_event_status_1'){
  614. // that.$refs.bottomMenu.updateAlert();
  615. // that.$refs.up.play();
  616. // }
  617. // }
  618. // })
  619. // },
  620. dropLocation(lat, lng,eventCode) {
  621. this.$refs.supermap.dropLocation(lat, lng,18)
  622. this.showEventDialog(eventCode)
  623. },
  624. showEventDialog(eventCode) {
  625. //事件信息弹出
  626. this.$refs.eventdetailsdialog.showEventDialog(eventCode)
  627. },
  628. getFirespread(eventCode) {
  629. this.$refs.firespread.showEventDialog(eventCode);
  630. },
  631. getCurrentDataStr() {
  632. let date = new Date()
  633. let y = date.getFullYear()
  634. let m = date.getMonth() + 1
  635. m = m < 10 ? '0' + m : m
  636. let d = date.getDate()
  637. d = d < 10 ? '0' + d : d
  638. return y + '-' + m + '-' + d
  639. },
  640. selectDay(day) { //日历点击
  641. this.getTodayEvents(day)
  642. this.getDeptEventCount(day)
  643. this.getWeather(day)
  644. this.getEventList(day, 10, 1)
  645. this.getEventByEventType(day)
  646. this.getEventByReportorOrder(day)
  647. this.getExposureStage(day)
  648. this.getSupermap(day);
  649. this.calendarDay = day
  650. },
  651. //事件数量统计chart 样例地址http://192.144.199.210:8080/editor/index.html?chart_id=jTXf0Rv4A3oiBONB
  652. eventChartAi(aiTotal_pre, otherTotal_pre) {
  653. // 基于准备好的dom,初始化echarts实例
  654. let myChart = echarts.init(document.getElementById('chart-event-ai'))
  655. myChart.setOption({
  656. tooltip: {
  657. trigger: 'none'
  658. },
  659. grid: {
  660. top: '65%',
  661. left: '5%',
  662. right: '5%'
  663. },
  664. yAxis: {
  665. data: ['百分比'],
  666. axisTick: {
  667. show: false
  668. },
  669. axisLine: {
  670. show: false
  671. },
  672. axisLabel: {
  673. show: false
  674. }
  675. },
  676. xAxis: {
  677. splitLine: {
  678. show: false
  679. },
  680. axisTick: {
  681. show: false
  682. },
  683. axisLine: {
  684. show: false
  685. },
  686. axisLabel: {
  687. show: false
  688. }
  689. },
  690. legend: {
  691. data: ['AI', '其他'],
  692. bottom: '5%',
  693. textStyle: {
  694. color: '#1FC3CE',
  695. fontSize: 14
  696. }
  697. },
  698. series: [{
  699. // name: '最上层立体圆',
  700. type: 'pictorialBar',
  701. symbolSize: [10, 20],
  702. symbolOffset: [2, 0],
  703. z: 12,
  704. itemStyle: {
  705. normal: {
  706. color: '#293CA0'
  707. }
  708. },
  709. data: [{
  710. value: 100,
  711. symbolPosition: 'end'
  712. }]
  713. }, {
  714. // name: '中间立体圆',
  715. type: 'pictorialBar',
  716. symbolSize: [10, 20],
  717. symbolOffset: [2, 0],
  718. z: 12,
  719. itemStyle: {
  720. normal: {
  721. color: '#45ac8d'
  722. }
  723. },
  724. data: [{
  725. value: aiTotal_pre,
  726. symbolPosition: 'end'
  727. }]
  728. }, {
  729. // name: '最底部立体圆',
  730. type: 'pictorialBar',
  731. symbolSize: [10, 20],
  732. symbolOffset: [-4, 0],
  733. z: 12,
  734. itemStyle: {
  735. normal: {
  736. color: '#196d59'
  737. }
  738. },
  739. data: [otherTotal_pre]
  740. }, {
  741. name: 'AI',
  742. //底部立体柱
  743. stack: '1',
  744. type: 'bar',
  745. itemStyle: {
  746. normal: {
  747. color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
  748. offset: 0,
  749. color: '#29ac8f'
  750. }, {
  751. offset: 1,
  752. color: '#0a3f3f'
  753. }])
  754. }
  755. },
  756. label: {
  757. normal: {
  758. show: true,
  759. position: 'inside',
  760. offset: [0, 1],
  761. formatter: function (obj) {
  762. return (obj.value).toLocaleString() + '%'
  763. },
  764. textStyle: {
  765. align: 'center',
  766. baseline: 'middle',
  767. fontSize: 14,
  768. fontWeight: '400',
  769. color: '#fff',
  770. textShadowColor: '#000',
  771. textShadowBlur: '0',
  772. textShadowOffsetX: 1,
  773. textShadowOffsetY: 1
  774. }
  775. }
  776. },
  777. silent: true,
  778. barWidth: 20,
  779. barGap: '-100%', // Make series be overlap
  780. data: [aiTotal_pre]
  781. }, {
  782. name: '其他',
  783. //上部立体柱
  784. stack: '1',
  785. type: 'bar',
  786. itemStyle: {
  787. normal: {
  788. color: '#14257B',
  789. opacity: .7
  790. }
  791. },
  792. silent: true,
  793. barWidth: 20,
  794. barGap: '-100%', // Make series be overlap
  795. data: [otherTotal_pre],
  796. // itemStyle: {
  797. // normal: {
  798. // color: 'rgba(29,67,243,1)',
  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. }]
  823. })
  824. },
  825. getBaseInfo() {
  826. //左侧获取部门信息
  827. getBaseInfo().then(res => {
  828. if (res.code == 200) {
  829. if (res.msg == '未找到部门信息') {
  830. this.forestInfo = '未找到部门信息!'
  831. } else {
  832. this.forestInfo = res.data.baseinfo //基本情况
  833. }
  834. }
  835. })
  836. },
  837. getTodayEvents(day, loading) {
  838. let that = this
  839. //左侧获取事件信息统计
  840. getTodayEvents({eventTypeIdDl: that.eventTypeIdDl,eventTypeId: that.eventTypeId,day: day}, loading).then(res => {
  841. this.aiTotal = res.data.aiTotal
  842. this.aiTotal_pre = res.data.aiTotal_pre
  843. this.newReport = res.data.newReport
  844. this.newReport_pre = res.data.newReport_pre
  845. this.otherTotal = res.data.otherTotal
  846. this.otherTotal_pre = res.data.otherTotal_pre
  847. this.readyFinish = res.data.readyFinish
  848. this.readyFinish_pre = res.data.readyFinish_pre
  849. this.readySure = res.data.readySure
  850. this.readySure_pre = res.data.readySure_pre
  851. this.totalStr = res.data.totalStr
  852. this.total = res.data.total
  853. this.eventChartAi(this.aiTotal_pre, this.otherTotal_pre)
  854. })
  855. },
  856. getDeptEventCount(day, loading) {
  857. let that = this
  858. //左侧获取事件部门数量
  859. getDeptEventCount({eventTypeIdDl: that.eventTypeIdDl,eventTypeId: that.eventTypeId,day: day}, loading).then(res => {
  860. this.forestFarm = res.data
  861. })
  862. },
  863. getWeather(day) {
  864. let that = this
  865. //右侧获取天气信息
  866. getWeather({day: day}).then(res => {
  867. if (res.code == 200) {
  868. if (res.msg == '天气未添加') {
  869. this.todatWeather = false
  870. } else {
  871. this.todatWeather = true
  872. this.weatherinformationDirection = res.data.weatherinformationDirection
  873. this.weatherinformationHigh = res.data.weatherinformationHigh
  874. this.weatherinformationLevel = res.data.weatherinformationLevel
  875. this.weatherinformationLevelValue = res.data.weatherinformationLevelValue
  876. this.weatherinformationLow = res.data.weatherinformationLow
  877. this.weatherinformationPower = res.data.weatherinformationPower
  878. this.weatherinformationTemperature = res.data.weatherinformationTemperature
  879. this.weatherinformationTime = res.data.weatherinformationTime
  880. this.weatherinformationWeather = res.data.weatherinformationWeather
  881. }
  882. } else {
  883. this.todatWeather = false
  884. }
  885. })
  886. },
  887. getSupermap(day, loading) {
  888. let that = this
  889. getNearEvent('', '', day, loading, that.eventTypeIdDl, that.eventTypeId).then(res => {
  890. that.markersList = [];
  891. if (res.data != null && res.data.length > 0) {
  892. for (let i = 0; i < res.data.length; i++) {
  893. let markersMap = {
  894. lng: 124.59,
  895. lat: 43.02,
  896. icon: 'marker',
  897. bindPopupHtml: '',
  898. click: '',
  899. parameter: '',
  900. keepBindPopup: false,
  901. isAggregation: false
  902. }
  903. if (res.data.length > 200) {
  904. markersMap.isAggregation = true
  905. }
  906. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount == 0) {
  907. markersMap.click = 'showEventDialog'
  908. markersMap.icon = 'sj-icon-map-xinshangbao'
  909. }
  910. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount > 0) {
  911. markersMap.click = 'showEventDialog'
  912. markersMap.icon = 'sj-icon-map-cuiban'
  913. } else if (res.data[i].eventStatusValue == 'forest_event_status_2') {
  914. markersMap.click = 'showEventDialog'
  915. markersMap.icon = 'sj-icon-map-qianshou'
  916. markersMap.isAggregation = false
  917. } else if (res.data[i].eventStatusValue == 'forest_event_status_5') {
  918. markersMap.click = 'showEventDialog'
  919. markersMap.icon = 'sj-icon-map-banjie'
  920. markersMap.isAggregation = false
  921. } else if (res.data[i].eventStatusValue == 'forest_event_status_6') {
  922. markersMap.click = 'showEventDialog'
  923. markersMap.icon = 'sj-icon-map-guidang'
  924. } else if (res.data[i].eventStatusValue == 'forest_event_status_7') {
  925. markersMap.click = 'showEventDialog'
  926. markersMap.icon = 'sj-icon-map-queren'
  927. }
  928. markersMap.parameter = res.data[i].eventCode
  929. markersMap.lng = res.data[i].longitude
  930. markersMap.lat = res.data[i].latitude
  931. markersMap.bindPopupHtml = '<div class="map-tip">' +
  932. '<span>' +
  933. ' <div class="d-l-con">' +
  934. ' <div class="d-l-l-text">' +
  935. ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i].latitude + '</h4>' +
  936. ' </div>' +
  937. ' </div>' +
  938. ' </span>' +
  939. '<span>' +
  940. ' <div class="d-l-con">' +
  941. ' <div class="d-l-l-text">' +
  942. ' <h4>事件名称:' + res.data[i].eventName + '</h4>' +
  943. ' </div>' +
  944. ' </div>' +
  945. ' </span>' +
  946. '<span>' +
  947. ' <div class="d-l-con">' +
  948. ' <div class="d-l-l-text">' +
  949. ' <h4>事件时间:' + res.data[i].createTime + '</h4>' +
  950. ' </div>' +
  951. ' </div>' +
  952. ' </span>';
  953. if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i].picturePath != '') {
  954. markersMap.bindPopupHtml += '<span>' +
  955. ' <div class="d-l-con">' +
  956. ' <div class="d-l-l-text">' +
  957. '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
  958. ' </div>' +
  959. ' </div>' +
  960. ' </span>'
  961. }
  962. markersMap.bindPopupHtml += '</div>'
  963. that.markersList.push(markersMap)
  964. }
  965. setTimeout(() => {
  966. that.$refs.supermap.clearM()
  967. that.$refs.supermap.setMarkers(that.markersList)
  968. }, 3000)
  969. } else {
  970. setTimeout(() => {
  971. that.$refs.supermap.clearM()
  972. }, 3000)
  973. }
  974. })
  975. },
  976. getEventList(day, pageSize, pageNum, eventSearch, loading) {
  977. if (pageNum < 1) {
  978. this.$modal.msg('当前已是第一页')
  979. return;
  980. }
  981. this.pageSize = pageSize;
  982. this.pageNum = pageNum;
  983. let that = this
  984. //右侧获取事件列表
  985. getEventList({eventTypeIdDl: that.eventTypeIdDl,eventTypeId: that.eventTypeId, day: day, pageSize: pageSize, pageNum: pageNum, eventName: eventSearch}, loading).then(res => {
  986. this.eventList = []
  987. this.eventList = res.data
  988. if (this.eventList != null && this.eventList.length > 0) {
  989. if (this.eventList[0].eventStatusValue == 'forest_event_status_1') {
  990. that.$refs.bottomMenu.updateAlert();
  991. that.$refs.up.play();
  992. } else {
  993. that.$refs.bottomMenu.updateAlertFalse();
  994. }
  995. }
  996. })
  997. },
  998. getEventByEventType(day, loading) {
  999. let that = this
  1000. //右侧获取事件分类
  1001. getEventByEventType({eventTypeIdDl: that.eventTypeIdDl,eventTypeId: that.eventTypeId, day: day}, loading).then(res => {
  1002. if (res.data != null && res.data.length > 0) {
  1003. this.showEventKind = true
  1004. this.eventKind.data = res.data
  1005. this.eventKind.colors = ['#1ce0a9', '#d6333b', '#e68d3f', '#32c5e9', '#2abc65']
  1006. this.eventKind.showValue = true
  1007. this.eventKind = {...this.eventKind}
  1008. } else {
  1009. this.showEventKind = false
  1010. this.eventKind = {}
  1011. this.eventKind = {...this.eventKind}
  1012. }
  1013. })
  1014. },
  1015. getEventByReportorOrder(day, loading) {
  1016. let that = this
  1017. //右侧获取上报排名
  1018. getEventByReportorOrder({eventTypeIdDl: that.eventTypeIdDl,eventTypeId: that.eventTypeId,day: day}, loading).then(res => {
  1019. if (res.data != null && res.data.length > 0) {
  1020. this.reportList.data = res.data
  1021. this.reportList = {...this.reportList}
  1022. } else {
  1023. this.reportList.data = []
  1024. this.reportList = {...this.reportList}
  1025. }
  1026. })
  1027. },
  1028. getEventListNew() {
  1029. this.eventList = []
  1030. this.eventListAll = []
  1031. //右侧获取事件列表
  1032. getEventList({day: this.getCurrentDataStr()}).then(res => {
  1033. this.eventList = res.data
  1034. this.eventListAll = res.data
  1035. })
  1036. },
  1037. getWebSocketEvent(data) {
  1038. let that = this
  1039. const event = data
  1040. //右侧获取事件列表
  1041. that.markersList = []
  1042. let markersMap = {
  1043. lng: 124.59,
  1044. lat: 43.02,
  1045. icon: 'marker',
  1046. bindPopupHtml: '',
  1047. click: '',
  1048. parameter: '',
  1049. keepBindPopup: false,
  1050. isAggregation: false
  1051. }
  1052. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount == 0) {
  1053. markersMap.click = 'showEventDialog'
  1054. markersMap.icon = 'sj-icon-map-xinshangbao'
  1055. }
  1056. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount > 0) {
  1057. markersMap.click = 'showEventDialog'
  1058. markersMap.icon = 'sj-icon-map-cuiban'
  1059. } else if (event.eventStatusValue == 'forest_event_status_2') {
  1060. markersMap.click = 'showEventDialog'
  1061. markersMap.icon = 'sj-icon-map-qianshou'
  1062. markersMap.isAggregation = false
  1063. } else if (event.eventStatusValue == 'forest_event_status_5') {
  1064. markersMap.click = 'showEventDialog'
  1065. markersMap.icon = 'sj-icon-map-banjie'
  1066. markersMap.isAggregation = false
  1067. } else if (event.eventStatusValue == 'forest_event_status_6') {
  1068. markersMap.click = 'showEventDialog'
  1069. markersMap.icon = 'sj-icon-map-guidang'
  1070. } else if (event.eventStatusValue == 'forest_event_status_7') {
  1071. markersMap.click = 'showEventDialog'
  1072. markersMap.icon = 'sj-icon-map-queren'
  1073. }
  1074. markersMap.parameter = event.eventCode
  1075. markersMap.lng = event.longitude
  1076. markersMap.lat = event.latitude
  1077. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1078. '<span>' +
  1079. ' <div class="d-l-con">' +
  1080. ' <div class="d-l-l-text">' +
  1081. ' <h4>经纬度:' + event.longitude + ',' + event.latitude + '</h4>' +
  1082. ' </div>' +
  1083. ' </div>' +
  1084. ' </span>' +
  1085. '<span>' +
  1086. ' <div class="d-l-con">' +
  1087. ' <div class="d-l-l-text">' +
  1088. ' <h4>事件名称:' + event.eventName + '</h4>' +
  1089. ' </div>' +
  1090. ' </div>' +
  1091. ' </span>' +
  1092. '<span>' +
  1093. ' <div class="d-l-con">' +
  1094. ' <div class="d-l-l-text">' +
  1095. ' <h4>事件时间:' + event.createTime + '</h4>' +
  1096. ' </div>' +
  1097. ' </div>' +
  1098. ' </span>';
  1099. if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
  1100. markersMap.bindPopupHtml += '<span>' +
  1101. ' <div class="d-l-con">' +
  1102. ' <div class="d-l-l-text">' +
  1103. '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
  1104. ' </div>' +
  1105. ' </div>' +
  1106. ' </span>'
  1107. }
  1108. markersMap.bindPopupHtml += '</div>'
  1109. that.markersList.push(markersMap)
  1110. setTimeout(() => {
  1111. that.$refs.supermap.clearM()
  1112. that.$refs.supermap.setMarkers(that.markersList)
  1113. }, 3000)
  1114. },
  1115. getExposureStage(day, loading) {
  1116. let that = this
  1117. //右侧获取曝光台
  1118. getExposureStage({eventTypeIdDl: that.eventTypeIdDl,eventTypeId: that.eventTypeId,day: day}, loading).then(res => {
  1119. this.exposureStageList = res.data
  1120. })
  1121. },
  1122. /** ----------------------------------weosocket开始------------------------------------- */
  1123. initWebSocket(userId, eventTypeDl, eventType) { //初始化weosocket
  1124. selectConfigKey('KSH_SOCKET').then(res => {
  1125. const wsuri = res.data + userId + '/' + eventTypeDl + '/' + eventType
  1126. this.websock = new WebSocket(wsuri)
  1127. console.log('建立websocket连接')
  1128. this.websock.onopen = this.websocketonopen
  1129. this.websock.onmessage = this.websocketonmessage
  1130. this.websock.onerror = this.websocketonerror
  1131. })
  1132. },
  1133. websocketonopen() { //连接建立之后执行send方法发送数据
  1134. console.log('websocket连接成功')
  1135. this.weosocket = true
  1136. this.sendPing()
  1137. },
  1138. websocketonerror() { //连接建立失败重连
  1139. this.initWebSocket(this.websockSid.userId, this.websockSid.eventTypeDl, this.websockSid.eventType,)
  1140. },
  1141. websocketonmessage(e) { //数据接收
  1142. console.log('接收数据', e.data)
  1143. // let data = "{\"fromId\":\"forest\",\"fromUserId\":\""+Cookies.get('username')+"\",\"toUserId\":\""+Cookies.get('username')+"\"}";
  1144. let data = "{\"fromId\":\"environment\"}";
  1145. if (this.calendarDay == this.getCurrentDataStr() && data != e.data) {
  1146. // 处理收到的消息
  1147. this.handleWebSoceketEvent(e.data)
  1148. this.getTodayEvents(this.getCurrentDataStr(), true);
  1149. this.getDeptEventCount(this.getCurrentDataStr(), true);
  1150. this.getEventByEventType(this.getCurrentDataStr(), true);
  1151. this.getEventByReportorOrder(this.getCurrentDataStr(), true);
  1152. this.getExposureStage(this.getCurrentDataStr(), true);
  1153. this.$refs.bottomMenu.updateAlert();
  1154. this.$refs.up.play();
  1155. // thes.$refs.up.pause();//停止播放音乐
  1156. }
  1157. },
  1158. // 处理WebSocket事件
  1159. handleWebSoceketEvent(val) {
  1160. let that = this
  1161. let data = JSON.parse(val)
  1162. /**
  1163. * that.markersList.filter( item => data.eventCode == item.parameter).length == 0 如果地图中不存在当前事件则添加
  1164. * eventPush: 事件列表消息
  1165. * */
  1166. if (data.tag == "eventPush" && that.markersList.filter( item => data.eventCode == item.parameter).length == 0) {
  1167. getEventPush({eventCode: data.eventCode}).then((res) => {
  1168. if (res.data != undefined) {
  1169. //插入到第一条
  1170. this.eventList.unshift(res.data)
  1171. // 插入后删除最后一条 保证列表中为10条数据
  1172. if (this.eventList.length > 9)
  1173. this.eventList.splice(10, 1)
  1174. // 将收到的数据在地图上添加
  1175. this.getWebSocketEvent(res.data)
  1176. }
  1177. })
  1178. }
  1179. console.log(that.eventList[0])
  1180. },
  1181. websocketsend(Data) { //数据发送
  1182. this.websock.send(Data)
  1183. },
  1184. websocketclose(e) { //关闭
  1185. console.log('断开连接', e)
  1186. // clearInterval(this.setIntervalWesocketPush)
  1187. this.weosocket = false
  1188. },
  1189. /**发送心跳
  1190. * @param {number} time 心跳间隔毫秒 默认5000
  1191. * @param {string} ping 心跳名称 默认字符串ping
  1192. */
  1193. sendPing(time = 60000, ping = {
  1194. 'fromId': 'environment'
  1195. }) {
  1196. clearInterval(this.setIntervalWesocketPush)
  1197. this.setIntervalWesocketPush = setInterval(() => {
  1198. if (this.weosocket) {
  1199. this.websock.send(JSON.stringify(ping))
  1200. } else {
  1201. // this.initWebSocket()
  1202. }
  1203. }, time)
  1204. },
  1205. stopAudio() {
  1206. this.$refs.up.pause(); //停止播放音乐
  1207. this.$refs.up.currentTime = 0;
  1208. },
  1209. /** ----------------------------------weosocket结束------------------------------------- */
  1210. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  1211. bottomMenuList() {
  1212. this.$refs.bottomMenu.selectTaskList()
  1213. this.$refs.bottomMenu.selectMessageList()
  1214. },
  1215. showDialog(click) {
  1216. if (click == 'eventLocation') {
  1217. this.$refs.eventLocation.showEventLocation()
  1218. this.$refs.supermap.isEditableLayers = false
  1219. this.$refs.bottomMenu.showChild = false
  1220. this.$refs.bottomMenu.showBanChild = false
  1221. this.$refs.bottomMenu.showChangChild = false
  1222. } else if (click == 'editableLayers') {
  1223. this.$refs.bottomMenu.showChild = false
  1224. this.$refs.bottomMenu.showBanChild = false
  1225. this.$refs.bottomMenu.showChangChild = false
  1226. if (!this.$refs.supermap.isEditableLayers) {
  1227. this.$refs.supermap.isEditableLayers = true
  1228. } else {
  1229. this.$refs.supermap.isEditableLayers = false
  1230. }
  1231. } else if (click == 'layerSwitching') {
  1232. this.$refs.supermap.isEditableLayers = false
  1233. this.$refs.bottomMenu.showBanChild = false
  1234. this.$refs.bottomMenu.showChangChild = false
  1235. if (!this.$refs.bottomMenu.showChild) {
  1236. this.$refs.bottomMenu.showChild = true
  1237. } else {
  1238. this.$refs.bottomMenu.showChild = false
  1239. }
  1240. } else if (click == 'TVWall') {
  1241. this.$refs.TVWall.showTVWall()
  1242. this.$refs.supermap.isEditableLayers = false
  1243. this.$refs.bottomMenu.showChild = false
  1244. this.$refs.bottomMenu.showBanChild = false
  1245. this.$refs.bottomMenu.showChangChild = false
  1246. } else if (click == 'forestban') {
  1247. this.$refs.supermap.isEditableLayers = false
  1248. this.$refs.bottomMenu.showChild = false
  1249. this.$refs.bottomMenu.showChangChild = false
  1250. if (!this.$refs.bottomMenu.showBanChild) {
  1251. this.$refs.bottomMenu.showBanChild = true
  1252. } else {
  1253. this.$refs.bottomMenu.showBanChild = false
  1254. }
  1255. } else if (click == 'forestchang') {
  1256. this.$refs.supermap.isEditableLayers = false
  1257. this.$refs.bottomMenu.showBanChild = false
  1258. this.$refs.bottomMenu.showChild = false
  1259. if (!this.$refs.bottomMenu.showChangChild) {
  1260. this.$refs.bottomMenu.showChangChild = true
  1261. } else {
  1262. this.$refs.bottomMenu.showChangChild = false
  1263. }
  1264. }
  1265. },
  1266. //选择图层
  1267. choseLayerSwitching(url, isClear) {
  1268. this.$refs.supermap.layerSwitching(url, isClear)
  1269. },
  1270. //选择图层(传递数组)
  1271. choseLayerSwitchingList(urlList) {
  1272. this.$refs.supermap.layerSwitchingList(urlList)
  1273. },
  1274. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  1275. }
  1276. }
  1277. </script>
  1278. <style rel="stylesheet/scss" lang="scss" scoped>
  1279. @import '@/assets/styles/base.scss';
  1280. .paging {
  1281. padding: .5rem .3rem;
  1282. display: flex;
  1283. justify-content: center;
  1284. align-content: center;
  1285. span {
  1286. color: #2bacf7;
  1287. display: flex;
  1288. align-items: center;
  1289. padding: 0 1rem;
  1290. }
  1291. button {
  1292. padding: 0 0.3rem;
  1293. height: 1.5rem;
  1294. background-color: #112543;
  1295. color: #2bacf7;
  1296. border: 1px solid #33467f;
  1297. }
  1298. button:hover {
  1299. padding: 0 0.3rem;
  1300. height: 1.5rem;
  1301. background-color: #112543;
  1302. color: #0ff7c5;
  1303. border: 1px solid #1d657f;
  1304. }
  1305. }
  1306. </style>