|
@@ -60,6 +60,7 @@
|
|
|
<th class="th" v-for="(item,index) in thdata" :key="'a'+index">{{item}}</th>
|
|
<th class="th" v-for="(item,index) in thdata" :key="'a'+index">{{item}}</th>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="tr" v-for="(items,indexs) in eqlistdata" :key="'b'+indexs" v-if="forbidden">
|
|
<tr class="tr" v-for="(items,indexs) in eqlistdata" :key="'b'+indexs" v-if="forbidden">
|
|
|
|
|
+ <td class="td">{{items.d_h_t.addtime|timeFormat()}}</td>
|
|
|
<td class="td">{{items.d_h_t.ds==0?"关机":"开机"}}</td>
|
|
<td class="td">{{items.d_h_t.ds==0?"关机":"开机"}}</td>
|
|
|
<td class="td">{{items.d_h_t.ws==0?"待机":"工作"}}</td>
|
|
<td class="td">{{items.d_h_t.ws==0?"待机":"工作"}}</td>
|
|
|
<td class="td">{{items.d_h_t.rps==0?"正常":"保护"}}</td>
|
|
<td class="td">{{items.d_h_t.rps==0?"正常":"保护"}}</td>
|
|
@@ -71,10 +72,9 @@
|
|
|
<td class="td">{{items.d_h_t.ah}}</td>
|
|
<td class="td">{{items.d_h_t.ah}}</td>
|
|
|
<td class="td">{{items.d_h_t.cv}}</td>
|
|
<td class="td">{{items.d_h_t.cv}}</td>
|
|
|
<td class="td">{{items.d_h_t.bv}}</td>
|
|
<td class="td">{{items.d_h_t.bv}}</td>
|
|
|
- <td class="td">{{items.d_h_t.addtime|timeFormat()}}</td>
|
|
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr class="tr" v-if="!forbidden">
|
|
<tr class="tr" v-if="!forbidden">
|
|
|
- <td class="td" v-for="item in 13">暂无数据</td>
|
|
|
|
|
|
|
+ <td class="td" v-for="item in 12">暂无数据</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -83,6 +83,9 @@
|
|
|
<view class="pagenumber_page">
|
|
<view class="pagenumber_page">
|
|
|
第{{page}}页
|
|
第{{page}}页
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="pagenumber_page">
|
|
|
|
|
+ 共 {{pagesum}} 页
|
|
|
|
|
+ </view>
|
|
|
<button @click="next" :disabled="!forbidden">下一页</button>
|
|
<button @click="next" :disabled="!forbidden">下一页</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -101,8 +104,7 @@
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- thdata: ["设备开关", "工作状态", "雨控状态", "温控状态", "倾倒状态", "定时(h)", "电击次数", "温度(℃)", "湿度(%)", "充电电压(v)", "电池电压(v)",
|
|
|
|
|
- "上报时间"
|
|
|
|
|
|
|
+ thdata: ["上报时间","设备开关", "工作状态", "雨控状态", "温控状态", "倾倒状态", "定时(h)", "电击次数", "温度(℃)", "湿度(%)", "充电电压(v)", "电池电压(v)",
|
|
|
],
|
|
],
|
|
|
eqlistdata: [],
|
|
eqlistdata: [],
|
|
|
cWidth: '400',
|
|
cWidth: '400',
|
|
@@ -131,7 +133,8 @@
|
|
|
end_time: null,
|
|
end_time: null,
|
|
|
device_id: null
|
|
device_id: null
|
|
|
},
|
|
},
|
|
|
- canvastishiTF:false
|
|
|
|
|
|
|
+ canvastishiTF:false,
|
|
|
|
|
+ pagesum:0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 页面加载执行的函数
|
|
// 页面加载执行的函数
|
|
@@ -149,7 +152,7 @@
|
|
|
methods: { //
|
|
methods: { //
|
|
|
//forecast.worm_lamp.device_polyline_data
|
|
//forecast.worm_lamp.device_polyline_data
|
|
|
// 获取数据,发请求
|
|
// 获取数据,发请求
|
|
|
- async getServerData(newtime, oldtimes) { //设备列表
|
|
|
|
|
|
|
+ async getServerData(newtime, oldtimes) { //设备折线图
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.device_polyline_data',
|
|
|
data: {
|
|
data: {
|
|
@@ -172,11 +175,11 @@
|
|
|
var arr5 = []
|
|
var arr5 = []
|
|
|
for (var i = 0; i < res.length; i++) {
|
|
for (var i = 0; i < res.length; i++) {
|
|
|
var times = new Date(res[i].addtime * 1000)
|
|
var times = new Date(res[i].addtime * 1000)
|
|
|
- xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getSeconds())
|
|
|
|
|
|
|
+ xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times.getMinutes())
|
|
|
arr1.unshift(res[i].temperature)
|
|
arr1.unshift(res[i].temperature)
|
|
|
arr2.unshift(res[i].humidity)
|
|
arr2.unshift(res[i].humidity)
|
|
|
- arr3.unshift(Number(res[i].others.bv)/1000)
|
|
|
|
|
- arr4.unshift(Number(res[i].others.cv)/1000)
|
|
|
|
|
|
|
+ arr3.unshift(Number(res[i].others.bv))
|
|
|
|
|
+ arr4.unshift(Number(res[i].others.cv))
|
|
|
arr5.unshift(res[i].others.ct)
|
|
arr5.unshift(res[i].others.ct)
|
|
|
}
|
|
}
|
|
|
arr.unshift(arr1,arr2,arr3,arr4)
|
|
arr.unshift(arr1,arr2,arr3,arr4)
|
|
@@ -239,7 +242,7 @@
|
|
|
this.tishiTF = false
|
|
this.tishiTF = false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- async historydata(newtime, oldtimes) { //设备列表
|
|
|
|
|
|
|
+ async historydata(newtime, oldtimes) { //设备表格数据
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
|
|
url: '/api/api_gateway?method=forecast.worm_lamp.device_history_data',
|
|
|
data: {
|
|
data: {
|
|
@@ -252,6 +255,7 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
console.log(res.data)
|
|
console.log(res.data)
|
|
|
|
|
+ this.pagesum = Math.ceil(res.counts/10)+1
|
|
|
this.eqlistdata = res.data
|
|
this.eqlistdata = res.data
|
|
|
if (res.data.length == 0) {
|
|
if (res.data.length == 0) {
|
|
|
this.forbidden = false
|
|
this.forbidden = false
|
|
@@ -316,7 +320,7 @@
|
|
|
disableGrid: true,
|
|
disableGrid: true,
|
|
|
type: 'grid',
|
|
type: 'grid',
|
|
|
gridType: 'dash',
|
|
gridType: 'dash',
|
|
|
- itemCount: 5, //x轴单屏显示数据的数量,默认为5个
|
|
|
|
|
|
|
+ itemCount: 4, //x轴单屏显示数据的数量,默认为5个
|
|
|
scrollShow: true, //新增是否显示滚动条,默认false
|
|
scrollShow: true, //新增是否显示滚动条,默认false
|
|
|
// scrollAlign: 'left', //滚动条初始位置
|
|
// scrollAlign: 'left', //滚动条初始位置
|
|
|
scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
|
|
scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
|
|
@@ -352,7 +356,7 @@
|
|
|
disableGrid: true,
|
|
disableGrid: true,
|
|
|
type: 'grid',
|
|
type: 'grid',
|
|
|
gridType: 'dash',
|
|
gridType: 'dash',
|
|
|
- itemCount: 5, //x轴单屏显示数据的数量,默认为5个
|
|
|
|
|
|
|
+ itemCount: 4, //x轴单屏显示数据的数量,默认为5个
|
|
|
scrollShow: true, //新增是否显示滚动条,默认false
|
|
scrollShow: true, //新增是否显示滚动条,默认false
|
|
|
// scrollAlign: 'left', //滚动条初始位置
|
|
// scrollAlign: 'left', //滚动条初始位置
|
|
|
scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
|
|
scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
|
|
@@ -380,7 +384,7 @@
|
|
|
//下面是toolTip事件,如果滚动后不需要显示,可不填写
|
|
//下面是toolTip事件,如果滚动后不需要显示,可不填写
|
|
|
canvaColumnA.showToolTip(e, {
|
|
canvaColumnA.showToolTip(e, {
|
|
|
format: function(item, category) {
|
|
format: function(item, category) {
|
|
|
- return category + ' ' + item.name + ':' + item.data
|
|
|
|
|
|
|
+ return category + ' ' + item.name + ':' + Number(item.data).toFixed(3)
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -554,15 +558,15 @@
|
|
|
border: 2rpx solid #F1F1F1;
|
|
border: 2rpx solid #F1F1F1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .th:last-child,
|
|
|
|
|
- .td:last-child {
|
|
|
|
|
|
|
+ .th:first-child,
|
|
|
|
|
+ .td:first-child {
|
|
|
width: 300rpx;
|
|
width: 300rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .th:nth-last-child(1),
|
|
|
.th:nth-last-child(2),
|
|
.th:nth-last-child(2),
|
|
|
- .th:nth-last-child(3),
|
|
|
|
|
- .td:nth-last-child(2),
|
|
|
|
|
- .td:nth-last-child(3) {
|
|
|
|
|
|
|
+ .td:nth-last-child(1),
|
|
|
|
|
+ .td:nth-last-child(2) {
|
|
|
width: 200rpx;
|
|
width: 200rpx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|