3f535f30
杨鑫
'初始'
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
<template>
<div style="padding: 10px;background-color:#F2F3F5">
<div class="zhuti">
<div style="font-size:12px;font-weight:600">
推广效果统计
</div>
<div style="border: 1px solid #EBEEF5;width: 100%;padding:20px;margin: 20px 0;">
<div>
<el-radio-group v-model="radio1" size="mini" style="margin-right:10px">
<el-radio-button label="今日"></el-radio-button>
<el-radio-button label="昨日"></el-radio-button>
<el-radio-button label="近7天"></el-radio-button>
<el-radio-button label="近30天"></el-radio-button>
<el-radio-button label="自定义"></el-radio-button>
</el-radio-group>
<el-date-picker
size="mini"
v-model="value1"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
<div ref="chard" style="100%;height: 600px;" ></div>
</div>
<!-- 表格 -->
<el-table
:data="tableData"
:header-cell-style="{fontSize: '12px', backgroundColor: '#FAFAFA',color:'#000',fontWeight: 'normal'}"
:border="true"
style="width: 100%"
>
<el-table-column
label="序号"
width="auto"
min-width="4%"
prop="date"
align="center"
>
<template slot-scope="scope">
{{scope.$index +1}}
</template>
</el-table-column>
<el-table-column
label="渠道名称"
prop="schemeTitle"
width="auto"
min-width="12%"
>
</el-table-column>
<el-table-column
label="扫码次数"
prop="publisher"
width="auto"
min-width="5%"
>
</el-table-column>
<el-table-column
label="活动参与人数"
prop="applicant"
width="auto"
min-width="10%"
>
</el-table-column>
</el-table>
<div class="fenye">
<div style="line-height: 34px">显示第1到第10条记录</div>
<el-pagination
class="pagination"
:hide-on-single-page="flag"
background
small
:current-page="currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
layout="total,sizes,prev, pager,next"
:total="total "
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
</div>
</template>
<script>
import {auditGetAll,
auditQueryById,
auditadd,
auditedit,
auditdel} from '@/api/audit'
import * as echarts from 'echarts'
export default {
name: 'atmosphereGl',
data () {
return {
currentPage: 1,
radio1:0,
total: 100,
flag: false,
pageSize: 10,
tableData: [],
pageindex: {
pageNumber: 1,
pageSize: 10,
}
}
},
computed: {},
created() {
this.getAll()
},
mounted(){
this.charDam()
},
methods: {
charDam(){
let Dom = this.$refs.chard
let myChart = echarts.init(Dom);
let option = {
legend: {},
tooltip: {},
dataset: {
source: [
['抖音', 10000, 11115],
['小红书', 20000, 10000],
['微博', 10000, 20000],
['快手', 15500, 30000],
['朋友圈', 72.4, 53.9],
['豆瓣', 72.4, 53.9],
['视频号', 72.4, 53.9],
['知乎', 72.4, 53.9]
]
},
xAxis: { type: 'category' },
yAxis: {
type:'value',
max:40000
},
grid: {
left: '1%',
right: '1%',
top: '5%',
bottom: '6%',
containLabel: true
},
series: [{ type: 'bar', color:'rgb(61,182,211)'}, { type: 'bar',color:'#3f9b6a' }]
};
option && myChart.setOption(option);
},
async getAll(){
const res= await auditGetAll(this.pageindex)
this.tableData = res.data.content
},
handleSizeChange(){
},
handleCurrentChange(){
},
}
}
</script>
<style scoped>
.zhuti {
padding: 20px;
background-color: #Fff;
min-height: calc(100vh - 50px - 20px);
}
/deep/ .el-form-item__content {
line-height: 0;
}
|