Blame view

绿纤uni-app/pagesA/dashboard/dashboard.vue 76 KB
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1
2
3
4
5
  <template>
  	<view class="page">
  		<view class="warpbox">
  			<!-- 顶部筛选区域 -->
  			<view class="header-section">
d2158212   李宇   最新
6
7
  				<!-- 经营看板 -->
  				<view class="page-title"></view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
8
9
10
11
12
13
14
  				<view class="filter-box">
  					<picker mode="date" fields="month" :value="selectedMonth" @change="onMonthChange">
  						<view class="date-picker-trigger">
  							<text class="date-text">{{ selectedMonthText }}</text>
  							<u-icon name="arrow-down" size="14" color="#666"></u-icon>
  						</view>
  					</picker>
aa81040d   李宇   最新
15
  					<!-- 截图按钮 -->
bae2f235   李宇   最新
16
  					<!-- #ifdef H5 -->
aa81040d   李宇   最新
17
18
19
20
  					<view class="screenshot-btn" v-if="showScreenshotBtn" @click="saveScreenshot" :class="{ loading: screenshotLoading }">
  						<u-icon name="photo" size="18" color="#409EFF"></u-icon>
  						<text class="screenshot-text">截图</text>
  					</view>
bae2f235   李宇   最新
21
  					<!-- #endif -->
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
22
23
24
25
  				</view>
  			</view>
  
  			<!-- 6大核心KPI指标 -->
8b654f92   李宇   最新
26
27
28
29
30
31
32
33
34
35
  			<view class="kpi-section">
  				<!-- 上方4个指标 - 按照me.vue样式排版 -->
  				<view class="glass-card billing-card">
  					<view class="billing-main" v-for="(kpi, index) in kpiListTop.slice(0, 2)" :key="index" >
  						<view class="stat-content">
  							<view class="label-row">
  								<view class="stat-icon-small" :class="kpi.type">
  									<u-icon :name="getKpiIconName(kpi.key)" :size="20" color="#fff"></u-icon>
  								</view>
  								<view class="card-label">{{ kpi.label }}</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
36
  							</view>
8b654f92   李宇   最新
37
  							<view class="billing-value">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
38
  								<text class="currency" v-if="kpi.isMoney">¥</text>
8b654f92   李宇   最新
39
  								<text class="value">{{ kpi.isMoney ? kpi.value.toString().replace(/[^\d\.]/g, '') : (kpi.isPercent ? kpi.value : kpi.value) }}</text>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
40
  								<text class="unit" v-if="kpi.isPercent">%</text>
8b654f92   李宇   最新
41
  								<text class="unit" v-if="!kpi.isMoney && !kpi.isPercent && kpi.unit">{{ kpi.unit }}</text>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
42
  							</view>
8b654f92   李宇   最新
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  						</view>
  					</view>
  					<view class="billing-footer">
  						<view class="count-item" v-for="(kpi, index) in kpiListTop.slice(2, 4)" :key="index" >
  							<view class="count-icon" :class="kpi.type">
  								<u-icon :name="getKpiIconName(kpi.key)" :size="20" color="#fff"></u-icon>
  							</view>
  							<text class="count-text">
  								<text class="count-value">{{ kpi.value }}</text>
  								<text class="count-unit">{{ kpi.unit }}</text>
  							</text>
  						</view>
  					</view>
  				</view>
  				<!-- 下方3个指标(1x3布局) -->
  				<view class="kpi-grid-bottom">
  					<view class="kpi-card" v-for="(kpi, index) in kpiListBottom" :key="index" >
  						<view class="kpi-header">
  							<view class="kpi-icon-square" :class="kpi.type">
  								<u-icon :name="getKpiIconName(kpi.key)" :size="16" color="#fff"></u-icon>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
63
  							</view>
8b654f92   李宇   最新
64
65
66
67
68
69
70
  							<text class="kpi-label">{{ kpi.label }}</text>
  						</view>
  						<view class="kpi-value-group">
  							
  							<text class="value"><text class="currency" v-if="kpi.isMoney">¥</text>{{ kpi.isMoney ? kpi.value.toString().replace(/[^\d\.]/g, '') : (kpi.isPercent ? kpi.value : kpi.value) }}</text>
  							<text class="unit" v-if="kpi.isPercent">%</text>
  							<text class="unit" v-if="!kpi.isMoney && !kpi.isPercent && kpi.unit">{{ kpi.unit }}</text>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
71
72
73
74
75
76
77
78
79
80
81
  						</view>
  					</view>
  				</view>
  			</view>
  
  			<!-- 会员资产全景 -->
  			<view class="warpboxss member-section" v-if="memberStatistics.totalMembers > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>会员资产全景</view>
  				</view>
  				<view class="member-grid">
d2158212   李宇   最新
82
  					<view class="member-stat-card blue-theme" @click="openMemberDetailModal('total')">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
83
84
85
86
87
88
  						<view class="icon-circle">
  							<u-icon name="account" size="24" color="#409EFF"></u-icon>
  						</view>
  						<view class="stat-info">
  							<view class="stat-label">总会员数</view>
  							<view class="stat-value">{{ formatNumber(memberStatistics.totalMembers) }}</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
89
90
  						</view>
  					</view>
d2158212   李宇   最新
91
  					<view class="member-stat-card green-theme" @click="openMemberDetailModal('active')">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
92
93
94
95
96
97
  						<view class="icon-circle">
  							<u-icon name="checkmark-circle" size="24" color="#67C23A"></u-icon>
  						</view>
  						<view class="stat-info">
  							<view class="stat-label">活跃会员</view>
  							<view class="stat-value">{{ formatNumber(memberStatistics.activeMembers) }}</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
98
99
  						</view>
  					</view>
d2158212   李宇   最新
100
  					<view class="member-stat-card orange-theme" @click="openMemberDetailModal('remaining')">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
101
  						<view class="icon-circle">
d2158212   李宇   最新
102
  							<u-icon name="shopping-cart" size="24" color="#E6A23C"></u-icon>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
103
104
105
  						</view>
  						<view class="stat-info">
  							<view class="stat-label">剩余权益</view>
f218a54a   李宇   最新
106
  							<view class="stat-value mini">¥{{ formatMoney(memberStatistics.totalRemainingAmount) }}</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
107
108
  						</view>
  					</view>
d2158212   李宇   最新
109
  					<view class="member-stat-card red-theme" @click="openMemberDetailModal('sleep')">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
110
111
112
113
114
115
  						<view class="icon-circle">
  							<u-icon name="info-circle" size="24" color="#F56C6C"></u-icon>
  						</view>
  						<view class="stat-info">
  							<view class="stat-label">沉睡会员</view>
  							<view class="stat-value">{{ formatNumber(memberStatistics.totalSleepMembers) }}</view>
f218a54a   李宇   最新
116
117
118
119
120
121
122
123
124
125
126
127
  						</view>
  					</view>
  				</view>
  			</view>
  
  			<!-- 会员结构洞察 -->
  			<view class="warpboxss member-chart-section" v-if="memberTypeDistribution.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>会员结构洞察</view>
  				</view>
  				<view class="member-chart-container">
  					<view class="member-type-chart-wrapper">
8b654f92   李宇   最新
128
129
130
131
132
133
134
  						<qiun-data-charts 
  							type="pie"
  							:opts="memberTypeChartOpts"
  							:chartData="memberTypeChartData"
  							:ontouch="true"
  							:inScrollView="true"
  							:pageScrollTop="pageScrollTop"
230d71ee   李宇   最新
135
  							:canvas2d="true"
8b654f92   李宇   最新
136
  						/>
f218a54a   李宇   最新
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
  					</view>
  					<view class="member-type-legend">
  						<view class="legend-item" v-for="(item, index) in memberTypeDistribution" :key="index">
  							<view class="legend-dot" :style="{ backgroundColor: getMemberTypeColor(index) }"></view>
  							<text class="legend-name">{{ item.MemberType || '未知' }}</text>
  							<text class="legend-value">{{ formatNumber(item.Count || 0) }}人</text>
  						</view>
  					</view>
  				</view>
  			</view>
  
  			<!-- 会员价值分层 -->
  			<view class="warpboxss member-category-section" v-if="memberStatistics.beautyMembers > 0 || memberStatistics.medicalMembers > 0 || memberStatistics.techMembers > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>会员价值分层</view>
  				</view>
  				<view class="member-category-container">
  					<view class="member-category-chart-wrapper">
8b654f92   李宇   最新
155
156
157
158
159
160
161
  						<qiun-data-charts 
  							type="radar"
  							:opts="memberCategoryChartOpts"
  							:chartData="memberCategoryChartData"
  							:ontouch="true"
  							:inScrollView="true"
  							:pageScrollTop="pageScrollTop"
230d71ee   李宇   最新
162
  							:canvas2d="true"
8b654f92   李宇   最新
163
  						/>
f218a54a   李宇   最新
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
  					</view>
  					<view class="member-category-legend">
  						<view class="legend-item">
  							<view class="legend-color" style="background: #409EFF;"></view>
  							<view class="legend-text">
  								<view class="legend-name">生美会员</view>
  								<view class="legend-value">{{ formatNumber(memberStatistics.beautyMembers) }}人</view>
  							</view>
  						</view>
  						<view class="legend-item">
  							<view class="legend-color" style="background: #F56C6C;"></view>
  							<view class="legend-text">
  								<view class="legend-name">医美会员</view>
  								<view class="legend-value">{{ formatNumber(memberStatistics.medicalMembers) }}人</view>
  							</view>
  						</view>
  						<view class="legend-item">
  							<view class="legend-color" style="background: #67C23A;"></view>
  							<view class="legend-text">
  								<view class="legend-name">科技部会员</view>
  								<view class="legend-value">{{ formatNumber(memberStatistics.techMembers) }}人</view>
  							</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
186
187
188
189
190
191
192
193
194
195
196
  						</view>
  					</view>
  				</view>
  			</view>
  
  			<!-- 经营效能趋势 -->
  			<view class="warpboxss trend-section" v-if="trendData.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>经营效能趋势</view>
  					<view class="trend-controls">
  						<view class="pill-switch">
f218a54a   李宇   最新
197
198
199
  							<view class="pill-item" :class="trendType === 'month' ? 'active' : ''" @click="switchTrendType('month')">月</view>
  							<view class="pill-item" :class="trendType === 'day' ? 'active' : ''" @click="switchTrendType('day')">日</view>
  							<view class="pill-item" :class="trendType === 'week' ? 'active' : ''" @click="switchTrendType('week')">周</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
200
201
202
203
  						</view>
  					</view>
  				</view>
  				<view class="chart-wrapper">
8b654f92   李宇   最新
204
205
206
207
208
209
210
211
  					<qiun-data-charts 
  						type="line"
  						:opts="trendChartOpts"
  						:chartData="trendChartData"
  						:ontouch="true"
  						:inScrollView="true"
  						:pageScrollTop="pageScrollTop"
  						background="rgba(255, 255, 255, 0.8)"
230d71ee   李宇   最新
212
  						:canvas2d="true"
8b654f92   李宇   最新
213
  					/>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
  				</view>
  				<view class="trend-legend-modern">
  					<view class="legend-item">
  						<view class="dot revenue"></view>
  						<text>营收(成交额)</text>
  					</view>
  					<view class="legend-item">
  						<view class="dot consume"></view>
  						<text>消耗(服务产出)</text>
  					</view>
  				</view>
  			</view>
  
  			<!-- 门店卓越榜 -->
  			<view class="warpboxss ranking-section" v-if="storeRanking.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>门店卓越榜</view>
  				</view>
  				<view class="rank-list-modern">
  					<view class="rank-item" v-for="(item, index) in storeRanking.slice(0, 10)" :key="index" @click="handleStoreClick(item)">
f218a54a   李宇   最新
234
  						<view class="rank-idx" :class="index < 3 ? 'top-3' : ''">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
  							<image v-if="index === 0" src="/static/rank/no1.png" class="medal-icon"></image>
  							<image v-else-if="index === 1" src="/static/rank/no2.png" class="medal-icon"></image>
  							<image v-else-if="index === 2" src="/static/rank/no3.png" class="medal-icon"></image>
  							<text v-else>{{ index + 1 }}</text>
  						</view>
  						<view class="rank-info">
  							<view class="info-main">
  								<text class="name">{{ item.StoreName || '未知门店' }}</text>
  								<text class="value">¥{{ formatMoney(item.TotalPerformance) }}</text>
  							</view>
  							<view class="progress-bg">
  								<view class="progress-bar" :style="{ width: (item.TotalPerformance / (storeRanking[0].TotalPerformance || 1) * 100) + '%' }"></view>
  							</view>
  						</view>
  					</view>
  				</view>
  			</view>
  
  			<!-- 核心员效贡献矩阵 -->
  			<view class="warpboxss coach-section" v-if="coachRanking.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>核心员效贡献矩阵</view>
  					<view class="type-tags">
f218a54a   李宇   最新
258
259
260
  						<view class="tag-item" :class="coachRankType === 'billing' ? 'active' : ''" @click="switchCoachRankType('billing')">开单</view>
  						<view class="tag-item" :class="coachRankType === 'consume' ? 'active' : ''" @click="switchCoachRankType('consume')">消耗</view>
  						<view class="tag-item" :class="coachRankType === 'refund' ? 'active' : ''" @click="switchCoachRankType('refund')">退卡</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
