Commit a41d4105 by zhangxw

UI走查,bug修复

1 parent 8e13c799
...@@ -84,8 +84,8 @@ page { ...@@ -84,8 +84,8 @@ page {
.list-nothing { .list-nothing {
padding: var(--fontSize30) 0; padding: var(--fontSize30) 0;
text-align: center; text-align: center;
font-size: var(--fontSize28); font-size: var(--fontSize24);
color: #666666; color: #999999;
} }
.list-not { .list-not {
......
.basic-info { .basic-info {
background: #ffffff; background: #ffffff;
border-radius: 16rpx;
padding: 32rpx; padding: 32rpx;
box-sizing: border-box; box-sizing: border-box;
......
.behavior-analysis { .behavior-analysis {
background: #ffffff; background: #ffffff;
border-radius: 16rpx;
padding: 24rpx 24rpx 0; padding: 24rpx 24rpx 0;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -399,7 +399,7 @@ Component({ ...@@ -399,7 +399,7 @@ Component({
label: item.label, label: item.label,
cols: [ cols: [
{ label: '成交数', value: (staffData?.[item.dealCountKey] ?? '') === '' ? '-' : staffData?.[item.dealCountKey] }, { label: '成交数', value: (staffData?.[item.dealCountKey] ?? '') === '' ? '-' : staffData?.[item.dealCountKey] },
{ label: '单车采购产值', value: (staffData?.[item.avgOutputKey] ?? '') === '' ? '-' : staffData?.[item.avgOutputKey], colorClass: 'blue' }, { label: '单车采购产值', value: (staffData?.[item.avgOutputKey] ?? '') === '' ? '-' : staffData?.[item.avgOutputKey], colClass: 'width-col' },
{ label: '渗透率', value: (staffData?.[item.penetrationRateKey] ?? '') === '' ? '-' : staffData?.[item.penetrationRateKey], colorClass: 'blue' }, { label: '渗透率', value: (staffData?.[item.penetrationRateKey] ?? '') === '' ? '-' : staffData?.[item.penetrationRateKey], colorClass: 'blue' },
{ label: '转化率', value: (staffData?.[item.conversionRateKey] ?? '') === '' ? '-' : staffData?.[item.conversionRateKey], colorClass: 'blue' }, { label: '转化率', value: (staffData?.[item.conversionRateKey] ?? '') === '' ? '-' : staffData?.[item.conversionRateKey], colorClass: 'blue' },
], ],
......
.personal-performance { .personal-performance {
background: #ffffff; background: #ffffff;
border-radius: 16rpx;
padding: 24rpx; padding: 24rpx;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -131,10 +130,9 @@ ...@@ -131,10 +130,9 @@
.analyse-data { .analyse-data {
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
margin-top: 40rpx;
position: relative; position: relative;
height: 502rpx; height: 502rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/staff_bg.png') no-repeat; background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/anayle_staff_bg.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
background-position: 0 0; background-position: 0 0;
} }
...@@ -166,7 +164,8 @@ ...@@ -166,7 +164,8 @@
color: #222222; color: #222222;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
line-height: 42rpx; line-height: 42rpx;
font-family: 'numberBold';
} }
.chunkLabel { .chunkLabel {
...@@ -191,53 +190,53 @@ ...@@ -191,53 +190,53 @@
.arrival { .arrival {
left: 28rpx; left: 28rpx;
top: 44rpx; top: 84rpx;
} }
.after { .after {
left: 248rpx; left: 248rpx;
top: 44rpx; top: 84rpx;
} }
.total_to_store { .total_to_store {
right: 17rpx; right: 17rpx;
top: 44rpx; top: 84rpx;
} }
.sqzhuanhualv { .sqzhuanhualv {
left: 28rpx; left: 28rpx;
top: 200rpx; top: 240rpx;
} }
.shzhuanhualv { .shzhuanhualv {
left: 248rpx; left: 248rpx;
top: 200rpx; top: 240rpx;
} }
.percent { .percent {
right: 17rpx; right: 17rpx;
top: 200rpx; top: 240rpx;
} }
.sqordernum { .sqordernum {
left: 28rpx; left: 28rpx;
top: 310rpx; top: 350rpx;
} }
.shordernum { .shordernum {
left: 248rpx; left: 248rpx;
top: 310rpx; top: 350rpx;
} }
.make { .make {
right: 17rpx; right: 17rpx;
top: 310rpx; top: 350rpx;
} }
.helps { .helps {
position: absolute; position: absolute;
right: 0; right: 0;
top: -24rpx; top: 0;
border-radius: 8rpx; border-radius: 8rpx;
background: #f7f8fa; background: #f7f8fa;
padding: 4rpx 12rpx; padding: 4rpx 12rpx;
...@@ -292,6 +291,9 @@ ...@@ -292,6 +291,9 @@
flex: 1; flex: 1;
padding-left: 16rpx; padding-left: 16rpx;
border-left: 2rpx solid #f0f0f0; border-left: 2rpx solid #f0f0f0;
&.width-col {
flex: 1.4,
}
&:first-child { &:first-child {
border-left: none; border-left: none;
} }
......
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
</view> </view>
<view class="divider" wx:if="{{showSummaryAnalysis}}"></view> <view class="divider" style="margin-top: 0;" wx:if="{{showSummaryAnalysis}}"></view>
<view class="business-stats" wx:if="{{showSummaryAnalysis}}"> <view class="business-stats" wx:if="{{showSummaryAnalysis}}">
<view class="stat-row" wx:for="{{businessStatsRows}}" wx:for-item="row" wx:key="key"> <view class="stat-row" wx:for="{{businessStatsRows}}" wx:for-item="row" wx:key="key">
<view class="row-title">{{row.label}}</view> <view class="row-title">{{row.label}}</view>
<view class="row-content"> <view class="row-content">
<view class="col" wx:for="{{row.cols}}" wx:for-item="col" wx:key="label"> <view class="col {{col.colClass}}" wx:for="{{row.cols}}" wx:for-item="col" wx:key="label">
<view class="label">{{col.label}}</view> <view class="label">{{col.label}}</view>
<view class="value {{col.colorClass || ''}}">{{col.value}}</view> <view class="value {{col.colorClass || ''}}">{{col.value}}</view>
<view class="sub-label" wx:if="{{col.subLabel}}">{{col.subLabel}}</view> <view class="sub-label" wx:if="{{col.subLabel}}">{{col.subLabel}}</view>
......
.training-experience { .training-experience {
background: #ffffff; background: #ffffff;
border-radius: 16rpx;
padding: 24rpx; padding: 24rpx;
box-sizing: border-box; box-sizing: border-box;
.stats { .stats {
display: flex; display: flex;
align-items: stretch; align-items: stretch;
margin: 8rpx 0 20rpx; margin: 24rpx 0 20rpx;
} }
.stat { .stat {
flex: 1; flex: 1;
text-align: center;
position: relative; position: relative;
padding: 12rpx 0; padding-left: 16rpx;
} margin-top: 24rpx;
border-left: 2rpx solid #F0F0F0;
.stat + .stat::before {
content: '';
position: absolute;
left: 0;
top: 18rpx;
bottom: 18rpx;
width: 2rpx;
background: #f2f3f5;
} }
.label { .label {
color: #999ea8; color: #666666;
font-size: 24rpx; font-size: 26rpx;
line-height: 34rpx; line-height: 34rpx;
} }
...@@ -38,7 +28,8 @@ ...@@ -38,7 +28,8 @@
color: #222222; color: #222222;
font-size: 40rpx; font-size: 40rpx;
line-height: 56rpx; line-height: 56rpx;
font-weight: 600; font-weight: 600;
font-family: 'numberBold';
} }
.segmented { .segmented {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
margin-right: 12rpx; margin-right: 12rpx;
.sort-text { .sort-text {
font-size: 24rpx; font-size: 26rpx;
color: #666666; color: #666666;
font-weight: 500; font-weight: 500;
} }
...@@ -118,8 +118,7 @@ ...@@ -118,8 +118,7 @@
.name { .name {
color: #222222; color: #222222;
font-size: 26rpx; font-size: 28rpx;
font-weight: 600;
max-width: 220rpx; max-width: 220rpx;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -163,9 +162,8 @@ ...@@ -163,9 +162,8 @@
} }
.metric-title { .metric-title {
font-size: 22rpx; font-size: 28rpx;
color: #666666; color: #666666;
font-weight: 500;
.dot { .dot {
margin-left: 4rpx; margin-left: 4rpx;
display: inline-block; display: inline-block;
...@@ -186,8 +184,7 @@ ...@@ -186,8 +184,7 @@
.metric-value { .metric-value {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 32rpx; font-size: 36rpx;
font-weight: 700;
color: #222222; color: #222222;
font-family: 'numberBold'; font-family: 'numberBold';
} }
......
...@@ -103,6 +103,9 @@ Page({ ...@@ -103,6 +103,9 @@ Page({
onShow() { onShow() {
this.getAIAnalyse() this.getAIAnalyse()
this.getEmployeeRank() this.getEmployeeRank()
if (this.data.tabIndex == 2) { // 请求培训的统计数据
this.getTrainingStaticsData()
}
}, },
formatThousands (v) { formatThousands (v) {
...@@ -137,6 +140,9 @@ Page({ ...@@ -137,6 +140,9 @@ Page({
setTimeout(() => { setTimeout(() => {
this.getAIAnalyse() this.getAIAnalyse()
this.getEmployeeRank() this.getEmployeeRank()
if (index == 2) {
this.getTrainingStaticsData() // 培训tab 多请求一次业绩接口获取统计数据
}
}) })
}) })
}, },
...@@ -153,6 +159,7 @@ Page({ ...@@ -153,6 +159,7 @@ Page({
}, () => { }, () => {
this.getAIAnalyse() this.getAIAnalyse()
this.getEmployeeRank() this.getEmployeeRank()
this.getTrainingStaticsData()
}) })
}, },
// 排序变化 // 排序变化
...@@ -174,6 +181,7 @@ Page({ ...@@ -174,6 +181,7 @@ Page({
}) })
this.getAIAnalyse() this.getAIAnalyse()
this.getEmployeeRank() this.getEmployeeRank()
this.getTrainingStaticsData()
}, },
getAIAnalyse() { getAIAnalyse() {
let { startStr, endStr, timeDimension, tabIndex, sceneTabIndex } = this.data let { startStr, endStr, timeDimension, tabIndex, sceneTabIndex } = this.data
...@@ -211,6 +219,31 @@ Page({ ...@@ -211,6 +219,31 @@ Page({
this.setData({AILoading: false}) this.setData({AILoading: false})
}) })
}, },
getTrainingStaticsData() {
let { sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data
api.getDashboardData({
bizs: sceneTabIndex > 0 ? sceneMaps[sceneTabIndex] : undefined,
dateType: timeDimension,
startDate: startStr,
endDate: endStr,
sortField: 1,
sortDirection: 1
}).then(res => {
let { code, data, message } = res
if (code == 0) {
if (data?.metrics) {
data.metrics.staffCount = (data.metrics.staffCount ?? '') === '' ? '-' : this.formatThousands(data.metrics.staffCount)
data.metrics.storeCount = (data.metrics.storeCount ?? '') === '' ? '-' : this.formatThousands(data.metrics.storeCount)
data.metrics.totalOutput = (data.metrics.totalOutput ?? '') === '' ? '-' : this.formatThousands(data.metrics.totalOutput)
}
this.setData({
staticData: data?.metrics
})
} else {
wx.$util.showToast(message)
}
})
},
getEmployeeRank(noAI) { getEmployeeRank(noAI) {
let { tabIndex, sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data let { tabIndex, sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data
this.setData({ this.setData({
......
...@@ -179,8 +179,4 @@ page { ...@@ -179,8 +179,4 @@ page {
} }
} }
} }
}
.list-nothing {
font-size: 24rpx;
color: #999999;
} }
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<image src="{{userInfo.userAvatarUrl}}" bindtap="getAvatar" /> <image src="{{userInfo.userAvatarUrl}}" bindtap="getAvatar" />
</block> </block>
<block wx:else> <block wx:else>
<image src="{{IMG_URL}}default-avatar.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/default-avatar.png" />
</block> </block>
</view> </view>
<view class="name_box"> <view class="name_box">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!