automatic-registration-of-user.vue
5.95 KB
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<style>
.button-green {
border: 1px solid #649fa3;
color: #649fa3;
}
.btn {
display: inline-block;
border-radius: 8px;
padding: 0 20px;
height: 34px;
line-height: 32px;
font-size: 14px;
background: inherit;
text-decoration: none !important;
}
.button-green:hover {
color: #fff;
background: #649fa3;
}
</style>
<template>
<div class="container resource close-left-menu">
<div class="pop-banner clearfix">
<div class="operate-btns">
<!-- <a href="javascript:;" class="fbtn" @click='allAdd'>全部生成供应关系</a> -->
</div>
<h3 class="current-module">自动注册用户监控</h3>
</div>
<div class="f-size16 text-color-green">
<span class="fl ml-198">今日新增注册数<b class="text-color-red"> {{getRegistSumList.one}}</b></span>
<span class="fl ml-120">近3日新增注册数 <b class="text-color-red"> {{getRegistSumList.three}}</b></span>
<span class="fl ml-120">近7日新增注册数<b class="text-color-red"> {{getRegistSumList.seven}}</b></span>
</div>
<div id='ecstyle' style='width:100%;height:400px;padding-top:60px;padding-bottom: 30px;'></div>
<!--supply-productlist start-->
<div class="supply-productlist clearfix">
<table class="itable itable-thead-13px itable-td-long-text mb-20">
<thead>
<tr>
<th class="w50">序号</th>
<th class="w70">单位名称</th>
<th class="w70">联系人</th>
<th class="w140">联系电话</th>
<th class="w100">自动注册时间</th>
</tr>
</thead>
<tbody>
<tr v-if="hospitalProductList.length == 0"><td colspan="5">暂无数据!</td></tr>
<tr v-for="hospitalProduct in hospitalProductList">
<td class="v-top">{{$index + 1 | getIndex}}</td>
<td class="t-left v-top">{{hospitalProduct.chinesename}}</td>
<td class="t-center v-top">{{hospitalProduct.linkman}}</td>
<td class="t-center v-top">{{hospitalProduct.logonuser}}</td>
<td class="t-center v-top">{{hospitalProduct.create_time}}</td>
</tr>
</tbody>
</table>
<pagination @page-change="getData" :page-no.sync="search.page" :total-pages.sync="search.totalPages"></pagination>
</div>
</div>
</template>
<script>
var echarts_api1 = require('../../options/echarts_api.js');
module.exports = {
data: function() {
return {
getRegistSumList:'',
hospitalProductList: [],
search: {
pageSize: 10,
page: 1,
totalPages: 0
},
};
},
methods: {
getRegistSum: function() {
var self = this;
Ajax.post('/supplier/getRegistSum')
.then(function(response) {
var data = response.data.data;
if(response.data.errorCode == 0) {
self.$set('getRegistSumList',data);
} else {
layer.msg(response.data.message);
}
})
},
getRegistSupplierList: function() {
var self = this;
Ajax.post('/supplier/getRegistSupplierList',self.search)
.then(function(response) {
var data = response.data.data;
if(response.data.errorCode == 0) {
self.$set('hospitalProductList',data.list);
self.search.totalPages = data.totalPages;
} else {
layer.msg(response.data.message);
}
})
},
getData: function() {
var self = this;
Ajax.post('/supplier/getAutoRegistList')
.then(function(response) {
var data = response.data.data;
if(response.data.errorCode == 0) {
self.echartsList('ecstyle',data);
} else {
layer.msg(response.data.message);
}
})
},
echartsList:function(sty,echlist){
var self=this;
var namess=[];
var valuess1=[];
var valuess=[];
// var color=['#4472c4','ed7d31'];
for(var i=0;i<echlist.length;i++){
namess.push(echlist[i].date);
valuess1.push(echlist[i].allcount);
valuess.push(echlist[i].count);
}
this.chartsty=echarts_api1.init(sty,{
title: {
left:'423',
text: '自动注册用户增长趋势',
},
color:['#4472c4','#ed7d31'],
tooltip : {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
left:'0',
data:['累计数量','较昨日新增']
},
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
type : 'category',
boundaryGap : true,
data : namess,
}
],
yAxis : [
{
type : 'value',
minInterval:1,
min:0,
max:25,
}
],
series : [
{
name:'累计数量',
type:'line',
stack: '总量',
data:valuess1,
},
{
name:'较昨日新增',
type:'line',
stack: '总量',
data:valuess,
},
]
},sty)
},
},
route: {
activate: function() {
var self=this;
self.getRegistSupplierList();
self.getRegistSum();
window.setTimeout(function (){
self.getData();
},1000);
}
}
};
</script>