enforcement-dynamic.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <template>
  2. <el-row class="contentBox">
  3. <transition name="el-fade-in-linear">
  4. <el-col class="flexJ 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="flexJ leftBot">
  30. <h4>行政许可情况</h4>
  31. <el-row class="flexJ 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/linstener2";
  165. import map from "@c/mixins/map-data";
  166. // import map from "@c/mixins/map-gaode";
  167. import category from "@c/category/index2";
  168. import liquidFill from "@c/liquid-fill";
  169. export default {
  170. data() {
  171. return {
  172. SiAeAllList: [],
  173. reportComplaintList: [],
  174. alFsdAllNumber: {
  175. acceptNumber: 0,
  176. articleNumber: 0,
  177. checkNumber: 0,
  178. qualifiedRadio: 0,
  179. },
  180. reportStatisticsObj: {
  181. complaintNumber: 0,
  182. concludeNumber: 0,
  183. checkNumber: 0,
  184. satisfactionRate: 0,
  185. },
  186. };
  187. },
  188. components: { category, wordCloud, liquidFill },
  189. mixins: [linstener, map],
  190. created() {
  191. this.getData();
  192. },
  193. mounted() {
  194. window.addEventListener(
  195. "resize",
  196. () => this.resizeTimeActions([this.$refs.category, this.$refs.wordCloud, this.$refs.liQuIdFill]),
  197. true
  198. );
  199. this.initMap();
  200. },
  201. methods: {
  202. async getData() {
  203. this.getSiAeAllCollect();
  204. this.getReportStatistics();
  205. this.getAlFsdAllNumber();
  206. this.getReportComplaint();
  207. },
  208. // 消防执法情况
  209. async getSiAeAllCollect() {
  210. let res = await this.$axios.get(
  211. this.$api.siaeall.siAeAllCollect +
  212. "?" +
  213. this.$qs.stringify({
  214. startTime: this.$store.state.timeList[0] || "",
  215. endTime: this.$store.state.timeList[1] || "",
  216. })
  217. );
  218. if (res) this.SiAeAllList = res.data;
  219. },
  220. // 行政许可情况
  221. async getAlFsdAllNumber() {
  222. console.log(1)
  223. let res = await this.$axios.get(this.$api.siaeall.alFsdAllNumber);
  224. console.log(res)
  225. if (res) this.alFsdAllNumber = res.data;
  226. },
  227. // 投诉举报情况 Top
  228. async getReportComplaint() {
  229. let res = await this.$axios.get(this.$api.siaeall.reportComplaint);
  230. if (res)
  231. this.reportComplaintList = res.data.map((val) => {
  232. return {
  233. name: val.type,
  234. value: val.number,
  235. };
  236. });
  237. this.reportComplaintList.sort((a,b)=>{
  238. return b.value - a.value
  239. })
  240. console.log(this.reportComplaintList)
  241. },
  242. // 投诉举报情况 Bot
  243. async getReportStatistics() {
  244. let res = await this.$axios.get(this.$api.siaeall.reportStatistics);
  245. if (res) this.reportStatisticsObj = res.data;
  246. },
  247. },
  248. };
  249. </script>
  250. <style lang="scss" scoped>
  251. .contentBox {
  252. font-family: "DS", "DS-B", "DS-BB", "DS-BS";
  253. & > .el-col {
  254. flex: 1;
  255. max-width: 8rem;
  256. height: 100%;
  257. }
  258. .leftBox {
  259. display: flex;
  260. justify-content: space-between;
  261. flex-direction: column;
  262. box-sizing: border-box;
  263. & > .el-col {
  264. flex: 1;
  265. background: url(~@a/img/enforce/bg1.png) no-repeat;
  266. background-size: 100% 100%;
  267. position: relative;
  268. h4 {
  269. font-size: 0.2125rem;
  270. position: absolute;
  271. left: 0;
  272. right: 0;
  273. top: 0;
  274. margin: 0 auto;
  275. text-align: center;
  276. color: #00ffff;
  277. }
  278. }
  279. .leftTop {
  280. //padding: 0.375rem 0.475rem 0.1875rem;
  281. padding: 0rem 0.475rem 0.1875rem;
  282. height: 5.75rem;
  283. margin-bottom: 0.125rem;
  284. display: flex;
  285. justify-content: center;
  286. align-items: center;
  287. .leftTopContent {
  288. width: 100%;
  289. // max-height: 100%;
  290. max-height: 2rem; //大屏
  291. margin-top: 0.2rem; //大屏
  292. overflow-y: scroll;
  293. display: flex;
  294. flex-wrap: wrap;
  295. justify-content: space-between;
  296. & > .el-col {
  297. width: 1.9375rem;
  298. // height: 1.3125rem;
  299. // background: url(~@a/img/enforce/bg3.png) no-repeat;
  300. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  301. background-size: 100% 100%;
  302. display: flex;
  303. flex-direction: column;
  304. justify-content: space-between;
  305. // padding: 0.125rem 0.1rem;
  306. padding:0.06rem 0.1rem;
  307. box-sizing: border-box;
  308. margin-bottom: 0.125rem;
  309. border-radius: .125rem;
  310. & > .el-col {
  311. display: flex;
  312. justify-content: center;
  313. flex: none;
  314. align-items: center;
  315. }
  316. .leftTopTitle {
  317. font-size: 0.2rem;
  318. }
  319. .leftTopCenter {
  320. font-size: 0.3rem;
  321. color: #fcbb0b;
  322. }
  323. .leftTopBot {
  324. font-size: 0.175rem;
  325. justify-content: space-between;
  326. align-items: center;
  327. & > .el-col {
  328. flex: none;
  329. display: flex;
  330. align-items: center;
  331. .el-col {
  332. flex: none;
  333. }
  334. }
  335. & > .el-col:first-child {
  336. & > .el-col:last-child {
  337. color: #ccc;
  338. margin-left: 0.0625rem;
  339. }
  340. }
  341. & > .el-col:last-child {
  342. & > .el-col:last-child {
  343. color: #ccc;
  344. margin-left: 0.0625rem;
  345. }
  346. }
  347. }
  348. &:last-child {
  349. background: none;
  350. box-shadow: none;
  351. }
  352. }
  353. }
  354. }
  355. .leftBot {
  356. display: flex;
  357. justify-content: space-between;
  358. align-items: center;
  359. padding: 0.375rem 0.45rem 0.1875rem;
  360. box-sizing: border-box;
  361. .leftBotTop {
  362. // width: 3.1375rem;
  363. height: 100%;
  364. flex: 1;
  365. // background: url(~@a/img/enforce/bg4.png) no-repeat;
  366. background-size: 100% 100%;
  367. display: flex;
  368. justify-content: center;
  369. align-items: center;
  370. text-align: center;
  371. position: relative;
  372. .liQuIdFill{
  373. position: absolute;
  374. left: 0;
  375. right: 0;
  376. top: 0;
  377. bottom: 0;
  378. margin: auto;
  379. padding: .25rem;
  380. box-sizing: border-box;
  381. }
  382. & > .el-row .el-col:first-child {
  383. font-size: .5625rem;
  384. line-height: 0.75rem;
  385. color: #FFF;
  386. // color: #f4f70d;
  387. }
  388. & > .el-row .el-col:last-child {
  389. font-size: 0.2625rem;
  390. line-height: 0.375rem;
  391. }
  392. }
  393. & > .el-row:last-child {
  394. width: 2.6875rem;
  395. height: 3.1375rem;
  396. display: flex;
  397. justify-content: space-between;
  398. align-items: center;
  399. & > .el-col {
  400. width: 100%;
  401. height: 0.7125rem;
  402. // background: url(~@a/img/enforce/bg5.png) no-repeat;
  403. border-radius: 0.125rem;
  404. background-size: 100% 100%;
  405. padding: 0 0.3rem;
  406. display: flex;
  407. justify-content: space-between;
  408. align-items: center;
  409. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  410. border: 1px solid transparent;
  411. & > span:first-child {
  412. font-size: 0.25rem;
  413. }
  414. & > span:last-child {
  415. font-size: 0.4rem;
  416. }
  417. }
  418. & > .el-col:nth-child(1) {
  419. & > span:last-child {
  420. color: #fd0018;
  421. }
  422. }
  423. & > .el-col:nth-child(2) {
  424. & > span:last-child {
  425. color: #04e7ef;
  426. }
  427. }
  428. & > .el-col:nth-child(1) {
  429. & > span:last-child {
  430. color: #53fd00;
  431. }
  432. }
  433. }
  434. }
  435. }
  436. .rightBox {
  437. display: flex;
  438. box-sizing: border-box;
  439. .rightContent {
  440. width: 100%;
  441. height: 100%;
  442. background: url(~@a/img/enforce/bg2.png) no-repeat;
  443. background-size: 100% 100%;
  444. box-sizing: border-box;
  445. padding: 0.4375rem 0.4375rem;
  446. h4 {
  447. font-size: 0.2125rem;
  448. position: absolute;
  449. left: 0;
  450. right: 0;
  451. top: 0;
  452. margin: 0 auto;
  453. text-align: center;
  454. color: #00ffff;
  455. }
  456. .rightTop {
  457. width: 100%;
  458. height: 40%;
  459. position: relative;
  460. img {
  461. position: absolute;
  462. height: 100%;
  463. left: 0;
  464. right: 0;
  465. margin: auto;
  466. }
  467. .graphChart {
  468. height: 100%;
  469. width: 100%;
  470. margin: 0 auto;
  471. }
  472. }
  473. .treeMap {
  474. width: 100%;
  475. height: 30%;
  476. img {
  477. margin: 0 auto;
  478. height: 0.2125rem;
  479. }
  480. }
  481. .rightBot {
  482. width: 100%;
  483. display: flex;
  484. justify-content: space-between;
  485. flex-wrap: wrap;
  486. & > .el-col {
  487. width: 3rem;
  488. height: 1rem;
  489. overflow: hidden;
  490. background: rgba(11, 12, 72, 0.4);
  491. display: flex;
  492. justify-content: space-between;
  493. align-items: center;
  494. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  495. border: 1px solid transparent;
  496. position: relative;
  497. img {
  498. width: 1.125rem;
  499. }
  500. &::before {
  501. content: "";
  502. position: absolute;
  503. width: 0.0375rem;
  504. height: 0.5rem;
  505. top: 0.25rem;
  506. left: 0px;
  507. bottom: 0;
  508. right: 0;
  509. background: rgb(48, 178, 199);
  510. }
  511. & > .el-row {
  512. flex: 1;
  513. & > .el-col:nth-child(1) {
  514. font-size: 0.4rem;
  515. }
  516. & > .el-col:nth-child(2) {
  517. font-size: 0.25rem;
  518. }
  519. }
  520. }
  521. }
  522. }
  523. }
  524. }
  525. @media screen and (min-width: 1940px) {
  526. .contentBox .rightBox .rightContent .treeMap{
  527. height: 26%;
  528. margin: -2% 0 6% 0;
  529. }
  530. }
  531. </style>