261
262
263
264
  					</view>
  				</view>
  				<view class="rank-list-modern">
  					<view class="rank-item" v-for="(item, index) in coachRanking.slice(0, 10)" :key="index">
8b654f92   李宇   最新
265
  						<view class="rank-idx" :class="index === 0 ? 'rank-1' : (index === 1 ? 'rank-2' : (index === 2 ? 'rank-3' : ''))">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
  							<text>{{ index + 1 }}</text>
  						</view>
  						<view class="rank-avatar">
  							<text>{{ item.HealthCoachName ? item.HealthCoachName.substring(0, 1) : '无' }}</text>
  						</view>
  						<view class="rank-info">
  							<view class="info-main">
  								<text class="name">{{ item.HealthCoachName || '未知' }}</text>
  								<text class="value">¥{{ formatMoney(item.Amount) }}</text>
  							</view>
  							<view class="progress-bg">
  								<view class="progress-bar green" :style="{ width: item.Percent + '%' }"></view>
  							</view>
  						</view>
  					</view>
  				</view>
  			</view>
  			
  			<!-- 协同作战榜 -->
  			<view class="warpboxss gold-triangle-section" v-if="goldTriangleRankings.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>协同作战榜</view>
  				</view>
  				<view class="rank-list-modern">
  					<view class="rank-item" v-for="(item, index) in goldTriangleRankingTop10" :key="index">
8b654f92   李宇   最新
291
  						<view class="rank-idx" :class="index === 0 ? 'rank-1' : (index === 1 ? 'rank-2' : (index === 2 ? 'rank-3' : ''))">
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
292
293
294
295
296
  							<text>{{ index + 1 }}</text>
  						</view>
  						<view class="rank-info">
  							<view class="info-main">
  								<text class="name">{{ item.GoldTriangleName || '未知' }}</text>
8b654f92   李宇   最新
297
  								<text class="value orange-value">¥{{ formatMoney(item.TotalPerformance) }}</text>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
298
299
300
301
302
303
304
305
306
  							</view>
  							<view class="progress-bg">
  								<view class="progress-bar orange" :style="{ width: (item.TotalPerformance / (goldTriangleRankingTop10[0].TotalPerformance || 1) * 100) + '%' }"></view>
  							</view>
  						</view>
  					</view>
  				</view>
  			</view>
  
f218a54a   李宇   最新
307
308
309
310
311
312
  			<!-- 客户活跃度分析 -->
  			<view class="warpboxss visit-frequency-section" v-if="customerVisitFrequencyData.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>客户活跃度分析</view>
  				</view>
  				<view class="chart-wrapper">
8b654f92   李宇   最新
313
314
315
316
317
318
319
  					<qiun-data-charts 
  						type="column"
  						:opts="visitFrequencyChartOpts"
  						:chartData="visitFrequencyChartData"
  						:ontouch="true"
  						:inScrollView="true"
  						:pageScrollTop="pageScrollTop"
230d71ee   李宇   最新
320
  						:canvas2d="true"
8b654f92   李宇   最新
321
  					/>
f218a54a   李宇   最新
322
323
324
  				</view>
  			</view>
  
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
  			<!-- 热门服务品项TOP10 -->
  			<view class="warpboxss item-section" v-if="consumeItemTop10.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>热门服务品项</view>
  				</view>
  				<view class="item-grid">
  					<view class="item-card" v-for="(item, index) in consumeItemTop10" :key="index">
  						<view class="item-rank-badge" :class="'rank-' + (index + 1)">{{ index + 1 }}</view>
  						<view class="item-name">{{ item.ItemName || '未知品项' }}</view>
  						<view class="item-val">¥{{ formatMoney(item.Amount) }}</view>
  						<view class="item-process">
  							<view class="bar" :style="{ width: item.Percent + '%' }"></view>
  						</view>
  					</view>
  				</view>
  			</view>
f218a54a   李宇   最新
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
  
  			<!-- 热销产品品项TOP10 -->
  			<view class="warpboxss item-section" v-if="billingItemTop10.length > 0">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>热销产品品项</view>
  				</view>
  				<view class="item-grid">
  					<view class="item-card" v-for="(item, index) in billingItemTop10" :key="index">
  						<view class="item-rank-badge" :class="'rank-' + (index + 1)">{{ index + 1 }}</view>
  						<view class="item-name">{{ item.ItemName || '未知品项' }}</view>
  						<view class="item-val">¥{{ formatMoney(item.Amount) }}</view>
  						<view class="item-process">
  							<view class="bar blue" :style="{ width: item.Percent + '%' }"></view>
  						</view>
  					</view>
  				</view>
  			</view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
358
359
360
361
362
363
  			
  			<!-- 客户获取转化链 -->
  			<view class="warpboxss funnel-section" v-if="tkStatisticsData">
  				<view class="warpboxs-small-title">
  					<view><text class="warpboxs-small-title-line"></text>客户获取转化链</view>
  				</view>
62f1d695   李宇   最新
364
  				<view class="chart-wrapper">
8b654f92   李宇   最新
365
366
367
368
369
370
371
  					<qiun-data-charts 
  						type="funnel"
  						:opts="funnelChartOpts"
  						:chartData="funnelChartData"
  						:ontouch="true"
  						:inScrollView="true"
  						:pageScrollTop="pageScrollTop"
230d71ee   李宇   最新
372
  						:canvas2d="true"
8b654f92   李宇   最新
373
  					/>
62f1d695   李宇   最新
374
375
376
377
  				</view>
  				<view class="funnel-stats">
  					<view class="stat-mini">邀约率: <text class="stat-value">{{ formatPercent(getTkInviteRate()) }}%</text></view>
  					<view class="stat-mini">到店率: <text class="stat-value">{{ formatPercent(getInviteStoreRate()) }}%</text></view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
378
379
380
381
  				</view>
  			</view>
  
  			<!-- 底部安全区域 -->
aa81040d   李宇   最新
382
  			<view style="height: 150rpx;"></view>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
383
  		</view>
d2158212   李宇   最新
384
385
386
387
388
389
390
391
392
393
394
395
396
  		
  		<!-- 会员统计详情弹窗 -->
  		<u-popup :show="showMemberDetailModal" @close="closeMemberDetailModal" mode="center" border-radius="20" :closeable="true">
  			<view class="member-detail-modal">
  				<view class="modal-title">{{ detailModalTitle }}</view>
  				<view class="modal-content">
  					<view class="detail-item" v-for="(item, index) in detailModalData" :key="index">
  						<view class="detail-label">{{ item.label }}</view>
  						<view class="detail-value">{{ item.value }}</view>
  					</view>
  				</view>
  			</view>
  		</u-popup>
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
397
398
399
  	</view>
  </template>
  <script>
