berths_information.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <div class="body-wrapper">
  3. <el-form class="form-wrapper" :inline="true" :model="formInline">
  4. <el-form-item label="行政区">
  5. <el-select clearable v-model="formInline.regionCode" placeholder="请选择" popper-class="cur-select">
  6. <el-option v-for="item in districtOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
  7. </el-select>
  8. </el-form-item>
  9. <el-form-item label="重点区域">
  10. <el-select clearable v-model="formInline.keyAreas" placeholder="请选择" popper-class="cur-select">
  11. <el-option v-for="item in keyAreaOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="具体道路">
  15. <el-input v-model="formInline.streetName" placeholder="请输入"></el-input>
  16. </el-form-item>
  17. <el-form-item label="停车场">
  18. <el-select clearable v-model="formInline.parkId" placeholder="请选择" popper-class="cur-select">
  19. <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item label="查询日期">
  23. <el-date-picker
  24. clearable
  25. v-model="formInline.time"
  26. type="daterange"
  27. range-separator="至"
  28. start-placeholder="开始日期"
  29. value-format="yyyy-MM-dd"
  30. end-placeholder="结束日期">
  31. </el-date-picker>
  32. </el-form-item>
  33. <el-form-item>
  34. <el-button type="primary" @click="queryAll">查询</el-button>
  35. </el-form-item>
  36. </el-form>
  37. <br>
  38. <br>
  39. <br>
  40. <div style="width: 100%;display: flex;justify-content: space-between;">
  41. <div style="width: 33%;height: 400px;">
  42. <h4 style="color: white">泊位数量</h4>
  43. <piechart
  44. class="model-pie-body"
  45. id="chart1"
  46. :radiusArr="['30%', '70%']"
  47. :roseType = "false"
  48. :colorArr="modelPieColor"
  49. :labelFormat="['{name|{b}}', '{sub|{@value} 个 {d}%}', '{hr|}']"
  50. :dataset="modelData"
  51. :encode="{ itemName: 'name', value: 'value' }"
  52. />
  53. </div>
  54. <div style="width: 33%;height: 400px;">
  55. <h4 style="color: white">充电桩</h4>
  56. <piechart
  57. class="model-pie-body"
  58. id="chart2"
  59. :radiusArr="['30%', '70%']"
  60. :roseType = "false"
  61. :colorArr="modelPieColor2"
  62. :labelFormat="['{name|{b}}', '{sub|{@value} 个 {d}%}', '{hr|}']"
  63. :dataset="modelData2"
  64. :encode="{ itemName: 'name', value: 'value' }"
  65. />
  66. </div>
  67. <div style="width: 33%;height: 400px;">
  68. <h4 style="color: white">残疾车位</h4>
  69. <piechart
  70. class="model-pie-body"
  71. id="chart3"
  72. :radiusArr="['30%', '70%']"
  73. :roseType = "false"
  74. :colorArr="modelPieColor3"
  75. :labelFormat="['{name|{b}}', '{sub|{@value} 个 {d}%}', '{hr|}']"
  76. :dataset="modelData3"
  77. :encode="{ itemName: 'name', value: 'value' }"
  78. />
  79. </div>
  80. <br>
  81. </div>
  82. </div>
  83. </template>
  84. <script>
  85. import api from "@/api/article_liao";
  86. import piechart from "@/components/pieChart";
  87. import options from '@/util/options'
  88. export default {
  89. components: {
  90. piechart
  91. },
  92. data() {
  93. return {
  94. districtOptions: options.districtOptions,
  95. keyAreaOptions: options.keyAreaOptions,
  96. carOptions: [],
  97. columns: [
  98. {
  99. label: '日期',
  100. key: 'resourceName'
  101. },
  102. {
  103. label: '操作',
  104. key: 'resourceType'
  105. },
  106. {
  107. label: '用户',
  108. key: 'userName'
  109. },
  110. {
  111. label: '详情',
  112. key: 'applyTypeText'
  113. },
  114. {
  115. label: 'IP地址',
  116. key: 'applyTypeText'
  117. }
  118. ],
  119. modelPieColor: ["#2E8B57","#9078f8"],
  120. modelData: [],
  121. modelPieColor2: ["#2E8B57","#9078f8"],
  122. modelData2: [],
  123. modelPieColor3: ["#2E8B57","#9078f8"],
  124. modelData3: [],
  125. formInline: {
  126. regionCode: '',
  127. keyAreas: '',
  128. streetName: '',
  129. parkId: '',
  130. time: [],
  131. }
  132. }
  133. },
  134. mounted() {
  135. this.getParkDic()
  136. this.queryAll()
  137. },
  138. watch: {
  139. },
  140. methods: {
  141. getParkDic() {
  142. api.parkDic().then(res => {
  143. this.carOptions = res.data || [];
  144. })
  145. },
  146. queryAll() {
  147. let params = {...this.formInline}
  148. if (
  149. this.formInline.time && this.formInline.time.length === 2 &&
  150. this.formInline.time[1] !== ""
  151. ) {
  152. this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
  153. this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
  154. params.begin= this.formInline.time[0]
  155. params.end = this.formInline.time[1]
  156. }
  157. delete params.time
  158. this.dashBerthsInformationStat1(params)
  159. this.dashBerthsInformationStat2(params)
  160. this.dashBerthsInformationStat3(params)
  161. },
  162. dashBerthsInformationStat1(params){
  163. api.dashBerthsInformationStat1(params).then(res =>{
  164. this.modelData = res.data
  165. })
  166. },
  167. dashBerthsInformationStat2(params){
  168. api.dashBerthsInformationStat2(params).then(res =>{
  169. this.modelData2 = res.data
  170. })
  171. },
  172. dashBerthsInformationStat3(params){
  173. api.dashBerthsInformationStat3(params).then(res =>{
  174. this.modelData3 = res.data
  175. })
  176. },
  177. }
  178. }
  179. </script>
  180. <style lang="scss" scoped>
  181. .form-wrapper {
  182. margin-bottom: 20px;
  183. }
  184. /deep/ .el-input__inner {
  185. background: #2d3744;
  186. border: none;
  187. border-radius: 0;
  188. }
  189. /deep/ .el-select {
  190. height: 40px;
  191. .el-input__inner {
  192. height: 40px;
  193. }
  194. .el-input__prefix, .el-input__suffix {
  195. height: 40px;
  196. }
  197. /* 下面设置右侧按钮居中 */
  198. .el-input__suffix {
  199. top: 0px;
  200. display: flex;
  201. justify-content: center;
  202. align-items: center;
  203. flex-wrap: nowrap;
  204. flex-direction: row;
  205. align-content: flex-start;
  206. }
  207. /* 输入框加上上下边是 32px + 2px =34px */
  208. .el-input__icon {
  209. line-height: 0px;
  210. }
  211. }
  212. /deep/ .form-wrapper .el-button {
  213. background: linear-gradient(90deg,#0158d9,#3c97e4);
  214. width: 100px;
  215. height: 40px;
  216. }
  217. .body-wrapper {
  218. padding: 20px;
  219. background: #0c0c0c;
  220. .button-block{
  221. text-align: right;
  222. margin-bottom: 20px;
  223. }
  224. .table-pagination{
  225. text-align: right;
  226. }
  227. }
  228. .audit-dialog{
  229. .mg-bt{
  230. margin-bottom: 24px;
  231. }
  232. .label{
  233. text-align: right;
  234. }
  235. }
  236. /deep/ .el-textarea.is-disabled .el-textarea__inner {
  237. background: #2a2a2a;
  238. color: #fff;
  239. }
  240. </style>