修改为弹出框

This commit is contained in:
zhonghua.li
2026-02-07 16:45:37 +08:00
parent 3498a9b9e3
commit 33950f41fd
29 changed files with 1116 additions and 639 deletions

View File

@@ -0,0 +1,254 @@
<template>
<uni-popup ref="popup" type="center" :mask-click="true" @change="onPopupChange">
<view class="quality-coverage-popup">
<view class="popup-header">
<text class="popup-title">质检覆盖率统计</text>
<view class="popup-close" @click="close">
<text class="close-icon">×</text>
</view>
</view>
<scroll-view class="popup-content" scroll-y="true">
<!-- 统计卡片 -->
<view class="popup-stats-card">
<view class="popup-stat-item">
<text class="popup-stat-value">{{ coverageRate }}%</text>
<text class="popup-stat-label">总体覆盖率</text>
</view>
<view class="popup-stat-item">
<text class="popup-stat-value">{{ todayCoverage }}%</text>
<text class="popup-stat-label">今日覆盖率</text>
</view>
</view>
<!-- 图表区域 -->
<view class="popup-chart-section">
<text class="popup-section-title">覆盖率趋势图</text>
<view class="popup-chart-placeholder">
<text class="popup-placeholder-text">📊 图表区域</text>
<text class="popup-placeholder-desc">此处将显示质检覆盖率趋势图表</text>
</view>
</view>
<!-- 数据列表 -->
<view class="popup-data-list">
<text class="popup-section-title">详细数据</text>
<view class="popup-list-item" v-for="(item, index) in dataList" :key="index">
<view class="popup-item-left">
<text class="popup-item-date">{{ item.date }}</text>
<text class="popup-item-desc">{{ item.description }}</text>
</view>
<view class="popup-item-right">
<text class="popup-item-rate">{{ item.rate }}%</text>
</view>
</view>
</view>
</scroll-view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'QualityCoveragePopup',
data() {
return {
coverageRate: '87.5',
todayCoverage: '92.3',
dataList: [
{ date: '2024-02-07', description: '今日质检覆盖率', rate: '92.3' },
{ date: '2024-02-06', description: '昨日质检覆盖率', rate: '89.1' },
{ date: '2024-02-05', description: '前日质检覆盖率', rate: '85.7' },
{ date: '2024-02-04', description: '工作日平均覆盖率', rate: '88.4' },
{ date: '2024-02-03', description: '周末覆盖率', rate: '91.2' }
]
}
},
methods: {
open() {
this.$refs.popup.open()
},
close() {
this.$refs.popup.close()
},
onPopupChange(e) {
if (!e.show) {
this.$emit('close')
}
}
}
}
</script>
<style scoped>
.quality-coverage-popup {
width: 680rpx;
max-height: 80vh;
background-color: #FFFFFF;
border-radius: 16rpx;
display: flex;
flex-direction: column;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);
overflow: hidden;
position: relative;
}
.popup-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6rpx 32rpx;
border-bottom: 1rpx solid #E0E0E0;
flex-shrink: 0;
background-color: #FFFFFF;
box-sizing: border-box;
}
.popup-title {
font-size: 24rpx;
font-weight: 500;
color: #333;
}
.popup-close {
width: 40rpx;
height: 40rpx;
min-width: 40rpx;
min-height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 50%;
transition: background-color 0.2s;
}
.popup-close:active {
background-color: rgba(0, 0, 0, 0.1);
}
.close-icon {
font-size: 32rpx;
color: #333;
line-height: 1;
display: block;
}
.popup-content {
flex: 1;
min-height: 0;
overflow-y: auto;
max-height: calc(80vh - 52rpx);
}
.popup-stats-card {
display: flex;
margin: 20rpx 30rpx;
background: #f8f9fa;
border-radius: 16rpx;
padding: 40rpx 30rpx;
}
.popup-stat-item {
flex: 1;
text-align: center;
}
.popup-stat-item:not(:last-child) {
border-right: 1rpx solid #e9ecef;
}
.popup-stat-value {
display: block;
font-size: 48rpx;
font-weight: bold;
color: #007aff;
margin-bottom: 10rpx;
}
.popup-stat-label {
display: block;
font-size: 24rpx;
color: #666666;
}
.popup-chart-section,
.popup-data-list {
margin: 20rpx 30rpx;
background: #f8f9fa;
border-radius: 16rpx;
overflow: hidden;
}
.popup-section-title {
display: block;
font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 30rpx;
border-bottom: 1rpx solid #e9ecef;
background: #ffffff;
}
.popup-chart-placeholder {
padding: 80rpx 30rpx;
text-align: center;
background: #ffffff;
}
.popup-placeholder-text {
display: block;
font-size: 48rpx;
margin-bottom: 20rpx;
}
.popup-placeholder-desc {
display: block;
font-size: 28rpx;
color: #666666;
}
.popup-list-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
background: #ffffff;
}
.popup-list-item:last-child {
border-bottom: none;
}
.popup-item-left {
flex: 1;
}
.popup-item-date {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #333333;
margin-bottom: 8rpx;
}
.popup-item-desc {
display: block;
font-size: 24rpx;
color: #666666;
}
.popup-item-right {
text-align: right;
}
.popup-item-rate {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #007aff;
}
</style>

