设备分享模块页面功能开发

This commit is contained in:
fengerli
2025-07-16 16:43:22 +08:00
parent 9b3be8c7d7
commit bc3bea6df0
9 changed files with 752 additions and 48 deletions

View File

@ -530,7 +530,7 @@
.ID {
color: rgba(255, 255, 255, 0.6);
font-size: 24rpx;
font-size: 26rpx;
display: flex;
justify-content: space-between;
position: relative;

View File

@ -15,24 +15,26 @@
</view>
<view class="device-name">
<view>设备:{{item.deviceName}}</view>
<view class="ID">ID:{{ item.deviceImei }}</view>
<view class="ID">
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
</view>
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
<!-- <view class="onlines" v-if="item.communicationMode==0">在线</view> -->
<view class="unlines" v-if="item.communicationMode==0">离线</view>
<view>电量90%</view>
</view>
</view>
</view>
<view class="" v-if="item.communicationMode==1">
<view class="device-status online">已连接</view>
<view class="device-status unline">未连接</view>
</view>
<view class="device-info">
<text class="onlines">在线</text>
<text class="line"></text>
<text>电量90</text>
</view>
</view>
</view>
<view style="padding:20rpx;">
<view class="ql-editor">编辑信息</view>
<view class="ql-input">
<textarea placeholder-style="color:rgba(255, 255, 255, 0.4)" placeholder="请输入内容" class="textarea"/>
<textarea placeholder-style="color:rgba(255, 255, 255, 0.4)" placeholder="请输入内容" class="textarea" />
</view>
<button class="login-btn">发送</button>
</view>
@ -48,7 +50,7 @@
export default {
data() {
return {
deviceList:[],
deviceList: [],
}
},
methods: {
@ -69,18 +71,18 @@
this.loading = true;
let data = {
pageNum: 1,
pageSize: 50,
deviceType:deviceType
pageSize: 20,
deviceType: deviceType
}
deviceInfo(data).then((res) => {
if (res.code == 200) {
const newDevices = res.rows.map(device => ({
...device,
showConfirm: false,
checked:false
checked: false
}));
this.total = res.total;
this.deviceList =newDevices
this.deviceList = newDevices
}
}).finally(() => {
this.loading = false;
@ -107,24 +109,30 @@
min-height: 100vh;
background-color: rgb(18, 18, 18);
}
.header {
padding: 30rpx;
text-align: center;
}
.title {
font-size: 36rpx;
color: rgba(255, 255, 255, 0.87);
}
.device-list {
flex: 1;
padding: 0 20rpx;
margin-top: 20rpx;
}
.device-card {
position: relative;
display: flex;
align-items: center;
width: 94%;
width: 95%;
}
.checkbox {
width: 40rpx;
height: 40rpx;
@ -135,10 +143,12 @@
align-items: center;
justify-content: center;
}
.checkbox.checked {
background-color: rgb(187, 230, 0);
border-color: rgb(187, 230, 0);
}
.device-content {
background-color: rgb(26, 26, 26);
border-radius: 16rpx;
@ -147,23 +157,32 @@
/* display: flex; */
align-items: center;
padding: 20rpx;
width: 93%;
width: 95%;
}
.device-header {
display: flex;
align-items: center;
margin-bottom: 15rpx;
}
.device-name {
font-size: 32rpx;
color: rgba(255, 255, 255, 0.87);
margin-left: 24rpx;
margin-left: 12rpx;
line-height: 50rpx;
width: 83%;
white-space: nowrap;
}
.ID {
color: rgba(255, 255, 255, 0.6);
font-size: 26rpx;
display: flex;
justify-content: space-between;
position: relative;
}
.device-status {
width: 122rpx;
height: 52rpx;
@ -180,15 +199,18 @@
.online {
color: rgb(187, 230, 0);
}
.unline {
.unline {
color: rgba(255, 255, 255, 0.4);
}
.device-info {
display: flex;
justify-content: space-evenly;
font-size: 28rpx;
font-size: 26rpx;
color: rgba(255, 255, 255, 0.87);
padding-top: 10rpx;
position: relative;
}
.deviceIMG {
@ -207,6 +229,10 @@
margin-left: 17%;
}
.onlines {
position: relative;
}
.onlines::before {
content: '';
position: absolute;
@ -214,8 +240,23 @@
height: 15rpx;
background: rgb(0, 171, 103);
border-radius: 50%;
left: 98rpx;
bottom: 32rpx
top: 20rpx;
left: -20rpx
}
.unlines {
position: relative;
}
.unlines::before {
content: '';
position: absolute;
width: 15rpx;
height: 15rpx;
background: rgba(255, 255, 255, 0.4);
border-radius: 50%;
top: 20rpx;
left: -20rpx
}
.line {
@ -230,27 +271,29 @@
.ql-editor {
color: rgba(255, 255, 255, 0.6);
font-size:30rpx;
font-size: 30rpx;
}
.ql-input {
width:95.9%;
width: 95.9%;
height: 200rpx;
margin-top: 30rpx;
box-sizing: border-box;
padding: 30rpx;
border-radius:16rpx;
border-radius: 16rpx;
background: rgb(26, 26, 26);
}
.textarea{
.textarea {
color: rgba(255, 255, 255, 0.8);
}
.login-btn {
margin-top:30rpx;
margin-top: 30rpx;
background-color: rgb(187, 230, 0);
color: rgb(35, 35, 35);
border-radius: 50rpx;
width:90%;
width: 90%;
margin-left: 10rpx;
}
</style>