enforcement-dynamic.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. <template>
  2. <el-row class="contentBox">
  3. <transition name="el-fade-in-linear">
  4. <el-col class="leftBox" v-show="leftBtn">
  5. <el-col class="leftTop">
  6. <h4>消防执法情况</h4>
  7. <el-row class="leftTopContent">
  8. <el-col :span="7" v-for="item in SiAeAllList" :key="item.checkType">
  9. <el-col class="leftTopTitle">{{ item.checkType }}</el-col>
  10. <el-col class="leftTopCenter">{{ item.number }}</el-col>
  11. <el-col class="leftTopBot">
  12. <el-col>
  13. <el-col>环比</el-col>
  14. <el-col :style="{color:item.linkRelativeStatus === 1 ? 'red' : 'green'}">
  15. {{item. linkRelativeStatus === 2 ? '-' : ''}}{{ (item.linkRelativeRatio * 100).toFixed(0) }}%
  16. </el-col>
  17. </el-col>
  18. <el-col>
  19. <el-col>同比</el-col>
  20. <el-col :style="{color:item.sameStatus === 1 ? 'red' : 'green'}">
  21. {{item.sameStatus === 2 ? '-' : ''}}{{ (item.sameRatio * 100).toFixed(0) }}%
  22. </el-col>
  23. </el-col>
  24. </el-col>
  25. </el-col>
  26. <el-col :span="7"> </el-col>
  27. </el-row>
  28. </el-col>
  29. <el-col class="leftBot">
  30. <h4>行政许可情况</h4>
  31. <el-row class="leftBotTop">
  32. <el-row style="z-index:9">
  33. <el-col>{{ alFsdAllNumber.qualifiedRadio * 100 || 0 }}%</el-col>
  34. <el-col>合格率</el-col>
  35. </el-row>
  36. <liquid-fill class="liQuIdFill" ref="liQuIdFill" :dataMap="0.5"></liquid-fill>
  37. </el-row>
  38. <el-row>
  39. <el-col
  40. ><span>受理数</span
  41. ><span>{{ alFsdAllNumber.acceptNumber || 0 }}</span></el-col
  42. >
  43. <el-col
  44. ><span>检查数</span
  45. ><span>{{ alFsdAllNumber.checkNumber || 0 }}</span></el-col
  46. >
  47. <el-col
  48. ><span>出文数</span
  49. ><span>{{ alFsdAllNumber.articleNumber || 0 }}</span></el-col
  50. >
  51. </el-row>
  52. </el-col>
  53. </el-col>
  54. </transition>
  55. <transition name="el-fade-in-linear">
  56. <el-col
  57. class="centerBox"
  58. :style="{
  59. 'max-width':
  60. leftBtn && rightBtn
  61. ? '8rem'
  62. : !leftBtn && !rightBtn
  63. ? '100%'
  64. : leftBtn || rightBtn
  65. ? '16rem'
  66. : '8rem',
  67. }"
  68. >
  69. <el-row class="leftBtn btnW" @click="leftBtnClick()">
  70. <i
  71. :class="leftBtn ? 'el-icon-arrow-left' : 'el-icon-arrow-right'"
  72. ></i>
  73. </el-row>
  74. <el-row class="centerContent" id="mapF"></el-row>
  75. <el-row class="rightBtn btnW" @click="rightBtnClick()">
  76. <i
  77. :class="rightBtn ? 'el-icon-arrow-right' : 'el-icon-arrow-left'"
  78. ></i>
  79. </el-row>
  80. <el-row class="mapTips">
  81. <el-col class="greenImage">执法单位</el-col>
  82. <el-col class="yellowImage">安检单位</el-col>
  83. <el-col class="redImage">举报投诉</el-col>
  84. </el-row>
  85. </el-col>
  86. </transition>
  87. <transition name="el-fade-in-linear">
  88. <el-col class="rightBox" v-show="rightBtn">
  89. <el-row class="rightContent">
  90. <h4>投诉举报情况</h4>
  91. <el-row class="rightTop">
  92. <!-- <img src="~@a/img/test/bg.png" alt="" /> -->
  93. <el-row class="graphChart">
  94. <word-cloud
  95. ref="wordCloud"
  96. :dataMap="reportComplaintList"
  97. ></word-cloud>
  98. </el-row>
  99. </el-row>
  100. <el-row class="treeMap">
  101. <!-- <tree-map
  102. :dataMap="reportComplaintList"
  103. ref="treeMap"
  104. v-if="reportComplaintList.length > 0"
  105. style="heighr:calc((100% - 0.2125rem)"
  106. ></tree-map> -->
  107. <category
  108. ref="category"
  109. v-if="reportComplaintList.length > 0"
  110. :dataMap="reportComplaintList.slice(0,10).map((val,ind) => ind < 9 ? val.value : reportComplaintList.slice(10).reduce((a, b) => {return a + b.value}, 0))"
  111. :xData="reportComplaintList.slice(0,10).map((val,ind) => ind < 9 ? val.name :'其他')"
  112. :isSlice="2"
  113. color="#33BBFA"
  114. ></category>
  115. <img src="~@a/img/enforce/bg7.png" alt="" />
  116. </el-row>
  117. <el-row class="rightBot">
  118. <el-col :span="11">
  119. <img src="~@a/img/enforce/bg8.png" alt="" />
  120. <el-row>
  121. <el-col style="color: #fd0018">{{
  122. reportStatisticsObj.complaintNumber || 0
  123. }}</el-col>
  124. <el-col>投诉数</el-col>
  125. </el-row>
  126. </el-col>
  127. <el-col :span="11">
  128. <img src="~@a/img/enforce/bg9.png" alt="" />
  129. <el-row>
  130. <el-col style="color: #35ffff">{{
  131. reportStatisticsObj.concludeNumber || 0
  132. }}</el-col>
  133. <el-col>办结数</el-col>
  134. </el-row>
  135. </el-col>
  136. <el-col :span="11">
  137. <img src="~@a/img/enforce/bg10.png" alt="" />
  138. <el-row>
  139. <el-col style="color: #fed02f">{{
  140. reportStatisticsObj.checkNumber || 0
  141. }}</el-col>
  142. <el-col>处理数</el-col>
  143. </el-row>
  144. </el-col>
  145. <el-col :span="11">
  146. <img src="~@a/img/enforce/bg11.png" alt="" />
  147. <el-row>
  148. <el-col style="color: #01f01d"
  149. >{{
  150. parseInt(reportStatisticsObj.satisfactionRate * 100)
  151. }}%</el-col
  152. >
  153. <el-col>满意率</el-col>
  154. </el-row>
  155. </el-col>
  156. </el-row>
  157. </el-row>
  158. </el-col>
  159. </transition>
  160. </el-row>
  161. </template>
  162. <script>
  163. import wordCloud from "@c/wordCloud";
  164. import linstener from "@c/mixins/linstener";
  165. import map from "@c/mixins/map-data";
  166. import category from "@c/category";
  167. import liquidFill from "@c/liquid-fill";
  168. export default {
  169. data() {
  170. return {
  171. SiAeAllList: [],
  172. reportComplaintList: [],
  173. alFsdAllNumber: {
  174. acceptNumber: 0,
  175. articleNumber: 0,
  176. checkNumber: 0,
  177. qualifiedRadio: 0,
  178. },
  179. reportStatisticsObj: {
  180. complaintNumber: 0,
  181. concludeNumber: 0,
  182. checkNumber: 0,
  183. satisfactionRate: 0,
  184. },
  185. };
  186. },
  187. components: { category, wordCloud, liquidFill },
  188. mixins: [linstener, map],
  189. created() {
  190. this.getData();
  191. },
  192. mounted() {
  193. window.addEventListener(
  194. "resize",
  195. () => this.resizeTimeActions([this.$refs.category, this.$refs.wordCloud, this.$refs.liQuIdFill]),
  196. true
  197. );
  198. this.initMap();
  199. },
  200. methods: {
  201. async getData() {
  202. this.getSiAeAllCollect();
  203. this.getReportStatistics();
  204. this.getAlFsdAllNumber();
  205. this.getReportComplaint();
  206. },
  207. // 消防执法情况
  208. async getSiAeAllCollect() {
  209. let res = await this.$axios.get(
  210. this.$api.siaeall.siAeAllCollect +
  211. "?" +
  212. this.$qs.stringify({
  213. startTime: this.$store.state.timeList[0] || "",
  214. endTime: this.$store.state.timeList[1] || "",
  215. })
  216. );
  217. if (res) this.SiAeAllList = res.data;
  218. },
  219. // 行政许可情况
  220. async getAlFsdAllNumber() {
  221. let res = await this.$axios.get(this.$api.siaeall.alFsdAllNumber);
  222. if (res) this.alFsdAllNumber = res.data;
  223. },
  224. // 投诉举报情况 Top
  225. async getReportComplaint() {
  226. let res = await this.$axios.get(this.$api.siaeall.reportComplaint);
  227. if (res)
  228. this.reportComplaintList = res.data.map((val) => {
  229. return {
  230. name: val.type,
  231. value: val.number,
  232. };
  233. });
  234. this.reportComplaintList.sort((a,b)=>{
  235. return b.value - a.value
  236. })
  237. },
  238. // 投诉举报情况 Bot
  239. async getReportStatistics() {
  240. let res = await this.$axios.get(this.$api.siaeall.reportStatistics);
  241. if (res) this.reportStatisticsObj = res.data;
  242. },
  243. },
  244. };
  245. </script>
  246. <style lang="scss" scoped>
  247. .contentBox {
  248. font-family: "DS", "DS-B", "DS-BB", "DS-BS";
  249. & > .el-col {
  250. flex: 1;
  251. max-width: 8rem;
  252. height: 100%;
  253. }
  254. .leftBox {
  255. display: flex;
  256. justify-content: space-between;
  257. flex-direction: column;
  258. box-sizing: border-box;
  259. & > .el-col {
  260. flex: 1;
  261. background: url(~@a/img/enforce/bg1.png) no-repeat;
  262. background-size: 100% 100%;
  263. position: relative;
  264. h4 {
  265. font-size: 0.2125rem;
  266. position: absolute;
  267. left: 0;
  268. right: 0;
  269. top: 0;
  270. margin: 0 auto;
  271. text-align: center;
  272. color: #00ffff;
  273. }
  274. }
  275. .leftTop {
  276. padding: 0.375rem 0.475rem 0.1875rem;
  277. height: 5.75rem;
  278. margin-bottom: 0.125rem;
  279. display: flex;
  280. justify-content: center;
  281. align-items: center;
  282. .leftTopContent {
  283. width: 100%;
  284. max-height: 100%;
  285. display: flex;
  286. flex-wrap: wrap;
  287. justify-content: space-between;
  288. & > .el-col {
  289. width: 1.9375rem;
  290. height: 1.3125rem;
  291. // background: url(~@a/img/enforce/bg3.png) no-repeat;
  292. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  293. background-size: 100% 100%;
  294. display: flex;
  295. flex-direction: column;
  296. justify-content: space-between;
  297. padding: 0.125rem 0.1rem;
  298. box-sizing: border-box;
  299. margin-bottom: 0.125rem;
  300. border-radius: .125rem;
  301. & > .el-col {
  302. display: flex;
  303. justify-content: center;
  304. flex: none;
  305. align-items: center;
  306. }
  307. .leftTopTitle {
  308. font-size: 0.2rem;
  309. }
  310. .leftTopCenter {
  311. font-size: 0.3rem;
  312. color: #fcbb0b;
  313. }
  314. .leftTopBot {
  315. font-size: 0.175rem;
  316. justify-content: space-between;
  317. align-items: center;
  318. & > .el-col {
  319. flex: none;
  320. display: flex;
  321. align-items: center;
  322. .el-col {
  323. flex: none;
  324. }
  325. }
  326. & > .el-col:first-child {
  327. & > .el-col:last-child {
  328. color: #ccc;
  329. margin-left: 0.0625rem;
  330. }
  331. }
  332. & > .el-col:last-child {
  333. & > .el-col:last-child {
  334. color: #ccc;
  335. margin-left: 0.0625rem;
  336. }
  337. }
  338. }
  339. &:last-child {
  340. background: none;
  341. box-shadow: none;
  342. }
  343. }
  344. }
  345. }
  346. .leftBot {
  347. display: flex;
  348. justify-content: space-between;
  349. align-items: center;
  350. padding: 0.375rem 0.45rem 0.1875rem;
  351. box-sizing: border-box;
  352. .leftBotTop {
  353. // width: 3.1375rem;
  354. height: 100%;
  355. flex: 1;
  356. // background: url(~@a/img/enforce/bg4.png) no-repeat;
  357. background-size: 100% 100%;
  358. display: flex;
  359. justify-content: center;
  360. align-items: center;
  361. text-align: center;
  362. position: relative;
  363. .liQuIdFill{
  364. position: absolute;
  365. left: 0;
  366. right: 0;
  367. top: 0;
  368. bottom: 0;
  369. margin: auto;
  370. padding: .25rem;
  371. box-sizing: border-box;
  372. }
  373. & > .el-row .el-col:first-child {
  374. font-size: .5625rem;
  375. line-height: 0.75rem;
  376. color: #FFF;
  377. // color: #f4f70d;
  378. }
  379. & > .el-row .el-col:last-child {
  380. font-size: 0.2625rem;
  381. line-height: 0.375rem;
  382. }
  383. }
  384. & > .el-row:last-child {
  385. width: 2.6875rem;
  386. height: 3.1375rem;
  387. display: flex;
  388. justify-content: space-between;
  389. align-items: center;
  390. & > .el-col {
  391. width: 100%;
  392. height: 0.7125rem;
  393. // background: url(~@a/img/enforce/bg5.png) no-repeat;
  394. border-radius: 0.125rem;
  395. background-size: 100% 100%;
  396. padding: 0 0.3rem;
  397. display: flex;
  398. justify-content: space-between;
  399. align-items: center;
  400. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  401. border: 1px solid transparent;
  402. & > span:first-child {
  403. font-size: 0.25rem;
  404. }
  405. & > span:last-child {
  406. font-size: 0.4rem;
  407. }
  408. }
  409. & > .el-col:nth-child(1) {
  410. & > span:last-child {
  411. color: #fd0018;
  412. }
  413. }
  414. & > .el-col:nth-child(2) {
  415. & > span:last-child {
  416. color: #04e7ef;
  417. }
  418. }
  419. & > .el-col:nth-child(1) {
  420. & > span:last-child {
  421. color: #53fd00;
  422. }
  423. }
  424. }
  425. }
  426. }
  427. .rightBox {
  428. display: flex;
  429. box-sizing: border-box;
  430. .rightContent {
  431. width: 100%;
  432. height: 100%;
  433. background: url(~@a/img/enforce/bg2.png) no-repeat;
  434. background-size: 100% 100%;
  435. box-sizing: border-box;
  436. padding: 0.4375rem 0.4375rem;
  437. h4 {
  438. font-size: 0.2125rem;
  439. position: absolute;
  440. left: 0;
  441. right: 0;
  442. top: 0;
  443. margin: 0 auto;
  444. text-align: center;
  445. color: #00ffff;
  446. }
  447. .rightTop {
  448. width: 100%;
  449. height: 40%;
  450. position: relative;
  451. img {
  452. position: absolute;
  453. height: 100%;
  454. left: 0;
  455. right: 0;
  456. margin: auto;
  457. }
  458. .graphChart {
  459. height: 100%;
  460. width: 100%;
  461. margin: 0 auto;
  462. }
  463. }
  464. .treeMap {
  465. width: 100%;
  466. height: 30%;
  467. img {
  468. margin: 0 auto;
  469. height: 0.2125rem;
  470. }
  471. }
  472. .rightBot {
  473. width: 100%;
  474. display: flex;
  475. justify-content: space-between;
  476. flex-wrap: wrap;
  477. & > .el-col {
  478. width: 3rem;
  479. height: 1rem;
  480. overflow: hidden;
  481. background: rgba(11, 12, 72, 0.4);
  482. display: flex;
  483. justify-content: space-between;
  484. align-items: center;
  485. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  486. border: 1px solid transparent;
  487. position: relative;
  488. img {
  489. width: 1.125rem;
  490. }
  491. &::before {
  492. content: "";
  493. position: absolute;
  494. width: 0.0375rem;
  495. height: 0.5rem;
  496. top: 0.25rem;
  497. left: 0px;
  498. bottom: 0;
  499. right: 0;
  500. background: rgb(48, 178, 199);
  501. }
  502. & > .el-row {
  503. flex: 1;
  504. & > .el-col:nth-child(1) {
  505. font-size: 0.4rem;
  506. }
  507. & > .el-col:nth-child(2) {
  508. font-size: 0.25rem;
  509. }
  510. }
  511. }
  512. }
  513. }
  514. }
  515. }
  516. </style>