修改为弹出框
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<text class="category-title">录音和接待统计</text>
|
||||
</view>
|
||||
<view class="function-grid">
|
||||
<view class="function-item" @click="navigateToPage('recording_duration')">
|
||||
<view class="function-item" @click="showRecordingDurationPopup">
|
||||
<view class="function-icon">⏱️</view>
|
||||
<text class="function-name">录音时长</text>
|
||||
<text class="function-desc">统计录音总时长</text>
|
||||
@@ -45,8 +45,8 @@
|
||||
<text class="category-title">质量管控</text>
|
||||
</view>
|
||||
<view class="function-grid">
|
||||
<view class="function-item" @click="navigateToPage('quality_coverage')">
|
||||
<view class="function-icon">🎯</view>
|
||||
<view class="function-item" @click="showQualityCoveragePopup">
|
||||
<view class="function-icon">📊</view>
|
||||
<text class="function-name">质检覆盖率</text>
|
||||
<text class="function-desc">质检录音覆盖统计</text>
|
||||
</view>
|
||||
@@ -104,6 +104,18 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 录音时长弹出框 -->
|
||||
<RecordingDurationPopup
|
||||
v-if="popupReady"
|
||||
ref="recordingDurationPopup"
|
||||
@close="onPopupClose" />
|
||||
|
||||
<!-- 质检覆盖率弹出框 -->
|
||||
<QualityCoveragePopup
|
||||
v-if="popupReady"
|
||||
ref="qualityCoveragePopup"
|
||||
@close="onQualityCoveragePopupClose" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -111,11 +123,21 @@
|
||||
// #ifdef APP
|
||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||
// #endif
|
||||
import RecordingDurationPopup from "@/pages-subpackage/ai_features/recording_duration/recording-duration-popup.vue";
|
||||
import QualityCoveragePopup from "@/pages-subpackage/ai_features/quality_coverage/quality-coverage-popup.vue";
|
||||
|
||||
export default {
|
||||
// #ifdef APP
|
||||
components: {
|
||||
statusBar
|
||||
statusBar,
|
||||
RecordingDurationPopup,
|
||||
QualityCoveragePopup
|
||||
},
|
||||
// #endif
|
||||
// #ifndef APP
|
||||
components: {
|
||||
RecordingDurationPopup,
|
||||
QualityCoveragePopup
|
||||
},
|
||||
// #endif
|
||||
data() {
|
||||
@@ -131,6 +153,7 @@ export default {
|
||||
return {
|
||||
contentTop: totalNavbarHeight + 'rpx', // 内容区域距离顶部的距离
|
||||
contentBottom: '96rpx', // 内容区域距离底部的距离(默认值,会在 onReady 中更新)
|
||||
popupReady: false, // 弹出框组件是否准备就绪
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -148,6 +171,12 @@ export default {
|
||||
onLoad() {
|
||||
// 更新导航栏位置
|
||||
this.updateNavbarPosition();
|
||||
// 延迟设置弹出框就绪状态,确保组件已加载
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.popupReady = true;
|
||||
}, 100);
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
// 每次页面显示时都重新计算导航栏位置
|
||||
@@ -229,10 +258,52 @@ export default {
|
||||
console.log('[AIAnalysis] 延迟更新tabbar高度:', tabbarHeight, 'px =', tabbarHeightRpx, 'rpx, 调整后:', adjustedBottom, 'rpx');
|
||||
}
|
||||
}).exec();
|
||||
}, 200);
|
||||
});
|
||||
},
|
||||
}, 200);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 显示录音时长弹出框
|
||||
showRecordingDurationPopup() {
|
||||
// 确保组件已准备就绪
|
||||
if (!this.popupReady) {
|
||||
console.warn('[AIAnalysis] Popup component not ready yet');
|
||||
return;
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
const popup = this.$refs.recordingDurationPopup;
|
||||
if (popup && typeof popup.open === 'function') {
|
||||
popup.open();
|
||||
} else {
|
||||
console.error('[AIAnalysis] recordingDurationPopup ref not found or open method not available');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 弹出框关闭事件
|
||||
onPopupClose() {
|
||||
// 弹出框关闭时的处理
|
||||
},
|
||||
// 显示质检覆盖率弹出框
|
||||
showQualityCoveragePopup() {
|
||||
// 确保组件已准备就绪
|
||||
if (!this.popupReady) {
|
||||
console.warn('[AIAnalysis] Popup component not ready yet');
|
||||
return;
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
const popup = this.$refs.qualityCoveragePopup;
|
||||
if (popup && typeof popup.open === 'function') {
|
||||
popup.open();
|
||||
} else {
|
||||
console.error('[AIAnalysis] qualityCoveragePopup ref not found or open method not available');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 质检覆盖率弹出框关闭事件
|
||||
onQualityCoveragePopupClose() {
|
||||
// 弹出框关闭时的处理
|
||||
},
|
||||
// 计算并更新导航栏和内容区域的位置
|
||||
updateNavbarPosition() {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
|
||||
Reference in New Issue
Block a user