forest.vue 63 KB

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