Commit a41d4105 by zhangxw

UI走查,bug修复

1 parent 8e13c799
......@@ -84,8 +84,8 @@ page {
.list-nothing {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize28);
color: #666666;
font-size: var(--fontSize24);
color: #999999;
}
.list-not {
......
.basic-info {
background: #ffffff;
border-radius: 16rpx;
padding: 32rpx;
box-sizing: border-box;
......
.behavior-analysis {
background: #ffffff;
border-radius: 16rpx;
padding: 24rpx 24rpx 0;
box-sizing: border-box;
......
......@@ -399,7 +399,7 @@ Component({
label: item.label,
cols: [
{ 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.conversionRateKey] ?? '') === '' ? '-' : staffData?.[item.conversionRateKey], colorClass: 'blue' },
],
......
.personal-performance {
background: #ffffff;
border-radius: 16rpx;
padding: 24rpx;
box-sizing: border-box;
}
......@@ -131,10 +130,9 @@
.analyse-data {
background: #ffffff;
border-radius: 16rpx;
margin-top: 40rpx;
position: relative;
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-position: 0 0;
}
......@@ -166,7 +164,8 @@
color: #222222;
font-size: 30rpx;
font-weight: 600;
line-height: 42rpx;
line-height: 42rpx;
font-family: 'numberBold';
}
.chunkLabel {
......@@ -191,53 +190,53 @@
.arrival {
left: 28rpx;
top: 44rpx;
top: 84rpx;
}
.after {
left: 248rpx;
top: 44rpx;
top: 84rpx;
}
.total_to_store {
right: 17rpx;
top: 44rpx;
top: 84rpx;
}
.sqzhuanhualv {
left: 28rpx;
top: 200rpx;
top: 240rpx;
}
.shzhuanhualv {
left: 248rpx;
top: 200rpx;
top: 240rpx;
}
.percent {
right: 17rpx;
top: 200rpx;
top: 240rpx;
}
.sqordernum {
left: 28rpx;
top: 310rpx;
top: 350rpx;
}
.shordernum {
left: 248rpx;
top: 310rpx;
top: 350rpx;
}
.make {
right: 17rpx;
top: 310rpx;
top: 350rpx;
}
.helps {
position: absolute;
right: 0;
top: -24rpx;
top: 0;
border-radius: 8rpx;
background: #f7f8fa;
padding: 4rpx 12rpx;
......@@ -292,6 +291,9 @@
flex: 1;
padding-left: 16rpx;
border-left: 2rpx solid #f0f0f0;
&.width-col {
flex: 1.4,
}
&:first-child {
border-left: none;
}
......
......@@ -60,13 +60,13 @@
</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="stat-row" wx:for="{{businessStatsRows}}" wx:for-item="row" wx:key="key">
<view class="row-title">{{row.label}}</view>
<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="value {{col.colorClass || ''}}">{{col.value}}</view>
<view class="sub-label" wx:if="{{col.subLabel}}">{{col.subLabel}}</view>
......
.training-experience {
background: #ffffff;
border-radius: 16rpx;
padding: 24rpx;
box-sizing: border-box;
.stats {
display: flex;
align-items: stretch;
margin: 8rpx 0 20rpx;
margin: 24rpx 0 20rpx;
}
.stat {
flex: 1;
text-align: center;
position: relative;
padding: 12rpx 0;
}
.stat + .stat::before {
content: '';
position: absolute;
left: 0;
top: 18rpx;
bottom: 18rpx;
width: 2rpx;
background: #f2f3f5;
padding-left: 16rpx;
margin-top: 24rpx;
border-left: 2rpx solid #F0F0F0;
}
.label {
color: #999ea8;
font-size: 24rpx;
color: #666666;
font-size: 26rpx;
line-height: 34rpx;
}
......@@ -38,7 +28,8 @@
color: #222222;
font-size: 40rpx;
line-height: 56rpx;
font-weight: 600;
font-weight: 600;
font-family: 'numberBold';
}
.segmented {
......
......@@ -60,7 +60,7 @@
margin-right: 12rpx;
.sort-text {
font-size: 24rpx;
font-size: 26rpx;
color: #666666;
font-weight: 500;
}
......@@ -118,8 +118,7 @@
.name {
color: #222222;
font-size: 26rpx;
font-weight: 600;
font-size: 28rpx;
max-width: 220rpx;
overflow: hidden;
white-space: nowrap;
......@@ -163,9 +162,8 @@
}
.metric-title {
font-size: 22rpx;
font-size: 28rpx;
color: #666666;
font-weight: 500;
.dot {
margin-left: 4rpx;
display: inline-block;
......@@ -186,8 +184,7 @@
.metric-value {
margin-top: 8rpx;
font-size: 32rpx;
font-weight: 700;
font-size: 36rpx;
color: #222222;
font-family: 'numberBold';
}
......
......@@ -103,6 +103,9 @@ Page({
onShow() {
this.getAIAnalyse()
this.getEmployeeRank()
if (this.data.tabIndex == 2) { // 请求培训的统计数据
this.getTrainingStaticsData()
}
},
formatThousands (v) {
......@@ -137,6 +140,9 @@ Page({
setTimeout(() => {
this.getAIAnalyse()
this.getEmployeeRank()
if (index == 2) {
this.getTrainingStaticsData() // 培训tab 多请求一次业绩接口获取统计数据
}
})
})
},
......@@ -153,6 +159,7 @@ Page({
}, () => {
this.getAIAnalyse()
this.getEmployeeRank()
this.getTrainingStaticsData()
})
},
// 排序变化
......@@ -174,6 +181,7 @@ Page({
})
this.getAIAnalyse()
this.getEmployeeRank()
this.getTrainingStaticsData()
},
getAIAnalyse() {
let { startStr, endStr, timeDimension, tabIndex, sceneTabIndex } = this.data
......@@ -211,6 +219,31 @@ Page({
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) {
let { tabIndex, sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data
this.setData({
......
......@@ -179,8 +179,4 @@ page {
}
}
}
}
.list-nothing {
font-size: 24rpx;
color: #999999;
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
<image src="{{userInfo.userAvatarUrl}}" bindtap="getAvatar" />
</block>
<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>
</view>
<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!