d2158212   李宇   最新
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
  import uCharts from '@qiun/ucharts'
  
  // uCharts 图表工具类
  const ChartUtil = {
  	// 绘制折线图
  	drawLineChart(vueInstance, canvasId, categories, series, options = {}) {
  		if (!categories || categories.length === 0 || !series || series.length === 0) {
  			return
  		}
  		
  		const chartData = {
  			categories: categories,
  			series: series.map((s, index) => ({
  				name: s.name || `系列${index + 1}`,
  				data: s.data,
  				color: s.color || ['#409EFF', '#67C23A', '#E6A23C', '#F56C6C'][index]
  			}))
  		}
  		
8b654f92   李宇   最新
419
420
421
  		// 如果是趋势图表,添加x轴标签倾斜设置
  		const isTrendChart = canvasId === 'trendChart'
  		
d2158212   李宇   最新
422
423
424
425
426
427
428
429
430
431
  		const opts = {
  			type: 'line',
  			fontSize: 10,
  			dataLabel: false,
  			dataPointShape: true,
  			legend: {
  				show: false
  			},
  			xAxis: {
  				disableGrid: false,
8b654f92   李宇   最新
432
433
434
435
436
437
  				itemCount: categories.length > 12 ? 12 : categories.length,
  				...(isTrendChart ? {
  					rotateLabel: true,
  					rotateAngle: 45,
  					marginTop: 5
  				} : {})
d2158212   李宇   最新
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
  			},
  			yAxis: {
  				gridType: 'dash',
  				dashLength: 2,
  				format: (val) => {
  					return val >= 10000 ? (val / 10000).toFixed(1) + '万' : val.toString()
  				}
  			},
  			extra: {
  				line: {
  					type: 'curve',
  					width: 2
  				},
  				tooltip: {
  					showBox: true,
  					showArrow: true,
  					showCategory: true
8b654f92   李宇   最新
455
  				},
d2158212   李宇   最新
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
  			}
  		}
  		
  		const query = uni.createSelectorQuery().in(vueInstance)
  		query.select(`#${canvasId}`).boundingClientRect((rect) => {
  			if (!rect || !rect.width || !rect.height) {
  				console.warn(`图表容器 ${canvasId} 尺寸获取失败`, rect)
  				return
  			}
  			const ctx = uni.createCanvasContext(canvasId, vueInstance)
  			const systemInfo = uni.getSystemInfoSync()
  			const pixelRatio = systemInfo.pixelRatio || 1
  			const chartWidth = Math.floor(uni.upx2px(rect.width) * pixelRatio) || options.width || 700
  			const chartHeight = Math.floor(uni.upx2px(rect.height) * pixelRatio) || options.height || 400
  			const chart = new uCharts({
  				type: 'line',
  				context: ctx,
  				width: chartWidth,
  				height: chartHeight,
  				categories: chartData.categories,
  				series: chartData.series,
  				animation: true,
  				background: 'none',
  				color: chartData.series.map(s => s.color),
8b654f92   李宇   最新
480
  				padding: isTrendChart ? [20, 10,10, 10] : [20, 10, 0, 10],
d2158212   李宇   最新
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
  				enableScroll: false,
  				legend: opts.legend,
  				xAxis: opts.xAxis,
  				yAxis: opts.yAxis,
  				extra: opts.extra
  			})
  		}).exec()
  	},
  	
  	// 绘制柱状图
  	drawColumnChart(vueInstance, canvasId, categories, series, options = {}) {
  		if (!categories || categories.length === 0 || !series || series.length === 0) {
  			return
  		}
  		
  		const chartData = {
  			categories: categories,
  			series: series.map((s, index) => ({
  				name: s.name || `系列${index + 1}`,
  				data: s.data,
  				color: s.color || ['#409EFF', '#67C23A', '#E6A23C', '#F56C6C'][index]
  			}))
  		}
  		
  		const opts = {
  			type: 'column',
  			fontSize: 10,
  			dataLabel: true,
  			legend: {
  				show: false
  			},
  			xAxis: {
  				disableGrid: false,
  				itemCount: categories.length > 12 ? 12 : categories.length
  			},
  			yAxis: {
  				gridType: 'dash',
  				dashLength: 2,
  				format: (val) => {
  					return val >= 10000 ? (val / 10000).toFixed(1) + '万' : val.toString()
  				}
  			},
  			extra: {
  				column: {
  					type: 'group',
  					width: 0.6,
  					activeBgColor: '#000000',
  					activeBgOpacity: 0.08
  				},
  				tooltip: {
  					showBox: true,
  					showArrow: true,
  					showCategory: true
  				}
  			}
  		}
  		
  		const query = uni.createSelectorQuery().in(vueInstance)
  		query.select(`#${canvasId}`).boundingClientRect((rect) => {
  			if (!rect || !rect.width || !rect.height) {
  				console.warn(`图表容器 ${canvasId} 尺寸获取失败`, rect)
  				return
  			}
  			const ctx = uni.createCanvasContext(canvasId, vueInstance)
  			const systemInfo = uni.getSystemInfoSync()
  			const pixelRatio = systemInfo.pixelRatio || 1
  			const chartWidth = Math.floor(uni.upx2px(rect.width) * pixelRatio) || options.width || 700
  			const chartHeight = Math.floor(uni.upx2px(rect.height) * pixelRatio) || options.height || 400
  			const chart = new uCharts({
  				type: 'column',
  				context: ctx,
  				width: chartWidth,
  				height: chartHeight,
  				categories: chartData.categories,
  				series: chartData.series,
  				animation: true,
  				background: 'none',
  				color: chartData.series.map(s => s.color),
  				padding: [20, 10, 0, 10],
  				enableScroll: false,
  				legend: opts.legend,
  				xAxis: opts.xAxis,
  				yAxis: opts.yAxis,
  				extra: opts.extra
  			})
  		}).exec()
  	},
  	
  	// 绘制饼图
  	drawPieChart(vueInstance, canvasId, data, options = {}) {
  		if (!data || data.length === 0) {
  			return
  		}
  		
  		const chartData = {
  			series: [{
  				data: data.map(item => ({
  					name: item.name,
  					value: item.value,
  					color: item.color
  				}))
  			}]
  		}
  		
  		const opts = {
  			type: 'pie',
  			fontSize: 10,
  			dataLabel: true,
  			legend: {
  				show: false
  			},
  			extra: {
  				pie: {
  					activeOpacity: 0.5,
  					activeRadius: 10,
  					offsetAngle: 0,
  					labelWidth: 15,
  					border: true,
  					borderWidth: 3,
  					borderColor: '#FFFFFF',
  					ringWidth: 30
  				},
  				tooltip: {
  					showBox: true,
  					showArrow: true
  				}
  			}
  		}
  		
  		const query = uni.createSelectorQuery().in(vueInstance)
  		query.select(`#${canvasId}`).boundingClientRect((rect) => {
  			if (!rect || !rect.width || !rect.height) {
  				console.warn(`图表容器 ${canvasId} 尺寸获取失败`, rect)
  				return
  			}
  			const ctx = uni.createCanvasContext(canvasId, vueInstance)
  			const systemInfo = uni.getSystemInfoSync()
  			const pixelRatio = systemInfo.pixelRatio || 1
  			const chartWidth = Math.floor(uni.upx2px(rect.width) * pixelRatio) || options.width || 400
  			const chartHeight = Math.floor(uni.upx2px(rect.height) * pixelRatio) || options.height || 400
  			const chart = new uCharts({
  				type: 'pie',
  				context: ctx,
  				width: chartWidth,
  				height: chartHeight,
  				series: chartData.series,
  				animation: true,
  				background: 'none',
  				color: chartData.series[0].data.map(d => d.color),
  				padding: 0,
  				enableScroll: false,
  				legend: opts.legend,
  				extra: opts.extra
  			})
  		}).exec()
  	},
  	
  	// 绘制雷达图
  	drawRadarChart(vueInstance, canvasId, indicators, data, options = {}) {
  		if (!indicators || indicators.length === 0 || !data || data.length === 0) {
  			return
  		}
  		
  		const chartData = {
  			categories: indicators.map(ind => ind.name),
  			series: [{
  				name: data.name || '数据',
  				data: indicators.map(ind => {
  					const indicatorName = ind.name
  					return data.value.find(item => item.name === indicatorName)?.value || 0
  				}),
  				color: data.color || '#409EFF'
  			}]
  		}
  		
  		const opts = {
  			type: 'radar',
  			fontSize: 10,
  			dataLabel: true,
  			legend: {
  				show: false
  			},
  			extra: {
  				radar: {
  					gridType: 'radar',
  					gridCount: 4,
  					opacity: 0.2,
  					labelOffset: 10,
  					gridColor: 'rgba(64, 158, 255, 0.2)',
  					gridBorderColor: 'rgba(64, 158, 255, 0.3)'
  				},
  				tooltip: {
  					showBox: true,
  					showArrow: true
  				}
  			}
  		}
  		
  		const query = uni.createSelectorQuery().in(vueInstance)
  		query.select(`#${canvasId}`).boundingClientRect((rect) => {
  			if (!rect || !rect.width || !rect.height) {
  				console.warn(`图表容器 ${canvasId} 尺寸获取失败`, rect)
  				return
  			}
  			const ctx = uni.createCanvasContext(canvasId, vueInstance)
  			const systemInfo = uni.getSystemInfoSync()
  			const pixelRatio = systemInfo.pixelRatio || 1
  			const chartWidth = Math.floor(uni.upx2px(rect.width) * pixelRatio) || options.width || 400
  			const chartHeight = Math.floor(uni.upx2px(rect.height) * pixelRatio) || options.height || 400
  			const chart = new uCharts({
  				type: 'radar',
  				context: ctx,
  				width: chartWidth,
  				height: chartHeight,
  				categories: chartData.categories,
  				series: chartData.series,
  				animation: true,
  				background: 'none',
  				color: [chartData.series[0].color],
  				padding: [15, 15, 0, 15],
  				enableScroll: false,
  				legend: opts.legend,
  				extra: opts.extra
  			})
  		}).exec()
  	},
  	
  	// 绘制漏斗图
  	drawFunnelChart(vueInstance, canvasId, data, options = {}) {
  		if (!data || data.length === 0) {
  			return
  		}
  		
  		// uCharts 漏斗图数据格式:series 中的 data 应该是对象数组
  		const sortedData = [...data].sort((a, b) => (b.value || 0) - (a.value || 0))
  		
  		const chartData = {
  			series: [{
  				data: sortedData.map(item => ({
  					name: item.name || '',
  					centerText: String(item.value || 0),
  					value: Number(item.value) || 0
  				}))
  			}]
  		}
  		
  		const opts = {
  			type: 'funnel',
  			fontSize: 10,
  			dataLabel: true,
  			padding: [15, 15, 0, 15],
  			enableScroll: false,
  			color: sortedData.map(item => item.color),
  			extra: {
  				funnel: {
  					activeOpacity: 0.3,
  					activeWidth: 10,
  					border: true,
  					borderWidth: 2,
  					borderColor: '#FFFFFF',
  					fillOpacity: 1,
  					labelAlign: 'right'
  				},
  				tooltip: {
  					showBox: true,
  					showArrow: true
  				}
  			}
  		}
  		
  		const query = uni.createSelectorQuery().in(vueInstance)
  		query.select(`#${canvasId}`).boundingClientRect((rect) => {
  			if (!rect || !rect.width || !rect.height) {
  				console.warn(`图表容器 ${canvasId} 尺寸获取失败`, rect)
  				return
  			}
  			const ctx = uni.createCanvasContext(canvasId, vueInstance)
  			const systemInfo = uni.getSystemInfoSync()
  			const pixelRatio = systemInfo.pixelRatio || 1
  			const chartWidth = Math.floor(uni.upx2px(rect.width) * pixelRatio) || options.width || 700
  			const chartHeight = Math.floor(uni.upx2px(rect.height) * pixelRatio) || options.height || 500
  			const chart = new uCharts({
  				type: 'funnel',
  				context: ctx,
  				width: chartWidth,
  				height: chartHeight,
  				series: chartData.series,
  				animation: true,
  				background: 'none',
  				color: opts.color,
  				padding: opts.padding,
  				enableScroll: opts.enableScroll,
  				extra: opts.extra
  			})
  		}).exec()
  	}
  }
  
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
779
780
781
782
  export default {
  	data() {
  		return {
  			loading: false,
aa81040d   李宇   最新
783
784
  			screenshotLoading: false, // 截图加载状态
  			showScreenshotBtn: true, // 是否显示截图按钮
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
785
786
787
  			selectedMonth: '',
  			trendType: 'day', // month/day/week
  			coachRankType: 'billing', // billing/consume/refund
8b654f92   李宇   最新
788
  			pageScrollTop: 0, // 页面滚动位置
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
789
  			
d2158212   李宇   最新
790
791
792
  			// 会员详情弹窗
  			showMemberDetailModal: false,
  			detailModalType: '', // total/active/remaining/sleep
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
793
794
795
796
797
798
799
800
  			
  			// 核心KPI数据
  			kpiData: {},
  			
  			// 会员统计数据
  			memberStatistics: {
  				totalMembers: 0,
  				newMembers: 0,
f218a54a   李宇   最新
801
802
803
  				newMembersLastMonth: 0,
  				active_0_3: 0,
  				active_4_59: 0,
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
804
805
  				activeMembers: 0,
  				activeRate: 0,
f218a54a   李宇   最新
806
  				activeRate30: 0,
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
807
808
  				totalRemainingAmount: 0,
  				avgRemainingAmount: 0,
f218a54a   李宇   最新
809
810
811
812
813
814
815
816
817
  				topRemainingMemberId: '',
  				topRemainingMemberName: '',
  				topRemainingAmount: 0,
  				topBillingMemberId: '',
  				topBillingMemberName: '',
  				topBillingAmount: 0,
  				topConsumeMemberId: '',
  				topConsumeMemberName: '',
  				topConsumeAmount: 0,
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
818
819
  				totalSleepMembers: 0,
  				sleep_60_89: 0,
f218a54a   李宇   最新
820
821
822
823
824
825
826
  				sleep_90_179: 0,
  				sleep_180_359: 0,
  				sleep_360_plus: 0,
  				beautyMembers: 0,
  				medicalMembers: 0,
  				techMembers: 0,
  				educationMembers: 0
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
827
  			},
f218a54a   李宇   最新
828
829
  			memberTypeDistribution: [], // 会员类型分布
  			customerVisitFrequencyData: [], // 客户到店频次数据
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
  			
  			// 趋势数据
  			trendData: [],
  			
  			// 排行榜数据
  			storeRanking: [],
  			coachRankings: {
  				billing: [],
  				consume: [],
  				refund: []
  			},
  			goldTriangleRankings: [],
  			
  			// 品项数据
  			consumeItemTop10: [],
  			billingItemTop10: [],
  			
  			// 拓客漏斗数据
8b654f92   李宇   最新
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
  			tkStatisticsData: null,
  			
  			// 会员类型分布图表数据
  			memberTypeChartData: {},
  			memberTypeChartOpts: {
  				color: ["#F56C6C", "#67C23A", "#409EFF", "#E6A23C"],
  				padding: [15, 15, 0, 15],
  				dataLabel: false,
  				legend: {
  					show: false
  				},
  				extra: {
  					pie: {
  						activeOpacity: 0.5,
  						activeRadius: 10,
  						offsetAngle: 0,
  						labelWidth: 15,
  						border: true,
  						borderWidth: 3,
  						borderColor: '#FFFFFF',
  						ringWidth: 30
  					},
  					tooltip: {
  						showBox: true,
  						showArrow: true,
  						format: (item) => {
  							return item.name + ': ' + (item.data || 0) + '人'
  						}
  					}
  				}
  			},
  			// 会员价值分层图表数据
  			memberCategoryChartData: {},
  			memberCategoryChartOpts: {
  				color: ["#409EFF"],
  				padding: [0, 0, 0, 0],
  				dataLabel: false,
  				legend: {
  					show: false
  				},
  				extra: {
  					radar: {
  						gridType: 'radar',
  						gridCount: 4,
  						opacity: 0.2,
  						labelOffset: 0,
  						gridColor: 'rgba(64, 158, 255, 0.2)',
  						gridBorderColor: 'rgba(64, 158, 255, 0.3)'
  					},
  					tooltip: {
  						showBox: true,
  						showArrow: true,
  						format: (item) => {
  							return item.name + ': ' + (item.data || 0) + '人'
  						}
  					}
  				}
  			},
  			// 经营效能趋势图表数据
  			trendChartData: {},
  			trendChartOpts: {
  				color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
  				padding: [15, 10, 0, 15],
  				enableScroll: true,
  				dataLabel: false,
  				dataPointShape: true,
  				legend: {},
  				xAxis: {
  					disableGrid: true,
  					scrollShow: true,
  					itemCount: 4
  				},
  				yAxis: {
  					gridType: "dash",
  					dashLength: 2,
  					format: (val) => {
  						return val >= 10000 ? (val / 10000).toFixed(1) + '万' : val.toString()
  					}
  				},
  				extra: {
  					line: {
  						type: "straight",
  						width: 2,
  						activeType: "hollow"
  					},
  					tooltip: {
  						showBox: true,
  						showArrow: true,
  						showCategory: true,
  						format: (item, category) => {
  							const val = item.data >= 10000 ? (item.data / 10000).toFixed(1) + '万' : item.data.toString()
  							return category + '\n' + item.name + ': ' + val
  						}
  					}
  				}
  			},
  			// 客户活跃度分析图表数据
  			visitFrequencyChartData: {},
  			visitFrequencyChartOpts: {
  				color: ["#409EFF"],
  				padding: [20, 10, 0, 10],
  				dataLabel: true,
  				legend: {
  					show: false
  				},
  				xAxis: {
  					disableGrid: false,
  					itemCount: 8
  				},
  				yAxis: {
  					gridType: 'dash',
  					dashLength: 2,
  					format: (val) => {
  						return val >= 10000 ? (val / 10000).toFixed(1) + '万' : val.toString()
  					}
  				},
  				extra: {
  					column: {
  						type: 'group',
  						width: 20,
  						activeBgColor: '#000000',
  						activeBgOpacity: 0.08
  					},
  					tooltip: {
  						showBox: true,
  						showArrow: true,
  						showCategory: true,
  						format: (item, category) => {
  							return category + '\n' + item.name + ': ' + (item.data || 0) + '人'
  						}
  					}
  				}
  			},
  			// 客户获取转化链图表数据
  			funnelChartData: {},
  			funnelChartOpts: {
  				color: ["#409EFF", "#67C23A", "#E6A23C", "#F56C6C"],
  				padding: [15, 15, 0, 15],
  				dataLabel: true,
  				extra: {
  					funnel: {
  						activeOpacity: 0.3,
  						activeWidth: 10,
  						border: true,
  						borderWidth: 2,
  						borderColor: '#FFFFFF',
  						fillOpacity: 1,
  						labelAlign: 'right'
  					},
  					tooltip: {
  						showBox: true,
  						showArrow: true,
  						format: (item) => {
  							return item.name + ': ' + (item.data || 0)
  						}
  					}
  				}
  			}
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
  		}
  	},
  	computed: {
  		selectedMonthText() {
  			if (!this.selectedMonth) return '请选择月份'
  			const date = new Date(this.selectedMonth)
  			return `${date.getFullYear()}年${String(date.getMonth() + 1).padStart(2, '0')}月`
  		},
  		// 6大核心KPI列表
  		kpiList() {
  			const d = this.kpiData || {}
  			const tkCount = (this.tkStatisticsData && this.tkStatisticsData.TkCount) ? this.tkStatisticsData.TkCount : 0
  			return [
  				{
  					tooltip: '本月现金业绩,不包含退款业绩',
  					key: 'billing',
8b654f92   李宇   最新
1022
  					label: '开单金额',
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1023
1024
  					value: this.formatMoney(d.TotalBillingAmount),
  					raw: d.TotalBillingAmount || 0,
8b654f92   李宇   最新
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
  					type: 'green',
  					isMoney: true
  				},
  				{
  					tooltip: '实际退卡金额',
  					key: 'refund',
  					label: '退卡',
  					value: this.formatMoney(d.TotalRefundAmount),
  					raw: d.TotalRefundAmount || 0,
  					type: 'red',
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1035
1036
1037
1038
  					isMoney: true
  				},
  				{
  					tooltip: '',
8b654f92   李宇   最新
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
  					key: 'tk',
  					label: '人头数',
  					value: tkCount,
  					raw: tkCount,
  					type: 'light-blue',
  					isPercent: false,
  					unit: '人头'
  				},
  				{
  					tooltip: '',
  					key: 'visit',
  					label: '人次数',
  					value: 0,
  					raw: 0,
  					type: 'purple',
  					isPercent: false,
  					unit: '人次'
  				},
  				{
  					tooltip: '',
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1059
  					key: 'consume',
8b654f92   李宇   最新
1060
  					label: '消耗金额',
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1061
1062
  					value: this.formatMoney(d.TotalConsumeAmount),
  					raw: d.TotalConsumeAmount || 0,
8b654f92   李宇   最新
1063
  					type: 'light-blue',
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1064
1065
1066
  					isMoney: true
  				},
  				{
8b654f92   李宇   最新
1067
1068
1069
1070
1071
1072
  					tooltip: '',
  					key: 'manual',
  					label: '手工费',
  					value: this.formatMoney(0),
  					raw: 0,
  					type: 'orange',
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1073
1074
1075
  					isMoney: true
  				},
  				{
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1076
  					tooltip: '',
8b654f92   李宇   最新
1077
1078
1079
1080
1081
  					key: 'item',
  					label: '项目数',
  					value: 0,
  					raw: 0,
  					type: 'pink',
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1082
  					isPercent: false
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1083
1084
1085
  				}
  			]
  		},
8b654f92   李宇   最新
1086
1087
1088
1089
1090
1091
1092
1093
  		// 上方4个KPI(2x2布局)
  		kpiListTop() {
  			return this.kpiList.slice(0, 4)
  		},
  		// 下方3个KPI(1x3布局)
  		kpiListBottom() {
  			return this.kpiList.slice(4, 7)
  		},
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
  		// 健康师排行榜当前类型
  		coachRanking() {
  			const list = this.coachRankings[this.coachRankType] || []
  			const max = list.length > 0 ? Math.max(...list.map(i => (i.Amount || 1)), 1) : 100
  			return list.map(item => ({
  				...item,
  				Percent: Math.min(100, Math.round((item.Amount / max) * 100))
  			})).slice(0, 10)
  		},
  		// 金三角排行榜Top10
  		goldTriangleRankingTop10() {
  			if (!this.goldTriangleRankings || this.goldTriangleRankings.length === 0) {
  				return []
  			}
  			return [...this.goldTriangleRankings]
  				.sort((a, b) => (b.F_TotalPerformance || b.TotalPerformance || 0) - (a.F_TotalPerformance || a.TotalPerformance || 0))
  				.slice(0, 10)
  				.map(item => ({
  					GoldTriangleName: item.F_GoldTriangleName || item.GoldTriangleName || '未知',
  					TotalPerformance: item.F_TotalPerformance || item.TotalPerformance || 0
  				}))
d2158212   李宇   最新
1115
1116
1117
1118
  		},
  		// 详情弹窗标题
  		detailModalTitle() {
  			const titleMap = {
8b654f92   李宇   最新
1119
1120
1121
1122
  				total: '总会员数',
  				active: '活跃会员',
  				remaining: '剩余权益',
  				sleep: '沉睡会员'
d2158212   李宇   最新
1123
  			}
8b654f92   李宇   最新
1124
  			return titleMap[this.detailModalType] || '会员'
d2158212   李宇   最新
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
  		},
  		// 详情弹窗数据
  		detailModalData() {
  			const ms = this.memberStatistics
  			const dataMap = {
  				total: [
  					{ label: '总会员数', value: this.formatNumber(ms.totalMembers) },
  					{ label: '本月新增', value: this.formatNumber(ms.newMembers) },
  					...(ms.newMembersLastMonth > 0 ? [{ label: '上月新增', value: this.formatNumber(ms.newMembersLastMonth) }] : [])
  				],
  				active: [
  					{ label: '活跃会员总数', value: this.formatNumber(ms.activeMembers) },
  					{ label: '活跃(≤3天)', value: this.formatNumber(ms.active_0_3) },
  					{ label: '常到店(4-59天)', value: this.formatNumber(ms.active_4_59) },
  					{ label: '60天活跃率', value: ms.activeRate + '%' },
  					{ label: '30天活跃率', value: ms.activeRate30 + '%' }
  				],
  				remaining: [
  					{ label: '总剩余权益', value: '¥' + this.formatMoney(ms.totalRemainingAmount) },
  					{ label: '人均剩余权益', value: this.formatMoney(ms.avgRemainingAmount) + '元' },
  					...(ms.topRemainingAmount > 0 ? [{ label: '最高剩余权益', value: (ms.topRemainingMemberName || '无') + ' ¥' + this.formatMoney(ms.topRemainingAmount) }] : []),
  					...(ms.topBillingAmount > 0 ? [{ label: '本月开单最高', value: (ms.topBillingMemberName || '无') + ' ¥' + this.formatMoney(ms.topBillingAmount) }] : []),
  					...(ms.topConsumeAmount > 0 ? [{ label: '本月消耗最高', value: (ms.topConsumeMemberName || '无') + ' ¥' + this.formatMoney(ms.topConsumeAmount) }] : [])
  				],
  				sleep: [
  					{ label: '沉睡会员总数', value: this.formatNumber(ms.totalSleepMembers) },
  					{ label: '60-89天', value: this.formatNumber(ms.sleep_60_89) },
  					{ label: '90-179天', value: this.formatNumber(ms.sleep_90_179) },
  					{ label: '180-359天', value: this.formatNumber(ms.sleep_180_359) },
  					{ label: '360天+', value: this.formatNumber(ms.sleep_360_plus) }
  				]
  			}
  			return dataMap[this.detailModalType] || []
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1158
1159
1160
1161
1162
1163
  		}
  	},
  	onLoad() {
  		// 默认选择当前月份
  		const now = new Date()
  		this.selectedMonth = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}`
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1164
1165
  		this.search()
  	},
aa81040d   李宇   最新
1166
1167
  	// 组件挂载时调用(作为组件使用时)
  	mounted() {
ba43caee   李宇   最新
1168
  		// this.init()
aa81040d   李宇   最新
1169
  	},
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1170
1171
1172
1173
1174
  	onPullDownRefresh() {
  		this.search().finally(() => {
  			uni.stopPullDownRefresh()
  		})
  	},
8b654f92   李宇   最新
1175
1176
1177
  	onPageScroll(e) {
  		this.pageScrollTop = e.scrollTop || 0
  	},
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1178
  	methods: {
aa81040d   李宇   最新
1179
1180
1181
1182
1183
1184
1185
  		// 初始化方法(供父组件调用)
  		init() {
  			// 默认选择当前月份
  			const now = new Date()
  			this.selectedMonth = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}`
  			this.search()
  		},
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
  		// 月份选择变化
  		onMonthChange(e) {
  			this.selectedMonth = e.detail.value
  			this.search()
  		},
  		// 切换趋势类型
  		switchTrendType(type) {
  			this.trendType = type
  			this.search()
  		},
  		// 切换健康师排行类型
  		switchCoachRankType(type) {
  			this.coachRankType = type
  		},
  		// 主搜索方法
  		async search() {
  			try {
  				this.loading = true
  				
  				// 格式化月份
  				const statisticsMonth = this.selectedMonth.replace(/-/, '')
  				const year = parseInt(this.selectedMonth.substring(0, 4))
  				const month = parseInt(this.selectedMonth.substring(5, 7))
  				const startDate = new Date(year, month - 1, 1)
  				const endDate = new Date(year, month, 0, 23, 59, 59)
  				
  				const startTime = this.formatDateTime(startDate)
  				const endTime = this.formatDateTime(endDate)
  				
  				// 并行加载所有数据
  				await Promise.all([
  					this.loadKPIs({ startTime, endTime }),
  					this.loadTrends({ statisticsMonth, trendType: this.trendType }),
  					this.loadTkFunnel({ startTime, endTime }),
  					this.loadRankings({ statisticsMonth, startTime, endTime }),
  					this.loadInsights({ startTime, endTime }),
  					this.loadMemberStatistics({ statisticsMonth })
  				])
  				
  			} catch (error) {
  				console.error('加载数据失败:', error)
  				uni.showToast({
  					title: '网络错误,请重试',
  					icon: 'none'
  				})
  			} finally {
  				this.loading = false
  			}
  		},
  		// 加载KPI数据
  		async loadKPIs(p) {
  			try {
  				const res = await this.API.getBusinessStatistics({
  					startTime: p.startTime,
  					endTime: p.endTime,
  					storeIds: []
  				})
  				
  				if (res.code === 200 && res.data) {
  					const data = res.data
  					this.kpiData = {
  						TotalBillingAmount: data.TotalBillingAmount || 0,
  						TotalConsumeAmount: data.TotalConsumeAmount || 0,
  						CompletedBillingAmount: (data.TotalBillingAmount || 0) - (data.TotalRefundAmount || 0),
  						BillingCompletionRate: data.BillingCompletionRate || 0,
  						TargetBillingAmount: data.TargetBillingAmount || 0,
  						TotalRefundAmount: data.TotalRefundAmount || 0
  					}
  				}
  			} catch (error) {
  				console.error('加载KPI数据失败:', error)
  			}
  		},
  		// 加载趋势数据
  		async loadTrends(p) {
  			try {
  				// 根据趋势类型构建参数
  				let params = {}
  				if (p.trendType === 'month') {
  					// 最近12个月
  					const startMonth = this.getMonthsAgo(11, p.statisticsMonth)
  					params = {
  						startMonth: startMonth,
  						endMonth: p.statisticsMonth,
  						periodType: 'month',
  						storeIds: []
  					}
  				} else if (p.trendType === 'day') {
  					// 本月按天
  					const dateRange = this.getMonthDateRange(p.statisticsMonth)
  					params = {
  						startMonth: dateRange.startDate,
  						endMonth: dateRange.endDate,
  						periodType: 'day',
  						storeIds: []
  					}
  				} else if (p.trendType === 'week') {
  					// 最近4周
  					const dateRange = this.getMonthDateRange(p.statisticsMonth)
  					const weekStart = this.getDaysAgo(27, dateRange.startDate)
  					params = {
  						startMonth: weekStart,
  						endMonth: dateRange.endDate,
  						periodType: 'week',
  						storeIds: []
  					}
  				}
  				
  				const res = await this.API.getStorePerformanceTrend(params)
  				
  				if (res.code === 200 && res.data) {
  					let data = res.data.Data || res.data || []
  					if (res.data.Success) {
  						data = res.data.Data || []
  					}
  					
  					// 处理趋势数据
  					const allData = []
  					if (Array.isArray(data)) {
  						data.forEach(store => {
  							if (store && store.Data && Array.isArray(store.Data)) {
  								store.Data.forEach(item => {
  									if (item && item.Month) {
  										allData.push({
  											Date: item.Month,
  											BillingAmount: parseFloat(item.TotalPerformance || 0),
  											ConsumeAmount: parseFloat(item.ConsumeAmount || 0)
  										})
  									}
  								})
  							}
  						})
  					}
  					
  					// 按日期分组汇总
  					const grouped = {}
  					allData.forEach(item => {
  						if (!grouped[item.Date]) {
  							grouped[item.Date] = { Date: item.Date, BillingAmount: 0, ConsumeAmount: 0 }
  						}
  						grouped[item.Date].BillingAmount += item.BillingAmount
  						grouped[item.Date].ConsumeAmount += item.ConsumeAmount
  					})
  					
  					this.trendData = Object.values(grouped).sort((a, b) => a.Date.localeCompare(b.Date))
  					
  					// 渲染图表
  					this.$nextTick(() => {
  						this.drawTrendChart()
  					})
  				}
  			} catch (error) {
  				console.error('加载趋势数据失败:', error)
  			}
  		},
  		// 加载拓客漏斗数据
  		async loadTkFunnel(p) {
  			try {
  				const res = await this.API.getTkStatistics({
  					startTime: p.startTime,
  					endTime: p.endTime,
  					storeId: []
  				})
  				
  				if (res.code === 200 && res.data) {
  					this.tkStatisticsData = res.data
62f1d695   李宇   最新
1352
1353
1354
1355
  					// 绘制漏斗图
  					this.$nextTick(() => {
  						this.drawFunnelChart()
  					})
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
  				}
  			} catch (error) {
  				console.error('加载拓客漏斗数据失败:', error)
  			}
  		},
  		// 加载排行榜数据
  		async loadRankings(p) {
  			try {
  				const [store, bill, cons, refu, gold] = await Promise.all([
  					this.API.getStorePerformanceRanking({
  						statisticsMonth: p.statisticsMonth,
  						topCount: 10
  					}),
  					this.API.getHealthCoachBillingRanking({
  						startTime: p.startTime,
  						endTime: p.endTime,
  						storeIds: []
  					}),
  					this.API.getHealthCoachConsumeRanking({
  						startTime: p.startTime,
  						endTime: p.endTime,
  						storeIds: []
  					}),
  					this.API.getHealthCoachRefundRanking({
  						startTime: p.startTime,
  						endTime: p.endTime,
  						storeIds: []
  					}),
  					this.API.getGoldTrianglePerformanceRanking({
  						statisticsMonth: p.statisticsMonth,
  						topCount: 10
  					})
  				])
  				
  				// 处理门店排行榜
  				if (store.code === 200 && store.data) {
  					let storeData = store.data.Data || store.data || []
  					if (store.data.Success) {
  						storeData = store.data.Data || []
  					}
  					this.storeRanking = storeData.map(item => ({
  						StoreId: item.StoreId,
  						StoreName: item.StoreName,
  						TotalPerformance: item.TotalPerformance || 0
  					}))
  				}
  				
  				// 处理健康师排行榜
  				this.coachRankings.billing = this.parseCoachRanking(bill, 'BillingPerformance')
  				this.coachRankings.consume = this.parseCoachRanking(cons, 'ConsumePerformance')
  				this.coachRankings.refund = this.parseCoachRanking(refu, 'RefundPerformance')
  				
  				// 处理金三角排行榜
  				if (gold.code === 200 && gold.data) {
  					let goldData = gold.data.Data || gold.data || []
  					if (gold.data.Success) {
  						goldData = gold.data.Data || []
  					}
  					this.goldTriangleRankings = goldData.map(item => ({
  						F_GoldTriangleName: item.GoldTriangleName,
  						F_TotalPerformance: item.TotalPerformance || 0
  					}))
  				}
  			} catch (error) {
  				console.error('加载排行榜数据失败:', error)
  			}
  		},
  		// 解析健康师排行榜数据
  		parseCoachRanking(res, performanceKey) {
  			if (res.code === 200 && res.data) {
  				let data = res.data.Data || res.data || []
  				if (res.data.Success) {
  					data = res.data.Data || []
  				}
  				return data.map(i => ({
  					HealthCoachName: i.HealthCoachName || i.Name || '未知',
  					Amount: i[performanceKey] || i.Performance || 0
  				}))
  			}
  			return []
  		},
  		// 加载洞察数据(到店频次、品项统计)
  		async loadInsights(p) {
  			try {
  				const [freq, item] = await Promise.all([
  					this.API.getCustomerVisitFrequency({
  						startTime: p.startTime,
  						endTime: p.endTime,
  						storeIds: []
  					}),
  					this.API.getItemStatistics({
  						startTime: p.startTime,
  						endTime: p.endTime,
  						storeIds: []
  					})
  				])
  				
f218a54a   李宇   最新
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
  				// 处理客户到店频次数据
  				if (freq.code === 200 && freq.data) {
  					const raw = Array.isArray(freq.data) ? freq.data : (freq.data.Data || [])
  					this.customerVisitFrequencyData = raw.map(item => ({
  						VisitCount: item.VisitCount || 0,
  						CustomerCount: item.CustomerCount || 0
  					}))
  					
  					// 渲染到店频次图表
  					this.$nextTick(() => {
  						this.drawVisitFrequencyChart()
  					})
  				}
  				
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
  				// 处理品项统计数据
  				if (item.code === 200 && item.data) {
  					const raw = Array.isArray(item.data) ? item.data : (item.data.Data || [])
  					
  					// 消耗品项TOP10
  					const consumeMax = raw.length ? Math.max(...raw.map(i => (i.ConsumeAmount || 0)), 1) : 100
  					this.consumeItemTop10 = raw
  						.filter(i => (i.ConsumeAmount || 0) > 0)
  						.sort((a, b) => (b.ConsumeAmount || 0) - (a.ConsumeAmount || 0))
  						.slice(0, 10)
  						.map(i => ({
  							ItemName: i.ItemName || '未知品项',
  							Amount: i.ConsumeAmount || 0,
  							Percent: Math.round(((i.ConsumeAmount || 0) / consumeMax) * 100)
  						}))
  					
  					// 开单品项TOP10
  					const billingMax = raw.length ? Math.max(...raw.map(i => (i.BillingAmount || 0)), 1) : 100
  					this.billingItemTop10 = raw
  						.filter(i => (i.BillingAmount || 0) > 0)
  						.sort((a, b) => (b.BillingAmount || 0) - (a.BillingAmount || 0))
  						.slice(0, 10)
  						.map(i => ({
  							ItemName: i.ItemName || '未知品项',
  							Amount: i.BillingAmount || 0,
  							Percent: Math.round(((i.BillingAmount || 0) / billingMax) * 100)
  						}))
  				}
  			} catch (error) {
  				console.error('加载洞察数据失败:', error)
  			}
  		},
  		// 加载会员统计数据
  		async loadMemberStatistics(p) {
  			try {
  				const res = await this.API.getDashboardData({
  					statisticsMonth: p.statisticsMonth
  				})
  				
  				if (res.code === 200 && res.data) {
  					let data = null
  					if (res.data.Success && res.data.Data) {
  						data = res.data.Data
  					} else if (res.data) {
  						data = res.data
  					}
  					
  					if (data && data.MemberStatistics) {
  						const ms = data.MemberStatistics
  						const active_0_3 = ms.ActiveMembers0_3 || 0
  						const active_4_59 = ms.ActiveMembers4_59 || 0
  						const totalMembers = ms.TotalMembers || 0
  						const active30 = ms.ActiveMembers || 0
  						const active60 = active_0_3 + active_4_59
  						const activeRate60 = totalMembers > 0 ? Math.round((active60 / totalMembers) * 10000) / 100 : 0
f218a54a   李宇   最新
1522
  						const activeRate30 = totalMembers > 0 ? Math.round((active30 / totalMembers) * 10000) / 100 : 0
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1523
1524
1525
1526
  						
  						this.memberStatistics = {
  							totalMembers,
  							newMembers: ms.NewMembersThisMonth || 0,
f218a54a   李宇   最新
1527
1528
1529
  							newMembersLastMonth: ms.NewMembersLastMonth || 0,
  							active_0_3,
  							active_4_59,
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1530
1531
  							activeMembers: active60,
  							activeRate: activeRate60,
f218a54a   李宇   最新
1532
  							activeRate30,
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1533
1534
  							totalRemainingAmount: ms.TotalRemainingAmount || 0,
  							avgRemainingAmount: ms.AvgRemainingAmount || 0,
f218a54a   李宇   最新
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
  							topRemainingMemberId: ms.TopRemainingMemberId || '',
  							topRemainingMemberName: ms.TopRemainingMemberName || '',
  							topRemainingAmount: ms.TopRemainingAmount || 0,
  							topBillingMemberId: ms.TopBillingMemberId || '',
  							topBillingMemberName: ms.TopBillingMemberName || '',
  							topBillingAmount: ms.TopBillingAmount || 0,
  							topConsumeMemberId: ms.TopConsumeMemberId || '',
  							topConsumeMemberName: ms.TopConsumeMemberName || '',
  							topConsumeAmount: ms.TopConsumeAmount || 0,
  							totalSleepMembers: ms.TotalSleepMembers || 0,
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1545
  							sleep_60_89: ms.SleepMembers60_89 || 0,
f218a54a   李宇   最新
1546
1547
1548
1549
1550
1551
1552
  							sleep_90_179: ms.SleepMembers90_179 || 0,
  							sleep_180_359: ms.SleepMembers180_359 || 0,
  							sleep_360_plus: ms.SleepMembers360Plus || 0,
  							beautyMembers: ms.BeautyMembers || 0,
  							medicalMembers: ms.MedicalMembers || 0,
  							techMembers: ms.TechMembers || 0,
  							educationMembers: ms.EducationMembers || 0
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1553
  						}
f218a54a   李宇   最新
1554
1555
1556
1557
1558
1559
1560
  						this.memberTypeDistribution = ms.MemberTypeDistribution || []
  						
  						// 等待DOM更新后渲染图表
  						this.$nextTick(() => {
  							this.drawMemberTypeChart()
  							this.drawMemberCategoryChart()
  						})
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
  					}
  				}
  			} catch (error) {
  				console.error('加载会员统计数据失败:', error)
  			}
  		},
  		// 格式化趋势日期
  		formatTrendDate(dateStr) {
  			if (!dateStr) return ''
  			// 如果是YYYYMM格式
  			if (dateStr.length === 6) {
  				const year = dateStr.substring(0, 4)
  				const month = dateStr.substring(4, 6)
  				return `${year}-${month}`
  			}
  			// 如果是YYYY-MM-DD格式
  			if (dateStr.length === 10) {
  				return dateStr
  			}
  			return dateStr
  		},
  		// 处理KPI点击
  		handleKpiClick(kpi) {
  			// KPI穿透功能,可以后续实现
  			uni.showToast({
d2158212   李宇   最新
1586
  				title: kpi.label ,
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
  				icon: 'none'
  			})
  		},
  		// 处理门店点击
  		handleStoreClick(store) {
  			// 门店详情功能
  			uni.showToast({
  				title: store.StoreName,
  				icon: 'none'
  			})
  		},
