Procházet zdrojové kódy

add:移动端报表

weieryang %!s(int64=9) %!d(string=před) měsíci
rodič
revize
0c58ab6d30

+ 4 - 0
双汇APP-h5/Setting-1.html

@@ -82,6 +82,10 @@
82 82
 				<span class="mui-icon iconfont icon-gongzuojiaoban"></span>
83 83
 				<span class="mui-tab-label">我的任务</span>
84 84
 			</a>
85
+			<a class="mui-tab-item statics-icon" href="statics/index.html" index="1" style="display:none;">
86
+				<span class="mui-icon iconfont icon-iconfontgraph"></span>
87
+				<span class="mui-tab-label">统计</span>
88
+			</a>
85 89
 			<a class="mui-tab-item" href="tab-phone.html" index="1">
86 90
 				<span class="mui-icon iconfont icon-tongxunlu"></span>
87 91
 				<span class="mui-tab-label">通讯录</span>

File diff suppressed because it is too large
+ 9 - 0
双汇APP-h5/css/all.min.css


+ 3 - 0
双汇APP-h5/css/iconfont.css

@@ -109,3 +109,6 @@
109 109
 
110 110
 .icon-check1:before { content: "\e615"; }
111 111
 
112
+.icon-iconfontgraph:before {
113
+  content: "\e601";
114
+}

+ 4 - 0
双汇APP-h5/index.html

@@ -378,6 +378,10 @@
378 378
 				<span class="mui-icon iconfont icon-gongzuojiaoban"></span>
379 379
 				<span class="mui-tab-label">我的任务</span>
380 380
 			</a>
381
+			<a class="mui-tab-item statics-icon" href="statics/index.html" index="1" style="display:none;">
382
+				<span class="mui-icon iconfont icon-iconfontgraph"></span>
383
+				<span class="mui-tab-label">统计</span>
384
+			</a>
381 385
 			<a class="mui-tab-item" href="tab-phone.html" index="1">
382 386
 				<span class="mui-icon iconfont icon-tongxunlu"></span>
383 387
 				<span class="mui-tab-label">通讯录</span>

File diff suppressed because it is too large
+ 45 - 0
双汇APP-h5/js/echarts.min.js


+ 2 - 2
双汇APP-h5/js/huayi.config.js

@@ -2,9 +2,9 @@ if(huayi == undefined) {
2 2
 	var huayi = {};
3 3
 }
4 4
 huayi.config = {
5
-	 // callcenter_url: "http://oa.shuanghui.net:8046/",//生产环境
5
+	  callcenter_url: "http://oa.shuanghui.net:8046/",//生产环境
6 6
 	//callcenter_url: "http://121.196.219.217:8046/",//生产环境
7
-	callcenter_url: "http://192.168.8.9:1001/",//生产环境
7
+//	callcenter_url: "http://192.168.8.9:1001/",//生产环境
8 8
 	socket_ip: "222.143.137.63", //ip
9 9
 	socket_port: "8081", //端口
10 10
 	indexOutTime: 2000, //菜单工单数量刷新间隔

+ 12 - 0
双汇APP-h5/js/personal.js

@@ -37,6 +37,11 @@ $.ajax({
37 37
 			localStorage.setItem("RoleCode", RoleCode);
38 38
 			localStorage.setItem("F_See", data.data.user.F_See);
39 39
 			$(".rolname").text(data.data.user.rolname);
40
+			var role = data.data.role.F_RoleCode;
41
+			
42
+			localStorage.setItem("F_RoleCode", role);
43
+			
44
+			
40 45
 			if(RoleCode == "0") { //调度   
41 46
 				if(data.data.role.F_RoleCode == 'CLZY') {
42 47
 					$(".cx").show()
@@ -53,6 +58,13 @@ $.ajax({
53 58
 			} else if(RoleCode == "4") {
54 59
 				$(".RoleCode_4").css('display', 'block')
55 60
 			} 
61
+			
62
+			
63
+			
64
+			if (['XTGLY', 'ZR'].includes(role)) {
65
+				console.log(role, 'RoleCode')
66
+				$('.statics-icon').css('display', '')
67
+			}
56 68
 		} else {
57 69
 			window.location.href ="login.html"
58 70
 		}

+ 7 - 0
双汇APP-h5/js/setting.js

@@ -39,6 +39,13 @@ window.onload = function () {
39 39
 			
40 40
 		});
41 41
 	})
42
+	
43
+	var role = localStorage.getItem("F_RoleCode");
44
+
45
+	if(['XTGLY', 'ZR'].includes(role)) {
46
+		console.log(role, 'RoleCode')
47
+		$('.statics-icon').css('display', '')
48
+	}
42 49
 }
43 50
 
44 51
 

+ 6 - 0
双汇APP-h5/js/tab.js

@@ -89,6 +89,12 @@
89 89
     }
