park_monitor.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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="['{name|{b}}', '{sub|{@value}辆 {d}%}','{hr|}']"
  16. :dataset="modelData"
  17. :roseType="false"
  18. :encode="{ itemName: 'name', value: 'value' }"
  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="tableData2" 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="handlePageChange2"
  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: 'carParkName'
  73. },
  74. {
  75. label: '预警信息',
  76. key: 'alertInfo'
  77. },
  78. {
  79. label: '预警时间',
  80. key: 'eventTime'
  81. }
  82. ],
  83. columns2: [
  84. {
  85. label: '停车场',
  86. key: 'carParkName'
  87. },
  88. {
  89. label: '泊位号',
  90. key: 'parkingNo'
  91. },
  92. {
  93. label: '泊车状态',
  94. key: 'parkingStatus'
  95. }
  96. ],
  97. tableData: [],
  98. tableData2: [],
  99. total: 0,
  100. pageSize: 5,
  101. pageNum: 1,
  102. total2: 0,
  103. pageSize2: 5,
  104. pageNum2: 1,
  105. }
  106. },
  107. mounted() {
  108. this.getTableData()
  109. this.getTableData2()
  110. this.parkMonitorStat()
  111. },
  112. watch: {
  113. },
  114. methods: {
  115. getTableData() {
  116. const {pageNum, pageSize} = this
  117. api.llyjListByPage({current: pageNum, size: pageSize}).then(res => {
  118. this.tableData = res.data.records || []
  119. this.total = res.data.total || 0
  120. })
  121. },
  122. getTableData2() {
  123. const {pageNum2, pageSize2} = this
  124. api.bwtcskListByPage({current: pageNum2, size: pageSize2}).then(res => {
  125. this.tableData2 = res.data.records || []
  126. this.total2 = res.data.total || 0
  127. })
  128. },
  129. handlePageChange() {
  130. this.getTableData()
  131. },
  132. handlePageChange2() {
  133. this.getTableData2()
  134. },
  135. parkMonitorStat(){
  136. api.parkMonitorStat().then(res =>{
  137. this.modelData = res.data || []
  138. })
  139. }
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .body-wrapper {
  145. padding: 20px;
  146. background: #0c0c0c;
  147. width: 100%;
  148. .table-pagination{
  149. text-align: right;
  150. }
  151. .search-card{
  152. font-size: 24px;
  153. font-weight: bold;
  154. color: #3498db;
  155. margin-bottom: 20px;
  156. .input-wrapper{
  157. width: 36%;
  158. }
  159. }
  160. }
  161. .all_charts{
  162. display: flex;
  163. justify-content: space-around;
  164. text-align: center;
  165. }
  166. .charts{
  167. width: 45%;
  168. height: 600px;
  169. margin-top: 100px;
  170. }
  171. .charts2{
  172. width: 50%;
  173. height: 600px;
  174. }
  175. .btn_save{
  176. background-color: #3498db;
  177. color: #ffffff;
  178. padding: 10px 20px;
  179. cursor: pointer;
  180. border: none;
  181. border-radius: 4px;
  182. font-size: 16px;
  183. height: 40px;
  184. }
  185. .input-search{
  186. width: 100%;
  187. padding: 10px;
  188. margin-bottom: 20px;
  189. box-sizing: border-box;
  190. background-color: #2a2a2a;
  191. border: 1px solid #333;
  192. color: #ffffff;
  193. }
  194. .audit-dialog{
  195. .mg-bt{
  196. margin-bottom: 24px;
  197. }
  198. .label{
  199. text-align: right;
  200. }
  201. }
  202. </style>