|
@@ -3,7 +3,7 @@
|
|
|
<view class="ui-card px-13">
|
|
<view class="ui-card px-13">
|
|
|
<!-- 选项框 -->
|
|
<!-- 选项框 -->
|
|
|
<view class="row-end mb">
|
|
<view class="row-end mb">
|
|
|
- <picker mode='date' fields='year' @chagne="changePestDate" class="picker mr">
|
|
|
|
|
|
|
+ <picker mode="date" fields="year" @change="changePestDate" class="picker mr">
|
|
|
<view class="picker-wrapper">
|
|
<view class="picker-wrapper">
|
|
|
<view>{{pestDate}}</view>
|
|
<view>{{pestDate}}</view>
|
|
|
<uni-icons type="bottom" :size="12" color="#DDDDDD"></uni-icons>
|
|
<uni-icons type="bottom" :size="12" color="#DDDDDD"></uni-icons>
|
|
@@ -18,19 +18,19 @@
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 时期列表 -->
|
|
<!-- 时期列表 -->
|
|
|
<view class="period-navs" v-if="pestInfo[pestItem]">
|
|
<view class="period-navs" v-if="pestInfo[pestItem]">
|
|
|
- <view class="period-item">
|
|
|
|
|
|
|
+ <view class="period-item start-time">
|
|
|
<view class="icon"></view>
|
|
<view class="icon"></view>
|
|
|
<view class="title">始见期</view>
|
|
<view class="title">始见期</view>
|
|
|
<view class="text">{{pestInfo[pestItem].startTime}}</view>
|
|
<view class="text">{{pestInfo[pestItem].startTime}}</view>
|
|
|
<view class="text"></view>
|
|
<view class="text"></view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="period-item">
|
|
|
|
|
|
|
+ <view class="period-item high-time">
|
|
|
<view class="icon"></view>
|
|
<view class="icon"></view>
|
|
|
<view class="title">高峰期</view>
|
|
<view class="title">高峰期</view>
|
|
|
<view class="text">{{pestInfo[pestItem].highTime}}</view>
|
|
<view class="text">{{pestInfo[pestItem].highTime}}</view>
|
|
|
<view class="text">数量:{{pestInfo[pestItem].highNum}}</view>
|
|
<view class="text">数量:{{pestInfo[pestItem].highNum}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="period-item">
|
|
|
|
|
|
|
+ <view class="period-item end-time">
|
|
|
<view class="icon"></view>
|
|
<view class="icon"></view>
|
|
|
<view class="title">终见期</view>
|
|
<view class="title">终见期</view>
|
|
|
<view class="text">{{pestInfo[pestItem].endTime}}</view>
|
|
<view class="text">{{pestInfo[pestItem].endTime}}</view>
|
|
@@ -44,16 +44,17 @@
|
|
|
/**
|
|
/**
|
|
|
* 虫害始见期数据卡片
|
|
* 虫害始见期数据卡片
|
|
|
*/
|
|
*/
|
|
|
|
|
+ import {
|
|
|
|
|
+ getPestRaiseInfo
|
|
|
|
|
+ } from '@/api/worm.js'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'w-raise-card',
|
|
name: 'w-raise-card',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- //始见期选项
|
|
|
|
|
pestList: [], //始见期选项
|
|
pestList: [], //始见期选项
|
|
|
pestInfo: {},
|
|
pestInfo: {},
|
|
|
pestDate: (new Date()).getUTCFullYear(),
|
|
pestDate: (new Date()).getUTCFullYear(),
|
|
|
pestItem: '',
|
|
pestItem: '',
|
|
|
- //始见期选项 end
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
@@ -71,13 +72,15 @@
|
|
|
year: this.pestDate,
|
|
year: this.pestDate,
|
|
|
d_ids: this.deviceId,
|
|
d_ids: this.deviceId,
|
|
|
});
|
|
});
|
|
|
- console.log(res);
|
|
|
|
|
this.pestList = res.pest_list; //始见期选项
|
|
this.pestList = res.pest_list; //始见期选项
|
|
|
this.pestInfo = res.pest_info;
|
|
this.pestInfo = res.pest_info;
|
|
|
this.pestItem = this.pestList[0];
|
|
this.pestItem = this.pestList[0];
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ // 选择年份
|
|
|
changePestDate(e) {
|
|
changePestDate(e) {
|
|
|
- console.log(e);
|
|
|
|
|
|
|
+ this.pestDate=e.detail.value;
|
|
|
|
|
+ this.getPestRaiseInfo();
|
|
|
},
|
|
},
|
|
|
// 选择始见期类型
|
|
// 选择始见期类型
|
|
|
changePestList(e) {
|
|
changePestList(e) {
|
|
@@ -93,28 +96,29 @@
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.period-item {
|
|
.period-item {
|
|
|
- width: 206rpx;
|
|
|
|
|
|
|
+ width: 200rpx;
|
|
|
height: 264rpx;
|
|
height: 264rpx;
|
|
|
- padding: 24rpx;
|
|
|
|
|
- background-color: #FCF8FF;
|
|
|
|
|
-
|
|
|
|
|
- .icon {
|
|
|
|
|
- width: 80rpx;
|
|
|
|
|
- height: 80rpx;
|
|
|
|
|
- margin-bottom: 18rpx;
|
|
|
|
|
- background-color: #95F9E7;
|
|
|
|
|
- border-radius: 100%;
|
|
|
|
|
|
|
+ padding: 122rpx 24rpx 24rpx;
|
|
|
|
|
+ background: url('/static/img/startTime.png') center center no-repeat;
|
|
|
|
|
+ background-size: 200rpx 264rpx;
|
|
|
|
|
+
|
|
|
|
|
+ &.high-time {
|
|
|
|
|
+ background-image: url('/static/img/highTime.png');
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ &.end-time {
|
|
|
|
|
+ background-image: url('/static/img/endTime.png');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.title {
|
|
.title {
|
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
|
font-weight: normal;
|
|
font-weight: normal;
|
|
|
color: #333333;
|
|
color: #333333;
|
|
|
line-height: 44rpx;
|
|
line-height: 44rpx;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.text {
|
|
.text {
|
|
|
margin-top: 10rpx;
|
|
margin-top: 10rpx;
|
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
@@ -122,6 +126,6 @@
|
|
|
color: #999999;
|
|
color: #999999;
|
|
|
line-height: 34rpx;
|
|
line-height: 34rpx;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|