d2158212   李宇   最新
1598
1599
  		// 获取KPI图标名称(使用uview图标)
  		getKpiIconName(key) {
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1600
  			const iconMap = {
d2158212   李宇   最新
1601
1602
1603
1604
1605
  				billing: 'grid',
  				consume: 'star',
  				net: 'red-packet',
  				target: 'red-packet',
  				tk: 'account',
8b654f92   李宇   最新
1606
1607
1608
1609
  				refund: 'warning',
  				visit: 'account',
  				manual: 'star',
  				item: 'grid'
d2158212   李宇   最新
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
  			}
  			return iconMap[key] || 'chart'
  		},
  		// 获取KPI图标颜色
  		getKpiIconColor(type) {
  			const colorMap = {
  				primary: '#1976d2',
  				success: '#388e3c',
  				warning: '#f57c00',
  				info: '#7b1fa2',
  				error: '#d32f2f'
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1621
  			}
d2158212   李宇   最新
1622
  			return colorMap[type] || '#1976d2'
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
  		},
  		// 获取KPI颜色
  		getKpiColor(type) {
  			const colorMap = {
  				primary: '#409EFF',
  				success: '#67C23A',
  				warning: '#E6A23C',
  				info: '#909399',
  				error: '#F56C6C',
  				danger: '#F56C6C'
  			}
  			return colorMap[type] || '#409EFF'
  		},
  		// 格式化数字
  		formatNumber(num) {
  			if (num === null || num === undefined) return '0'
  			if (typeof num === 'string') num = parseFloat(num)
  			if (isNaN(num)) return '0'
  			if (num >= 10000) {
  				return (num / 10000).toFixed(2) + '万'
  			}
  			return num.toLocaleString()
  		},
  		// 格式化金额
  		formatMoney(amount) {
  			if (amount === null || amount === undefined) return '0.00'
  			if (typeof amount === 'string') amount = parseFloat(amount)
  			if (isNaN(amount)) return '0.00'
  			if (amount >= 10000) {
  				return (amount / 10000).toFixed(2) + '万'
  			}
  			return amount.toFixed(2)
  		},
  		// 格式化百分比
  		formatPercent(percent) {
  			return Math.round(percent * 100) / 100
  		},
