forest.vue 59 KB

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