forest.vue 59 KB

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