parent
14db9d180f
commit
5ac0f8ac2f
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function activityRpt(params) {
|
||||
return request({
|
||||
url: '/api/admin/chart/activity',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function carparkRpt(params) {
|
||||
return request({
|
||||
url: '/api/admin/chart/carpark',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
@ -1,8 +1,124 @@
|
||||
<template>
|
||||
</template>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 查询配置 -->
|
||||
<div style="padding: 0px 20px">
|
||||
<div ref="lxHeader">
|
||||
<LxHeader icon="md-apps" text="活动年度统计报表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
|
||||
style="width: 200px"></DatePicker>
|
||||
|
||||
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</LxHeader>
|
||||
</div>
|
||||
<div class="table-tree" v-if="showData">
|
||||
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
|
||||
<el-table-column type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="month" label="月份" sortable width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_total" label="预约人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="use_total" label="入场人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="per" label="核销比" sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<line-chart :chartData="rptData" :height="chartHeight"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import LineChart from './components/LineChart'
|
||||
import {
|
||||
activityRpt
|
||||
} from "@/api/report/activity.js";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
LineChart
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
this.load()
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
showData: false,
|
||||
searchFields: {},
|
||||
tableData: [],
|
||||
tableHeight: 0,
|
||||
chartHeight:"",
|
||||
btnText:"数据展示",
|
||||
rptData: {
|
||||
xArr:[],
|
||||
series:{},
|
||||
legendArr:["预约人数","入场人数"]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewPart() {
|
||||
this.showData = !this.showData;
|
||||
this.btnText = this.showData ? "图表展示" : "数据展示"
|
||||
},
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
that.chartHeight = tableHeight+"px"
|
||||
|
||||
},
|
||||
load() {
|
||||
// this.showData = true;
|
||||
var xarr = [];
|
||||
var planarr=[];
|
||||
var usearr=[];
|
||||
activityRpt().then((res) => {
|
||||
for (var m of res) {
|
||||
m.month = m.month+"月";
|
||||
xarr.push(m.month);
|
||||
planarr.push(
|
||||
m.plan_total
|
||||
)
|
||||
usearr.push(
|
||||
m.use_total
|
||||
)
|
||||
}
|
||||
|
||||
this.rptData.xArr = xarr;
|
||||
this.rptData.series=[
|
||||
{
|
||||
name:"预约人数",
|
||||
type: 'bar',
|
||||
data:planarr
|
||||
},
|
||||
{
|
||||
name:"入场人数",
|
||||
type: 'bar',
|
||||
data:usearr
|
||||
}
|
||||
|
||||
<script>
|
||||
]
|
||||
this.tableData = res;
|
||||
}).catch((res) => {})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -1,8 +1,122 @@
|
||||
<template>
|
||||
</template>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 查询配置 -->
|
||||
<div style="padding: 0px 20px">
|
||||
<div ref="lxHeader">
|
||||
<LxHeader icon="md-apps" text="停车年度统计报表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
|
||||
style="width: 200px"></DatePicker>
|
||||
|
||||
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</LxHeader>
|
||||
</div>
|
||||
<div class="table-tree" v-if="showData">
|
||||
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
|
||||
<el-table-column type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="month" label="月份" sortable width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_total" label="预约车辆数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="use_total" label="入场车辆数" sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<line-chart :chartData="rptData" :height="chartHeight"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import LineChart from './components/LineChart'
|
||||
import {
|
||||
carparkRpt
|
||||
} from "@/api/report/parking.js";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
LineChart
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
this.load()
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
showData: false,
|
||||
searchFields: {},
|
||||
tableData: [],
|
||||
tableHeight: 0,
|
||||
chartHeight:"",
|
||||
btnText:"数据展示",
|
||||
rptData: {
|
||||
xArr:[],
|
||||
series:{},
|
||||
legendArr:["预约人数","入场人数"]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewPart() {
|
||||
this.showData = !this.showData;
|
||||
this.btnText = this.showData ? "图表展示" : "数据展示"
|
||||
},
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
that.chartHeight = tableHeight+"px"
|
||||
|
||||
},
|
||||
load() {
|
||||
// this.showData = true;
|
||||
var xarr = [];
|
||||
var planarr=[];
|
||||
var usearr=[];
|
||||
carparkRpt().then((res) => {
|
||||
for (var m of res) {
|
||||
m.month = m.month+"月";
|
||||
xarr.push(m.month);
|
||||
planarr.push(
|
||||
m.plan_total
|
||||
)
|
||||
usearr.push(
|
||||
m.use_total
|
||||
)
|
||||
}
|
||||
|
||||
this.rptData.xArr = xarr;
|
||||
this.rptData.series=[
|
||||
{
|
||||
name:"预约车辆数",
|
||||
type: 'bar',
|
||||
data:planarr
|
||||
},
|
||||
{
|
||||
name:"入场车辆数",
|
||||
type: 'bar',
|
||||
data:usearr
|
||||
}
|
||||
|
||||
<script>
|
||||
]
|
||||
this.tableData = res;
|
||||
}).catch((res) => {})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -1,8 +1,104 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 查询配置 -->
|
||||
<div style="padding: 0px 20px">
|
||||
<div ref="lxHeader">
|
||||
<LxHeader icon="md-apps" text="年龄分析报表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
|
||||
style="width: 200px"></DatePicker>
|
||||
|
||||
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</LxHeader>
|
||||
</div>
|
||||
<div class="table-tree" v-if="showData">
|
||||
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
|
||||
<el-table-column type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="年龄段" sortable width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_total" label="预约人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="use_total" label="入场人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="per" label="核销比" sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<pie-chart :chartData="rptData" :height="chartHeight"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import PieChart from '../components/PieChart'
|
||||
import {
|
||||
ageRpt
|
||||
} from "@/api/report/visit.js";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
PieChart
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
this.load()
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
showData: false,
|
||||
searchFields: {},
|
||||
tableData: [],
|
||||
tableHeight: 0,
|
||||
btnText:"数据展示",
|
||||
chartHeight:"",
|
||||
rptData: {
|
||||
yArr: [],
|
||||
radiusArr: ['30%', '50%'],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewPart() {
|
||||
this.showData = !this.showData;
|
||||
this.btnText = this.showData ? "数据展示" : "图表展示"
|
||||
},
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
that.chartHeight = that.tableHeight + "px"
|
||||
},
|
||||
load() {
|
||||
// this.showData = true;
|
||||
var arr = [];
|
||||
ageRpt().then((res) => {
|
||||
for (var m of res) {
|
||||
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
|
||||
|
||||
arr.push({
|
||||
name: m.name,
|
||||
value: m.plan_total
|
||||
})
|
||||
}
|
||||
this.rptData.yArr = arr;
|
||||
this.tableData = res;
|
||||
}).catch((res) => {})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -1,8 +1,125 @@
|
||||
<template>
|
||||
</template>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 查询配置 -->
|
||||
<div style="padding: 0px 20px">
|
||||
<div ref="lxHeader">
|
||||
<LxHeader icon="md-apps" text="参观明细统计报表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
|
||||
style="width: 200px"></DatePicker>
|
||||
|
||||
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</LxHeader>
|
||||
</div>
|
||||
<div class="table-tree" v-if="showData">
|
||||
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
|
||||
<el-table-column type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" label="参观时间" sortable width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_total" label="预约人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="use_total" label="入场人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="per" label="核销比" sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<line-chart :chartData="rptData" :height="chartHeight"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import LineChart from '../components/LineChart'
|
||||
import {
|
||||
visitdetailRpt
|
||||
} from "@/api/report/visit.js";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
LineChart
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
this.load()
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
showData: false,
|
||||
searchFields: {},
|
||||
tableData: [],
|
||||
tableHeight: 0,
|
||||
chartHeight:"",
|
||||
btnText:"数据展示",
|
||||
rptData: {
|
||||
xArr:[],
|
||||
series:{},
|
||||
rotate:45,
|
||||
legendArr:["预约人数","入场人数"]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewPart() {
|
||||
this.showData = !this.showData;
|
||||
this.btnText = this.showData ? "图表展示" : "数据展示"
|
||||
},
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
that.chartHeight = tableHeight+"px"
|
||||
|
||||
},
|
||||
load() {
|
||||
// this.showData = true;
|
||||
var xarr = [];
|
||||
var planarr=[];
|
||||
var usearr=[];
|
||||
visitdetailRpt().then((res) => {
|
||||
for (var m of res) {
|
||||
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
|
||||
xarr.push(m.date);
|
||||
planarr.push(
|
||||
m.plan_total
|
||||
)
|
||||
usearr.push(
|
||||
m.use_total
|
||||
)
|
||||
}
|
||||
|
||||
this.rptData.xArr = xarr;
|
||||
this.rptData.series=[
|
||||
{
|
||||
name:"预约人数",
|
||||
type: 'bar',
|
||||
data:planarr
|
||||
},
|
||||
{
|
||||
name:"入场人数",
|
||||
type: 'bar',
|
||||
data:usearr
|
||||
}
|
||||
|
||||
<script>
|
||||
]
|
||||
this.tableData = res;
|
||||
}).catch((res) => {})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -1,8 +1,125 @@
|
||||
<template>
|
||||
</template>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 查询配置 -->
|
||||
<div style="padding: 0px 20px">
|
||||
<div ref="lxHeader">
|
||||
<LxHeader icon="md-apps" text="月度增长分析统计报表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
|
||||
style="width: 200px"></DatePicker>
|
||||
|
||||
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</LxHeader>
|
||||
</div>
|
||||
<div class="table-tree" v-if="showData">
|
||||
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
|
||||
<el-table-column type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="month" label="月份" sortable width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_total" label="预约人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="use_total" label="入场人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="per" label="核销比" sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<line-chart :chartData="rptData" :height="chartHeight"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import LineChart from '../components/LineChart'
|
||||
import {
|
||||
monthRpt
|
||||
} from "@/api/report/visit.js";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
LineChart
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
this.load()
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
showData: false,
|
||||
searchFields: {},
|
||||
tableData: [],
|
||||
tableHeight: 0,
|
||||
chartHeight:"",
|
||||
btnText:"数据展示",
|
||||
rptData: {
|
||||
xArr:[],
|
||||
series:{},
|
||||
legendArr:["预约人数","入场人数"]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewPart() {
|
||||
this.showData = !this.showData;
|
||||
this.btnText = this.showData ? "图表展示" : "数据展示"
|
||||
},
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
that.chartHeight = tableHeight+"px"
|
||||
|
||||
},
|
||||
load() {
|
||||
// this.showData = true;
|
||||
var xarr = [];
|
||||
var planarr=[];
|
||||
var usearr=[];
|
||||
monthRpt().then((res) => {
|
||||
for (var m of res) {
|
||||
m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%"
|
||||
m.month = m.month+"月";
|
||||
xarr.push(m.month);
|
||||
planarr.push(
|
||||
m.plan_total
|
||||
)
|
||||
usearr.push(
|
||||
m.use_total
|
||||
)
|
||||
}
|
||||
|
||||
this.rptData.xArr = xarr;
|
||||
this.rptData.series=[
|
||||
{
|
||||
name:"预约人数",
|
||||
type: 'bar',
|
||||
data:planarr
|
||||
},
|
||||
{
|
||||
name:"入场人数",
|
||||
type: 'bar',
|
||||
data:usearr
|
||||
}
|
||||
|
||||
<script>
|
||||
]
|
||||
this.tableData = res;
|
||||
}).catch((res) => {})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -1,8 +1,147 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 查询配置 -->
|
||||
<div style="padding: 0px 20px">
|
||||
<div ref="lxHeader">
|
||||
<LxHeader icon="md-apps" text="季度增长统计报表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
|
||||
style="width: 200px"></DatePicker>
|
||||
|
||||
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</LxHeader>
|
||||
</div>
|
||||
<div class="table-tree" v-if="showData">
|
||||
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
|
||||
<el-table-column type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="datelist" label="季度" sortable width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_total" label="预约人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="use_total" label="入场人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="per" label="核销比" sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<line-chart :chartData="rptData" :height="chartHeight"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import LineChart from '../components/LineChart'
|
||||
import {
|
||||
quarterRpt
|
||||
} from "@/api/report/visit.js";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
LineChart
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
this.load()
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
showData: false,
|
||||
searchFields: {},
|
||||
tableData: [],
|
||||
tableHeight: 0,
|
||||
chartHeight:"",
|
||||
btnText:"数据展示",
|
||||
dataArr:[
|
||||
{
|
||||
id:'quarter1',
|
||||
value:"第一季度"
|
||||
},
|
||||
{
|
||||
id:'quarter2',
|
||||
value:"第二季度"
|
||||
},
|
||||
{
|
||||
id:'quarter3',
|
||||
value:"第三季度"
|
||||
},
|
||||
{
|
||||
id:'quarter4',
|
||||
value:"第四季度"
|
||||
}],
|
||||
rptData: {
|
||||
xArr:[],
|
||||
series:{},
|
||||
legendArr:[]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewPart() {
|
||||
this.showData = !this.showData;
|
||||
this.btnText = this.showData ? "图表展示" : "数据展示"
|
||||
},
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
that.chartHeight = tableHeight+"px"
|
||||
|
||||
},
|
||||
load() {
|
||||
// this.showData = true;
|
||||
var planarr=[];
|
||||
var xArr=[];
|
||||
var usearr=[];
|
||||
var tableArr = [];
|
||||
quarterRpt().then((res) => {
|
||||
for (var m of this.dataArr) {
|
||||
res[m.id].per = (res[m.id].use_total / (res[m.id].plan_total == 0 ? 1 : res[m.id].plan_total)) * 100 + "%"
|
||||
xArr.push(m.value);
|
||||
planarr.push(
|
||||
res[m.id].plan_total
|
||||
)
|
||||
usearr.push(
|
||||
res[m.id].use_total
|
||||
)
|
||||
tableArr.push({
|
||||
datelist:m.value,
|
||||
plan_total:res[m.id].plan_total,
|
||||
use_total:res[m.id].use_total,
|
||||
per:res[m.id].per
|
||||
})
|
||||
}
|
||||
this.rptData.series=[
|
||||
{
|
||||
name:"预约人数",
|
||||
type: 'bar',
|
||||
data:planarr
|
||||
},
|
||||
{
|
||||
name:"入场人数",
|
||||
type: 'bar',
|
||||
data:usearr
|
||||
}
|
||||
]
|
||||
this.rptData.xArr = xArr;
|
||||
this.rptData.legendArr = xArr;
|
||||
this.tableData = tableArr;
|
||||
}).catch((res) => {})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -1,8 +1,151 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 查询配置 -->
|
||||
<div style="padding: 0px 20px">
|
||||
<div ref="lxHeader">
|
||||
<LxHeader icon="md-apps" text="时段统计报表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<DatePicker type="daterange" :start-date="new Date()" placement="bottom-end" placeholder="参观日期区间"
|
||||
style="width: 200px"></DatePicker>
|
||||
|
||||
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" @click="viewPart" style="margin-left: 10px">{{btnText}}</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</LxHeader>
|
||||
</div>
|
||||
<div class="table-tree" v-if="showData">
|
||||
<el-table :data="tableData" :height="tableHeight" class="v-table" style="width: 100%">
|
||||
<el-table-column type="index" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="datelist" label="时段" sortable width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_total" label="预约人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="use_total" label="入场人数" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column prop="per" label="核销比" sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<line-chart :chartData="rptData" :height="chartHeight"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import LineChart from '../components/LineChart'
|
||||
import {
|
||||
duringRpt
|
||||
} from "@/api/report/visit.js";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
LineChart
|
||||
},
|
||||
created() {
|
||||
this.initLoad()
|
||||
this.load()
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
showData: false,
|
||||
searchFields: {},
|
||||
tableData: [],
|
||||
tableHeight: 0,
|
||||
chartHeight:"",
|
||||
btnText:"数据展示",
|
||||
dataArr:[
|
||||
{
|
||||
id:'this_week',
|
||||
value:"本周"
|
||||
},
|
||||
{
|
||||
id:'this_month',
|
||||
value:"本月"
|
||||
},
|
||||
{
|
||||
id:'last_month',
|
||||
value:"上一月"
|
||||
},
|
||||
{
|
||||
id:'this_year',
|
||||
value:"本年"
|
||||
},
|
||||
{
|
||||
id:'last_year',
|
||||
value:"上一年"
|
||||
}],
|
||||
rptData: {
|
||||
xArr:[],
|
||||
series:{},
|
||||
legendArr:[]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewPart() {
|
||||
this.showData = !this.showData;
|
||||
this.btnText = this.showData ? "图表展示" : "数据展示"
|
||||
},
|
||||
initLoad() {
|
||||
var that = this;
|
||||
var clientHeight = document.documentElement.clientHeight
|
||||
var lxHeader_height = 96.5; //查询 头部
|
||||
var paginationHeight = 37; //分页的高度
|
||||
var topHeight = 50; //页面 头部
|
||||
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
||||
that.tableHeight = tableHeight;
|
||||
that.chartHeight = tableHeight+"px"
|
||||
|
||||
},
|
||||
load() {
|
||||
// this.showData = true;
|
||||
var planarr=[];
|
||||
var xArr=[];
|
||||
var usearr=[];
|
||||
var tableArr = [];
|
||||
duringRpt().then((res) => {
|
||||
for (var m of this.dataArr) {
|
||||
res[m.id].per = (res[m.id].use_total / (res[m.id].plan_total == 0 ? 1 : res[m.id].plan_total)) * 100 + "%"
|
||||
xArr.push(m.value);
|
||||
planarr.push(
|
||||
res[m.id].plan_total
|
||||
)
|
||||
usearr.push(
|
||||
res[m.id].use_total
|
||||
)
|
||||
tableArr.push({
|
||||
datelist:m.value,
|
||||
plan_total:res[m.id].plan_total,
|
||||
use_total:res[m.id].use_total,
|
||||
per:res[m.id].per
|
||||
})
|
||||
}
|
||||
this.rptData.series=[
|
||||
{
|
||||
name:"预约人数",
|
||||
type: 'bar',
|
||||
data:planarr
|
||||
},
|
||||
{
|
||||
name:"入场人数",
|
||||
type: 'bar',
|
||||
data:usearr
|
||||
}
|
||||
]
|
||||
this.rptData.xArr = xArr;
|
||||
this.rptData.legendArr = xArr;
|
||||
this.tableData = tableArr;
|
||||
}).catch((res) => {})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Loading…
Reference in new issue