Files
smartDriveEEUniApp/pages/workspace/workspace.vue
2026-01-09 19:41:18 +08:00

187 lines
4.7 KiB
Vue

<template>
<view class="page">
<!-- #ifdef APP -->
<statusBar></statusBar>
<!-- #endif -->
<!-- 导航栏 -->
<uni-nav-bar
:fixed="true"
:statusBar="true"
:border="false"
title="工作台"
color="#333"
backgroundColor="#FFFFFF">
</uni-nav-bar>
<view class="content">
<view class="scene-grid">
<view
class="scene-card"
v-for="scene in scenes"
:key="scene.id"
@click="navigateToScene(scene)">
<view class="scene-icon">
<uni-icons :type="scene.icon" size="40" :color="scene.color"></uni-icons>
</view>
<text class="scene-title">{{ scene.title }}</text>
<text class="scene-desc">{{ scene.desc }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
// #ifdef APP
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
// #endif
export default {
// #ifdef APP
components: {
statusBar
},
// #endif
data() {
return {
scenes: [
{
id: 'meeting',
title: '会议场景',
desc: '会议准备、开会、总结',
icon: 'calendar',
color: '#2A68FF',
navItems: [
{ title: '会议准备', path: '/pages/meeting_prepare/meeting_prepare' },
{ title: '开会', path: '/pages/meeting_meeting/meeting_meeting' },
{ title: '总结', path: '/pages/meeting_summary/meeting_summary' }
]
},
{
id: 'speaking_training',
title: '口才培训',
desc: '语音、表达、记录、作业',
icon: 'mic',
color: '#FF6B6B',
navItems: [
{ title: '语音训练', path: '/pages/speaking_training_voice/speaking_training_voice' },
{ title: '表达训练', path: '/pages/speaking_training_expression/speaking_training_expression' },
{ title: '训练记录', path: '/pages/speaking_training_record/speaking_training_record' },
{ title: '作业', path: '/pages/speaking_training_homework/speaking_training_homework' },
{ title: '教务', path: '/pages/speaking_training_edu/speaking_training_edu' },
{ title: '蓝牙录音设备', path: '/pages/bluetooth-recorder/bluetooth-recorder' }
]
},
{
id: 'general_sales',
title: '通用销售场景',
desc: '通用销售场景功能',
icon: 'grid',
color: '#4ECDC4',
navItems: [
{ title: '销售准备', path: '/pages/general_sales/prepare/prepare' },
{ title: '销售过程', path: '/pages/general_sales/process/process' },
{ title: '销售总结', path: '/pages/general_sales/summary/summary' }
]
},
{
id: 'furniture_sales',
title: '家具销售场景',
desc: '家具销售场景功能',
icon: 'list',
color: '#FFA07A',
navItems: [
{ title: '销售准备', path: '/pages/furniture_sales/prepare/prepare' },
{ title: '销售过程', path: '/pages/furniture_sales/process/process' },
{ title: '销售总结', path: '/pages/furniture_sales/summary/summary' }
]
},
{
id: 'car_sales',
title: '汽车销售场景',
desc: '汽车销售场景功能',
icon: 'settings',
color: '#95E1D3',
navItems: [
{ title: '销售准备', path: '/pages/car_sales/prepare/prepare' },
{ title: '销售过程', path: '/pages/car_sales/process/process' },
{ title: '销售总结', path: '/pages/car_sales/summary/summary' }
]
}
]
}
},
onLoad() {
},
methods: {
navigateToScene(scene) {
// 跳转到场景详情页面,传递场景信息
uni.navigateTo({
url: `/pages/workspace/scene-detail?scene=${encodeURIComponent(JSON.stringify(scene))}`
});
}
}
}
</script>
<style scoped>
.page {
min-height: 100vh;
background-color: #F5F5F5;
}
.content {
padding-top: 44px;
padding: 44px 16px 20px;
}
.scene-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}
.scene-card {
background: #FFFFFF;
border-radius: 12px;
padding: 24px 16px;
display: flex;
flex-direction: column;
align-items: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
transition: all 0.3s;
}
.scene-card:active {
transform: scale(0.98);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.scene-icon {
margin-bottom: 12px;
width: 64px;
height: 64px;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, rgba(42, 104, 255, 0.1) 0%, rgba(42, 104, 255, 0.05) 100%);
border-radius: 16px;
}
.scene-title {
font-size: 16px;
font-weight: 600;
color: #333333;
margin-bottom: 8px;
text-align: center;
}
.scene-desc {
font-size: 12px;
color: #999999;
text-align: center;
line-height: 1.4;
}
</style>