| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118 |
- <template>
- <view class="dashboard-container">
- <!-- 顶部信息卡片 - 更现代化的设计 -->
- <view class="header-card">
- <view class="header-left">
- <view class="welcome-section">
- <text class="welcome-text">您好,{{ userData.nickname }}</text>
- <view class="plot-info">
- <text class="plot-label">当前地块:</text>
- <text class="plot-name">{{ userData.selectedPlot }}</text>
- <view class="switch-plot-btn" @click="handleSwitchPlot">
- <u-icon name="arrow-down-fill" color="#ffffff" size="14"></u-icon>
- <text>切换</text>
- </view>
- </view>
- </view>
- </view>
- <view class="header-right">
- <view class="user-avatar" @click="navigateToProfile">
- <view class="avatar-svg">
- <svg width="100%" height="100%" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
- <!-- 背景圆 -->
- <circle cx="45" cy="45" r="45" fill="#E1F5E9"/>
-
- <!-- 背景装饰 - 农作物图案 -->
- <path d="M15 35C15 35 25 25 35 35C45 45 65 25 75 35" stroke="#4CAF50" stroke-width="2" stroke-opacity="0.3"/>
- <path d="M20 30L20 40" stroke="#4CAF50" stroke-width="2" stroke-opacity="0.3"/>
- <path d="M35 30L35 45" stroke="#4CAF50" stroke-width="2" stroke-opacity="0.3"/>
- <path d="M50 30L50 40" stroke="#4CAF50" stroke-width="2" stroke-opacity="0.3"/>
- <path d="M65 30L65 45" stroke="#4CAF50" stroke-width="2" stroke-opacity="0.3"/>
-
- <!-- 人形轮廓 -->
- <circle cx="45" cy="35" r="15" fill="#4CAF50"/>
- <path d="M25 82C25 67 34 55 45 55C56 55 65 67 65 82H25Z" fill="#4CAF50"/>
-
- <!-- 帽子 - 农夫草帽 -->
- <path d="M25 30C25 30 35 20 45 20C55 20 65 30 65 30C65 30 55 25 45 25C35 25 25 30 25 30Z" fill="#8BC34A"/>
-
- <!-- 装饰细节 -->
- <circle cx="38" cy="32" r="2" fill="white" fill-opacity="0.7"/>
- <circle cx="52" cy="32" r="2" fill="white" fill-opacity="0.7"/>
- <path d="M40 40C40 40 43 42 45 42C47 42 50 40 50 40" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
-
- <!-- 麦穗装饰 -->
- <path d="M70 15C70 15 75 20 75 25" stroke="#8BC34A" stroke-width="1.5" stroke-linecap="round"/>
- <path d="M73 18L77 20" stroke="#8BC34A" stroke-width="1.5" stroke-linecap="round"/>
- <path d="M72 22L76 24" stroke="#8BC34A" stroke-width="1.5" stroke-linecap="round"/>
-
- <path d="M20 15C20 15 15 20 15 25" stroke="#8BC34A" stroke-width="1.5" stroke-linecap="round"/>
- <path d="M17 18L13 20" stroke="#8BC34A" stroke-width="1.5" stroke-linecap="round"/>
- <path d="M18 22L14 24" stroke="#8BC34A" stroke-width="1.5" stroke-linecap="round"/>
- </svg>
- </view>
- </view>
- </view>
- </view>
- <!-- 核心数据指标 - 科技感设计 -->
- <view class="stats-grid">
- <view class="stat-card" v-for="(stat, index) in coreStats" :key="index">
- <view class="stat-content">
- <text class="stat-value">{{ stat.value }}</text>
- <text class="stat-label">{{ stat.label }}</text>
- </view>
- </view>
- </view>
- <!-- 农事活动卡片 - 使用线性进度条 -->
- <view class="section-card">
- <view class="card-header">
- <view class="card-title">
- <view class="title-icon">
- <view class="icon-dot"></view>
- </view>
- <text class="title-text">近期农事活动</text>
- </view>
- <view class="more-link" @click="navigateToAllActivities">
- <text>更多</text>
- <u-icon name="arrow-right" color="#4CAF50" size="14"></u-icon>
- </view>
- </view>
- <view class="card-body">
- <view class="activity-header">
- <view class="activity-header-right">
- <text class="header-title">任务名称</text>
- <text class="header-executor">执行人</text>
- <text class="header-date">计划日期</text>
- <view class="header-action"></view>
- </view>
- </view>
- <view v-for="(item, index) in farmData.recentActivities" :key="index"
- class="activity-item" @click="navigateToActivity(item)">
- <view class="activity-right">
- <view class="activity-content">
- <text class="activity-title">{{ item.title }}</text>
- </view>
- <text class="activity-executor">{{ item.executor }}</text>
- <text class="activity-date">{{ item.date }}</text>
- <view class="activity-action">
- <u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 天气和农情预测 - 更现代化的信息图表 -->
- <view class="section-card weather-card">
- <view class="card-header">
- <view class="card-title">
- <view class="title-icon">
- <view class="icon-dot"></view>
- </view>
- <text class="title-text">天气与农情</text>
- </view>
- </view>
- <view class="card-body">
- <view class="weather-main">
- <view class="weather-top">
- <view class="weather-left">
- <view class="weather-icon-large">
- <!-- 自定义的晴朗天气图标 -->
- <svg width="48" height="48" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg" class="sun-icon">
- <!-- 光晕效果 -->
- <circle cx="100" cy="100" r="65" fill="rgba(255, 193, 7, 0.1)" />
- <!-- 主太阳圆形 -->
- <circle cx="100" cy="100" r="45" fill="#FFC107"/>
- <!-- 放射光芒 - 主要 -->
- <line x1="100" y1="25" x2="100" y2="5" stroke="#FFC107" stroke-width="8" stroke-linecap="round"/>
- <line x1="100" y1="195" x2="100" y2="175" stroke="#FFC107" stroke-width="8" stroke-linecap="round"/>
- <line x1="25" y1="100" x2="5" y2="100" stroke="#FFC107" stroke-width="8" stroke-linecap="round"/>
- <line x1="195" y1="100" x2="175" y2="100" stroke="#FFC107" stroke-width="8" stroke-linecap="round"/>
- <!-- 内部细节 -->
- <circle cx="100" cy="100" r="35" fill="#FF9800"/>
- </svg>
- </view>
- <view class="weather-info">
- <view class="temp-row">
- <view class="temp-display">
- <text class="weather-temp">{{ weatherData.temperature }}</text>
- <text class="temp-unit">°C</text>
- </view>
- <text class="weather-desc">{{ weatherData.description }}</text>
- </view>
- </view>
- </view>
- </view>
-
- <view class="weather-advice">
- <view class="advice-header">
- <text class="advice-title">今日农事建议:</text>
- <u-icon name="account" color="#666666" size="32"></u-icon>
- </view>
- <text class="advice-content">{{ weatherData.advice }}</text>
- </view>
- </view>
-
- <view class="weather-metrics">
- <view class="metric-item">
- <text class="metric-label">湿度</text>
- <text class="metric-value">{{ weatherData.humidity }}%</text>
- </view>
- <view class="metric-divider"></view>
- <view class="metric-item">
- <text class="metric-label">风力</text>
- <text class="metric-value">{{ weatherData.windLevel }}级</text>
- </view>
- <view class="metric-divider"></view>
- <view class="metric-item">
- <text class="metric-label">降水</text>
- <text class="metric-value">{{ weatherData.rainfall }}mm</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 统计卡片区域 -->
- <view class="stats-section">
- <view class="stats-grid">
- <!-- 本月作业情况 -->
- <view class="stat-card">
- <view class="card-header">
- <view class="icon-badge">
- <text class="icon">📊</text>
- </view>
- <text class="card-title">本月作业情况</text>
- </view>
- <view class="card-content">
- <view class="main-stats">
- <view class="stat-item">
- <text class="number">36</text>
- <text class="label">作业次数</text>
- </view>
- <view class="stat-item">
- <text class="number">128</text>
- <text class="label">作业面积(亩)</text>
- </view>
- </view>
- <view class="sub-info">
- <text class="emoji">🌾</text>
- <text class="info-text">主要作物:小麦、玉米</text>
- </view>
- </view>
- </view>
- <!-- 农机使用情况 -->
- <view class="stat-card">
- <view class="card-header">
- <view class="icon-badge">
- <text class="icon">🚜</text>
- </view>
- <text class="card-title">农机使用情况</text>
- </view>
- <view class="card-content">
- <view class="main-stats">
- <view class="stat-item">
- <text class="number">172</text>
- <text class="label">总使用时长(小时)</text>
- </view>
- <view class="stat-item">
- <text class="number">75%</text>
- <text class="label">计划完成率</text>
- </view>
- </view>
- <view class="sub-info">
- <text class="emoji">🛠</text>
- <text class="info-text">设备:无人拖拉机、播种机</text>
- </view>
- </view>
- </view>
- <!-- 灌溉与施肥数据 -->
- <view class="stat-card">
- <view class="card-header">
- <view class="icon-badge">
- <text class="icon">💧</text>
- </view>
- <text class="card-title">灌溉与施肥数据</text>
- </view>
- <view class="card-content">
- <view class="main-stats">
- <view class="stat-item">
- <text class="number">85</text>
- <text class="label">灌溉面积(亩)</text>
- </view>
- <view class="stat-item">
- <text class="number">230</text>
- <text class="label">用水量(m³)</text>
- </view>
- </view>
- <view class="sub-info">
- <text class="emoji">🌱</text>
- <text class="info-text">本月施肥次数:12次</text>
- </view>
- </view>
- </view>
- <!-- 病虫害处理情况 -->
- <view class="stat-card">
- <view class="card-header">
- <view class="icon-badge">
- <text class="icon">🐛</text>
- </view>
- <text class="card-title">病虫害处理情况</text>
- </view>
- <view class="card-content">
- <view class="main-stats">
- <view class="stat-item">
- <text class="number">4/5</text>
- <text class="label">处理进度</text>
- </view>
- <view class="stat-item">
- <view class="progress-circle">
- <text class="progress-text">80%</text>
- </view>
- <text class="label">完成率</text>
- </view>
- </view>
- <view class="sub-info warning">
- <text class="emoji">⚠️</text>
- <text class="info-text">待处理:1个预警</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script setup>
- import { ref, computed, onMounted } from 'vue';
- // 用户数据
- const userData = ref({
- nickname: '张三',
- selectedPlot: '南地块'
- });
- // 地块选择
- const showPlotSelector = ref(false);
- const availablePlots = ref([
- { name: '南地块', id: 1 },
- { name: '西北区域', id: 2 },
- { name: '稻田', id: 3 },
- { name: '东区试验田', id: 4 },
- { name: '温室大棚', id: 5 }
- ]);
- // 农场数据
- const farmData = ref({
- plotCount: 5,
- deviceCount: 12,
- deviceOnlineRate: 85,
- taskCompletionRate: 76,
- recentActivities: [
- { title: '稻田水稻施肥', date: '2023-05-15', status: 'pending', id: 1, executor: '李四' },
- { title: '南地块除草', date: '2023-05-12', status: 'completed', id: 2, executor: '王五' },
- { title: '西北区域杀虫', date: '2023-05-08', status: 'completed', id: 3, executor: '张三' }
- ]
- });
- // 核心数据指标
- const coreStats = computed(() => [
- {
- label: '地块总数',
- value: farmData.value.plotCount,
- icon: 'map',
- bgColor: 'linear-gradient(135deg, #4CAF50, #2E7D32)'
- },
- {
- label: '设备数量',
- value: farmData.value.deviceCount,
- icon: 'setting',
- bgColor: 'linear-gradient(135deg, #42A5F5, #1976D2)'
- },
- {
- label: '设备在线率',
- value: farmData.value.deviceOnlineRate + '%',
- icon: 'wifi',
- bgColor: 'linear-gradient(135deg, #26C6DA, #00838F)'
- },
- {
- label: '农事完成率',
- value: farmData.value.taskCompletionRate + '%',
- icon: 'checkmark-circle',
- bgColor: 'linear-gradient(135deg, #66BB6A, #388E3C)'
- }
- ]);
- // 天气数据
- const weatherData = ref({
- temperature: 28,
- description: '晴朗',
- humidity: 65,
- windLevel: 3,
- rainfall: 0,
- advice: '今日适宜进行春玉米防虫作业,注意水分管理。'
- });
- // 统计数据
- const statsData = ref({
- operation: {
- workCount: 36,
- workArea: 128,
- mainCrops: ['小麦', '玉米']
- },
- machine: {
- totalHours: 172,
- mainEquipment: ['无人拖拉机', '播种机']
- },
- irrigation: {
- irrigationArea: 85,
- fertilizationCount: 12,
- waterUsage: 230
- },
- pest: {
- totalReports: 5,
- handled: 4,
- pending: 1
- }
- });
- // 方法
- const handleShowMap = () => {
- uni.navigateTo({
- url: '/pages/map/index'
- });
- };
- const navigateToProfile = () => {
- uni.navigateTo({
- url: '/pages/profile/index'
- });
- };
- const handleSwitchPlot = () => {
- showPlotSelector.value = true;
- };
- const selectPlot = (plot) => {
- userData.value.selectedPlot = plot.name;
- showPlotSelector.value = false;
-
- // 实际应用中,这里需要重新加载当前地块的数据
- uni.showToast({
- title: `已切换到${plot.name}`,
- icon: 'none'
- });
- };
- const navigateToActivity = (activity) => {
- uni.navigateTo({
- url: `/pages/activity/detail?id=${activity.id}`
- });
- };
- const navigateToAllActivities = () => {
- uni.navigateTo({
- url: '/pages/activity/list'
- });
- };
- // 获取统计数据
- const fetchStatsData = async () => {
- try {
- // 实际项目中替换为API调用
- // const response = await api.getStatsData();
- // statsData.value = response.data;
- console.log('统计数据加载成功');
- } catch (error) {
- console.error('获取统计数据失败', error);
- uni.showToast({
- title: '数据加载失败',
- icon: 'none'
- });
- }
- };
- // 页面加载
- onMounted(() => {
- fetchStatsData();
- });
- </script>
- <style lang="scss" scoped>
- .dashboard-container {
- padding: 30rpx 20rpx;
- background-color: #f8f9fa;
- min-height: 100vh;
- }
- // 顶部信息卡片
- .header-card {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx;
- background: linear-gradient(135deg, #4CAF50, #2E7D32);
- border-radius: 20rpx;
- margin-bottom: 24rpx;
- box-shadow: 0 8rpx 16rpx rgba(76, 175, 80, 0.2);
-
- .header-left {
- flex: 1;
- }
-
- .header-right {
- display: flex;
- align-items: center;
- }
-
- .user-avatar {
- width: 90rpx;
- height: 90rpx;
- border-radius: 50%;
- overflow: hidden;
- background-color: #ffffff;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
-
- .avatar-svg {
- width: 100%;
- height: 100%;
- }
- }
-
- .welcome-text {
- font-size: 38rpx;
- font-weight: bold;
- color: #ffffff;
- margin-bottom: 12rpx;
- }
-
- .plot-info {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
-
- .plot-label {
- font-size: 28rpx;
- color: rgba(255, 255, 255, 0.9);
- margin-right: 4rpx;
- }
-
- .plot-name {
- font-size: 28rpx;
- color: #ffffff;
- font-weight: 500;
- margin-right: 16rpx;
- }
-
- .switch-plot-btn {
- display: flex;
- align-items: center;
- background-color: rgba(255, 255, 255, 0.2);
- border-radius: 30rpx;
- padding: 4rpx 16rpx;
- margin-left: 8rpx;
-
- text {
- font-size: 24rpx;
- color: #ffffff;
- margin-left: 4rpx;
- }
- }
- }
- }
- // 核心数据指标网格
- .stats-grid {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 20rpx;
- margin-bottom: 24rpx;
-
- .stat-card {
- background-color: #ffffff;
- border-radius: 16rpx;
- padding: 24rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
-
- .stat-content {
- display: flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
-
- .stat-value {
- font-size: 40rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 10rpx;
- }
-
- .stat-label {
- font-size: 26rpx;
- color: #666;
- }
- }
- }
- }
- // 卡片通用样式
- .section-card {
- background-color: #ffffff;
- border-radius: 16rpx;
- box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
- margin-bottom: 24rpx;
- overflow: hidden;
-
- .card-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20rpx 24rpx;
- border-bottom: 1px solid #f0f0f0;
-
- .card-title {
- display: flex;
- align-items: center;
-
- .title-icon {
- display: flex;
- align-items: center;
- margin-right: 12rpx;
-
- .icon-dot {
- width: 12rpx;
- height: 12rpx;
- border-radius: 6rpx;
- background-color: #4CAF50;
- }
- }
-
- .title-text {
- font-size: 30rpx;
- font-weight: bold;
- color: #333;
- }
- }
-
- .more-link {
- display: flex;
- align-items: center;
-
- text {
- font-size: 24rpx;
- color: #4CAF50;
- margin-right: 6rpx;
- }
- }
- }
-
- .card-body {
- padding: 0;
- border: 1rpx solid rgba(76, 175, 80, 0.15);
- border-radius: 10rpx;
- overflow: hidden;
- box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.03);
-
- .activity-item:not(:last-child) {
- position: relative;
-
- &:after {
- content: '';
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- height: 1rpx;
- background-color: #f2f2f2;
- }
- }
- }
- }
- // 活动标题行
- .activity-header {
- display: flex;
- margin-bottom: 0;
- padding-bottom: 18rpx;
- padding-top: 18rpx;
- border-bottom: 1rpx solid rgba(76, 175, 80, 0.1);
- background-color: rgba(76, 175, 80, 0.07);
- border-radius: 8rpx 8rpx 0 0;
-
- .activity-header-right {
- flex: 1;
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .header-title {
- flex: 1.5;
- font-size: 28rpx;
- color: #4CAF50;
- font-weight: bold;
- padding-left: 30rpx;
- text-align: left;
- }
-
- .header-executor {
- font-size: 28rpx;
- color: #4CAF50;
- font-weight: bold;
- width: 180rpx;
- text-align: center;
- }
-
- .header-date {
- font-size: 28rpx;
- color: #4CAF50;
- font-weight: bold;
- min-width: 250rpx;
- text-align: center;
- margin-right: 20rpx;
- }
-
- .header-action {
- width: 36rpx;
- }
- }
- }
- // 农事活动列表
- .activity-item {
- display: flex;
- margin-bottom: 0;
- padding: 24rpx 0;
- border-bottom: 1rpx solid #f2f2f2;
- height: 60rpx;
-
- &:last-child {
- border-bottom-left-radius: 8rpx;
- border-bottom-right-radius: 8rpx;
- }
-
- .activity-right {
- flex: 1;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-bottom: 0;
- border-bottom: none;
- height: 100%;
-
- .activity-content {
- flex: 1.5;
- padding-left: 30rpx;
- height: 100%;
- display: flex;
- align-items: center;
-
- .activity-title {
- font-size: 28rpx;
- color: #333;
- font-weight: 500;
- text-align: left;
- line-height: 1.4;
- }
- }
-
- .activity-executor {
- font-size: 28rpx;
- color: #666;
- width: 180rpx;
- text-align: center;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .activity-date {
- font-size: 28rpx;
- color: #999;
- text-align: center;
- margin-right: 20rpx;
- min-width: 250rpx;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .activity-action {
- width: 36rpx;
- }
- }
- }
- // 天气卡片
- .weather-card {
- .card-body {
- padding: 0;
- background: #ffffff;
- border-radius: 12rpx;
- overflow: hidden;
- }
- .weather-main {
- padding: 30rpx;
- }
- .weather-top {
- display: flex;
- margin-bottom: 0;
- }
- .weather-left {
- display: flex;
- align-items: flex-start;
- gap: 20rpx;
- }
- .weather-icon-large {
- width: 48rpx;
- height: 48rpx;
- margin-top: 6rpx;
- flex-shrink: 0;
- }
- .weather-info {
- .temp-row {
- display: flex;
- align-items: center;
- gap: 16rpx;
-
- .temp-display {
- display: flex;
- align-items: flex-start;
-
- .weather-temp {
- font-size: 48rpx;
- font-weight: 500;
- color: #333;
- line-height: 1;
- }
-
- .temp-unit {
- font-size: 24rpx;
- color: #666;
- margin-top: 6rpx;
- margin-left: 2rpx;
- }
- }
-
- .weather-desc {
- font-size: 28rpx;
- color: #666;
- margin-top: 4rpx;
- }
- }
- }
- .weather-advice {
- background: #F8FFF9;
- border: 2rpx solid rgba(76, 175, 80, 0.15);
- border-radius: 12rpx;
- padding: 24rpx;
- margin-top: 24rpx;
-
- .advice-header {
- display: flex;
- align-items: center;
- gap: 8rpx;
- margin-bottom: 12rpx;
-
- .advice-title {
- font-size: 28rpx;
- color: #4CAF50;
- font-weight: 500;
- }
- }
-
- .advice-content {
- font-size: 26rpx;
- color: #333;
- line-height: 1.5;
- }
- }
- }
- .weather-metrics {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20rpx 30rpx;
- border-top: 2rpx solid #f5f5f5;
-
- .metric-item {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .metric-label {
- font-size: 24rpx;
- color: #999;
- margin-bottom: 8rpx;
- }
-
- .metric-value {
- font-size: 28rpx;
- color: #333;
- font-weight: 500;
- }
- }
- .metric-divider {
- width: 2rpx;
- height: 40rpx;
- background: #f0f0f0;
- margin: 0 20rpx;
- }
- }
- @keyframes rotate {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
- }
- @keyframes float {
- 0%, 100% {
- transform: translateY(0);
- }
- 50% {
- transform: translateY(-6rpx);
- }
- }
- @keyframes rainDrop {
- 0%, 100% {
- transform: translateY(0);
- }
- 50% {
- transform: translateY(2rpx);
- }
- }
- // 地块选择弹出层
- .plot-selector {
- background-color: #ffffff;
- border-radius: 24rpx 24rpx 0 0;
- overflow: hidden;
-
- .plot-selector-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
-
- .plot-selector-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- }
- }
-
- .plot-selector-body {
- max-height: 60vh;
- overflow-y: auto;
- padding: 0 30rpx;
-
- .plot-selector-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
-
- &:last-child {
- border-bottom: none;
- }
-
- &.active {
- .plot-name {
- color: #4CAF50;
- font-weight: bold;
- }
- }
-
- .plot-name {
- font-size: 30rpx;
- color: #333;
- }
- }
- }
- }
- .stats-section {
- margin: 40rpx 32rpx;
-
- .stats-grid {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 40rpx 32rpx;
- }
- .stat-card {
- background: #FAFAFA;
- border-radius: 24rpx;
- padding: 32rpx;
- box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.04);
- min-height: 320rpx;
- display: flex;
- flex-direction: column;
- transition: all 0.3s ease;
- &:hover {
- transform: translateY(-2rpx);
- box-shadow: 0 12rpx 48rpx rgba(0, 0, 0, 0.08);
- }
- .card-header {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 32rpx;
- gap: 16rpx;
-
- .icon-badge {
- width: 48rpx;
- height: 48rpx;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- background: linear-gradient(135deg, var(--primary-color, #4CAF50), var(--primary-dark, #2E7D32));
- box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
-
- .icon {
- font-size: 24rpx;
- }
- }
-
- .card-title {
- font-size: 32rpx;
- color: #333;
- font-weight: 600;
- }
- }
- .card-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
-
- .main-stats {
- display: flex;
- justify-content: space-around;
- gap: 24rpx;
- margin-bottom: 32rpx;
-
- .stat-item {
- flex: 1;
- text-align: center;
-
- .number {
- font-size: 48rpx;
- font-weight: 600;
- color: #333;
- line-height: 1.5;
- display: block;
- animation: numberChange 0.5s ease-out;
- }
-
- .label {
- font-size: 24rpx;
- color: #999;
- line-height: 1.5;
- display: block;
- margin-top: 8rpx;
- }
- .progress-circle {
- width: 96rpx;
- height: 96rpx;
- margin: 0 auto;
- border-radius: 50%;
- background: conic-gradient(
- var(--primary-color, #4CAF50) 80%,
- #f0f0f0 80%
- );
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- &::after {
- content: '';
- position: absolute;
- width: 80rpx;
- height: 80rpx;
- background: #FAFAFA;
- border-radius: 50%;
- }
- .progress-text {
- font-size: 28rpx;
- font-weight: 600;
- color: #333;
- z-index: 1;
- }
- }
- }
- }
- .sub-info {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8rpx;
- padding: 16rpx;
- background: rgba(0, 0, 0, 0.02);
- border-radius: 12rpx;
-
- .emoji {
- font-size: 28rpx;
- }
-
- .info-text {
- font-size: 24rpx;
- color: #666;
- line-height: 1.5;
- }
- &.warning {
- background: rgba(255, 167, 38, 0.1);
- .info-text {
- color: #F57C00;
- }
- }
- }
- }
- }
- }
- @keyframes numberChange {
- from {
- opacity: 0;
- transform: translateY(10rpx);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- </style>
|