62f1d695   李宇   最新
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
  		// 获取邀约率
  		getTkInviteRate() {
  			if (!this.tkStatisticsData || !this.tkStatisticsData.TkCount) return 0
  			return (this.tkStatisticsData.YaoyCount || 0) / this.tkStatisticsData.TkCount * 100
  		},
  		// 获取到店率
  		getInviteStoreRate() {
  			if (!this.tkStatisticsData || !this.tkStatisticsData.YaoyCount) return 0
  			return (this.tkStatisticsData.DdCount || 0) / this.tkStatisticsData.YaoyCount * 100
  		},
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
  		// 格式化日期时间
  		formatDateTime(date) {
  			const year = date.getFullYear()
  			const month = String(date.getMonth() + 1).padStart(2, '0')
  			const day = String(date.getDate()).padStart(2, '0')
  			const hours = String(date.getHours()).padStart(2, '0')
  			const minutes = String(date.getMinutes()).padStart(2, '0')
  			const seconds = String(date.getSeconds()).padStart(2, '0')
  			return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
  		},
  		// 获取月份日期范围
  		getMonthDateRange(monthStr) {
  			const year = parseInt(monthStr.substring(0, 4))
  			const month = parseInt(monthStr.substring(4, 6))
  			const startDate = new Date(year, month - 1, 1)
  			const endDate = new Date(year, month, 0, 23, 59, 59)
  			return {
  				startDate: this.formatDateTime(startDate).split(' ')[0],
  				endDate: this.formatDateTime(endDate).split(' ')[0]
  			}
  		},
  		// 获取N个月前的月份(YYYYMM格式)
  		getMonthsAgo(n, monthStr) {
  			const year = parseInt(monthStr.substring(0, 4))
  			const month = parseInt(monthStr.substring(4, 6))
  			const date = new Date(year, month - 1 - n, 1)
  			return `${date.getFullYear()}${String(date.getMonth() + 1).padStart(2, '0')}`
  		},
  		// 获取N天前的日期(YYYY-MM-DD格式)
  		getDaysAgo(n, dateStr) {
  			const date = new Date(dateStr)
  			date.setDate(date.getDate() - n)
  			return date.toISOString().split('T')[0]
  		},
  		// 初始化图表
  		initChart() {
d2158212   李宇   最新
1706
  			// uCharts 不需要初始化,图表会在数据加载后自动绘制
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1707
  		},