View File

@@ -1,221 +0,0 @@
<template>
<view class="feature-page">
<view class="page-header">
<view class="nav-bar">
<view class="nav-left" @click="goBack">
<text class="back-icon"></text>
</view>
<text class="nav-title">质检覆盖率统计</text>
</view>
</view>
<scroll-view class="content-scroll" scroll-y="true">
<view class="stats-card">
<view class="stat-item">
<text class="stat-value">{{ coverageRate }}%</text>
<text class="stat-label">总体覆盖率</text>
</view>
<view class="stat-item">
<text class="stat-value">{{ todayCoverage }}%</text>
<text class="stat-label">今日覆盖率</text>
</view>
</view>
<view class="chart-section">
<text class="section-title">覆盖率趋势图</text>
<view class="chart-placeholder">
<text class="placeholder-text">📊 图表区域</text>
<text class="placeholder-desc">此处将显示质检覆盖率趋势图表</text>
</view>
</view>
<view class="data-list">
<text class="section-title">详细数据</text>
<view class="list-item" v-for="(item, index) in dataList" :key="index">
<view class="item-left">
<text class="item-date">{{ item.date }}</text>
<text class="item-desc">{{ item.description }}</text>
</view>
<view class="item-right">
<text class="item-rate">{{ item.rate }}%</text>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
coverageRate: '87.5',
todayCoverage: '92.3',
dataList: [
{ date: '2024-02-07', description: '今日质检覆盖率', rate: '92.3' },
{ date: '2024-02-06', description: '昨日质检覆盖率', rate: '89.1' },
{ date: '2024-02-05', description: '前日质检覆盖率', rate: '85.7' },
{ date: '2024-02-04', description: '工作日平均覆盖率', rate: '88.4' },
{ date: '2024-02-03', description: '周末覆盖率', rate: '91.2' }
]
}
},
methods: {
goBack() {
uni.navigateBack()
}
}
}
</script>
<style scoped>
.feature-page {
min-height: 100vh;
background: #f8f9fa;
}
.page-header {
background: #ffffff;
border-bottom: 1rpx solid #e9ecef;
}
.nav-bar {
display: flex;
align-items: center;
height: 88rpx;
padding: 0 30rpx;
}
.nav-left {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.back-icon {
font-size: 36rpx;
color: #333333;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.content-scroll {
height: calc(100vh - 88rpx);
}
.stats-card {
display: flex;
margin: 20rpx 30rpx;
background: #ffffff;
border-radius: 16rpx;
padding: 40rpx 30rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.stat-item {
flex: 1;
text-align: center;
}
.stat-item:not(:last-child) {
border-right: 1rpx solid #e9ecef;
}
.stat-value {
display: block;
font-size: 48rpx;
font-weight: bold;
color: #007aff;
margin-bottom: 10rpx;
}
.stat-label {
display: block;
font-size: 24rpx;
color: #666666;
}
.chart-section, .data-list {
margin: 20rpx 30rpx;
background: #ffffff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.section-title {
display: block;
font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 30rpx;
border-bottom: 1rpx solid #e9ecef;
}
.chart-placeholder {
padding: 80rpx 30rpx;
text-align: center;
}
.placeholder-text {
display: block;
font-size: 48rpx;
margin-bottom: 20rpx;
}
.placeholder-desc {
display: block;
font-size: 28rpx;
color: #666666;
}
.list-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.list-item:last-child {
border-bottom: none;
}
.item-left {
flex: 1;
}
.item-date {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #333333;
margin-bottom: 8rpx;
}
.item-desc {
display: block;
font-size: 24rpx;
color: #666666;
}
.item-right {
text-align: right;
}
.item-rate {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #007aff;
}
</style>

View File

@@ -0,0 +1,274 @@
<template>
<uni-popup ref="popup" type="top" :mask-click="true" @change="onPopupChange">
<view class="recording-duration-popup">
<view class="popup-header">
<text class="popup-title">录音时长统计</text>
<view class="popup-close" @click="close">
<text class="close-icon">×</text>
</view>
</view>
<scroll-view class="popup-content" scroll-y="true">
<!-- 统计卡片 -->
<view class="popup-stats-card">
<view class="popup-stat-item">
<text class="popup-stat-value">{{ totalDuration }}</text>
<text class="popup-stat-label">总录音时长</text>
</view>
<view class="popup-stat-item">
<text class="popup-stat-value">{{ todayDuration }}</text>
<text class="popup-stat-label">今日录音时长</text>
</view>
</view>
<!-- 图表区域 -->
<view class="popup-chart-section">
<text class="popup-section-title">时长趋势图</text>
<view class="popup-chart-placeholder">
<text class="popup-placeholder-text">📊 图表区域</text>
<text class="popup-placeholder-desc">此处将显示录音时长趋势图表</text>
</view>
</view>
<!-- 数据列表 -->
<view class="popup-data-list">
<text class="popup-section-title">详细数据</text>
<view class="popup-list-item" v-for="(item, index) in dataList" :key="index">
<view class="popup-item-left">
<text class="popup-item-date">{{ item.date }}</text>
<text class="popup-item-desc">{{ item.description }}</text>
</view>
<view class="popup-item-right">
<text class="popup-item-duration">{{ item.duration }}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'RecordingDurationPopup',
data() {
return {
totalDuration: '125.5 小时',
todayDuration: '8.2 小时',
dataList: [
{ date: '2024-02-07', description: '客户咨询录音', duration: '2.5 小时' },
{ date: '2024-02-06', description: '销售洽谈录音', duration: '3.2 小时' },
{ date: '2024-02-05', description: '培训录音', duration: '1.8 小时' },
{ date: '2024-02-04', description: '会议录音', duration: '4.1 小时' },
{ date: '2024-02-03', description: '客户反馈录音', duration: '2.9 小时' }
]
}
},
methods: {
open() {
this.$refs.popup.open()
},
close() {
this.$refs.popup.close()
},
onPopupChange(e) {
if (!e.show) {
this.$emit('close')
}
}
}
}
</script>
<style scoped>
/* 确保弹出框在导航栏之上 */
::v-deep .uni-popup.top {
z-index: 9999 !important;
}
/* 确保弹出框 wrapper 正确显示 */
::v-deep .uni-popup.top .uni-popup__wrapper {
overflow: visible !important;
position: relative !important;
}
.recording-duration-popup {
background-color: #FFFFFF;
border-radius: 16rpx;
display: flex;
flex-direction: column;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);
overflow: hidden;
position: relative;
}
.popup-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx;
border-bottom: 1rpx solid #E0E0E0;
flex-shrink: 0;
background-color: #FFFFFF;
box-sizing: border-box;
min-height: 112rpx;
position: relative;
z-index: 10;
overflow: visible;
width: 100%;
}
.popup-title {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.popup-close {
width: 64rpx;
height: 64rpx;
min-width: 64rpx;
min-height: 64rpx;
display: flex !important;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 50%;
transition: background-color 0.2s;
position: relative;
z-index: 20;
overflow: visible;
visibility: visible !important;
opacity: 1 !important;
}
.popup-close:active {
background-color: rgba(0, 0, 0, 0.05);
}
.close-icon {
font-size: 48rpx;
color: #333;
line-height: 1;
display: block !important;
visibility: visible !important;
opacity: 1 !important;
}
.popup-content {
flex: 1;
min-height: 0;
overflow-y: auto;
}
.popup-stats-card {
display: flex;
margin: 20rpx 30rpx;
background: #f8f9fa;
border-radius: 16rpx;
padding: 40rpx 30rpx;
}
.popup-stat-item {
flex: 1;
text-align: center;
}
.popup-stat-item:not(:last-child) {
border-right: 1rpx solid #e9ecef;
}
.popup-stat-value {
display: block;
font-size: 48rpx;
font-weight: bold;
color: #007aff;
margin-bottom: 10rpx;
}
.popup-stat-label {
display: block;
font-size: 24rpx;
color: #666666;
}
.popup-chart-section,
.popup-data-list {
margin: 20rpx 30rpx;
background: #f8f9fa;
border-radius: 16rpx;
overflow: hidden;
}
.popup-section-title {
display: block;
font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 30rpx;
border-bottom: 1rpx solid #e9ecef;
background: #ffffff;
}
.popup-chart-placeholder {
padding: 80rpx 30rpx;
text-align: center;
background: #ffffff;
}
.popup-placeholder-text {
display: block;
font-size: 48rpx;
margin-bottom: 20rpx;
}
.popup-placeholder-desc {
display: block;
font-size: 28rpx;
color: #666666;
}
.popup-list-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
background: #ffffff;
}
.popup-list-item:last-child {
border-bottom: none;
}
.popup-item-left {
flex: 1;
}
.popup-item-date {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #333333;
margin-bottom: 8rpx;
}
.popup-item-desc {
display: block;
font-size: 24rpx;
color: #666666;
}
.popup-item-right {
text-align: right;
}
.popup-item-duration {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #007aff;
}
</style>

