This commit is contained in:
3321822538@qq.com 2024-05-30 18:02:15 +08:00
parent d7837ce2d7
commit ab51ba0938
10 changed files with 641 additions and 414 deletions

View File

@ -87,6 +87,12 @@
setTimeout(()=>{
uni.navigateBack()
},1500)
}else if(res.code == 500){
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1000
})
}
})
} else if (res.cancel) {

View File

@ -98,6 +98,12 @@
setTimeout(()=>{
uni.navigateBack()
},1500)
}else if(res.code == 500){
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1000
})
}
})
} else if (res.cancel) {
@ -112,12 +118,12 @@
success: res => {
console.log('扫描结果:', res);
this.cabinetSn = res.result
this.$u.put(`/agent/cabinet/${this.storeId}/bind/${this.cabinetSn}`).then(res => {
this.$u.put(`/agent/cabinet/${this.cabinetSn}/bind/${this.storeId}`).then(res => {
if(res.code == 200){
uni.showToast({
title: '绑定成功',
icon: 'none',
duration:1000
icon: 'success',
duration:2000
});
}
})
@ -132,7 +138,7 @@
});
}else if(num == 5){
uni.navigateTo({
url:'/pages/agentpages/devicemanagement/chargepallist/index'
url:'/pages/agentpages/devicemanagement/chargepallist/index?storeId=' + this.storeId
})
}
},

View File

