|
@@ -2,15 +2,15 @@
|
|
|
<view class="anabox">
|
|
<view class="anabox">
|
|
|
<view class="timebox">
|
|
<view class="timebox">
|
|
|
<view class="schedulebox">
|
|
<view class="schedulebox">
|
|
|
- <view class="schedule" @click="modelPicker=!modelPicker">
|
|
|
|
|
|
|
+ <!-- <view class="schedule" @click="modelPicker=!modelPicker">
|
|
|
<p class="schedule_value">{{modelList[identify_model].label}}</p>
|
|
<p class="schedule_value">{{modelList[identify_model].label}}</p>
|
|
|
- <!-- {{titletext[indexone]}} -->
|
|
|
|
|
|
|
+ {{titletext[indexone]}}
|
|
|
<p class="schedule_icon">
|
|
<p class="schedule_icon">
|
|
|
<u-icon name="arrow-down"></u-icon>
|
|
<u-icon name="arrow-down"></u-icon>
|
|
|
</p>
|
|
</p>
|
|
|
- </view>
|
|
|
|
|
- <u-select v-model="modelPicker" mode="single-column" @confirm="confirmModel" :default-value="[identify_model]"
|
|
|
|
|
- :list="modelList"></u-select>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <!-- <u-select v-model="modelPicker" mode="single-column" @confirm="confirmModel" :default-value="[identify_model]"
|
|
|
|
|
+ :list="modelList"></u-select> -->
|
|
|
<view class="schedule" @click="pickertfone=!pickertfone">
|
|
<view class="schedule" @click="pickertfone=!pickertfone">
|
|
|
<p class="schedule_value">{{yservalue}}</p>
|
|
<p class="schedule_value">{{yservalue}}</p>
|
|
|
<!-- {{titletext[indexone]}} -->
|
|
<!-- {{titletext[indexone]}} -->
|
|
@@ -66,23 +66,29 @@
|
|
|
<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange"
|
|
<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange"
|
|
|
:default-value="defaultValue"></u-select>
|
|
:default-value="defaultValue"></u-select>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view >
|
|
|
<view class="tendency">
|
|
<view class="tendency">
|
|
|
- <canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts" @touchstart="touchLineA($event)"
|
|
|
|
|
|
|
+ <canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts" @touchstart="touchLineA($event)"
|
|
|
@touchmove="moveLineA($event)" @touchend="touchEndLineA($event)" disable-scroll=true
|
|
@touchmove="moveLineA($event)" @touchend="touchEndLineA($event)" disable-scroll=true
|
|
|
:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
|
|
:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tendency">
|
|
|
|
|
- <canvas canvas-id="canvasRing" id="canvasRing" class="charts" @touchstart="touchRing"
|
|
|
|
|
|
|
+ <view class="tendency">
|
|
|
|
|
+ <canvas v-if="progresslist.length>0" canvas-id="canvasRing" id="canvasRing" class="charts" @touchstart="touchRing"
|
|
|
:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
|
|
:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
|
|
|
|
|
+ <view class="" v-else style="margin-top: 20px;">
|
|
|
|
|
+ 暂无虫情排名信息
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tendency_pro">
|
|
<view class="tendency_pro">
|
|
|
<view class="" v-for="(item,index) in progresslist">
|
|
<view class="" v-for="(item,index) in progresslist">
|
|
|
- <span>{{index+1}}、{{item.name}}</span>
|
|
|
|
|
|
|
+ <span>{{index+1}}.{{item.name}}</span>
|
|
|
<u-line-progress :active-color="colorlist[index%6]"
|
|
<u-line-progress :active-color="colorlist[index%6]"
|
|
|
:percent="Number((item.data/pestsum*100).toFixed(2))" :show-percent="false"></u-line-progress>
|
|
:percent="Number((item.data/pestsum*100).toFixed(2))" :show-percent="false"></u-line-progress>
|
|
|
- <span>{{Number((item.data/pestsum*100).toFixed(2))}}%</span>
|
|
|
|
|
|
|
+ <span>{{item.data}}</span>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
<view class="tablebox">
|
|
<view class="tablebox">
|
|
|
<view class="top_text">
|
|
<view class="top_text">
|
|
|
<view :class="topindex==index?'title_text_color':'tltle_text'" v-for="(item,index) in toptext"
|
|
<view :class="topindex==index?'title_text_color':'tltle_text'" v-for="(item,index) in toptext"
|
|
@@ -103,10 +109,10 @@
|
|
|
<td class="td" @click="wormdetails(items.pest_dict)">{{items.pestName}}</td>
|
|
<td class="td" @click="wormdetails(items.pest_dict)">{{items.pestName}}</td>
|
|
|
<td class="td">{{items.addtime|timeFormat()}}</td>
|
|
<td class="td">{{items.addtime|timeFormat()}}</td>
|
|
|
<td class="td">{{items.location}}</td>
|
|
<td class="td">{{items.location}}</td>
|
|
|
- <td class="td" @click="examine(items.indentify_photo)">查看</td>
|
|
|
|
|
|
|
+
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="tr" v-if="forbidden1">
|
|
<tr class="tr" v-if="forbidden1">
|
|
|
- <td class="td" v-for="item in 6">暂无数据</td>
|
|
|
|
|
|
|
+ <td class="td" v-for="item in thdata.length">暂无数据</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
|
<table class="table2" v-else>
|
|
<table class="table2" v-else>
|
|
@@ -119,7 +125,7 @@
|
|
|
<td class="td">{{items.addtime|timeFormat()}}</td>
|
|
<td class="td">{{items.addtime|timeFormat()}}</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="tr" v-if="forbidden2">
|
|
<tr class="tr" v-if="forbidden2">
|
|
|
- <td class="td" v-for="item in 6">暂无数据</td>
|
|
|
|
|
|
|
+ <td class="td" v-for="item in thdata2.length">暂无数据</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -393,7 +399,7 @@
|
|
|
pagesum: 1,
|
|
pagesum: 1,
|
|
|
eqlistdata: [],
|
|
eqlistdata: [],
|
|
|
thdata: [
|
|
thdata: [
|
|
|
- "设备ID", "设备名称", "害虫名称", "上报时间", "设备位置", "图像"
|
|
|
|
|
|
|
+ "设备ID", "设备名称", "害虫名称", "上报时间", "设备位置"
|
|
|
],
|
|
],
|
|
|
thdata2: [
|
|
thdata2: [
|
|
|
"害虫名称", "害虫数量", "上报时间"
|
|
"害虫名称", "害虫数量", "上报时间"
|
|
@@ -433,7 +439,7 @@
|
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.pest_raise_info',
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.pest_raise_info',
|
|
|
data: {
|
|
data: {
|
|
|
d_ids: this.d_id,
|
|
d_ids: this.d_id,
|
|
|
- device_type:34,
|
|
|
|
|
|
|
+ device_type:this.device_type,
|
|
|
year: this.yservalue,
|
|
year: this.yservalue,
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -444,6 +450,13 @@
|
|
|
this.wormindex = 0
|
|
this.wormindex = 0
|
|
|
if (this.wormvalue) {
|
|
if (this.wormvalue) {
|
|
|
this.timeobj = this.wormtimelist[this.wormvalue]
|
|
this.timeobj = this.wormtimelist[this.wormvalue]
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.timeobj = {
|
|
|
|
|
+ endTime: "--",
|
|
|
|
|
+ highNum: "--",
|
|
|
|
|
+ highTime: "--",
|
|
|
|
|
+ startTime: "--",
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.getwormline()
|
|
this.getwormline()
|
|
@@ -457,9 +470,16 @@
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
confirmFun(e) {
|
|
confirmFun(e) {
|
|
|
- console.log(e)
|
|
|
|
|
|
|
+ console.log(e,this.newtime,this.oldtime)
|
|
|
|
|
+ // this.newtime = e.endDate;
|
|
|
|
|
+ // this.oldtime = e.startDate;
|
|
|
this.yserindex = e[0]
|
|
this.yserindex = e[0]
|
|
|
this.yservalue = this.yearlist[e[0]]
|
|
this.yservalue = this.yearlist[e[0]]
|
|
|
|
|
+
|
|
|
|
|
+ this.newtime = this.yservalue+this.newtime.substring(4);
|
|
|
|
|
+ this.oldtime = this.yservalue+this.oldtime.substring(4);
|
|
|
|
|
+ console.log(e,this.newtime,this.oldtime,this.yservalue)
|
|
|
|
|
+ // this.oldtime = e.startDate;
|
|
|
this.getwormtime()
|
|
this.getwormtime()
|
|
|
},
|
|
},
|
|
|
confirmFun2(e) {
|
|
confirmFun2(e) {
|
|
@@ -471,15 +491,15 @@
|
|
|
},
|
|
},
|
|
|
async getwormline() {
|
|
async getwormline() {
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
- url: '/api/api_gateway?method=forecast.worm_lamp.pest_statistics_char_new',
|
|
|
|
|
|
|
+ url: '/api/api_gateway?method=new_gateway.photo_info.pest_order_and_char',
|
|
|
data: {
|
|
data: {
|
|
|
- d_ids: this.d_id,
|
|
|
|
|
- identify_model: this.modelList[this.identify_model].value,
|
|
|
|
|
- start_time: this.oldtime,
|
|
|
|
|
- end_time: this.newtime,
|
|
|
|
|
- sp_hour_st: this.sp_hour_st,
|
|
|
|
|
- sp_hour_ed: this.sp_hour_ed,
|
|
|
|
|
- amend:1
|
|
|
|
|
|
|
+ id: this.d_id,
|
|
|
|
|
+ device_type_id: this.device_type,
|
|
|
|
|
+ start: new Date(this.oldtime+' 00:00:00').getTime()/1000 ,
|
|
|
|
|
+ end: new Date(this.newtime+' 23:59:59').getTime()/1000 ,
|
|
|
|
|
+ hour_st: this.sp_hour_st,
|
|
|
|
|
+ hour_ed: this.sp_hour_ed
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
// console.log(res)
|
|
// console.log(res)
|
|
@@ -517,8 +537,8 @@
|
|
|
var ringarr2 = ringarr.slice(ringarr.length - 5)
|
|
var ringarr2 = ringarr.slice(ringarr.length - 5)
|
|
|
ringarr2.unshift(sumobj)
|
|
ringarr2.unshift(sumobj)
|
|
|
// console.log(ringarr2)
|
|
// console.log(ringarr2)
|
|
|
- this.showRing(ringarr2)
|
|
|
|
|
- console.log(ringarr)
|
|
|
|
|
|
|
+ this.showRing(ringarr)
|
|
|
|
|
+ console.log(ringarr,ringarr2)
|
|
|
this.progresslist = ringarr
|
|
this.progresslist = ringarr
|
|
|
},
|
|
},
|
|
|
// 根据起始日期获取中间时间列表
|
|
// 根据起始日期获取中间时间列表
|
|
@@ -557,10 +577,20 @@
|
|
|
atLowarr[index] = item.low
|
|
atLowarr[index] = item.low
|
|
|
aharr[index] = item.ah
|
|
aharr[index] = item.ah
|
|
|
})
|
|
})
|
|
|
- res.char_data[this.wormvalue] && res.char_data[this.wormvalue].forEach(pest => {
|
|
|
|
|
- let index = xtitle.indexOf(this.formatMonthDay(pest.addtime));
|
|
|
|
|
- pestArr[index] = pest.sum
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(res.char_data[this.wormvalue]){
|
|
|
|
|
+ xtitle = []
|
|
|
|
|
+ pestArr = []
|
|
|
|
|
+ res.char_data[this.wormvalue].forEach(pest => {
|
|
|
|
|
+ let index = xtitle.indexOf(this.formatMonthDay(pest.addtime));
|
|
|
|
|
+ xtitle.push(this.formatTime(pest.addtime*1000,'MM-dd'))
|
|
|
|
|
+ pestArr.push( pest.sum)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ // res.char_data[this.wormvalue] && res.char_data[this.wormvalue].forEach(pest => {
|
|
|
|
|
+ // let index = xtitle.indexOf(this.formatMonthDay(pest.addtime));
|
|
|
|
|
+ // xtitle.push(this.formatTime(pest.addtime,'MM-dd'))
|
|
|
|
|
+ // pestArr[index] = pest.sum
|
|
|
|
|
+ // })
|
|
|
|
|
|
|
|
var atHighobj = {
|
|
var atHighobj = {
|
|
|
name: '高温',
|
|
name: '高温',
|
|
@@ -582,9 +612,9 @@
|
|
|
data: pestArr,
|
|
data: pestArr,
|
|
|
color: '#FA73F5'
|
|
color: '#FA73F5'
|
|
|
}
|
|
}
|
|
|
- obj.push(atHighobj)
|
|
|
|
|
- obj.push(atlowobj)
|
|
|
|
|
- obj.push(ahobj)
|
|
|
|
|
|
|
+ // obj.push(atHighobj)
|
|
|
|
|
+ // obj.push(atlowobj)
|
|
|
|
|
+ // obj.push(ahobj)
|
|
|
obj.push(pestObj)
|
|
obj.push(pestObj)
|
|
|
console.log(xtitle, 'xtitle',obj)
|
|
console.log(xtitle, 'xtitle',obj)
|
|
|
this.showColumn("canvasColumnA", xtitle, obj)
|
|
this.showColumn("canvasColumnA", xtitle, obj)
|
|
@@ -597,8 +627,6 @@
|
|
|
},
|
|
},
|
|
|
tiemchange(e) {
|
|
tiemchange(e) {
|
|
|
console.log(e)
|
|
console.log(e)
|
|
|
- // this.oldtime = +new Date(e.startDate) / 1000 - 8 * 60 * 60
|
|
|
|
|
- // this.newtime = +new Date(e.endDate) / 1000 + 16 * 60 * 60 - 1
|
|
|
|
|
this.newtime = e.endDate;
|
|
this.newtime = e.endDate;
|
|
|
this.oldtime = e.startDate;
|
|
this.oldtime = e.startDate;
|
|
|
// newtime: "",
|
|
// newtime: "",
|
|
@@ -690,7 +718,7 @@
|
|
|
type: 'ring',
|
|
type: 'ring',
|
|
|
fontSize: 11,
|
|
fontSize: 11,
|
|
|
legend: {
|
|
legend: {
|
|
|
- show: true,
|
|
|
|
|
|
|
+ show: false,
|
|
|
},
|
|
},
|
|
|
extra: {
|
|
extra: {
|
|
|
ring: {
|
|
ring: {
|
|
@@ -722,14 +750,14 @@
|
|
|
},
|
|
},
|
|
|
async gettabledata() {
|
|
async gettabledata() {
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
- url: '/api/api_gateway?method=forecast.worm_lamp.pest_image_source',
|
|
|
|
|
|
|
+ url: '/api/api_gateway?method=new_gateway.analysis.pest_image_source',
|
|
|
data: {
|
|
data: {
|
|
|
- d_ids: this.d_id,
|
|
|
|
|
- identify_model: this.modelList[this.identify_model].value,
|
|
|
|
|
- start_time: this.oldtime,
|
|
|
|
|
- end_time: this.newtime,
|
|
|
|
|
- sp_hour_st: this.sp_hour_st,
|
|
|
|
|
- sp_hour_ed: this.sp_hour_ed,
|
|
|
|
|
|
|
+ id: this.d_id,
|
|
|
|
|
+ device_type_id:this.device_type,
|
|
|
|
|
+ start: new Date(this.oldtime+' 00:00:00').getTime()/1000 ,
|
|
|
|
|
+ end: new Date(this.newtime+' 23:59:59').getTime()/1000 ,
|
|
|
|
|
+ hour_st: this.sp_hour_st,
|
|
|
|
|
+ hour_ed: this.sp_hour_ed,
|
|
|
page: this.page
|
|
page: this.page
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -744,12 +772,14 @@
|
|
|
},
|
|
},
|
|
|
async gettabledata2() {
|
|
async gettabledata2() {
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
- url: '/api/api_gateway?method=forecast.worm_lamp.pest_base_data',
|
|
|
|
|
|
|
+ url: '/api/api_gateway?method=new_gateway.analysis.new_pest_base_data',
|
|
|
data: {
|
|
data: {
|
|
|
- d_ids: this.d_id,
|
|
|
|
|
- identify_model: this.modelList[this.identify_model].value,
|
|
|
|
|
- start_time: this.oldtime,
|
|
|
|
|
- end_time: this.newtime,
|
|
|
|
|
|
|
+ id: this.d_id,
|
|
|
|
|
+ device_type_id:this.device_type,
|
|
|
|
|
+ start: new Date(this.oldtime+' 00:00:00').getTime()/1000 ,
|
|
|
|
|
+ end: new Date(this.newtime+' 23:59:59').getTime()/1000 ,
|
|
|
|
|
+ hour_st: this.sp_hour_st,
|
|
|
|
|
+ hour_ed: this.sp_hour_ed,
|
|
|
page: this.page
|
|
page: this.page
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -914,13 +944,13 @@
|
|
|
padding: 10px 10px;
|
|
padding: 10px 10px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
width: 95%;
|
|
width: 95%;
|
|
|
- // justify-content: space-around;
|
|
|
|
|
|
|
+ justify-content: space-between;
|
|
|
margin: 0px auto;
|
|
margin: 0px auto;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
.schedule {
|
|
.schedule {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- width: 240rpx;
|
|
|
|
|
|
|
+ width: 280rpx;
|
|
|
height: 50rpx;
|
|
height: 50rpx;
|
|
|
// border: 2rpx solid #F0F0F0;
|
|
// border: 2rpx solid #F0F0F0;
|
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|