Commit 43aeb10d by baihong

add:统计数据

parent ea69c526
......@@ -76,4 +76,9 @@ export const getActivityConfigByPay = (data) => {
}
export const delAdmins = (id) => {
return $http.delete('/cms/admins/'+id)
}
//活动统计
export const queryList = (data) => {
return $http.get('/cms/queryList',data)
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
<p slot="title">早起人数统计</p>
<div class="dateBox">
<DatePicker
:value="value2"
v-model="date"
format="yyyy/MM/dd"
type="daterange"
placement="bottom-end"
......@@ -14,7 +14,7 @@
></DatePicker>
</div>
<Row>
<div style="height: 310px;" ref="dom"></div>
<div style="height: 310px;" ref="dom"></div>
</Row>
</Card>
</div>
......@@ -22,22 +22,15 @@
</template>
<script>
import { queryList } from "@/api/clock/activityClocks";
import echarts from "echarts";
import { on, off } from "@/libs/tools";
export default {
name: "categories",
components: {
},
components: {},
data() {
return {
pieData: [
{ value: 335, name: "直接访问" },
{ value: 310, name: "邮件营销" },
{ value: 234, name: "联盟广告" },
{ value: 135, name: "视频广告" },
{ value: 1548, name: "搜索引擎" }
],
date: ["2021-01-01", "2021-09-15"],
dom: null,
tab: "1"
};
......@@ -45,42 +38,53 @@ export default {
methods: {
resize() {
this.dom.resize();
},
search() {
let params = {
language: "cn",
startDate: this.date[0],
endDate: this.date[1]
};
queryList(params).then(res => {
console.log(res)
});
}
},
mounted() {
this.search()
const option = {
tooltip: {
trigger: 'axis'
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
tooltip: {
trigger: "axis"
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true
},
xAxis: {
type: 'category',
},
xAxis: {
type: "category",
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
},
yAxis: {
type: "value"
},
series: [
{
name: '邮件营销',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
name: "报名人数",
type: "line",
stack: "总量",
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '联盟广告',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
name: "签到人数",
type: "line",
stack: "总量",
data: [220, 182, 191, 234, 290, 330, 310]
}
]
};
]
};
this.$nextTick(() => {
this.dom = echarts.init(this.$refs.dom);
console.log(this.dom);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment