aaa
This commit is contained in:
parent
d74eb83a16
commit
9e563c8321
|
@ -9,7 +9,6 @@
|
||||||
<view class="swiper-item ">
|
<view class="swiper-item ">
|
||||||
<view class="card_box" v-for="(item,index) in wateringList"
|
<view class="card_box" v-for="(item,index) in wateringList"
|
||||||
:key="index">
|
:key="index">
|
||||||
<!-- @click="todetail(item.deviceId)" -->
|
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="card_left">
|
<view class="card_left">
|
||||||
<view class="card_left_tit">
|
<view class="card_left_tit">
|
||||||
|
@ -30,7 +29,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_left_no">
|
<view class="card_left_no">
|
||||||
SN号:{{item.deviceNo}}
|
S/N码:{{item.deviceNo}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_right">
|
<view class="card_right">
|
||||||
|
@ -57,9 +56,9 @@
|
||||||
},
|
},
|
||||||
pagenum: 1,
|
pagenum: 1,
|
||||||
wateringList: [],
|
wateringList: [],
|
||||||
pagesize: 10, // 一页多少数据
|
pagesize: 10,
|
||||||
isLoading: false, // 是否正在加载数据
|
isLoading: false,
|
||||||
noMoreData: false, // 是否没有更多数据
|
noMoreData: false,
|
||||||
total: 0
|
total: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -104,35 +103,23 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
|
||||||
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
// position: fixed;
|
|
||||||
// top: 0;
|
|
||||||
// left: 0;
|
|
||||||
padding-bottom: 200rpx;
|
padding-bottom: 200rpx;
|
||||||
.box{
|
.box{
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
// height: 1440rpx;
|
|
||||||
background: #F4F5F7;
|
background: #F4F5F7;
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
padding-left: 40rpx;
|
padding-left: 40rpx;
|
||||||
.swiper {
|
.swiper {
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.card_box {
|
.card_box {
|
||||||
margin-top: 34rpx;
|
margin-top: 34rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
display: flex;
|
display: flex;
|
||||||
// align-items: center;
|
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
width: 658rpx;
|
width: 658rpx;
|
||||||
height: 282rpx;
|
height: 282rpx;
|
||||||
|
@ -186,7 +173,6 @@
|
||||||
.card_right {
|
.card_right {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
// margin-right: 94rpx;
|
|
||||||
margin-right: 40rpx;
|
margin-right: 40rpx;
|
||||||
image {
|
image {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
|
|
|
@ -7,11 +7,8 @@
|
||||||
<view class="listbox">
|
<view class="listbox">
|
||||||
<view class="moshi">
|
<view class="moshi">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCux5cJrpLFhwYjVTz4J" mode="" @click="btndt(1)" class="img"></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uCux5cJrpLFhwYjVTz4J" mode="" @click="btndt(1)" class="img"></image>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode="" @click="btndt(2)" v-if="isMch"></image>
|
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode="" @click="btndt(2)" v-if="isMch"></image> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="title">
|
|
||||||
<text :class="index == 1 ? 'active' : ''" @click="btntab(1)">可共享</text> <text :class="index == 2 ? 'active' : ''" @click="btntab(2)">共享中</text> <text :class="index == 3 ? 'active' : ''" @click="btntab(3)">全部共享</text>
|
|
||||||
</view> -->
|
|
||||||
<view class="list" v-for="(item,index) in gxlist" :key="index">
|
<view class="list" v-for="(item,index) in gxlist" :key="index">
|
||||||
<view class="pic">
|
<view class="pic">
|
||||||
<image :src="item.picture" mode=""></image>
|
<image :src="item.picture" mode=""></image>
|
||||||
|
@ -41,9 +38,9 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
latitude: '', // 初始纬度
|
latitude: '',
|
||||||
longitude: '', // 初始经度
|
longitude: '',
|
||||||
covers: [], // 覆盖物数组
|
covers: [],
|
||||||
index:1,
|
index:1,
|
||||||
isMch:false,
|
isMch:false,
|
||||||
gxlist:[]
|
gxlist:[]
|
||||||
|
@ -56,14 +53,11 @@
|
||||||
this.getshanghu()
|
this.getshanghu()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 跳转导航
|
||||||
mapFun(item) {
|
mapFun(item) {
|
||||||
console.log(item);
|
|
||||||
uni.openLocation({
|
uni.openLocation({
|
||||||
latitude: item.lat,
|
latitude: item.lat,
|
||||||
//纬度 - 目的地/坐标点
|
|
||||||
longitude: item.lng,
|
longitude: item.lng,
|
||||||
//经度 - 目的地/坐标点
|
|
||||||
name: item.county,
|
name: item.county,
|
||||||
address: item.address
|
address: item.address
|
||||||
});
|
});
|
||||||
|
@ -79,11 +73,9 @@
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('我的位置:', res);
|
|
||||||
this.latitude = res.latitude;
|
this.latitude = res.latitude;
|
||||||
this.longitude = res.longitude;
|
this.longitude = res.longitude;
|
||||||
this.jinweidu = this.longitude + ',' + this.latitude;
|
this.jinweidu = this.longitude + ',' + this.latitude;
|
||||||
|
|
||||||
// 请求附近的店铺
|
// 请求附近的店铺
|
||||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(response => {
|
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(response => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
|
@ -100,7 +92,7 @@
|
||||||
longitude: item.lng,
|
longitude: item.lng,
|
||||||
width: 30,
|
width: 30,
|
||||||
height: 40,
|
height: 40,
|
||||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4', // 图标路径
|
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
|
||||||
distance: distance // 可以在这里也添加距离到覆盖物对象中,但通常只需要在店铺对象中
|
distance: distance // 可以在这里也添加距离到覆盖物对象中,但通常只需要在店铺对象中
|
||||||
};
|
};
|
||||||
// console.log(this.gxlist);
|
// console.log(this.gxlist);
|
||||||
|
@ -123,18 +115,12 @@
|
||||||
const phi2 = lat2 * Math.PI / 180;
|
const phi2 = lat2 * Math.PI / 180;
|
||||||
const deltaPhi = (lat2 - lat1) * Math.PI / 180;
|
const deltaPhi = (lat2 - lat1) * Math.PI / 180;
|
||||||
const deltaLambda = (lon2 - lon1) * Math.PI / 180;
|
const deltaLambda = (lon2 - lon1) * Math.PI / 180;
|
||||||
|
const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(deltaLambda / 2) * Math.sin(deltaLambda / 2);
|
||||||
const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) +
|
|
||||||
Math.cos(phi1) * Math.cos(phi2) *
|
|
||||||
Math.sin(deltaLambda / 2) * Math.sin(deltaLambda / 2);
|
|
||||||
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||||
|
const distance = R * c;
|
||||||
const distance = R * c; // 计算出的距离值
|
|
||||||
return distance;
|
return distance;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleMarkerClick(event) {
|
handleMarkerClick(event) {
|
||||||
const markerId = event.markerId;
|
const markerId = event.markerId;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -171,7 +157,6 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
page {
|
page {
|
||||||
// background-color: ;
|
|
||||||
background: linear-gradient(180deg, #D9D8FF 0%, rgba(255, 255, 255, 0) 100%);
|
background: linear-gradient(180deg, #D9D8FF 0%, rgba(255, 255, 255, 0) 100%);
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +235,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.cen{
|
.cen{
|
||||||
// margin-right: 140rpx;
|
|
||||||
.cena{
|
.cena{
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
@ -274,7 +258,6 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 4rpx 18rpx;
|
padding: 4rpx 18rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// border: 1px solid #ccc;
|
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
.bu{
|
.bu{
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="mid_right">
|
<view class="mid_right">
|
||||||
<view class="mid_top">
|
<view class="mid_top">
|
||||||
{{ deviceInfo.deviceName }}号
|
{{ deviceInfo.deviceName }}
|
||||||
</view>
|
</view>
|
||||||
<view class="mid_bot">
|
<view class="mid_bot">
|
||||||
<view class="txt" v-if="deviceInfo">电表号:{{ deviceInfo.deviceId }}</view>
|
<view class="txt" v-if="deviceInfo">S/N码:{{ deviceInfo.deviceNo }}</view>
|
||||||
<div class="tip" v-if="deviceInfo.onlineStatus==1">在线</div>
|
<div class="tip" v-if="deviceInfo.onlineStatus==1">在线</div>
|
||||||
<div class="tip" v-if="deviceInfo.onlineStatus==0">离线</div>
|
<div class="tip" v-if="deviceInfo.onlineStatus==0">离线</div>
|
||||||
<div class="tip" v-if="deviceInfo.powerStatus==0">断电</div>
|
<div class="tip" v-if="deviceInfo.powerStatus==0">断电</div>
|
||||||
|
@ -182,145 +182,143 @@
|
||||||
this.getDevice(id)
|
this.getDevice(id)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart(canvas, width, height, canvasDpr) {
|
// initChart(canvas, width, height, canvasDpr) {
|
||||||
let that = this
|
// let that = this
|
||||||
console.log(canvas, width, height, canvasDpr)
|
// console.log(canvas, width, height, canvasDpr)
|
||||||
let value = 100;
|
// let value = 100;
|
||||||
let value2 = this.deviceInfo.orderAmount
|
// let value2 = this.deviceInfo.orderAmount
|
||||||
const option = {
|
// const option = {
|
||||||
// backgroundColor:"#061740",
|
// // backgroundColor:"#061740",
|
||||||
title: {
|
// title: {
|
||||||
show: false,
|
// show: false,
|
||||||
text: `历史请求满意度`, // 图表标题
|
// text: `历史请求满意度`, // 图表标题
|
||||||
x: 'center',
|
// x: 'center',
|
||||||
y: '20',
|
// y: '20',
|
||||||
textStyle: {
|
// textStyle: {
|
||||||
color: '#333', //'#fff',
|
// color: '#333', //'#fff',
|
||||||
fontSize: 20,
|
// fontSize: 20,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
series: [{
|
// series: [{
|
||||||
type: 'pie', // 饼图类型
|
// type: 'pie', // 饼图类型
|
||||||
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
// radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
||||||
silent: true,
|
// silent: true,
|
||||||
clockwise: true,
|
// clockwise: true,
|
||||||
startAngle: 90, // 起始角度
|
// startAngle: 90, // 起始角度
|
||||||
z: 0,
|
// z: 0,
|
||||||
zlevel: 0,
|
// zlevel: 0,
|
||||||
data: [{
|
// data: [{
|
||||||
value: value,
|
// value: value,
|
||||||
name: '占比', // 数据项名称
|
// name: '占比', // 数据项名称
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
normal: {
|
// normal: {
|
||||||
color: '#8883F0', // 数据项颜色
|
// color: '#8883F0', // 数据项颜色
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
label: {
|
// label: {
|
||||||
normal: {
|
// normal: {
|
||||||
position: 'center',
|
// position: 'center',
|
||||||
formatter: ` {a|${value2}}\n\n{b|订单金额}`, // 标签内容格式
|
// formatter: ` {a|${value2}}\n\n{b|订单金额}`, // 标签内容格式
|
||||||
rich: {
|
// rich: {
|
||||||
a: {
|
// a: {
|
||||||
fontSize: 15,
|
// fontSize: 15,
|
||||||
fontWeight: '700',
|
// fontWeight: '700',
|
||||||
color: '#333',
|
// color: '#333',
|
||||||
},
|
// },
|
||||||
b: {
|
// b: {
|
||||||
fontSize: 11,
|
// fontSize: 11,
|
||||||
color: '#888',
|
// color: '#888',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
value: 100 - value,
|
// value: 100 - value,
|
||||||
name: '',
|
// name: '',
|
||||||
label: {
|
// label: {
|
||||||
normal: {
|
// normal: {
|
||||||
show: false,
|
// show: false,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
normal: {
|
// normal: {
|
||||||
color: '#173164',
|
// color: '#173164',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
type: 'gauge', // 仪表盘类型
|
// type: 'gauge', // 仪表盘类型
|
||||||
radius: '130%', // 仪表盘半径,占图表容器的百分比
|
// radius: '130%', // 仪表盘半径,占图表容器的百分比
|
||||||
center: ['50%', '50%'], // 仪表盘中心位置
|
// center: ['50%', '50%'], // 仪表盘中心位置
|
||||||
startAngle: 359,
|
// startAngle: 359,
|
||||||
endAngle: 359.9,
|
// endAngle: 359.9,
|
||||||
splitNumber: 2, // 刻度分割段数
|
// splitNumber: 2, // 刻度分割段数
|
||||||
hoverAnimation: true,
|
// hoverAnimation: true,
|
||||||
axisTick: {
|
// axisTick: {
|
||||||
show: true, // 是否显示刻度线
|
// show: true, // 是否显示刻度线
|
||||||
length: 10, // 刻度线长度
|
// length: 10, // 刻度线长度
|
||||||
lineStyle: {
|
// lineStyle: {
|
||||||
color: 'auto',
|
// color: 'auto',
|
||||||
width: 1,
|
// width: 1,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
splitLine: {
|
// splitLine: {
|
||||||
length: 0, // 刻度线分隔线长度
|
// length: 0, // 刻度线分隔线长度
|
||||||
lineStyle: {
|
// lineStyle: {
|
||||||
width: 1,
|
// width: 1,
|
||||||
color: '#061740',
|
// color: '#061740',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
axisLabel: {
|
// axisLabel: {
|
||||||
show: false, // 是否显示刻度标签
|
// show: true, // 是否显示刻度标签
|
||||||
},
|
// },
|
||||||
pointer: {
|
// pointer: {
|
||||||
show: false, // 是否显示指针
|
// show: false, // 是否显示指针
|
||||||
},
|
// },
|
||||||
axisLine: {
|
// axisLine: {
|
||||||
lineStyle: {
|
// lineStyle: {
|
||||||
opacity: 0,
|
// opacity: 0,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
detail: {
|
// detail: {
|
||||||
show: false, // 是否显示仪表盘详情
|
// show: false, // 是否显示仪表盘详情
|
||||||
},
|
// },
|
||||||
data: [{
|
// data: [{
|
||||||
value: 0,
|
// value: 0,
|
||||||
name: '',
|
// name: '',
|
||||||
}, ],
|
// }, ],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
};
|
// };
|
||||||
|
// chart = echarts.init(canvas, null, {
|
||||||
|
// width: width,
|
||||||
chart = echarts.init(canvas, null, {
|
// height: height,
|
||||||
width: width,
|
// devicePixelRatio: canvasDpr
|
||||||
height: height,
|
// })
|
||||||
devicePixelRatio: canvasDpr
|
// console.log(chart);
|
||||||
})
|
// // option.series[0].data = that.chartData
|
||||||
console.log(chart);
|
// canvas.setChart(chart)
|
||||||
// option.series[0].data = that.chartData
|
// chart.setOption(option)
|
||||||
canvas.setChart(chart)
|
// return chart
|
||||||
chart.setOption(option)
|
// },
|
||||||
return chart
|
|
||||||
},
|
|
||||||
async initChart() {
|
async initChart() {
|
||||||
let value = 100;
|
let value = 100;
|
||||||
let value2 = this.deviceInfo.orderAmount
|
let value2 = this.deviceInfo.orderAmount
|
||||||
const option = {
|
const option = {
|
||||||
// backgroundColor:"#061740",
|
// backgroundColor:"#061740",
|
||||||
title: {
|
// title: {
|
||||||
show: false,
|
// show: false,
|
||||||
text: `历史请求满意度`, // 图表标题
|
// text: `历史请求满意度`, // 图表标题
|
||||||
x: 'center',
|
// x: 'center',
|
||||||
y: '20',
|
// y: '20',
|
||||||
textStyle: {
|
// textStyle: {
|
||||||
color: '#333', //'#fff',
|
// color: '#333', //'#fff',
|
||||||
fontSize: 20,
|
// fontSize: 20,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
series: [{
|
series: [{
|
||||||
type: 'pie', // 饼图类型
|
type: 'pie', // 饼图类型
|
||||||
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
||||||
|
@ -355,70 +353,70 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
value: 100 - value,
|
// value: 100 - value2,
|
||||||
name: '',
|
// name: '',
|
||||||
label: {
|
// label: {
|
||||||
normal: {
|
// normal: {
|
||||||
show: false,
|
// show: false,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
itemStyle: {
|
// itemStyle: {
|
||||||
normal: {
|
// normal: {
|
||||||
color: '#173164',
|
// color: '#173164',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
type: 'gauge', // 仪表盘类型
|
// type: 'gauge', // 仪表盘类型
|
||||||
radius: '130%', // 仪表盘半径,占图表容器的百分比
|
// radius: '130%', // 仪表盘半径,占图表容器的百分比
|
||||||
center: ['50%', '50%'], // 仪表盘中心位置
|
// center: ['50%', '50%'], // 仪表盘中心位置
|
||||||
startAngle: 359,
|
// startAngle: 359,
|
||||||
endAngle: 359.9,
|
// endAngle: 359.9,
|
||||||
splitNumber: 2, // 刻度分割段数
|
// splitNumber: 2, // 刻度分割段数
|
||||||
hoverAnimation: true,
|
// hoverAnimation: true,
|
||||||
axisTick: {
|
// axisTick: {
|
||||||
show: true, // 是否显示刻度线
|
// show: true, // 是否显示刻度线
|
||||||
length: 10, // 刻度线长度
|
// length: 10, // 刻度线长度
|
||||||
lineStyle: {
|
// lineStyle: {
|
||||||
color: 'auto',
|
// color: 'auto',
|
||||||
width: 1,
|
// width: 1,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
splitLine: {
|
// splitLine: {
|
||||||
length: 0, // 刻度线分隔线长度
|
// length: 0, // 刻度线分隔线长度
|
||||||
lineStyle: {
|
// lineStyle: {
|
||||||
width: 1,
|
// width: 1,
|
||||||
color: '#061740',
|
// color: '#061740',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
axisLabel: {
|
// axisLabel: {
|
||||||
show: false, // 是否显示刻度标签
|
// show: false, // 是否显示刻度标签
|
||||||
},
|
// },
|
||||||
pointer: {
|
// pointer: {
|
||||||
show: false, // 是否显示指针
|
// show: false, // 是否显示指针
|
||||||
},
|
// },
|
||||||
axisLine: {
|
// axisLine: {
|
||||||
lineStyle: {
|
// lineStyle: {
|
||||||
opacity: 0,
|
// opacity: 0,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
detail: {
|
// detail: {
|
||||||
show: false, // 是否显示仪表盘详情
|
// show: false, // 是否显示仪表盘详情
|
||||||
},
|
// },
|
||||||
data: [{
|
// data: [{
|
||||||
value: 0,
|
// value: 0,
|
||||||
name: '',
|
// name: '',
|
||||||
}, ],
|
// }, ],
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
// console.log( this.$refs.chartRef,'1111');
|
// console.log( this.$refs.chartRef,'1111');
|
||||||
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({
|
// chart.resize({
|
||||||
// width: uni.upx2px(210), // Convert 210rpx to pixels
|
// width: uni.upx2px(210), // Convert 210rpx to pixels
|
||||||
|
|
|
@ -3,6 +3,17 @@
|
||||||
<u-navbar title="设置" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
|
<u-navbar title="设置" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
|
||||||
height='36'></u-navbar>
|
height='36'></u-navbar>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
|
<view class="li" @click.stop="sremakemc()">
|
||||||
|
<view class="tit">
|
||||||
|
设备名称
|
||||||
|
</view>
|
||||||
|
<view class="info">
|
||||||
|
<view class="txt">
|
||||||
|
{{listobj.deviceName}}
|
||||||
|
</view>
|
||||||
|
<view class="iconfont icon-xiangyou1"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="li" @click.stop="sremake()">
|
<view class="li" @click.stop="sremake()">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
备注
|
备注
|
||||||
|
@ -125,7 +136,24 @@
|
||||||
确定
|
确定
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<u-popup v-model="showmc" mode="center" border-radius='20'>
|
||||||
|
<view class="popcard" v-if="showmc">
|
||||||
|
<view class="tit">
|
||||||
|
修改名称
|
||||||
|
</view>
|
||||||
|
<view class="ipt">
|
||||||
|
<u-input v-model="xgname" placeholder=" " border='surround' placeholder-style='font-size: 24rpx;' />
|
||||||
|
</view>
|
||||||
|
<view class="btnbox">
|
||||||
|
<view class="btn2" @click="close()">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view class="btn1" @click="sub(2)">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<view class="btn" @click="deldevice()">
|
<view class="btn" @click="deldevice()">
|
||||||
|
@ -159,6 +187,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
id: '',
|
id: '',
|
||||||
|
xgname:'',
|
||||||
deviceInfo: {},
|
deviceInfo: {},
|
||||||
groupList: {},
|
groupList: {},
|
||||||
showpopup: false,
|
showpopup: false,
|
||||||
|
@ -167,7 +196,7 @@
|
||||||
showpeice: false,
|
showpeice: false,
|
||||||
showremake: false,
|
showremake: false,
|
||||||
listobj: {},
|
listobj: {},
|
||||||
|
showmc:false,
|
||||||
pagenum: 1,
|
pagenum: 1,
|
||||||
wateringList: [],
|
wateringList: [],
|
||||||
pagesize: 10, // 一页多少数据
|
pagesize: 10, // 一页多少数据
|
||||||
|
@ -188,12 +217,6 @@
|
||||||
this.getgroup()
|
this.getgroup()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// taocan(){
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url:'/page_fenbao/statulist/taocanlist/index'
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
sremakes() {
|
sremakes() {
|
||||||
this.showshop = true
|
this.showshop = true
|
||||||
},
|
},
|
||||||
|
@ -279,6 +302,7 @@
|
||||||
}
|
}
|
||||||
this.showpopup = false
|
this.showpopup = false
|
||||||
this.showpeice = false
|
this.showpeice = false
|
||||||
|
this.showmc = false
|
||||||
this.putdevice(data)
|
this.putdevice(data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -317,6 +341,11 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
sremakemc(){
|
||||||
|
console.log(1);
|
||||||
|
this.showmc = true
|
||||||
|
this.xgname = this.listobj.deviceName
|
||||||
|
},
|
||||||
sremake() {
|
sremake() {
|
||||||
this.showpopup = true
|
this.showpopup = true
|
||||||
this.showremake = true
|
this.showremake = true
|
||||||
|
@ -329,7 +358,7 @@
|
||||||
this.showpeice = false
|
this.showpeice = false
|
||||||
this.showremake = false
|
this.showremake = false
|
||||||
this.showpopup = false
|
this.showpopup = false
|
||||||
|
this.showmc = false
|
||||||
},
|
},
|
||||||
getDevice(id) {
|
getDevice(id) {
|
||||||
this.$u.get("/app/device/" + this.id).then((res) => {
|
this.$u.get("/app/device/" + this.id).then((res) => {
|
||||||
|
|
|
@ -109,9 +109,7 @@
|
||||||
<view class="dd">
|
<view class="dd">
|
||||||
<u-select v-model="show" :list="list" title='角色切换' @confirm="confirm"></u-select>
|
<u-select v-model="show" :list="list" title='角色切换' @confirm="confirm"></u-select>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="btntc">
|
|
||||||
退出商户中心
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -143,11 +141,7 @@
|
||||||
this.getuserinfo()
|
this.getuserinfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
btntc(){
|
|
||||||
uni.reLaunch({
|
|
||||||
url:'/pages/shouye/index'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
btnwz(num){
|
btnwz(num){
|
||||||
if(num == 1){
|
if(num == 1){
|
||||||
|
@ -263,22 +257,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 52rpx auto 0;
|
|
||||||
width: 654rpx;
|
|
||||||
height: 100rpx;
|
|
||||||
background: #FF4F4F;
|
|
||||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
|
|
||||||
opacity: 1;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fz {
|
.fz {
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
<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>
|
||||||
<!-- <view class="" @click="scanQRCode()">
|
|
||||||
扫码添加
|
|
||||||
</view> -->
|
|
||||||
<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">
|
||||||
|
@ -23,7 +20,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 房东 -->
|
|
||||||
<view class="fd" >
|
<view class="fd" >
|
||||||
<view class="fd_top">
|
<view class="fd_top">
|
||||||
|
|
||||||
|
@ -94,7 +90,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_left_no">
|
<view class="card_left_no">
|
||||||
电表号:{{item.deviceNo}}
|
S/N码:{{item.deviceNo}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_right">
|
<view class="card_right">
|
||||||
|
@ -187,9 +183,9 @@
|
||||||
|
|
||||||
pagenum: 1,
|
pagenum: 1,
|
||||||
wateringList: [],
|
wateringList: [],
|
||||||
pagesize: 10, // 一页多少数据
|
pagesize: 10,
|
||||||
isLoading: false, // 是否正在加载数据
|
isLoading: false,
|
||||||
noMoreData: false, // 是否没有更多数据
|
noMoreData: false,
|
||||||
total: 0
|
total: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -204,19 +200,14 @@
|
||||||
console.log(this.deviceId,'aaa',this.name);
|
console.log(this.deviceId,'aaa',this.name);
|
||||||
let that = this; // 将外部的 this 绑定到 that 上
|
let that = this; // 将外部的 this 绑定到 that 上
|
||||||
|
|
||||||
// let options= JSON.parse(storedData);
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.userType === '01') { // 注意 '01' 是一个字符串
|
if (this.userType === '01') { // 注意 '01' 是一个字符串
|
||||||
if (uni.getStorageSync('mac')) {
|
if (uni.getStorageSync('mac')) {
|
||||||
this.mac = uni.getStorageSync('mac');
|
this.mac = uni.getStorageSync('mac');
|
||||||
|
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(lb) {
|
success: function(lb) {
|
||||||
console.log('位置信息', lb);
|
|
||||||
console.log('当前位置的经度:' + lb.longitude);
|
|
||||||
console.log('当前位置的纬度:' + lb.latitude);
|
|
||||||
that.gps.lat = lb.latitude;
|
that.gps.lat = lb.latitude;
|
||||||
that.gps.lon = lb.longitude;
|
that.gps.lon = lb.longitude;
|
||||||
that.tobind()
|
that.tobind()
|
||||||
|
@ -284,7 +275,7 @@
|
||||||
// 当前设备是 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
|
||||||
})
|
})
|
||||||
|
@ -297,7 +288,7 @@
|
||||||
uni.removeStorageSync('mac');
|
uni.removeStorageSync('mac');
|
||||||
uni.removeStorageSync('deviceIds');
|
uni.removeStorageSync('deviceIds');
|
||||||
uni.removeStorageSync('name');
|
uni.removeStorageSync('name');
|
||||||
this.getDeviceList(); // 使用 that 而不是 this
|
this.getDeviceList();
|
||||||
} else {
|
} else {
|
||||||
// 处理失败情况
|
// 处理失败情况
|
||||||
}
|
}
|
||||||
|
|
11
pages/my.vue
11
pages/my.vue
|
@ -78,6 +78,10 @@
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uYWpW30vIQ6M4svb7Vnb"></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uYWpW30vIQ6M4svb7Vnb"></image>
|
||||||
<view class="txt">设置</view>
|
<view class="txt">设置</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="botcard" style="padding-left: 220rpx;font-size: 40rpx;font-weight: 600;" @click="btntc">
|
||||||
|
切换用户端
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -106,6 +110,11 @@
|
||||||
this.logins()
|
this.logins()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
btntc(){
|
||||||
|
uni.reLaunch({
|
||||||
|
url:'/pages/shouye/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
topage(num){
|
topage(num){
|
||||||
if(num==0){
|
if(num==0){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -320,7 +329,7 @@ page{
|
||||||
}
|
}
|
||||||
.num{
|
.num{
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
font-size: 22rpx;
|
font-size: 28rpx;
|
||||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #ABA8F4;
|
color: #ABA8F4;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<!-- 用户首页显示 -->
|
<!-- 用户首页显示 -->
|
||||||
<view class="useryonghu">
|
<view class="useryonghu">
|
||||||
<u-navbar :is-back="false" title="首页" :border-bottom="false" :background="bgc" title-color='#000'
|
<u-navbar :is-back="false" title="首页" :border-bottom="false" :background="bgc" title-color='#000'
|
||||||
title-size='36' height='8'></u-navbar>
|
title-size='44' height='44'></u-navbar>
|
||||||
<!-- <view class="title">
|
<!-- <view class="title">
|
||||||
充电宝
|
充电宝
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user