90 90
 
91 91
     function Ajax() {
92
+		var role = localStorage.getItem("F_RoleCode");
93
+
94
+		if(['XTGLY', 'ZR'].includes(role)) {
95
+			console.log(role, 'RoleCode')
96
+			$('.statics-icon').css('display', '')
97
+		}
92 98
 		
93 99
 		$(".tabli").remove()
94 100
     	page = 1;

+ 0 - 0
双汇APP-h5/js/tailwindcss.js


File diff suppressed because it is too large
+ 83 - 0
双汇APP-h5/js/tailwindcss3.4.16.js


+ 167 - 0
双汇APP-h5/statics/index.html

@@ -0,0 +1,167 @@
1
+<!DOCTYPE html>
2
+<html lang="zh-CN">
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+		<title>投诉数据分析</title>
8
+		<script src="../js/tailwindcss3.4.16.js"></script>
9
+		<script>
10
+			tailwind.config = {
11
+				theme: {
12
+					extend: {
13
+						colors: {
14
+							primary: '#4F46E5',
15
+							secondary: '#10B981'
16
+						},
17
+						borderRadius: {
18
+							'none': '0px',
19
+							'sm': '2px',
20
+							DEFAULT: '4px',
21
+							'md': '8px',
22
+							'lg': '12px',
23
+							'xl': '16px',
24
+							'2xl': '20px',
25
+							'3xl': '24px',
26
+							'full': '9999px',
27
+							'button': '4px'
28
+						}
29
+					}
30
+				}
31
+			}
32
+		</script>
33
+		<link rel="stylesheet" href="../css/all.min.css">
34
+		<script src="../js/echarts.min.js"></script>
35
+		<style>
36
+			body {
37
+				min-height: 100vh;
38
+				background-color: #F3F4F6;
39
+				width: 100%;
40
+				margin: 0 auto;
41
+			}
42
+			
43
+			.container {
44
+				max-width: 100%;
45
+			}
46
+			
47
+			.chart-container {
48
+				width: 100%;
49
+				height: 200px;
50
+			}
51
+			
52
+			.rate-chart {
53
+				height: 120px;
54
+			}
55
+			
56
+			@media (min-width: 640px) {
57
+				.container {
58
+					max-width: 375px;
59
+				}
60
+			}
61
+		</style>
62
+	</head>
63
+
64
+	<body>
65
+		<div class="container mx-auto px-4 py-4">
66
+
67
+			<div class="bg-white rounded-lg shadow-sm p-6 mb-6">
68
+				<div class="flex justify-between items-center mb-4">
69
+					<h2 class="text-xl font-medium">总投诉数 <span id="total">0</span> / <span name="selectType">周</span></h2>
70
+					<button class="text-gray-600 hover:text-gray-900" id="changeBut">
71
+                    <span name="selectType">周</span> <i class="fas fa-exchange ml-1"></i>
72
+                </button>
73
+				</div>
74
+				<div class="flex flex-col gap-4">
75
+					<div class="relative w-full h-6 bg-gray-100 rounded-full overflow-hidden">
76
+						<div class="absolute left-0 top-0 h-full bg-primary" style="width: 50%;" id="total_rate"></div>
77
+						<!--<div class="absolute left-[50%] top-0 h-full bg-gray-300" style="width: 50%;"></div>-->
78
+					</div>
79
+					<div class="flex items-center justify-between">
80
+						<div>
81
+							<div class="text-gray-600">三大类投诉数 <span id="thisnumber">0</span></div>
82
+							<div class="text-green-500 text-sm mt-1" id="thiscontrast_div">
83
+								<i class="fas fa-arrow-up mr-1" id="thiscontrast_i"></i> 较上周 <span id="thiscontrast">0</span>
84
+							</div>
85
+						</div>
86
+						<div>
87
+							<div class="text-gray-600">其他投诉数 <span id="otherthisnumber">0</span></div>
88
+							<div class="text-red-500 text-sm mt-1" id="othercontrast_div">
89
+								<i class="fas fa-arrow-down mr-1" id="othercontrast_i"></i> 较上周 <span id="othercontrast">0</span>
90
+							</div>
91
+						</div>
92
+					</div>
93
+				</div>
94
+			</div>
95
+			<div class="bg-white rounded-lg shadow-sm p-6 mb-6">
96
+				<h2 class="text-xl font-medium mb-6">三大类投诉情况</h2>
97
+				<div class="flex flex-col lg:flex-row gap-6">
98
+					<div id="complaintPie" class="chart-container lg:w-1/2"></div>
99
+					<div class="flex flex-col gap-4 lg:w-1/2">
100
+						<div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(0, '破袋发霉')">
101
+							<div class="flex items-center justify-between">
102
+								<div class="flex items-center gap-2">
103
+									<div class="w-3 h-3 bg-[#5470c6]"></div>
104
+									<span class="text-gray-600">破袋发霉</span>
105
+								</div>
106
+								<span class="font-medium" id="mustiness">0</span>
107
+							</div>
108
+							<div class="flex justify-between text-sm">
109
+								<span class="text-gray-500">占比 <span id="mustinessRate">0%</span></span>
110
+								<span class="text-green-500" id="mustinesscontrast_span"><i class="fas fa-arrow-up mr-1" id="mustinesscontrast_i"></i>较上周  <span id="mustinesscontrast">0</span></span>
111
+							</div>
112
+						</div>
113
+						<div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(1, '杂质异物')">
114
+							<div class="flex items-center justify-between">
115
+								<div class="flex items-center gap-2">
116
+									<div class="w-3 h-3 bg-[#91cc75]"></div>
117
+									<span class="text-gray-600">杂质异物</span>
118
+								</div>
119
+								<span class="font-medium" id="impurity">0</span>
120
+							</div>
121
+							<div class="flex justify-between text-sm">
122
+								<span class="text-gray-500">占比 <span id="impurityRate">0</span></span>
123
+								<span class="text-red-500" id="impuritycontrast_span"><i class="fas fa-arrow-down mr-1" id="impuritycontrast_i"></i>较上周  <span id="impuritycontrast">0</span></span>
124
+							</div>
125
+						</div>
126
+						<div class="space-y-2 bg-blue-50 p-4 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors" onclick="highlightPieSection(2, '变质异味')">
127
+							<div class="flex items-center justify-between">
128
+								<div class="flex items-center gap-2">
129
+									<div class="w-3 h-3 bg-[#fac858]"></div>
130
+									<span class="text-gray-600">变质异味</span>
131
+								</div>
132
+								<span class="font-medium" id="gobad">0</span>
133
+							</div>
134
+							<div class="flex justify-between text-sm">
135
+								<span class="text-gray-500">占比 <span id="gobadRate">0</span></span>
136
+								<span class="text-green-500" id="gobadcontrast_span"><i class="fas fa-arrow-up mr-1" id="gobadcontrast_i"></i>较上周 <span id="gobadcontrast">0</span></span>
137
+							</div>
138
+						</div>
139
+					</div>
140
+				</div>
141
+			</div>
142
+			<div class="grid grid-cols-2 gap-4 mb-6">
143
+				<div class="bg-white rounded-lg shadow-sm p-6">
144
+					<h3 class="text-lg font-medium mb-4">接单率</h3>
145
+					<div id="acceptanceRate" class="chart-container rate-chart"></div>
146
+				</div>
147
+				<div class="bg-white rounded-lg shadow-sm p-6">
148
+					<h3 class="text-lg font-medium mb-4">完结率</h3>
149
+					<div id="completionRate" class="chart-container rate-chart"></div>
150
+				</div>
151
+			</div>
152
+			<div class="bg-white rounded-lg shadow-sm p-6">
153
+				<h2 class="text-xl font-medium mb-6">三大类投诉趋势</h2>
154
+				<div id="trendLine" class="chart-container"></div>
155
+			</div>
156
+		</div>
157
+
158
+		<script src="../js/mui.min.js?"></script>
159
+		<script src="../js/mui.poppicker.js"></script>
160
+		<script src="../js/mui.picker.min.js"></script>
161
+		<script src="../js/zepto.js"></script>
162
+		<script src="../js/huayi.config.js"></script>
163
+		<script src="js/index.js"></script>
164
+
165
+	</body>
166
+
167
+</html>

+ 533 - 0
双汇APP-h5/statics/js/index.js

@@ -0,0 +1,533 @@
1
+mui.init({
2
+	swipeBack: false,
3
+})
4
+
5
+mui.ready(function() {
6
+	var selectType = 0
7
+
8
+	// 投诉类型饼图
9
+	const complaintPie = echarts.init(document.getElementById('complaintPie'));
10
+	let pieOption = {
11
+		animation: false,
12
+		tooltip: {
13
+			trigger: 'none'
14
+		},
15
+		legend: {
16
+			show: false
17
+		},
18
+		series: [{
19
+			type: 'pie',
20
+			radius: ['30%', '60%'],
21
+			center: ['50%', '50%'],
22
+			data: [{
23
+					value: 0,
24
+					name: '破袋发霉',
25
+					itemStyle: {
26
+						color: '#5470c6'
27
+					}
28
+				},
29
+				{
30
+					value: 0,
31
+					name: '杂质异物',
32
+					itemStyle: {
33
+						color: '#91cc75'
34
+					}
35
+				},
36
+				{
37
+					value: 0,
38
+					name: '变质异味',
39
+					itemStyle: {
40
+						color: '#fac858'
41
+					}
42
+				}
43
+			],
44
+			label: {
45
+				show: false
46
+			}
47
+		}]
48
+	};
49
+	complaintPie.setOption(pieOption);
50
+	let currentHighlightIndex = -1;
51
+
52
+	function highlightPieSection(index, name) {
53
+		if(currentHighlightIndex === index) {
54
+			// 取消高亮
55
+			pieOption.series[0].data.forEach(item => {
56
+				item.emphasis = null;
57
+			});
58
+			pieOption.series[0].label.show = false;
59
+			currentHighlightIndex = -1;
60
+		} else {
61
+			// 设置高亮
62
+			pieOption.series[0].data.forEach((item, i) => {
63
+				item.emphasis = {
64
+					scale: i === index,
65
+					scaleSize: 10
66
+				};
67
+			});
68
+			pieOption.series[0].label = {
69
+				show: true,
70
+				position: 'center',
71
+				formatter: name,
72
+				fontSize: 16,
73
+				color: '#333'
74
+			};
75
+			currentHighlightIndex = index;
76
+		}
77
+		complaintPie.setOption(pieOption);
78
+	}
79
+	// 接单率图表
80
+	const acceptanceRate = echarts.init(document.getElementById('acceptanceRate'));
81
+	acceptanceRate.setOption({
82
+		animation: false,
83
+		series: [{
84
+			type: 'gauge',
85
+			startAngle: 90,
86
+			endAngle: -270,
87
+			pointer: {
88
+				show: false
89
+			},
90
+			progress: {
91
+				show: true,
92
+				overlap: false,
93
+				roundCap: true,
94
+				clip: false,
95
+				itemStyle: {
96
+					color: '#4F46E5'
97
+				}
98
+			},
99
+			axisLine: {
100
+				lineStyle: {
101
+					width: 12
102
+				}
103
+			},
104
+			splitLine: {
105
+				show: false
106
+			},
107
+			axisTick: {
108
+				show: false
109
+			},
110
+			axisLabel: {
111
+				show: false
112
+			},
113
+			detail: {
114
+				valueAnimation: true,
115
+				offsetCenter: [0, 0],
116
+				fontSize: 12,
117
+				formatter: '{value}%',
118
+				color: '#333'
119
+			},
120
+			data: [{
121
+				value: 0
122
+			}]
123
+		}]
124
+	});
125
+	// 完结率图表
126
+	const completionRate = echarts.init(document.getElementById('completionRate'));
127
+	completionRate.setOption({
128
+		animation: false,
129
+		series: [{
130
+			type: 'gauge',
131
+			startAngle: 90,
132
+			endAngle: -270,
133
+			pointer: {
134
+				show: false
135
+			},
136
+			progress: {
137
+				show: true,
138
+				overlap: false,
139
+				roundCap: true,
140
+				clip: false,
141
+				itemStyle: {
142
+					color: '#4F46E5'
143
+				}
144
+			},
145
+			axisLine: {
146
+				lineStyle: {
147
+					width: 12
148
+				}
149
+			},
150
+			splitLine: {
151
+				show: false
152
+			},
153
+			axisTick: {
154
+				show: false
155
+			},
156
+			axisLabel: {
157
+				show: false
158
+			},
159
+			detail: {
160
+				valueAnimation: true,
161
+				offsetCenter: [0, 0],
162
+				fontSize: 12,
163
+				formatter: '{value}%',
164
+				color: '#333'
165
+			},
166
+			data: [{
167
+				value: 0
168
+			}]
169
+		}]
170
+	});
171
+	// 趋势线图
172
+	const trendLine = echarts.init(document.getElementById('trendLine'));
173
+
174
+	window.addEventListener('resize', function() {
175
+		complaintPie.resize();
176
+		acceptanceRate.resize();
177
+		completionRate.resize();
178
+		trendLine.resize();
179
+	});
180
+
181
+	var token = localStorage.getItem("token");
182
+
183
+	function initData() {
184
+		// 顶部统计
185
+		$.ajax({
186
+			type: "get",
187
+			url: huayi.config.callcenter_url + 'Business/GetComplaint',
188
+			async: false,
189
+			data: {
190
+				type: selectType,
191
+				token: token
192
+			},
193
+			dataType: 'json',
194
+			success: function(data) {
195
+
196
+				res = data.data;
197
+
198
+				if(res.total) $('#total').text(res.total.toLocaleString());
199
+				if(res.thiscontrast) $('#thiscontrast').text(res.thiscontrast);
200
+				if(res.thisnumber) $('#thisnumber').text(res.thisnumber.toLocaleString());
201
+				if(res.othercontrast) $('#othercontrast').text(res.othercontrast);
202
+				if(res.otherthisnumber) $('#otherthisnumber').text(res.otherthisnumber.toLocaleString());
203
+
204
+				// 调整箭头
205
+				if(res.thiscontrast >= 0) {
206
+					$('#thiscontrast_i').attr('class', 'fas fa-arrow-up mr-1')
207
+					$('#thiscontrast_div').attr('class', 'text-green-500 text-sm mt-1')
208
+				} else {
209
+					$('#thiscontrast_i').attr('class', 'fas fa-arrow-down mr-1')
210
+					$('#thiscontrast_div').attr('class', 'text-red-500 text-sm mt-1')
211
+				}
212
+
213
+				// 调整箭头
214
+				if(res.othercontrast >= 0) {
215
+					$('#othercontrast_i').attr('class', 'fas fa-arrow-up mr-1')
216
+					$('#othercontrast_div').attr('class', 'text-green-500 text-sm mt-1')
217
+				} else {
218
+					$('#othercontrast_i').attr('class', 'fas fa-arrow-down mr-1')
219
+					$('#othercontrast_div').attr('class', 'text-red-500 text-sm mt-1')
220
+				}
221
+
222
+				// 计算比例
223
+				let rate = 0;
224
+				if(res.thisnumber > 0 || res.otherthisnumber > 0) {
225
+					rate = (res.thisnumber / (res.thisnumber + res.otherthisnumber)).toFixed(2);
226
+				}
227
+				
228
+
229
+
230
+				$('#total_rate').attr('style', 'width: ' + rate * 100 + '%;')
231
+			}
232
+		});
233
+
234
+		$.ajax({
235
+			type: "get",
236
+			url: huayi.config.callcenter_url + 'Business/GetComplaintSituation',
237
+			async: false,
238
+			data: {
239
+				type: selectType,
240
+				token: token
241
+			},
242
+			dataType: 'json',
243
+			success: function(data) {
244
+
245
+				res = data.data;
246
+				if(res.gobad) $('#gobad').text(res.gobad.toLocaleString());
247
+				if(res.impurity) $('#impurity').text(res.impurity.toLocaleString());
248
+				if(res.mustiness) $('#mustiness').text(res.mustiness.toLocaleString());
249
+
250
+				if(res.gobadRate) $('#gobadRate').text(res.gobadRate);
251
+				if(res.impurityRate) $('#impurityRate').text(res.impurityRate);
252
+				if(res.mustinessRate) $('#mustinessRate').text(res.mustinessRate);
253
+
254
+				if(res.gobadcontrast >= 0) {
255
+					$('#gobadcontrast').text(res.gobadcontrast);
256
+					$('#gobadcontrast_i').attr('class', 'fas fa-arrow-up mr-1')
257
+					$('#gobadcontrast_span').attr('class', 'text-green-500')
258
+				} else {
259
+					if(res.gobadcontrast < 0) $('#gobadcontrast').text(res.gobadcontrast);
260
+					$('#gobadcontrast_i').attr('class', 'fas fa-arrow-down mr-1')
261
+					$('#othercontrast_div').attr('class', 'text-red-500')
262
+				}
263
+
264
+				if(res.impuritycontrast >= 0) {
265
+					$('#impuritycontrast').text(res.impuritycontrast);
266
+					$('#impuritycontrast_i').attr('class', 'fas fa-arrow-up mr-1')
267
+					$('#impuritycontrast_span').attr('class', 'text-green-500')
268
+				} else {
269
+					if(res.impuritycontrast < 0) $('#impuritycontrast').text(res.impuritycontrast);
270
+					$('#impuritycontrast_i').attr('class', 'fas fa-arrow-down mr-1')
271
+					$('#impuritycontrast_div').attr('class', 'text-red-500')
272
+				}
273
+
274
+				if(res.mustinesscontrast >= 0) {
275
+					$('#mustinesscontrast').text(res.mustinesscontrast);
276
+					$('#mustinesscontrast_i').attr('class', 'fas fa-arrow-up mr-1')
277
+					$('#mustinesscontrast_span').attr('class', 'text-green-500')
278
+				} else {
279
+					if(res.mustinesscontrast < 0) $('#mustinesscontrast').text(res.mustinesscontrast);
280
+					$('#mustinesscontrast_i').attr('class', 'fas fa-arrow-down mr-1')
281
+					$('#mustinesscontrast_div').attr('class', 'text-red-500')
282
+				}
283
+
284
+				// 重新加载饼图
285
+
286
+				let pieOption = {
287
+					animation: false,
288
+					tooltip: {
289
+						trigger: 'none'
290
+					},
291
+					legend: {
292
+						show: false
293
+					},
294
+					series: [{
295
+						type: 'pie',
296
+						radius: ['30%', '60%'],
297
+						center: ['50%', '50%'],
298
+						data: [{
299
+								value: res.mustiness,
300
+								name: '破袋发霉',
301
+								itemStyle: {
302
+									color: '#5470c6'
303
+								}
304
+							},
305
+							{
306
+								value: res.impurity,
307
+								name: '杂质异物',
308
+								itemStyle: {
309
+									color: '#91cc75'
310
+								}
311
+							},
312
+							{
313
+								value: res.gobad,
314
+								name: '变质异味',
315
+								itemStyle: {
316
+									color: '#fac858'
317
+								}
318
+							}
319
+						],
320
+						label: {
321
+							show: false
322
+						}
323
+					}]
324
+				};
325
+				complaintPie.setOption(pieOption);
326
+
327
+			}
328
+		});
329
+
330
+		$.ajax({
331
+			type: "get",
332
+			url: huayi.config.callcenter_url + 'Business/GetComplaintCompleted',
333
+			async: false,
334
+			data: {
335
+				type: selectType,
336
+				token: token
337
+			},
338
+			dataType: 'json',
339
+			success: function(data) {
340
+
341
+				res = data.data;
342
+
343
+				acceptanceRate.setOption({
344
+					animation: false,
345
+					series: [{
346
+						type: 'gauge',
347
+						startAngle: 90,
348
+						endAngle: -270,
349
+						pointer: {
350
+							show: false
351
+						},
352
+						progress: {
353
+							show: true,
354
+							overlap: false,
355
+							roundCap: true,
356
+							clip: false,
357
+							itemStyle: {
358
+								color: '#4F46E5'
359
+							}
360
+						},
361
+						axisLine: {
362
+							lineStyle: {
363
+								width: 12
364
+							}
365
+						},
366
+						splitLine: {
367
+							show: false
368
+						},
369
+						axisTick: {
370
+							show: false
371
+						},
372
+						axisLabel: {
373
+							show: false
374
+						},
375
+						detail: {
376
+							valueAnimation: true,
377
+							offsetCenter: [0, 0],
378
+							fontSize: 12,
379
+							formatter: '{value}%',
380
+							color: '#333'
381
+						},
382
+						data: [{
383
+							value: +res.receivingrate.replace('%', '')
384
+						}]
385
+					}]
386
+				});
387
+
388
+				completionRate.setOption({
389
+					animation: false,
390
+					series: [{
391
+						type: 'gauge',
392
+						startAngle: 90,
393
+						endAngle: -270,
394
+						pointer: {
395
+							show: false
396
+						},
397
+						progress: {
398
+							show: true,
399
+							overlap: false,
400
+							roundCap: true,
401
+							clip: false,
402
+							itemStyle: {
403
+								color: '#4F46E5'
404
+							}
405
+						},
406
+						axisLine: {
407
+							lineStyle: {
408
+								width: 12
409
+							}
410
+						},
411
+						splitLine: {
412
+							show: false
413
+						},
414
+						axisTick: {
415
+							show: false
416
+						},
417
+						axisLabel: {
418
+							show: false
419
+						},
420
+						detail: {
421
+							valueAnimation: true,
422
+							offsetCenter: [0, 0],
423
+							fontSize: 12,
424
+							formatter: '{value}%',
425
+							color: '#333'
426
+						},
427
+						data: [{
428
+							value: +res.completerate.replace('%', '')
429
+						}]
430
+					}]
431
+				});
432
+			}
433
+		});
434
+
435
+		$.ajax({
436
+			type: "get",
437
+			url: huayi.config.callcenter_url + 'Business/GetComplaintTrend',
438
+			async: false,
439
+			data: {
440
+				type: selectType,
441
+				token: token
442
+			},
443
+			dataType: 'json',
444
+			success: function(data) {
445
+
446
+				res = data.data;
447
+				var times = [];
448
+				var receivings = [];
449
+				var completes = [];
450
+				if(res && res.length > -1) {
451
+					res.forEach(function(v, i) {
452
+						times.push(v.time);
453
+						receivings.push(v.receiving);
454
+						completes.push(v.complete);
455
+					});
456
+				}
457
+
458
+				trendLine.setOption({
459
+					animation: false,
460
+					tooltip: {
461
+						trigger: 'axis',
462
+						axisPointer: {
463
+							lineStyle: {
464
+								width: 1,
465
+								color: '#019680',
466
+							},
467
+						},
468
+
469
+					},
470
+					dataZoom: [{
471
+						type: 'inside',
472
+						startValue: times.length - 7 - 1,
473
+						endValue: times.length - 1,
474
+						// start: 0,
475
+						// end: (5 / xData.length) * 100,
476
+						zoomLock: true,
477
+					}, ],
478
+					legend: {
479
+						data: ['接单量', '完结量']
480
+					},
481
+					xAxis: {
482
+						type: 'category',
483
+						data: times,
484
+						axisLabel: {
485
+							interval: 0,
486
+							rotate: 45
487
+						}
488
+					},
489
+					yAxis: {
490
+						type: 'value'
491
+					},
492
+					grid: {
493
+						left: '3%',
494
+						right: '4%',
495
+						bottom: '15%',
496
+						containLabel: true
497
+					},
498
+					series: [{
499
+						name: '接单量',
500
+						type: 'line',
501
+						smooth: true,
502
+						data: receivings,
503
+					}, {
504
+						name: '完结量',
505
+						type: 'line',
506
+						smooth: true,
507
+						data: completes
508
+					}]
509
+				});
510
+			}
511
+		});
512
+	}
513
+
514
+	var types = ['周', '月', '年'];
515
+
516
+	$('#changeBut').on('click', function() {
517
+		console.log('changeType');
518
+		selectType++;
519
+		if(selectType > types.length - 1) selectType = 0;
520
+		const typeName = types[selectType];
521
+
522
+		$('[name="selectType"]').text(typeName)
523
+		
524
+		initData();
525
+	})
526
+	
527
+	initData();
528
+
529
+})
530
+
531
+//function changeType() {
532
+//	
533
+//}

+ 4 - 0
双汇APP-h5/tab-phone.html

@@ -76,6 +76,10 @@
76 76
 				<span class="mui-icon iconfont icon-gongzuojiaoban"></span>
77 77
 				<span class="mui-tab-label">我的任务</span>
78 78
 			</a>
79
+			<a class="mui-tab-item statics-icon" href="statics/index.html" index="1" style="display:none;">
80
+				<span class="mui-icon iconfont icon-iconfontgraph"></span>
81
+				<span class="mui-tab-label">统计</span>
82
+			</a>
79 83
 			<a class="mui-tab-item mui-active" href="tab-phone.html" index="1">
80 84
 				<span class="mui-icon iconfont icon-tongxunlu"></span>
81 85
 				<span class="mui-tab-label">通讯录</span>

+ 1 - 0
双汇APP-h5/unpackage/.confirmed_dependencies

@@ -0,0 +1 @@
1
+null

+ 1 - 0
双汇APP-h5/unpackage/.dependencies

@@ -0,0 +1 @@
1
+null

binární
双汇APP-h5/webfonts/fa-solid-900.woff2