Commit 8fa8ca0c by Jaxon

feat(质检记录): 添加录音进度条显示控制功能

- 在 record-item 组件中增加 showRecordProgress 属性,用于控制时间轴进度条的显示
- 在 receptionDetail 页面中默认显示进度条,但在 caseDetail 页面跳转时隐藏
- 修复 newReceptionRecords 页面中 audio 对象可能未初始化的错误
1 parent 1520db7a
...@@ -24,7 +24,6 @@ Page({ ...@@ -24,7 +24,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {
console.log(options, "onload");
if (Object.keys(options).length) { if (Object.keys(options).length) {
// 调用接口获取详情,默认取第一条 // 调用接口获取详情,默认取第一条
let { receptionStartTime } = options; let { receptionStartTime } = options;
...@@ -286,7 +285,9 @@ Page({ ...@@ -286,7 +285,9 @@ Page({
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
this.qualityAudio.stop(); if (this.qualityAudio) {
this.qualityAudio.stop();
}
this.onPageHide(); this.onPageHide();
}, },
...@@ -294,7 +295,9 @@ Page({ ...@@ -294,7 +295,9 @@ Page({
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
this.qualityAudio.stop(); if (this.qualityAudio) {
this.qualityAudio.stop();
}
this.onPageHide(); this.onPageHide();
}, },
......
...@@ -18,6 +18,7 @@ Page({ ...@@ -18,6 +18,7 @@ Page({
isOperate: true, isOperate: true,
track_event_code: "reception_detail", //埋点动作类型 track_event_code: "reception_detail", //埋点动作类型
receptionStartTime: "", receptionStartTime: "",
showRecordProgress: true,
}, },
/** /**
...@@ -188,6 +189,12 @@ Page({ ...@@ -188,6 +189,12 @@ Page({
onRoute(options) { onRoute(options) {
console.log(options, "==="); console.log(options, "===");
if (Object.keys(options).length) { if (Object.keys(options).length) {
if (typeof options.showRecordProgress === "boolean") {
this.setData({
showRecordProgress: options.showRecordProgress,
});
}
options.staticDate = new Date(options.staticDate).format("MM月dd日"); options.staticDate = new Date(options.staticDate).format("MM月dd日");
this.track_businessParam = { this.track_businessParam = {
batchId: options.batchId, batchId: options.batchId,
......
/* packageEquity/pages/receptionDetail/receptionDetail.wxss */ /* packageEquity/pages/receptionDetail/receptionDetail.wxss */
page { page {
background-color: #FAFAFA !important; background-color: #fafafa !important;
overflow: hidden; overflow: hidden;
} }
.navigation-title { .navigation-title {
font-weight: 500; font-weight: 500;
font-size: var(--fontSize30); font-size: var(--fontSize30);
color: #282829; color: #282829;
line-height: var(--fontSize44); line-height: var(--fontSize44);
width: var(--fontSize360); width: var(--fontSize360);
text-align: center; text-align: center;
} }
.bg { .bg {
width: 100%; width: 100%;
height: var(--fontSize800); height: var(--fontSize800);
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/reception-nav--bg.png') no-repeat; background: url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/reception-nav--bg.png") no-repeat;
background-size: 100% var(--fontSize800); background-size: 100% var(--fontSize800);
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
.reception-wrap { .reception-wrap {
padding: 0 var(--fontSize28); padding: 0 var(--fontSize28);
.reception-info {
.reception-info { width: 100%;
width: 100%; background: #ffffff;
height: var(--fontSize322); border-radius: var(--fontSize28);
background: #FFFFFF; margin: var(--fontSize12) 0 var(--fontSize28) 0;
border-radius: var(--fontSize28); }
margin: var(--fontSize12) 0 var(--fontSize28) 0;
} .reception-nav {
display: flex;
.reception-nav { align-items: center;
display: flex; justify-content: space-between;
align-items: center; padding: 0 0 var(--fontSize16) 0;
justify-content: space-between; }
padding: 0 0 var(--fontSize16) 0;
} .reception-types {
display: flex;
.reception-types { align-items: center;
display: flex;
align-items: center; .type {
width: var(--fontSize144);
.type { line-height: var(--fontSize40);
width: var(--fontSize144); padding: var(--fontSize10) 0;
line-height: var(--fontSize40); background: #ffffff;
padding: var(--fontSize10) 0; border-radius: var(--fontSize8);
background: #FFFFFF; margin-right: var(--fontSize16);
border-radius: var(--fontSize8); font-size: var(--fontSize28);
margin-right: var(--fontSize16); color: #5a5e66;
font-size: var(--fontSize28); font-weight: 400;
color: #5A5E66; text-align: center;
font-weight: 400;
text-align: center; .avg {
font-size: var(--fontSize20);
.avg { font-family: "numberNor";
font-size: var(--fontSize20); }
font-family: 'numberNor'; }
}
} .active {
font-weight: 600;
.active { color: #347bff;
font-weight: 600; background: #347bff1a;
color: #347BFF; }
background: #347bff1a; }
}
} .reception-operate {
display: flex;
.reception-operate { align-items: center;
display: flex;
align-items: center; .img {
width: var(--fontSize52);
.img { height: var(--fontSize52);
width: var(--fontSize52); }
height: var(--fontSize52);
} .share {
margin-right: var(--fontSize12);
.share { }
margin-right: var(--fontSize12)
} .audio-wrap {
width: var(--fontSize140);
.audio-wrap { height: var(--fontSize60);
width: var(--fontSize140); display: flex;
height: var(--fontSize60); align-items: center;
display: flex; background: #ffffff;
align-items: center; padding: var(--fontSize4);
background: #FFFFFF; border-radius: var(--fontSize28);
padding: var(--fontSize4); box-sizing: border-box;
border-radius: var(--fontSize28);
box-sizing: border-box; .time {
font-weight: 400;
.time { font-size: var(--fontSize26);
font-weight: 400; color: #757980;
font-size: var(--fontSize26); margin-left: var(--fontSize4);
color: #757980; }
margin-left: var(--fontSize4); }
} }
}
}
} }
.type-wrap { .type-wrap {
padding: 0 var(--fontSize28); padding: 0 var(--fontSize28);
} }
.violation-btn-box { .violation-btn-box {
padding: 40rpx 64rpx;
.violation-btn {
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
height: 88rpx;
border-radius: 12rpx;
background: #347bff;
line-height: 88rpx;
text-align: center;
}
}
\ No newline at end of file \ No newline at end of file
padding: 40rpx 64rpx;
.violation-btn {
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
height: 88rpx;
border-radius: 12rpx;
background: #347bff;
line-height: 88rpx;
text-align: center;
}
}
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
style="padding-top:{{ navBarHeight }}px;position: relative;"> style="padding-top:{{ navBarHeight }}px;position: relative;">
<view class="reception-info" wx:if="{{ record }}"> <view class="reception-info" wx:if="{{ record }}">
<record-item record="{{ record }}" <record-item record="{{ record }}"
showRecordProgress="{{ showRecordProgress }}"
hideScore="{{ record.hideScore }}" hideScore="{{ record.hideScore }}"
showReason="{{ record.violationReason }}"></record-item> showReason="{{ record.violationReason }}"></record-item>
</view> </view>
......
...@@ -32,6 +32,8 @@ Page({ ...@@ -32,6 +32,8 @@ Page({
batchId: item.id, batchId: item.id,
merchantNo: item.merchantId, merchantNo: item.merchantId,
totalDuration: item.durationTime, totalDuration: item.durationTime,
//
showRecordProgress: false,
}; };
if (item.checkHistoryFlag == 0) { if (item.checkHistoryFlag == 0) {
...@@ -41,6 +43,8 @@ Page({ ...@@ -41,6 +43,8 @@ Page({
wx.$router.go("packageEquity.receptionDetail", { wx.$router.go("packageEquity.receptionDetail", {
...receptionData, ...receptionData,
hideScore: false, hideScore: false,
// 显示录音进度条
showRecordProgress: false,
}); });
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!