浇花器完善

This commit is contained in:
3321822538@qq.com 2024-11-07 17:44:29 +08:00
parent 27b1b860ab
commit e22e23a04a
6 changed files with 173 additions and 151 deletions

View File

@ -105,7 +105,7 @@
},
//
call() {
let phoneNumber = '15523256562'
let phoneNumber = this.tel
uni.makePhoneCall({
phoneNumber: phoneNumber,
success: function(res) {
@ -142,7 +142,7 @@
let data = {
classifyId:this.classifyId
}
this.$u.get("/app/article/list?pageNum=1&pageSize=999").then(res => {
this.$u.get(`/app/article/list?pageNum=1&pageSize=999&classifyId=${this.classifyId}`).then(res => {
if(res.code == 200){
this.wzlist = res.rows
}
@ -243,15 +243,15 @@
margin: auto;
margin-top: 34rpx;
width: 644rpx;
height: 526rpx;
max-height: 800rpx;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 64rpx 0rpx rgba(0,0,0,0.08);
border-radius: 20rpx;
padding: 36rpx 32rpx;
box-sizing: border-box;
.list{
height: 360rpx;
overflow: scroll;
height: 100%;
// overflow: scroll;
.list_val{
display: flex;
justify-content: space-between;

View File

@ -155,9 +155,9 @@
btn() {
let _this = this
let math = 'static/' + _this.$u.guid(20)
uni.chooseMessageFile({
uni.chooseImage({
count: 9,
type: 'all',
type: 'image',
success(res) {
const tempFilePaths = res.tempFiles
wx.uploadFile({

View File

@ -40,9 +40,10 @@
养护重点
</view>
<view class="txt">
<view class="" v-for="(item,index) in formattedList" :key="index">
{{list.maintenanceFocus == undefined ? '' : list.maintenanceFocus}}
<!-- <view class="" v-for="(item,index) in formattedList" :key="index">
{{item}}
</view>
</view> -->
</view>
</view>
<view class="about">
@ -107,9 +108,9 @@
} else if(this.list.complexity == 6){
this.text = '非常困难'
}
if(res.data.maintenanceFocus != null || res.data.maintenanceFocus.length > 0){
this.parseData(res.data.maintenanceFocus)
}
// if(res.data.maintenanceFocus != null || res.data.maintenanceFocus.length > 0){
// this.parseData(res.data.maintenanceFocus)
// }
} else {
uni.showToast({
title: res.msg,
@ -119,19 +120,19 @@
}
})
},
parseData(text) {
//
const items = text.split('\n')
//
items.forEach((item, index) => {
//
const trimmedItem = item.trim()
//
if (trimmedItem) {
this.formattedList.push(`${trimmedItem}`)
}
})
},
// parseData(text) {
// //
// const items = text.split('\n')
// //
// items.forEach((item, index) => {
// //
// const trimmedItem = item.trim()
// //
// if (trimmedItem) {
// this.formattedList.push(`${trimmedItem}`)
// }
// })
// },
}
}
</script>

View File

@ -14,21 +14,24 @@
<text class="one">型号</text> <text>{{user.model == undefined ? '--' : user.model}}</text>
</view>
<view class="model" style="margin-top: 24rpx;">
<text class="one" style="margin-right: 124rpx;">MAC</text> <text>{{user.mac == undefined ? '--' : user.mac}}</text>
<text class="one" style="margin-right: 124rpx;">MAC</text>
<text>{{user.mac == undefined ? '--' : user.mac}}</text>
</view>
<view class="wifi">
<!-- <view class="wifi">
<view class="">WIFI</view>
<view class="flex">ChangteA-5G <image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image>
</view>
</view>
</view> -->
<view class="wifi" style="margin-top: 78rpx;" @click="xpshow = true">
<view class="">息屏</view>
<view class="flex">{{xptxt}} <image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image>
<view class="flex">{{xptxt}}
<image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image>
</view>
</view>
<view class="wifi" style="margin-top: 24rpx;" @click="gjshow = true">
<view class="">固件更新</view>
<view class="flex">{{gjtxt}}<image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image>
<view class="flex">{{gjtxt}}
<image src="https://api.ccttiot.com/smartmeter/img/static/uiTIUYnR3ClrmqOTyF8F" mode=""></image>
</view>
</view>
<!-- 息屏选择器 -->
@ -37,18 +40,22 @@
<u-select v-model="gjshow" :list="gjlist" @confirm="gjconfirm"></u-select>
<!-- 修改设备名称弹框 -->
<view class="editname" v-if="nameflag">
<view class="top">
修改名称
</view>
<input type="text" v-model="namesb" placeholder="请输入您想要修改的名字" />
<view class="anniu">
<view class="qx" @click="btnqx">
取消
</view>
<view class="top">
修改名称
</view>
<input type="text" v-model="namesb" placeholder="请输入您想要修改的名字" />
<view class="anniu">
<view class="qx" @click="btnqx">
取消
</view>
<view class="qd" @click="btnqd">
确定
</view>
</view>
</view>
</view>
<!-- 解绑 -->
<view class="annius" @click="btnjiebang">
<button>解绑设备</button>
</view>
<!-- 修改名称蒙层 -->
<view class="mask" v-if="nameflag"></view>
@ -62,12 +69,12 @@
return {
xpshow: false,
gjshow: false,
xptxt:'永不',
gjtxt:'v2.1.2',
nameflag:false,
xptxt: '',
gjtxt: 'v2.1.2',
nameflag: false,
xplist: [{
value: '1',
label: '永不'
label: '30秒'
},
{
value: '2',
@ -80,7 +87,8 @@
{
value: '2',
label: '五分钟'
}],
}
],
gjlist: [{
value: '1',
label: 'v2.1.2'
@ -88,10 +96,11 @@
{
value: '2',
label: 'v2.1.3'
}],
deviceid:'',
user:{},
namesb:''
}
],
deviceid: '',
user: {},
namesb: ''
}
},
//
@ -110,51 +119,83 @@
}
},
onLoad(option) {
this.deviceid = option.deviceid
this.deviceid = option.deviceid
this.getshebxq()
},
methods: {
//
btnjiebang() {
let that = this
uni.showModal({
title: '提示',
content: '您确定要解绑当前设备吗?',
success: function(res) {
if (res.confirm) {
that.$u.delete(`//app/device/unbind/${that.deviceid}`).then(res => {
if (res.code == 200) {
uni.showToast({
title: '解绑成功',
icon: 'success',
duration: 2000
})
setTimeout(() => {
uni.navigateBack()
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} else if (res.cancel) {
}
}
})
},
//
getshebxq(){
getshebxq() {
this.$u.get(`/app/getDeviceInfo/${this.deviceid}`).then(res => {
if(res.code == 200){
if (res.code == 200) {
this.user = res.data
}
})
},
//
btnxianshi(){
btnxianshi() {
this.nameflag = true
this.namesb = this.user.deviceName
},
//
xpconfirm(e){
xpconfirm(e) {
this.xptxt = e[0].label
},
//
gjconfirm(e){
//
gjconfirm(e) {
this.gjtxt = e[0].label
},
//
btnqx(){
btnqx() {
this.nameflag = false
},
//
btnqd(){
btnqd() {
this.$u.put(`/app/editDeviceName?deviceId=${this.deviceid}&deviceName=${this.namesb}`).then(res => {
if(res.code == 200){
if (res.code == 200) {
this.nameflag = false
this.user.deviceName = this.namesb
uni.showToast({
title: '修改成功',
icon: 'success',
duration:2000
duration: 2000
})
}else{
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
duration: 2000
})
}
})
@ -164,13 +205,30 @@
</script>
<style lang="less">
.annius {
padding: 0 40rpx;
width: 100%;
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 112rpx;
button {
background: #7FAD76;
border-radius: 52rpx 52rpx 52rpx 52rpx;
color: #fff;
}
}
/deep/ .u-title {
margin-bottom: 22rpx;
}
/deep/ .uicon-nav-back {
margin-bottom: 22rpx;
}
.editname{
.editname {
width: 530rpx;
height: 340rpx;
background-color: #fff;
@ -182,7 +240,8 @@
z-index: 1;
padding: 20rpx;
box-sizing: border-box;
.top{
.top {
font-size: 32rpx;
color: #3D3D3D;
text-align: center;
@ -190,7 +249,8 @@
margin-top: 20rpx;
font-weight: 600;
}
input{
input {
width: 450rpx;
height: 80rpx;
background-color: #eee;
@ -199,32 +259,37 @@
margin-top: 20rpx;
padding-left: 10rpx;
}
.anniu{
.anniu {
display: flex;
justify-content: space-between;
margin-top: 30rpx;
padding: 0 10rpx;
box-sizing: border-box;
view{
view {
width: 48%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
font-size: 32rpx;
}
.qx{
.qx {
border: 1px solid #7FAD76;
border-radius: 20rpx;
color: #7FAD76;
}
.qd{
.qd {
background-color: #7FAD76;
color: #fff;
border-radius: 20rpx;
}
}
}
.mask{
.mask {
width: 100%;
height: 100vh;
background-color: #000;
@ -233,11 +298,13 @@
top: 0;
left: 0;
}
.img {
width: 304rpx;
height: 332rpx;
margin: auto;
}
.name {
width: 100%;
font-weight: 600;
@ -247,12 +314,14 @@
margin-top: 64rpx;
justify-content: center;
align-items: center;
image {
width: 44rpx;
height: 44rpx;
margin-left: 26rpx;
}
}
.model {
width: 100%;
display: flex;
@ -260,11 +329,13 @@
font-size: 32rpx;
color: #3D3D3D;
margin-top: 48rpx;
.one {
margin-left: 74rpx;
margin-right: 144rpx;
}
}
.wifi {
width: 678rpx;
height: 104rpx;
@ -280,9 +351,11 @@
justify-content: space-between;
padding: 0 42rpx;
box-sizing: border-box;
.flex {
display: flex;
align-items: center;
image {
width: 40rpx;
height: 40rpx;

View File

@ -17,6 +17,9 @@
<view class="bang" @click="btnaddsb">
绑定
</view>
<view class="selectnames" @click="btnluru" v-if="userobj.userType == 00">
录入设备
</view>
</view>
<view class="" v-else>
<!-- 选择设备 -->
@ -474,6 +477,8 @@
},
//
btnyushui() {
this.one = false
this.ones = true
if(this.datalist == ''){
let that = this
uni.showModal({
@ -524,6 +529,8 @@
},
//
btnyushuis() {
this.one = false
this.ones = true
if(this.datalist == ''){
let that = this
uni.showModal({
@ -545,7 +552,7 @@
})
}else{
uni.showLoading({
title: '开启中...'
title: '关闭中...'
})
let that = this
uni.getNetworkType({
@ -574,6 +581,8 @@
},
//
btnertong() {
this.two = false
this.twos = true
if(this.datalist == ''){
let that = this
uni.showModal({
@ -624,6 +633,8 @@
},
//
btnertongs() {
this.two = false
this.twos = true
if(this.datalist == ''){
let that = this
uni.showModal({
@ -645,7 +656,7 @@
})
}else{
uni.showLoading({
title: '开启中...'
title: '关闭中...'
})
let that = this
uni.getNetworkType({
@ -970,17 +981,19 @@
switch (options.type) {
case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED:
if (!options.result) {
uni.showModal({
title: '很抱歉提醒你!',
content: '小程序与设备异常断开',
showCancel: false,
//
success: function(res) {
uni.hideLoading()
this.datalist = ''
this.ver_data = ''
}
})
this.datalist = ''
this.ver_data = ''
// uni.showModal({
// title: '',
// content: '',
// showCancel: false,
// //
// success: function(res) {
// uni.hideLoading()
// this.datalist = ''
// this.ver_data = ''
// }
// })
}
break;
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
@ -1202,7 +1215,6 @@
align-items: center;
justify-content: center;
margin-top: 22rpx;
view {
width: 242rpx;
height: 208rpx;
@ -1214,19 +1226,16 @@
font-size: 44rpx;
color: #3D3D3D;
}
text {
font-size: 80rpx;
margin-left: 46rpx;
margin-right: 46rpx;
}
}
.anniu {
display: flex;
justify-content: space-between;
margin-top: 58rpx;
.qx {
width: 278rpx;
height: 80rpx;
@ -1238,7 +1247,6 @@
line-height: 80rpx;
text-align: center;
}
.qd {
width: 278rpx;
height: 80rpx;
@ -1251,31 +1259,25 @@
text-align: center;
}
}
.selected-time {
margin-top: 20px;
font-size: 20px;
}
#activebor {
border: 1px solid #48893B;
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-20px);
/* 初始位置稍微在上方 */
}
to {
opacity: 1;
transform: translateY(0);
/* 最终位置 */
}
}
.manualmask {
width: 100%;
height: 100vh;
@ -1286,7 +1288,6 @@
left: 0;
z-index: 99;
}
.manualjs {
width: 678rpx;
max-height: 610rpx;
@ -1299,7 +1300,6 @@
z-index: 100;
padding: 42rpx 44rpx;
box-sizing: border-box;
.toptit {
font-size: 36rpx;
color: #3D3D3D;
@ -1309,12 +1309,10 @@
align-items: center;
}
}
.page {
padding: 0 40rpx;
box-sizing: border-box;
background-color: #FFFFFF;
// background-color: #FFFFFF;
.tabsb {
width: 750rpx;
height: 90vh;
@ -1330,7 +1328,6 @@
padding-top: 48rpx;
box-sizing: border-box;
animation: fadeInDown .5s ease-out forwards;
.qdan {
width: 100%;
height: 102rpx;
@ -1343,12 +1340,10 @@
border-radius: 20rpx;
margin-top: 40rpx;
}
.sblist {
width: 100%;
height: 68vh;
overflow: scroll;
.sbist_val {
display: flex;
justify-content: space-between;
@ -1359,13 +1354,11 @@
background: #F7F7F7;
border-radius: 20rpx 20rpx 20rpx 20rpx;
border: 1px solid transparent;
.lt {
font-size: 36rpx;
color: #3D3D3D;
font-weight: 600;
}
.rt {
image {
width: 124rpx;
@ -1375,7 +1368,6 @@
}
}
}
.sbmask {
width: 100%;
height: 100vh;
@ -1385,16 +1377,13 @@
left: 0;
opacity: .5;
}
.wusb {
margin-top: 514rpx;
text-align: center;
text {
font-size: 28rpx;
color: #737B80;
}
view {
width: 212rpx;
height: 76rpx;
@ -1409,7 +1398,6 @@
margin-top: 50rpx;
}
}
.wateringlogbox {
width: 100%;
height: 244rpx;
@ -1420,11 +1408,9 @@
margin-top: 20rpx;
padding: 30rpx;
box-sizing: border-box;
.wateringlogbd {
display: flex;
justify-content: space-between;
.lt {
view {
font-size: 28rpx;
@ -1432,7 +1418,6 @@
margin-top: 10rpx;
}
}
.rt {
image {
width: 114rpx;
@ -1440,14 +1425,12 @@
}
}
}
.wateringlogtop {
display: flex;
align-items: center;
font-size: 32rpx;
color: #3D3D3D;
font-weight: 600;
image {
width: 40rpx;
height: 40rpx;
@ -1455,7 +1438,6 @@
}
}
}
.dingshi_he {
margin-top: 24rpx;
width: 304rpx;
@ -1466,39 +1448,33 @@
border-radius: 20rpx;
padding: 26rpx;
box-sizing: border-box;
.naoz {
font-size: 40rpx;
color: #3D3D3D;
font-weight: 600;
display: flex;
justify-content: space-between;
image {
width: 78rpx;
height: 78rpx;
}
}
.dstime {
margin-top: 14rpx;
display: flex;
align-items: center;
width: 100%;
justify-content: space-between;
image {
width: 52rpx;
height: 52rpx;
}
}
}
.switchbox {
margin-top: 24rpx;
display: flex;
justify-content: space-between;
.switch_he {
width: 304rpx;
height: 194rpx;
@ -1508,7 +1484,6 @@
border-radius: 20rpx;
padding: 26rpx;
box-sizing: border-box;
.yushui {
width: 100%;
font-size: 28rpx;
@ -1518,14 +1493,12 @@
justify-content: space-between;
margin-top: 20rpx;
}
image {
width: 78rpx;
height: 78rpx;
}
}
}
.devicebox {
width: 100%;
height: 290rpx;
@ -1536,30 +1509,25 @@
border-radius: 20rpx;
padding: 30rpx;
box-sizing: border-box;
.deviceweek {
display: flex;
justify-content: space-between;
margin-top: 34rpx;
// align-items: center;
.weeklist {
.kg {
font-size: 24rpx;
color: #999999;
font-weight: 600;
}
.weekday {
font-size: 36rpx;
color: #3D3D3D;
font-weight: 600;
margin-top: 4rpx;
}
.img {
text-align: center;
image {
width: 12rpx;
height: 12rpx;
@ -1567,42 +1535,33 @@
}
}
}
.devicetop {
display: flex;
justify-content: space-between;
align-items: center;
.devicert {
text-align: right;
.shoudong {
display: flex;
image {
width: 64rpx;
height: 32rpx;
margin-right: 8rpx;
}
font-size: 24rpx;
color: #3D3D3D;
}
.shengyu {
font-size: 24rpx;
color: #3D3D3D;
margin-top: 6rpx;
}
}
.devicelt {
display: flex;
.xinghao {
font-size: 24rpx;
color: #3D3D3D;
.one {
font-size: 28rpx !important;
color: #3D3D3D;
@ -1610,7 +1569,6 @@
margin-top: 6rpx;
}
}
image {
width: 74rpx;
height: 80rpx;
@ -1619,21 +1577,18 @@
}
}
}
.selectbox {
width: 100%;
margin-top: 22rpx;
display: flex;
justify-content: space-between;
align-items: center;
.shebeiname {
font-size: 36rpx;
color: #73787B;
font-weight: 600;
display: flex;
align-items: center;
text {
display: inline-block;
width: 14rpx;
@ -1644,19 +1599,16 @@
margin-left: 22rpx;
}
}
.shebeiadd {
image {
width: 214rpx;
height: 64rpx;
}
}
.selectname {
font-size: 48rpx;
color: #3D3D3D;
font-weight: 600;
image {
width: 32rpx;
height: 26rpx;
@ -1669,8 +1621,8 @@
border: 1px solid;
padding:0 20rpx;
box-sizing: border-box;
border-radius: 20rpx;
background-color: #48893B;
border-radius: 10rpx;
background-color: #7FAD76;
color: #fff;
height: 60rpx;
line-height: 60rpx;
@ -1680,7 +1632,6 @@
margin-left: 14rpx;
}
}
.selectshezhi {
image {
width: 60rpx;
@ -1688,7 +1639,6 @@
}
}
}
.bjimg {
width: 100%;
height: 100vh;
@ -1697,10 +1647,8 @@
left: 0;
z-index: -1;
}
.title {
box-sizing: border-box;
image {
width: 260rpx;
height: 60rpx;

View File

@ -8,7 +8,7 @@
<button type="primary reverse" open-type="chooseAvatar" @chooseavatar="getImage">
<image :src="imageSrc" mode=""></image>
</button>
<view class="name">{{userobj.nickName == undefined ? '' : userobj.nickName}}</view>
<view class="name">{{userobj.phonenumber == undefined ? '' : userobj.phonenumber}}</view>
</view>
<!-- 帮助与客服 -->
<view class="kefu">