123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- <template>
- <div class="body-wrapper">
- <h4 style="color: #FFFFFF">泊位营收情况</h4>
- <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 clearable 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 clearable 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>
- <div style="width: 100%;">
- <div style="width: 100%;height: 400px;">
- <h4 style="color: white">按小时统计</h4>
- <br>
- <linechart
- :autoStop="false"
- :top="30"
- :bottom="30"
- :left="40"
- :legendTop="0"
- yAxisName="(元)"
- :dataset="linedata"
- :tooltipFormat="lineTooltipFormat"
- :encode="[
- { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
- ]"
- id="axstj"
- />
- </div>
- <br>
- <br>
- <br>
- <div style="width: 100%;height: 400px;">
- <h4 style="color: white">按日统计</h4>
- <br>
- <linechart
- :autoStop="false"
- :top="30"
- :bottom="30"
- :left="40"
- :legendTop="0"
- yAxisName="(元)"
- :dataset="linedata2"
- :tooltipFormat="lineTooltipFormat"
- :encode="[
- { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
- ]"
- id="artj"
- />
- </div>
- <br>
- <br>
- <br>
- <div style="width: 100%;height: 400px;">
- <h4 style="color: white">按周统计</h4>
- <br>
- <linechart
- :autoStop="false"
- :top="30"
- :bottom="30"
- :left="40"
- :legendTop="0"
- yAxisName="(元)"
- :dataset="linedata3"
- :tooltipFormat="lineTooltipFormat"
- :encode="[
- { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
- ]"
- id="aztj"
- />
- </div>
- <br>
- <br>
- <br>
- <div style="width: 100%;height: 400px;">
- <h4 style="color: white">按月统计</h4>
- <br>
- <linechart
- :autoStop="false"
- :top="30"
- :bottom="30"
- :left="40"
- :legendTop="0"
- yAxisName="(元)"
- :dataset="linedata4"
- :tooltipFormat="lineTooltipFormat"
- :encode="[
- { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
- ]"
- id="aytj"
- />
- </div>
- <br>
- <br>
- <br>
- <div style="width: 100%;height: 400px;">
- <h4 style="color: white">按年统计</h4>
- <br>
- <linechart
- :autoStop="false"
- :top="30"
- :bottom="30"
- :left="40"
- :legendTop="0"
- yAxisName="(元)"
- :dataset="linedata5"
- :tooltipFormat="lineTooltipFormat"
- :encode="[
- { x: 'mouth', y: 'lastAmount', seriesName: '',bool:'true' },
- ]"
- id="antj"
- />
- </div>
- <br>
- </div>
- </div>
- </template>
- <script>
- import api from "@/api/article_liao";
- import linechart from "@/components/lineChart";
- import options from '@/util/options'
- export default {
- components: {
- linechart
- },
- data() {
- return {
- districtOptions: options.districtOptions,
- keyAreaOptions: options.keyAreaOptions,
- carOptions: [],
- linedata: [],
- linedata2: [],
- linedata3: [],
- linedata4: [],
- linedata5: [],
- tableData: [],
- total: 0,
- pageSize: 10,
- pageNum: 1,
- radio: '2',
- dialogVisible: false,
- selRow: {},
- 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.dashBerthsRevenueStat1(params)
- this.dashBerthsRevenueStat2(params)
- this.dashBerthsRevenueStat3(params)
- this.dashBerthsRevenueStat4(params)
- this.dashBerthsRevenueStat5(params)
- },
- lineTooltipFormat(params) {
- return `<div class="line-tooltip">
- <div style="color: ${params[0].color}">${params[0].data.mouth} : ${
- params[0].data.lastAmount || "--"
- }元</div>`;
- },
- dashBerthsRevenueStat1(params){
- api.dashBerthsRevenueStat1(params).then(res =>{
- this.linedata = res.data
- })
- },
- dashBerthsRevenueStat2(params){
- api.dashBerthsRevenueStat2(params).then(res =>{
- this.linedata2 = res.data
- })
- },
- dashBerthsRevenueStat3(params){
- api.dashBerthsRevenueStat3(params).then(res =>{
- this.linedata3 = res.data
- })
- },
- dashBerthsRevenueStat4(params){
- api.dashBerthsRevenueStat4(params).then(res =>{
- this.linedata4 = res.data
- })
- },
- dashBerthsRevenueStat5(params){
- api.dashBerthsRevenueStat5(params).then(res =>{
- this.linedata5 = 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>
|