123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <template>
- <div class="body-wrapper">
- <el-form class="form-wrapper" :inline="true" :model="formInline">
- <el-form-item label="行政区">
- <el-select clearable v-model="formInline.regionCode" placeholder="请选择" popper-class="cur-select">
- <el-option v-for="item in districtOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="重点区域">
- <el-select clearable v-model="formInline.keyAreas" placeholder="请选择" popper-class="cur-select">
- <el-option v-for="item in keyAreaOptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="具体道路">
- <el-input v-model="formInline.streetName" placeholder="请输入"></el-input>
- </el-form-item>
- <el-form-item label="停车场">
- <el-select clearable v-model="formInline.parkId" placeholder="请选择" popper-class="cur-select">
- <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="查询日期">
- <el-date-picker
- clearable
- v-model="formInline.time"
- type="daterange"
- range-separator="至"
- start-placeholder="开始日期"
- value-format="yyyy-MM-dd"
- end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="queryAll">查询</el-button>
- </el-form-item>
- </el-form>
- <br>
- <br>
- <br>
- <div style="width: 100%;display: flex;justify-content: space-between;">
- <div style="width: 33%;height: 400px;">
- <h4 style="color: white">泊位数量</h4>
- <piechart
- class="model-pie-body"
- id="chart1"
- :radiusArr="['30%', '70%']"
- :roseType = "false"
- :colorArr="modelPieColor"
- :labelFormat="['{name|{b}}', '{sub|{@value} 个 {d}%}', '{hr|}']"
- :dataset="modelData"
- :encode="{ itemName: 'name', value: 'value' }"
- />
- </div>
- <div style="width: 33%;height: 400px;">
- <h4 style="color: white">充电桩</h4>
- <piechart
- class="model-pie-body"
- id="chart2"
- :radiusArr="['30%', '70%']"
- :roseType = "false"
- :colorArr="modelPieColor2"
- :labelFormat="['{name|{b}}', '{sub|{@value} 个 {d}%}', '{hr|}']"
- :dataset="modelData2"
- :encode="{ itemName: 'name', value: 'value' }"
- />
- </div>
- <div style="width: 33%;height: 400px;">
- <h4 style="color: white">残疾车位</h4>
- <piechart
- class="model-pie-body"
- id="chart3"
- :radiusArr="['30%', '70%']"
- :roseType = "false"
- :colorArr="modelPieColor3"
- :labelFormat="['{name|{b}}', '{sub|{@value} 个 {d}%}', '{hr|}']"
- :dataset="modelData3"
- :encode="{ itemName: 'name', value: 'value' }"
- />
- </div>
- <br>
- </div>
- </div>
- </template>
- <script>
- import api from "@/api/article_liao";
- import piechart from "@/components/pieChart";
- import options from '@/util/options'
- export default {
- components: {
- piechart
- },
- data() {
- return {
- districtOptions: options.districtOptions,
- keyAreaOptions: options.keyAreaOptions,
- carOptions: [],
- columns: [
- {
- label: '日期',
- key: 'resourceName'
- },
- {
- label: '操作',
- key: 'resourceType'
- },
- {
- label: '用户',
- key: 'userName'
- },
- {
- label: '详情',
- key: 'applyTypeText'
- },
- {
- label: 'IP地址',
- key: 'applyTypeText'
- }
- ],
- modelPieColor: ["#2E8B57","#9078f8"],
- modelData: [],
- modelPieColor2: ["#2E8B57","#9078f8"],
- modelData2: [],
- modelPieColor3: ["#2E8B57","#9078f8"],
- modelData3: [],
- formInline: {
- regionCode: '',
- keyAreas: '',
- streetName: '',
- parkId: '',
- time: [],
- }
- }
- },
- mounted() {
- this.getParkDic()
- this.queryAll()
- },
- watch: {
- },
- methods: {
- getParkDic() {
- api.parkDic().then(res => {
- this.carOptions = res.data || [];
- })
- },
- queryAll() {
- let params = {...this.formInline}
- if (
- this.formInline.time && this.formInline.time.length === 2 &&
- this.formInline.time[1] !== ""
- ) {
- this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
- this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
- params.begin= this.formInline.time[0]
- params.end = this.formInline.time[1]
- }
- delete params.time
- this.dashBerthsInformationStat1(params)
- this.dashBerthsInformationStat2(params)
- this.dashBerthsInformationStat3(params)
- },
- dashBerthsInformationStat1(params){
- api.dashBerthsInformationStat1(params).then(res =>{
- this.modelData = res.data
- })
- },
- dashBerthsInformationStat2(params){
- api.dashBerthsInformationStat2(params).then(res =>{
- this.modelData2 = res.data
- })
- },
- dashBerthsInformationStat3(params){
- api.dashBerthsInformationStat3(params).then(res =>{
- this.modelData3 = res.data
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .form-wrapper {
- margin-bottom: 20px;
- }
- /deep/ .el-input__inner {
- background: #2d3744;
- border: none;
- border-radius: 0;
- }
- /deep/ .el-select {
- height: 40px;
- .el-input__inner {
- height: 40px;
- }
- .el-input__prefix, .el-input__suffix {
- height: 40px;
- }
- /* 下面设置右侧按钮居中 */
- .el-input__suffix {
- top: 0px;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-wrap: nowrap;
- flex-direction: row;
- align-content: flex-start;
- }
- /* 输入框加上上下边是 32px + 2px =34px */
- .el-input__icon {
- line-height: 0px;
- }
- }
- /deep/ .form-wrapper .el-button {
- background: linear-gradient(90deg,#0158d9,#3c97e4);
- width: 100px;
- height: 40px;
- }
- .body-wrapper {
- padding: 20px;
- background: #0c0c0c;
- .button-block{
- text-align: right;
- margin-bottom: 20px;
- }
- .table-pagination{
- text-align: right;
- }
- }
- .audit-dialog{
- .mg-bt{
- margin-bottom: 24px;
- }
- .label{
- text-align: right;
- }
- }
- /deep/ .el-textarea.is-disabled .el-textarea__inner {
- background: #2a2a2a;
- color: #fff;
- }
- </style>
|