water.vue 54 KB

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