new-20250827 #26

Merged
dyf merged 8 commits from liubiao/APP:new-20250827 into main 2025-12-03 16:50:58 +08:00
5 changed files with 262 additions and 70 deletions
Showing only changes of commit 9ca14b1f32 - Show all commits

View File

@ -107,7 +107,7 @@
},
{
"path": "pages/210/deviceControl/index",
"path": "pages/210/HBY210",
"style": {
"navigationStyle": "custom"
}

View File

@ -69,69 +69,14 @@
</view>
</view>
</view>
<!-- 灯光模式选择 -->
<!-- <view class="mode-section">
<view class="mode-buttons">
<view class="mode-v1">
<view class="mode-v2" @click="selectMode">
<image src="/static/images/210/lj.png" class="setIMG"></image>
<view>
<view class="battery-v2">联机设备</view>
</view>
</view>
</view>
<view class="mode-v1">
<view class="mode-v2" @click="uploadStartup">
<image src="/static/images/common/path7.png" class="setIMG" mode="aspectFit"></image>
<view>
<view class="battery-v2">开机画面</view>
<view class="mode-v3">上传</view>
</view>
</view>
</view>
<view class="mode-v1">
<view class="mode-v2" @click="automaticAlarm">
<image src="/static/images/210/zd.png" class="setIMG" mode="aspectFit"></image>
<view>
<view class="battery-v2">自动报警</view>
</view>
</view>
</view>
<view class="mode-v1">
<view class="mode-v2" @click="anualAlarm">
<image src="/static/images/210/zd-HL.png" class="setIMG" mode="aspectFit"></image>
<view>
<view class="battery-v2">手动报警</view>
</view>
</view>
</view>
<view class="mode-v1">
<view class="mode-v2">
<image src="/static/images/210/bj.png" class="setIMG" mode="aspectFit"></image>
<view>
<view class="battery-v2">报警声音</view>
<view class="mode-v3">上传</view>
</view>
</view>
</view>
<view class="mode-v1">
<view class="mode-v2" @click="alarmTime">
<image src="/static/images/210/time.png" class="setIMG" mode="aspectFit"></image>
<view>
<view class="battery-v2">报警时长</view>
<view class="mode-v3">{{alarmTimeDisplay }}</view>
</view>
</view>
</view>
</view>
</view> -->
<!-- ============灯光模式选择================ -->
<view class="mode-section">
<view class="mode-buttons">
<view v-for="(item, index) in modeItems" :key="index" class="mode-v1" :class="{ 'active-mode': selectedIndex === index }">
<view class="mode-v2"
@click="handleModeClick(index)">
<image :src="item.image" class="setIMG" mode="aspectFit"></image>
<view v-for="(item, index) in modeItems" :key="index" class="mode-v1"
:class="{ 'active-mode': selectedIndex === index }">
<view class="mode-v2" @click="handleModeClick(index)">
<image :src="selectedIndex === index ? item.activeImage : item.image" class="setIMG"
mode="aspectFit"></image>
<view>
<view class="battery-v2">{{ item.title }}</view>
<view class="mode-v3" v-if="item.subTitle">{{ item.subTitle }}</view>
@ -239,6 +184,29 @@
</view>
</view>
</view>
<!-- =====报警声音上传======= -->
<view class="agreement-mask" v-if="lightModeC" @click.stop="closePopup">
<view class="agreement-popupB" @click.stop>
<!-- 标题 -->
<view class="popup-title">报警声音</view>
<view class="popup-content">
<view>
<view class="upload_flex" @click="uploadFile">
<image src="/static/images/210/upload.png" mode="aspectFit" class="uploadIMG"></image>
<text>点击选择上传文件</text>
</view>
<view class="upload_flex" @click="deleteQ">
<image src="/static/images/210/delete.png" mode="aspectFit" class="uploadIMG"></image>
<text>删除文件</text>
</view>
</view>
</view>
<!-- 按钮组 -->
<view class="popup-buttons">
<button class="agree" @click="handleupload">确定</button>
</view>
</view>
</view>
<!-- ======各个弹框类型======= -->
<CustomPopup :show="currentPopup.show" v-bind="currentPopup.config" @confirm="handleConfirm"
@cancel="handleCancel" />
@ -340,7 +308,7 @@
} from '@/api/6170/deviceControl.js'
import {
getDeviceId
} from '../../../store/BLETools';
} from '../../store/BLETools';
import {
baseURL,
getToken,
@ -352,31 +320,39 @@
selectedIndex: -1, // Track currently selected index
modeItems: [{
image: "/static/images/210/lj.png",
activeImage: "/static/images/210/lj-HL.png",
title: "联机设备",
subTitle: ""
},
{
image: "/static/images/common/path7.png",
title: "开机画面",
image: "/static/images/210/bj.png",
activeImage: "/static/images/210/bj-HL.png",
title: "报警声音",
subTitle: "上传"
},
{
image: "/static/images/210/zd.png",
activeImage: "/static/images/210/zd-HL.png",
title: "自动报警",
subTitle: ""
},
{
image: "/static/images/210/zd-HL.png",
image: "/static/images/210/zd.png",
activeImage: "/static/images/210/zd-HL.png",
title: "手动报警",
subTitle: ""
},
{
image: "/static/images/210/bj.png",
title: "报警声音",
image: "/static/images/common/path7.png",
activeImage: "/static/images/210/path-HL.png",
title: "开机画面",
subTitle: "上传"
},
{
image: "/static/images/210/time.png",
activeImage: "/static/images/210/time-HL.png",
title: "报警时长",
subTitle: "30秒"
}
@ -424,6 +400,7 @@
radioSelected: 0, // -1
deviceType: '',
popupType: '', //
lightModeC: false
}
},
methods: {
@ -432,6 +409,10 @@
this.lightModeA = false;
this.lightModeB = false;
},
//
uploadFile(){},
//
deleteQ(){},
//
showPopup(type) {
this.currentPopup = {
@ -455,13 +436,16 @@
this.selectMode();
break;
case 1:
this.uploadStartup();
this.soundAlarm();
break;
case 2:
this.automaticAlarm();
this.manualAlarm();
break;
case 3:
this.manualAlarm();
this.automaticAlarm();
break;
case 4:
this.uploadStartup();
break;
case 5:
this.alarmTime();
@ -486,6 +470,10 @@
url: '/pages/common/map/index'
})
},
//
soundAlarm() {
this.lightModeC = true
},
//
selectMode() {
uni.navigateTo({
@ -888,7 +876,8 @@
.mode-v1.active-mode .battery-v2 {
color: #BBE600 !important;
}
.mode-v1.active-mode .mode-v3{
.mode-v1.active-mode .mode-v3 {
color: #BBE600 !important;
}
@ -1291,6 +1280,18 @@
margin-bottom: 50rpx;
}
.upload_flex {
display: flex;
cursor: pointer;
align-items: center;
margin-bottom:20rpx;
}
.uploadIMG{
width:68rpx;
height:68rpx;
margin-right: 20rpx;
}
.item {
padding: 10px;
margin: 5px 0;

View File

@ -579,7 +579,7 @@
these.$set(these.formData, key, json[key]);
} else {
console.log(`字段 ${key} 不在 formData 中,跳过更新`);
}
}
});
// 强制触发视图更新,确保电量显示同步

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.