View File

@@ -1,226 +0,0 @@
<template>
<view class="feature-page">
<!-- 页面头部 -->
<view class="page-header">
<view class="nav-bar">
<view class="nav-left" @click="goBack">
<text class="back-icon"></text>
</view>
<text class="nav-title">录音时长统计</text>
</view>
</view>
<!-- 内容区域 -->
<scroll-view class="content-scroll" scroll-y="true">
<!-- 统计卡片 -->
<view class="stats-card">
<view class="stat-item">
<text class="stat-value">{{ totalDuration }}</text>
<text class="stat-label">总录音时长</text>
</view>
<view class="stat-item">
<text class="stat-value">{{ todayDuration }}</text>
<text class="stat-label">今日录音时长</text>
</view>
</view>
<!-- 图表区域 -->
<view class="chart-section">
<text class="section-title">时长趋势图</text>
<view class="chart-placeholder">
<text class="placeholder-text">📊 图表区域</text>
<text class="placeholder-desc">此处将显示录音时长趋势图表</text>
</view>
</view>
<!-- 数据列表 -->
<view class="data-list">
<text class="section-title">详细数据</text>
<view class="list-item" v-for="(item, index) in dataList" :key="index">
<view class="item-left">
<text class="item-date">{{ item.date }}</text>
<text class="item-desc">{{ item.description }}</text>
</view>
<view class="item-right">
<text class="item-duration">{{ item.duration }}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
totalDuration: '125.5 小时',
todayDuration: '8.2 小时',
dataList: [
{ date: '2024-02-07', description: '客户咨询录音', duration: '2.5 小时' },
{ date: '2024-02-06', description: '销售洽谈录音', duration: '3.2 小时' },
{ date: '2024-02-05', description: '培训录音', duration: '1.8 小时' },
{ date: '2024-02-04', description: '会议录音', duration: '4.1 小时' },
{ date: '2024-02-03', description: '客户反馈录音', duration: '2.9 小时' }
]
}
},
methods: {
goBack() {
uni.navigateBack()
}
}
}
</script>
<style scoped>
.feature-page {
min-height: 100vh;
background: #f8f9fa;
}
.page-header {
background: #ffffff;
border-bottom: 1rpx solid #e9ecef;
}
.nav-bar {
display: flex;
align-items: center;
height: 88rpx;
padding: 0 30rpx;
}
.nav-left {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.back-icon {
font-size: 36rpx;
color: #333333;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.content-scroll {
height: calc(100vh - 88rpx);
}
.stats-card {
display: flex;
margin: 20rpx 30rpx;
background: #ffffff;
border-radius: 16rpx;
padding: 40rpx 30rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.stat-item {
flex: 1;
text-align: center;
}
.stat-item:not(:last-child) {
border-right: 1rpx solid #e9ecef;
}
.stat-value {
display: block;
font-size: 48rpx;
font-weight: bold;
color: #007aff;
margin-bottom: 10rpx;
}
.stat-label {
display: block;
font-size: 24rpx;
color: #666666;
}
.chart-section, .data-list {
margin: 20rpx 30rpx;
background: #ffffff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.section-title {
display: block;
font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 30rpx;
border-bottom: 1rpx solid #e9ecef;
}
.chart-placeholder {
padding: 80rpx 30rpx;
text-align: center;
}
.placeholder-text {
display: block;
font-size: 48rpx;
margin-bottom: 20rpx;
}
.placeholder-desc {
display: block;
font-size: 28rpx;
color: #666666;
}
.list-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.list-item:last-child {
border-bottom: none;
}
.item-left {
flex: 1;
}
.item-date {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #333333;
margin-bottom: 8rpx;
}
.item-desc {
display: block;
font-size: 24rpx;
color: #666666;
}
.item-right {
text-align: right;
}
.item-duration {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #007aff;
}
</style>