forest.vue 80 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986
  1. <!--可视化公共模板 林业-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div class="leftbar" ref="left">
  10. <!-- 1 通知公告 -->
  11. <div class="forthis">
  12. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  13. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  14. <div class="this-title">
  15. <span>通知公告</span>
  16. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  17. </div>
  18. <div class="i-list-con h-14">
  19. <div class="d-l-con no_hover">
  20. <div class="d-l-l-text w-100p no-weight">
  21. <h4 class="line-h-1 w-100p" v-html="noticeContent">{{ noticeContent }}</h4>
  22. </div>
  23. </div>
  24. </div>
  25. </dv-border-box-13>
  26. </div>
  27. <!-- 2 事件统计-->
  28. <div class="forthis">
  29. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  30. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  31. <div class="i-list-con h-29-5">
  32. <div class="d-l-con no_hover">
  33. <div class="event-count">
  34. <div class="count-number">{{ totalStr.charAt(0) }}</div>
  35. <div class="count-number">{{ totalStr.charAt(1) }}</div>
  36. <div class="count-number">{{ totalStr.charAt(2) }}</div>
  37. <div class="count-number">{{ totalStr.charAt(3) }}</div>
  38. <div class="count-number">{{ totalStr.charAt(4) }}</div>
  39. <div class="count-number">{{ totalStr.charAt(5) }}</div>
  40. <dv-decoration-5 style="width:81%;height:15px;position: absolute; top:4.2rem;z-index: 0; " />
  41. </div>
  42. </div>
  43. <div class="d-l-con-icon no_hover">
  44. <div class="icon-con w-33 flex-d t-a-center">
  45. <dv-decoration-9
  46. style="width: 5.5rem;height: 5.5rem; color:#16e29e;font-size: 1rem;font-weight: bolder;">
  47. {{ newReport_pre }}%
  48. </dv-decoration-9>
  49. <div class="e-state"
  50. :style="{ 'background-image': `url(${require('@/assets/images/integrated/state-bg.png')})` }">
  51. <span>新上报</span> <span>{{ newReport }}</span>
  52. </div>
  53. </div>
  54. <div class="icon-con w-33 flex-d t-a-center">
  55. <dv-decoration-9
  56. style="width: 5.5rem;height: 5.5rem; color:#f18425;font-size: 1rem;font-weight: bolder;">
  57. {{ readySure_pre }}%
  58. </dv-decoration-9>
  59. <div class="e-state"
  60. :style="{ 'background-image': `url(${require('@/assets/images/integrated/state-bg.png')})` }">
  61. <span>处理中</span> <span>{{ readySure }}</span>
  62. </div>
  63. </div>
  64. <div class="icon-con w-33 flex-d t-a-center">
  65. <dv-decoration-9
  66. style="width: 5.5rem;height: 5.5rem; color:#9179f1;font-size: 1rem;font-weight: bolder;">
  67. {{ readyFinish_pre }}%
  68. </dv-decoration-9>
  69. <div class="e-state"
  70. :style="{ 'background-image': `url(${require('@/assets/images/integrated/state-bg.png')})` }">
  71. <span>已完成</span> <span>{{ readyFinish }}</span>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="d-l-con no_hover">
  76. <div id="chart-event-ai" style="width: 100%;height:6vh;"></div>
  77. </div>
  78. </div>
  79. </dv-border-box-13>
  80. </div>
  81. <!-- 3 组织机构 -->
  82. <div class="forthis">
  83. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  84. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  85. <div class="i-list-con h-27" style="padding-left: 1rem;">
  86. <div class="d-l-con-icon">
  87. <div class="icon-con" :class="{on:iconCurrentIndex==item.type}"
  88. v-for="(item,index) in resourcesList" v-on:click="fireControlViewPoint(item.type, '')">
  89. <!--v-on:click="selectResourcesByLabel(item.label)">-->
  90. <!--v-on:click="indentleftSetMarkers(item.resourceTable)">-->
  91. <div class="iconfont icon icon-normal" :class="item.icon" :style="'background:' + item.bg"></div>
  92. <div class="icon-text">
  93. <h6>{{ item.num }}</h6>
  94. <!--<h6>{{ item.count }}</h6>-->
  95. <h5>{{ item.name }}</h5>
  96. <!--<h5>{{ item.resourceName }}</h5>-->
  97. </div>
  98. </div>
  99. </div>
  100. <!-- <el-collapse accordion>
  101. <el-collapse-item v-for="(item, index) in forestFarm" :key="index">
  102. <template slot="title">
  103. <div class="d-l-con sj-collapse" :class="{ on: listCurrentIndex1 == item.deptId }"
  104. v-on:click="selectCameraByDeptId(item.deptId)">
  105. <div class="d-l-l-text">
  106. <h4 class="collapse-title">{{ item.deptName }}</h4>
  107. </div>
  108. <div class="d-l-l-count">{{ item.eventCount }}</div>
  109. </div>
  110. </template>
  111. </el-collapse-item>
  112. </el-collapse> -->
  113. </div>
  114. </dv-border-box-13>
  115. </div>
  116. </div>
  117. <!-- 地图 -->
  118. <supermap ref="supermap" style="width: 100%;height: 100vh;" @showEventDialog="showEventDialog" :showLayer="true"
  119. @fatherMethod="fatherMethod" @sewageOutletClick="sewageOutletClick"></supermap>
  120. <!-- 右侧 -->
  121. <div class="rightbar rightbar-index" ref="right">
  122. <div class="right-item1">
  123. <!-- 天气 -->
  124. <div class="forthis">
  125. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)">
  126. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  127. <div class="i-list-con small-bottom-margin h-18">
  128. <el-row :gutter="20" v-if="todatWeather">
  129. <el-col :span="9">
  130. <div class="weather-img">
  131. <img v-if="weatherinformationWeather == 1" src="../assets/images/integrated/weather/qing-1.png">
  132. <img v-if="weatherinformationWeather == 2" src="../assets/images/integrated/weather/duoyun-2.png">
  133. <img v-if="weatherinformationWeather == 3" src="../assets/images/integrated/weather/yin-3.png">
  134. <img v-if="weatherinformationWeather == 4" src="../assets/images/integrated/weather/zhenyu-4.png">
  135. <img v-if="weatherinformationWeather == 5"
  136. src="../assets/images/integrated/weather/leizhenyu-5.png">
  137. <img v-if="weatherinformationWeather == 6"
  138. src="../assets/images/integrated/weather/leizhenyubingbao-6.png">
  139. <img v-if="weatherinformationWeather == 7"
  140. src="../assets/images/integrated/weather/yujiaxue-7.png">
  141. <img v-if="weatherinformationWeather == 8" src="../assets/images/integrated/weather/xiaoyu-8.png">
  142. <img v-if="weatherinformationWeather == 9 || weatherinformationWeather == 22"
  143. src="../assets/images/integrated/weather/zhongyu-9.png">
  144. <img v-if="weatherinformationWeather == 10 || weatherinformationWeather == 23"
  145. src="../assets/images/integrated/weather/dayu-10.png">
  146. <img v-if="weatherinformationWeather == 11 || weatherinformationWeather == 24"
  147. src="../assets/images/integrated/weather/baoyu-11.png">
  148. <img v-if="weatherinformationWeather == 12 || weatherinformationWeather == 25"
  149. src="../assets/images/integrated/weather/dabaoyu-12.png">
  150. <img v-if="weatherinformationWeather == 13 || weatherinformationWeather == 26"
  151. src="../assets/images/integrated/weather/tedabaoyu-13.png">
  152. <img v-if="weatherinformationWeather == 14"
  153. src="../assets/images/integrated/weather/zhenxue-14.png">
  154. <img v-if="weatherinformationWeather == 15"
  155. src="../assets/images/integrated/weather/xiaoxue-15.png">
  156. <img v-if="weatherinformationWeather == 16 || weatherinformationWeather == 27"
  157. src="../assets/images/integrated/weather/zhongxue-16.png">
  158. <img v-if="weatherinformationWeather == 17 || weatherinformationWeather == 28"
  159. src="../assets/images/integrated/weather/daxue-17.png">
  160. <img v-if="weatherinformationWeather == 18 || weatherinformationWeather == 29"
  161. src="../assets/images/integrated/weather/baoxue-18.png">
  162. <img v-if="weatherinformationWeather == 19" src="../assets/images/integrated/weather/wu-19.png">
  163. <img v-if="weatherinformationWeather == 20"
  164. src="../assets/images/integrated/weather/dongyu-20.png">
  165. <img v-if="weatherinformationWeather == 21"
  166. src="../assets/images/integrated/weather/shachenbao-21.png">
  167. <img v-if="weatherinformationWeather == 30"
  168. src="../assets/images/integrated/weather/fuchen-30.png">
  169. <img v-if="weatherinformationWeather == 31"
  170. src="../assets/images/integrated/weather/yangsha-31.png">
  171. <img v-if="weatherinformationWeather == 32"
  172. src="../assets/images/integrated/weather/qiangshachenbao-32.png">
  173. <span v-if="weatherinformationWeather == 1">晴</span>
  174. <span v-if="weatherinformationWeather == 2">多云</span>
  175. <span v-if="weatherinformationWeather == 3">阴</span>
  176. <span v-if="weatherinformationWeather == 4">阵雨</span>
  177. <span v-if="weatherinformationWeather == 5">雷阵雨</span>
  178. <span v-if="weatherinformationWeather == 6">雷阵雨伴有冰雹</span>
  179. <span v-if="weatherinformationWeather == 7">雨夹雪</span>
  180. <span v-if="weatherinformationWeather == 8">小雨</span>
  181. <span v-if="weatherinformationWeather == 9">中雨</span>
  182. <span v-if="weatherinformationWeather == 10">大雨</span>
  183. <span v-if="weatherinformationWeather == 11">暴雨</span>
  184. <span v-if="weatherinformationWeather == 12">大暴雨</span>
  185. <span v-if="weatherinformationWeather == 13">特大暴雨</span>
  186. <span v-if="weatherinformationWeather == 14">阵雪</span>
  187. <span v-if="weatherinformationWeather == 15">小雪</span>
  188. <span v-if="weatherinformationWeather == 16">中雪</span>
  189. <span v-if="weatherinformationWeather == 17">大雪</span>
  190. <span v-if="weatherinformationWeather == 18">暴雪</span>
  191. <span v-if="weatherinformationWeather == 19">雾</span>
  192. <span v-if="weatherinformationWeather == 20">冻雨</span>
  193. <span v-if="weatherinformationWeather == 21">沙尘暴</span>
  194. <span v-if="weatherinformationWeather == 22">小雨—中雨</span>
  195. <span v-if="weatherinformationWeather == 23">中雨—大雨</span>
  196. <span v-if="weatherinformationWeather == 24">大雨—暴雨</span>
  197. <span v-if="weatherinformationWeather == 25">暴雨—大暴雨</span>
  198. <span v-if="weatherinformationWeather == 26">大暴雨—特大暴雨</span>
  199. <span v-if="weatherinformationWeather == 27">小雪—中雪</span>
  200. <span v-if="weatherinformationWeather == 28">中雪—大雪</span>
  201. <span v-if="weatherinformationWeather == 29">大雪—暴雪</span>
  202. <span v-if="weatherinformationWeather == 30">浮尘</span>
  203. <span v-if="weatherinformationWeather == 31">扬沙</span>
  204. <span v-if="weatherinformationWeather == 32">强沙尘暴</span>
  205. </div>
  206. </el-col>
  207. <el-col :span="15">
  208. <div class="weather-info">
  209. <ul>
  210. <li>风力:{{ weatherinformationPower }}级</li>
  211. <li>低温:{{ weatherinformationLow }}℃</li>
  212. <li v-if="weatherinformationDirection == 1">风向:东风</li>
  213. <li v-if="weatherinformationDirection == 2">风向:东南风</li>
  214. <li v-if="weatherinformationDirection == 3">风向:南风</li>
  215. <li v-if="weatherinformationDirection == 4">风向:西南风</li>
  216. <li v-if="weatherinformationDirection == 5">风向:西风</li>
  217. <li v-if="weatherinformationDirection == 6">风向:西北风</li>
  218. <li v-if="weatherinformationDirection == 7">风向:北风</li>
  219. <li v-if="weatherinformationDirection == 8">风向:东北风</li>
  220. <li>高温:{{ weatherinformationHigh }}℃</li>
  221. <li>火险:{{ weatherinformationLevelValue }}
  222. </li>
  223. <li>湿度:{{ weatherinformationTemperature }}</li>
  224. </ul>
  225. </div>
  226. </el-col>
  227. </el-row>
  228. <el-row :gutter="20" v-else>
  229. <el-col :span="24">
  230. <div class="weather-img">
  231. 暂无天气信息!
  232. </div>
  233. </el-col>
  234. </el-row>
  235. <div class="firestate" v-if="todatWeather">
  236. <div
  237. :class="weatherinformationLevel == 'forest_weatherinformation_level_1' ? 'state-block1 state-on' : 'state-block1'">
  238. </div>
  239. <div
  240. :class="weatherinformationLevel == 'forest_weatherinformation_level_2' ? 'state-block2 state-on' : 'state-block2'">
  241. </div>
  242. <div
  243. :class="weatherinformationLevel == 'forest_weatherinformation_level_3' ? 'state-block3 state-on' : 'state-block3'">
  244. </div>
  245. <div
  246. :class="weatherinformationLevel == 'forest_weatherinformation_level_4' ? 'state-block4 state-on' : 'state-block4'">
  247. </div>
  248. <div
  249. :class="weatherinformationLevel == 'forest_weatherinformation_level_5' ? 'state-block5 state-on' : 'state-block5'">
  250. </div>
  251. </div>
  252. </div>
  253. </dv-border-box-13>
  254. </div>
  255. <!-- 曝光台 -->
  256. <div class="forthis">
  257. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  258. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  259. <div class="this-title">
  260. <span>超期事件</span>
  261. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  262. </div>
  263. <div class="i-list-con small-bottom-margin h-18">
  264. <div class="d-l-con padding-box nowrap" v-for="(item, index) in exposureStageList">
  265. <div class="bgt-state">
  266. <div class="bgt-state-frequency">{{ item.urgeCount }}</div>
  267. <div class="bgt-state-minute">{{ item.timeDiff }}分钟</div>
  268. </div>
  269. <div class="bgt-info">
  270. <div class="bgt-info-name">{{ item.eventName }}</div>
  271. <div class="bgt-info-place">
  272. <ul>
  273. <li>{{ item.deptNames }}</li>
  274. </ul>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. </dv-border-box-13>
  280. </div>
  281. <!-- 事件列表 -->
  282. <div class="forthis">
  283. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  284. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  285. <div class="this-title">
  286. <span>事件列表</span>
  287. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  288. </div>
  289. <div class="sj-search">
  290. <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="eventSearch"
  291. @change="getEventList(calendarDay, 10, 1, eventSearch)">
  292. </el-input>
  293. </div>
  294. <div class="i-list-con small-bottom-margin" style="height: 24vh;">
  295. <div class="d-l-con padding-box nowrap" v-for="(item, index) in eventList"
  296. @click="dropLocation(item.latitude, item.longitude,item.eventCode)" data-html2canvas-ignore>
  297. <div class="bgt-img">
  298. <img v-if="item.picturePath != null && item.picturePath != '' && item.pictureType == 'image'"
  299. :src="item.picturePath" style="width: 93px;height: 64px" loading="lazy" @error="showDefaultImg"/>
  300. <img v-else src="../assets/images/integrated/event-img-sub.png" style="width: 93px;height: 64px" />
  301. </div>
  302. <div class="bgt-info">
  303. <div v-if="item.eventStatusValue == 'forest_event_status_1' && item.urgeCount == 0"
  304. class="event-state-sb">
  305. <i class="el-icon-caret-left"></i>
  306. <div class="event-list-state-sb">
  307. 新上报
  308. </div>
  309. </div>
  310. <div v-if="item.eventStatusValue == 'forest_event_status_1' && item.urgeCount > 0"
  311. class="event-state-cb">
  312. <i class="el-icon-caret-left"></i>
  313. <div class="event-list-state-cb">
  314. 催办
  315. </div>
  316. </div>
  317. <div v-if="item.eventStatusValue == 'forest_event_status_2'" class="event-state-qs">
  318. <i class="el-icon-caret-left"></i>
  319. <div class="event-list-state-qs">
  320. 签收
  321. </div>
  322. </div>
  323. <div v-if="item.eventStatusValue == 'forest_event_status_3'" class="event-state-wb">
  324. <i class="el-icon-caret-left"></i>
  325. <div class="event-list-state-wb">
  326. 误报
  327. </div>
  328. </div>
  329. <div v-if="item.eventStatusValue == 'forest_event_status_4'" class="event-state-cf">
  330. <i class="el-icon-caret-left"></i>
  331. <div class="event-list-state-cf">
  332. 重复
  333. </div>
  334. </div>
  335. <div v-if="item.eventStatusValue == 'forest_event_status_5'" class="event-state-bj">
  336. <i class="el-icon-caret-left"></i>
  337. <div class="event-list-state-bj">
  338. 办结
  339. </div>
  340. </div>
  341. <div v-if="item.eventStatusValue == 'forest_event_status_6'" class="event-state-gd">
  342. <i class="el-icon-caret-left"></i>
  343. <div class="event-list-state-gd">
  344. 归档
  345. </div>
  346. </div>
  347. <div v-if="item.eventStatusValue == 'forest_event_status_7'" class="event-state-qr">
  348. <i class="el-icon-caret-left"></i>
  349. <div class="event-list-state-qr">
  350. 确认
  351. </div>
  352. </div>
  353. <div class="bgt-info-name">{{ item.reportor }} {{ item.eventName }}</div>
  354. <div class="bgt-info-place">
  355. <ul>
  356. <li>{{ item.createTime }}</li>
  357. </ul>
  358. </div>
  359. </div>
  360. </div>
  361. </div>
  362. <!--分页-->
  363. <div class="paging">
  364. <el-button type="button" @click="getEventList(calendarDay,10,pageNum-1,eventSearch)">上一页 </el-button>
  365. <span>第{{pageNum}}页</span>
  366. <el-button type="button" :disabled="nextbutton"
  367. @click="getEventList(calendarDay,10,pageNum+1,eventSearch)">下一页 </el-button>
  368. </div>
  369. </dv-border-box-13>
  370. </div>
  371. </div>
  372. <div class="right-item2">
  373. <!-- 日历 -->
  374. <div class="forthis">
  375. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  376. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  377. <div class="i-list-con small-bottom-margin h-30">
  378. <dateChoose @selectDay="selectDay"></dateChoose>
  379. </div>
  380. </dv-border-box-13>
  381. </div>
  382. <!-- 事件分类 -->
  383. <div class="forthis">
  384. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  385. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  386. <div class="this-title" style="cursor: pointer"
  387. @click="setEventTypeId({ eventTypeIdDl: [], eventTypeId: [] })">
  388. <span>事件分类</span>
  389. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  390. </div>
  391. <div class="i-list-con small-bottom-margin h-19">
  392. <chart v-if="showEventKind" :config="eventKind" @setEventTypeId="setEventTypeId"
  393. style="width: 90%;height: 18vh; padding:.5rem 1rem" />
  394. </div>
  395. </dv-border-box-13>
  396. </div>
  397. <!-- 上报排行 -->
  398. <div class="forthis">
  399. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  400. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
  401. <div class="this-title">
  402. <span>上报排行</span>
  403. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;" />
  404. </div>
  405. <div class="i-list-con small-bottom-margin h-19">
  406. <dv-scroll-ranking-board :config="reportList" style="width: 100%;height: 300px; padding:.5rem 1rem" />
  407. </div>
  408. </dv-border-box-13>
  409. </div>
  410. </div>
  411. </div>
  412. <vBottomMenu ref="bottomMenu" @stopAudio="stopAudio"></vBottomMenu>
  413. </div>
  414. <audio id="resource" ref="up" :src="audioSrc" controls style="display: none;"></audio>
  415. <eventdetailsdialog ref="eventdetailsdialog" :calendarDay="calendarDay" @getEventList="getEventList"
  416. @getTodayEvents="getTodayEvents" @getFirespread="getFirespread" @showEventDialog="showEventDialog" @getSupermap="getSupermap"></eventdetailsdialog>
  417. <firespread ref="firespread" :calendarDay="calendarDay" @getEventList="getEventList"
  418. @getTodayEvents="getTodayEvents" @showEventDialog="showEventDialog" @getSupermap="getSupermap" @getFirespread="getFirespread"
  419. @showDialog="showDialog"></firespread>
  420. <eventLocation ref="eventLocation"></eventLocation>
  421. <TVWall ref="TVWall"></TVWall>
  422. <TVWalls ref="TVWalls"></TVWalls>
  423. </div>
  424. </template>
  425. <script>
  426. import dateChoose from '@/views/date.vue' //日历
  427. /** ----------------------------------weosocket开始------------------------------------- */
  428. import Cookies from 'js-cookie'
  429. /** ----------------------------------weosocket结束------------------------------------- */
  430. import {
  431. getMenuEventType,
  432. getEventPush,
  433. getLatestNotice,
  434. getTodayEvents,
  435. getDeptEventCount,
  436. getWeather,
  437. getEventList,
  438. getEventByEventType,
  439. getEventByReportorOrder,
  440. getExposureStage
  441. } from '@/api/forest'
  442. import {
  443. getNearEvent
  444. } from '@/api/event'
  445. import supermap from '@/components/supermap-2.5d' //超图
  446. // import supermapNotProcessed from '@/components/supermap' //超图
  447. // import supermapProcessed from '@/components/supermap' //超图
  448. import vheader from '@/components/v-header.vue' //一体化共用头部
  449. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  450. import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
  451. import TVWall from '@/components/TVWall.vue' //电视墙弹窗
  452. import TVWalls from '@/components/TVWalls.vue' //电视墙弹窗
  453. import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
  454. import firespread from '@/views/firespread.vue' //事件详情弹窗
  455. import {
  456. getIconBg
  457. } from '@/api/components/sookaMapIcon'; //资源底色控制文件
  458. import Firespread from "./firespread";
  459. import chart from "./from/dvCapsuleChart.vue";
  460. import {
  461. getResourcesCount,
  462. selectResourcesByLabel
  463. } from "@/api/resources"
  464. import {
  465. getUserProfile
  466. } from "@/api/system/user";
  467. import {
  468. selectConfigKey
  469. } from "@/api/system/config";
  470. import { fireControlViewList, fireControlViewPoint } from '@/api/datacenter'
  471. let echarts = require('echarts')
  472. export default {
  473. components: {
  474. chart,
  475. Firespread,
  476. supermap,
  477. // supermapNotProcessed,
  478. // supermapProcessed,
  479. vheader,
  480. vBottomMenu,
  481. eventLocation,
  482. TVWall,
  483. TVWalls,
  484. dateChoose,
  485. eventdetailsdialog,
  486. firespread
  487. },
  488. created() {
  489. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  490. window.showDialog = this.showDialog
  491. window.choseLayerSwitching = this.choseLayerSwitching
  492. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  493. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  494. },
  495. metaInfo() {
  496. return {
  497. title: this.title,
  498. meta: [{
  499. charset: "utf-8"
  500. },
  501. {
  502. name: "viewport",
  503. content: "width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
  504. }
  505. ]
  506. }
  507. },
  508. mounted() {
  509. // 初始化地图数据
  510. this.getSuperMapUrl();
  511. this.getLatestNotice()
  512. setTimeout(() => {
  513. this.title = '四平市态势感知平台'
  514. }, 1000)
  515. setTimeout(() => {
  516. this.getResourcesCount();
  517. this.getTodayEvents(this.getCurrentDataStr())
  518. this.getDeptEventCount(this.getCurrentDataStr())
  519. this.getWeather(this.getCurrentDataStr())
  520. this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum)
  521. this.getEventByEventType(this.getCurrentDataStr())
  522. this.getEventByReportorOrder(this.getCurrentDataStr())
  523. this.getExposureStage(this.getCurrentDataStr())
  524. this.getSupermap(this.getCurrentDataStr())
  525. this.getMenuEventType()
  526. }, 2000)
  527. /** ----------------------------------weosocket开始------------------------------------- */
  528. // this.initWebSocket()
  529. /** ----------------------------------weosocket结束------------------------------------- */
  530. this.bottomMenuList() //获取底部公共组件消息和任务
  531. },
  532. data() {
  533. return {
  534. nextbutton: false,
  535. title: "",
  536. // 搜索框
  537. // 搜索名称
  538. searchName: undefined,
  539. // 搜索类型
  540. searchType: undefined,
  541. labelList: ['warning_sign', 'bridge', 'culvert'],
  542. //警报MP3文件
  543. audioSrc: require('@/assets/jingbao.mp3'),
  544. calendarDay: this.getCurrentDataStr(),
  545. //通知公告
  546. noticeContent: '', //通知公告
  547. //左侧获取事件信息统计
  548. totalStr: '000000',
  549. totalAllEvent: 0,
  550. aiTotal: '',
  551. newReport: '',
  552. otherTotal: '',
  553. readyFinish: '',
  554. readySure: '',
  555. resourcesList: [],
  556. total: '',
  557. aiTotal_pre: '',
  558. newReport_pre: '',
  559. eventTypeIdDl: [],
  560. eventTypeId: [],
  561. otherTotal_pre: '',
  562. readyFinish_pre: '',
  563. readySure_pre: '',
  564. //左侧部门事件数量
  565. forestFarm: [],
  566. //右侧天气
  567. todatWeather: false,
  568. weatherinformationDirection: '',
  569. weatherinformationHigh: '',
  570. weatherinformationLevel: '',
  571. weatherinformationLevelValue: '', //火险登记中文
  572. weatherinformationLow: '',
  573. weatherinformationPower: '',
  574. weatherinformationTemperature: '',
  575. weatherinformationTime: '',
  576. weatherinformationWeather: '',
  577. //右侧曝光台
  578. exposureStageList: [],
  579. //右侧事件列表
  580. eventList: [],
  581. pageSize: 10,
  582. pageNum: 1,
  583. iconCurrentIndex: '',
  584. eventListnew: [],
  585. eventListAll: [],
  586. eventSearch: '', //事件列表搜索
  587. listCurrentIndex1: '',
  588. // ----------------------------------事件分类柱状----------------------------------------
  589. eventKind: {},
  590. showEventKind: false,
  591. // ----------------------------------上报排行----------------------------------------
  592. reportList: {
  593. data: []
  594. },
  595. /** ----------------------------------weosocket开始------------------------------------- */
  596. weosocket: false,
  597. websock: '',
  598. setIntervalWesocketPush: null,
  599. websockSid: {
  600. userId: '',
  601. eventTypeDl: '',
  602. eventType: '',
  603. },
  604. /** ----------------------------------weosocket结束------------------------------------- */
  605. /** ----------------------------------摄像头预览开始------------------------------------- */
  606. activePanel: 'key1',
  607. isLogin: false,
  608. cameraParams: [],
  609. ws: null,
  610. /** ----------------------------------摄像头预览结束------------------------------------- */
  611. markersList: [], //点位列表
  612. cameraList: [] //摄像头列表
  613. }
  614. },
  615. /** ----------------------------------weosocket开始------------------------------------- */
  616. destroyed() { //离开页面关闭Socket连接
  617. if (this.websock) {
  618. clearInterval(this.setIntervalWesocketPush)
  619. this.websock.close()
  620. this.websock = null
  621. }
  622. },
  623. /** ----------------------------------weosocket结束------------------------------------- */
  624. methods: {
  625. showDefaultImg(){
  626. let img = event.srcElement;
  627. img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAABACAYAAAB4OXuGAAAE2UlEQVR4nO2b2XbaSBCGS2hhByEwCXaSizxArucJ5v1fYG5mJnbGrGIVYlHO30RYYkmM7e4Sk/7O0YVt3JL+Lv1dVS2ML3/8GZFGKTktt3q06Axo0RnQojOgRWdAi86AFp0BLToDWnQGLLmnNLJ5179EbpEuRXTDMKjV+UxG7nofpGA+ofHgm5SxpaiSy5lXLTgolKrSxpajjHGttqIGyZ6+Y+r3aLvdZOF+f0qhWCWnUJJ+HiWiLxdT2qxXKk71Kiw7Tw7JF12njAxkQnRkO6blUM5U8uCxw3qXtlOgcq1JTqG4z+m3mw0F8zHNJgOKttssaPTmsIlerLhUdW+Ofp8zTSpVG5QvVmjU+6p0LUieS+aEs9iLUyifFDyJadnktm6F9agimPm0mPm0Wi6kFUbEFemHgq9XS1EBwtOL5RoZxi4W4PN4IuaToZLriqKIJsNH6edRLjp8HFEcEwZzGvXu9/2OYDamRvvjPsKRO6sSXRXKRUf0JtkJ+tRgQtSHwUx4uvi87ZwbSsK12VRv3pJl2zQbD8QhA/WefmDR0YmOHh5z1aBXtBPcEReJrEoWykXfrNLZSKnipn5GtOWL5afPr0Ml11X3Oj8El49ye1mFC9pu1vtCCDbitu5ouZiQkTOpVGnsF1L60UKQDRZ2FT2XGJbsBQ2wmvd+/zNu+NRNY3Lm05HUaylW6iJDUglLno708FeLFLqSyGpkFimY6Krbljb+Odgq0tm4T+swoHK9Kbp7MVhEl/MJTcd9EemygH/Dx5Pg3CqKMdbeyzKYiQP+bpo2RdFWLJyH2QsWVnj9ehXSdNx7dfRjZwuZSnJ3C2sNxi+W668a+zlkoq2HiD4X1fDc2ALsfFEcfv/+xT0ZRHK92UkVaBjL7z1Qqea98A4uI9P99HLNO/Jc2AIqVoj/EqqNd6n/xVODSVS5s5VZ0SvuzdkCBfbQaN1dbAWlqne04ewPHoStqCSTote8d0dFE1oDKQsyDKo22mJyngPqgUo9PYmTUVf0flSTqa0a+G3N66QqUoB2K7p/WHDdZocsp7D/GybHshwRsecWWMvJp+oCMebUp4XkGuAcmYl00fto3R0JjoZY3G5FpA+7/4o8Pwnyba/9MbU4xuwmKt2XR3RPRvJbuOfIhOg7j/5AzsHiiMoVRxKkk9hgQJ6fBN1Lr/2JnPxTZQuhsRGS3HuFf+Op4IRddAjSaH8QFpBkPPzvp310VLR+/yGV0+NpcW9uRZpJYm14nyq8kKEgU+Hee2X1dERn4+Yu/RZAFJE/+PasRhc+M3z8h+qtWzL3YxgizURmkxRcjNt/yMT7N2yRjsUQEZ4UHBUp+i2XdBax6TF8/JtWYZAe3z5+crD3mQVYREdxgjwbXh4jGlzdrxQuL0/h8NrG6MQCGzOfDM7+jQMW0WuNdqrvgawEoh1G6yXEC+zhwounZur3XzyuDJg8/Sl9g8dC8M0bdRSx+CJDQf6+Xoc0O5iELMAiOiISLV3YwnTUffO+B6pXHFmFRXTYCPz7d0W/tcuAFp0BLToDSjwdbdVr+PqLZf2P3nup1FsqTnM1yLEXhtfirgkposNKrv1bFDLbBlLsBSV59/4v/TX1M0j2dG0zp9ApIwNadAa06Axo0RnQojOgRWdAi86AFp0BLbpqiOg74YbqU8Iw/dEAAAAASUVORK5CYII=";
  628. },
  629. //初始化地图数据
  630. getSuperMapUrl() {
  631. getUserProfile().then(response => {
  632. let mapDeptId = response.mapDeptId
  633. let num = 0;
  634. if (mapDeptId == "365") {
  635. num = 0;
  636. } else if (mapDeptId == "369") {
  637. num = 1;
  638. } else if (mapDeptId == "371") {
  639. num = 2;
  640. } else if (mapDeptId == "373") {
  641. num = 3;
  642. } else if (mapDeptId == "372") {
  643. num = 4;
  644. } else if (mapDeptId == "370") {
  645. num = 5;
  646. }
  647. this.$refs.supermap.removeAllviewer(num, -1);
  648. });
  649. },
  650. // 根据名称筛选资源点位
  651. searchByName() {
  652. this.$modal.msgSuccess("正在查询,请稍后...");
  653. this.selectResourcesByLabel(this.searchType, this.searchName);
  654. },
  655. //查询各类资源的数量
  656. getResourcesCount() {
  657. let that = this;
  658. that.resourcesList = []
  659. fireControlViewList("jiaotong").then(function (res) {
  660. for (let i = 0; i < res.data.length; i++) {
  661. if(res.data[i].type !='centerdata_t_forest_fireteam'){
  662. that.resourcesList.push(res.data[i]);
  663. }
  664. }
  665. //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
  666. that.resourcesList.forEach(function (data, index) {
  667. let icon =
  668. "sj" +
  669. "-" +
  670. "icon" +
  671. "-" +
  672. data.type.replaceAll("_", "-").replaceAll("@", "-");
  673. console.log("icon_" + (index + 1) + "=", icon);
  674. that.$set(that.resourcesList[index], "icon", icon);
  675. //每个图标对应固定颜色
  676. that.$set(that.resourcesList[index], "bg", getIconBg(icon));
  677. });
  678. console.log(that.resourcesList)
  679. that.fireControlViewPoint("jiaotong", "");
  680. });
  681. },
  682. fireControlViewPoint(resourceTable, name) {
  683. this.iconCurrentIndex = resourceTable;
  684. // 搜索框
  685. if (name == "" || name == null || name == undefined) {
  686. name = "";
  687. } else {
  688. this.showSearch = true;
  689. }
  690. console.log("name=", name);
  691. console.log("this.showSearch=", this.showSearch);
  692. if(resourceTable == this.resourceTable){
  693. resourceTable = "jiaotong"
  694. this.iconCurrentIndex = "jiaotong"
  695. }
  696. let that = this;
  697. that.resourceTable = resourceTable;
  698. that.markersList = [];
  699. that.source = [];
  700. fireControlViewPoint(resourceTable, name,"").then((res) => {
  701. let pointList = res.data.pointList;
  702. that.deptGroupList = res.data.deptList;
  703. if (res.data.deptList != null && res.data.deptList.length > 0) {
  704. for (let i = 0; i < res.data.deptList.length; i++) {
  705. let aa = [
  706. res.data.deptList[i].deptName,
  707. res.data.deptList[i].count,
  708. ];
  709. that.source.push(aa);
  710. }
  711. }
  712. if (res.data.pointList != null && res.data.pointList.length > 0) {
  713. for (let i = 0; i < res.data.pointList.length; i++) {
  714. if(res.data.pointList[i].indexName != 'centerdata_t_forest_fireteam'){
  715. let markersMap = {
  716. lng: res.data.pointList[i].longitude,
  717. lat: res.data.pointList[i].latitude,
  718. icon: "marker",
  719. bindPopupHtml: "",
  720. click: "",
  721. name: i,
  722. keepBindPopup: false,
  723. isAggregation: false,
  724. };
  725. that.markersList.push(
  726. this.getMarkersMap(
  727. resourceTable == "jiaotong" ? res.data.pointList[i].indexName:resourceTable,
  728. markersMap,
  729. res.data.pointList[i]
  730. )
  731. );
  732. }
  733. }
  734. }
  735. // if (this.showSearch == true) {
  736. // this.dataChat();
  737. // }
  738. that.$refs.supermap.clearM(false);
  739. that.$refs.supermap.setMarkers(that.markersList);
  740. });
  741. },
  742. getMarkersMap(resourceTable, markersMap, item) {
  743. let icon = "sj-icon-map-"+resourceTable.replaceAll("_", "-");
  744. console.log(icon)
  745. markersMap.lng = item.longitude;
  746. markersMap.lat = item.latitude;
  747. markersMap.click = "sewageOutletClick";
  748. markersMap.parameter = item;
  749. markersMap.icon = icon;
  750. markersMap.bindPopupHtml =
  751. '<div class="map-tip">' +
  752. "<span>" +
  753. ' <div class="d-l-con">' +
  754. ' <div class="d-l-l-text">' +
  755. " <h4>经纬度:" +
  756. (item.longitude ? item.longitude : "") +
  757. "," +
  758. (item.latitude ? item.latitude : "") +
  759. "</h4>" +
  760. " </div>" +
  761. " </div>" +
  762. " </span>" +
  763. "<span>" +
  764. ' <div class="d-l-con">' +
  765. ' <div class="d-l-l-text">' +
  766. " <h4>名称:" +
  767. (item.name ? item.name : "") +
  768. "</h4>" +
  769. " </div>" +
  770. " </div>" +
  771. " </span>" +
  772. "<span>" +
  773. ' <div class="d-l-con">' +
  774. ' <div class="d-l-l-text">' +
  775. " <h4>地址:" +
  776. (item.address ? item.address : "") +
  777. "</h4>" +
  778. " </div>" +
  779. " </div>" +
  780. " </span>" +
  781. "<span>" +
  782. ' <div class="d-l-con">' +
  783. ' <div class="d-l-l-text">' +
  784. " <h4>联系人:" +
  785. (item.contacts ? item.contacts : "") +
  786. "</h4>" +
  787. " </div>" +
  788. " </div>" +
  789. " </span>" +
  790. "<span>" +
  791. ' <div class="d-l-con">' +
  792. ' <div class="d-l-l-text">' +
  793. " <h4>联系电话:" +
  794. (item.phone ? item.phone : "") +
  795. "</h4>" +
  796. " </div>" +
  797. " </div>" +
  798. " </span></div>";
  799. let that = this
  800. getResourcesCount().then(res => {
  801. this.resourcesCountList = res.data;
  802. this.resourcesCountList.forEach(function(data, index) {
  803. let icon = 'sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-").replaceAll("@", "-");
  804. that.$set(that.resourcesCountList[index], 'icon', icon);
  805. that.$set(that.resourcesCountList[index], 'bg', getIconBg(icon));
  806. })
  807. })
  808. return markersMap;
  809. },
  810. sewageOutletClick(data) {
  811. const params = Object.assign({});
  812. params.longitude = data.longitude;
  813. params.latitude = data.latitude;
  814. const treeLabels = [{
  815. id: null,
  816. labelCode: "999",
  817. labelName: "电视墙",
  818. cameraType: null,
  819. parentLabelCode: "",
  820. }, ];
  821. const labelChannels = [];
  822. for (let i in data.cameraList) {
  823. treeLabels.push({
  824. id: null,
  825. labelCode: data.cameraList[i].cameraCode,
  826. labelName: data.cameraList[i].cameraName,
  827. cameraType: data.cameraList[i].cameraType,
  828. parentLabelCode: "999",
  829. });
  830. labelChannels.push({
  831. labelCode: data.cameraList[i].cameraCode,
  832. channelDates: [{
  833. channelCode: data.cameraList[i].cameraCode,
  834. channelName: data.cameraList[i].cameraName,
  835. channelSn: null,
  836. cameraType: data.cameraList[i].cameraType,
  837. online: "1",
  838. cameraCode: "1",
  839. }, ],
  840. });
  841. }
  842. const dianshiqiang = [{
  843. switchTab: "2",
  844. treeLabels: treeLabels,
  845. labelChannels: labelChannels,
  846. }, ];
  847. if (data.cameraList.length > 0) {
  848. this.$refs.TVWall.showTVWall1(
  849. data.longitude,
  850. data.latitude,
  851. dianshiqiang
  852. );
  853. }
  854. },
  855. //点击左侧某资源,将该资源进行落点
  856. selectResourcesByLabel(label, name) {
  857. let that = this;
  858. // 搜索框
  859. if (name == '所有') {
  860. name = undefined;
  861. } else {
  862. that.$refs.supermap.clearM();
  863. }
  864. // 搜索类型
  865. this.searchType = label;
  866. console.log(label)
  867. //每次点击,先将原有点位清空后重新落点
  868. this.markersList = [];
  869. this.resourcesList = [];
  870. selectResourcesByLabel(label, name).then(res => {
  871. console.log("res.data=", res.data)
  872. // this.resourcesList = res.data;
  873. this.resourcesList = res.data.resourceList;
  874. this.initMarkers(this.resourcesList, label.replaceAll("_", "-"));
  875. // this.initMarkers(this.resourcesList);
  876. })
  877. },
  878. initMarkers(list, type) {
  879. if (list != null && list.length > 0) {
  880. for (let i = 0; i < list.length; i++) {
  881. let markersMap = {
  882. lng: 124.59,
  883. lat: 43.02,
  884. icon: "marker",
  885. bindPopupHtml: "",
  886. click: "sewageOutletClick",
  887. parameter: list[i],
  888. keepBindPopup: false,
  889. isAggregation: false,
  890. };
  891. if (list.length > 200) {
  892. markersMap.isAggregation = true;
  893. }
  894. //根据标签确定资源的图标
  895. markersMap.icon =
  896. "traffic-resources-" +
  897. (type ?
  898. type == "sign" ?
  899. "warning_sign" :
  900. type :
  901. this.resourcesList[i].label);
  902. // markersMap.icon = 'traffic-resources-' + type;
  903. // alert(type+"=type")
  904. // alert(this.resourcesList[i].label+"=this.resourcesList[i].label")
  905. markersMap.icon = 'sj-icon-map-' + type;
  906. console.log(markersMap.icon)
  907. //markersMap.icon = 'sj-icon-map-centerdata-t-' +
  908. markersMap.parameter = this.resourcesList[i].id + "," + this.resourcesList[i].label;
  909. markersMap.parameter = this.resourcesList[i].id + "," + (type ? type : this.resourcesList[i].label);
  910. markersMap.click = '';
  911. markersMap.lng = list[i].longitude;
  912. markersMap.lat = list[i].latitude;
  913. //POP的通用部分
  914. markersMap.bindPopupHtml =
  915. '<div class="map-tip">' +
  916. "<span>" +
  917. ' <div class="d-l-con">' +
  918. ' <div class="d-l-l-text">' +
  919. " <h4>名称:" +
  920. (list[i].name ? list[i].name : "") +
  921. "</h4>" +
  922. " </div>" +
  923. " </div>" +
  924. "</span>";
  925. if (
  926. list[i].label == this.labelList[0] ||
  927. this.labelList[0].indexOf(type) != -1
  928. ) {
  929. //警示牌的POP
  930. markersMap.bindPopupHtml +=
  931. "" +
  932. "<span>" +
  933. ' <div class="d-l-con">' +
  934. ' <div class="d-l-l-text">' +
  935. " <h4>设置日期:" +
  936. ((list[i].setTime ? list[i].setTime : list[i].set_time) ?
  937. list[i].setTime ?
  938. list[i].setTime :
  939. list[i].set_time :
  940. "") +
  941. "</h4>" +
  942. " </div>" +
  943. " </div>" +
  944. "</span>" +
  945. "<span>" +
  946. ' <div class="d-l-con">' +
  947. ' <div class="d-l-l-text">' +
  948. " <h4>用途:" +
  949. (list[i].effect ? list[i].effect : "") +
  950. "</h4>" +
  951. " </div>" +
  952. " </div>" +
  953. "</span>";
  954. }
  955. if (
  956. list[i].label == this.labelList[1] ||
  957. list[i].label == this.labelList[2] ||
  958. this.labelList[1].indexOf(type) != -1 ||
  959. this.labelList[2].indexOf(type) != -1
  960. ) {
  961. //桥梁涵洞的POP
  962. markersMap.bindPopupHtml +=
  963. "" +
  964. "<span>" +
  965. ' <div class="d-l-con">' +
  966. ' <div class="d-l-l-text">' +
  967. " <h4>竣工日期:" +
  968. ((
  969. list[i].completionDate ?
  970. list[i].completionDate :
  971. list[i].completion_date
  972. ) ?
  973. list[i].completionDate ?
  974. list[i].completionDate :
  975. list[i].completion_date :
  976. "") +
  977. "</h4>" +
  978. " </div>" +
  979. " </div>" +
  980. "</span>" +
  981. "<span>" +
  982. "<span>" +
  983. ' <div class="d-l-con">' +
  984. ' <div class="d-l-l-text">' +
  985. " <h4>管理单位:" +
  986. ((
  987. list[i].managementUnit ?
  988. list[i].managementUnit :
  989. list[i].management_unit
  990. ) ?
  991. list[i].managementUnit ?
  992. list[i].managementUnit :
  993. list[i].management_unit :
  994. "") +
  995. "</h4>" +
  996. " </div>" +
  997. " </div>" +
  998. "</span>" +
  999. "<span>" +
  1000. ' <div class="d-l-con">' +
  1001. ' <div class="d-l-l-text">' +
  1002. " <h4>联系电话:" +
  1003. ((list[i].manaTel ? list[i].manaTel : list[i].mana_tel) ?
  1004. list[i].manaTel ?
  1005. list[i].manaTel :
  1006. list[i].mana_tel :
  1007. "") +
  1008. "</h4>" +
  1009. " </div>" +
  1010. " </div>" +
  1011. "</span>" +
  1012. "<span>" +
  1013. ' <div class="d-l-con">' +
  1014. ' <div class="d-l-l-text">' +
  1015. " <h4>养护单位:" +
  1016. ((
  1017. list[i].maintenanceUnit ?
  1018. list[i].maintenanceUnit :
  1019. list[i].maintenance_unit
  1020. ) ?
  1021. list[i].maintenanceUnit ?
  1022. list[i].maintenanceUnit :
  1023. list[i].maintenance_unit :
  1024. "") +
  1025. "</h4>" +
  1026. " </div>" +
  1027. " </div>" +
  1028. "</span>" +
  1029. "<span>" +
  1030. ' <div class="d-l-con">' +
  1031. ' <div class="d-l-l-text">' +
  1032. " <h4>联系电话:" +
  1033. ((list[i].mainTel ? list[i].mainTel : list[i].main_tel) ?
  1034. list[i].mainTel ?
  1035. list[i].mainTel :
  1036. list[i].main_tel :
  1037. "") +
  1038. "</h4>" +
  1039. " </div>" +
  1040. " </div>" +
  1041. "</span>";
  1042. }
  1043. if (list[i].remark != "" && list[i].remark != null) {
  1044. //POP的备注部分
  1045. markersMap.bindPopupHtml +=
  1046. "" +
  1047. "<span>" +
  1048. ' <div class="d-l-con">' +
  1049. ' <div class="d-l-l-text">' +
  1050. " <h4>备注:" +
  1051. (list[i].remark ? list[i].remark : "") +
  1052. "</h4>" +
  1053. " </div>" +
  1054. " </div>" +
  1055. "</span>";
  1056. }
  1057. markersMap.bindPopupHtml += "</div>";
  1058. this.markersList.push(markersMap);
  1059. }
  1060. setTimeout(() => {
  1061. this.$refs.supermap.clearM();
  1062. this.$refs.supermap.setMarkers(this.markersList);
  1063. }, 2000);
  1064. }
  1065. },
  1066. getMenuEventType() {
  1067. let that = this
  1068. getMenuEventType().then(res => {
  1069. that.websockSid.userId = Cookies.get('userId')
  1070. that.websockSid.eventTypeDl = res.data.eventTypeDl
  1071. that.websockSid.eventType = res.data.eventType
  1072. that.initWebSocket(that.websockSid.userId, that.websockSid.eventTypeDl, that.websockSid.eventType)
  1073. console.log(that.websockSid)
  1074. })
  1075. },
  1076. // searchEvent(pageSize,pageNum,eventSearch) {
  1077. // this.pageSize = pageSize;
  1078. // this.pageNum = pageNum;
  1079. // let that = this
  1080. // //事件列表搜索
  1081. // this.eventList = []
  1082. // //右侧获取事件列表
  1083. // getEventList({ day: that.calendarDay,pageSize:pageSize,pageNum: pageNum ,eventName:eventSearch}).then(res => {
  1084. // this.eventList = res.data
  1085. // if (this.eventList != null && this.eventList.length > 0) {
  1086. // if(this.eventList[0].eventStatusValue == 'forest_event_status_1'){
  1087. // that.$refs.bottomMenu.updateAlert();
  1088. // that.$refs.up.play();
  1089. // }
  1090. // }
  1091. // })
  1092. // },
  1093. dropLocation(lat, lng, eventCode) {
  1094. this.$refs.supermap.dropLocation(lat, lng, 18)
  1095. this.showEventDialog(eventCode)
  1096. },
  1097. showEventDialog(eventCode) {
  1098. //事件信息弹出
  1099. this.$refs.firespread.showEventDialog(eventCode)
  1100. },
  1101. getFirespread(eventCode) {
  1102. this.$refs.eventdetailsdialog.showEventDialog(eventCode);
  1103. // this.$refs.eventdetailsdialog.fireControlViewList()
  1104. },
  1105. getCurrentDataStr() {
  1106. let date = new Date()
  1107. let y = date.getFullYear()
  1108. let m = date.getMonth() + 1
  1109. m = m < 10 ? '0' + m : m
  1110. let d = date.getDate()
  1111. d = d < 10 ? '0' + d : d
  1112. return y + '-' + m + '-' + d
  1113. },
  1114. selectDay(day) { //日历点击
  1115. this.pageNum = 1
  1116. this.getTodayEvents(day)
  1117. this.getDeptEventCount(day)
  1118. this.getWeather(day)
  1119. this.getEventList(day, 10, 1)
  1120. this.getEventByEventType(day)
  1121. this.getEventByReportorOrder(day)
  1122. this.getExposureStage(day)
  1123. this.getSupermap(day);
  1124. this.calendarDay = day
  1125. },
  1126. //事件数量统计chart 样例地址http://192.144.199.210:8080/editor/index.html?chart_id=jTXf0Rv4A3oiBONB
  1127. eventChartAi(aiTotal_pre, otherTotal_pre) {
  1128. // 基于准备好的dom,初始化echarts实例
  1129. let myChart = echarts.init(document.getElementById('chart-event-ai'))
  1130. myChart.setOption({
  1131. tooltip: {
  1132. trigger: 'none'
  1133. },
  1134. grid: {
  1135. top: '65%',
  1136. left: '5%',
  1137. right: '5%'
  1138. },
  1139. yAxis: {
  1140. data: ['百分比'],
  1141. axisTick: {
  1142. show: false
  1143. },
  1144. axisLine: {
  1145. show: false
  1146. },
  1147. axisLabel: {
  1148. show: false
  1149. }
  1150. },
  1151. xAxis: {
  1152. splitLine: {
  1153. show: false
  1154. },
  1155. axisTick: {
  1156. show: false
  1157. },
  1158. axisLine: {
  1159. show: false
  1160. },
  1161. axisLabel: {
  1162. show: false
  1163. }
  1164. },
  1165. legend: {
  1166. data: ['AI', '其他'],
  1167. bottom: '5%',
  1168. textStyle: {
  1169. color: '#1FC3CE',
  1170. fontSize: 14
  1171. }
  1172. },
  1173. series: [{
  1174. // name: '最上层立体圆',
  1175. type: 'pictorialBar',
  1176. symbolSize: [10, 20],
  1177. symbolOffset: [2, 0],
  1178. z: 12,
  1179. itemStyle: {
  1180. normal: {
  1181. color: '#293CA0'
  1182. }
  1183. },
  1184. data: [{
  1185. value: 100,
  1186. symbolPosition: 'end'
  1187. }]
  1188. }, {
  1189. // name: '中间立体圆',
  1190. type: 'pictorialBar',
  1191. symbolSize: [10, 20],
  1192. symbolOffset: [2, 0],
  1193. z: 12,
  1194. itemStyle: {
  1195. normal: {
  1196. color: '#45ac8d'
  1197. }
  1198. },
  1199. data: [{
  1200. value: aiTotal_pre,
  1201. symbolPosition: 'end'
  1202. }]
  1203. }, {
  1204. // name: '最底部立体圆',
  1205. type: 'pictorialBar',
  1206. symbolSize: [10, 20],
  1207. symbolOffset: [-4, 0],
  1208. z: 12,
  1209. itemStyle: {
  1210. normal: {
  1211. color: '#196d59'
  1212. }
  1213. },
  1214. data: [otherTotal_pre]
  1215. }, {
  1216. name: 'AI',
  1217. //底部立体柱
  1218. stack: '1',
  1219. type: 'bar',
  1220. itemStyle: {
  1221. normal: {
  1222. color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
  1223. offset: 0,
  1224. color: '#29ac8f'
  1225. }, {
  1226. offset: 1,
  1227. color: '#0a3f3f'
  1228. }])
  1229. }
  1230. },
  1231. label: {
  1232. normal: {
  1233. show: true,
  1234. position: 'inside',
  1235. offset: [0, 1],
  1236. formatter: function(obj) {
  1237. return (obj.value).toLocaleString() + '%'
  1238. },
  1239. textStyle: {
  1240. align: 'center',
  1241. baseline: 'middle',
  1242. fontSize: 14,
  1243. fontWeight: '400',
  1244. color: '#fff',
  1245. textShadowColor: '#000',
  1246. textShadowBlur: '0',
  1247. textShadowOffsetX: 1,
  1248. textShadowOffsetY: 1
  1249. }
  1250. }
  1251. },
  1252. silent: true,
  1253. barWidth: 20,
  1254. barGap: '-100%', // Make series be overlap
  1255. data: [aiTotal_pre]
  1256. }, {
  1257. name: '其他',
  1258. //上部立体柱
  1259. stack: '1',
  1260. type: 'bar',
  1261. itemStyle: {
  1262. normal: {
  1263. color: '#14257B',
  1264. opacity: .7
  1265. }
  1266. },
  1267. silent: true,
  1268. barWidth: 20,
  1269. barGap: '-100%', // Make series be overlap
  1270. data: [otherTotal_pre],
  1271. // itemStyle: {
  1272. // normal: {
  1273. // color: 'rgba(29,67,243,1)',
  1274. // }
  1275. // },
  1276. label: {
  1277. normal: {
  1278. show: true,
  1279. position: 'inside',
  1280. offset: [0, 1],
  1281. formatter: function(obj) {
  1282. return (obj.value).toLocaleString() + '%'
  1283. },
  1284. textStyle: {
  1285. align: 'center',
  1286. baseline: 'middle',
  1287. fontSize: 14,
  1288. fontWeight: '400',
  1289. color: '#fff',
  1290. textShadowColor: '#000',
  1291. textShadowBlur: '0',
  1292. textShadowOffsetX: 1,
  1293. textShadowOffsetY: 1
  1294. }
  1295. }
  1296. }
  1297. }]
  1298. })
  1299. },
  1300. fatherMethod(dianshiqiang, longitude, latitude, item) {
  1301. this.$refs.TVWalls.showTVWall(
  1302. dianshiqiang, {
  1303. longitude: longitude,
  1304. latitude: latitude,
  1305. },
  1306. item
  1307. );
  1308. },
  1309. getLatestNotice() {
  1310. //左侧获取通知公告
  1311. getLatestNotice().then(res => {
  1312. if (res.code == 200) {
  1313. this.noticeContent = res.data.noticeContent //通知公告
  1314. }
  1315. })
  1316. },
  1317. getTodayEvents(day, loading) {
  1318. let that = this
  1319. //左侧获取事件信息统计
  1320. getTodayEvents({
  1321. eventTypeIdDl: that.eventTypeIdDl,
  1322. eventTypeId: that.eventTypeId,
  1323. day: day
  1324. }, loading).then(res => {
  1325. this.aiTotal = res.data.aiTotal
  1326. this.aiTotal_pre = res.data.aiTotal_pre
  1327. this.newReport = res.data.newReport
  1328. this.newReport_pre = res.data.newReport_pre
  1329. this.otherTotal = res.data.otherTotal
  1330. this.otherTotal_pre = res.data.otherTotal_pre
  1331. this.readyFinish = res.data.readyFinish
  1332. this.readyFinish_pre = res.data.readyFinish_pre
  1333. this.readySure = res.data.readySure
  1334. this.readySure_pre = res.data.readySure_pre
  1335. this.totalStr = res.data.totalStr
  1336. this.totalAllEvent = +res.data.totalStr
  1337. this.total = res.data.total
  1338. this.eventChartAi(this.aiTotal_pre, this.otherTotal_pre)
  1339. })
  1340. },
  1341. getDeptEventCount(day, loading) {
  1342. let that = this
  1343. //左侧获取事件部门数量
  1344. getDeptEventCount({
  1345. eventTypeIdDl: that.eventTypeIdDl,
  1346. eventTypeId: that.eventTypeId,
  1347. day: day
  1348. }, loading).then(res => {
  1349. this.forestFarm = res.data
  1350. })
  1351. },
  1352. getWeather(day) {
  1353. let that = this
  1354. //右侧获取天气信息
  1355. getWeather({
  1356. day: day
  1357. }).then(res => {
  1358. if (res.code == 200) {
  1359. if (res.msg == '天气未添加') {
  1360. this.todatWeather = false
  1361. } else {
  1362. this.todatWeather = true
  1363. this.weatherinformationDirection = res.data.weatherinformationDirection
  1364. this.weatherinformationHigh = res.data.weatherinformationHigh
  1365. this.weatherinformationLevel = res.data.weatherinformationLevel
  1366. this.weatherinformationLevelValue = res.data.weatherinformationLevelValue
  1367. this.weatherinformationLow = res.data.weatherinformationLow
  1368. this.weatherinformationPower = res.data.weatherinformationPower
  1369. this.weatherinformationTemperature = res.data.weatherinformationTemperature
  1370. this.weatherinformationTime = res.data.weatherinformationTime
  1371. this.weatherinformationWeather = res.data.weatherinformationWeather
  1372. }
  1373. } else {
  1374. this.todatWeather = false
  1375. }
  1376. })
  1377. },
  1378. getSupermap(day, loading) {
  1379. let that = this
  1380. getNearEvent('', '', day, loading, that.eventTypeIdDl, that.eventTypeId).then(res => {
  1381. that.markersList = [];
  1382. if (res.data != null && res.data.length > 0) {
  1383. for (let i = 0; i < res.data.length; i++) {
  1384. let markersMap = {
  1385. lng: 124.59,
  1386. lat: 43.02,
  1387. icon: 'marker',
  1388. bindPopupHtml: '',
  1389. click: '',
  1390. parameter: '',
  1391. keepBindPopup: false,
  1392. isAggregation: false
  1393. }
  1394. if (res.data.length > 200) {
  1395. markersMap.isAggregation = true
  1396. }
  1397. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount == 0) {
  1398. markersMap.click = 'showEventDialog'
  1399. markersMap.icon = 'sj-icon-map-xinshangbao'
  1400. }
  1401. if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount > 0) {
  1402. markersMap.click = 'showEventDialog'
  1403. markersMap.icon = 'sj-icon-map-cuiban'
  1404. } else if (res.data[i].eventStatusValue == 'forest_event_status_2') {
  1405. markersMap.click = 'showEventDialog'
  1406. markersMap.icon = 'sj-icon-map-qianshou'
  1407. markersMap.isAggregation = false
  1408. } else if (res.data[i].eventStatusValue == 'forest_event_status_5') {
  1409. markersMap.click = 'showEventDialog'
  1410. markersMap.icon = 'sj-icon-map-banjie'
  1411. markersMap.isAggregation = false
  1412. } else if (res.data[i].eventStatusValue == 'forest_event_status_6') {
  1413. markersMap.click = 'showEventDialog'
  1414. markersMap.icon = 'sj-icon-map-guidang'
  1415. } else if (res.data[i].eventStatusValue == 'forest_event_status_7') {
  1416. markersMap.click = 'showEventDialog'
  1417. markersMap.icon = 'sj-icon-map-queren'
  1418. }
  1419. markersMap.parameter = res.data[i].eventCode
  1420. markersMap.lng = res.data[i].longitude
  1421. markersMap.lat = res.data[i].latitude
  1422. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1423. '<span>' +
  1424. ' <div class="d-l-con">' +
  1425. ' <div class="d-l-l-text">' +
  1426. ' <h4>经纬度:' + res.data[i].longitude + ',' + res.data[i].latitude + '</h4>' +
  1427. ' </div>' +
  1428. ' </div>' +
  1429. ' </span>' +
  1430. '<span>' +
  1431. ' <div class="d-l-con">' +
  1432. ' <div class="d-l-l-text">' +
  1433. ' <h4>事件名称:' + res.data[i].eventName + '</h4>' +
  1434. ' </div>' +
  1435. ' </div>' +
  1436. ' </span>' +
  1437. '<span>' +
  1438. ' <div class="d-l-con">' +
  1439. ' <div class="d-l-l-text">' +
  1440. ' <h4>事件时间:' + res.data[i].createTime + '</h4>' +
  1441. ' </div>' +
  1442. ' </div>' +
  1443. ' </span>';
  1444. if (res.data[i].pictureType == 'image' && res.data[i].picturePath != null && res.data[i]
  1445. .picturePath != '') {
  1446. markersMap.bindPopupHtml += '<span>' +
  1447. ' <div class="d-l-con">' +
  1448. ' <div class="d-l-l-text">' +
  1449. '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
  1450. ' </div>' +
  1451. ' </div>' +
  1452. ' </span>'
  1453. }
  1454. markersMap.bindPopupHtml += '</div>'
  1455. that.markersList.push(markersMap)
  1456. }
  1457. setTimeout(() => {
  1458. that.$refs.supermap.clearM()
  1459. that.$refs.supermap.setMarkers(that.markersList)
  1460. }, 2000)
  1461. } else {
  1462. setTimeout(() => {
  1463. that.$refs.supermap.clearM()
  1464. that.getResourcesCount();
  1465. }, 2000)
  1466. }
  1467. })
  1468. },
  1469. setEventTypeId(data) {
  1470. // let data = {eventTypeIdDl: [], eventTypeId: []}
  1471. // let data = {eventTypeIdDl: that.eventTypeIdDl, eventTypeId: that.eventTypeId}
  1472. let that = this
  1473. that.eventTypeIdDl = data.eventTypeIdDl
  1474. that.eventTypeId = data.eventTypeId
  1475. that.getSupermap(that.calendarDay, false)
  1476. that.getTodayEvents(that.calendarDay, false)
  1477. that.getEventByEventType(that.calendarDay, false)
  1478. that.getExposureStage(that.calendarDay, false)
  1479. that.getEventByReportorOrder(that.calendarDay, false)
  1480. that.getDeptEventCount(that.calendarDay, false)
  1481. that.getEventList(that.calendarDay, that.pageSize, that.pageNum, '', false)
  1482. },
  1483. getEventList(day, pageSize, pageNum, eventSearch, loading) {
  1484. let num = this.eventList.length / pageSize + 1
  1485. if (pageNum < 1) {
  1486. this.$modal.msg('当前已是第一页')
  1487. return
  1488. } else if (pageNum > this.totalAllEvent / 10 + 1) {
  1489. this.$modal.msg('当前已是最后一页')
  1490. return;
  1491. }
  1492. this.pageSize = pageSize;
  1493. this.pageNum = pageNum;
  1494. let that = this
  1495. this.eventList = []
  1496. //右侧获取事件列表
  1497. getEventList({
  1498. eventTypeIdDl: that.eventTypeIdDl,
  1499. eventTypeId: that.eventTypeId,
  1500. day: day,
  1501. pageSize: pageSize,
  1502. pageNum: pageNum,
  1503. eventName: eventSearch
  1504. }, loading).then(res => {
  1505. this.eventList = res.data
  1506. if (res.data !== null && res.data.length !== 0 && res.data.length == 10) {
  1507. this.nextbutton = false
  1508. } else {
  1509. this.nextbutton = true
  1510. }
  1511. if (this.eventList != null && this.eventList.length > 0) {
  1512. if (this.eventList[0].eventStatusValue == 'forest_event_status_1') {
  1513. that.$refs.bottomMenu.updateAlert();
  1514. that.$refs.up.play();
  1515. } else {
  1516. that.$refs.bottomMenu.updateAlertFalse();
  1517. }
  1518. }
  1519. })
  1520. },
  1521. getEventByEventType(day, loading) {
  1522. let that = this
  1523. //右侧获取事件分类
  1524. getEventByEventType({
  1525. eventTypeIdDl: that.eventTypeIdDl,
  1526. eventTypeId: that.eventTypeId,
  1527. day: day
  1528. }, loading).then(res => {
  1529. if (res.data != null && res.data.length > 0) {
  1530. this.showEventKind = true
  1531. this.eventKind.data = res.data
  1532. this.eventKind.colors = ['#1ce0a9', '#d6333b', '#e68d3f', '#32c5e9', '#2abc65']
  1533. this.eventKind.showValue = true
  1534. this.eventKind = {
  1535. ...this.eventKind
  1536. }
  1537. } else {
  1538. this.showEventKind = false
  1539. this.eventKind = {}
  1540. this.eventKind = {
  1541. ...this.eventKind
  1542. }
  1543. }
  1544. })
  1545. },
  1546. getEventByReportorOrder(day, loading) {
  1547. let that = this
  1548. //右侧获取上报排名
  1549. getEventByReportorOrder({
  1550. eventTypeIdDl: that.eventTypeIdDl,
  1551. eventTypeId: that.eventTypeId,
  1552. day: day
  1553. }, loading).then(res => {
  1554. if (res.data != null && res.data.length > 0) {
  1555. this.reportList.data = res.data
  1556. this.reportList = {
  1557. ...this.reportList
  1558. }
  1559. } else {
  1560. this.reportList.data = []
  1561. this.reportList = {
  1562. ...this.reportList
  1563. }
  1564. }
  1565. })
  1566. },
  1567. getEventListNew() {
  1568. this.eventList = []
  1569. this.eventListAll = []
  1570. //右侧获取事件列表
  1571. getEventList({
  1572. day: this.getCurrentDataStr()
  1573. }).then(res => {
  1574. this.eventList = res.data
  1575. this.eventListAll = res.data
  1576. })
  1577. },
  1578. getWebSocketEvent(data) {
  1579. let that = this
  1580. const event = data
  1581. if (typeof data != 'object') {
  1582. event = JSON.parse(data);
  1583. }
  1584. //右侧获取事件列表
  1585. that.markersList = []
  1586. let markersMap = {
  1587. lng: 124.59,
  1588. lat: 43.02,
  1589. icon: 'marker',
  1590. bindPopupHtml: '',
  1591. click: '',
  1592. parameter: '',
  1593. keepBindPopup: false,
  1594. isAggregation: false
  1595. }
  1596. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount == 0) {
  1597. markersMap.click = 'showEventDialog'
  1598. markersMap.icon = 'sj-icon-map-xinshangbao'
  1599. }
  1600. if (event.eventStatusValue == 'forest_event_status_1' && event.urgeCount > 0) {
  1601. markersMap.click = 'showEventDialog'
  1602. markersMap.icon = 'sj-icon-map-cuiban'
  1603. } else if (event.eventStatusValue == 'forest_event_status_2') {
  1604. markersMap.click = 'showEventDialog'
  1605. markersMap.icon = 'sj-icon-map-qianshou'
  1606. markersMap.isAggregation = false
  1607. } else if (event.eventStatusValue == 'forest_event_status_5') {
  1608. markersMap.click = 'showEventDialog'
  1609. markersMap.icon = 'sj-icon-map-banjie'
  1610. markersMap.isAggregation = false
  1611. } else if (event.eventStatusValue == 'forest_event_status_6') {
  1612. markersMap.click = 'showEventDialog'
  1613. markersMap.icon = 'sj-icon-map-guidang'
  1614. } else if (event.eventStatusValue == 'forest_event_status_7') {
  1615. markersMap.click = 'showEventDialog'
  1616. markersMap.icon = 'sj-icon-map-queren'
  1617. }
  1618. markersMap.parameter = event.eventCode
  1619. markersMap.lng = event.longitude
  1620. markersMap.lat = event.latitude
  1621. markersMap.bindPopupHtml = '<div class="map-tip">' +
  1622. '<span>' +
  1623. ' <div class="d-l-con">' +
  1624. ' <div class="d-l-l-text">' +
  1625. ' <h4>经纬度:' + event.longitude + ',' + event.latitude + '</h4>' +
  1626. ' </div>' +
  1627. ' </div>' +
  1628. ' </span>' +
  1629. '<span>' +
  1630. ' <div class="d-l-con">' +
  1631. ' <div class="d-l-l-text">' +
  1632. ' <h4>事件名称:' + event.eventName + '</h4>' +
  1633. ' </div>' +
  1634. ' </div>' +
  1635. ' </span>' +
  1636. '<span>' +
  1637. ' <div class="d-l-con">' +
  1638. ' <div class="d-l-l-text">' +
  1639. ' <h4>事件时间:' + event.createTime + '</h4>' +
  1640. ' </div>' +
  1641. ' </div>' +
  1642. ' </span>';
  1643. if (event.pictureType == 'image' && event.picturePath != null && event.picturePath != '') {
  1644. markersMap.bindPopupHtml += '<span>' +
  1645. ' <div class="d-l-con">' +
  1646. ' <div class="d-l-l-text">' +
  1647. '<img src="' + event.picturePath + '" style="width: 150px;height: 100px"/>' +
  1648. ' </div>' +
  1649. ' </div>' +
  1650. ' </span>'
  1651. }
  1652. markersMap.bindPopupHtml += '</div>'
  1653. that.markersList.push(markersMap)
  1654. setTimeout(() => {
  1655. this.$refs.supermap.clearM()
  1656. that.$refs.supermap.setMarkers(that.markersList)
  1657. }, 1000)
  1658. },
  1659. getExposureStage(day, loading) {
  1660. let that = this
  1661. //右侧获取曝光台
  1662. getExposureStage({
  1663. eventTypeIdDl: that.eventTypeIdDl,
  1664. eventTypeId: that.eventTypeId,
  1665. day: day
  1666. }, loading).then(res => {
  1667. this.exposureStageList = res.data
  1668. })
  1669. },
  1670. /** ----------------------------------weosocket开始------------------------------------- */
  1671. initWebSocket(userId, eventTypeDl, eventType) { //初始化weosocket
  1672. selectConfigKey('KSH_SOCKET').then(res => {
  1673. const wsuri = res.data + userId + '/' + eventTypeDl + '/' + eventType
  1674. this.websock = new WebSocket(wsuri)
  1675. console.log('建立websocket连接')
  1676. this.websock.onopen = this.websocketonopen
  1677. this.websock.onmessage = this.websocketonmessage
  1678. this.websock.onerror = this.websocketonerror
  1679. })
  1680. },
  1681. websocketonopen() { //连接建立之后执行send方法发送数据
  1682. console.log('websocket连接成功')
  1683. this.weosocket = true
  1684. this.sendPing()
  1685. },
  1686. websocketonerror() { //连接建立失败重连
  1687. this.initWebSocket(this.websockSid.userId, this.websockSid.eventTypeDl, this.websockSid.eventType, )
  1688. },
  1689. websocketonmessage(e) { //数据接收
  1690. console.log('接收数据', e.data)
  1691. // let data = "{\"fromId\":\"forest\",\"fromUserId\":\""+Cookies.get('username')+"\",\"toUserId\":\""+Cookies.get('username')+"\"}";
  1692. let data = "{\"fromId\":\"traffic\"}";
  1693. if (this.calendarDay == this.getCurrentDataStr() && data != e.data) {
  1694. this.getTodayEvents(this.getCurrentDataStr(), false);
  1695. this.getDeptEventCount(this.getCurrentDataStr(), false);
  1696. this.getEventByEventType(this.getCurrentDataStr(), false);
  1697. this.getEventByReportorOrder(this.getCurrentDataStr(), false);
  1698. this.getExposureStage(this.getCurrentDataStr(), false);
  1699. // 处理收到的消息
  1700. this.handleWebSoceketEvent(e.data)
  1701. this.$refs.bottomMenu.updateAlert();
  1702. this.$refs.up.play();
  1703. // thes.$refs.up.pause();//停止播放音乐
  1704. }
  1705. },
  1706. // 处理WebSocket事件
  1707. handleWebSoceketEvent(val) {
  1708. let that = this
  1709. let data = JSON.parse(val)
  1710. /**
  1711. * that.markersList.filter( item => data.eventCode == item.parameter).length == 0 如果地图中不存在当前事件则添加
  1712. * eventPush: 事件列表消息
  1713. * */
  1714. if (data.tag == "eventPush" && that.markersList.filter(item => data.eventCode == item.parameter).length == 0) {
  1715. getEventPush({
  1716. eventCode: data.eventCode
  1717. }).then((res) => {
  1718. if (res.data != undefined) {
  1719. if (res.data.eventStatusValue !== "forest_event_status_1") {
  1720. //插入到第一条
  1721. this.eventList.unshift(res.data)
  1722. // 插入后删除最后一条 保证列表中为10条数据
  1723. if (this.eventList.length > 9)
  1724. this.eventList.splice(10, 1)
  1725. // 将收到的数据在地图上添加
  1726. this.getWebSocketEvent(res.data)
  1727. }
  1728. }
  1729. })
  1730. }
  1731. console.log(that.eventList[0])
  1732. },
  1733. websocketsend(Data) { //数据发送
  1734. this.websock.send(Data)
  1735. },
  1736. websocketclose(e) { //关闭
  1737. console.log('断开连接', e)
  1738. // clearInterval(this.setIntervalWesocketPush)
  1739. this.weosocket = false
  1740. },
  1741. /**发送心跳
  1742. * @param {number} time 心跳间隔毫秒 默认5000
  1743. * @param {string} ping 心跳名称 默认字符串ping
  1744. */
  1745. sendPing(time = 60000, ping = {
  1746. 'fromId': 'traffic'
  1747. }) {
  1748. clearInterval(this.setIntervalWesocketPush)
  1749. this.setIntervalWesocketPush = setInterval(() => {
  1750. if (this.weosocket) {
  1751. this.websock.send(JSON.stringify(ping))
  1752. } else {
  1753. // this.initWebSocket()
  1754. }
  1755. }, time)
  1756. },
  1757. stopAudio() {
  1758. this.$refs.up.pause(); //停止播放音乐
  1759. this.$refs.up.currentTime = 0;
  1760. },
  1761. /** ----------------------------------weosocket结束------------------------------------- */
  1762. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  1763. bottomMenuList() {
  1764. this.$refs.bottomMenu.selectTaskList() //获取任务列表
  1765. this.$refs.bottomMenu.selectMessageList() //获取消息列表
  1766. },
  1767. showDialog(click) {
  1768. if (click == 'eventLocation') {
  1769. this.$refs.eventLocation.showEventLocation()
  1770. this.$refs.bottomMenu.showMeasure = false
  1771. this.$refs.bottomMenu.showChild = false
  1772. this.$refs.bottomMenu.showBanChild = false
  1773. this.$refs.bottomMenu.showChangChild = false
  1774. } else if (click == 'editableLayers') {
  1775. this.$refs.bottomMenu.showChild = false
  1776. this.$refs.bottomMenu.showBanChild = false
  1777. this.$refs.bottomMenu.showChangChild = false
  1778. if (!this.$refs.bottomMenu.showMeasure) {
  1779. this.$refs.bottomMenu.showMeasure = true
  1780. } else {
  1781. this.$refs.bottomMenu.showMeasure = false
  1782. }
  1783. } else if (click == 'layerSwitching') {
  1784. this.$refs.bottomMenu.showMeasure = false
  1785. this.$refs.bottomMenu.showBanChild = false
  1786. this.$refs.bottomMenu.showChangChild = false
  1787. if (!this.$refs.bottomMenu.showChild) {
  1788. this.$refs.bottomMenu.showChild = true
  1789. } else {
  1790. this.$refs.bottomMenu.showChild = false
  1791. }
  1792. } else if (click == 'TVWall') {
  1793. this.$refs.TVWall.showTVWall()
  1794. this.$refs.bottomMenu.showMeasure = false
  1795. this.$refs.bottomMenu.showChild = false
  1796. this.$refs.bottomMenu.showBanChild = false
  1797. this.$refs.bottomMenu.showChangChild = false
  1798. } else if (click == 'forestban') {
  1799. this.$refs.bottomMenu.showMeasure = false
  1800. this.$refs.bottomMenu.showChild = false
  1801. this.$refs.bottomMenu.showChangChild = false
  1802. if (!this.$refs.bottomMenu.showBanChild) {
  1803. this.$refs.bottomMenu.showBanChild = true
  1804. } else {
  1805. this.$refs.bottomMenu.showBanChild = false
  1806. }
  1807. } else if (click == 'forestchang') {
  1808. this.$refs.bottomMenu.showMeasure = false
  1809. this.$refs.bottomMenu.showBanChild = false
  1810. this.$refs.bottomMenu.showChild = false
  1811. if (!this.$refs.bottomMenu.showChangChild) {
  1812. this.$refs.bottomMenu.showChangChild = true
  1813. } else {
  1814. this.$refs.bottomMenu.showChangChild = false
  1815. }
  1816. }
  1817. },
  1818. //选择图层
  1819. choseLayerSwitching(url, isClear) {
  1820. this.$refs.supermap.layerSwitching(url, isClear)
  1821. },
  1822. //选择图层(传递数组)
  1823. choseLayerSwitchingList(urlList) {
  1824. this.$refs.supermap.layerSwitchingList(urlList)
  1825. },
  1826. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  1827. }
  1828. }
  1829. </script>
  1830. <style rel="stylesheet/scss" lang="scss" scoped>
  1831. @import '@/assets/styles/base.scss';
  1832. .paging {
  1833. padding: .5rem .3rem;
  1834. display: flex;
  1835. justify-content: center;
  1836. align-content: center;
  1837. span {
  1838. color: #2bacf7;
  1839. display: flex;
  1840. align-items: center;
  1841. padding: 0 1rem;
  1842. }
  1843. button {
  1844. padding: 0 0.3rem;
  1845. height: 1.5rem;
  1846. background-color: #112543;
  1847. color: #2bacf7;
  1848. border: 1px solid #33467f;
  1849. }
  1850. button:hover {
  1851. padding: 0 0.3rem;
  1852. height: 1.5rem;
  1853. background-color: #112543;
  1854. color: #0ff7c5;
  1855. border: 1px solid #1d657f;
  1856. }
  1857. }
  1858. </style>
  1859. <style lang="scss">
  1860. @import '@/assets/styles/base.scss';
  1861. .bottomRight {
  1862. .el-table .el-table__header-wrapper th,
  1863. .el-table .el-table__fixed-header-wrapper th {
  1864. background-color: $searchBG;
  1865. }
  1866. .el-table td.el-table__cell,
  1867. .el-table th.el-table__cell.is-leaf {
  1868. border-bottom: 1px $tableBorder;
  1869. }
  1870. .el-table--border,
  1871. .el-table--border::after {
  1872. border: 1px $tableBorder;
  1873. background-color: $searchBG
  1874. }
  1875. .el-table--border {
  1876. .el-table--group {
  1877. border: 1px $tableBorder;
  1878. }
  1879. .el-table__cell {
  1880. border-right: 1px $tableBorder;
  1881. ;
  1882. }
  1883. }
  1884. .el-table::before {
  1885. background: $searchBG;
  1886. }
  1887. .el-table {
  1888. background: $searchBG;
  1889. color: $inBlue;
  1890. thead {}
  1891. tr {
  1892. background: $searchBG;
  1893. }
  1894. td {
  1895. text-align: center;
  1896. }
  1897. .el-table__header-wrapper {
  1898. th {
  1899. color: $inBlue;
  1900. font-size: .8rem;
  1901. }
  1902. }
  1903. thead.is-group {
  1904. .el-table__cell {
  1905. text-align: center;
  1906. background: $searchBG;
  1907. border-bottom: 1px $tableBorder;
  1908. border-right: 1px $tableBorder;
  1909. padding: 0;
  1910. font-weight: normal;
  1911. }
  1912. }
  1913. }
  1914. .el-table__empty-block {
  1915. min-height: auto;
  1916. }
  1917. .el-table__empty-text {
  1918. line-height: 30px;
  1919. }
  1920. .el-table__header {
  1921. width: auto !important
  1922. }
  1923. .el-table__empty-block {
  1924. width: auto !important
  1925. }
  1926. .el-table__body-wrapper {
  1927. .el-table__body {
  1928. width: auto !important
  1929. }
  1930. }
  1931. .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
  1932. background-color: #0f3655;
  1933. }
  1934. }
  1935. </style>