aaa
This commit is contained in:
parent
f8ab309fe7
commit
23197daaca
|
@ -14,7 +14,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="cen">
|
<view class="cen">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
智能电表
|
智能开关
|
||||||
</view>
|
</view>
|
||||||
<view class="mac">
|
<view class="mac">
|
||||||
MAC:{{item.localName.substring(6)}}
|
MAC:{{item.localName.substring(6)}}
|
||||||
|
|
|
@ -128,6 +128,13 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bot">设置</view>
|
<view class="bot">设置</view>
|
||||||
</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>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -196,17 +203,6 @@
|
||||||
let value = 100;
|
let value = 100;
|
||||||
let value2 = this.deviceInfo.orderAmount
|
let value2 = this.deviceInfo.orderAmount
|
||||||
const option = {
|
const option = {
|
||||||
// backgroundColor:"#061740",
|
|
||||||
// title: {
|
|
||||||
// show: false,
|
|
||||||
// text: `历史请求满意度`, // 图表标题
|
|
||||||
// x: 'center',
|
|
||||||
// y: '20',
|
|
||||||
// textStyle: {
|
|
||||||
// color: '#333', //'#fff',
|
|
||||||
// fontSize: 20,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
series: [{
|
series: [{
|
||||||
type: 'pie', // 饼图类型
|
type: 'pie', // 饼图类型
|
||||||
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
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);
|
const chart = await this.$refs.chart.init(echarts);
|
||||||
// console.log(option,11);
|
// console.log(option,11);
|
||||||
chart.setOption(option)
|
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
|
return chart
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -345,10 +281,7 @@
|
||||||
customPicture: _this.imglist
|
customPicture: _this.imglist
|
||||||
}
|
}
|
||||||
_this.putdevice(data)
|
_this.putdevice(data)
|
||||||
// setTimeout(()=>{
|
|
||||||
// this.imglist = ''
|
|
||||||
// _this.getDevice(_this.id)
|
|
||||||
// },1000)
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -481,6 +414,11 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_user/setting?id=' + this.id
|
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
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -324,19 +324,45 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deldevice() {
|
deldevice() {
|
||||||
this.$u.delete(`/app/device/mch/unbind/${this.id}`).then((res) => {
|
uni.showModal({
|
||||||
if (res.code == 200) {
|
title: '确认解绑',
|
||||||
uni.showToast({
|
content: '您确定要解绑设备吗?',
|
||||||
title: '解除成功',
|
success: (resModal) => {
|
||||||
icon: 'none',
|
if (resModal.confirm) {
|
||||||
duration: 2000
|
this.$u.delete(`/app/device/mch/unbind/${this.id}`).then((res) => {
|
||||||
});
|
if (res.code == 200) {
|
||||||
uni.navigateBack({
|
uni.showToast({
|
||||||
delta: 1 // 返回上级页面
|
title: '解除成功',
|
||||||
});
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
}
|
});
|
||||||
})
|
uni.navigateBack({
|
||||||
|
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) {
|
confirm(e) {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<u-navbar :is-back="false" :title="tittxt" :border-bottom="false" :background="bgc" title-color='#2E4975'
|
<u-navbar :is-back="false" :title="tittxt" :border-bottom="false" :background="bgc" title-color='#2E4975'
|
||||||
title-size='44' height='44' id="navbar">
|
title-size='44' height='44' id="navbar">
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<u-mask :show="showtip" @click="show = false" :z-index='1000'/>
|
<u-mask :show="showtip" @click="show = false" :z-index='1000' />
|
||||||
<view class="tip_box" v-if="showtip">
|
<view class="tip_box" v-if="showtip">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
系统检测到您的设备未联网或者为蓝牙版本,金额充值失败,请靠近设备进行蓝牙充值
|
系统检测到您的设备未联网或者为蓝牙版本,金额充值失败,请靠近设备进行蓝牙充值
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bot">
|
<view class="bot">
|
||||||
<view class="bot_left" @click="showtip=false">
|
<view class="bot_left" @click="showtip=false">
|
||||||
|
@ -20,9 +20,9 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fd" >
|
<view class="fd">
|
||||||
<view class="fd_top">
|
<view class="fd_top">
|
||||||
|
|
||||||
<view class="fd_tit">
|
<view class="fd_tit">
|
||||||
{{titlist}}
|
{{titlist}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -64,11 +64,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="warp_box">
|
<view class="warp_box">
|
||||||
<view class="swiper" style="height: 100%;" :current='curtitidx' @change="swiperchange">
|
<view class="swiper" style="height: 100%;" :current='curtitidx' @change="swiperchange">
|
||||||
<view>
|
<view>
|
||||||
<view class="swiper-item ">
|
<view class="swiper-item ">
|
||||||
<view class="card_box" @scrolltolower="onReachBottom" @click="todetail(item.deviceId)" v-for="(item,index) in wateringList"
|
<view class="card_box" @scrolltolower="onReachBottom" @click="todetail(item.deviceId)"
|
||||||
:key="index">
|
v-for="(item,index) in wateringList" :key="index">
|
||||||
<!-- deviceList -->
|
<!-- deviceList -->
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="card_left">
|
<view class="card_left">
|
||||||
|
@ -94,16 +94,17 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_right">
|
<view class="card_right">
|
||||||
<image :src="item.picture"
|
<image :src="item.picture" mode=""></image>
|
||||||
mode=""></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</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>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -115,8 +116,8 @@
|
||||||
暂无设备
|
暂无设备
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="addbutn" @click="show = true">
|
<view class="addbutn" @click="show = true">
|
||||||
添加方式
|
添加方式
|
||||||
</view>
|
</view>
|
||||||
<view class="tip">需要添加设备后方可使用</view>
|
<view class="tip">需要添加设备后方可使用</view>
|
||||||
|
@ -176,32 +177,32 @@
|
||||||
total: '',
|
total: '',
|
||||||
gps: {},
|
gps: {},
|
||||||
mac: '',
|
mac: '',
|
||||||
deviceId:'',
|
deviceId: '',
|
||||||
showtip:false,
|
showtip: false,
|
||||||
orderinfo:[],
|
orderinfo: [],
|
||||||
storeId:'',
|
storeId: '',
|
||||||
|
|
||||||
pagenum: 1,
|
pagenum: 1,
|
||||||
wateringList: [],
|
wateringList: [],
|
||||||
pagesize: 10,
|
pagesize: 10,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
noMoreData: false,
|
noMoreData: false,
|
||||||
total: 0
|
total: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.wateringList = []
|
this.wateringList = []
|
||||||
this.pagenum = 1
|
this.pagenum = 1
|
||||||
this.logins();
|
this.logins();
|
||||||
this.getgroup();
|
this.getgroup();
|
||||||
this.deviceId=uni.getStorageSync('deviceIds');
|
this.deviceId = uni.getStorageSync('deviceIds');
|
||||||
this.name=uni.getStorageSync('name');
|
this.name = uni.getStorageSync('name');
|
||||||
// console.log(this.deviceId,'aaa',this.name);
|
// console.log(this.deviceId,'aaa',this.name);
|
||||||
let that = this; // 将外部的 this 绑定到 that 上
|
let that = this; // 将外部的 this 绑定到 that 上
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.userType === '01') { // 注意 '01' 是一个字符串
|
if (this.userType === '01') { // 注意 '01' 是一个字符串
|
||||||
if (uni.getStorageSync('mac')) {
|
if (uni.getStorageSync('mac')) {
|
||||||
|
@ -209,7 +210,7 @@
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(lb) {
|
success: function(lb) {
|
||||||
|
|
||||||
that.gps.lat = lb.latitude;
|
that.gps.lat = lb.latitude;
|
||||||
that.gps.lon = lb.longitude;
|
that.gps.lon = lb.longitude;
|
||||||
that.tobind()
|
that.tobind()
|
||||||
|
@ -222,64 +223,65 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if (uni.getStorageSync('billNo')) {
|
if (uni.getStorageSync('billNo')) {
|
||||||
let billNo= uni.getStorageSync('billNo')
|
let billNo = uni.getStorageSync('billNo')
|
||||||
this.$u.get(`/app/bill/recharge/${billNo}/bluetoothSuccess`).then((res) => {
|
this.$u.get(`/app/bill/recharge/${billNo}/bluetoothSuccess`).then((res) => {
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
uni.removeStorageSync('billNo');
|
uni.removeStorageSync('billNo');
|
||||||
this.showtip=false
|
this.showtip = false
|
||||||
this.order()
|
this.order()
|
||||||
}
|
}
|
||||||
// console.log(this.deviceInfo,'this.deviceInfo');
|
// console.log(this.deviceInfo,'this.deviceInfo');
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tocz(){
|
tocz() {
|
||||||
this.showtip=false
|
this.showtip = false
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_fenbao/device/czDevice?orderinfo=' + JSON.stringify(this.orderinfo)
|
url: '/page_fenbao/device/czDevice?orderinfo=' + JSON.stringify(this.orderinfo)
|
||||||
});
|
|
||||||
},
|
|
||||||
checkModelTags(modelTags) {
|
|
||||||
return modelTags && modelTags.some(tag => tag === 2);
|
|
||||||
},
|
|
||||||
order(){
|
|
||||||
console.log('调用了');
|
|
||||||
this.$u.get("/app/bill/recharge/device/fail/list").then((res) => {
|
|
||||||
|
|
||||||
|
|
||||||
if(res.data.length!=0){
|
|
||||||
this.showtip=true
|
|
||||||
this.orderinfo=res.data[0]
|
|
||||||
}else{
|
|
||||||
this.orderinfo=null
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
towifi(mac){
|
checkModelTags(modelTags) {
|
||||||
|
return modelTags && modelTags.some(tag => tag === 2);
|
||||||
|
},
|
||||||
|
order() {
|
||||||
|
console.log('调用了');
|
||||||
|
this.$u.get("/app/bill/recharge/device/fail/list").then((res) => {
|
||||||
|
|
||||||
|
|
||||||
|
if (res.data.length != 0) {
|
||||||
|
this.showtip = true
|
||||||
|
this.orderinfo = res.data[0]
|
||||||
|
} else {
|
||||||
|
this.orderinfo = null
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
towifi(mac) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/page_fenbao/device/wifiDevice?mac=' + mac
|
url: '/page_fenbao/device/wifiDevice?mac=' + mac
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tobind(){
|
tobind() {
|
||||||
this.$u.put(`/app/device/bind/${this.mac}`, this.gps).then((res) => {
|
this.$u.put(`/app/device/bind/${this.mac}`, this.gps).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
||||||
let systemInfo = uni.getSystemInfoSync();
|
let systemInfo = uni.getSystemInfoSync();
|
||||||
if (systemInfo.platform === 'android') {
|
if (systemInfo.platform === 'android') {
|
||||||
// 当前设备是 Android
|
// 当前设备是 Android
|
||||||
|
|
||||||
} else if (systemInfo.platform === 'ios') {
|
} else if (systemInfo.platform === 'ios') {
|
||||||
// console.log('aaaaaaaaaaaa');
|
// console.log('aaaaaaaaaaaa');
|
||||||
uni.navigateTo({
|
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({
|
uni.showToast({
|
||||||
|
@ -290,7 +292,7 @@
|
||||||
uni.removeStorageSync('mac');
|
uni.removeStorageSync('mac');
|
||||||
uni.removeStorageSync('deviceIds');
|
uni.removeStorageSync('deviceIds');
|
||||||
uni.removeStorageSync('name');
|
uni.removeStorageSync('name');
|
||||||
this.getDeviceList();
|
this.getDeviceList();
|
||||||
} else {
|
} else {
|
||||||
// 处理失败情况
|
// 处理失败情况
|
||||||
}
|
}
|
||||||
|
@ -326,8 +328,8 @@
|
||||||
if (res.data != 0) {
|
if (res.data != 0) {
|
||||||
this.groupList = []
|
this.groupList = []
|
||||||
this.groupLists = res.data
|
this.groupLists = res.data
|
||||||
this.groupList = res.data.filter(item => {
|
this.groupList = res.data.filter(item => {
|
||||||
return item.name === '全部';
|
return item.name === '全部';
|
||||||
})
|
})
|
||||||
this.titlist = this.groupList[0].name
|
this.titlist = this.groupList[0].name
|
||||||
this.storeId = this.groupList[0].storeId
|
this.storeId = this.groupList[0].storeId
|
||||||
|
@ -335,8 +337,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getlist(){
|
getlist() {
|
||||||
if(this.storeId == null){
|
if (this.storeId == null) {
|
||||||
this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
|
@ -347,50 +349,52 @@
|
||||||
this.pagenum++
|
this.pagenum++
|
||||||
} else {
|
} else {
|
||||||
// 没有更多数据
|
// 没有更多数据
|
||||||
this.noMoreData = true;
|
|
||||||
}
|
}
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
this.$u.get(`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => {
|
this.$u.get(
|
||||||
if (res.code == 200) {
|
`/app/device/list?storeId=${this.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`)
|
||||||
this.total = res.total
|
.then((res) => {
|
||||||
// this.wateringList = []
|
if (res.code == 200) {
|
||||||
if (res.rows.length > 0) {
|
this.total = res.total
|
||||||
// 有数据,追加到列表
|
// this.wateringList = []
|
||||||
this.wateringList = this.wateringList.concat(res.rows)
|
if (res.rows.length > 0) {
|
||||||
this.pagenum++
|
// 有数据,追加到列表
|
||||||
} else {
|
this.wateringList = this.wateringList.concat(res.rows)
|
||||||
// 没有更多数据
|
this.pagenum++
|
||||||
this.noMoreData = true;
|
} else {
|
||||||
|
// 没有更多数据
|
||||||
|
|
||||||
|
}
|
||||||
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
this.isLoading = false;
|
})
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
let sum = this.total / this.pagesize
|
let sum = this.total / this.pagesize
|
||||||
if (this.pagenum-1 < sum) {
|
if (this.pagenum - 1 < sum) {
|
||||||
this.getlist(); // 上拉加载更多
|
this.getlist(); // 上拉加载更多
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '没有更多店铺了',
|
title: '没有更多设备了',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
changeGp(item, index) {
|
changeGp(item, index) {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
this.showfz = false
|
this.showfz = false
|
||||||
if (item == 1) {
|
if (item == 1) {
|
||||||
this.getDeviceList()
|
this.getDeviceList()
|
||||||
} else {
|
} else {
|
||||||
if(item.storeId == null){
|
if (item.storeId == null) {
|
||||||
this.pagenum = 1
|
this.pagenum = 1
|
||||||
this.wateringList = []
|
this.wateringList = []
|
||||||
this.titlist = item.name
|
this.titlist = item.name
|
||||||
|
@ -408,11 +412,13 @@
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
this.pagenum = 1
|
this.pagenum = 1
|
||||||
this.wateringList = []
|
this.wateringList = []
|
||||||
this.titlist = item.name
|
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) {
|
if (res.code == 200) {
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
if (res.rows.length > 0) {
|
if (res.rows.length > 0) {
|
||||||
|
@ -428,7 +434,7 @@
|
||||||
});
|
});
|
||||||
// this.$u.put(`/app/store/${item.storeId}/setDefault`).then((res) => {
|
// this.$u.put(`/app/store/${item.storeId}/setDefault`).then((res) => {
|
||||||
// if (res.code == 200) {
|
// if (res.code == 200) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
@ -461,7 +467,7 @@
|
||||||
scanType: ['qrCode'],
|
scanType: ['qrCode'],
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log('扫描结果:', res);
|
console.log('扫描结果:', res);
|
||||||
this.qrResult = res.result;
|
this.qrResult = res.result;
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
console.error('扫描失败:', err);
|
console.error('扫描失败:', err);
|
||||||
|
@ -492,7 +498,7 @@
|
||||||
url: '/page_fenbao/device/index'
|
url: '/page_fenbao/device/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async initChart() {
|
async initChart() {
|
||||||
let value = 100;
|
let value = 100;
|
||||||
let value2 = this.deviceInfo.surplusElectriQuantity
|
let value2 = this.deviceInfo.surplusElectriQuantity
|
||||||
|
@ -608,7 +614,7 @@
|
||||||
const chart = await this.$refs.chart.init(echarts);
|
const chart = await this.$refs.chart.init(echarts);
|
||||||
// console.log(option);
|
// console.log(option);
|
||||||
chart.setOption(option)
|
chart.setOption(option)
|
||||||
|
|
||||||
return chart
|
return chart
|
||||||
},
|
},
|
||||||
// 获取设备详情
|
// 获取设备详情
|
||||||
|
@ -673,7 +679,7 @@
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.deviceList = res.rows.filter(row => row.isDefault === true)
|
this.deviceList = res.rows.filter(row => row.isDefault === true)
|
||||||
console.log(this.deviceList);
|
console.log(this.deviceList);
|
||||||
|
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
if (this.deviceList == '') {
|
if (this.deviceList == '') {
|
||||||
this.addflag = true
|
this.addflag = true
|
||||||
|
@ -690,7 +696,7 @@
|
||||||
this.curtitidx = e.detail.current
|
this.curtitidx = e.detail.current
|
||||||
// console.log(e, 'aaaa');
|
// console.log(e, 'aaaa');
|
||||||
},
|
},
|
||||||
|
|
||||||
getdevice() {
|
getdevice() {
|
||||||
this.$u.get("/app/device/tenant").then((res) => {
|
this.$u.get("/app/device/tenant").then((res) => {
|
||||||
this.deviceInfo = res.rows.find(item => item.isDefault === true);
|
this.deviceInfo = res.rows.find(item => item.isDefault === true);
|
||||||
|
@ -709,7 +715,7 @@
|
||||||
changeidx(index) {
|
changeidx(index) {
|
||||||
this.curtitidx = index
|
this.curtitidx = index
|
||||||
},
|
},
|
||||||
|
|
||||||
toydfx() {
|
toydfx() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/page_components/eletj"
|
url: "/page_components/eletj"
|
||||||
|
@ -717,7 +723,7 @@
|
||||||
},
|
},
|
||||||
todetail(id) {
|
todetail(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_user/sbdetail?id=' + id
|
url: '/page_user/sbdetail?id=' + id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 跳转到抄表
|
// 跳转到抄表
|
||||||
|
@ -743,7 +749,8 @@
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
padding-bottom: 200rpx;
|
padding-bottom: 200rpx;
|
||||||
.tip_box{
|
|
||||||
|
.tip_box {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 72rpx;
|
left: 72rpx;
|
||||||
top: 788rpx;
|
top: 788rpx;
|
||||||
|
@ -752,9 +759,11 @@
|
||||||
background: #F7FAFE;
|
background: #F7FAFE;
|
||||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||||
z-index: 10000000;
|
z-index: 10000000;
|
||||||
.top{
|
|
||||||
|
.top {
|
||||||
padding: 52rpx 38rpx 42rpx 36rpx;
|
padding: 52rpx 38rpx 42rpx 36rpx;
|
||||||
.txt{
|
|
||||||
|
.txt {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -762,12 +771,14 @@
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.bot{
|
|
||||||
border-top: 2rpx solid #D8D8D8 ;
|
.bot {
|
||||||
|
border-top: 2rpx solid #D8D8D8;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.bot_left{
|
|
||||||
|
.bot_left {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -777,22 +788,24 @@
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
.bot_right{
|
|
||||||
|
.bot_right {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
border-left: 2rpx solid #D8D8D8 ;
|
border-left: 2rpx solid #D8D8D8;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #4C97E7;
|
color: #4C97E7;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.noDevice {
|
.noDevice {
|
||||||
margin-top: 432rpx;
|
margin-top: 432rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1301,9 +1314,10 @@
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: 50rpx;
|
margin-right: 50rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height:200rpx;
|
height: 200rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user