|
|
@@ -23,7 +23,7 @@
|
|
23
|
23
|
<!-- 条数统计 -->
|
|
24
|
24
|
<view class="card_item card_item_full">
|
|
25
|
25
|
<view class="card_header count">
|
|
26
|
|
- <i class="iconfont icon-crm-tongji" style="font-size: 30rpx;color: #4c8afe;"></i>
|
|
|
26
|
+ <img src="../../../static/icons/statistics.png" alt="" width="16px" height="16px">
|
|
27
|
27
|
<text class="card_title">条数统计</text>
|
|
28
|
28
|
</view>
|
|
29
|
29
|
<view class="card_content">
|
|
|
@@ -74,7 +74,7 @@
|
|
74
|
74
|
<view class="ranking_stats">
|
|
75
|
75
|
<view class="ranking_info">
|
|
76
|
76
|
<view class="ranking_icon">
|
|
77
|
|
- <i class="iconfont icon-crm-jiangbei" style="font-size: 30rpx;color: #ca8a04;"></i>
|
|
|
77
|
+ <img src="../../../static/icons/trophy.png" alt="" width="16px" height="16px">
|
|
78
|
78
|
</view>
|
|
79
|
79
|
<view class="ranking_info_text">
|
|
80
|
80
|
<text class="card_title">当前排名</text>
|
|
|
@@ -98,7 +98,7 @@
|
|
98
|
98
|
<!-- 折线图 -->
|
|
99
|
99
|
<view class="card_item">
|
|
100
|
100
|
<view class="chart_header">
|
|
101
|
|
- <i class="iconfont icon-crm-tubiao-zhexiantu" style="font-size: 30rpx;color: #6b7280;"></i>
|
|
|
101
|
+ <img src="../../../static/icons/line.png" alt="" width="16px" height="16px">
|
|
102
|
102
|
<text class="card_title">近7天排名折线图</text>
|
|
103
|
103
|
</view>
|
|
104
|
104
|
<view class="charts_box">
|
|
|
@@ -152,79 +152,35 @@ export default {
|
|
152
|
152
|
level: '-',
|
|
153
|
153
|
score: '-'
|
|
154
|
154
|
},
|
|
155
|
|
- chartData: {
|
|
156
|
|
- categories: [],
|
|
157
|
|
- series: [
|
|
158
|
|
- {
|
|
159
|
|
- name: "核心数据",
|
|
160
|
|
- data: [],
|
|
161
|
|
- color: "#1890ff"
|
|
162
|
|
- }
|
|
163
|
|
- ]
|
|
164
|
|
- },
|
|
|
155
|
+ chartData: {},
|
|
165
|
156
|
opts: {
|
|
166
|
|
- padding: [5, 0, 10, -20],
|
|
167
|
|
- backgroundColor: "#ffffff",
|
|
|
157
|
+ color: ["#1890FF"],
|
|
|
158
|
+ padding: [10, 10, 0, 0],
|
|
|
159
|
+ dataLabel: false,
|
|
|
160
|
+ dataPointShape: false,
|
|
|
161
|
+ enableScroll: false,
|
|
|
162
|
+ legend: {
|
|
|
163
|
+ show: false
|
|
|
164
|
+ },
|
|
168
|
165
|
xAxis: {
|
|
169
|
|
- axisLine: { show: true, color: "#e5e5e5", width: 1 },
|
|
170
|
|
- gridLine: { show: true, color: "#f5f5f5", width: 1 },
|
|
171
|
|
- label: { fontSize: 24, color: "#666666", margin: 15 },
|
|
172
|
|
- tickLine: { show: false },
|
|
173
|
|
- lineStyle: {
|
|
174
|
|
- type: 'solid'
|
|
175
|
|
- },
|
|
176
|
|
- axisLabel: {
|
|
177
|
|
- padding: [0, 0, 0, -20]
|
|
178
|
|
- }
|
|
|
166
|
+ disableGrid: true
|
|
179
|
167
|
},
|
|
180
|
168
|
yAxis: {
|
|
181
|
|
- axisLine: { show: true, color: "#e5e5e5", width: 1 },
|
|
182
|
|
- gridLine: { show: true, color: "#f5f5f5", width: 1 },
|
|
183
|
|
- label: { fontSize: 24, color: "#666666", margin: 15 },
|
|
184
|
|
- tickLine: { show: false },
|
|
185
|
|
- splitNumber: 4,
|
|
186
|
|
- min: 0,
|
|
187
|
|
- max: 200
|
|
|
169
|
+ gridType: "dash",
|
|
|
170
|
+ dashLength: 2,
|
|
|
171
|
+ axisLabel:{
|
|
|
172
|
+ show: false
|
|
|
173
|
+ }
|
|
188
|
174
|
},
|
|
189
|
|
- series: {
|
|
|
175
|
+ extra: {
|
|
190
|
176
|
line: {
|
|
191
|
|
- width: 6, // 折线宽度,确保可见
|
|
192
|
|
- smooth: true, // 先设为直线,便于调试,后续可改为true
|
|
193
|
|
- showSymbol: true, // 显示数据点,确保折线锚点可见
|
|
194
|
|
- symbol: "circle",
|
|
195
|
|
- symbolSize: 24,
|
|
196
|
|
- symbolColor: "#ffffff",
|
|
197
|
|
- symbolBorderColor: "#1890ff",
|
|
198
|
|
- symbolBorderWidth: 8,
|
|
199
|
|
- area: {
|
|
200
|
|
- show: false,
|
|
201
|
|
- color: "linear-gradient(to bottom, rgba(24,144,255,0.2), rgba(24,144,255,0))"
|
|
202
|
|
- }
|
|
|
177
|
+ type: "curve",
|
|
|
178
|
+ width: 3,
|
|
|
179
|
+ activeType: "hollow",
|
|
|
180
|
+ linearType: "custom",
|
|
|
181
|
+ onShadow: true,
|
|
|
182
|
+ animation: "horizontal"
|
|
203
|
183
|
}
|
|
204
|
|
- },
|
|
205
|
|
- // 提示框:确保悬浮正常显示
|
|
206
|
|
- tooltip: {
|
|
207
|
|
- show: true,
|
|
208
|
|
- backgroundColor: "rgba(0,0,0,0.7)",
|
|
209
|
|
- borderRadius: 6,
|
|
210
|
|
- padding: [8, 12],
|
|
211
|
|
- labelFontSize: 22,
|
|
212
|
|
- labelColor: "#ffffff"
|
|
213
|
|
- },
|
|
214
|
|
- legend: {
|
|
215
|
|
- show: false,
|
|
216
|
|
- position: "top-right",
|
|
217
|
|
- fontSize: 24,
|
|
218
|
|
- color: "#666666",
|
|
219
|
|
- margin: [0, 20, 0, 0]
|
|
220
|
|
- },
|
|
221
|
|
- title: {
|
|
222
|
|
- show: false,
|
|
223
|
|
- name: "趋势折线图",
|
|
224
|
|
- fontSize: 28,
|
|
225
|
|
- color: "#333333",
|
|
226
|
|
- align: "left",
|
|
227
|
|
- margin: [0, 0, 15, 0]
|
|
228
|
184
|
}
|
|
229
|
185
|
},
|
|
230
|
186
|
clueList: [],
|
|
|
@@ -234,9 +190,9 @@ export default {
|
|
234
|
190
|
methods: {
|
|
235
|
191
|
getCardData() {
|
|
236
|
192
|
uni.$u.api.getPersonCards({ userId: this.$store.state.user.userInfo.userId }).then(res => {
|
|
237
|
|
- if (res.code === 200) {
|
|
238
|
|
- this.cardData = res.data;
|
|
239
|
|
- }
|
|
|
193
|
+ if (res.code === 200) {
|
|
|
194
|
+ this.cardData = res.data;
|
|
|
195
|
+ }
|
|
240
|
196
|
});
|
|
241
|
197
|
},
|
|
242
|
198
|
getClueList() {
|
|
|
@@ -246,13 +202,26 @@ export default {
|
|
246
|
202
|
}
|
|
247
|
203
|
});
|
|
248
|
204
|
},
|
|
249
|
|
- getChartData() {
|
|
250
|
|
- uni.$u.api.getPersonRanking({ userId: this.$store.state.user.userInfo.userId }).then(res => {
|
|
251
|
|
- if (res.code === 200) {
|
|
252
|
|
- this.chartData.categories = res.data.map(item => item.x);
|
|
253
|
|
- this.chartData.series[0].data = res.data.map(item => item.y);
|
|
|
205
|
+ async getChartData() {
|
|
|
206
|
+ const res = await uni.$u.api.getPersonRanking({ userId: this.$store.state.user.userInfo.userId });
|
|
|
207
|
+ if (res.code === 200) {
|
|
|
208
|
+ let data = {
|
|
|
209
|
+ categories: res.data.map(item => item.x),
|
|
|
210
|
+ series: [
|
|
|
211
|
+ {
|
|
|
212
|
+ name: "近7天排名",
|
|
|
213
|
+ data: res.data.map(item => item.y),
|
|
|
214
|
+ setShadow: [
|
|
|
215
|
+ 3,
|
|
|
216
|
+ 8,
|
|
|
217
|
+ 15,
|
|
|
218
|
+ "#1890FF"
|
|
|
219
|
+ ],
|
|
|
220
|
+ }
|
|
|
221
|
+ ]
|
|
254
|
222
|
}
|
|
255
|
|
- });
|
|
|
223
|
+ this.chartData = JSON.parse(JSON.stringify(data))
|
|
|
224
|
+ }
|
|
256
|
225
|
},
|
|
257
|
226
|
// 跳转私有线索页面
|
|
258
|
227
|
toPrivateClue() {
|
|
|
@@ -262,7 +231,9 @@ export default {
|
|
262
|
231
|
mounted() {
|
|
263
|
232
|
this.getCardData();
|
|
264
|
233
|
this.getClueList();
|
|
265
|
|
- this.getChartData();
|
|
|
234
|
+ this.$nextTick(() => {
|
|
|
235
|
+ this.getChartData();
|
|
|
236
|
+ })
|
|
266
|
237
|
},
|
|
267
|
238
|
|
|
268
|
239
|
};
|