disaster.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  1. <!--灾后评估-->
  2. <template>
  3. <div class="visual-con">
  4. <!--头部-->
  5. <vheader></vheader>
  6. <!--主体-->
  7. <div class="visual-body">
  8. <!-- 左侧 -->
  9. <div class="leftbar" :class="indentleft" ref="left">
  10. <div class="forthis">
  11. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  12. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  13. <div class="this-title" style="margin: 1rem 0; padding-right:1rem">
  14. <el-date-picker v-model="pickYear" @change="getInit()" type="year" placeholder="选择年">
  15. </el-date-picker>
  16. </div>
  17. <div class="i-list-con h-73">
  18. <div class="d-l-con-icon">
  19. <div class="icon-con m-btm-no">
  20. <div class="icon icon-dot"></div>
  21. <div class="icon-text flex-r">
  22. <h5>{{ numberFiresYear }}次</h5>
  23. <h5>火灾次数</h5>
  24. </div>
  25. </div>
  26. <div class="icon-con m-btm-no">
  27. <div class="icon icon-dot"></div>
  28. <div class="icon-text flex-r">
  29. <h5>{{ forestFireLossTotal }}万元</h5>
  30. <h5>损失总计</h5>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="d-l-con flex-c">
  35. <div class="d-l-l-text">
  36. <h2>火灾损失价值</h2>
  37. </div>
  38. <div class="d-l-l-text ">
  39. <h3>合计:{{ fireLossTotalYear }}万元</h3>
  40. </div>
  41. <el-table :data="forestResourcesYear">
  42. <el-table-column label="林木资源">
  43. <el-table-column label="成林" width="50%">
  44. <el-table-column label="蓄积">
  45. <el-table-column prop="forestArea" label="米">
  46. </el-table-column>
  47. </el-table-column>
  48. <el-table-column prop="worth" label="价值" width="50%">
  49. <el-table-column prop="forestPrice" label="万元">
  50. </el-table-column>
  51. </el-table-column>
  52. </el-table-column>
  53. <el-table-column prop="youngTree" label="幼树">
  54. <el-table-column prop="number" label="株数">
  55. <el-table-column prop="treesNumber" label="万株">
  56. </el-table-column>
  57. </el-table-column>
  58. <el-table-column prop="worth" label="价值">
  59. <el-table-column prop="treesPrice" label="万元">
  60. </el-table-column>
  61. </el-table-column>
  62. </el-table-column>
  63. </el-table-column>
  64. </el-table>
  65. <el-table style="margin-top: 1rem;" :data="casualtiesYear">
  66. <el-table-column prop="date" label="人员伤亡">
  67. <el-table-column label="轻伤" width="50%">
  68. <el-table-column label="人数">
  69. <el-table-column prop="minorInjuriesNumber" label="人">
  70. </el-table-column>
  71. </el-table-column>
  72. <el-table-column label="费用" width="50%">
  73. <el-table-column prop="minorInjuriesPrice" label="万元">
  74. </el-table-column>
  75. </el-table-column>
  76. </el-table-column>
  77. <el-table-column label="重伤">
  78. <el-table-column label="人数">
  79. <el-table-column prop="seriouslyInjuredNumber" label="人">
  80. </el-table-column>
  81. </el-table-column>
  82. <el-table-column label="费用">
  83. <el-table-column prop="seriouslyInjuredPrice" label="万元">
  84. </el-table-column>
  85. </el-table-column>
  86. </el-table-column>
  87. <el-table-column label="死亡">
  88. <el-table-column label="人数">
  89. <el-table-column prop="deathNumber" label="人">
  90. </el-table-column>
  91. </el-table-column>
  92. <el-table-column label="费用">
  93. <el-table-column prop="deathPrice" label="万元">
  94. </el-table-column>
  95. </el-table-column>
  96. </el-table-column>
  97. </el-table-column>
  98. </el-table>
  99. <el-table style="margin-top: 1rem;" :data="elseFireLossPriceYear">
  100. <el-table-column label="其他火灾损失">
  101. <el-table-column prop="elseFireLossPrice" label="万元">
  102. </el-table-column>
  103. </el-table-column>
  104. </el-table>
  105. </div>
  106. <div class="d-l-con flex-c">
  107. <div class="d-l-l-text">
  108. <h2>扑火费用支出</h2>
  109. </div>
  110. <div class="d-l-l-text ">
  111. <h3>合计:{{ blazesPriceTotalYear }}万元</h3>
  112. </div>
  113. <el-table style="margin-top: 1rem;" :data="fireFightingCasualtiesYear">
  114. <el-table-column prop="date" label="人员伤亡">
  115. <el-table-column label="人工费" width="50%">
  116. <el-table-column label="人工">
  117. <el-table-column prop="artificialDays" label="工日">
  118. </el-table-column>
  119. </el-table-column>
  120. <el-table-column label="费用" width="50%">
  121. <el-table-column prop="artificialPrice" label="万元">
  122. </el-table-column>
  123. </el-table-column>
  124. </el-table-column>
  125. <el-table-column prop="vehicleFee" label="车辆费">
  126. <el-table-column label="合计">
  127. <el-table-column prop="vehicleNumber" label="台">
  128. </el-table-column>
  129. </el-table-column>
  130. <el-table-column label="汽车">
  131. <el-table-column prop="carNumber" label="台">
  132. </el-table-column>
  133. </el-table-column>
  134. <el-table-column label="费用">
  135. <el-table-column prop="vehiclePrice" label="万元">
  136. </el-table-column>
  137. </el-table-column>
  138. </el-table-column>
  139. <el-table-column prop="flightFee" label="飞行费">
  140. <el-table-column label="飞机">
  141. <el-table-column prop="planeNumber" label="架次">
  142. </el-table-column>
  143. </el-table-column>
  144. <el-table-column label="费用">
  145. <el-table-column prop="planePrice" label="万元">
  146. </el-table-column>
  147. </el-table-column>
  148. </el-table-column>
  149. </el-table-column>
  150. </el-table>
  151. <el-table style="margin-top: 1rem;" :data="otherFireCostsYear">
  152. <el-table-column label="其他火灾费用">
  153. <el-table-column prop="elseBlazesPrice" label="万元">
  154. </el-table-column>
  155. </el-table-column>
  156. </el-table>
  157. </div>
  158. </div>
  159. </dv-border-box-13>
  160. </div>
  161. </div>
  162. <!-- 地图 -->
  163. <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'disasterMap'" class="indexSupermapClass"
  164. :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
  165. <!-- 右侧 -->
  166. <div class="rightbar" :class="indentright" ref="right">
  167. <div class="forthis">
  168. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  169. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  170. <div class="this-title">
  171. <span>列表</span>
  172. <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
  173. </div>
  174. <div class="i-list-con h-19">
  175. <div class="d-l-con" :class="{on:listCurrentIndex==index}" v-for="(item,index) in fireList"
  176. :key="index" @click="choseFireList(item.id,item.eventId,index)">
  177. <div class="d-l-l-text">
  178. <i class="i-small"></i>
  179. <h4>{{ pickYear.getYear() + 1900 }}年第{{ index + 1 }}场火灾</h4>
  180. </div>
  181. </div>
  182. </div>
  183. </dv-border-box-13>
  184. </div>
  185. <div class="forthis">
  186. <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
  187. <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
  188. <div class="i-list-con h-55">
  189. <div class="forthis">
  190. <div class="d-l-con flex-c">
  191. <div class="d-l-l-text">
  192. <h2>火灾损失价值</h2>
  193. </div>
  194. <div class="d-l-l-text ">
  195. <h3>合计:{{ fireLossTotal }}万元</h3>
  196. </div>
  197. <el-table :data="forestResources">
  198. <el-table-column label="林木资源">
  199. <el-table-column label="成林" width="50%">
  200. <el-table-column label="蓄积">
  201. <el-table-column prop="forestArea" label="米">
  202. </el-table-column>
  203. </el-table-column>
  204. <el-table-column prop="worth" label="价值" width="50%">
  205. <el-table-column prop="forestPrice" label="万元">
  206. </el-table-column>
  207. </el-table-column>
  208. </el-table-column>
  209. <el-table-column label="幼树">
  210. <el-table-column label="株数">
  211. <el-table-column prop="treesNumber" label="万株">
  212. </el-table-column>
  213. </el-table-column>
  214. <el-table-column prop="worth" label="价值">
  215. <el-table-column prop="treesPrice" label="万元">
  216. </el-table-column>
  217. </el-table-column>
  218. </el-table-column>
  219. </el-table-column>
  220. </el-table>
  221. <el-table style="margin-top: 1rem;" :data="casualties">
  222. <el-table-column label="人员伤亡">
  223. <el-table-column label="轻伤" width="50%">
  224. <el-table-column label="人数">
  225. <el-table-column prop="minorInjuriesNumber" label="人">
  226. </el-table-column>
  227. </el-table-column>
  228. <el-table-column label="费用" width="50%">
  229. <el-table-column prop="minorInjuriesPrice" label="万元">
  230. </el-table-column>
  231. </el-table-column>
  232. </el-table-column>
  233. <el-table-column label="重伤">
  234. <el-table-column label="人数">
  235. <el-table-column prop="seriouslyInjuredNumber" label="人">
  236. </el-table-column>
  237. </el-table-column>
  238. <el-table-column label="费用">
  239. <el-table-column prop="seriouslyInjuredPrice" label="万元">
  240. </el-table-column>
  241. </el-table-column>
  242. </el-table-column>
  243. <el-table-column label="死亡">
  244. <el-table-column label="人数">
  245. <el-table-column prop="deathNumber" label="人">
  246. </el-table-column>
  247. </el-table-column>
  248. <el-table-column label="费用">
  249. <el-table-column prop="deathPrice" label="万元">
  250. </el-table-column>
  251. </el-table-column>
  252. </el-table-column>
  253. </el-table-column>
  254. </el-table>
  255. <el-table style="margin-top: 1rem;" :data="elseFireLossPrice">
  256. <el-table-column label="其他火灾损失">
  257. <el-table-column prop="elseFireLossPrice" label="万元">
  258. </el-table-column>
  259. </el-table-column>
  260. </el-table>
  261. </div>
  262. <div class="d-l-con flex-c">
  263. <div class="d-l-l-text">
  264. <h2>扑火费用支出</h2>
  265. </div>
  266. <div class="d-l-l-text ">
  267. <h3>合计:{{ blazesPriceTotal }}万元</h3>
  268. </div>
  269. <el-table style="margin-top: 1rem;" :data="fireFightingCasualties">
  270. <el-table-column label="人员伤亡">
  271. <el-table-column prop="artificial" label="人工费" width="50%">
  272. <el-table-column label="人工">
  273. <el-table-column prop="artificialDays" label="工日">
  274. </el-table-column>
  275. </el-table-column>
  276. <el-table-column label="费用" width="50%">
  277. <el-table-column prop="artificialPrice" label="万元">
  278. </el-table-column>
  279. </el-table-column>
  280. </el-table-column>
  281. <el-table-column label="车辆费">
  282. <el-table-column label="合计">
  283. <el-table-column prop="vehicleNumber" label="台">
  284. </el-table-column>
  285. </el-table-column>
  286. <el-table-column label="汽车">
  287. <el-table-column prop="carNumber" label="台">
  288. </el-table-column>
  289. </el-table-column>
  290. <el-table-column label="费用">
  291. <el-table-column prop="vehiclePrice" label="万元">
  292. </el-table-column>
  293. </el-table-column>
  294. </el-table-column>
  295. <el-table-column prop="flightFee" label="飞行费">
  296. <el-table-column label="飞机">
  297. <el-table-column prop="planeNumber" label="架次">
  298. </el-table-column>
  299. </el-table-column>
  300. <el-table-column label="费用">
  301. <el-table-column prop="planePrice" label="万元">
  302. </el-table-column>
  303. </el-table-column>
  304. </el-table-column>
  305. </el-table-column>
  306. </el-table>
  307. <el-table style="margin-top: 1rem;" :data="otherFireCosts">
  308. <el-table-column label="其他火灾费用">
  309. <el-table-column prop="elseBlazesPrice" label="万元">
  310. </el-table-column>
  311. </el-table-column>
  312. </el-table>
  313. </div>
  314. </div>
  315. </div>
  316. </dv-border-box-13>
  317. </div>
  318. </div>
  319. <vBottomMenu ref="bottomMenu"></vBottomMenu>
  320. <el-tooltip :content="indentText" placement="top" :disabled="indentdisabled">
  321. <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img
  322. src="@/assets/images/mascot.png"/></div>
  323. </el-tooltip>
  324. </div>
  325. <eventLocation ref="eventLocation"></eventLocation>
  326. <TVWall ref="TVWall"></TVWall>
  327. </div>
  328. </template>
  329. <script>
  330. import {
  331. getInit,
  332. selectFireLoseByid
  333. } from '@/api/disaster'
  334. import supermap from '@/components/supermap' //超图
  335. import vheader from '@/components/v-header.vue' //一体化共用头部
  336. import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
  337. import eventLocation from '@/components/eventLocation.vue' //事件定位弹窗
  338. import TVWall from '@/components/TVWall.vue' //电视墙弹窗
  339. // import echarts from 'echarts'
  340. let echarts = require('echarts')
  341. export default {
  342. dicts: ['event_source'],
  343. components: {
  344. supermap,
  345. vheader,
  346. vBottomMenu,
  347. eventLocation,
  348. TVWall
  349. },
  350. created() {
  351. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  352. window.showDialog = this.showDialog
  353. window.choseLayerSwitching = this.choseLayerSwitching
  354. window.choseLayerSwitchingList = this.choseLayerSwitchingList
  355. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  356. },
  357. mounted() {
  358. this.getInit()
  359. },
  360. data() {
  361. return {
  362. listCurrentIndex: 0,
  363. numberFiresYear: 0,
  364. forestFireLossTotal: 0,
  365. fireLossTotalYear: 0,
  366. forestResourcesYear: [{
  367. forestArea: '0',
  368. forestPrice: '0',
  369. treesNumber: '0',
  370. treesPrice: '0'
  371. }],
  372. casualtiesYear: [{
  373. minorInjuriesNumber: '0',
  374. minorInjuriesPrice: '0',
  375. seriouslyInjuredNumber: '0',
  376. seriouslyInjuredPrice: '0',
  377. deathNumber: '0',
  378. deathPrice: '0'
  379. }],
  380. elseFireLossPriceYear: [{
  381. elseFireLossPrice: '0'
  382. }],
  383. blazesPriceTotalYear: 0,
  384. fireFightingCasualtiesYear: [{
  385. artificialDays: '0',
  386. artificialPrice: '0',
  387. vehicleNumber: '0',
  388. carNumber: '0',
  389. vehiclePrice: '0',
  390. planeNumber: '0',
  391. planePrice: '0'
  392. }],
  393. otherFireCostsYear: [{
  394. elseBlazesPrice: '0'
  395. }],
  396. fireLossTotal: 0,
  397. forestResources: [{
  398. forestArea: '0',
  399. forestPrice: '0',
  400. treesNumber: '0',
  401. treesPrice: '0'
  402. }],
  403. casualties: [{
  404. minorInjuriesNumber: '0',
  405. minorInjuriesPrice: '0',
  406. seriouslyInjuredNumber: '0',
  407. seriouslyInjuredPrice: '0',
  408. deathNumber: '0',
  409. deathPrice: '0'
  410. }],
  411. elseFireLossPrice: [{
  412. elseFireLossPrice: '0'
  413. }],
  414. blazesPriceTotal: 0,
  415. fireFightingCasualties: [{
  416. artificialDays: '0',
  417. artificialPrice: '0',
  418. vehicleNumber: '0',
  419. carNumber: '0',
  420. vehiclePrice: '0',
  421. planeNumber: '0',
  422. planePrice: '0'
  423. }],
  424. otherFireCosts: [{
  425. elseBlazesPrice: '0'
  426. }],
  427. pickYear: new Date(), //选择年份
  428. graphicsList: [], //地图区域
  429. fireList: [], //右侧活在列表
  430. eventChartData: [], //左侧eachar图表数据
  431. //左右缩进
  432. indentStyle: '',
  433. indentleft: '',
  434. indentright: '',
  435. indentText: '收起左右栏',
  436. indentdisabled: false
  437. }
  438. },
  439. methods: {
  440. /** ----------------------------------底部按钮公用组件开始------------------------------------- */
  441. showDialog(click) {
  442. if (click == 'eventLocation') {
  443. this.$refs.eventLocation.showEventLocation()
  444. this.$refs.bottomMenu.showMeasure = false
  445. this.$refs.bottomMenu.showChild = false
  446. this.$refs.bottomMenu.showBanChild = false
  447. this.$refs.bottomMenu.showChangChild = false
  448. } else if (click == 'editableLayers') {
  449. this.$refs.bottomMenu.showChild = false
  450. this.$refs.bottomMenu.showBanChild = false
  451. this.$refs.bottomMenu.showChangChild = false
  452. if (!this.$refs.bottomMenu.showMeasure) {
  453. this.$refs.bottomMenu.showMeasure = true
  454. } else {
  455. this.$refs.bottomMenu.showMeasure = false
  456. }
  457. } else if (click == 'layerSwitching') {
  458. this.$refs.bottomMenu.showMeasure = false
  459. this.$refs.bottomMenu.showBanChild = false
  460. this.$refs.bottomMenu.showChangChild = false
  461. if (!this.$refs.bottomMenu.showChild) {
  462. this.$refs.bottomMenu.showChild = true
  463. } else {
  464. this.$refs.bottomMenu.showChild = false
  465. }
  466. } else if (click == 'TVWall') {
  467. this.$refs.TVWall.showTVWall()
  468. this.$refs.bottomMenu.showMeasure = false
  469. this.$refs.bottomMenu.showChild = false
  470. this.$refs.bottomMenu.showBanChild = false
  471. this.$refs.bottomMenu.showChangChild = false
  472. } else if (click == 'forestban') {
  473. this.$refs.bottomMenu.showMeasure = false
  474. this.$refs.bottomMenu.showChild = false
  475. this.$refs.bottomMenu.showChangChild = false
  476. if (!this.$refs.bottomMenu.showBanChild) {
  477. this.$refs.bottomMenu.showBanChild = true
  478. } else {
  479. this.$refs.bottomMenu.showBanChild = false
  480. }
  481. } else if (click == 'forestchang') {
  482. this.$refs.bottomMenu.showMeasure = false
  483. this.$refs.bottomMenu.showBanChild = false
  484. this.$refs.bottomMenu.showChild = false
  485. if (!this.$refs.bottomMenu.showChangChild) {
  486. this.$refs.bottomMenu.showChangChild = true
  487. } else {
  488. this.$refs.bottomMenu.showChangChild = false
  489. }
  490. }
  491. },
  492. //选择图层
  493. choseLayerSwitching(url, isClear) {
  494. this.$refs.supermap.layerSwitching(url, isClear)
  495. },
  496. //选择图层(传递数组)
  497. choseLayerSwitchingList(urlList) {
  498. this.$refs.supermap.layerSwitchingList(urlList)
  499. },
  500. /** ----------------------------------底部按钮公用组件结束------------------------------------- */
  501. choseFireList(id,eventId, index) {
  502. this.listCurrentIndex = index
  503. let that = this
  504. selectFireLoseByid({id:id,eventId:eventId}).then(res => {
  505. this.graphicsList = []
  506. //地图标记
  507. if (res.data.regionalFlagBOList != null && res.data.regionalFlagBOList.length > 0) {
  508. for (let i = 0; i < res.data.regionalFlagBOList.length; i++) {
  509. let latlng = {
  510. lat: res.data.regionalFlagBOList[i].latitude,
  511. lng: res.data.regionalFlagBOList[i].longitude
  512. }
  513. this.graphicsList.push(latlng)
  514. }
  515. setTimeout(() => {
  516. that.$refs.supermap.clearG()
  517. that.$refs.supermap.setGraphicsList(this.graphicsList, 'red')
  518. }, 1000)
  519. } else {
  520. that.$refs.supermap.clearG()
  521. }
  522. //右侧
  523. this.fireLossTotal = res.data.visuForestFireLossBO.fireLossTotal != null ? res.data
  524. .visuForestFireLossBO.fireLossTotal : 0
  525. this.forestResources[0].forestArea = res.data.visuForestFireLossBO.forestArea != null ? res
  526. .data.visuForestFireLossBO.forestArea : 0
  527. this.forestResources[0].forestPrice = res.data.visuForestFireLossBO.forestPrice != null ? res
  528. .data.visuForestFireLossBO.forestPrice : 0
  529. this.forestResources[0].treesNumber = res.data.visuForestFireLossBO.treesNumber != null ? res
  530. .data.visuForestFireLossBO.treesNumber : 0
  531. this.forestResources[0].treesPrice = res.data.visuForestFireLossBO.treesPrice != null ? res
  532. .data.visuForestFireLossBO.treesPrice : 0
  533. this.casualties[0].minorInjuriesNumber = res.data.visuForestFireLossBO.minorInjuriesNumber !=
  534. null ? res.data.visuForestFireLossBO.minorInjuriesNumber : 0
  535. this.casualties[0].minorInjuriesPrice = res.data.visuForestFireLossBO.minorInjuriesPrice !=
  536. null ? res.data.visuForestFireLossBO.minorInjuriesPrice : 0
  537. this.casualties[0].seriouslyInjuredNumber = res.data.visuForestFireLossBO
  538. .seriouslyInjuredNumber != null ? res.data.visuForestFireLossBO.seriouslyInjuredNumber : 0
  539. this.casualties[0].seriouslyInjuredPrice = res.data.visuForestFireLossBO
  540. .seriouslyInjuredPrice != null ? res.data.visuForestFireLossBO.seriouslyInjuredPrice : 0
  541. this.casualties[0].deathNumber = res.data.visuForestFireLossBO.deathNumber != null ? res.data
  542. .visuForestFireLossBO.deathNumber : 0
  543. this.casualties[0].deathPrice = res.data.visuForestFireLossBO.deathPrice != null ? res.data
  544. .visuForestFireLossBO.deathPrice : 0
  545. this.elseFireLossPrice[0].elseFireLossPrice = res.data.visuForestFireLossBO
  546. .elseFireLossPrice != null ? res.data.visuForestFireLossBO.elseFireLossPrice : 0
  547. this.blazesPriceTotal = res.data.visuForestFireLossBO.blazesPriceTotal != null ? res.data
  548. .visuForestFireLossBO.blazesPriceTotal : 0
  549. this.fireFightingCasualties[0].artificialDays = res.data.visuForestFireLossBO.artificialDays !=
  550. null ? res.data.visuForestFireLossBO.artificialDays : 0
  551. this.fireFightingCasualties[0].artificialPrice = res.data.visuForestFireLossBO
  552. .artificialPrice != null ? res.data.visuForestFireLossBO.artificialPrice : 0
  553. this.fireFightingCasualties[0].vehicleNumber = res.data.visuForestFireLossBO.vehicleNumber !=
  554. null ? res.data.visuForestFireLossBO.vehicleNumber : 0
  555. this.fireFightingCasualties[0].carNumber = res.data.visuForestFireLossBO.carNumber != null ?
  556. res.data.visuForestFireLossBO.carNumber : 0
  557. this.fireFightingCasualties[0].vehiclePrice = res.data.visuForestFireLossBO.vehiclePrice !=
  558. null ? res.data.visuForestFireLossBO.vehiclePrice : 0
  559. this.fireFightingCasualties[0].planeNumber = res.data.visuForestFireLossBO.planeNumber !=
  560. null ? res.data.visuForestFireLossBO.planeNumber : 0
  561. this.fireFightingCasualties[0].planePrice = res.data.visuForestFireLossBO.planePrice != null ?
  562. res.data.visuForestFireLossBO.planePrice : 0
  563. this.otherFireCosts[0].elseBlazesPrice = res.data.visuForestFireLossBO.elseBlazesPrice !=
  564. null ? res.data.visuForestFireLossBO.elseBlazesPrice : 0
  565. })
  566. },
  567. getInit() {
  568. let that = this
  569. setTimeout(() => {
  570. that.graphicsList = []
  571. that.$refs.supermap.clearG()
  572. }, 1000)
  573. //获取左侧菜单列表
  574. getInit(this.pickYear.getYear() + 1900).then(res => {
  575. this.fireList = []
  576. // //地图标记
  577. // if (res.data.regionalFlagBOList != null && res.data.regionalFlagBOList.length > 0) {
  578. // for (let i = 0; i < res.data.regionalFlagBOList.length; i++) {
  579. // let latlng = {
  580. // lat: res.data.regionalFlagBOList[i].latitude,
  581. // lng: res.data.regionalFlagBOList[i].longitude
  582. // }
  583. // this.graphicsList.push(latlng)
  584. // }
  585. // setTimeout(() => {
  586. // that.$refs.supermap.clearG()
  587. // that.$refs.supermap.setGraphicsList(this.graphicsList, 'red')
  588. // }, 1000)
  589. // }else {
  590. // that.$refs.supermap.clearG()
  591. // }
  592. //右侧列表
  593. if (res.data.visuForestFireLossTimeBOList != null && res.data.visuForestFireLossTimeBOList
  594. .length > 0) {
  595. this.numberFiresYear = res.data.visuForestFireLossTimeBOList.length
  596. this.fireList = res.data.visuForestFireLossTimeBOList
  597. } else {
  598. this.numberFiresYear = 0
  599. }
  600. //左侧
  601. if (res.data.visuForestFireLossBO != null) {
  602. this.forestFireLossTotal = res.data.visuForestFireLossBO.forestFireLossTotal != null ? res
  603. .data.visuForestFireLossBO.forestFireLossTotal : 0
  604. this.fireLossTotalYear = res.data.visuForestFireLossBO.fireLossTotal != null ? res.data
  605. .visuForestFireLossBO.fireLossTotal : 0
  606. this.forestResourcesYear[0].forestArea = res.data.visuForestFireLossBO.forestArea != null ?
  607. res.data.visuForestFireLossBO.forestArea : 0
  608. this.forestResourcesYear[0].forestPrice = res.data.visuForestFireLossBO.forestPrice !=
  609. null ? res.data.visuForestFireLossBO.forestPrice : 0
  610. this.forestResourcesYear[0].treesNumber = res.data.visuForestFireLossBO.treesNumber !=
  611. null ? res.data.visuForestFireLossBO.treesNumber : 0
  612. this.forestResourcesYear[0].treesPrice = res.data.visuForestFireLossBO.treesPrice != null ?
  613. res.data.visuForestFireLossBO.treesPrice : 0
  614. this.casualtiesYear[0].minorInjuriesNumber = res.data.visuForestFireLossBO
  615. .minorInjuriesNumber != null ? res.data.visuForestFireLossBO.minorInjuriesNumber : 0
  616. this.casualtiesYear[0].minorInjuriesPrice = res.data.visuForestFireLossBO
  617. .minorInjuriesPrice != null ? res.data.visuForestFireLossBO.minorInjuriesPrice : 0
  618. this.casualtiesYear[0].seriouslyInjuredNumber = res.data.visuForestFireLossBO
  619. .seriouslyInjuredNumber != null ? res.data.visuForestFireLossBO
  620. .seriouslyInjuredNumber : 0
  621. this.casualtiesYear[0].seriouslyInjuredPrice = res.data.visuForestFireLossBO
  622. .seriouslyInjuredPrice != null ? res.data.visuForestFireLossBO.seriouslyInjuredPrice :
  623. 0
  624. this.casualtiesYear[0].deathNumber = res.data.visuForestFireLossBO.deathNumber != null ?
  625. res.data.visuForestFireLossBO.deathNumber : 0
  626. this.casualtiesYear[0].deathPrice = res.data.visuForestFireLossBO.deathPrice != null ? res
  627. .data.visuForestFireLossBO.deathPrice : 0
  628. this.elseFireLossPriceYear[0].elseFireLossPrice = res.data.visuForestFireLossBO
  629. .elseFireLossPrice != null ? res.data.visuForestFireLossBO.elseFireLossPrice : 0
  630. this.blazesPriceTotalYear = res.data.visuForestFireLossBO.blazesPriceTotal != null ? res
  631. .data.visuForestFireLossBO.blazesPriceTotal : 0
  632. this.fireFightingCasualtiesYear[0].artificialDays = res.data.visuForestFireLossBO
  633. .artificialDays != null ? res.data.visuForestFireLossBO.artificialDays : 0
  634. this.fireFightingCasualtiesYear[0].artificialPrice = res.data.visuForestFireLossBO
  635. .artificialPrice != null ? res.data.visuForestFireLossBO.artificialPrice : 0
  636. this.fireFightingCasualtiesYear[0].vehicleNumber = res.data.visuForestFireLossBO
  637. .vehicleNumber != null ? res.data.visuForestFireLossBO.vehicleNumber : 0
  638. this.fireFightingCasualtiesYear[0].carNumber = res.data.visuForestFireLossBO.carNumber !=
  639. null ? res.data.visuForestFireLossBO.carNumber : 0
  640. this.fireFightingCasualtiesYear[0].vehiclePrice = res.data.visuForestFireLossBO
  641. .vehiclePrice != null ? res.data.visuForestFireLossBO.vehiclePrice : 0
  642. this.fireFightingCasualtiesYear[0].planeNumber = res.data.visuForestFireLossBO
  643. .planeNumber != null ? res.data.visuForestFireLossBO.planeNumber : 0
  644. this.fireFightingCasualtiesYear[0].planePrice = res.data.visuForestFireLossBO.planePrice !=
  645. null ? res.data.visuForestFireLossBO.planePrice : 0
  646. this.otherFireCostsYear[0].elseBlazesPrice = res.data.visuForestFireLossBO
  647. .elseBlazesPrice != null ? res.data.visuForestFireLossBO.elseBlazesPrice : 0
  648. } else {
  649. this.forestFireLossTotal = 0
  650. this.fireLossTotalYear = 0
  651. this.forestResourcesYear[0].forestArea = 0
  652. this.forestResourcesYear[0].forestPrice = 0
  653. this.forestResourcesYear[0].treesNumber = 0
  654. this.forestResourcesYear[0].treesPrice = 0
  655. this.casualtiesYear[0].minorInjuriesNumber = 0
  656. this.casualtiesYear[0].minorInjuriesPrice = 0
  657. this.casualtiesYear[0].seriouslyInjuredNumber = 0
  658. this.casualtiesYear[0].seriouslyInjuredPrice = 0
  659. this.casualtiesYear[0].deathNumber = 0
  660. this.casualtiesYear[0].deathPrice = 0
  661. this.elseFireLossPriceYear[0].elseFireLossPrice = 0
  662. this.blazesPriceTotalYear = 0
  663. this.fireFightingCasualtiesYear[0].artificialDays = 0
  664. this.fireFightingCasualtiesYear[0].artificialPrice = 0
  665. this.fireFightingCasualtiesYear[0].vehicleNumber = 0
  666. this.fireFightingCasualtiesYear[0].carNumber = 0
  667. this.fireFightingCasualtiesYear[0].vehiclePrice = 0
  668. this.fireFightingCasualtiesYear[0].planeNumber = 0
  669. this.fireFightingCasualtiesYear[0].planePrice = 0
  670. this.otherFireCostsYear[0].elseBlazesPrice = 0
  671. }
  672. //右侧
  673. this.fireLossTotal = res.data.visuForestFireLossBOFirst.fireLossTotal != null ? res.data
  674. .visuForestFireLossBOFirst.fireLossTotal : 0
  675. this.forestResources[0].forestArea = res.data.visuForestFireLossBOFirst.forestArea != null ?
  676. res.data.visuForestFireLossBOFirst.forestArea : 0
  677. this.forestResources[0].forestPrice = res.data.visuForestFireLossBOFirst.forestPrice != null ?
  678. res.data.visuForestFireLossBOFirst.forestPrice : 0
  679. this.forestResources[0].treesNumber = res.data.visuForestFireLossBOFirst.treesNumber != null ?
  680. res.data.visuForestFireLossBOFirst.treesNumber : 0
  681. this.forestResources[0].treesPrice = res.data.visuForestFireLossBOFirst.treesPrice != null ?
  682. res.data.visuForestFireLossBOFirst.treesPrice : 0
  683. this.casualties[0].minorInjuriesNumber = res.data.visuForestFireLossBOFirst
  684. .minorInjuriesNumber != null ? res.data.visuForestFireLossBOFirst.minorInjuriesNumber : 0
  685. this.casualties[0].minorInjuriesPrice = res.data.visuForestFireLossBOFirst
  686. .minorInjuriesPrice != null ? res.data.visuForestFireLossBOFirst.minorInjuriesPrice : 0
  687. this.casualties[0].seriouslyInjuredNumber = res.data.visuForestFireLossBOFirst
  688. .seriouslyInjuredNumber != null ? res.data.visuForestFireLossBOFirst
  689. .seriouslyInjuredNumber : 0
  690. this.casualties[0].seriouslyInjuredPrice = res.data.visuForestFireLossBOFirst
  691. .seriouslyInjuredPrice != null ? res.data.visuForestFireLossBOFirst.seriouslyInjuredPrice :
  692. 0
  693. this.casualties[0].deathNumber = res.data.visuForestFireLossBOFirst.deathNumber != null ? res
  694. .data.visuForestFireLossBOFirst.deathNumber : 0
  695. this.casualties[0].deathPrice = res.data.visuForestFireLossBOFirst.deathPrice != null ? res
  696. .data.visuForestFireLossBOFirst.deathPrice : 0
  697. this.elseFireLossPrice[0].elseFireLossPrice = res.data.visuForestFireLossBOFirst
  698. .elseFireLossPrice != null ? res.data.visuForestFireLossBOFirst.elseFireLossPrice : 0
  699. this.blazesPriceTotal = res.data.visuForestFireLossBOFirst.blazesPriceTotal != null ? res.data
  700. .visuForestFireLossBOFirst.blazesPriceTotal : 0
  701. this.fireFightingCasualties[0].artificialDays = res.data.visuForestFireLossBOFirst
  702. .artificialDays != null ? res.data.visuForestFireLossBOFirst.artificialDays : 0
  703. this.fireFightingCasualties[0].artificialPrice = res.data.visuForestFireLossBOFirst
  704. .artificialPrice != null ? res.data.visuForestFireLossBOFirst.artificialPrice : 0
  705. this.fireFightingCasualties[0].vehicleNumber = res.data.visuForestFireLossBOFirst
  706. .vehicleNumber != null ? res.data.visuForestFireLossBOFirst.vehicleNumber : 0
  707. this.fireFightingCasualties[0].carNumber = res.data.visuForestFireLossBOFirst.carNumber !=
  708. null ? res.data.visuForestFireLossBOFirst.carNumber : 0
  709. this.fireFightingCasualties[0].vehiclePrice = res.data.visuForestFireLossBOFirst
  710. .vehiclePrice != null ? res.data.visuForestFireLossBOFirst.vehiclePrice : 0
  711. this.fireFightingCasualties[0].planeNumber = res.data.visuForestFireLossBOFirst.planeNumber !=
  712. null ? res.data.visuForestFireLossBOFirst.planeNumber : 0
  713. this.fireFightingCasualties[0].planePrice = res.data.visuForestFireLossBOFirst.planePrice !=
  714. null ? res.data.visuForestFireLossBOFirst.planePrice : 0
  715. this.otherFireCosts[0].elseBlazesPrice = res.data.visuForestFireLossBOFirst.elseBlazesPrice !=
  716. null ? res.data.visuForestFireLossBOFirst.elseBlazesPrice : 0
  717. })
  718. },
  719. //事件chart
  720. eventChart() {
  721. // 基于准备好的dom,初始化echarts实例
  722. let myChart = echarts.init(document.getElementById('event-chart'))
  723. myChart.setOption({
  724. color: ['#2EACFF', '#FFA61C', '#2EC054', '#8C64D7'],
  725. tooltip: {
  726. trigger: 'item',
  727. formatter: '{a} <br/>{b} : {c} ({d}%)'
  728. },
  729. toolbox: {
  730. show: true
  731. },
  732. series: [{
  733. name: '事件分类',
  734. type: 'pie',
  735. roseType: true,
  736. radius: [30, 70],
  737. label: {
  738. show: true,
  739. formatter: '{b}\n{c} '
  740. },
  741. data: this.eventChartData
  742. }]
  743. })
  744. },
  745. //吉祥物收起左右框
  746. indent() {
  747. let list = document.getElementsByClassName('el-tooltip__popper')
  748. list[list.length - 1].style.display = 'none'
  749. if (this.indentStyle == '') {
  750. this.indentStyle = 'indent-style'
  751. this.indentleft = 'indent-left'
  752. this.indentright = 'indent-right'
  753. this.indentText = '展开左右栏'
  754. } else if (this.indentText == '展开左右栏') {
  755. this.indentStyle = ''
  756. this.indentleft = ''
  757. this.indentright = ''
  758. this.indentText = '收起左右栏'
  759. }
  760. },
  761. dropLocation(lat, lng) {
  762. this.$refs.supermap.dropLocation(lat, lng)
  763. }
  764. }
  765. }
  766. </script>
  767. <style lang="scss" scoped>
  768. @import '@/assets/styles/base.scss';
  769. .el-table__header {
  770. width: auto !important;
  771. }
  772. .d-dialog-con {
  773. position: absolute;
  774. left: -19rem;
  775. top: 0;
  776. }
  777. </style>