aa81040d   李宇   最新
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
  		// 保存截图
  		async saveScreenshot() {
  			// 隐藏截图按钮
  			this.showScreenshotBtn = false
  			// 显示加载提示
  			uni.showLoading({
  				title: '截图中'
  			})
  			this.screenshotLoading = true
  			try {
  				// 根据平台选择不同的截图方式
  				// #ifdef H5
  				await this.saveScreenshotH5()
  				// #endif
  				
  				// #ifdef MP-WEIXIN
  				await this.saveScreenshotMiniProgram()
  				// #endif
  				
  				// #ifndef H5 || MP-WEIXIN
  				// 其他平台的兜底处理
  				await this.saveScreenshotFallback()
  				// #endif
  			} catch (error) {
  				console.error('截图生成失败:', error)
  				uni.showToast({
  					title: '截图生成失败: ' + (error.message || '未知错误'),
  					icon: 'none',
  					duration: 3000
  				})
  			} finally {
  				this.screenshotLoading = false
  				// 隐藏加载提示
  				uni.hideLoading()
  				// 恢复显示截图按钮
  				this.showScreenshotBtn = true
  			}
  		},
  		// H5平台截图
  		async saveScreenshotH5() {
  			try {
  				// 动态导入html2canvas
  				const html2canvas = await import('html2canvas')
  				
  				// 获取要截图的容器
  				let element = document.querySelector('.warpbox')
  				if (!element) {
  					element = document.querySelector('.page')
  				}
  				if (!element) {
  					throw new Error('未找到要截图的内容')
  				}
  				
  				// 等待页面完全渲染
  				await new Promise(resolve => setTimeout(resolve, 1000))
  				
  				// 滚动到页面顶部确保所有内容可见
  				window.scrollTo(0, 0)
  				await new Promise(resolve => setTimeout(resolve, 500))
  				
  				// 临时修改背景色为白色,确保截图效果
  				const originalBg = element.style.background
  				element.style.background = '#ffffff'
  				
  				// 等待样式生效
  				await new Promise(resolve => setTimeout(resolve, 200))
  				
  				// 配置截图选项
  				const options = {
  					allowTaint: true,
  					useCORS: true,
  					scale: 2.0,
  					backgroundColor: '#ffffff',
  					logging: false,
  					imageTimeout: 30000,
  					scrollX: 0,
  					scrollY: 0,
  					onclone: function(clonedDoc) {
  						clonedDoc.body.style.backgroundColor = '#ffffff'
  						clonedDoc.documentElement.style.backgroundColor = '#ffffff'
  					}
  				}
  				
  				// 生成截图
  				let canvas
  				try {
  					canvas = await html2canvas.default(element, options)
  				} catch (firstError) {
  					console.warn('第一次截图失败,尝试备选方案:', firstError)
  					const fallbackOptions = {
  						allowTaint: true,
  						useCORS: true,
  						scale: 2.0,
  						backgroundColor: '#ffffff',
  						logging: false,
  						imageTimeout: 30000
  					}
  					canvas = await html2canvas.default(element, fallbackOptions)
  				}
  				
  				// 转换为DataURL
  				const dataUrl = canvas.toDataURL('image/png', 1.0)
  				
  				// 创建下载链接
  				const link = document.createElement('a')
  				const fileName = `集团驾驶舱_${this.selectedMonth}_${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.png`
  				link.download = fileName
  				link.href = dataUrl
  				
  				// 触发下载
  				document.body.appendChild(link)
  				link.click()
  				document.body.removeChild(link)
  				
  				// 恢复原始背景色
  				element.style.background = originalBg
  				
  				uni.showToast({
  					title: '截图保存成功',
  					icon: 'success',
  					duration: 2000
  				})
  			} catch (error) {
  				console.error('H5截图失败:', error)
  				throw error
  			}
  		},
  		// 微信小程序截图
  		async saveScreenshotMiniProgram() {
  			try {
  				// 获取系统信息
  				const systemInfo = uni.getSystemInfoSync()
  				
  				// 使用页面截图API
  				uni.canvasToTempFilePath({
  					canvasId: 'screenshot-canvas',
  					success: (res) => {
  						// 保存到相册
  						uni.saveImageToPhotosAlbum({
  							filePath: res.tempFilePath,
  							success: () => {
  								uni.showToast({
  									title: '截图已保存到相册',
  									icon: 'success',
  									duration: 2000
  								})
  							},
  							fail: (err) => {
  								console.error('保存到相册失败:', err)
  								// 如果用户拒绝授权,提供预览
  								uni.previewImage({
  									urls: [res.tempFilePath],
  									current: res.tempFilePath
  								})
  							}
  						})
  					},
  					fail: (err) => {
  						console.error('导出图片失败:', err)
  						throw new Error('导出图片失败')
  					}
  				}, this)
  			} catch (error) {
  				console.error('小程序截图失败:', error)
  				throw error
  			}
  		},
  		// 兜底截图方案
  		async saveScreenshotFallback() {
  			await new Promise(resolve => setTimeout(resolve, 2000))
  			uni.showToast({
  				title: '截图功能暂不支持当前平台',
  				icon: 'none',
  				duration: 2000
  			})
  		},
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1884
1885
  		// 绘制趋势图表
  		drawTrendChart() {
d2158212   李宇   最新
1886
  			if (!this.trendData || this.trendData.length === 0) {
8b654f92   李宇   最新
1887
  				this.trendChartData = {}
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1888
1889
1890
  				return
  			}
  			
d2158212   李宇   最新
1891
1892
1893
1894
  			// 格式化日期
  			const categories = this.trendData.map(item => {
  				const date = item.Date
  				if (!date) return ''
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1895
  				
d2158212   李宇   最新
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
  				if (this.trendType === 'month') {
  					if (date.length === 6) {
  						return date.substring(0, 4) + '-' + date.substring(4, 6)
  					}
  				} else if (this.trendType === 'day') {
  					if (date.length >= 10) {
  						return date.substring(5, 10) // MM-DD
  					}
  				} else if (this.trendType === 'week') {
  					if (date.includes('-W')) {
  						return date.replace('-W', ' 第') + '周'
  					}
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1908
  				}
d2158212   李宇   最新
1909
1910
  				return date
  			})
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1911
  			
d2158212   李宇   最新
1912
1913
1914
  			const series = [
  				{
  					name: '成交额',
8b654f92   李宇   最新
1915
  					data: this.trendData.map(item => parseFloat((parseFloat(item.BillingAmount || 0)).toFixed(2)))
d2158212   李宇   最新
1916
1917
1918
  				},
  				{
  					name: '服务产出',
8b654f92   李宇   最新
1919
  					data: this.trendData.map(item => parseFloat((parseFloat(item.ConsumeAmount || 0)).toFixed(2)))
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1920
  				}
d2158212   李宇   最新
1921
  			]
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
1922
  			
8b654f92   李宇   最新
1923
1924
1925
1926
1927
  			// 更新图表数据
  			this.trendChartData = {
  				categories: categories,
  				series: series
  			}
f218a54a   李宇   最新
1928
1929
1930
1931
  		},
  		// 绘制会员类型分布饼图
  		drawMemberTypeChart() {
  			if (!this.memberTypeDistribution || this.memberTypeDistribution.length === 0) {
8b654f92   李宇   最新
1932
  				this.memberTypeChartData = {}
f218a54a   李宇   最新
1933
1934
1935
  				return
  			}
  			
f218a54a   李宇   最新
1936
  			const colors = ['#F56C6C', '#67C23A', '#409EFF', '#E6A23C']
d2158212   李宇   最新
1937
1938
1939
1940
1941
  			const data = this.memberTypeDistribution.map((item, index) => ({
  				name: item.MemberType || '未知',
  				value: item.Count || 0,
  				color: colors[index % colors.length]
  			}))
f218a54a   李宇   最新
1942
  			
8b654f92   李宇   最新
1943
1944
1945
1946
1947
1948
  			// 更新图表数据
  			this.memberTypeChartData = {
  				series: [{
  					data: data
  				}]
  			}
f218a54a   李宇   最新
1949
1950
1951
1952
  		},
  		// 绘制会员价值分层雷达图
  		drawMemberCategoryChart() {
  			if (!this.memberStatistics) {
8b654f92   李宇   最新
1953
  				this.memberCategoryChartData = {}
f218a54a   李宇   最新
1954
1955
1956
  				return
  			}
  			
d2158212   李宇   最新
1957
1958
1959
  			const beautyMembers = this.memberStatistics.beautyMembers || 0
  			const medicalMembers = this.memberStatistics.medicalMembers || 0
  			const techMembers = this.memberStatistics.techMembers || 0
f218a54a   李宇   最新
1960
  			
d2158212   李宇   最新
1961
1962
1963
  			const categories = ['生美会员', '医美会员', '科技部会员']
  			const series = [{
  				name: '会员分布',
8b654f92   李宇   最新
1964
  				data: [beautyMembers, medicalMembers, techMembers]
d2158212   李宇   最新
1965
  			}]
f218a54a   李宇   最新
1966
  			
8b654f92   李宇   最新
1967
1968
1969
1970
1971
  			// 更新图表数据
  			this.memberCategoryChartData = {
  				categories: categories,
  				series: series
  			}
f218a54a   李宇   最新
1972
1973
1974
1975
  		},
  		// 绘制客户活跃度分析图表
  		drawVisitFrequencyChart() {
  			if (!this.customerVisitFrequencyData || this.customerVisitFrequencyData.length === 0) {
8b654f92   李宇   最新
1976
  				this.visitFrequencyChartData = {}
f218a54a   李宇   最新
1977
1978
1979
  				return
  			}
  			
f218a54a   李宇   最新
1980
1981
1982
1983
1984
  			// 排序数据(按到店次数)
  			const sortedData = [...this.customerVisitFrequencyData]
  				.sort((a, b) => (a.VisitCount || 0) - (b.VisitCount || 0))
  				.slice(0, 8)
  			
8b654f92   李宇   最新
1985
1986
1987
1988
  			if (sortedData.length === 0) {
  				this.visitFrequencyChartData = {}
  				return
  			}
f218a54a   李宇   最新
1989
  			
d2158212   李宇   最新
1990
1991
1992
  			const categories = sortedData.map(item => (item.VisitCount || 0) + '次')
  			const series = [{
  				name: '客户数',
8b654f92   李宇   最新
1993
  				data: sortedData.map(item => item.CustomerCount || 0)
d2158212   李宇   最新
1994
  			}]
f218a54a   李宇   最新
1995
  			
8b654f92   李宇   最新
1996
1997
1998
1999
2000
  			// 更新图表数据
  			this.visitFrequencyChartData = {
  				categories: categories,
  				series: series
  			}
f218a54a   李宇   最新
2001
2002
2003
2004
2005
  		},
  		// 获取会员类型颜色
  		getMemberTypeColor(index) {
  			const colors = ['#F56C6C', '#67C23A', '#409EFF', '#E6A23C']
  			return colors[index % colors.length]
62f1d695   李宇   最新
2006
2007
2008
  		},
  		// 绘制漏斗图
  		drawFunnelChart() {
8b654f92   李宇   最新
2009
2010
2011
2012
  			if (!this.tkStatisticsData) {
  				this.funnelChartData = {}
  				return
  			}
62f1d695   李宇   最新
2013
  			
62f1d695   李宇   最新
2014
2015
2016
2017
2018
2019
2020
2021
  			const d = this.tkStatisticsData
  			const funnelData = [
  				{ value: d.TkCount || 0, name: '获客', color: '#409EFF' },
  				{ value: d.YaoyCount || 0, name: '邀约', color: '#67C23A' },
  				{ value: d.DdCount || 0, name: '到店', color: '#E6A23C' },
  				{ value: d.XfCount || 0, name: '成交', color: '#F56C6C' }
  			]
  			
8b654f92   李宇   最新
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
  			// 更新图表数据
  			this.funnelChartData = {
  				series: [{
  					data: funnelData.map(item => ({
  						name: item.name,
  						value: item.value,
  						color: item.color
  					}))
  				}]
  			}
d2158212   李宇   最新
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
  		},
  		// 打开会员详情弹窗
  		openMemberDetailModal(type) {
  			this.detailModalType = type
  			this.showMemberDetailModal = true
  		},
  		// 关闭会员详情弹窗
  		closeMemberDetailModal() {
  			this.showMemberDetailModal = false
  			this.detailModalType = ''
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
  		}
  	}
  }
  </script>
  
  <style lang="scss" scoped>
  .page {
  	min-height: 100vh;
  	background: linear-gradient(135deg, #e8f5e9 0%, #b2dfdb 100%);
  	padding-bottom: 40rpx;
  	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  }
  
  .warpbox {
  	padding: 0 30rpx;
  	padding-top: 20rpx;
  }
  
  /* 顶部区域 */
  .header-section {
d2158212   李宇   最新
2062
  	margin-bottom: 20rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2063
2064
2065
2066
2067
2068
  	display: flex;
  	justify-content: space-between;
  	align-items: center;
  	padding: 0 10rpx;
  	
  	.page-title {
d2158212   李宇   最新
2069
  		font-size: 36rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2070
2071
2072
2073
2074
2075
2076
  		font-weight: bold;
  		color: #1f2937;
  	}
  	
  	.filter-box {
  		display: flex;
  		align-items: center;
aa81040d   李宇   最新
2077
  		gap: 12rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2078
2079
2080
2081
  		
  		.date-picker-trigger {
  			display: flex;
  			align-items: center;
aa81040d   李宇   最新
2082
2083
2084
2085
2086
  			background: rgba(255, 255, 255, 0.6);
  			backdrop-filter: blur(10px);
  			padding: 8rpx 16rpx;
  			border-radius: 30rpx;
  			border: 1px solid rgba(255, 255, 255, 0.8);
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2087
2088
  			
  			.date-text {
d2158212   李宇   最新
2089
  				font-size: 24rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2090
  				color: #333;
d2158212   李宇   最新
2091
  				margin-right: 6rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2092
2093
2094
2095
  			}
  		}
  		
  		.refresh-btn {
d2158212   李宇   最新
2096
  			padding: 6rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2097
2098
2099
2100
  			&.loading {
  				animation: rotate 1s linear infinite;
  			}
  		}
aa81040d   李宇   最新
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
  		
  		.screenshot-btn {
  			display: flex;
  			align-items: center;
  			gap: 8rpx;
  			padding: 8rpx 16rpx;
  			background: rgba(64, 158, 255, 0.1);
  			border-radius: 20rpx;
  			transition: all 0.3s;
  			
  			&:active {
  				background: rgba(64, 158, 255, 0.2);
  				transform: scale(0.95);
  			}
  			
  			&.loading {
  				opacity: 0.6;
  			}
  			
  			.screenshot-text {
  				font-size: 24rpx;
  				color: #409EFF;
  			}
  		}
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2125
2126
2127
2128
2129
  	}
  }
  
  /* 卡片容器通用样式 - 玻璃拟态 */
  .warpboxss {
d2158212   李宇   最新
2130
  	background: rgba(255, 255, 255, 0.8);
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2131
2132
  	backdrop-filter: blur(20px) saturate(180%);
  	-webkit-backdrop-filter: blur(20px) saturate(180%);
d2158212   李宇   最新
2133
2134
  	padding: 20rpx;
  	border-radius: 20rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2135
  	box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
d2158212   李宇   最新
2136
  	margin-bottom: 20rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
  	transition: all 0.3s ease;
  	
  	&:active {
  		transform: scale(0.99);
  	}
  }
  
  .warpboxs-small-title {
  	display: flex;
  	justify-content: space-between;
  	align-items: center;
d2158212   李宇   最新
2148
  	font-size: 28rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2149
2150
  	font-weight: 600;
  	color: #1f2937;
d2158212   李宇   最新
2151
  	margin-bottom: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2152
2153
2154
2155
2156
2157
2158
  	
  	view:first-child {
  		display: flex;
  		align-items: center;
  	}
  
  	.warpboxs-small-title-line {
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2159
  		background: linear-gradient(180deg, #43a047 0%, #66bb6a 100%);
8b654f92   李宇   最新
2160
2161
  		height: 26rpx;
  		width: 10rpx;
d2158212   李宇   最新
2162
  		margin-right: 12rpx;
8b654f92   李宇   最新
2163
2164
2165
2166
2167
  		border-radius: 18rpx;
  		box-shadow:
  			0 2rpx 8rpx rgba(67, 160, 71, 0.4),
  			0 0 12rpx rgba(67, 160, 71, 0.3),
  			inset 0 1rpx 2rpx rgba(255, 255, 255, 0.3);
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2168
2169
2170
2171
  	}
  }
  
  /* KPI 核心指标 */
8b654f92   李宇   最新
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
  .kpi-section {
  	margin-bottom: 20rpx;
  }
  
  /* 上方4个指标 - 按照me.vue样式 */
  .billing-card {
  	width: 100%;
  	display: flex;
  	flex-direction: column;
  	justify-content: center;
  	padding: 24rpx;
  	background: rgba(255, 255, 255, 0.7);
  	backdrop-filter: blur(20px) saturate(180%);
  	-webkit-backdrop-filter: blur(20px) saturate(180%);
  	border-radius: 24rpx;
  	box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  	margin-bottom: 16rpx;
  	box-sizing: border-box;
  }
  
  .billing-main {
  	display: flex;
  	flex-direction: column;
  	align-items: flex-start;
  	justify-content: center;
  	flex: 1;
  	width: 100%;
  	padding: 0 8rpx;
  	margin-bottom: 30rpx;
  
  }
  
  .billing-card .stat-content {
  	display: flex;
  	flex-direction: column;
  	align-items: flex-start;
  	width: 100%;
  	gap: 10rpx;
  }
  
  .billing-card .label-row {
  	display: flex;
  	align-items: center;
  	justify-content: flex-start;
  	width: 100%;
  	gap: 8rpx;
  }
  
  .billing-card .card-label {
  	font-size: 24rpx;
  	font-weight: 500;
  	color: #666;
  }
  
  .billing-card .stat-icon-small {
  	width: 48rpx;
  	height: 48rpx;
  	border-radius: 12rpx;
  	margin-right: 8rpx;
  	display: flex;
  	align-items: center;
  	justify-content: center;
  	flex-shrink: 0;
  	
  	&.green { background: #4caf50; }
  	&.red { background: #f44336; }
  	&.light-blue { background: #42a5f5; }
  	&.purple { background: #9c27b0; }
  	&.orange { background: #ff9800; }
  	&.pink { background: #e91e63; }
  }
  
  .billing-value {
  	font-size: 38rpx;
  	font-weight: bold;
  	color: #1f2937;
  	line-height: 1.1;
  	text-align: center;
  	width: 100%;
  	padding: 0 30rpx;
  	box-sizing: border-box;
  	display: flex;
  	align-items: baseline;
  	justify-content: center;
  	
  	.currency {
  		font-size: 24rpx;
  		margin-right: 4rpx;
  	}
  	
  	.value {
  		font-size: 38rpx;
  	}
  	
  	.unit {
  		font-size: 24rpx;
  		color: #666;
  		margin-left: 4rpx;
  	}
  }
  
  .billing-footer {
  	display: flex;
  	justify-content: space-around;
  	width: 100%;
  	padding-top: 30rpx;
  	border-top: 1px solid rgba(0, 0, 0, 0.05);
  	margin-top: auto;
  }
  
  .count-item {
  	display: flex;
  	align-items: center;
  	gap: 8rpx;
  }
  
  .count-icon {
  	width: 36rpx;
  	height: 36rpx;
  	border-radius: 8rpx;
  	display: flex;
  	align-items: center;
  	justify-content: center;
  	flex-shrink: 0;
  	
  	&.green { background: #4caf50; }
  	&.red { background: #f44336; }
  	&.light-blue { background: #42a5f5; }
  	&.purple { background: #9c27b0; }
  	&.orange { background: #ff9800; }
  	&.pink { background: #e91e63; }
  }
  
  .count-text {
  	font-size: 26rpx;
  	color: #666666;
  	line-height: 1.5;
  	display: flex;
  	align-items: baseline;
  	
  	.count-value {
  		font-size: 26rpx;
  		font-weight: 500;
  	}
  	
  	.count-unit {
  		font-size: 24rpx;
  		margin-left: 4rpx;
  	}
  }
  
  .kpi-grid-bottom {
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2324
  	display: grid;
8b654f92   李宇   最新
2325
  	grid-template-columns: repeat(3, 1fr);
d2158212   李宇   最新
2326
  	gap: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2327
2328
2329
  }
  
  .kpi-card {
8b654f92   李宇   最新
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
  	background: rgba(255, 255, 255, 0.8);
  	backdrop-filter: blur(20px) saturate(180%);
  	-webkit-backdrop-filter: blur(20px) saturate(180%);
  	border-radius: 24rpx;
  	padding:24rpx;
  	// height: 200rpx;
  	display: flex;
  	flex-direction: column;
  	justify-content: center;
  	box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2340
2341
2342
  	
  	.kpi-header {
  		display: flex;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2343
  		align-items: center;
8b654f92   李宇   最新
2344
  		margin-bottom: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2345
  		
8b654f92   李宇   最新
2346
2347
2348
  		.kpi-icon-square {
  			width: 50rpx;
  			height: 50rpx;
d2158212   李宇   最新
2349
  			border-radius: 10rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2350
2351
2352
  			display: flex;
  			align-items: center;
  			justify-content: center;
8b654f92   李宇   最新
2353
2354
  			margin-right: 12rpx;
  			flex-shrink: 0;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2355
  			
8b654f92   李宇   最新
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
  			&.green { background: #4caf50; }
  			&.red { background: #f44336; }
  			&.light-blue { background: #42a5f5; }
  			&.purple { background: #9c27b0; }
  			&.orange { background: #ff9800; }
  			&.pink { background: #e91e63; }
  		}
  		
  		.kpi-label {
  			font-size: 24rpx;
  			color: #666;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2367
2368
2369
  		}
  	}
  	
8b654f92   李宇   最新
2370
2371
2372
  	.kpi-value-group {
  		display: flex;
  		align-items: baseline;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2373
  		
8b654f92   李宇   最新
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
  		.currency { 
  			font-size: 24rpx; 
  			color: #333; 
  			margin-right: 4rpx; 
  		}
  		.value { 
  			font-size: 36rpx; 
  			font-weight: bold; 
  			color: #333; 
  			letter-spacing: -1rpx; 
  			flex: 1;
  			text-align: center;
  		}
  		.unit { 
  			font-size: 24rpx; 
  			color: #666; 
  			margin-left: 4rpx; 
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2391
2392
2393
2394
2395
2396
2397
2398
  		}
  	}
  }
  
  /* 会员数据 */
  .member-grid {
  	display: grid;
  	grid-template-columns: repeat(2, 1fr);
d2158212   李宇   最新
2399
  	gap: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2400
2401
2402
2403
  }
  
  .member-stat-card {
  	background: #fff;
d2158212   李宇   最新
2404
2405
  	padding: 18rpx;
  	border-radius: 14rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2406
2407
2408
2409
2410
  	display: flex;
  	align-items: flex-start;
  	box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.03);
  	
  	.icon-circle {
d2158212   李宇   最新
2411
2412
  		width: 56rpx;
  		height: 56rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2413
2414
2415
2416
  		border-radius: 50%;
  		display: flex;
  		align-items: center;
  		justify-content: center;
d2158212   李宇   最新
2417
  		margin-right: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
  		flex-shrink: 0;
  	}
  	
  	&.blue-theme .icon-circle { background: rgba(64, 158, 255, 0.1); }
  	&.green-theme .icon-circle { background: rgba(103, 194, 58, 0.1); }
  	&.orange-theme .icon-circle { background: rgba(230, 162, 60, 0.1); }
  	&.red-theme .icon-circle { background: rgba(245, 108, 108, 0.1); }
  	
  	.stat-info {
  		flex: 1;
d2158212   李宇   最新
2428
2429
2430
2431
  		.stat-label { font-size: 22rpx; color: #666; margin-bottom: 6rpx; }
  		.stat-value { font-size: 28rpx; font-weight: bold; color: #333; margin-bottom: 6rpx; }
  		.stat-value.mini { font-size: 24rpx; }
  		.stat-sub { font-size: 18rpx; color: #999; line-height: 1.4; }
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2432
2433
2434
2435
2436
2437
2438
2439
  	}
  }
  
  /* 趋势图表 */
  .trend-controls {
  	.pill-switch {
  		display: flex;
  		background: #f5f5f5;
d2158212   李宇   最新
2440
2441
  		border-radius: 26rpx;
  		padding: 3rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2442
2443
  		
  		.pill-item {
d2158212   李宇   最新
2444
2445
  			padding: 5rpx 18rpx;
  			font-size: 22rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2446
  			color: #666;
d2158212   李宇   最新
2447
  			border-radius: 24rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
  			transition: all 0.3s;
  			
  			&.active {
  				background: #fff;
  				color: #43a047;
  				box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);
  				font-weight: 500;
  			}
  		}
  	}
  }
  
  .chart-wrapper {
  	width: 100%;
d2158212   李宇   最新
2462
  	height: 400rpx;
230d71ee   李宇   最新
2463
2464
2465
2466
  	position: static;
  	/* #ifdef MP-WEIXIN */
  	z-index: 1;
  	/* #endif */
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2467
2468
  }
  
d2158212   李宇   最新
2469
2470
2471
2472
2473
2474
2475
  .trend-chart-canvas,
  .visit-frequency-chart-canvas,
  .funnel-chart-canvas {
  	width: 100%;
  	height: 100%;
  }
  
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2476
2477
2478
  .trend-legend-modern {
  	display: flex;
  	justify-content: center;
d2158212   李宇   最新
2479
  	margin-top: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2480
2481
2482
2483
  	
  	.legend-item {
  		display: flex;
  		align-items: center;
d2158212   李宇   最新
2484
2485
  		margin: 0 20rpx;
  		font-size: 22rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2486
2487
2488
  		color: #666;
  		
  		.dot {
d2158212   李宇   最新
2489
2490
  			width: 10rpx;
  			height: 10rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2491
  			border-radius: 50%;
d2158212   李宇   最新
2492
  			margin-right: 6rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
  			
  			&.revenue { background: #43a047; }
  			&.consume { background: #409EFF; }
  		}
  	}
  }
  
  /* 排行榜通用 */
  .type-tags {
  	display: flex;
  	.tag-item {
d2158212   李宇   最新
2504
2505
2506
2507
  		padding: 5rpx 16rpx;
  		font-size: 20rpx;
  		margin-left: 10rpx;
  		border-radius: 18rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2508
2509
2510
2511
2512
2513
  		background: #f0f0f0;
  		color: #666;
  		
  		&.active {
  			background: #e8f5e9;
  			color: #43a047;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2514
2515
2516
2517
2518
2519
2520
2521
  		}
  	}
  }
  
  .rank-list-modern {
  	.rank-item {
  		display: flex;
  		align-items: center;
d2158212   李宇   最新
2522
  		padding: 18rpx 0;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2523
2524
  		
  		.rank-idx {
d2158212   李宇   最新
2525
2526
  			width: 50rpx;
  			font-size: 26rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2527
2528
2529
  			font-weight: bold;
  			color: #999;
  			text-align: center;
d2158212   李宇   最新
2530
  			margin-right: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2531
  			
8b654f92   李宇   最新
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
  			&.rank-1 { 
  				color: #FFD700; 
  				font-size: 30rpx; 
  				text-shadow: 0 2rpx 4rpx rgba(255, 215, 0, 0.3);
  			}
  			
  			&.rank-2 { 
  				color: #C0C0C0; 
  				font-size: 30rpx; 
  				text-shadow: 0 2rpx 4rpx rgba(192, 192, 192, 0.3);
  			}
  			
  			&.rank-3 { 
  				color: #CD7F32; 
  				font-size: 30rpx; 
  				text-shadow: 0 2rpx 4rpx rgba(205, 127, 50, 0.3);
  			}
  			
d2158212   李宇   最新
2550
  			&.top-3 { color: #43a047; font-size: 30rpx; }
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2551
  			
d2158212   李宇   最新
2552
  			.medal-icon { width: 40rpx; height: 40rpx; }
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2553
2554
2555
  		}
  		
  		.rank-avatar {
d2158212   李宇   最新
2556
2557
  			width: 56rpx;
  			height: 56rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2558
2559
2560
2561
2562
  			background: #e8f5e9;
  			border-radius: 50%;
  			display: flex;
  			align-items: center;
  			justify-content: center;
d2158212   李宇   最新
2563
  			margin-right: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2564
2565
  			color: #43a047;
  			font-weight: bold;
d2158212   李宇   最新
2566
  			font-size: 24rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2567
2568
2569
2570
2571
2572
2573
2574
2575
  		}
  		
  		.rank-info {
  			flex: 1;
  			
  			.info-main {
  				display: flex;
  				justify-content: space-between;
  				align-items: center;
d2158212   李宇   最新
2576
  				margin-bottom: 10rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2577
  				
d2158212   李宇   最新
2578
2579
  				.name { font-size: 26rpx; font-weight: 500; color: #333; }
  				.value { font-size: 26rpx; font-weight: bold; color: #43a047; }
8b654f92   李宇   最新
2580
  				.value.orange-value { color: #ff9800; }
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2581
2582
2583
  			}
  			
  			.progress-bg {
d2158212   李宇   最新
2584
  				height: 6rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2585
  				background: #f5f5f5;
d2158212   李宇   最新
2586
  				border-radius: 3rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2587
2588
2589
2590
2591
  				overflow: hidden;
  				
  				.progress-bar {
  					height: 100%;
  					background: linear-gradient(90deg, #66bb6a 0%, #43a047 100%);
d2158212   李宇   最新
2592
  					border-radius: 3rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
  					
  					&.green { background: linear-gradient(90deg, #66bb6a 0%, #43a047 100%); }
  					&.orange { background: linear-gradient(90deg, #ffb74d 0%, #ff9800 100%); }
  				}
  			}
  		}
  	}
  }
  
  /* 热门品项 */
  .item-grid {
  	display: grid;
  	grid-template-columns: repeat(2, 1fr);
d2158212   李宇   最新
2606
  	gap: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2607
2608
2609
2610
  	
  	.item-card {
  		background: #fff;
  		border-radius: 12rpx;
d2158212   李宇   最新
2611
  		padding: 16rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2612
2613
  		position: relative;
  		overflow: hidden;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2614
2615
2616
2617
2618
  		
  		.item-rank-badge {
  			position: absolute;
  			top: 0;
  			left: 0;
d2158212   李宇   最新
2619
  			padding: 3rpx 10rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2620
2621
  			background: #f0f0f0;
  			color: #999;
d2158212   李宇   最新
2622
  			font-size: 18rpx;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2623
2624
2625
2626
2627
2628
2629
  			border-bottom-right-radius: 12rpx;
  			
  			&.rank-1 { background: #ffe0b2; color: #ef6c00; }
  			&.rank-2 { background: #e0f2f1; color: #00897b; }
  			&.rank-3 { background: #e3f2fd; color: #1e88e5; }
  		}
  		
d2158212   李宇   最新
2630
2631
  		.item-name { font-size: 24rpx; color: #333; margin-top: 20rpx; margin-bottom: 6rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
  		.item-val { font-size: 24rpx; color: #43a047; font-weight: bold; margin-bottom: 10rpx; }
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2632
2633
2634
2635
2636
  		.item-process { width: 100%; height: 4rpx; background: #f0f0f0; border-radius: 2rpx; .bar { height: 100%; background: #43a047; border-radius: 2rpx; } }
  	}
  }
  
  /* 转化漏斗 */
62f1d695   李宇   最新
2637
2638
2639
  .funnel-section {
  	.chart-wrapper {
  		width: 100%;
d2158212   李宇   最新
2640
2641
  		height: 400rpx;
  		margin-bottom: 16rpx;
230d71ee   李宇   最新
2642
2643
2644
2645
  		position: static;
  		/* #ifdef MP-WEIXIN */
  		z-index: 1;
  		/* #endif */
62f1d695   李宇   最新
2646
  	}
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2647
  	
62f1d695   李宇   最新
2648
2649
2650
  	.funnel-chart-canvas {
  		width: 100%;
  		height: 100%;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2651
2652
  	}
  	
62f1d695   李宇   最新
2653
  	.funnel-stats {
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2654
  		display: flex;
62f1d695   李宇   最新
2655
  		justify-content: space-around;
d2158212   李宇   最新
2656
  		padding: 16rpx 0;
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2657
  		
62f1d695   李宇   最新
2658
  		.stat-mini {
d2158212   李宇   最新
2659
  			font-size: 22rpx;
62f1d695   李宇   最新
2660
2661
2662
2663
2664
  			color: #666;
  			
  			.stat-value {
  				color: #43a047;
  				font-weight: 600;
d2158212   李宇   最新
2665
  				margin-left: 6rpx;
62f1d695   李宇   最新
2666
2667
  			}
  		}
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2668
2669
2670
2671
2672
2673
2674
  	}
  }
  
  @keyframes rotate {
  	from { transform: rotate(0deg); }
  	to { transform: rotate(360deg); }
  }
f218a54a   李宇   最新
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
  
  /* 会员结构洞察 */
  .member-chart-container {
  	display: flex;
  	flex-direction: column;
  	align-items: center;
  }
  
  .member-type-chart-wrapper {
  	width: 100%;
d2158212   李宇   最新
2685
2686
  	height: 480rpx;
  	margin-bottom: 16rpx;
230d71ee   李宇   最新
2687
2688
2689
2690
  	position: static;
  	/* #ifdef MP-WEIXIN */
  	z-index: 1;
  	/* #endif */
f218a54a   李宇   最新
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
  }
  
  .member-type-chart-canvas {
  	width: 100%;
  	height: 100%;
  }
  
  .member-type-legend {
  	display: flex;
  	flex-wrap: wrap;
  	justify-content: center;
d2158212   李宇   最新
2702
2703
2704
  	gap: 16rpx;
  	padding: 16rpx;
  	// background: #f5f5f5;
f218a54a   李宇   最新
2705
2706
2707
2708
2709
2710
2711
  	border-radius: 12rpx;
  	width: 100%;
  }
  
  .member-type-legend .legend-item {
  	display: flex;
  	align-items: center;
d2158212   李宇   最新
2712
2713
  	gap: 6rpx;
  	padding: 6rpx 12rpx;
f218a54a   李宇   最新
2714
2715
2716
2717
2718
  	background: #fff;
  	border-radius: 8rpx;
  }
  
  .member-type-legend .legend-dot {
d2158212   李宇   最新
2719
2720
  	width: 20rpx;
  	height: 20rpx;
f218a54a   李宇   最新
2721
2722
2723
2724
  	border-radius: 50%;
  }
  
  .member-type-legend .legend-name {
d2158212   李宇   最新
2725
  	font-size: 22rpx;
f218a54a   李宇   最新
2726
  	color: #666;
d2158212   李宇   最新
2727
  	margin-right: 6rpx;
f218a54a   李宇   最新
2728
2729
2730
  }
  
  .member-type-legend .legend-value {
d2158212   李宇   最新
2731
  	font-size: 22rpx;
f218a54a   李宇   最新
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
  	color: #333;
  	font-weight: bold;
  }
  
  /* 会员价值分层 */
  .member-category-container {
  	display: flex;
  	flex-direction: column;
  	align-items: center;
  }
  
  .member-category-chart-wrapper {
  	width: 100%;
d2158212   李宇   最新
2745
2746
  	height: 480rpx;
  	margin-bottom: 16rpx;
230d71ee   李宇   最新
2747
2748
2749
2750
  	position: static;
  	/* #ifdef MP-WEIXIN */
  	z-index: 1;
  	/* #endif */
f218a54a   李宇   最新
2751
2752
2753
2754
2755
2756
2757
2758
2759
  }
  
  .member-category-chart-canvas {
  	width: 100%;
  	height: 100%;
  }
  
  .member-category-legend {
  	display: flex;
d2158212   李宇   最新
2760
2761
2762
2763
  	flex-direction: row;
  	gap: 12rpx;
  	padding: 16rpx;
  	// background: #f5f5f5;
f218a54a   李宇   最新
2764
2765
2766
2767
2768
2769
  	border-radius: 12rpx;
  	width: 100%;
  }
  
  .member-category-legend .legend-item {
  	display: flex;
d2158212   李宇   最新
2770
  	flex-direction: column;
f218a54a   李宇   最新
2771
  	align-items: center;
d2158212   李宇   最新
2772
2773
2774
  	justify-content: center;
  	gap: 8rpx;
  	padding: 10rpx;
f218a54a   李宇   最新
2775
2776
  	background: #fff;
  	border-radius: 8rpx;
d2158212   李宇   最新
2777
  	flex: 1;
f218a54a   李宇   最新
2778
2779
2780
  }
  
  .member-category-legend .legend-color {
d2158212   李宇   最新
2781
2782
  	width: 28rpx;
  	height: 28rpx;
f218a54a   李宇   最新
2783
2784
2785
2786
2787
  	border-radius: 4rpx;
  	flex-shrink: 0;
  }
  
  .member-category-legend .legend-text {
d2158212   李宇   最新
2788
2789
2790
2791
  	display: flex;
  	flex-direction: column;
  	align-items: center;
  	text-align: center;
f218a54a   李宇   最新
2792
2793
2794
  }
  
  .member-category-legend .legend-name {
d2158212   李宇   最新
2795
  	font-size: 22rpx;
f218a54a   李宇   最新
2796
  	color: #666;
d2158212   李宇   最新
2797
  	margin-bottom: 3rpx;
f218a54a   李宇   最新
2798
2799
2800
  }
  
  .member-category-legend .legend-value {
d2158212   李宇   最新
2801
  	font-size: 24rpx;
f218a54a   李宇   最新
2802
2803
2804
2805
2806
2807
2808
2809
  	color: #333;
  	font-weight: bold;
  }
  
  /* 客户活跃度分析 */
  .visit-frequency-section {
  	.chart-wrapper {
  		width: 100%;
d2158212   李宇   最新
2810
  		height: 400rpx;
230d71ee   李宇   最新
2811
2812
2813
2814
  		position: static;
  		/* #ifdef MP-WEIXIN */
  		z-index: 1;
  		/* #endif */
f218a54a   李宇   最新
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
  	}
  	
  	.visit-frequency-chart-canvas {
  		width: 100%;
  		height: 100%;
  	}
  }
  
  /* 热销产品品项 */
  .item-process .bar.blue {
  	background: #409EFF;
  }
d2158212   李宇   最新
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
  
  /* 会员统计卡片点击提示 */
  .stat-hint {
  	font-size: 18rpx;
  	color: #999;
  	margin-top: 4rpx;
  }
  
  .member-stat-card {
  	cursor: pointer;
  	transition: all 0.3s ease;
  	
  	&:active {
  		transform: scale(0.98);
  		opacity: 0.9;
  	}
  }
  
  /* 会员详情弹窗 */
  .member-detail-modal {
  	width: 600rpx;
  	max-height: 80vh;
  	background: #fff;
  	border-radius: 20rpx;
  	overflow: hidden;
  	
  	.modal-title {
  		font-size: 32rpx;
  		font-weight: bold;
  		color: #333;
  		text-align: center;
  		padding: 30rpx 20rpx 20rpx;
  		border-bottom: 1px solid #f0f0f0;
  	}
  	
  	.modal-content {
  		padding: 20rpx;
  		max-height: 60vh;
  		overflow-y: auto;
  		
  		.detail-item {
  			display: flex;
  			justify-content: space-between;
  			align-items: center;
  			padding: 20rpx 0;
  			border-bottom: 1px solid #f5f5f5;
  			
  			&:last-child {
  				border-bottom: none;
  			}
  			
  			.detail-label {
  				font-size: 26rpx;
  				color: #666;
  				flex: 1;
  			}
  			
  			.detail-value {
  				font-size: 26rpx;
  				color: #333;
  				font-weight: 500;
  				text-align: right;
  				flex: 1;
  			}
  		}
  	}
  }
777dbe40   “wangming”   feat: 实现集团驾驶舱移动端功...
2894
  </style>