|  | @@ -3,7 +3,7 @@
 | 
	
		
			
				|  |  |   * @Author: wangcc
 | 
	
		
			
				|  |  |   * @Date: 2023-01-09 11:22:53
 | 
	
		
			
				|  |  |   * @LastEditors: wangcc
 | 
	
		
			
				|  |  | - * @LastEditTime: 2023-01-29 17:59:41
 | 
	
		
			
				|  |  | + * @LastEditTime: 2023-01-30 14:55:59
 | 
	
		
			
				|  |  |   * @FilePath: \parking_LargeScreen\src\components\ParkingRate\index.vue
 | 
	
		
			
				|  |  |   * @Copyright: Copyright (c) 2016~2023 by wangcc, All Rights Reserved. 
 | 
	
		
			
				|  |  |  -->
 | 
	
	
		
			
				|  | @@ -98,32 +98,86 @@
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div class="vehicle-circumstance">
 | 
	
		
			
				|  |  |        <div class="rankTitle">
 | 
	
		
			
				|  |  | -          <h3>路段停车位情况</h3>
 | 
	
		
			
				|  |  | -        </div>
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  | +        <h3>路段停车位情况</h3>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <div class="selectTime">
 | 
	
		
			
				|  |  | +        <span>时间</span>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model="roadValue"
 | 
	
		
			
				|  |  | +          style="width:88px;height:24px"
 | 
	
		
			
				|  |  | +          @change="selectChangeRoad"
 | 
	
		
			
				|  |  | +          :popper-append-to-body="false"
 | 
	
		
			
				|  |  | +          size="mini"
 | 
	
		
			
				|  |  | +          placeholder="请选择"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option v-for="item in options" :key="item.type" :label="item.name" :value="item.type"></el-option>
 | 
	
		
			
				|  |  | +        </el-select>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <div class="chart-box">
 | 
	
		
			
				|  |  | +        <road-charts :option="roadData" v-if="hackReset"></road-charts>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    </div>
 | 
	
		
			
				|  |  | +    <div class="vehicle-circumstance">
 | 
	
		
			
				|  |  | +      <div class="rankTitle">
 | 
	
		
			
				|  |  | +        <h3>停车场车位情况</h3>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <div class="selectTime">
 | 
	
		
			
				|  |  | +        <span>时间</span>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model="parkValue"
 | 
	
		
			
				|  |  | +          style="width:88px;height:24px"
 | 
	
		
			
				|  |  | +          @change="selectChangePark"
 | 
	
		
			
				|  |  | +          :popper-append-to-body="false"
 | 
	
		
			
				|  |  | +          size="mini"
 | 
	
		
			
				|  |  | +          placeholder="请选择"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option v-for="item in options" :key="item.type" :label="item.name" :value="item.type"></el-option>
 | 
	
		
			
				|  |  | +        </el-select>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +      <div class="chart-box">
 | 
	
		
			
				|  |  | +        <park-charts :option="parkData" v-if="parkHackReset"></park-charts>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import CountTo from 'vue-count-to';
 | 
	
		
			
				|  |  | -import { vehicleData } from '@/api/http';
 | 
	
		
			
				|  |  | +import { vehicleData,roadSpace,parkSpace } from '@/api/http';
 | 
	
		
			
				|  |  | +import roadCharts from '@/components/charts/roadCharts.vue'
 | 
	
		
			
				|  |  | +import parkCharts from '@/components/charts/parkCharts.vue'
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: '',
 | 
	
		
			
				|  |  | -  components: { CountTo },
 | 
	
		
			
				|  |  | +  components: { CountTo,roadCharts,parkCharts },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      hackReset:false,
 | 
	
		
			
				|  |  | +      parkHackReset: false,
 | 
	
		
			
				|  |  |        value: '',
 | 
	
		
			
				|  |  |        cur: 0,
 | 
	
		
			
				|  |  |        parkCur: 0,
 | 
	
		
			
				|  |  |        playerRoadUrl: '',
 | 
	
		
			
				|  |  |        playerUrl: '',
 | 
	
		
			
				|  |  |        startVal: 0,
 | 
	
		
			
				|  |  | +      parkValue:'0',
 | 
	
		
			
				|  |  | +      roadValue: '0',
 | 
	
		
			
				|  |  |        videoPlayerOnePark: null,
 | 
	
		
			
				|  |  |        videoPlayerOneRoad: null,
 | 
	
		
			
				|  |  |        rankOptions: [],
 | 
	
		
			
				|  |  |        parkOptions: [],
 | 
	
		
			
				|  |  | -      totalData: {}
 | 
	
		
			
				|  |  | +      totalData: {},
 | 
	
		
			
				|  |  | +      options: [
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          type: '0',
 | 
	
		
			
				|  |  | +          name: '近7日'
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          type: '1',
 | 
	
		
			
				|  |  | +          name: '近30天'
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      ],
 | 
	
		
			
				|  |  | +      roadData:[],
 | 
	
		
			
				|  |  | +      parkData:[]
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
	
		
			
				|  | @@ -131,7 +185,9 @@ export default {
 | 
	
		
			
				|  |  |      this.videoPlayerRoad();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  | -    this.getVehicleData()
 | 
	
		
			
				|  |  | +    this.getVehicleData();
 | 
	
		
			
				|  |  | +    this.getRoadSpace();
 | 
	
		
			
				|  |  | +    this.getParkSpace();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    destroyed() {
 | 
	
		
			
				|  |  |      // 页面销毁,同时也销毁 TcPlayer
 | 
	
	
		
			
				|  | @@ -180,7 +236,34 @@ export default {
 | 
	
		
			
				|  |  |          remember: 1,
 | 
	
		
			
				|  |  |          controls: 'none'
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    selectChangeRoad(e) {
 | 
	
		
			
				|  |  | +      this.roadValue = e
 | 
	
		
			
				|  |  | +      this.getRoadSpace()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    selectChangePark(e) {
 | 
	
		
			
				|  |  | +      this.parkValue = e
 | 
	
		
			
				|  |  | +      this.getParkSpace()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 获取路段情况
 | 
	
		
			
				|  |  | +    async getRoadSpace() {
 | 
	
		
			
				|  |  | +      this.hackReset = false;
 | 
	
		
			
				|  |  | +      let {code,data} = await roadSpace({timeType:this.roadValue});
 | 
	
		
			
				|  |  | +      if (code == 200) {
 | 
	
		
			
				|  |  | +        this.hackReset = true;
 | 
	
		
			
				|  |  | +        this.roadData = data;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    // 获取路段情况
 | 
	
		
			
				|  |  | +    async getParkSpace() {
 | 
	
		
			
				|  |  | +      this.parkHackReset = false;
 | 
	
		
			
				|  |  | +      let {code,data} = await parkSpace({timeType:this.parkValue});
 | 
	
		
			
				|  |  | +      if (code == 200) {
 | 
	
		
			
				|  |  | +        this.parkHackReset = true;
 | 
	
		
			
				|  |  | +        this.parkData = data;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  </script>
 | 
	
	
		
			
				|  | @@ -221,7 +304,7 @@ export default {
 | 
	
		
			
				|  |  |    background: linear-gradient(90deg, #293446 0%, rgba(41, 52, 70, 0.2) 100%);
 | 
	
		
			
				|  |  |    backdrop-filter: blur(10px);
 | 
	
		
			
				|  |  |    width: 890px;
 | 
	
		
			
				|  |  | -  height: 520px;
 | 
	
		
			
				|  |  | +  height: 500px;
 | 
	
		
			
				|  |  |    float: left;
 | 
	
		
			
				|  |  |    overflow: hidden;
 | 
	
		
			
				|  |  |    padding: 20px;
 | 
	
	
		
			
				|  | @@ -301,4 +384,81 @@ export default {
 | 
	
		
			
				|  |  |    justify-content: center;
 | 
	
		
			
				|  |  |    align-items: center;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +.vehicle-circumstance {
 | 
	
		
			
				|  |  | +  background: linear-gradient(90deg, #293446 0%, rgba(41, 52, 70, 0.2) 100%);
 | 
	
		
			
				|  |  | +  backdrop-filter: blur(10px);
 | 
	
		
			
				|  |  | +  width: 890px;
 | 
	
		
			
				|  |  | +  height: 317px;
 | 
	
		
			
				|  |  | +  float: left;
 | 
	
		
			
				|  |  | +  overflow: hidden;
 | 
	
		
			
				|  |  | +  padding: 20px;
 | 
	
		
			
				|  |  | +  margin-top: 10px;
 | 
	
		
			
				|  |  | +  margin-left: 10px;
 | 
	
		
			
				|  |  | +  .rankTitle {
 | 
	
		
			
				|  |  | +    text-align: left;
 | 
	
		
			
				|  |  | +    // padding-left: 20px;
 | 
	
		
			
				|  |  | +    font-size: 16px;
 | 
	
		
			
				|  |  | +    color: #ffffff;
 | 
	
		
			
				|  |  | +    /* line-height: 22px; */
 | 
	
		
			
				|  |  | +    margin-bottom: 12px;
 | 
	
		
			
				|  |  | +    display: flex;
 | 
	
		
			
				|  |  | +    height: 22px;
 | 
	
		
			
				|  |  | +    align-items: center;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  .rankTitle::before {
 | 
	
		
			
				|  |  | +    content: '';
 | 
	
		
			
				|  |  | +    width: 16px;
 | 
	
		
			
				|  |  | +    height: 15px;
 | 
	
		
			
				|  |  | +    display: inline-block;
 | 
	
		
			
				|  |  | +    background-image: url('@/assets/images/check.png');
 | 
	
		
			
				|  |  | +    background-size: 100% 100%;
 | 
	
		
			
				|  |  | +    margin-right: 10px;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  .selectTime{
 | 
	
		
			
				|  |  | +    height: 34px;
 | 
	
		
			
				|  |  | +    display: flex;
 | 
	
		
			
				|  |  | +    align-items: center;
 | 
	
		
			
				|  |  | +    span{
 | 
	
		
			
				|  |  | +      margin-right: 16px;
 | 
	
		
			
				|  |  | +      font-size: 18px;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  .chart-box{
 | 
	
		
			
				|  |  | +    height: 250px;
 | 
	
		
			
				|  |  | +    width: 100%;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  ::v-deep .el-input__inner {
 | 
	
		
			
				|  |  | +    background-color: transparent;
 | 
	
		
			
				|  |  | +    border-radius:unset;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  ::v-deep .el-select-dropdown__item {
 | 
	
		
			
				|  |  | +    color: #fff;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  ::v-deep .el-scrollbar,
 | 
	
		
			
				|  |  | +  ::v-deep .el-select-dropdown {
 | 
	
		
			
				|  |  | +    background-color: transparent !important;
 | 
	
		
			
				|  |  | +    color: #fff !important;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  ::v-deep .el-scrollbar__wrap,
 | 
	
		
			
				|  |  | +  ::v-deep .el-select-dropdown__list {
 | 
	
		
			
				|  |  | +    background-color: #0b1a37;
 | 
	
		
			
				|  |  | +    color: #fff !important;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  ::v-deep .el-select-dropdown__item.hover,
 | 
	
		
			
				|  |  | +  .el-select-dropdown__item:hover {
 | 
	
		
			
				|  |  | +    background-color: rgba(0, 0, 0, 0.3);
 | 
	
		
			
				|  |  | +    color: #fff;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  ::v-deep .el-select-dropdown__empty {
 | 
	
		
			
				|  |  | +    color: #fff !important;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  ::v-deep .el-input--mini .el-input__inner{
 | 
	
		
			
				|  |  | +    height: 24px;
 | 
	
		
			
				|  |  | +    line-height: 24px;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 |