city_pay.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div class="body-wrapper">
  3. <h2 style="color: #3498db;">各城市欠费追缴分析</h2>
  4. <br>
  5. <!-- <el-form class="form-wrapper" :inline="true" :model="formInline">-->
  6. <!-- <el-form-item label="">-->
  7. <!-- <el-select clearable v-model="formInline.comType" placeholder="全部" popper-class="cur-select">-->
  8. <!-- <el-option label="全部" value=""></el-option>-->
  9. <!-- <el-option label="经营服务类停车问题" value="经营服务类停车问题"></el-option>-->
  10. <!-- <el-option label="非法经营停车问题" value="非法经营停车问题"></el-option>-->
  11. <!-- <el-option label="不提供税票" value="不提供税票"></el-option>-->
  12. <!-- <el-option label="设备问题" value="设备问题"></el-option>-->
  13. <!-- </el-select>-->
  14. <!-- </el-form-item>-->
  15. <!-- <el-form-item>-->
  16. <!-- <el-button type="primary" @click="onSubmit">查询</el-button>-->
  17. <!-- </el-form-item>-->
  18. <!-- </el-form>-->
  19. <br>
  20. <br>
  21. <div style="width: 100%; height: 600px">
  22. <linechart
  23. :autoStop="false"
  24. :top="30"
  25. :bottom="30"
  26. :left="40"
  27. :legendTop="0"
  28. yAxisName="(元)"
  29. :dataset="linedata"
  30. :tooltipFormat="lineTooltipFormat"
  31. :encode="[
  32. { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
  33. ]"
  34. id="axstj"
  35. />
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. import piechart from "@/components/pieChart";
  41. import linechart from "@/components/lineChart";
  42. import barchart from "@/components/barChart";
  43. import api from "@/api/article_liao";
  44. export default {
  45. components: {
  46. piechart,
  47. barchart,
  48. linechart
  49. },
  50. data() {
  51. return {
  52. formInline: {
  53. comType: ''
  54. },
  55. modelPieColor: ["#4382f6","#9078f8", "#79a7db", "#FF9800", "#9C27B0"],
  56. modelPieColor1: ["#4382f6","#9078f8", "#6aa1e1", "#FF9800", "#9C27B0"],
  57. modelData: {
  58. list: [],
  59. list1: []
  60. },
  61. bardata: [],
  62. linedata: []
  63. }
  64. },
  65. mounted() {
  66. this.businessAnalysisStat()
  67. this.businessAnalysisStat2()
  68. this.businessAnalysisStat3()
  69. },
  70. watch: {
  71. },
  72. methods: {
  73. tooltipFormat(params) {
  74. const type = params[0].seriesType;
  75. const data = params[0].data;
  76. return `<div class="line-tooltip">
  77. <div>${params[0].seriesName}: ${
  78. params[0].data.hs || "--"}元</div>
  79. <div>${params[1].seriesName}: ${
  80. params[0].data.cs || "--"}元</div>
  81. </div>`;
  82. },
  83. lineTooltipFormat(params) {
  84. return `<div class="line-tooltip">
  85. <div style="color: ${params[0].color}">${params[0].data.mouth} : ${
  86. params[0].data.lastAmount || "--"
  87. }元</div>`;
  88. },
  89. onSubmit() {
  90. this.pageNum = 1
  91. this.getTableData()
  92. },
  93. businessAnalysisStat(){
  94. api.businessAnalysisStat().then(res =>{
  95. this.bardata = res.data
  96. })
  97. },
  98. businessAnalysisStat2(){
  99. api.businessAnalysisStat2().then(res =>{
  100. this.modelData.list = res.data
  101. })
  102. },
  103. businessAnalysisStat3(){
  104. api.businessAnalysisStat3().then(res =>{
  105. this.modelData.list1 = res.data
  106. })
  107. },
  108. xLabelFormat(name) {
  109. const nameArr = []
  110. for(let i=0; i<name.length; i+=7) {
  111. nameArr.push(name.substring(i, i+7))
  112. }
  113. return nameArr.join('\n');
  114. }
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .body-wrapper {
  120. width: 100%;
  121. height: 100%;
  122. box-sizing: border-box;
  123. background: #0c0c0c;
  124. }
  125. .model-pie-body {
  126. width: 100%;
  127. height: 99%;
  128. }
  129. /deep/ .el-select {
  130. height: 40px;
  131. .el-input__inner {
  132. height: 40px;
  133. }
  134. }
  135. </style>