This commit is contained in:
3321822538@qq.com 2024-05-21 10:49:02 +08:00
parent f8ab309fe7
commit 23197daaca
4 changed files with 175 additions and 197 deletions

View File

@ -14,7 +14,7 @@
</view>
<view class="cen">
<view class="name">
智能电表
智能开关
</view>
<view class="mac">
MAC{{item.localName.substring(6)}}

View File

@ -128,6 +128,13 @@
</view>
<view class="bot">设置</view>
</view>
<view class="cont" style="width: 60rpx;" @click="topage(5)">
<view class="top">
<image src="https://api.ccttiot.com/smartmeter/img/static/ubxoYVnbIK1rk0cfoL3j" mode="">
</image>
</view>
<view class="bot">配网</view>
</view>
</view>
</view>
@ -196,17 +203,6 @@
let value = 100;
let value2 = this.deviceInfo.orderAmount
const option = {
// backgroundColor:"#061740",
// title: {
// show: false,
// text: ``, //
// x: 'center',
// y: '20',
// textStyle: {
// color: '#333', //'#fff',
// fontSize: 20,
// },
// },
series: [{
type: 'pie', //
radius: ['98%', '70%'], //
@ -241,64 +237,8 @@
},
},
},
// {
// value: 100 - value2,
// name: '',
// label: {
// normal: {
// show: false,
// },
// },
// itemStyle: {
// normal: {
// color: '#173164',
// },
// },
// },
],
},
// {
// type: 'gauge', //
// radius: '130%', //
// center: ['50%', '50%'], //
// startAngle: 359,
// endAngle: 359.9,
// splitNumber: 2, //
// hoverAnimation: true,
// axisTick: {
// show: true, // 线
// length: 10, // 线
// lineStyle: {
// color: 'auto',
// width: 1,
// },
// },
// splitLine: {
// length: 0, // 线线
// lineStyle: {
// width: 1,
// color: '#061740',
// },
// },
// axisLabel: {
// show: false, //
// },
// pointer: {
// show: false, //
// },
// axisLine: {
// lineStyle: {
// opacity: 0,
// },
// },
// detail: {
// show: false, //
// },
// data: [{
// value: 0,
// name: '',
// }, ],
// },
],
};
@ -306,10 +246,6 @@
const chart = await this.$refs.chart.init(echarts);
// console.log(option,11);
chart.setOption(option)
// chart.resize({
// width: uni.upx2px(210), // Convert 210rpx to pixels
// height: uni.upx2px(190.14) // Convert 190.14rpx to pixels
// });
return chart
},
@ -345,10 +281,7 @@
customPicture: _this.imglist
}
_this.putdevice(data)
// setTimeout(()=>{
// this.imglist = ''
// _this.getDevice(_this.id)
// },1000)
}
});
}
@ -481,6 +414,11 @@
uni.navigateTo({
url: '/page_user/setting?id=' + this.id
})
}else if(num == 5){
console.log(this.deviceInfo);
uni.navigateTo({
url:'/page_fenbao/device/lianjie?mac=' + this.deviceInfo.mac + '&storeId=' + this.deviceInfo.storeId
})
}
}

View File

