Commit 43aeb10d by baihong

add:统计数据

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