forest.vue 86 KB

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