park_monitor.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div class="body-wrapper">
  3. <div class="search-card">
  4. <h5>停车运行监管</h5>
  5. </div>
  6. <div class="all_charts">
  7. <div class="charts">
  8. <h4 style="color: #FFFFFF">资源利用分析</h4>
  9. <div style="width: 100%; height: 550px">
  10. <piechart
  11. class="model-pie-body"
  12. id="chart1"
  13. :radiusArr="['30%', '70%']"
  14. :colorArr="modelPieColor"
  15. :labelFormat="['{mouth|{b}}', '{sub|{@thisYearAmount}辆 {d}%}','{hr|}']"
  16. :dataset="modelData"
  17. :roseType="false"
  18. :encode="{ itemName: 'mouth', value: 'thisYearAmount' }"
  19. />
  20. </div>
  21. </div>
  22. <div style="height: 800px" class="charts2">
  23. <div style="width: 100%;height: 50%">
  24. <h3 style="color: white;float: left">停车流量预警</h3>
  25. <br>
  26. <br>
  27. <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
  28. <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
  29. </el-table-column>
  30. </el-table>
  31. <div class="table-pagination">
  32. <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
  33. :current-page.sync="pageNum" :page-size.sync="pageSize">
  34. </el-pagination>
  35. </div>
  36. </div>
  37. <br>
  38. <div style="width: 100%;height: 50%">
  39. <h3 style="color: white;float: left">泊位停车实况</h3>
  40. <br>
  41. <br>
  42. <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
  43. <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
  44. </el-table-column>
  45. </el-table>
  46. <div class="table-pagination">
  47. <el-pagination :background="false" layout="total, prev, pager, next" :total="total2" @current-change="handlePageChange"
  48. :current-page.sync="pageNum2" :page-size.sync="pageSize2">
  49. </el-pagination>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. import piechart from "@/components/pieChart";
  58. import vtable from "@/components/vtableNew";
  59. import api from "@/api/article_liao";
  60. export default {
  61. components: {
  62. piechart,
  63. vtable
  64. },
  65. data() {
  66. return {
  67. modelPieColor: ["#4382f6","#9078f8"],
  68. modelData: [],
  69. columns: [
  70. {
  71. label: '预警信息',
  72. key: 'resourceName'
  73. },
  74. {
  75. label: '停车场',
  76. key: 'resourceType'
  77. },
  78. {
  79. label: '预警时间',
  80. key: 'userName'
  81. }
  82. ],
  83. columns2: [
  84. {
  85. label: '停车场',
  86. key: 'resourceName'
  87. },
  88. {
  89. label: '泊位号',
  90. key: 'resourceType'
  91. },
  92. {
  93. label: '泊车状态',
  94. key: 'userName'
  95. }
  96. ],
  97. tableData: [],
  98. total: 0,
  99. pageSize: 10,
  100. pageNum: 1,
  101. total2: 0,
  102. pageSize2: 10,
  103. pageNum2: 1,
  104. }
  105. },
  106. mounted() {
  107. this.parkMonitorStat()
  108. },
  109. watch: {
  110. },
  111. methods: {
  112. parkMonitorStat(){
  113. api.parkMonitorStat().then(res =>{
  114. this.modelData = res.data || []
  115. })
  116. }
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .body-wrapper {
  122. padding: 20px;
  123. background: #0c0c0c;
  124. width: 100%;
  125. .table-pagination{
  126. text-align: right;
  127. }
  128. .search-card{
  129. font-size: 24px;
  130. font-weight: bold;
  131. color: #3498db;
  132. margin-bottom: 20px;
  133. .input-wrapper{
  134. width: 36%;
  135. }
  136. }
  137. }
  138. .all_charts{
  139. display: flex;
  140. justify-content: space-around;
  141. text-align: center;
  142. }
  143. .charts{
  144. width: 45%;
  145. height: 600px;
  146. margin-top: 100px;
  147. }
  148. .charts2{
  149. width: 50%;
  150. height: 600px;
  151. }
  152. .btn_save{
  153. background-color: #3498db;
  154. color: #ffffff;
  155. padding: 10px 20px;
  156. cursor: pointer;
  157. border: none;
  158. border-radius: 4px;
  159. font-size: 16px;
  160. height: 40px;
  161. }
  162. .input-search{
  163. width: 100%;
  164. padding: 10px;
  165. margin-bottom: 20px;
  166. box-sizing: border-box;
  167. background-color: #2a2a2a;
  168. border: 1px solid #333;
  169. color: #ffffff;
  170. }
  171. .audit-dialog{
  172. .mg-bt{
  173. margin-bottom: 24px;
  174. }
  175. .label{
  176. text-align: right;
  177. }
  178. }
  179. </style>