|
|
|
@ -6,7 +6,7 @@
|
|
|
|
|
<!-- 使用自定义导航栏 -->
|
|
|
|
|
<view v-show="!pageLoading">
|
|
|
|
|
<custom-navbar :title="navTitle" :showBack="true" color="#FFFFFF"
|
|
|
|
|
:rightIcon="isRightIconVisible ? '/static/images/shape.png' : ''"
|
|
|
|
|
:rightIcon="isRightIconVisible ? '/static/images/common/shape.png' : ''"
|
|
|
|
|
@right-click="shareUp"></custom-navbar>
|
|
|
|
|
<view class="device-detail-container" :style="{ paddingTop: navBarHeight + 'px' }">
|
|
|
|
|
<!-- 设备电量信息 -->
|
|
|
|
@ -16,14 +16,14 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="battery-v1">
|
|
|
|
|
<image src="/static/images/dl.png" class="dlIMG"></image>
|
|
|
|
|
<image src="/static/images/common/dl.png" class="dlIMG"></image>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="battery-v2">{{deviceInfo.batteryPercentage}}%</view>
|
|
|
|
|
<view class="battery-v3">电量</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="battery-v1">
|
|
|
|
|
<image src="/static/images/nz.png" class="dlIMG" mode="aspectFit"></image>
|
|
|
|
|
<image src="/static/images/common/nz.png" class="dlIMG" mode="aspectFit"></image>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="battery-v2">{{deviceInfo.batteryRemainingTime || '0分钟'}}</view>
|
|
|
|
|
<view class="battery-v3">续航时间</view>
|
|
|
|
@ -45,13 +45,16 @@
|
|
|
|
|
<text class="info-value status-running">{{deviceInfo.onlineStatus===0?'离线':'在线'}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info-row">
|
|
|
|
|
<text class="info-label">定位信息</text>
|
|
|
|
|
<view class="info-value status-running" @click="gpsPosition">
|
|
|
|
|
<view class="info-value status-running">114.72 30.28</view>
|
|
|
|
|
<text class="info-label" style="display: flex; align-items: center;">定位信息</text>
|
|
|
|
|
<view class="info-value status-running" @click="gpsPosition(deviceInfo)">
|
|
|
|
|
<view class="info-value status-running">
|
|
|
|
|
{{ deviceInfo && deviceInfo.longitude ? Number(deviceInfo.longitude).toFixed(4) : '' }}
|
|
|
|
|
{{ deviceInfo && deviceInfo.latitude ? Number(deviceInfo.latitude).toFixed(4) : '' }}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info-value status-running locationGPS">
|
|
|
|
|
<uni-icons @click="toggleForm" type="location" size="17"
|
|
|
|
|
color="rgba(255, 255, 255, 0.8)" style="vertical-align: bottom;" />
|
|
|
|
|
深圳市龙华区富源晟
|
|
|
|
|
{{deviceInfo.address}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
@ -64,7 +67,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 灯光亮度控制 -->
|
|
|
|
|
<view class="control-card">
|
|
|
|
|
<view class="control-card" @touchmove.prevent>
|
|
|
|
|
<slider :value="sliderValue" min="10" max="100" activeColor="rgb(187, 230, 0)"
|
|
|
|
|
backgroundColor="rgb(26, 26, 26)" :show-value="false" @changing="onSliderChanging"
|
|
|
|
|
@change="onSliderChanging" />
|
|
|
|
@ -75,7 +78,7 @@
|
|
|
|
|
<view class="mode-buttons">
|
|
|
|
|
<view class="mode-v1" v-if="hasPermission('1')">
|
|
|
|
|
<view class="mode-v2" @click="selectMode('main')">
|
|
|
|
|
<image src="/static/images/set.png" class="setIMG"></image>
|
|
|
|
|
<image src="/static/images/6170/set.png" class="setIMG"></image>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="battery-v2">灯光模式</view>
|
|
|
|
|
<view class="mode-v3">{{ currentMainMode }}</view>
|
|
|
|
@ -84,7 +87,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mode-v1" v-if="hasPermission('2')">
|
|
|
|
|
<view class="mode-v2" @click="lasermode">
|
|
|
|
|
<image src="/static/images/jg.png" class="setIMG" mode="aspectFit"></image>
|
|
|
|
|
<image src="/static/images/6170/jg.png" class="setIMG" mode="aspectFit"></image>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="battery-v2">激光模式</view>
|
|
|
|
|
</view>
|
|
|
|
@ -92,7 +95,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mode-v1" v-if="hasPermission('3')">
|
|
|
|
|
<view class="mode-v2" @click="uploadStartup">
|
|
|
|
|
<image src="/static/images/path7.png" class="setIMG" mode="aspectFit"></image>
|
|
|
|
|
<image src="/static/images/common/path7.png" class="setIMG" mode="aspectFit"></image>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="battery-v2">开机画面</view>
|
|
|
|
|
<view class="mode-v3">上传</view>
|
|
|
|
@ -147,15 +150,15 @@
|
|
|
|
|
<view class="section-title">产品信息</view>
|
|
|
|
|
<view class="mode-buttons">
|
|
|
|
|
<view class="mode_1" @click="productparams">
|
|
|
|
|
<image src="/static/images/cp.png" mode="" class="cpIMG" mode="aspectFit"></image>
|
|
|
|
|
<image src="/static/images/common/cp.png" mode="" class="cpIMG" mode="aspectFit"></image>
|
|
|
|
|
<view class="">产品参数</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mode_1" @click="operatingInst">
|
|
|
|
|
<image src="/static/images/sm.png" mode="" class="cpIMG" mode="aspectFit"></image>
|
|
|
|
|
<image src="/static/images/common/sm.png" mode="" class="cpIMG" mode="aspectFit"></image>
|
|
|
|
|
<view class="">操作说明</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="mode_1" @click="operatingVideo">
|
|
|
|
|
<image src="/static/images/sp.png" mode="" class="cpIMG" mode="aspectFit"></image>
|
|
|
|
|
<image src="/static/images/common/sp.png" mode="" class="cpIMG" mode="aspectFit"></image>
|
|
|
|
|
<view class="">操作视频</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
@ -189,10 +192,7 @@
|
|
|
|
|
<view class="popup-title">上传开机画面</view>
|
|
|
|
|
<view class="popup-content">
|
|
|
|
|
<view class="example-body">
|
|
|
|
|
<!-- <uni-file-picker limit="1" class="custom-file-picker"></uni-file-picker> -->
|
|
|
|
|
<view class="icoContent" @click="checkImgUpload">
|
|
|
|
|
<!-- <image mode="aspectFit" class="img" src="/static/images/6155/DeviceDetail/add.png">
|
|
|
|
|
</image> -->
|
|
|
|
|
<image v-if="selectedImage" :src="selectedImage" mode="aspectFit" class="img"
|
|
|
|
|
style="width: 100%; height: 100%;"></image>
|
|
|
|
|
<image v-else mode="aspectFit" class="img"
|
|
|
|
@ -228,7 +228,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 人员信息成功提示弹框 -->
|
|
|
|
|
<CustomPopup :show="showPopupFlag" :message="popupMessage" icon="/static/images/sendSucc.png"
|
|
|
|
|
<CustomPopup :show="showPopupFlag" :message="popupMessage" icon="/static/images/common/sendSucc.png"
|
|
|
|
|
:confirm-text="popupConfirmText" :show-cancel="false" @confirm="onPopupConfirm" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
@ -306,9 +306,17 @@
|
|
|
|
|
this.lightModeC = false;
|
|
|
|
|
},
|
|
|
|
|
// *******定位******
|
|
|
|
|
gpsPosition() {
|
|
|
|
|
gpsPosition(item) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/common/map/index'
|
|
|
|
|
url: '/pages/common/map/index',
|
|
|
|
|
events: {
|
|
|
|
|
ack: function(data) {}
|
|
|
|
|
},
|
|
|
|
|
success: (res) => {
|
|
|
|
|
res.eventChannel.emit('MapData', {
|
|
|
|
|
data: item
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// ***********进度条***********
|
|
|
|
@ -334,31 +342,31 @@
|
|
|
|
|
this.items = [{
|
|
|
|
|
text: '强光',
|
|
|
|
|
selected: this.currentMainMode === '强光', // 修正匹配条件
|
|
|
|
|
image: '/static/images/sett.png',
|
|
|
|
|
image: '/static/images/6170/sett.png',
|
|
|
|
|
instructValue: '1'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: '弱光',
|
|
|
|
|
selected: this.currentMainMode === '弱光',
|
|
|
|
|
image: '/static/images/rg.png',
|
|
|
|
|
image: '/static/images/6170/rg.png',
|
|
|
|
|
instructValue: '2'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: '爆闪',
|
|
|
|
|
selected: this.currentMainMode === '爆闪',
|
|
|
|
|
image: '/static/images/bs.png',
|
|
|
|
|
image: '/static/images/6170/bs.png',
|
|
|
|
|
instructValue: '3'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: '泛光',
|
|
|
|
|
selected: this.currentMainMode === '泛光',
|
|
|
|
|
image: '/static/images/settt.png',
|
|
|
|
|
image: '/static/images/6170/settt.png',
|
|
|
|
|
instructValue: '4'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: '关闭',
|
|
|
|
|
selected: this.currentMainMode === '关闭',
|
|
|
|
|
image: '/static/images/close.png',
|
|
|
|
|
image: '/static/images/6170/close.png',
|
|
|
|
|
instructValue: '0'
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
@ -488,7 +496,7 @@
|
|
|
|
|
// 显示上传中加载提示
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '上传中...',
|
|
|
|
|
mask: true
|
|
|
|
|
mask: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
uni.uploadFile({
|
|
|
|
@ -737,14 +745,9 @@
|
|
|
|
|
this.mqttClient.connect(() => {
|
|
|
|
|
console.log('MQTT 连接成功,开始订阅主题');
|
|
|
|
|
// 订阅来自设备的状态更新
|
|
|
|
|
const statusTopic = `A/${this.itemInfo.nnnnnnnnnnnnnnnnnnn}`;
|
|
|
|
|
const statusTopic = `A/${this.deviceID}`;
|
|
|
|
|
this.mqttClient.subscribe(statusTopic, (payload) => {
|
|
|
|
|
console.log(`收到来自 ${statusTopic} 的消息:`, payload);
|
|
|
|
|
// uni.showModal({
|
|
|
|
|
// title: '收到设备消息',
|
|
|
|
|
// content: payload,
|
|
|
|
|
// showCancel: false
|
|
|
|
|
// });
|
|
|
|
|
// ✅ 发送全局事件通知主页面更新
|
|
|
|
|
uni.$emit('deviceStatusUpdate', {
|
|
|
|
|
message: JSON.stringify(payload), // 消息内容
|
|
|
|
@ -899,7 +902,7 @@
|
|
|
|
|
.info-card {
|
|
|
|
|
background-color: rgb(26, 26, 26);
|
|
|
|
|
border-radius: 16rpx;
|
|
|
|
|
padding: 10rpx 30rpx 5rpx 30rpx;
|
|
|
|
|
padding: 10rpx 20rpx 5rpx 20rpx;
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -913,6 +916,7 @@
|
|
|
|
|
.info-label {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: rgba(255, 255, 255, 0.87);
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info-value {
|
|
|
|
@ -924,7 +928,12 @@
|
|
|
|
|
color: rgba(255, 255, 255, 0.6);
|
|
|
|
|
text-align: end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.locationGPS {
|
|
|
|
|
width:88%;
|
|
|
|
|
text-align: end;
|
|
|
|
|
float: right;
|
|
|
|
|
line-height:50rpx;
|
|
|
|
|
}
|
|
|
|
|
.control-card {
|
|
|
|
|
background-color: rgb(26, 26, 26);
|
|
|
|
|
border-radius: 16rpx;
|
|
|
|
|