|
|
@@ -6,10 +6,10 @@
|
|
|
<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi"></image>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- 设备名称:{{equipInfo.device_name}}
|
|
|
+ 设备名称:{{equipInfo.device_name==""?"无":equipInfo.device_name}}
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- 设备类型:{{equipInfo.type|equipType}}{{equipInfo.type_name}}
|
|
|
+ 设备类型:<span v-if="equipInfo.type">{{equipInfo.type|equipType}}</span><span v-else>{{equipInfo.type_name}}</span>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
最新上报时间:{{equipInfo.addtime||equipInfo.uptime | timeFormat}}
|
|
|
@@ -27,16 +27,16 @@
|
|
|
</view>
|
|
|
<u-popup v-model="setTimeShow" mode="center" width="600rpx">
|
|
|
<u-field label="载玻片更换时间" placeholder="选择日期" label-width='240' required :error-message="glassErr" v-model="glass_slide_time"
|
|
|
- @click="glass_show=true" :field-style="fieldstyle">
|
|
|
+ @click="glass_show=true" :field-style="fieldstyle" disabled>
|
|
|
</u-field>
|
|
|
<u-field label="培养液更换时间" placeholder="选择日期" label-width='240' required :error-message="culErr" v-model="cultivate_time"
|
|
|
- @click="cultivate_show=true" :field-style="fieldstyle">
|
|
|
+ @click="cultivate_show=true" :field-style="fieldstyle" disabled>
|
|
|
</u-field>
|
|
|
<view class="btn-box">
|
|
|
<u-button @click="setTimeSubmit" size="mini" type="success">确定</u-button>
|
|
|
</view>
|
|
|
- <u-calendar v-model="glass_show" mode="date" @change="timeChange($event,'glass')"></u-calendar>
|
|
|
- <u-calendar v-model="cultivate_show" mode="date" @change="timeChange($event,'cultivate')"></u-calendar>
|
|
|
+ <u-calendar v-model="glass_show" mode="date" :max-date="date" @change="timeChange($event,'glass')"></u-calendar>
|
|
|
+ <u-calendar v-model="cultivate_show" mode="date" :max-date="date" @change="timeChange($event,'cultivate')"></u-calendar>
|
|
|
</u-popup>
|
|
|
<u-popup v-model="yxShow" mode="center" width="600rpx">
|
|
|
<u-field label="监测害虫名称" label-width='240' required :error-message="xyErr" v-model="decoy" :field-style="fieldstyle">
|
|
|
@@ -210,6 +210,7 @@
|
|
|
xyErr: '',
|
|
|
decoy: '',
|
|
|
newtishitf:false,
|
|
|
+ date:""//最大可选时间
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -264,11 +265,11 @@
|
|
|
}, {
|
|
|
icon: '/image/cb/icon08.png',
|
|
|
txt: '环境温度(℃)',
|
|
|
- value: this.newState.at=="2.5"||this.newState.at=="25"||this.newState.at==""?this.newState.new_tem:this.newState.at
|
|
|
+ value: this.newState.at=="2.5"||this.newState.at=="25.0"||this.newState.at==""||this.newState.at=="25"?this.newState.new_tem:this.newState.at
|
|
|
}, {
|
|
|
icon: '/image/cb/icon07.png',
|
|
|
txt: '环境湿度(%)',
|
|
|
- value:this.newState.ah=="30"||this.newState.ah=="3.0"||this.newState.ah==""?this.newState.new_hum:this.newState.ah
|
|
|
+ value:this.newState.ah=="30.0"||this.newState.ah=="30.0"||this.newState.ah==""||this.newState.ah=="30"?this.newState.new_hum:this.newState.ah
|
|
|
}, {
|
|
|
icon: '/image/cb/icon16.png',
|
|
|
txt: '信号强度',
|
|
|
@@ -327,11 +328,11 @@
|
|
|
}, {
|
|
|
icon: '/image/cb/icon08.png',
|
|
|
txt: '环境温度(℃)',
|
|
|
- value: this.newState.at=="2.5"||this.newState.at=="25"||this.newState.at==""?this.newState.new_tem:this.newState.at
|
|
|
+ value: this.newState.at=="2.5"||this.newState.at=="25"||this.newState.at==""||this.newState.at=="25.0"?this.newState.new_tem:this.newState.at
|
|
|
}, {
|
|
|
icon: '/image/prevention/66.png',
|
|
|
txt: '环境湿度(%)',
|
|
|
- value:this.newState.ah=="30"||this.newState.ah=="3.0"||this.newState.ah==""?this.newState.new_hum:this.newState.ah
|
|
|
+ value:this.newState.ah=="30"||this.newState.ah=="3.0"||this.newState.ah==""||this.newState.ah=="30.0"?this.newState.new_hum:this.newState.ah
|
|
|
}, {
|
|
|
icon: '/image/cb/icon16.png',
|
|
|
txt: '信号强度',
|
|
|
@@ -378,12 +379,12 @@
|
|
|
{
|
|
|
icon: '/image/cb/icon08.png',
|
|
|
txt: '环境温度(℃)',
|
|
|
- value: this.newState.at=="2.5"||this.newState.at=="25"||this.newState.at==""?this.newState.new_tem:this.newState.at
|
|
|
+ value: this.newState.at=="2.5"||this.newState.at=="25"||this.newState.at==""||this.newState.at=="25.0"?this.newState.new_tem:this.newState.at
|
|
|
},
|
|
|
{
|
|
|
icon: '/image/cb/icon07.png',
|
|
|
txt: '环境湿度(%)',
|
|
|
- value:this.newState.ah=="30"||this.newState.ah=="3.0"||this.newState.ah==""?this.newState.new_hum:this.newState.ah
|
|
|
+ value:this.newState.ah=="30"||this.newState.ah=="3.0"||this.newState.ah==""||this.newState.ah=="30.0"?this.newState.new_hum:this.newState.ah
|
|
|
},
|
|
|
{
|
|
|
icon: '/image/prevention/105.png',
|
|
|
@@ -447,12 +448,14 @@
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
this.equipInfo = JSON.parse(option.info)
|
|
|
- this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type)
|
|
|
+ this.type = Number(this.equipInfo.type) || Number(this.equipInfo.equip_type)|| Number(this.equipInfo.device_type_id)
|
|
|
+ this.equipInfo.type = this.type
|
|
|
this.device_status = this.equipInfo.is_online
|
|
|
this.getState()
|
|
|
console.log(this.equipInfo)
|
|
|
- this.selectaddress(this.lat,this.lng)
|
|
|
-
|
|
|
+ this.selectaddress(Number(this.equipInfo.lat),Number(this.equipInfo.lng))
|
|
|
+ var times = new Date()
|
|
|
+ this.date = times.getFullYear()+1 + "-" + Number(times.getMonth()+1) + "-" + times.getDate()
|
|
|
uni.getStorage({
|
|
|
key:"jurisdiction",
|
|
|
success:(res)=>{
|
|
|
@@ -533,7 +536,7 @@
|
|
|
const res = await this.$myRequest({
|
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
|
|
|
data: {
|
|
|
- device_type_id: this.equipInfo.type || this.equipInfo.equip_type,
|
|
|
+ device_type_id: this.equipInfo.type || this.equipInfo.equip_type || this.equipInfo.device_type_id,
|
|
|
device_id: this.equipInfo.imei || this.equipInfo.device_id,
|
|
|
page: 1,
|
|
|
page_size: 1,
|
|
|
@@ -650,13 +653,15 @@
|
|
|
},
|
|
|
selectaddress(lat,lng) { //获取分布位置
|
|
|
uni.request({
|
|
|
- url: '/dpc/ws/geocoder/v1/?location='+lat+","+lng+"&key=B2EBZ-2UW6P-RDJDG-LCMLE-AIQUS-CGFMJ",
|
|
|
- success: (res) => {
|
|
|
- if(res==0){
|
|
|
- this.city = res.data.result.address
|
|
|
- }
|
|
|
+ type: "GET",
|
|
|
+ url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
|
|
|
+ "&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
|
|
|
+ dataType: "json",
|
|
|
+ complete: ress => {
|
|
|
+ console.log(ress)
|
|
|
+ this.city = ress.data.regeocode.formatted_address
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
copy(item){
|
|
|
console.log(item)
|
|
|
@@ -797,4 +802,11 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ /deep/.u-calendar__action{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ .u-calendar__action__text{
|
|
|
+ line-height: 25px;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|