@ -324,6 +324,11 @@
}
},
deldevice() {
uni.showModal({
title: '确认解绑',
content: '您确定要解绑设备吗?',
success: (resModal) => {
if (resModal.confirm) {
this.$u.delete(`/app/device/mch/unbind/${this.id}`).then((res) => {
if (res.code == 200) {
uni.showToast({
@ -332,11 +337,32 @@
duration: 2000
});
uni.navigateBack({
delta: 1 //
delta: 2 //
});
} else {
uni.showToast({
title: '解绑失败',
icon: 'none',
duration: 2000
});
}
})
}).catch((error) => {
//
uni.showToast({
title: '请求失败',
icon: 'none',
duration: 2000
});
});
} else if (resModal.cancel) { //
uni.showToast({
title: '已取消',
icon: 'none',
duration: 1000
});
}
}
});
},
confirm(e) {
let data = {

View File

@ -67,8 +67,8 @@
<view class="swiper" style="height: 100%;" :current='curtitidx' @change="swiperchange">
<view>
<view class="swiper-item ">
<view class="card_box" @scrolltolower="onReachBottom" @click="todetail(item.deviceId)" v-for="(item,index) in wateringList"
:key="index">
<view class="card_box" @scrolltolower="onReachBottom" @click="todetail(item.deviceId)"
v-for="(item,index) in wateringList" :key="index">
<!-- deviceList -->
<view class="card">
<view class="card_left">
@ -94,8 +94,7 @@
</view>
</view>
<view class="card_right">
<image :src="item.picture"
mode=""></image>
<image :src="item.picture" mode=""></image>
</view>
</view>
</view>
@ -103,7 +102,9 @@
</view>
</view>
<view v-if="wateringList.length == 0" style="margin-left:200rpx; color: #ccc;font-size: 36rpx;margin-top: 200rpx;width: 750rpx;">该店铺暂无设备...</view>
<!-- <view
style="margin-left:200rpx; color: #ccc;font-size: 36rpx;margin-top: 200rpx;width: 750rpx;">
该店铺暂无设备...</view> -->
</view>
</view>
@ -186,7 +187,7 @@
pagesize: 10,
isLoading: false,
noMoreData: false,
total: 0
total: 0,
}
},
onLoad() {
@ -279,7 +280,8 @@
} else if (systemInfo.platform === 'ios') {
// console.log('aaaaaaaaaaaa');
uni.navigateTo({
url: '/page_components/wifilist/index?deviceId=' + this.deviceId + '&name=' + this.name
url: '/page_components/wifilist/index?deviceId=' + this.deviceId +
'&name=' + this.name
})
}
uni.showToast({
@ -347,13 +349,15 @@
this.pagenum++
} else {
//
this.noMoreData = true;
}
this.isLoading = false;
}
})
} else {
this.$u.get(`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
this.$u.get(
`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`)
.then((res) => {
if (res.code == 200) {
this.total = res.total
// this.wateringList = []
@ -363,7 +367,7 @@
this.pagenum++
} else {
//
this.noMoreData = true;
}
this.isLoading = false;
}
@ -376,7 +380,7 @@
this.getlist(); //
} else {
uni.showToast({
title: '没有更多店铺了',
title: '没有更多设备了',
icon: 'none',
duration: 1000
});
@ -412,7 +416,9 @@
this.pagenum = 1
this.wateringList = []
this.titlist = item.name
this.$u.get(`/app/device/list?storeId=${item.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
this.$u.get(
`/app/device/list?storeId=${item.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`
).then((res) => {
if (res.code == 200) {
this.total = res.total
if (res.rows.length > 0) {
@ -743,6 +749,7 @@
.page {
padding-bottom: 200rpx;
.tip_box {
position: fixed;
left: 72rpx;
@ -752,8 +759,10 @@
background: #F7FAFE;
border-radius: 30rpx 30rpx 30rpx 30rpx;
z-index: 10000000;
.top {
padding: 52rpx 38rpx 42rpx 36rpx;
.txt {
width: 100%;
text-align: center;
@ -762,11 +771,13 @@
color: #3D3D3D;
}
}
.bot {
border-top: 2rpx solid #D8D8D8;
display: flex;
flex-wrap: nowrap;
height: 100%;
.bot_left {
width: 50%;
height: 98rpx;
@ -777,6 +788,7 @@
font-size: 36rpx;
color: #3D3D3D;
}
.bot_right {
width: 50%;
height: 98rpx;
@ -793,6 +805,7 @@
}
}
.noDevice {
margin-top: 432rpx;
display: flex;
@ -1301,6 +1314,7 @@
margin-top: 30rpx;
margin-left: auto;
margin-right: 50rpx;
image {
width: 180rpx;
height: 200rpx;