@ -280,6 +280,13 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "xiajispxq",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "yunying/gongdan/index",
"style": {

View File

@ -1,9 +1,9 @@
<template>
<view class="page">
<u-navbar title="设备列表" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
<u-navbar title="设备列表" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='58'></u-navbar>
<view class="serchinp">
<u-search placeholder="搜索" v-model="keyword"></u-search>
<u-search placeholder="搜索" v-model="keyword" @custom="btnseach"></u-search>
<view class="xuanze">
<text style="margin-top: 4rpx;" @click="btnstatus(1)">{{zhuangt}}</text> <text
style="width: 2px;height: 40rpx;background-color: #C7C7C7;display: inline-block;"></text> <text
@ -52,33 +52,34 @@
<view class="scrll">
<view class="cdblist">
<view class="cdblist" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
<view class="toptltle">
<view class="toptltle_lt">
<u-icon name="file-text" size="32"></u-icon> fadgfryt168742341682
<u-icon style="margin-right: 10rpx;" name="file-text" size="36" @click="copybtn(item.sn)"></u-icon> {{item.sn}}
</view>
<view class="toptltle_rt" @click="btnxq">
<view class="toptltle_rt" @click="btnxq(item.cabinetId)">
<text></text><text></text><text></text>
</view>
</view>
<view class="cdbcen">
<view class="cdbcen-dpmc">
店铺名称<text>瑞斯特酒店龙安店</text>
店铺名称<text>{{item.storeName}}</text>
</view>
<view class="cdbcen-dpdz">
<view class="">
店铺地址福鼎市兴港路附近中石化森美龙安 加油站
</view>
<view class="sj">
2023-10-04
店铺地址{{item.storeAddress}}
</view>
</view>
<view class="sj">
绑定时间{{item.createTime}}
</view>
<view class="cdbcen-szbz">
<view class="inp">
<text>设置备注</text> <input type="text" placeholder="无" />
<text>设置备注</text> <input type="text" v-model="remark" :placeholder="item.cabinetRemark == null ? '' : item.cabinetRemark" />
</view>
<view class="but">
<view class="but" @click="btnxg(item.cabinetId)">
修改备注
</view>
</view>
@ -89,92 +90,22 @@
<text>网络</text><text>设备状态</text><text>类型</text><text>电池</text><text>可还</text>
</view>
<view class="two">
<text style="color: #1DBE7B;">在线</text><text style="color: #1DBE7B;">正常</text><text>8</text><text>0</text><text>0</text>
<text style="color: #1DBE7B;" v-if="item.onlineStatus == 1">在线</text>
<text style="color: red;" v-if="item.onlineStatus == 0">离线</text>
<text style="color: #1DBE7B;" v-if="item.status == 1">正常</text>
<text style="color: red;" v-if="item.status == 2">异常</text>
<text>{{item.modelName}}</text><text>{{item.currentPowerBankNum}}</text><text>{{item.slotNum - item.currentPowerBankNum}}</text>
</view>
</view>
</view>
<view class="cdblist">
<view class="toptltle">
<view class="toptltle_lt">
<u-icon name="file-text" size="32"></u-icon> fadgfryt168742341682
</view>
<view class="toptltle_rt">
<text></text><text></text><text></text>
</view>
</view>
<view class="cdbcen">
<view class="cdbcen-dpmc">
店铺名称<text>瑞斯特酒店龙安店</text>
</view>
<view class="cdbcen-dpdz">
<view class="">
店铺地址福鼎市兴港路附近中石化森美龙安 加油站
</view>
<view class="sj">
2023-10-04
</view>
</view>
<view class="cdbcen-szbz">
<view class="inp">
<text>设置备注</text> <input type="text" placeholder="无" />
</view>
<view class="but">
修改备注
</view>
</view>
</view>
<view class="" style="width: 100%;height: 1px;background-color: #ccc;margin-top: 10rpx;"> </view>
<view class="cdbbuttom">
<view class="one">
<text>网络</text><text>设备状态</text><text>类型</text><text>电池</text><text>可还</text>
</view>
<view class="two">
<text style="color: #1DBE7B;">在线</text><text style="color: #1DBE7B;">正常</text><text>8</text><text>0</text><text>0</text>
</view>
</view>
</view>
<view class="cdblist">
<view class="toptltle">
<view class="toptltle_lt">
<u-icon name="file-text" @click="copybtn(text)" size="32"></u-icon> {{text}}
</view>
<view class="toptltle_rt">
<text></text><text></text><text></text>
</view>
</view>
<view class="cdbcen">
<view class="cdbcen-dpmc">
店铺名称<text>瑞斯特酒店龙安店</text>
</view>
<view class="cdbcen-dpdz">
<view class="">
店铺地址福鼎市兴港路附近中石化森美龙安 加油站
</view>
<view class="sj">
2023-10-04
</view>
</view>
<view class="cdbcen-szbz">
<view class="inp">
<text>设置备注</text> <input type="text" placeholder="无" />
</view>
<view class="but">
修改备注
</view>
</view>
</view>
<view class="" style="width: 100%;height: 1px;background-color: #ccc;margin-top: 10rpx;"> </view>
<view class="cdbbuttom">
<view class="one">
<text>网络</text><text>设备状态</text><text>类型</text><text>电池</text><text>可还</text>
</view>
<view class="two">
<text style="color: #1DBE7B;">在线</text><text style="color: #1DBE7B;">正常</text><text>8</text><text>0</text><text>0</text>
</view>
</view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/ufLi6IZd5kh1MIEZFYTo" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多设备...</view>
</view>
</view>
<!-- 类型 -->
@ -221,28 +152,122 @@
],
bgc: {
background: '#25CE88'
}
},
agentId:'',
pagenum: 1,
wateringList: [],
pagesize: 10,
isLoading: false,
noMoreData: false,
total: 0,
showflag:false,
keyword:'',
remark:'',
storeId:''
}
},
onLoad(option) {
if(option.storeId){
this.storeId = option.storeId
}else{
this.storeId = ''
}
},
onShow() {
if(this.storeId){
this.pagenum = 1
this.wateringList = []
this.getlists()
}else{
this.agentId = uni.getStorageSync('userdata').agentId
this.pagenum = 1
this.wateringList = []
this.getlist()
}
},
methods: {
copybtn(value){
btnxg(cabinetId){
let data = {
cabinetId:cabinetId,
cabinetRemark:this.remark
}
this.$u.put(`/agent/cabinet/${cabinetId}`,data).then(res=>{
if(res.code == 200){
uni.showToast({
title: '修改备注成功',
icon: 'none',
duration: 1000
})
this.pagenum = 1
this.wateringList = []
this.getlist()
}
})
},
btnseach(){
this.pagenum = 1
this.wateringList = []
this.getlist()
},
getlist() {
this.$u.get('/agent/cabinet/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize + '&keyword=' + this.keyword + '&agentId=' + this.agentId).then(res => {
if (res.code == 200) {
this.total = res.total;
if (this.total > 0) {
this.showflag = false
} else {
this.showflag = true
}
this.totalWithdraw = res.totalWithdraw
this.wateringList = this.wateringList.concat(res.rows);
this.pagenum++;
} else {
this.noMoreData = true;
}
this.isLoading = false
})
},
getlists() {
this.$u.get('/agent/cabinet/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize + '&keyword=' + this.keyword + '&storeId=' + this.storeId).then(res => {
if (res.code == 200) {
this.total = res.total;
if (this.total > 0) {
this.showflag = false
} else {
this.showflag = true
}
this.totalWithdraw = res.totalWithdraw
this.wateringList = this.wateringList.concat(res.rows);
this.pagenum++;
} else {
this.noMoreData = true;
}
this.isLoading = false
})
},
onReachBottom() {
let sum = this.total / this.pagesize
if (this.pagenum - 1 < sum) {
this.getlist();
} else {
uni.showToast({
title: '没有更多设备了',
icon: 'none',
duration: 1000
});
}
},
copybtn(text){
uni.setClipboardData({
data:value,//
success:()=>{//
uni.showToast({//
title:'复制成功'
})
}
data: text,
success: function(res) {
uni.showToast({
title: '复制成功',
});
}
});
// uni.showModal({
// content:value,//
// confirmText:'',
// success:()=>{//
// //uni.setClipboardData
// }
// });
},
btnstatus(num){
@ -263,13 +288,11 @@
this.leix = e[0].label
},
btnxq(){
btnxq(cabinetId){
uni.navigateTo({
url:'/pages/agentpages/devicemanagement/chargepallist/listdetail/index'
url:'/pages/agentpages/devicemanagement/chargepallist/listdetail/index?cabinetId=' + cabinetId
})
}
}
}
</script>
@ -279,6 +302,9 @@
/deep/ .uicon-nav-back {
padding-bottom: 40rpx;
}
.page .serchinp .u-content{
padding-left: 20rpx !important;
}
page {
background: #F4F5F7;
@ -289,18 +315,18 @@
padding-left: 34rpx;
padding-right: 34rpx;
box-sizing: border-box;
position: fixed;
top: 0;
left: 0;
// position: fixed;
// top: 0;
// left: 0;
.scrll{
height: 1000rpx;
height: 100%;
overflow-y: scroll;
margin-top: 24rpx;
padding-bottom: 400rpx;
}
.cdblist{
width: 680rpx;
height: 440rpx;
height: 450rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto;
@ -336,18 +362,18 @@
color: #25CE88;
}
}
.sj{
font-size: 24rpx;
color: #3D3D3D;
margin-top: 10rpx;
}
.cdbcen-dpdz{
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #3D3D3D;
margin-top: 6rpx;
.sj{
font-size: 20rpx;
color: #3D3D3D;
margin-left: 34rpx;
width: 140rpx;
}
}
.cdbcen-szbz{
display: flex;
@ -470,7 +496,7 @@
padding: 0 36rpx;
box-sizing: border-box;
padding-top: 32rpx;
z-index: 99;
/deep/ .u-content {
padding-left: 150rpx;
border-radius: 50rpx 0 0 50rpx !important;

View File

@ -5,31 +5,34 @@
<view class="box">
<view class="boxtop">
<view class="bh">
SDFGA54521684371 <u-icon name="file-text" size="28"></u-icon>
{{xqobj.sn}} <u-icon name="file-text" size="34" @click="copybtn(xqobj.sn)"></u-icon>
</view>
<view class="cdbbuttom">
<view class="one">
<text>网络状态</text><text>设备状态</text><text>可租</text><text>可还</text>
<text>网络状态</text><text>设备状态</text><text>可租</text><text>电池</text><text>可还</text>
</view>
<view class="two">
<text style="color: #1DBE7B;">在线</text><text
style="color: #1DBE7B;">正常</text><text>8</text><text>0</text>
<text style="color: #1DBE7B;" v-if="xqobj.onlineStatus == 1">在线</text>
<text style="color: red;" v-if="xqobj.onlineStatus == 0">离线</text>
<text style="color: #1DBE7B;" v-if="xqobj.status == 1">正常</text>
<text style="color: red;" v-if="xqobj.status == 2">异常</text>
<text>{{xqobj.currentPowerBankNum}}</text><text>{{xqobj.currentPowerBankNum}}</text><text>{{xqobj.slotNum - xqobj.currentPowerBankNum}}</text>
</view>
</view>
<view class="yuny">
<text>已运营3天</text> <text>2024-04-07</text>
<text>已运营{{differenceInDays}}</text> <text>{{xqobj.createTime}}</text>
</view>
</view>
<view class="boxbd">
<view class="butt">
<text>刷新</text> <text>重启设备</text><text>弹出所有</text><text>卡位(8)</text>
<text>刷新</text> <text>重启设备</text><text
@click="btntcsy">弹出所有</text><text>卡位({{xqobj.modelName}})</text>
</view>
<view class="cbdxq">
<view>DGSF1278187964/80%</view><view>DGSF1278187964/80%</view>
<view>DGSF1278187964/80%</view><view>DGSF1278187964/80%</view>
<view></view><view>DGSF1278187964/80%</view>
<view>DGSF1278187964/80%</view><view>DGSF1278187964/80%</view>
<view v-for="(item,index) in list" :key="index" @click="btntc(item.deviceId)">
{{item.sn == null ? '空闲' : item.sn + '/'}}{{item.currentPower == null ? '' : item.currentPower + '%'}}
</view>
</view>
<view class="tishi">
<view class="">
@ -44,22 +47,22 @@
商家信息
</view>
<view class="dpxx">
<text>店铺名称</text> <text style="color: #1DBE7B;">瑞斯特酒店龙安店</text>
<text>店铺名称</text> <text style="color: #1DBE7B;">{{xqobj.storeName}}</text>
</view>
<view class="dpdz">
<text>店铺地址</text> <text>福鼎市兴港路附近中石化森美龙安加油站</text>
<text style="width: 240rpx;">店铺地址</text> <text>{{xqobj.storeAddress}}</text>
</view>
<view class="dxxx">
断线信息
</view>
<view class="zjdx">
<text>最近断线时间</text> <text>--</text>
<text>最近断线时间</text> <text>{{xqobj.lastOfflineTime}}</text>
</view>
<view class="zjdx">
<text>最近登录时间</text> <text>2024-03-28</text>
<text>最近登录时间</text> <text>{{xqobj.lastLoginTime}}</text>
</view>
<view class="zjdx">
<text>最近线时长</text> <text>--</text>
<text>最近线时长</text> <text>--</text>
</view>
</view>
</view>
@ -73,10 +76,118 @@
export default {
data() {
return {
cabinetId: '',
xqobj: {},
differenceInDays: '',
list: [],
bgc: {
background: '#25CE88'
},
}
},
onLoad(option) {
this.cabinetId = option.cabinetId
this.getxq()
},
methods: {
btntcsy() {
if(Array.isArray(this.list)){
let deviceIds = ''
this.list.forEach((item, index) => {
if (item.deviceId) {
if (deviceIds !== '') {
deviceIds += ','
}
deviceIds += item.deviceId
}
})
this.$u.put(`/agent/device/${deviceIds}/pop`).then(res => {
if (res.code == 200) {
uni.showToast({
title: '已弹出所有设备',
icon: 'success',
duration: 2000
})
this.getxq()
}
})
}else{
uni.showToast({
title: '所有设备均已弹出',
icon: 'none',
duration: 2000
})
}
},
btntc(deviceId) {
if (deviceId) {
this.$u.put(`/agent/device/${deviceId}/pop`).then(res => {
if (res.code == 200) {
uni.showToast({
title: '已弹出该设备',
icon: 'success',
duration: 2000
})
this.getxq()
}
})
} else {
uni.showToast({
title: '该空位无设备',
icon: 'none',
duration: 2000
});
}
},
getxq() {
this.$u.get(`/agent/cabinet/${this.cabinetId}`).then(res => {
if (res.code == 200) {
this.xqobj = res.data
this.list = res.data.currentDeviceList
if (this.list) {
let allSlots = Array.from({
length: this.xqobj.slotNum
}, (_, i) => i + 1);
let missingSlots = [];
this.list.forEach(item => {
let index = allSlots.indexOf(item.currentSlot);
if (index !== -1) {
allSlots.splice(index, 1);
}
})
missingSlots = allSlots;
missingSlots.forEach(slot => {
this.list.push({
currentSlot: slot
})
this.list.sort((a, b) => b.currentSlot - a.currentSlot)
})
} else {
this.list = this.xqobj.slotNum
console.log(this.list)
}
let dateTime = new Date(this.xqobj.createTime);
if (isNaN(dateTime.getTime())) {
console.error(`无法解析日期时间字符串: ${this.xqobj.createTime}`);
return;
}
let now = new Date().getTime();
let differenceInMilliseconds = now - dateTime.getTime();
this.differenceInDays = Math.floor(differenceInMilliseconds / (1000 * 60 * 60 * 24))
}
})
},
copybtn(text) {
uni.setClipboardData({
data: text,
success: function(res) {
uni.showToast({
title: '复制成功',
});
}
});
},
}
}
@ -87,15 +198,16 @@
/deep/ .uicon-nav-back {
padding-bottom: 40rpx;
}
page {
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
// background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
}
.page {
width: 750rpx;
position: fixed;
top: 0;
left: 0;
// position: fixed;
// top: 0;
// left: 0;
.box {
width: 750rpx;
@ -106,46 +218,53 @@
.boxbd {
width: 750rpx;
height: 1118rpx;
height: 100%;
background: #FFFFFF;
padding: 30rpx 42rpx;
box-sizing: border-box;
margin-top: 32rpx;
.tishi{
.tishi {
text-align: center;
margin-top: 24rpx;
font-weight: 500;
font-size: 24rpx;
color: #FF4444;
}
.sjxx{
.sjxx {
margin-top: 54rpx;
.tit{
font-weight: 500;
.tit {
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
}
.dpxx{
.dpxx {
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #808080;
margin-top: 24rpx;
}
.dpdz{
.dpdz {
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #808080;
margin-top: 24rpx;
}
.dxxx{
font-weight: 500;
.dxxx {
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
margin-top: 24rpx;
}
.zjdx{
.zjdx {
display: flex;
justify-content: space-between;
font-size: 28rpx;
@ -153,15 +272,17 @@
margin-top: 24rpx;
}
}
.cbdxq {
width: 680rpx;
height: 344rpx;
// height: 344rpx;
background: #F2F3F5;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto;
margin-top: 52rpx;
padding: 20rpx 12rpx;
padding: 20rpx 12rpx;
box-sizing: border-box;
view {
display: inline-block;
width: 314rpx;

View File

@ -144,7 +144,7 @@
</view>
<view class="device">
<view class="iconlist">
<image src="../../../static/dlimage/dlsmwh.png" mode="" @click="btnpage(3)"></image>
<!-- <image src="../../../static/dlimage/dlsmwh.png" mode="" @click="btnpage(3)"></image> -->
<image src="../../../static/dlimage/sbgz.png" mode="" @click="btnpage(4)"></image>
<image src="../../../static/dlimage/dlwxsb.png" mode="" @click="btnpage(5)"></image>
</view>
@ -210,6 +210,15 @@
scanType: ['qrCode'],
success: res => {
console.log('扫描结果:', res);
this.$u.put(`/agent/cabinet/${res.result}/unbindStore`).then(res=>{
if(res.code == 200){
uni.showToast({
title: '撤机成功',
icon: 'success',
duration: 2000
})
}
})
},
fail: err => {
console.error('扫描失败:', err);

View File

@ -2,181 +2,113 @@
<view class="page">
<u-navbar title="下级设备列表" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='58'></u-navbar>
<view class="serchinp">
<u-search placeholder="搜索" v-model="keyword"></u-search>
<view class="xuanze">
<text style="margin-top: 4rpx;" @click="btnstatus(1)">{{zhuangt}}</text> <text
style="width: 2px;height: 40rpx;background-color: #C7C7C7;display: inline-block;"></text> <text
style="margin-top: 4rpx;" @click="btnstatus(2)">{{leix}}</text>
</view>
<view class="serchinp">
<u-search placeholder="搜索" v-model="keyword" @custom="btnseach"></u-search>
<view class="xuanze">
<text style="margin-top: 4rpx;" @click="btnstatus(1)">{{zhuangt}}</text> <text
style="width: 2px;height: 40rpx;background-color: #C7C7C7;display: inline-block;"></text> <text
style="margin-top: 4rpx;" @click="btnstatus(2)">{{leix}}</text>
</view>
<view class="device">
<view class="shuju">
<view class="ddje">
<view class="shu">
设备总数
</view>
<view class="sb">
50
</view>
</view>
<view class="device">
<view class="shuju">
<view class="ddje">
<view class="shu">
设备总数
</view>
<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
<view class="ddje">
<view class="shu">
未上机数
</view>
<view class="sb">
0
</view>
<view class="sb">
50
</view>
<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
<view class="ddje">
<view class="shu">
在线数
</view>
<view class="sb">
47
</view>
</view>
<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
<view class="ddje">
<view class="shu">
未上机数
</view>
<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
<view class="ddje">
<view class="shu">
离线数
</view>
<view class="sb">
3
</view>
<view class="sb">
0
</view>
</view>
<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
<view class="ddje">
<view class="shu">
在线数
</view>
<view class="sb">
47
</view>
</view>
<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
<view class="ddje">
<view class="shu">
离线数
</view>
<view class="sb">
3
</view>
</view>
</view>
<view class="scrll">
<view class="cdblist">
<view class="toptltle">
<view class="toptltle_lt">
<u-icon name="file-text" size="32"></u-icon> fadgfryt168742341682
</view>
<view class="toptltle_rt" @click="btnxq">
<text></text><text></text><text></text>
</view>
</view>
<view class="scrll">
<view class="cdblist" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
<view class="toptltle">
<view class="toptltle_lt">
<u-icon style="margin-right: 10rpx;" name="file-text" size="36"
@click="copybtn(item.sn)"></u-icon> {{item.sn}}
</view>
<view class="cdbcen">
<view class="cdbcen-dpmc">
店铺名称<text>瑞斯特酒店龙安店</text>
</view>
<view class="cdbcen-dpdz">
<view class="">
店铺地址福鼎市兴港路附近中石化森美龙安 加油站
</view>
<view class="sj">
2023-10-04
</view>
</view>
<view class="cdbcen-szbz">
<view class="inp">
<text>设置备注</text> <input type="text" placeholder="无" />
</view>
<view class="but">
修改备注
</view>
</view>
<view class="toptltle_rt" @click="btnxq(item.cabinetId)">
<text></text><text></text><text></text>
</view>
<view class="" style="width: 100%;height: 1px;background-color: #ccc;margin-top: 10rpx;"> </view>
<view class="cdbbuttom">
<view class="one">
<text>网络</text><text>设备状态</text><text>类型</text><text>电池</text><text>可还</text>
</view>
<view class="cdbcen">
<view class="cdbcen-dpmc">
店铺名称<text>{{item.storeName}}</text>
</view>
<view class="cdbcen-dpdz">
<view class="">
店铺地址{{item.storeAddress}}
</view>
<view class="two">
<text style="color: #1DBE7B;">在线</text><text style="color: #1DBE7B;">正常</text><text>8</text><text>0</text><text>0</text>
</view>
<view class="sj">
绑定时间{{item.createTime}}
</view>
<view class="cdbcen-szbz">
<view class="inp">
<text>设置备注</text> <input type="text"
:placeholder="item.remark == null ? '无' : item.remark" />
</view>
<view class="but">
修改备注
</view>
</view>
</view>
<view class="cdblist">
<view class="toptltle">
<view class="toptltle_lt">
<u-icon name="file-text" size="32"></u-icon> fadgfryt168742341682
</view>
<view class="toptltle_rt">
<text></text><text></text><text></text>
</view>
<view class="" style="width: 100%;height: 1px;background-color: #ccc;margin-top: 10rpx;"> </view>
<view class="cdbbuttom">
<view class="one">
<text>网络</text><text>设备状态</text><text>类型</text><text>电池</text><text>可还</text>
</view>
<view class="cdbcen">
<view class="cdbcen-dpmc">
店铺名称<text>瑞斯特酒店龙安店</text>
</view>
<view class="cdbcen-dpdz">
<view class="">
店铺地址福鼎市兴港路附近中石化森美龙安 加油站
</view>
<view class="sj">
2023-10-04
</view>
</view>
<view class="cdbcen-szbz">
<view class="inp">
<text>设置备注</text> <input type="text" placeholder="无" />
</view>
<view class="but">
修改备注
</view>
</view>
</view>
<view class="" style="width: 100%;height: 1px;background-color: #ccc;margin-top: 10rpx;"> </view>
<view class="cdbbuttom">
<view class="one">
<text>网络</text><text>设备状态</text><text>类型</text><text>电池</text><text>可还</text>
</view>
<view class="two">
<text style="color: #1DBE7B;">在线</text><text style="color: #1DBE7B;">正常</text><text>8</text><text>0</text><text>0</text>
</view>
</view>
</view>
<view class="cdblist">
<view class="toptltle">
<view class="toptltle_lt">
<u-icon name="file-text" size="32"></u-icon> fadgfryt168742341682
</view>
<view class="toptltle_rt">
<text></text><text></text><text></text>
</view>
</view>
<view class="cdbcen">
<view class="cdbcen-dpmc">
店铺名称<text>瑞斯特酒店龙安店</text>
</view>
<view class="cdbcen-dpdz">
<view class="">
店铺地址福鼎市兴港路附近中石化森美龙安 加油站
</view>
<view class="sj">
2023-10-04
</view>
</view>
<view class="cdbcen-szbz">
<view class="inp">
<text>设置备注</text> <input type="text" placeholder="无" />
</view>
<view class="but">
修改备注
</view>
</view>
</view>
<view class="" style="width: 100%;height: 1px;background-color: #ccc;margin-top: 10rpx;"> </view>
<view class="cdbbuttom">
<view class="one">
<text>网络</text><text>设备状态</text><text>类型</text><text>电池</text><text>可还</text>
</view>
<view class="two">
<text style="color: #1DBE7B;">在线</text><text style="color: #1DBE7B;">正常</text><text>8</text><text>0</text><text>0</text>
</view>
<view class="two">
<text style="color: #1DBE7B;" v-if="item.onlineStatus == 1">在线</text>
<text style="color: red;" v-if="item.onlineStatus == 0">离线</text>
<text style="color: #1DBE7B;" v-if="item.status == 1">正常</text>
<text style="color: red;" v-if="item.status == 2">异常</text>
<text>{{item.modelName}}</text><text>{{item.currentPowerBankNum}}</text><text>{{item.slotNum - item.currentPowerBankNum}}</text>
</view>
</view>
</view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/ufLi6IZd5kh1MIEZFYTo" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多设备...</view>
</view>
</view>
<!-- 类型 -->
<u-select v-model="zhuangtaishow" :list="zhaungtailist" @confirm="confirmzt"></u-select>
<!-- 状态 -->
@ -199,8 +131,8 @@
label: '离线'
}
],
zhuangt:'状态',
leix:'类型',
zhuangt: '状态',
leix: '类型',
leixinglist: [{
value: '1',
label: '4'
@ -220,31 +152,126 @@
],
bgc: {
background: '#25CE88'
}
},
ancestorAgentId: '',
pagenum: 1,
wateringList: [],
pagesize: 10,
isLoading: false,
noMoreData: false,
total: 0,
showflag: false,
keyword: '',
storeId:''
}
},
onLoad(option) {
if(option.storeId){
this.storeId = option.storeId
}else{
this.storeId = ''
}
},
onShow() {
if(this.storeId){
this.pagenum = 1
this.wateringList = []
this.getlists()
}else{
this.ancestorAgentId = uni.getStorageSync('userdata').agentId
this.pagenum = 1
this.wateringList = []
this.getlist()
}
},
methods: {
btnstatus(num){
if(num == 1){
btnseach() {
this.pagenum = 1
this.wateringList = []
this.getlist()
},
getlist() {
this.$u.get('/agent/cabinet/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize + '&keyword=' +
this.keyword + '&ancestorAgentId=' + this.ancestorAgentId).then(res => {
if (res.code == 200) {
this.total = res.total;
if (this.total > 0) {
this.showflag = false
} else {
this.showflag = true
}
this.totalWithdraw = res.totalWithdraw
this.wateringList = this.wateringList.concat(res.rows);
this.pagenum++;
} else {
this.noMoreData = true;
}
this.isLoading = false
})
},
getlists() {
this.$u.get('/agent/cabinet/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize + '&keyword=' + this.keyword + '&storeId=' + this.storeId).then(res => {
if (res.code == 200) {
this.total = res.total;
if (this.total > 0) {
this.showflag = false
} else {
this.showflag = true
}
this.totalWithdraw = res.totalWithdraw
this.wateringList = this.wateringList.concat(res.rows);
this.pagenum++;
} else {
this.noMoreData = true;
}
this.isLoading = false
})
},
onReachBottom() {
let sum = this.total / this.pagesize
if (this.pagenum - 1 < sum) {
this.getlist();
} else {
uni.showToast({
title: '没有更多设备了',
icon: 'none',
duration: 1000
});
}
},
copybtn(text) {
uni.setClipboardData({
data: text,
success: function(res) {
uni.showToast({
title: '复制成功',
});
}
});
},
btnstatus(num) {
if (num == 1) {
this.zhuangtaishow = true
this.leixingshow = false
}else{
} else {
this.zhuangtaishow = false
this.leixingshow = true
}
},
confirmzt(e){
confirmzt(e) {
console.log(e);
this.zhuangt = e[0].label
},
confirmlx(e){
confirmlx(e) {
console.log(e);
this.leix = e[0].label
},
btnxq(){
btnxq(cabinetId) {
uni.navigateTo({
url:'/pages/agentpages/devicemanagement/chargepallist/listdetail/index'
url: '/pages/agentpages/devicemanagement/chargepallist/listdetail/index?cabinetId=' + cabinetId
})
}
}
@ -256,8 +283,11 @@
/deep/ .uicon-nav-back {
padding-bottom: 40rpx;
}
.page .serchinp .u-content{
padding-left: 20rpx !important;
}
page {
background: #F4F5F7 ;
background: #F4F5F7;
}
.page {
@ -265,78 +295,92 @@
padding-left: 34rpx;
padding-right: 34rpx;
box-sizing: border-box;
position: fixed;
top: 0;
left: 0;
.scrll{
height: 1000rpx;
// position: fixed;
// top: 0;
// left: 0;
.scrll {
height: 100%;
overflow-y: scroll;
margin-top: 24rpx;
padding-bottom: 400rpx;
}
.cdblist{
.cdblist {
width: 680rpx;
height: 440rpx;
height: 450rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto;
margin-top: 24rpx;
.cdbbuttom{
.cdbbuttom {
padding: 26rpx 60rpx;
box-sizing: border-box;
font-size: 24rpx;
color: #3D3D3D;
text{
text {
width: 100rpx;
text-align: center;
}
.one{
.one {
display: flex;
justify-content: space-between;
}
.two{
.two {
display: flex;
justify-content: space-between;
margin-top: 16rpx;
}
}
.cdbcen{
.cdbcen {
padding: 24rpx 30rpx;
box-sizing: border-box;
.cdbcen-dpmc{
.cdbcen-dpmc {
font-size: 24rpx;
color: #3D3D3D;
text{
text {
font-size: 24rpx;
color: #25CE88;
}
}
.cdbcen-dpdz{
.cdbcen-dpdz {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #3D3D3D;
margin-top: 6rpx;
.sj{
.sj {
font-size: 20rpx;
color: #3D3D3D;
margin-left: 34rpx;
width: 140rpx;
}
}
.cdbcen-szbz{
.cdbcen-szbz {
display: flex;
justify-content: space-between;
margin-top: 6rpx;
font-size: 24rpx;
color: #3D3D3D;
text{
text {
padding-top: 6rpx;
}
.inp{
.inp {
display: flex;
input{
input {
width: 354rpx;
height: 30rpx;
background: #F0F0F0;
@ -346,7 +390,8 @@
color: #808080;
}
}
.but{
.but {
width: 110rpx;
height: 44rpx;
background: #1DBE7B;
@ -358,12 +403,14 @@
}
}
}
.toptltle{
.toptltle {
display: flex;
justify-content: space-between;
width: 100%;
border-bottom: 1px solid #ccc;
.toptltle_lt{
.toptltle_lt {
padding-top: 24rpx;
padding-left: 32rpx;
box-sizing: border-box;
@ -371,11 +418,13 @@
color: #808080;
padding-bottom: 24rpx;
}
.toptltle_rt{
.toptltle_rt {
padding-top: 12rpx;
padding-right: 32rpx;
box-sizing: border-box;
text{
text {
display: inline-block;
width: 8rpx;
height: 8rpx;
@ -386,57 +435,60 @@
}
}
}
.device {
.device {
width: 100%;
margin-top: 210rpx;
.iconlist {
display: flex;
padding: 0 40rpx;
box-sizing: border-box;
margin-top: 24rpx;
width: 680rpx;
height: 180rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding-top: 38rpx;
image {
width: 96rpx;
height: 98rpx;
margin-right: 66rpx;
}
}
.shuju {
display: flex;
justify-content: space-between;
padding: 0 40rpx;
box-sizing: border-box;
margin-top: 24rpx;
width: 680rpx;
height: 180rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding-top: 38rpx;
.ddje {
text-align: center;
.shu {
font-weight: 500;
font-size: 24rpx;
color: #3D3D3D;
}
.sb {
margin-top: 20rpx;
font-weight: 500;
font-size: 40rpx;
color: #3D3D3D;
}
}
}
}
.iconlist {
display: flex;
padding: 0 40rpx;
box-sizing: border-box;
margin-top: 24rpx;
width: 680rpx;
height: 180rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding-top: 38rpx;
image {
width: 96rpx;
height: 98rpx;
margin-right: 66rpx;
}
}
.shuju {
display: flex;
justify-content: space-between;
padding: 0 40rpx;
box-sizing: border-box;
margin-top: 24rpx;
width: 680rpx;
height: 180rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding-top: 38rpx;
.ddje {
text-align: center;
.shu {
font-weight: 500;
font-size: 24rpx;
color: #3D3D3D;
}
.sb {
margin-top: 20rpx;
font-weight: 500;
font-size: 40rpx;
color: #3D3D3D;
}
}
}
}
.serchinp {
width: 750rpx;
height: 180rpx;
@ -446,7 +498,7 @@
padding: 0 36rpx;
box-sizing: border-box;
padding-top: 32rpx;
z-index: 99;
/deep/ .u-content {
padding-left: 150rpx;
border-radius: 50rpx 0 0 50rpx !important;

View File

@ -43,7 +43,7 @@
</view>
<view class="gzlist">
<view class="jfgz">
<text>计费规则</text>{{item.feePrice}}/小时{{item.feeFreeTime}}分钟免费日封顶{{item.feePrice * 24}}
<text>计费规则</text>{{item.feePrice}}/小时{{item.feeFreeTime}}分钟免费日封顶{{item.feeMaxPrice}}
</view>
<view class="phone">
<text>联系电话</text>{{item.contactMobile}}
@ -142,7 +142,7 @@
},
btnxq(item){
uni.navigateTo({
url:'/page_user/shopdetail?storeId=' + item.storeId
url:'/page_user/xiajispxq?storeId=' + item.storeId
})
}
}

View File

@ -8,7 +8,7 @@
</view>
<view class="list">
<view class="listitem" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
<view class="listitem" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
<view class="toptit">
<u-icon name="calendar-fill" size="36"></u-icon>
<view class="tit">
@ -43,7 +43,7 @@
</view>
<view class="gzlist">
<view class="jfgz">
<text>计费规则</text>{{item.feePrice == null ? 0 : item.feePrice}}/小时{{item.feeFreeTime == null ? 0 : item.feeFreeTime}}分钟免费封顶{{item.feePrice * 24}}
<text>计费规则</text>{{item.feePrice == null ? 0 : item.feePrice}}/小时{{item.feeFreeTime == null ? 0 : item.feeFreeTime}}分钟免费封顶{{item.feeMaxPrice}}
</view>
<view class="phone">
<text>联系电话</text>{{item.contactMobile}}
@ -57,7 +57,6 @@
</view>
</view>
</view>
</view>
</view>

View File

@ -72,6 +72,7 @@
}
},
onShow() {
this.pagenum = 1
this.wateringList = []
this.getlist()
},