Commit 5d2654ee by zhangxw

督导小程序联调

1 parent 5b186c40
Showing 45 changed files with 802 additions and 672 deletions
......@@ -28,6 +28,10 @@ module.exports = {
getEmployeePerformanceData(data) {
return api.post('dj.api.supervisor.dashboard.employee.performance', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取员工个人产值趋势及达成率
getEmployeeOutPutTrendApi(data) {
return api.post('dj.api.supervisor.business.analysis.output.trend.scene', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取员工个人行为数据
getEmployeebehaviorData(data) {
return api.post('dj.api.supervisor.dashboard.employee.behavior', data, [], '/rop-dj-supervisor-mini/router')
......@@ -36,12 +40,8 @@ module.exports = {
getTrainingExperienceList(data) {
return api.post('dj.api.supervisor.mini.team.training.list', data, [], '/rop-dj-supervisor-mini/router')
},
// 查询门店日期范围内接待记录统计数据
getReceptionRecordList(data) {
return api.post("dj.api.smartcarlife.recepiton.receptionStaticList", data)
},
// 分页查询接待录音列表
getRecordDetailList(data) {
getRecordingList(data) {
return api.post("dj.api.supervisor.dashboard.recording.list", data, [], '/rop-dj-supervisor-mini/router')
},
// 获取短链地址
......@@ -61,6 +61,6 @@ module.exports = {
},
// 人员带教
submitMentorData(data) {
return api.post('dj.api.supervisor.mini.team.coaching.submit', data)
return api.post('dj.api.supervisor.mini.team.coaching.submit', data, [], '/rop-dj-supervisor-mini/router')
}
}
......@@ -107,7 +107,7 @@ Component({
const {timeTypeEnum} = this.data
let eventCode = ['supervisor_dayTime_tab', 'supervisor_weekTime_tab', 'supervisor_monthTime_tab']
if (this.data.setTrackData) {
// wx.$track.setTrackData(0, eventCode[index], {}, '')
wx.$track.setTrackData(0, eventCode[index], {}, '')
}
this.setData({
dateCurrent: index,
......@@ -139,9 +139,12 @@ Component({
return obj
},
initLoad() {
this.initDate('date')
this.setData({
dateCurrent: 0
dateCurrent: 0,
leftCurrent: false,
rightCurrent: true
}, () => {
this.initDate('date')
})
},
initDate(type = 'date') {
......
......@@ -2,6 +2,7 @@
.date-screen {
display: flex;
align-items: center;
justify-content: center;
.tab-section {
box-sizing: border-box;
width: 278rpx;
......@@ -33,6 +34,7 @@
box-sizing: border-box;
height: 56rpx;
flex: 1;
max-width: calc(100% - 278rpx);
display: flex;
align-items: center;
justify-content: space-around;
......
......@@ -88,7 +88,7 @@ export const ALIYUN = ALIYUN_LIST[1];
export const quotedImgUrl = createQuotedUrl[target[envIndex]];
export const scoket_url = scoketURL[target[envIndex]];
// sentry Dsn 地址
export const dsnUrl = "https://6b10bd312d154ff3a4664772bb4e50f5@sentry.glsx.com.cn/49";
export const dsnUrl = "https://89bfb54e30fd4fafaee5ba09063fb369@sentry.glsx.com.cn/50";
// 图片基地址
export const ImgUrl = "https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram";
......
......@@ -3,6 +3,7 @@ const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor
import api from '~/api/crew/index'
import indexApi from '~/api/index/index'
import studyApi from '~/api/learningCenter/index'
import { uploadImg } from '~/api/api'
Page({
/**
......@@ -10,23 +11,18 @@ Page({
*/
data: {
IMG_URL,
detailInfo: {
staffName: '赵惠惠',
sex: 1,
staffPhone: '18902640418',
entryDate: '2025-12-12',
scene: '延保,轻改,权益'
},
navBarHeight: 84,
detailInfo: {},
detailItems: [{
label: '手机号码',
key: 'staffPhone'
key: 'storeManagerPhone'
}, {
label: '入职时间',
key: 'entryDate',
width: '290rpx'
}, {
label: '归属业务',
key: 'scene',
key: 'business',
inline: true
}],
orderObj: {
......@@ -51,6 +47,14 @@ Page({
// 任务列表进入
if (options.id) {
this.getDetail(options.id)
} else {
console.log(options)
this.setData({
'orderObj.storeManagerName': options.storeManagerName,
'orderObj.storeManagerPhone': options.storeManagerPhone,
'orderObj.entryDate': options.entryDate,
'orderObj.business': options.business
})
}
// 获取门店列表
this.getMerchantList()
......@@ -105,6 +109,13 @@ Page({
}
})
},
filterBusiness(data) {
let names = ['', '延保', '权益', '轻改']
if (!data) return '-'
let bizArray = data?.split(',')?.map(item => item.trim()).filter(item => item !== '')
let result = bizArray.map(index => names[parseInt(index)]).filter(name => name !== '').join(',')
return result
},
// 获取带教任务详情
getDetail(id) {
indexApi.getTaskDetail({id}).then(res => {
......@@ -112,8 +123,11 @@ Page({
if (code == 0) {
data.courseList = data.taskCourseList || [],
data.imageList = data.taskImageList || []
data.business = this.filterBusiness(data.business)
let taskContextLength = data?.taskContext.length
this.setData({
merchantList: data || []
orderObj: data || [],
taskContextLength
})
} else {
wx.$util.showToast(message)
......@@ -133,7 +147,7 @@ Page({
selectMultiple: type != 'merchant',
labelKey: type == 'merchant' ? 'merchantName' : 'title',
valueKey: type == 'merchant'? 'merchantId' : 'courseId',
selectValue: type == 'merchant' ? [orderObj.merchantId] : orderObj.course
selectValue: type == 'merchant' ? [orderObj.merchantId] : orderObj.courseList
})
},
......@@ -161,8 +175,8 @@ Page({
taskContextInput(e) {
let val = e.detail.value || ""
if (val.length > 500) {
val = val.substring(0, 500)
if (val.length > 1000) {
val = val.substring(0, 1000)
}
this.setData({
'orderObj.taskContext': val,
......@@ -172,12 +186,12 @@ Page({
handleImageUpload() {
let _this = this
let { orderObj } = this.data
let { orderObj } = _this.data
wx.chooseImage({
count: 9 - orderObj.imageList?.length,
mediaType: ['image'],
success(res) {
console.log(res)
count: 1,
sourceType: ['camera'],
success(res) {
let [tempFiles] = res.tempFilePaths
for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) {
return wx.showToast({
......@@ -186,43 +200,31 @@ Page({
})
}
}
wx.$util.showLoading()
const uploadImages = async (tempFiles) => {
try {
for (const item of tempFiles) {
const val = item.path
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await uploadImg({
file: `${type}@${_res.data}`
})
const { code, data, message } = img
if (code == 0) {
orderObj.imageList.push({ imageUrl: data })
_this.setData({
orderObj
})
} else {
wx.$util.showToast(message)
}
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
wx.$util.hideLoading()
}
}
uploadImages(res?.tempFiles)
}
})
let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType
wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式
success(_res) {
wx.$util.showLoading('上传中...')
uploadImg({
file: `${type}@${_res.data}`
}).then(img => {
wx.$util.hideLoading()
let { code, data, message } = img
if (code == 0) {
orderObj.imageList.push({imageUrl: data})
_this.setData({
orderObj
})
} else {
wx.$util.showToast(message)
}
})
}
})
}
})
},
previewImage(e) {
......@@ -243,17 +245,29 @@ Page({
},
submit() {
let { orderObj } = this.data
if (!orderObj.merchantId || !orderObj.courseList.length || !orderObj.taskContext || !orderObj.imageList.length) return wx.$util.showToast('请完成所有必填项')
let params = {
merchantId: orderObj.merchantId,
merchantName: orderObj.merchantName,
storeManagerPhone: orderObj.phone,
storeManagerName: orderObj.storeManagerName,
storeManagerPhone: orderObj.storeManagerPhone,
taskContext: orderObj.taskContext,
courseList: orderObj.courseList?.map(val => {return {id: val.id}}),
courseList: orderObj.courseList?.map(val => {return {bcCourseId: val.courseId}}),
imageList: orderObj.imageList
}
wx.$util.showLoading()
api.submitMentorData(params).then(res => {
wx.$util.hideLoading()
let { code, message } = res
if (code == 0) {
console.log('222')
this.back()
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
},
......
......@@ -29,7 +29,12 @@ page{
display: flex;
align-items: center;
font-size: 36rpx;
width: 100%;
color: #333333;
.staff-name {
max-width: calc(100% - 40rpx);
word-break: break-all;
}
.sex-icon {
width: 32rpx;
height: 32rpx;
......
......@@ -14,14 +14,14 @@
<view class="box">
<view class="name">
<view class="staff">
{{detailInfo.staffName}}
<image class="sex-icon" src="{{IMG_URL}}{{detailInfo.sex == 1 ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" />
<view class="text-hide staff-name">{{orderObj.storeManagerName}}</view>
<image class="sex-icon" src="{{IMG_URL}}{{orderObj.gender == '女' ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" />
</view>
</view>
<view class="items">
<view class="item {{item.inline ? 'inline' : ''}}" style="{{item.width ? ('width:' + item.width + ';') : ''}}" wx:for="{{detailItems}}" wx:key="index">
<view class="label">{{item.label}}:</view>
<view class="value">{{detailInfo[item.key] || '-'}}</view>
<view class="value">{{orderObj[item.key] || '-'}}</view>
</view>
</view>
</view>
......@@ -59,7 +59,7 @@
<block wx:if="{{orderObj.imageList.length > 0}}">
<view class="payVoucher_image" wx:for="{{orderObj.imageList}}" wx:key="index">
<image bindtap="previewImage" data-index="{{index}}" data-url="{{orderObj.imageList}}" src="{{item.imageUrl}}"/>
<image class="del_icon" wx:if="{{orderObj.taskStatus != 2}}" src="/packageCrowdFunding/images/del_icon.png" mode="" bindtap="delCustomPayVoucher" data-index="{{index}}"/>
<image class="del_icon" wx:if="{{orderObj.taskStatus != 2}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/zy_paf_del_icon.png" mode="" bindtap="delPhoto" data-index="{{index}}"/>
</view>
</block>
<block wx:if="{{orderObj.imageList.length < 9 && orderObj.taskStatus != 2}}">
......
......@@ -17,7 +17,7 @@ Component({
key: 'ethnicity'
}, {
label: '政治面貌',
key: ''
key: 'politicalStatus'
}, {
label: '籍贯',
key: 'origin'
......
......@@ -6,13 +6,14 @@ Component({
type: Object,
value: {},
observer: function(n) {
this.getData()
}
},
},
selectedMerchantObj: {
type: Object
}
},
data: {
IMG_URL,
merchantName: '深圳南山问界4S店深圳南山问界4S店深圳南山问界4S店',
attendanceItems: [
{ label: '打卡天数', key: 'checkInDays' },
{ label: '迟到', key: 'late', valueClass: 'danger' },
......@@ -55,6 +56,14 @@ Component({
{ label: '录音缺失率', key: 'recordingMissingRate' }
]
],
tagRows: [{
label: '弱项',
class: 'danger',
key: 'badList'
}, {
label: '其他项',
key: 'ohterList'
}],
dressWarningItems: [{ label: '预警次数', key: 'warningCount' }],
behaviorInfo: {}
},
......@@ -67,52 +76,59 @@ Component({
this.getData()
})
},
getData() {
let { detailInfo } = this.data
// 假数据
let data = {
attendance: {
checkInDays: 20,
late: 1,
earlyLeave: 5,
absenteeism: 5
},
dailyReport: {
submitted: 5,
notSubmitted: 8,
onDuty: 6,
rest: 8,
completionRate: 95
},
customerReception: {
actualDelivery: 10,
receptionCount: 2,
notTouched: 8
},
recordingAnalysis: {
behaviorTags: [],
quantitativeIndicators: {
recordingCount: 20,
dealCount: 5,
defeatCount: 3,
dealRate: 15,
qualityScore: 8,
attackDefenseScore: 11,
recordingMissingRate: 20
}
},
dressCodeWarning: {
warningCount: 8
safeObjectToLabelList(obj) {
if (!obj || typeof obj !== 'object') {
return []
}
let cleanObj = {};
try {
const jsonStr = JSON.stringify(obj)
cleanObj = JSON.parse(jsonStr)
} catch (e) {
return []
}
const result = []
try {
const keys = Object.keys(cleanObj)
for (let i = 0; i < keys.length; i++) {
const key = keys[i]
const value = cleanObj[key]
const displayValue = (typeof value === 'object' && value !== null)
? JSON.stringify(value)
: String(value)
result.push(`${key} : ${displayValue}`)
}
} catch (e) {
return []
}
this.setData({
behaviorInfo: data
})
return result
},
getData() {
let { detailInfo, startStr, endStr, selectedMerchantObj } = this.data
let params = {
employeeId: detailInfo.employeeId,
scene: detailInfo.scene
phone: detailInfo.employeePhone,
employeeId: selectedMerchantObj?.employeeId,
bizs: detailInfo.scene,
startDate: startStr,
endDate: endStr,
merchantId: detailInfo.merchantId
}
api.getEmployeebehaviorData(params)
wx.$util.showLoading()
api.getEmployeebehaviorData(params).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res
if (code == 0) {
data.recordingAnalysis.badList = this.safeObjectToLabelList(data.recordingAnalysis.badList)
data.recordingAnalysis.ohterList = this.safeObjectToLabelList(data.recordingAnalysis.ohterList)
this.setData({
behaviorInfo: data
})
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
},
handleChangeMerchant() {
this.triggerEvent('changeMerchant')
......
......@@ -4,7 +4,7 @@
</view>
<view class="merchant-change" bind:tap="handleChangeMerchant">
<image src="{{IMG_URL}}analyse-merchant-icon.png" mode=""/>
<view class="name">{{merchantName}}</view>
<view class="name">{{selectedMerchantObj.merchantName}}</view>
<image src="{{IMG_URL}}arrow-down.png" mode=""/>
</view>
......@@ -68,17 +68,14 @@
</view>
</view>
<view class="tags-row">
<view class="tags-label">弱项:</view>
<view class="tags">
<view class="tag danger" wx:for="{{weakTags}}" wx:key="label">{{item.label}}</view>
</view>
</view>
<view class="tags-row">
<view class="tags-label">其他项:</view>
<view class="tags">
<view class="tag {{item.type}}" wx:for="{{otherTags}}" wx:key="label">{{item.label}}</view>
</view>
<view class="tags-row" wx:for="{{tagRows}}" wx:key="index">
<block wx:if="{{behaviorInfo.recordingAnalysis[item.key].length}}">
<view class="tags-label">{{item.label}}:</view>
<view class="tags">
<view class="tag {{item.class}}" wx:for="{{behaviorInfo.recordingAnalysis[item.key]}}" wx:for-index="subIndex" wx:for-item="subItem" wx:key="subIndex">{{subItem}}</view>
</view>
</block>
</view>
<view class="grid grid-{{row.length}} stats-grid" wx:for="{{recordStatsRows}}" wx:for-item="row" wx:key="index">
......
......@@ -23,10 +23,7 @@ Component({
},
observers: {
'chartData': function (data) {
setTimeout(() => {
this.initData(data)
}, 3000)
this.initData(data)
},
},
/**
......@@ -43,21 +40,20 @@ Component({
* 组件的方法列表
*/
methods: {
onInitChart(xData, yData) {
console.log(xData, yData, this.ecComponent)
onInitChart(xData, yData, yData2) {
console.log(this.ecComponent)
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
console.log(canvas, width, height, dpr)
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
console.log(chart)
this.setOption(chart, xData, yData);
});
this.setOption(chart, xData, yData, yData2);
console.log(chart, xData, yData, yData2)
return chart;
})
},
setOption(chart, xData, yData) {
setOption(chart, xData, yData, yData2) {
let maxSpan = xData.length < 10 ? 80 : 20
// let start= xData.length < 10 ? 50 : 80
var option = {
......@@ -172,31 +168,61 @@ Component({
}]
}
}
},
{
showSymbol: false,
data: yData2,
type: 'line',
lineStyle: {
type: 'dashed'
},
itemStyle: {
color: "rgba(52, 123, 255, 1)",
},
// smooth: true,
color: this.data.color,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(147, 170, 253, 1)' // 顶部颜色
}, {
offset: 1,
color: 'rgba(229, 234, 252, 0.31)' // 底部颜色
}]
}
}
}
]
}
}
chart.setOption(option)
},
//初始化数据
initData(data) {
const xData = [],
yData = []
yData = [],
yData2 = []
const [x, y, y2] = this.data.keys
data.forEach(item => {
xData.push(item[x])
yData.push(item[y])
yData2.push(item[y2])
})
this.setData({
xData,
yData
})
this.onInitChart(xData, yData)
yData,
yData2
})
this.onInitChart(xData, yData, yData2)
},
},
ready() {
// 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-line');
console.log('2222', this.ecComponent)
this.ecComponent = this.selectComponent('#mychart-dom-line');
}
})
\ No newline at end of file
......@@ -4,90 +4,91 @@
</view>
<view class="merchant-change" bind:tap="handleChangeMerchant">
<image src="{{IMG_URL}}analyse-merchant-icon.png" mode=""/>
<view class="name">{{'深圳南山问界4S店深圳南山问界4S店深圳南山问界4S店'}}</view>
<view class="name">{{selectedMerchantObj.merchantName}}</view>
<image src="{{IMG_URL}}arrow-down.png" mode=""/>
</view>
<view class="merchant-data">
<view class="title">
<image src="{{IMG_URL}}analyse-merchant.png" mode=""/>
<view>门店数据</view>
</view>
<view class="content-box">
<view class="merchant-static-item" style="width: {{item.width}}rpx;" wx:for="{{statMerchants}}" wx:key="index">
<view>
<view class="label">{{item.text}}</view>
<view class="value">{{item.value}}</view>
<block wx:if="{{selectedMerchantObj.merchantId}}">
<view class="merchant-data">
<view class="title">
<image src="{{IMG_URL}}analyse-merchant.png" mode=""/>
<view>门店数据</view>
</view>
<view class="content-box">
<view class="merchant-static-item" style="width: {{item.width}}rpx;" wx:for="{{statMerchants}}" wx:key="index">
<view>
<view class="label">{{item.text}}</view>
<view class="value">{{item.value}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="divider"></view>
<view class="data-base">
<view class="top-title">
<image src="{{IMG_URL}}analyse-satff.png" mode=""/>
<view>人员数据</view>
</view>
<view class="statistics-box">
<view class="statistics" wx:for="{{statCards}}" style="background: {{card.background}};width: {{card.width}}rpx;" wx:for-item="card" wx:key="key">
<view class="title">{{card.text}}<image bindtap="openHelp" data-target="{{card}}" src="{{IMG_URL}}icon-white-info.png" mode=""/></view>
<view class="value">{{card.value}}</view>
<view class="ratio" wx:if="{{card.showMom}}">
<text class="ratio-label" wx:if="{{queryType != 'self'}}">环比</text>
<text class="ratio-value">{{card.momValue}}</text>
<image wx:if="{{queryType != 'self' && card.momArrow}}" class="ratio-arrow" src="{{}}" mode=""/>
<view class="divider"></view>
<view class="data-base">
<view class="top-title">
<image src="{{IMG_URL}}analyse-satff.png" mode=""/>
<view>人员数据</view>
</view>
<view class="statistics-box">
<view class="statistics" wx:for="{{statCards}}" style="background: {{card.background}};width: {{card.width}}rpx;" wx:for-item="card" wx:key="key">
<view class="title">{{card.text}}<image bindtap="openHelp" data-target="{{card}}" src="{{IMG_URL}}icon-white-info.png" mode=""/></view>
<view class="value">{{card.value}}</view>
<view class="ratio" wx:if="{{card.showMom}}">
<text class="ratio-label" wx:if="{{queryType != 'self'}}">环比</text>
<text class="ratio-value">{{card.momValue}}</text>
<image wx:if="{{card.momArrow}}" class="ratio-arrow" src="{{}}" mode=""/>
</view>
</view>
</view>
</view>
</view>
<view class="divider"></view>
<view class="divider"></view>
<view class="analyse-data">
<view class="helps" bindtap="openHelp">帮助<image src="{{IMG_URL}}help-tips.png" mode=""/></view>
<view class="chunk {{chunk.posClass}}" wx:for="{{analyseChunks}}" wx:for-item="chunk" wx:key="id">
<view class="name">
<text>{{chunk.name}}</text>
<text class="rate" wx:if="{{chunk.rateValue}}">{{chunk.rateValue}}</text>
</view>
<view class="value" wx:if="{{chunk.value}}">{{chunk.value}}</view>
<view class="chunkLabel" wx:if="{{chunk.showMom}}">
<text class="mom-label">环比</text>
<text class="mom-value" style="color: {{chunk.momColor}}">{{chunk.momValue}}</text>
<image class="mom-arrow" wx:if="{{chunk.momArrow}}" src="{{chunk.momArrow}}" mode=""/>
</view>
</view>
</view>
<view class="divider" wx:if="{{showSummaryAnalysis}}"></view>
<view class="analyse-data">
<view class="helps" bindtap="openHelp">帮助<image src="{{IMG_URL}}help-tips.png" mode=""/></view>
<view class="chunk {{chunk.posClass}}" wx:for="{{analyseChunks}}" wx:for-item="chunk" wx:key="id">
<view class="name">
<text>{{chunk.name}}</text>
<text class="rate" wx:if="{{chunk.rateValue}}">{{chunk.rateValue}}</text>
</view>
<view class="value" wx:if="{{chunk.value}}">{{chunk.value}}</view>
<view class="chunkLabel" wx:if="{{chunk.showMom}}">
<text class="mom-label">环比</text>
<text class="mom-value" style="color: {{chunk.momColor}}">{{chunk.momValue}}</text>
<image class="mom-arrow" wx:if="{{chunk.momArrow}}" src="{{chunk.momArrow}}" mode=""/>
</view>
</view>
</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="label">{{col.label}}</view>
<view class="value {{col.colorClass || ''}}">{{col.value}}</view>
<view class="sub-label" wx:if="{{col.subLabel}}">{{col.subLabel}}</view>
</view>
</view>
</view>
</view>
<view class="divider" wx:if="{{showSummaryAnalysis}}"></view>
<view class="divider"></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="label">{{col.label}}</view>
<view class="value {{col.colorClass || ''}}">{{col.value}}</view>
<view class="sub-label" wx:if="{{col.subLabel}}">{{col.subLabel}}</view>
</view>
</view>
</view>
</view>
<view class="product-value">
<view class="header">
<image src="{{IMG_URL}}analyse-chart.png" mode=""/>
<view class="title">个人产值趋势</view>
</view>
<analyse-line
id="line"
opts="{{opts}}"
chartData="{{lineData}}"
/>
</view>
<view class="divider"></view>
<view class="product-value">
<view class="header">
<image src="{{IMG_URL}}analyse-chart.png" mode=""/>
<view class="title">个人产值趋势</view>
</view>
<analyse-line
id="line"
opts="{{opts}}"
chartData="{{trendList}}"
/>
</view>
</block>
<van-dialog
use-slot
title="{{tipsTitle || '帮助'}}"
......
......@@ -11,9 +11,9 @@ Component({
data: {
IMG_URL,
topStats: [
{ label: '学习时长', value: 20 },
{ label: '完成课程数', value: 22 },
{ label: '带教次数', value: 2 }
{ label: '学习时长', key: 'studyHours' },
{ label: '完成课程数', key: 'completedCourses' },
{ label: '带教次数', key: 'coachingTimes' }
],
tabs: [
{ key: 'course', label: '课程学习' },
......@@ -24,39 +24,74 @@ Component({
},
methods: {
search(e) {
let { activeTab, detailInfo } = this.data
let params = {
storeManagerPhone: detailInfo.storeManagerPhone,
this.setData({
startDate: e.detail.startDay?.replace(/\//g, '-'),
endDate: e.detail.endDay?.replace(/\//g, '-'),
}, () => {
this.getData()
this.getStaticsData()
})
},
getStaticsData() {
let { detailInfo, startDate, endDate } = this.data
let params = {
businessType: detailInfo.scene || undefined,
startDate,
endDate,
sortField: 1,
sortOrder: 0,
storeManagerPhone: detailInfo?.employeePhone
}
api.getTrainingStaffList(params).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
topInfo: data[0] || {}
})
} else {
wx.$util.showToast(message)
}
})
},
getData() {
let { activeTab, detailInfo, startDate, endDate } = this.data
let params = {
businessType: detailInfo?.scene,
storeManagerPhone: detailInfo.employeePhone,
startDate,
endDate,
trainingType: activeTab + 1
}
// 假数据
let data = [{
taskId: 1,
name: '客情维护客户画像的重要性',
completedTime: 1773739327171
}, {
taskId: 2,
name: '督导带教',
completedTime: 1773739321171
}]
data?.forEach(val => {
val.completedTime = dayjs(val.completedTime).format('YYYY-MM-DD HH:mm:ss')
wx.$util.showLoading()
api.getTrainingExperienceList(params).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res
if (code == 0) {
data?.forEach(val => {
val.completedTime = dayjs(val.completedTime).format('YYYY-MM-DD HH:mm:ss')
})
this.setData({
list: data
})
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
this.setData({list: data})
// api.getTrainingExperienceList(params).then(res => {
// })
},
onTabTap(e) {
const { index } = e.currentTarget.dataset || {}
if (index == this.data.activeTab) return
this.setData({ activeTab: index })
this.setData({ activeTab: index, list: [] }, () => {
this.getData()
})
},
onViewItem(e) {
const { type, item } = e.currentTarget.dataset || {}
this.triggerEvent('view', { type, item })
const { item } = e.currentTarget.dataset || {}
wx.navigateTo({
url: `/packageCrew/pages/mentoring/mentoring?id=${item.taskId}`,
})
}
},
})
......@@ -6,7 +6,7 @@
<view class="stats">
<view class="stat" wx:for="{{topStats}}" wx:key="label">
<view class="label">{{item.label}}</view>
<view class="value">{{item.value}}</view>
<view class="value">{{topInfo[item.key]}}</view>
</view>
</view>
......@@ -28,8 +28,8 @@
<view class="list-item" wx:for="{{list}}" wx:key="id">
<image class="icon" src="{{IMG_URL}}learning-icon.png" mode=""/>
<view class="content">
<view class="title">{{item.name}}</view>
<view class="sub">课程完成时间:{{item.completedTime}}</view>
<view class="title">{{item.name || '-'}}</view>
<view class="sub">课程完成时间:{{item.completedTime || '-'}}</view>
</view>
</view>
</block>
......@@ -44,8 +44,8 @@
<view style="display: flex;gap: 12rpx;">
<image class="icon" src="{{IMG_URL}}coaching-icon.png" mode=""/>
<view class="content">
<view class="title">{{item.name}}</view>
<view class="sub">带教时间:{{item.completedTime}}</view>
<view class="title">{{item.name || '督导带教'}}</view>
<view class="sub">带教时间:{{item.completedTime ||'-'}}</view>
</view>
</view>
<view class="btn-box">
......
......@@ -8,7 +8,8 @@ Page({
*/
data: {
IMG_URL,
AIContent: '团队培训数据显示表面学习投入尚可,但知识体系构建严重不均,部分老顾问仅完成基础课程,在新产品与金融方案上存在明显知识断层,且带教记录空白,表明技能固化缺乏更新。与此同时,新人虽接受带教较多,但与其高战败率关联看,带教内容可能未精准击中其销售流程中的薄弱环节(如需求挖掘)。当前培训陷入“学用脱节”与“辅导泛化”的困境。建议立即进行针对性调整:第一,实施“短板课程强推计划”,根据上月战败主因(如竞品对比失利),强制相关顾问在3日内完成对应专题课程学习并通关测试;第二,改革带教模式,推行“数据驱动的精准带教”,督导需提前查阅带教对象的近期战败录音或低分项,带着具体问题(如“如何应对XX竞品的空间质疑”)进行陪访或演练,确保每次带教解决一个实际问题。通过“缺什么补什么”和“练什么考什么”,快速将培训转化为实战能力。团队培训数据显示表面学习投入尚可,但知识体系构建严重不均,部分老顾问仅完成基础课程,在新产品与金融方案上存在明显知识断层,且带教记录空白,表明技能固化缺乏更新。将“现状分析”与“建议”两部分自然融合为一段连贯文字,避免使用标题。整段文字需严格控制在500字以内,语言简洁、务实、指向明确。',
navBarHeight: 84,
AIContent: '',
detailInfo: {},
detailItems: [{
label: '手机号码',
......@@ -31,7 +32,8 @@ Page({
}, {
text: '培训经历'
}],
tabIndex: 0
tabIndex: 0,
merchantList: []
},
navbarReady(e) {
......@@ -42,7 +44,7 @@ Page({
},
tabClick(e) {
const eventCode = ['supervisor_baseMessage_tab', 'supervisor_personalPerformance_tab', 'supervisor_behaviorAnalysis_tab', 'supervisor_trainingExperience_tab']
// wx.$track.setTrackData(0, eventCode[e.detail], {}, '')
wx.$track.setTrackData(0, eventCode[e.detail], {}, '')
this.setData({
tabIndex: e.detail
})
......@@ -52,11 +54,19 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
detailInfo: options
})
// 获取个人基础数据信息
this.getBaseData(options)
if (options.query) {
let query = JSON.parse(options.query)
console.log(query, '=========')
this.setData({
detailInfo: query
})
// 获取个人基础数据信息
this.getBaseData(query)
// 获取人员AI分析数据
this.getPersonAIData(query)
// 获取调店记录
this.getTranferLog()
}
},
/**
......@@ -70,31 +80,64 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
// wx.$track.setTrackData(0, `supervisor_personal_dashboard_detail`, {}, '')
wx.$track.setTrackData(0, `supervisor_personal_dashboard_detail`, {}, '')
},
getTranferLog() {
let { detailInfo } = this.data
wx.$util.showLoading()
api.getStoreTransferApi({phoneNumber: detailInfo.employeePhone}).then(res => {
wx.$util.hideLoading()
let {code, data, message} = res
if (code == 0) {
this.setData({
merchantList: data || [],
selectedMerchantObj: {
merchantId: data[0]?.merchantId || '',
merchantName: data[0]?.merchantName || '',
employeeId: data[0]?.employeeId || ''
}
})
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
},
getPersonAIData(options) {
api.getAIAnslyseData({
type: 4,
timeDimension: options.timeDimension,
storeManagerPhone: options.phone,
startDate: options.startDate,
endDate: options.endDate
}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({AIContent: data?.aiGenerateResult || ''})
} else {
wx.$util.showToast(message)
}
})
},
filterBusiness(data) {
let names = ['', '延保', '权益', '轻改']
if (!data) return '-'
let bizArray = data?.split(',')?.map(item => item.trim()).filter(item => item !== '')
let result = bizArray.map(index => names[parseInt(index)]).filter(name => name !== '').join(',')
return result
},
getBaseData(options) {
// 假数据
let data = {
entryDate: '2026-01-01',
business: '延保,轻改',
gender: '女',
origin: '陕西省/延安市',
name: '周芳',
age: 33,
ethnicity: '汉',
manager: '李四',
department: '运营零售部门',
position: '延保门店销售',
phone: 13812345678,
birthday: '1993-03-26'
}
this.setData({baseInfo: data})
api.getEmployeeBaseData({
employeeId: options?.employeeId
phone: options?.employeePhone
}).then(res => {
let { code, data, message } = res
if (code == 0) {
data.business = this.filterBusiness(data.business)
this.setData({
baseInfo: data
})
......@@ -106,24 +149,27 @@ Page({
// 接待录音
handleRecording() {
// wx.$track.setTrackData(0, `supervisor_reception_recording`, {}, '')
wx.$track.setTrackData(0, `supervisor_reception_recording`, {}, '')
let { baseInfo, selectedMerchantObj, detailInfo } = this.data
wx.navigateTo({
url: '/packageCrew/pages/receptionRecording/receptionRecording',
url: `/packageCrew/pages/receptionRecording/receptionRecording?storeManagerName=${baseInfo.name}&gender=${baseInfo.gender}&storeManagerPhone=${baseInfo.phone}&entryDate=${baseInfo.entryDate}&business=${baseInfo.business}&selectedMerchantId=${selectedMerchantObj.merchantId}&scene=${detailInfo.scene}&employeeId=${selectedMerchantObj.employeeId}`,
})
},
// 发起带教
handleMentoring() {
// wx.$track.setTrackData(0, `supervisor_start_mentoring`, {}, '')
wx.$track.setTrackData(0, `supervisor_start_mentoring`, {}, '')
let { baseInfo } = this.data
wx.navigateTo({
url: '/packageCrew/pages/mentoring/mentoring',
url: `/packageCrew/pages/mentoring/mentoring?storeManagerName=${baseInfo.name}&gender=${baseInfo.gender}&storeManagerPhone=${baseInfo.phone}&entryDate=${baseInfo.entryDate}&business=${baseInfo.business}`,
})
},
// 调店记录
handleStoreTransfer() {
// wx.$track.setTrackData(0, `supervisor_store_transfer`, {}, '')
wx.$track.setTrackData(0, `supervisor_store_transfer`, {}, '')
let { baseInfo } = this.data
wx.navigateTo({
url: '/packageCrew/pages/storeTransfer/storeTransfer',
url: `/packageCrew/pages/storeTransfer/storeTransfer?phoneNumber=${baseInfo.phone}`,
})
},
......
......@@ -36,8 +36,8 @@
</view>
<view class="tab-content">
<basic-info wx:if="{{tabIndex === 0}}" baseInfo="{{baseInfo}}" />
<personal-performance wx:if="{{tabIndex === 1}}" detailInfo="{{detailInfo}}" />
<behavior-analysis wx:if="{{tabIndex === 2}}" detailInfo="{{detailInfo}}" />
<personal-performance wx:if="{{tabIndex === 1}}" detailInfo="{{detailInfo}}" merchantList="{{merchantList}}" selectedMerchantObj="{{selectedMerchantObj}}" />
<behavior-analysis wx:if="{{tabIndex === 2}}" detailInfo="{{detailInfo}}" selectedMerchantObj="{{selectedMerchantObj}}" />
<training-experience wx:if="{{tabIndex === 3}}" detailInfo="{{detailInfo}}" />
<view style="width: 100%;height: 200rpx;"></view>
</view>
......
......@@ -15,18 +15,18 @@ Component({
*/
data: {
statusMap: {
3: { text: '成交', color: '#35C376', background: '#35c37614' },
4: { text: '战败', color: '#F24724', background: '#f2472414' }
'成交': { color: '#35C376', background: '#35c37614' },
'战败': { color: '#F24724', background: '#f2472414' }
},
itemOptions: [{
label: '服务门店',
key: 'merchantName'
}, {
label: '质检评分',
key: 'qualityCheckScore'
key: 'score'
}, {
label: '攻防评分',
key: 'defenceResultFlag'
key: 'gfScroe'
}]
},
......@@ -37,7 +37,7 @@ Component({
onViewItem(e) {
let { record } = this.data
wx.navigateTo({
url: `/packageCrew/pages/recordingDetail/recordingDetail?receptionStartTime=${record.receptionStartTime}&batchId=${record.batchId}&merchantNo=${record.merchantNo}`,
url: `/packageCrew/pages/recordingDetail/recordingDetail?record=${JSON.stringify(record)}`,
})
}
},
......
......@@ -5,18 +5,18 @@
<view class="phone">{{record.phoneNumber}}</view>
</view>
<view class="right">
<view class="staff">{{record.employeeName}}</view>
<view class="status" style="color: {{statusMap[record.orderStatus].color}};background: {{statusMap[record.orderStatus].background}}">{{statusMap[record.orderStatus].text}}</view>
<view class="staff">{{record.salesName || '-'}}</view>
<view class="status" style="color: {{statusMap[record.receptionResult].color}};background: {{statusMap[record.receptionResult].background}}">{{record.receptionResult}}</view>
</view>
</view>
<view>
<text class="record-label" wx:if="{{record.carBrand}}">{{record.carBrand}}</text>
<text class="record-label" wx:if="{{record.carBrand}}">{{record.carBrand }}</text>
<text class="record-label" wx:if="{{record.carModel}}">{{record.carModel}}</text>
<text class="record-label" wx:if="{{record.tag}}">{{record.tag}}</text>
</view>
<view class="row" wx:for="{{itemOptions}}" wx:key="index">
<view class="label">{{item.label}}</view>
<view class="value">{{record[item.key]}}</view>
<view class="value">{{record[item.key] || '-'}}</view>
</view>
<view class="btn-box" wx:if="{{!hideBtn}}">
<view class="btn" data-type="coach" data-item="{{item}}" bind:tap="onViewItem">接待详情</view>
......
// packageCrew/pages/receptionRecording/receptionRecording.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
import { getReceptionRecordList, getRecordDetailList} from "~/api/crew/index"
import { getRecordingList } from "~/api/crew/index"
import dayjs from 'dayjs'
Page({
/**
......@@ -8,39 +9,30 @@ Page({
*/
data: {
IMG_URL,
detailInfo: {
staffName: '赵惠惠',
sex: 1,
staffPhone: '18902640418',
entryDate: '2025-12-12',
scene: '延保,轻改,权益'
},
detailInfo: {},
detailItems: [{
label: '手机号码',
key: 'staffPhone'
key: 'storeManagerPhone'
}, {
label: '入职时间',
key: 'entryDate',
width: '290rpx'
}, {
label: '归属业务',
key: 'scene',
key: 'business',
inline: true
}],
staticsItems: [{
label: '录音',
key: '',
value: 60
key: 'totalRecordings'
}, {
label: '成交数',
key: '',
value: 60
key: 'dealCount'
}, {
label: '战败数',
key: '',
value: 60
key: 'defeatCount'
}],
listData: [],
staticDate: {},
pageNum: 1,
nothing: false,
},
......@@ -49,7 +41,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getReceptionList()
this.setData({
detailInfo: options
})
},
/**
......@@ -65,114 +59,88 @@ Page({
onShow() {
},
getParams() {
let {
searchForm
} = this.data
let userInfo = wx.$util.getUserInfo() || {};
const now = new Date();
const threeMonthsAgo = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate() + 1)
let obj = {
startDateTime: searchForm?.startDateTime || new Date(threeMonthsAgo).format('yyyy-MM-dd'),
endDateTime: searchForm?.endDateTime || now.format('yyyy-MM-dd'),
customerName: searchForm?.customerName || '',
phoneNumber: searchForm?.customerName || '',
}
return obj
},
// 获取接待记录统计数据
getReceptionList() {
let {
listData
} = this.data
let params = this.getParams()
this.setData({
loaded: false
search(e) {
this.setData({
list: [],
pageNum: 1,
flag: false,
nothing: false,
startStr: e.detail.startDay?.replace(/\//g, '-'),
endStr: e.detail.endDay?.replace(/\//g, '-')
}, () => {
wx.showLoading({
title: '加载中'
})
getReceptionRecordList({
merchantNo: params.merchantNo,
startDateTime: params.startDateTime,
endDateTime: params.endDateTime,
staffUuids: params.staffUuids
}).then(res => {
let {
code,
message,
data
} = res
if (code == 0) {
data?.forEach(val => {
val.receptionStaticInfoDTOList = []
val.staticDateStr = `${new Date(val.staticDate).getMonth() + 1}月${new Date(val.staticDate).getDate()}日`
})
this.setData({
listData: listData.concat(data),
pageNum: 1
}, () => {
this.getReceptionRecordDetailInfo()
})
} else {
wx.$util.showToast(message)
}
}).catch(err => {
wx.hideLoading()
})
})
},
// 获取接待记录接待时间轴详情数据
getReceptionRecordDetailInfo() {
let {
pageNum,
listData,
nothing
} = this.data
let params = {
pageNum,
...this.getParams()
}
if (nothing) return
wx.showLoading({
title: '加载中'
})
this.track_businessParam = params //埋点业务参数
getRecordDetailList(params).then(res => {
let {
code,
data,
message
} = res
if (code == 0) {
listData?.forEach(val => {
data?.list?.forEach(subV => {
if (val.staticDate == subV.staticDate && val.receptionStaticInfoDTOList?.findIndex(v => v.fileUrl == subV.fileUrl) < 0) val.receptionStaticInfoDTOList.push(subV)
})
})
let listDataLength = listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0)
this.setData({
loaded: true,
listData,
pageNum: pageNum + 1,
triggered: false,
nothing: pageNum == data?.pages || listDataLength == data?.total
})
} else {
wx.$util.showToast(message)
}
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
})
this.getReceptionList()
})
},
getReceptionList() {
let { pageNum, startStr, endStr, detailInfo, nothing } = this.data
// let params = {
// employeeId: detailInfo.employeeId,
// pageNum,
// pageSize: 10,
// startDate: startStr,
// endDate: endStr,
// merchantId: detailInfo?.selectedMerchantId,
// bizs: detailInfo.scene ? detailInfo.scene : ''
// }
let params = {
employeeId: '584fdb460afa4dad835cbe8d73cfa923',
pageNum: 1,
pageSize: 10,
startDate: '2025-06-01',
endDate: '2026-06-30',
merchantId: 44211227,
bizs: 1
}
if (nothing) return
wx.$util.showLoading()
getRecordingList(params).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res
if (code == 0) {
data.dateSummaryList?.forEach(val => {
val.receptionStaticInfoDTOList = []
val.staticDateStr = `${new Date(val.date).getMonth() + 1}月${new Date(val.date).getDate()}日`
data?.recordingList?.forEach(subVal => {
subVal.totalDuration = subVal.recordingDuration
if (val.date == dayjs(subVal.receptionTime).format('YYYY-MM-DD')) {
val.receptionStaticInfoDTOList.push(subVal)
}
})
})
let list = data.dateSummaryList
let total = data.totalCount
if (total != 0) {
this.setData({
[`list[${pageNum - 1}]`]: list
})
}
this.setData({
total,
flag: true,
triggered: false,
pageNum: pageNum + 1,
nothing: total == this.data.list.flatMap(inner => inner).reduce((sum, item) => sum + (item.receptionStaticInfoDTOList?.length || 0), 0),
staticDate: data?.summary || {}
}, () => {
const query = wx.createSelectorQuery().in(this)
query.select('.content').boundingClientRect()
query.exec(res => {
this.setData({contentHeight: res[0]?.height})
})
})
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
},
// 触底加载更多
onBottomRefresh() {
this.getReceptionRecordDetailInfo()
this.getReceptionList()
},
/**
......
/* packageCrew/pages/receptionRecording/receptionRecording.wxss */
page {
background: #F2F3F7;
height: 100vh;
}
.content {
background: #FFFFFF;
......
......@@ -8,15 +8,31 @@
}
return listDataLength > 0
}
var isFirstDateInAllPages = function (allPages, pageIndex, itemDate) {
if (!itemDate) return true
if (!allPages || !allPages.length) return true
// 只检查当前页之前的所有页
for (var p = 0; p < pageIndex; p++) {
var pageArr = allPages[p]
if (!pageArr || !pageArr.length) continue
for (var i = 0; i < pageArr.length; i++) {
if (pageArr[i] && pageArr[i].date === itemDate) {
return false
}
}
}
return true
}
module.exports = {
isShowEmpty: isShowEmpty
isShowEmpty: isShowEmpty,
isFirstDateInAllPages: isFirstDateInAllPages
}
</wxs>
<view class="content">
<view class="top-box">
<view class="name">
<view class="staff">
{{detailInfo.staffName}}
{{detailInfo.storeManagerName}}
<image class="sex-icon" src="{{IMG_URL}}{{detailInfo.sex == 1 ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" />
</view>
</view>
......@@ -33,48 +49,49 @@
<view class="grid grid-3">
<view class="grid-item" wx:for="{{staticsItems}}" wx:key="label">
<view class="label">{{item.label}}</view>
<view class="value">{{item.value}}</view>
<view class="sub {{item.subClass || ''}}" wx:if="{{item.subLabel}}">{{item.subLabel}}</view>
<view class="value">{{staticDate[item.key]}}</view>
</view>
</view>
</view>
<scroll-view scroll-y class="list-box" enable-back-to-top refresher-enabled="{{true}}" bindscrolltolower="onBottomRefresh" style="height: calc(100% - var(--fontSize80));" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="box-content {{!filter.isShowEmpty(listData) ? 'empty-contant' : ''}}">
<block wx:if="{{filter.isShowEmpty(listData)}}">
<block wx:for="{{listData}}" wx:key="date" wx:if="{{item.receptionStaticInfoDTOList.length}}">
<view class="date-section">
<view class="list-date">{{item.staticDateStr}}</view>
<block wx:if="{{!hideScore}}">
<view class="static">
<view class="static-warp">
<view>
<text class="summary-item green" data-type="upgrade" bindtap="filterItemData">成交 {{item.upgrades}}</text>
<text class="line"></text>
</view>
<view>
<text class="summary-item red" data-type="defeat" bindtap="filterItemData">战败 {{item.losses}}</text>
<scroll-view scroll-y class="list-box" enable-back-to-top bindscrolltolower="onBottomRefresh" style="height: calc(100% - {{contentHeight}}px);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="box-content">
<block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:for-item="listData" wx:for-index="listIndex" wx:key="listIndex">
<block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index" wx:if="{{item.receptionStaticInfoDTOList.length}}">
<view class="date-section" wx:if="{{filter.isFirstDateInAllPages(list, listIndex, item.date)}}">
<view class="list-date">{{item.staticDateStr}}</view>
<block>
<view class="static">
<view class="static-warp">
<view>
<text class="summary-item green" data-type="upgrade" bindtap="filterItemData">成交 {{item.dealCount}}</text>
<text class="line"></text>
</view>
<view>
<text class="summary-item red" data-type="defeat" bindtap="filterItemData">战败 {{item.defeatCount}}</text>
</view>
</view>
</view>
</block>
</view>
<block wx:for="{{item.receptionStaticInfoDTOList}}" wx:key="subIndex" wx:for-index="subIndex" wx:for-item="record">
<view class="record-card" bind:tap="goto" data-record="{{record}}">
<view class="record-card-top">
<text class="round-dot" style="font-size: {{subIndex + 1 > 99 ? 'var(--fontSize16)' : 'var(--fontSize20)'}};">{{subIndex + 1}}</text>
<view class="card-line"></view>
</view>
<view class="card-item" wx:key="subIndex">
<record-item record="{{record}}"></record-item>
</view>
</view>
</block>
</view>
<block wx:for="{{item.receptionStaticInfoDTOList}}" wx:key="subIndex" wx:for-index="subIndex" wx:for-item="record">
<view class="record-card" bind:tap="goto" data-record="{{record}}">
<view class="record-card-top">
<text class="round-dot" style="font-size: {{subIndex + 1 > 99 ? 'var(--fontSize16)' : 'var(--fontSize20)'}};">{{subIndex + 1}}</text>
<view class="card-line"></view>
</view>
<view class="card-item" wx:key="subIndex">
<record-item record="{{record}}"></record-item>
</view>
</view>
</block>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
</block>
<block wx:if="{{!filter.isShowEmpty(listData) && loaded}}">
<block wx:else>
<empty-data />
</block>
</view>
......
// packageEquity/pages/receptionDetail/components/dialogue/dialogue.js
import api from "~/utils/request/request.js";
import { findConversationDetailByBatchId } from '~/api/index/index'
let thisPage = null
import watchScrollMixin from '../../watchScrollMixin'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
......@@ -217,9 +217,7 @@ Component({
},
/**对话列表 */
async findConversationDetailByBatchIdNew(params) {
const {
data: dialogueList
} = await api.post("dj.api.car.boutique.inspection.findConversationDetailByBatchIdNew", params)
const dialogueList = await findConversationDetailByBatchId(params)
this.getAudioObject()
dialogueList?.map(e => {
e.visible = true
......
// packageCrew/pages/recordingDetail/recordingDetail.js
import {getRecordDetailList, getShortUrl, findCheckResultByBatchId, submitOutstandingCases } from "~/api/crew/index"
import {getRecordingList, getShortUrl, findCheckResultByBatchId, submitOutstandingCases } from "~/api/crew/index"
import { getReceptionDetail } from '~/api/index/index'
import dayjs from 'dayjs'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
Page({
......@@ -9,8 +9,8 @@ Page({
* 页面的初始数据
*/
data: {
IMG_URL,
navBarHeight: 113.5,
IMG_URL,
navBarHeight: 84,
typeLists: ['对话', '质检'],
qualityAudio: '',
activeIndex: 0,
......@@ -23,92 +23,62 @@ Page({
* 生命周期函数--监听页面加载
*/
async onLoad(options) {
console.log(options)
if (Object.keys(options).length) {
// 调用接口获取详情,默认取第一条
let {
receptionStartTime
} = options
const time = dayjs(receptionStartTime).format('YYYY-MM-DD')
const params = {
batchId: options.batchId,
merchantNo: options.merchantNo,
startDateTime: time,
endDateTime: time
}
const res = await getRecordDetailList(params)
let {
code,
data,
message
} = res
if (code == 0) {
console.log(data)
const detailInfo = data.list[0] || {}
if (Object.keys(detailInfo).length) {
detailInfo.staticDate = new Date(detailInfo.staticDate).format('MM月dd日')
this.setData({
record: detailInfo,
}, () => {
wx.$util.getViewInfo('.reception-wrap', ({
height
}) => {
this.setData({
receptionWrapHeight: `${height * 2}rpx`
})
})
this.findCheckResultByBatchId(detailInfo.batchId)
this.setAudio()
})
}
}
}
const record = JSON.parse(options.record)
this.setData({
record,
title: `${dayjs(record.receptionTime).format('M月D日')}${record.recordemployeeName}接待`,
}, () => {
wx.$util.getViewInfo('.reception-wrap', ({
height
}) => {
this.setData({
receptionWrapHeight: `${height}px`
})
})
})
// this.setAudio()
this.findCheckResultByBatchId(record.batchId)
},
async findCheckResultByBatchId(batchId) {
try {
const {
code,
data,
message
} = await findCheckResultByBatchId({
const data = await getReceptionDetail({
batchId
})
if (code == 0) {
data.map(item => {
item.formatScore = `${item.score || item.score === 0 ? item.score : '-'}/${item.sumScore || item.sumScore === 0 ? item.sumScore : '-'}`
let hitTextList = JSON.parse(item.hitText),
matchedClass = 'no-hit',
matchedText = '意图不匹配'
if (hitTextList && hitTextList.length) {
item.hitTextList = hitTextList.map(e => e.replace(/\n/g, '<br>'))
matchedClass = 'hit'
matchedText = '意图匹配'
}
item.matchedClass = matchedClass
item.matchedText = matchedText
let [scriptRec] = JSON.parse(item.scriptRec)
if (scriptRec) scriptRec = scriptRec.replace(/\n/g, '<br>')
if (item.conversationDetailDTOList && item.conversationDetailDTOList.length) {
item.conversationDetailDTOList.map(e => {
e.time = this.formatTime(e.mergedOffset)
e.text_id = `text_${e.mergedOffset}`
if (e.mergedOffset == item.offset && !item.matched) {
e.scriptRec = scriptRec
item.matched = true
}
})
if (item.conversationDetailDTOList.findIndex(e => e.scriptRec) == -1) {
/**时间戳都对不上时 话术推荐加到最后 */
item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec
}
} else item.conversationDetailDTOList = [{
scriptRec: scriptRec || '暂无建议'
}]
})
this.setData({
qualityData: data
})
} else throw message
})
data.map(item => {
item.offset = item.offset != null ? Number(item.offset): item.offset
item.formatScore = `${item.score || item.score === 0 ? item.score : '-'}/${item.sumScore || item.sumScore === 0 ? item.sumScore : '-'}`
let hitTextList = JSON.parse(item.hitText),
matchedClass = 'no-hit',
matchedText = '意图不匹配'
if (hitTextList && hitTextList.length) {
item.hitTextList = hitTextList.map(e => e.replace(/\n/g, '<br>'))
matchedClass = 'hit'
matchedText = '意图匹配'
}
item.matchedClass = matchedClass
item.matchedText = matchedText
let [scriptRec] = JSON.parse(item.scriptRec)
if (scriptRec) scriptRec = scriptRec.replace(/\n/g, '<br>')
if (item.conversationDetailDTOList && item.conversationDetailDTOList.length) {
item.conversationDetailDTOList.map(e => {
e.time = this.formatTime(e.mergedOffset)
e.text_id = `text_${e.mergedOffset}`
if (e.mergedOffset == item.offset && !item.matched) {
e.scriptRec = scriptRec
item.matched = true
}
})
if (item.conversationDetailDTOList.findIndex(e => e.scriptRec) == -1) {
/**时间戳都对不上时 话术推荐加到最后 */
item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec
}
} else item.conversationDetailDTOList = [{
scriptRec: scriptRec || '暂无建议'
}]
})
this.setData({
qualityData: data
})
} catch (error) {
wx.$util.showToast(error)
}
......@@ -161,7 +131,7 @@ Page({
this.qualityAudio = wx.createInnerAudioContext({
useWebAudioImplement: true
})
this.qualityAudio.src = this.data.record.fileUrl
this.qualityAudio.src = this.data.record.recordingUrl
this.qualityAudio.onPause(() => {
this.setData({
status: 'pause'
......@@ -274,7 +244,7 @@ Page({
success(res) {
if (res.confirm) {
wx.setClipboardData({
data: record.fileUrl
data: record.recordingUrl
})
}
}
......@@ -302,21 +272,21 @@ Page({
},
// 提报优秀案例
handleSubmit() {
let { record } = this.data
let params = {
staffName: record.staffName,
staffPhone: record.staffPhone,
merchantId: record.merchantId,
merchantName: record.merchantName,
customerCategory: record.customerCategory,
recordingUrl: record.fileUrl
recordingId: record.recordingId
}
wx.$util.showLoading()
submitOutstandingCases(params).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res
if (code == 0) {
wx.navigateBack()
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
},
/**
......
/* packageCrew/pages/recordingDetail/recordingDetail.wxss */
page {
background-color: #FAFAFA !important;
overflow: hidden;
overflow: hidden;
height: 100vh;
}
.navigation-title {
......
......@@ -16,7 +16,7 @@
</view>
<view class="reception-operate">
<image class="img share" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/down-icon.png" bind:tap="download" mode=""/>
<image class="img share" src="{{IMG_URL}}share-icon.png" bind:tap="share" mode=""/>
<!-- <image class="img share" src="{{IMG_URL}}share-icon.png" bind:tap="share" mode=""/> -->
<view class="audio-wrap" bind:tap="onHandle">
<image class="img" src="{{IMG_URL}}play-icon.png" wx:if="{{status=='pause'||status=='ending'}}"/>
<image class="img" src="{{IMG_URL}}stop-icon.png" wx:else/>
......@@ -26,7 +26,7 @@
</view>
</view>
<view class="type-wrap" style="height:calc(100vh - {{receptionWrapHeight}} - 180rpx)">
<view class="type-wrap" style="height:calc(100% - {{receptionWrapHeight}} - {{record.caseSubmitStatus != 1 ? 180 : 0}}rpx)">
<block wx:if="{{receptionWrapHeight}}">
<view class="component-item {{activeIndex != 0 ?'hide':''}}">
<dialogue id="dialogue" batchId="{{record.batchId}}" recordData="{{record}}" qualityData="{{qualityData}}"></dialogue>
......@@ -36,6 +36,6 @@
</view>
</block>
</view>
<view class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view wx:if="{{record.caseSubmitStatus != 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn next" bindtap="handleSubmit">提报优秀案例</view>
</view>
\ No newline at end of file
// packageCrew/pages/storeTransfer/storeTransfer.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
import api from '~/api/index/index'
import api from '~/api/crew/index'
Page({
/**
......@@ -8,6 +8,7 @@ Page({
*/
data: {
IMG_URL,
navBarHeight: 84,
list: []
},
......@@ -44,10 +45,16 @@ Page({
},
getList(options) {
let params = {
employeeId
}
api.getStoreTransferApi({})
api.getStoreTransferApi({phoneNumber: options.phoneNumber}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
list: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
/**
......
......@@ -15,8 +15,8 @@
<image src="{{IMG_URL}}merchant-icon.png" mode=""/>
</view>
<view class="right">
<view class="name">{{item.merchantName}}</view>
<view class="date">最早开单时间:{{item.date}}</view>
<view class="name">{{item.merchantName || '-'}}</view>
<view class="date">最早开单时间:{{item.startDate}}</view>
</view>
</view>
</block>
......
......@@ -9,6 +9,7 @@ Page({
*/
data: {
IMG_URL,
navBarHeight: 84,
orderObj: {
onDutyFlag: 0,
taskContext: '',
......@@ -196,6 +197,7 @@ Page({
taskType: 0,
onDutyFlag: orderObj.onDutyFlag,
merchantId: orderObj.onDutyFlag == 0 ? orderObj.merchantId : '',
merchantName: orderObj.onDutyFlag == 0 ? orderObj.merchantName : '',
taskContext: orderObj.onDutyFlag == 0 ? orderObj.taskContext : '',
taskImageList: orderObj.onDutyFlag == 0 ? orderObj.taskImageList : [],
}
......
......@@ -6,6 +6,7 @@ Page({
* 页面的初始数据
*/
data: {
navBarHeight: 84,
orderObj: {
taskContext: ''
}
......
......@@ -9,12 +9,13 @@ Page({
*/
data: {
IMG_URL,
navBarHeight: 84,
statusMap: {
1: {name: '待完成', color: '#2C66F7', background: '#2c66f71a'},
2: {name: '进行中', color: '#FF9D0A', background: '#ff9d0a1a'},
3: {name: '已完成', color: '#35C376', background: '#35c3761a'},
0: {name: '待完成', color: '#2C66F7', background: '#2c66f71a'},
1: {name: '进行中', color: '#FF9D0A', background: '#ff9d0a1a'},
2: {name: '已完成', color: '#35C376', background: '#35c3761a'},
},
detailInfo: {handleStatus: 1},
detailInfo: {},
orderObj: {
taskContext: ''
}
......@@ -66,10 +67,9 @@ Page({
taskContextInput(e) {
let val = e.detail.value || ""
if (val.length > 1000) {
val = val.substring(0, 1000)
if (val.length > 500) {
val = val.substring(0, 500)
}
console.log(val)
this.setData({
'orderObj.taskContext': val,
taskContextLength: val.length
......
......@@ -11,9 +11,9 @@
<scroll-view scroll-y class="container" style="padding-top: calc({{navBarHeight}}px + 8rpx);">
<view class="detail-box">
<view class="header">
<view class="name text-hide">{{'深圳问界4S门店名称深圳问界4S门店名称'}}</view>
<view class="status text-center" style="color:{{ statusMap[detailInfo.handleStatus].color }};background-color:{{statusMap[detailInfo.handleStatus].background }};">
{{statusMap[detailInfo.handleStatus].name }}
<view class="name text-hide">{{orderObj.merchantName || '-'}}</view>
<view class="status text-center" style="color:{{ statusMap[orderObj.taskStatus].color }};background-color:{{statusMap[orderObj.taskStatus].background }};">
{{statusMap[orderObj.taskStatus].name }}
</view>
</view>
<view class="row">
......@@ -29,8 +29,8 @@
<view class="item-box remark_box">
<view class="label">专项任务<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="taskContextInput" />
<view class="currentWordNumber">{{taskContextLength || 0}} / 1000</view>
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="taskContextInput" />
<view class="currentWordNumber">{{taskContextLength || 0}} / 500</view>
</view>
</view>
</view>
......
......@@ -9,6 +9,7 @@ Page({
*/
data: {
IMG_URL,
navBarHeight: 84,
orderObj: {
taskContext: '',
taskImageList: [],
......
......@@ -7,16 +7,16 @@ const DEFAULT_CONFIG = {
{ label: '转化率', key: '3', type: 'percent' }
],
metrics: [
{ label: '个人产值', key: 'personalOutput', type: 'number', width: 'auto' },
{ label: '个人客单价', key: 'personalUnitPrice', type: 'number', width: '216rpx'},
{ label: '转化率', key: 'personalConversion', type: 'percent', width: '162rpx' }
{ label: '个人产值', key: 'personalOutput', dotKey:'outputWarningLevel', type: 'number', width: 'auto' },
{ label: '个人客单价', key: 'personalUnitPrice', dotKey:'unitPriceWarningLevel', type: 'number', width: '216rpx'},
{ label: '转化率', key: 'personalConversion', dotKey:'conversionWarningLevel', type: 'percent', width: '162rpx' }
]
},
behavior: {
sortOptions: [
{ label: '成交数', key: '1', type: 'number' },
{ label: '战败数', key: '2', type: 'number' },
{ label: '录音数', key: '3', type: 'number' }
{ label: '成交数', key: '4', type: 'number' },
{ label: '战败数', key: '5', type: 'number' },
{ label: '录音数', key: '6', type: 'number' }
],
metrics: [
{ label: '成交数', key: 'dealCount', type: 'number' },
......@@ -81,7 +81,8 @@ Component({
employeeList: { type: Array, value: [] },
initialSortKey: { type: String, value: '' },
initialSortOrder: { type: String, value: 'desc' },
localSort: { type: Boolean, value: false }
localSort: { type: Boolean, value: false },
scene: Number
},
data: {
......@@ -89,7 +90,12 @@ Component({
metrics: [],
sortKey: '',
sortOrder: 'desc',
displayList: [],
displayList: [],
dotMaps: {
0: 'red',
1: 'yellow',
2: 'green'
}
},
observers: {
......@@ -105,6 +111,13 @@ Component({
},
methods: {
initLoad() {
let { mode } = this.data
this.setData({
sortKey: mode == 'behavior' ? '4' : '1',
sortOrder: 'desc'
})
},
getConfig() {
return DEFAULT_CONFIG[this.data.mode] || DEFAULT_CONFIG.performance
},
......@@ -156,6 +169,7 @@ Component({
},
onTapEmployee(e) {
if (this.data.scene == 0) return // 全业务不支持跳转详情
const idx = e.currentTarget?.dataset?.index
const employee = Array.isArray(this.properties.employeeList) ? this.properties.employeeList[idx] : null
this.triggerEvent('employeeTap', { employee })
......
......@@ -172,7 +172,15 @@
width: 12rpx;
height: 12rpx;
border-radius: 12rpx;
background: #F24724;
&.red {
background: #F24724;
}
&.yellow {
background: #FF9D0A;
}
&.green {
background: #35C376;
}
}
}
......
......@@ -32,7 +32,7 @@
<text class="sep">|</text>
<text class="phone">{{item.phone || item.employeePhone || '-'}}</text>
</view>
<van-icon name="arrow" class="arrow" />
<van-icon name="arrow" wx:if="{{scene > 0}}" class="arrow" />
</view>
<view class="metrics">
......@@ -40,7 +40,7 @@
<view class="metric" style="width: {{subItem.width}};">
<view class="line" wx:if="{{subIndex > 0}}"></view>
<view class="metric-item">
<view class="metric-title">{{subItem.label}} <text class="dot {{}}"></text> </view>
<view class="metric-title">{{subItem.label}}<text wx:if="{{mode == 'performance'}}" class="dot {{dotMaps[item[subItem.dotKey]]}}"></text> </view>
<view class="metric-value {{sortKey == subItem.key ? 'primary' : ''}}">
{{item.metricDisplay[subItem.key]}}
</view>
......
......@@ -28,8 +28,10 @@
</view>
<AI-analyse AIContent="{{AIContent}}" />
<employee-ranking
id="employee-ranking"
title-icon="{{IMG_URL}}staff-rank.png"
mode="{{mode}}"
scene="{{sceneTabIndex}}"
employee-list="{{employeeList}}"
local-sort="{{false}}"
bind:sortChange="onEmployeeSortChange"
......
......@@ -7,6 +7,7 @@ Page({
*/
data: {
IMG_URL,
navBarHeight: 84,
navStyle: 'background-color: rgba(0,0,0,0);',
navTitleStyle: 'font-weight: 600; font- size: 32rpx; color: #000;',
navBarHeight: 0,
......@@ -54,7 +55,7 @@ Page({
},
onTabItemTap(e) {
// 点击埋点
// wx.$track.setTrackData(0, 'supervisor_index_page', {}, '')
wx.$track.setTrackData(0, 'supervisor_index_page', {}, '')
},
navbarReady(e) {
let navBarHeight = e.detail.height
......@@ -86,13 +87,6 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
const query = wx.createSelectorQuery().in(this)
query.select('.top-box').boundingClientRect()
query.exec(res => {
this.setData({
topBoxHeight: res[0].height
})
})
},
/**
* 生命周期函数--监听页面显示
......@@ -124,9 +118,9 @@ Page({
api.getSupervisorStaticData({}).then(res => {
let { code, data, message } = res
if (code == 0) {
data.staffCount = data.staffCount ?? '' === '' ? '-' : this.formatThousands(data.staffCount)
data.shopCount = data.shopCount ?? '' === '' ? '-' : this.formatThousands(data.shopCount)
data.totalValue = data.totalValue ?? '' === '' ? '-' : this.formatThousands(data.totalValue)
data.staffCount = (data.staffCount ?? '') === '' ? '-' : this.formatThousands(data.staffCount)
data.shopCount = (data.shopCount ?? '') === '' ? '-' : this.formatThousands(data.shopCount)
data.totalValue = (data.totalValue ?? '') === '' ? '-' : this.formatThousands(data.totalValue)
this.setData({staticData: data})
} else {
wx.$util.showToast(message)
......@@ -137,7 +131,7 @@ Page({
tabClick(e) {
let eventCode = ['supervisor_dayTask_tab', 'supervisor_weeklyTask_tab', 'supervisor_monthlyTask_tab', 'supervisor_specificTask_tab']
// 点击埋点
// wx.$track.setTrackData(0, eventCode[e.detail], {}, '')
wx.$track.setTrackData(0, eventCode[e.detail], {}, '')
this.setData({
tabIndex: e.detail
})
......@@ -145,7 +139,6 @@ Page({
jump(e) {
const { target } = e.currentTarget.dataset
let { startStr, endStr } = this.data
const pageUrl = {
3: '/packageIndex/pages/recordingReview/recordingReview',
5: '/packageCrew/pages/mentoring/mentoring',
......@@ -164,7 +157,7 @@ Page({
}
let status = target.taskStatus != 2 ? 'execute' : 'view'
console.log(eventCode[target.taskType][status])
// wx.$track.setTrackData(0, eventCode[target.taskType][status], {}, '')
wx.$track.setTrackData(0, eventCode[target.taskType][status], {}, '')
wx.navigateTo({
url: `${pageUrl[target.taskType]}?taskStatus=${target.taskStatus}&id=${target.id}`,
})
......@@ -224,12 +217,19 @@ Page({
[`list[${pageNum - 1}]`]: list
})
}
if (scrollTop >= topBoxHeight && repload) {
setTimeout(() => {
this.setData({
setScrollTop: topBoxHeight
})
}, 200)
if (repload) {
const query = wx.createSelectorQuery().in(this)
query.select('.top-box').boundingClientRect()
query.exec(res => {
let topBoxHeight = res[0].height
if (scrollTop >= topBoxHeight) {
setTimeout(() => {
this.setData({
setScrollTop: topBoxHeight
})
}, 200)
}
})
}
this.setData({
total,
......
......@@ -40,77 +40,77 @@
<view class="content-box">
<view class="list">
<block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:for-item="val" wx:for-index="sIndex" wx:key="sIndex">
<block wx:for="{{val}}" wx:key="index">
<view class="item content">
<!-- 顶部状态和标题 -->
<view class="item-top">
<view
class="status text-center"
style="color: {{statusMap[item.taskStatus].color}}; background-color: {{statusMap[item.taskStatus].background}};"
>
{{statusMap[item.taskStatus].name}}
</view>
<view class="name" wx:if="{{item.taskType != 4}}">
{{missionMap[item.taskType].name}}
<text wx:if="{{item.taskType == 5}}">-{{item.storeManagerName}}</text>
</view>
<view class="name" wx:else>{{item.merchantName || '-'}}</view>
</view>
<view wx:if="{{(item.taskType == 0 || item.taskType == 1 || item.taskType == 2) && item.taskStatus == 2}}" class="list-item">
<image class="icon" src="{{IMG_URL}}task-icon.png" mode="" />
<view class="label">{{['日报内容:', '复盘内容:', '月度计划:'][item.taskType]}}</view>
<view class="text-hide">{{item.taskContext || '-'}}</view>
</view>
<block wx:if="{{item.taskType == 4}}">
<view class="list-item">
<image class="icon" src="{{IMG_URL}}matter-icon.png" mode="" />
<view class="label">事项描述:</view>
<view class="text-hide">{{item.taskDesc || '-'}}</view>
<block wx:for="{{ list }}" wx:for-item="val" wx:for-index="sIndex" wx:key="sIndex">
<block wx:for="{{val}}" wx:key="index">
<view class="item content">
<!-- 顶部状态和标题 -->
<view class="item-top">
<view
class="status text-center"
style="color: {{statusMap[item.taskStatus].color}}; background-color: {{statusMap[item.taskStatus].background}};"
>
{{statusMap[item.taskStatus].name}}
</view>
<view class="name" wx:if="{{item.taskType != 4}}">
{{missionMap[item.taskType].name}}
<text wx:if="{{item.taskType == 5}}">-{{item.storeManagerName}}</text>
</view>
<view class="name" wx:else>{{item.merchantName || '-'}}</view>
</view>
<view wx:if="{{item.taskStatus == 2}}" class="list-item">
<view wx:if="{{(item.taskType == 0 || item.taskType == 1 || item.taskType == 2) && item.taskStatus == 2}}" class="list-item">
<image class="icon" src="{{IMG_URL}}task-icon.png" mode="" />
<view class="label">专项任务:</view>
<view class="label">{{['日报内容:', '复盘内容:', '月度计划:'][item.taskType]}}</view>
<view class="text-hide">{{item.taskContext || '-'}}</view>
</view>
<view wx:else class="list-item">
<block wx:if="{{item.taskType == 4}}">
<view class="list-item">
<image class="icon" src="{{IMG_URL}}matter-icon.png" mode="" />
<view class="label">事项描述:</view>
<view class="text-hide">{{item.taskDesc || '-'}}</view>
</view>
<view wx:if="{{item.taskStatus == 2}}" class="list-item">
<image class="icon" src="{{IMG_URL}}task-icon.png" mode="" />
<view class="label">专项任务:</view>
<view class="text-hide">{{item.taskContext || '-'}}</view>
</view>
<view wx:else class="list-item">
<image class="icon" src="{{IMG_URL}}time-icon.png" mode="" />
<view class="label">创建时间:</view>
<view>{{item.createTime || '-'}}</view>
</view>
</block>
<view wx:if="{{item.taskType != 4 || (item.taskType == 4 && item.taskStatus == 2)}}" class="list-item">
<image class="icon" src="{{IMG_URL}}time-icon.png" mode="" />
<view class="label">创建时间:</view>
<view>{{item.createTime || '-'}}</view>
<view class="label">完成时间:</view>
<view>{{item.updatedDate || '-'}}</view>
</view>
</block>
<view wx:if="{{item.taskType != 4 || (item.taskType == 4 && item.taskStatus == 2)}}" class="list-item">
<image class="icon" src="{{IMG_URL}}time-icon.png" mode="" />
<view class="label">完成时间:</view>
<view>{{item.updatedDate || '-'}}</view>
</view>
<view wx:if="{{item.taskType == 3}}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view
class="progress-item"
style="width: {{ (item.audioReviewCompletedCount / item.audioReviewTotalCount * 100) + '%' }}"
></view>
<view class="num">{{item.audioReviewCompletedCount + '/' + item.audioReviewTotalCount}}</view>
<view wx:if="{{item.taskType == 3}}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view
class="progress-item"
style="width: {{ (item.audioReviewCompletedCount / item.audioReviewTotalCount * 100) + '%' }}"
></view>
<view class="num">{{item.audioReviewCompletedCount + '/' + item.audioReviewTotalCount}}</view>
</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="btn-box">
<view
bindtap="jump"
data-target="{{item}}"
class="btn {{item.taskStatus == 2 ? '' : 'primary'}}"
>
{{item.taskStatus == 2 ? '查看' : '去执行'}}
<!-- 底部按钮 -->
<view class="btn-box">
<view
bindtap="jump"
data-target="{{item}}"
class="btn {{item.taskStatus == 2 ? '' : 'primary'}}"
>
{{item.taskStatus == 2 ? '查看' : '去执行'}}
</view>
</view>
</view>
</view>
</block>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">到底了~</view>
</block>
......
......@@ -39,7 +39,7 @@ Component({
},
goPush(e) {
let { target } = e.currentTarget.dataset
// wx.$track.setTrackData(0, 'supervisor_course_push', {}, '')
wx.$track.setTrackData(0, 'supervisor_course_push', {}, '')
wx.navigateTo({
url: `/packageLearningCenter/pages/coursePush/coursePush?title=${target.title}&totalDuration=${target.totalDuration}&learnTotal=${target.learnTotal}&_imageUrl=${target._imageUrl}&_tagText=${target._tagText}`
})
......
......@@ -8,7 +8,8 @@ Page({
* 页面的初始数据
*/
data: {
IMG_URL,
IMG_URL,
navBarHeight: 84,
statisticsData: {},
showSearchIcon: true,
pageNum: 1,
......@@ -97,7 +98,7 @@ Page({
onTabItemTap(e) {
// 点击埋点
// wx.$track.setTrackData(0, 'supervisor_learning_page', {}, '')
wx.$track.setTrackData(0, 'supervisor_learning_page', {}, '')
},
navbarReady(e) {
......@@ -115,7 +116,7 @@ Page({
title: '加载中',
mask: true
})
// wx.$track.setTrackData(0, 'supervisor_course_detail', {}, '')
wx.$track.setTrackData(0, 'supervisor_course_detail', {}, '')
api.findBeiSenSSOToken({}).then(res => {
wx.hideLoading()
const beisenToken = res.data;
......
......@@ -7,7 +7,8 @@ Page({
* 页面的初始数据
*/
data: {
IMG_URL,
IMG_URL,
navBarHeight: 84,
navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;',
isForbidden: false
},
......@@ -23,7 +24,7 @@ Page({
},
onTabItemTap(e) {
// 点击埋点
// wx.$track.setTrackData(0, 'supervisor_mine_page', {}, '')
wx.$track.setTrackData(0, 'supervisor_mine_page', {}, '')
},
navbarReady(e) {
let navBarHeight = e.detail.height
......
......@@ -11,6 +11,7 @@ Page({
* 页面的初始数据
*/
data: {
navBarHeight: 84,
password: '',
userName: '',
count: 60,
......@@ -40,12 +41,6 @@ Page({
noLoginAgreeChoose: agree
})
},
/**显示隐藏密码 */
pwdSwitch() {
this.setData({
showPwd: !this.data.showPwd
})
},
authChoose(e) {
let {
detail: agree
......@@ -151,8 +146,6 @@ Page({
if (loginType == 1 && (!code || !mobile)) return
const checkAgree = this.checkAgree()
if (checkAgree) return false
if (!flag) return
wx.$util.showLoading()
if (this.data.jumpPageFlag) return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!