forest.vue 60 KB

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