Merge branch 'main' of http://47.107.152.87:3000/dyf/APP
# Conflicts: # pages.json # unpackage/dist/dev/app-plus/app-config-service.js # unpackage/dist/dev/app-plus/app-service.js # unpackage/dist/dev/app-plus/app-view.js # unpackage/dist/dev/app-plus/manifest.json # utils/request.js
18
App.vue
@ -15,12 +15,9 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import 'vk-uview-ui/index.scss';
|
@import 'vk-uview-ui/index.scss';
|
||||||
|
|
||||||
uni-slider .uni-slider-handle-wrapper {
|
uni-slider .uni-slider-handle-wrapper {
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-slider .uni-slider-thumb {
|
uni-slider .uni-slider-thumb {
|
||||||
width: 66rpx !important;
|
width: 66rpx !important;
|
||||||
height: 80rpx !important;
|
height: 80rpx !important;
|
||||||
@ -29,7 +26,6 @@
|
|||||||
margin-left: -72rpx !important;
|
margin-left: -72rpx !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-slider .uni-slider-handle-wrapper {
|
uni-slider .uni-slider-handle-wrapper {
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -41,17 +37,21 @@
|
|||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-file-picker.custom-file-picker {
|
.uni-file-picker.custom-file-picker {
|
||||||
overflow: inherit !important;
|
overflow: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-file-picker .icon-add {
|
.custom-file-picker .icon-add {
|
||||||
height: 5rpx !important;
|
height: 5rpx !important;
|
||||||
width: 70rpx !important;
|
width: 70rpx !important;
|
||||||
}
|
}
|
||||||
|
.uni-picker-view-mask{
|
||||||
.custom-file-picker .file-picker__box-content {
|
background: rgba(42, 42, 42, 1);
|
||||||
// display: none
|
z-index: -1;
|
||||||
|
}
|
||||||
|
.uni-picker-view-content{
|
||||||
|
position: inherit;
|
||||||
|
}
|
||||||
|
.uni-picker-view-wrapper{
|
||||||
|
background: rgba(42, 42, 42, 1);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
9
api/6170/callPolice.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
//报警
|
||||||
|
export function deviceSendAlarmMessage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/app/bjq/device/sendAlarmMessage',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
export function deviceDetail(id) {
|
export function deviceDetail(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/device/${id}`,
|
url: `/app/bjq/device/${id}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -16,7 +16,7 @@ export function deviceShareId(id) {
|
|||||||
// 人员信息登记
|
// 人员信息登记
|
||||||
export function registerPersonInfo(data) {
|
export function registerPersonInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/device/registerPersonInfo`,
|
url: `/app/bjq/device/registerPersonInfo`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -24,7 +24,40 @@ export function registerPersonInfo(data) {
|
|||||||
// 发送信息
|
// 发送信息
|
||||||
export function deviceSendMessage(data) {
|
export function deviceSendMessage(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/app/device/sendMessage`,
|
url: `/app/bjq/device/sendMessage`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 灯光模式设置
|
||||||
|
export function lightModeSettings(data) {
|
||||||
|
return request({
|
||||||
|
url: `/app/bjq/device/lightModeSettings`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 激光模式设置
|
||||||
|
export function laserModeSettings(data) {
|
||||||
|
return request({
|
||||||
|
url: `/app/bjq/device/laserModeSettings`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 灯光亮度设置
|
||||||
|
|
||||||
|
export function lightBrightnessSettings(data) {
|
||||||
|
return request({
|
||||||
|
url: `/app/bjq/device/lightBrightnessSettings`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 地图逆解析
|
||||||
|
export function mapReverseGeocoding(data) {
|
||||||
|
return request({
|
||||||
|
url: `/app/bjq/device/mapReverseGeocoding`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,182 +1,292 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="agreement-mask" v-if="show" @click="closePopup">
|
<view class="agreement-mask" v-if="show" @click.stop="closePopup">
|
||||||
<view class="agreement-popup" @click.stop>
|
<!-- 弹窗主体:支持自定义边框、背景 -->
|
||||||
<view class="popup-content">
|
<view class="agreement-popup" @click.stop :style="{
|
||||||
<!-- 动态图标 -->
|
border: popupBorder,
|
||||||
<image v-if="showIcon && icon" :src="icon" mode="aspectFit" class="svg"></image>
|
backgroundColor: popupBg,
|
||||||
<view class="text-content">
|
borderRadius: popupRadius
|
||||||
<!-- 动态标题 -->
|
}" :class="popupClass">
|
||||||
<view class="popup-Title" v-if="title">{{ title }}</view>
|
<view class="text-content">
|
||||||
<!-- 动态消息内容 -->
|
<!-- 动态标题:支持自定义颜色、字体大小 -->
|
||||||
<view class="popup-Message" v-if="message">{{ message }}</view>
|
<view class="popup-Title" v-if="title" :style="{
|
||||||
</view>
|
color: titleColor,
|
||||||
</view>
|
fontSize: titleSize,
|
||||||
<!-- 按钮组 -->
|
padding: titlePadding
|
||||||
<view class="popup-buttons">
|
}">
|
||||||
<button v-if="showCancel" class="btn cancelBtn" @click="handleCancel">{{ cancelText }}</button>
|
{{ title }}
|
||||||
<button class="btn agreeBtn" @click="handleConfirm">{{ confirmText }}</button>
|
</view>
|
||||||
</view>
|
<view class="popup-content">
|
||||||
</view>
|
<!-- 动态图标:支持自定义大小、边距 -->
|
||||||
</view>
|
<image v-if="showIcon && icon" :src="icon" mode="aspectFit" class="svg" :style="iconStyle"></image>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 动态消息内容:支持自定义颜色、换行、字体大小 -->
|
||||||
|
<view class="popup-Message" v-if="message" :style="{
|
||||||
|
color: messageColor,
|
||||||
|
fontSize: messageSize,
|
||||||
|
whiteSpace: messageWrap ? 'normal' : 'nowrap',
|
||||||
|
padding: messagePadding
|
||||||
|
}">
|
||||||
|
{{ message }}
|
||||||
|
</view>
|
||||||
|
<!-- 倒计时显示 -->
|
||||||
|
<!-- <view v-if="showCountdown" class="countdown" :style="countdownStyle">
|
||||||
|
{{ countdownFormat.replace('{time}', currentCountdown) }}
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 按钮组:支持自定义按钮样式 -->
|
||||||
|
<view class="popup-buttons" :style="{ marginTop: buttonGroupMargin }">
|
||||||
|
<button v-if="showCancel" class="btn cancelBtn" @click="handleCancel" :style="{
|
||||||
|
border: cancelBtnBorder,
|
||||||
|
color: cancelBtnColor,
|
||||||
|
backgroundColor: cancelBtnBg,
|
||||||
|
fontSize: cancelBtnSize,
|
||||||
|
borderRadius: buttonRadius,
|
||||||
|
margin: buttonMargin
|
||||||
|
}" :class="cancelBtnClass">
|
||||||
|
{{ cancelText }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button class="btn agreeBtn" @click="handleConfirm" :style="{
|
||||||
|
backgroundColor: confirmBtnBg,
|
||||||
|
color: confirmBtnColor,
|
||||||
|
fontSize: confirmBtnSize,
|
||||||
|
borderRadius: buttonRadius,
|
||||||
|
margin: buttonMargin
|
||||||
|
}" :class="confirmBtnClass">
|
||||||
|
{{ confirmText }}
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
name: 'CustomPopup',
|
||||||
// 控制显示
|
props: {
|
||||||
show: {
|
// 基础控制
|
||||||
type: Boolean,
|
show: {
|
||||||
default: false
|
type: Boolean,
|
||||||
},
|
default: false
|
||||||
// 标题内容(可选)
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
// 消息内容
|
message: {
|
||||||
message: {
|
type: String,
|
||||||
type: String,
|
default: ''
|
||||||
default: ''
|
},
|
||||||
},
|
showCountdown: {
|
||||||
// 确认按钮文本
|
type: Boolean,
|
||||||
confirmText: {
|
default: false
|
||||||
type: String,
|
},
|
||||||
default: '确定'
|
confirmText: {
|
||||||
},
|
type: String,
|
||||||
// 取消按钮文本
|
default: '确定'
|
||||||
cancelText: {
|
},
|
||||||
type: String,
|
cancelText: {
|
||||||
default: '取消'
|
type: String,
|
||||||
},
|
default: '取消'
|
||||||
// 是否显示取消按钮
|
},
|
||||||
showCancel: {
|
showCancel: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
// 是否显示图标
|
showIcon: {
|
||||||
showIcon: {
|
type: Boolean,
|
||||||
type: Boolean,
|
default: true
|
||||||
default: true
|
},
|
||||||
},
|
icon: {
|
||||||
// 图标路径(支持网络和本地路径)
|
type: String,
|
||||||
icon: {
|
default: ''
|
||||||
type: String,
|
},
|
||||||
default: ''
|
// 文本换行控制
|
||||||
},
|
messageWrap: {
|
||||||
// 图标样式
|
type: Boolean,
|
||||||
iconStyle: {
|
default: false // 默认不换行,true则自动换行
|
||||||
type: Object,
|
},
|
||||||
default: () => ({
|
|
||||||
width: '58rpx',
|
// 弹窗样式自定义
|
||||||
height: '62rpx',
|
popupBorder: {
|
||||||
marginBottom: '20rpx'
|
type: String,
|
||||||
})
|
default: '1px solid rgba(187, 230, 0, 0.3)'
|
||||||
}
|
},
|
||||||
},
|
popupBg: {
|
||||||
methods: {
|
type: String,
|
||||||
handleConfirm() {
|
default: 'rgb(42, 42, 42, 0.9)'
|
||||||
this.$emit('confirm')
|
},
|
||||||
this.$emit('update:show', false)
|
popupRadius: {
|
||||||
},
|
type: String,
|
||||||
handleCancel() {
|
default: '40rpx'
|
||||||
this.$emit('cancel')
|
},
|
||||||
this.$emit('update:show', false)
|
popupClass: {
|
||||||
},
|
type: String,
|
||||||
closePopup() {
|
default: ''
|
||||||
this.$emit('close')
|
},
|
||||||
this.$emit('update:show', false)
|
|
||||||
}
|
// 标题样式自定义
|
||||||
}
|
titleColor: {
|
||||||
}
|
type: String,
|
||||||
|
default: 'rgba(255, 255, 255, 0.86)'
|
||||||
|
},
|
||||||
|
titleSize: {
|
||||||
|
type: String,
|
||||||
|
default: '32rpx'
|
||||||
|
},
|
||||||
|
titlePadding: {
|
||||||
|
type: String,
|
||||||
|
default: '10rpx 0 10rpx'
|
||||||
|
},
|
||||||
|
|
||||||
|
// 消息样式自定义
|
||||||
|
messageColor: {
|
||||||
|
type: String,
|
||||||
|
default: 'rgba(255, 255, 255, 0.7)'
|
||||||
|
},
|
||||||
|
messageSize: {
|
||||||
|
type: String,
|
||||||
|
default: '28rpx'
|
||||||
|
},
|
||||||
|
messagePadding: {
|
||||||
|
type: String,
|
||||||
|
default: '10rpx 20rpx 30rpx'
|
||||||
|
},
|
||||||
|
|
||||||
|
// 图标样式自定义
|
||||||
|
iconStyle: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({
|
||||||
|
width: '72rpx',
|
||||||
|
height: '60rpx',
|
||||||
|
marginBottom: '20rpx'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 按钮组样式
|
||||||
|
buttonGroupMargin: {
|
||||||
|
type: String,
|
||||||
|
default: '20rpx'
|
||||||
|
},
|
||||||
|
buttonRadius: {
|
||||||
|
type: String,
|
||||||
|
default: '40rpx'
|
||||||
|
},
|
||||||
|
buttonMargin: {
|
||||||
|
type: String,
|
||||||
|
default: '0 10rpx'
|
||||||
|
},
|
||||||
|
|
||||||
|
// 确认按钮样式
|
||||||
|
confirmBtnBg: {
|
||||||
|
type: String,
|
||||||
|
default: 'rgba(187, 230, 0, 1)'
|
||||||
|
},
|
||||||
|
confirmBtnColor: {
|
||||||
|
type: String,
|
||||||
|
default: '#232323'
|
||||||
|
},
|
||||||
|
confirmBtnSize: {
|
||||||
|
type: String,
|
||||||
|
default: '24rpx'
|
||||||
|
},
|
||||||
|
confirmBtnClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消按钮样式
|
||||||
|
cancelBtnBorder: {
|
||||||
|
type: String,
|
||||||
|
default: '1px solid rgba(255, 255, 255, 0.3)'
|
||||||
|
},
|
||||||
|
cancelBtnColor: {
|
||||||
|
type: String,
|
||||||
|
default: 'rgba(255, 255, 255, 0.7)'
|
||||||
|
},
|
||||||
|
cancelBtnBg: {
|
||||||
|
type: String,
|
||||||
|
default: 'transparent'
|
||||||
|
},
|
||||||
|
cancelBtnSize: {
|
||||||
|
type: String,
|
||||||
|
default: '24rpx'
|
||||||
|
},
|
||||||
|
cancelBtnClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleConfirm() {
|
||||||
|
this.$emit('confirm')
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.$emit('cancel')
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
},
|
||||||
|
closePopup() {
|
||||||
|
this.$emit('close')
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* 遮罩层 */
|
/* 遮罩层:全屏覆盖 */
|
||||||
.agreement-mask {
|
.agreement-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 弹窗主体 */
|
/* 弹窗主体:基础样式 */
|
||||||
.agreement-popup {
|
.agreement-popup {
|
||||||
width: 60%;
|
width: 66%;
|
||||||
background-color: rgb(42, 42, 42);
|
padding: 30rpx;
|
||||||
border-radius: 40rpx;
|
text-align: center;
|
||||||
padding: 30rpx;
|
}
|
||||||
text-align: center;
|
|
||||||
border: 1px solid rgba(255, 200, 78, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-content {
|
/* 内容区域布局 */
|
||||||
display: flex;
|
.popup-content {
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
}
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.text-content {
|
.text-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-Title {
|
/* 按钮基础样式(不包含可变样式) */
|
||||||
color: rgba(255, 255, 255, 0.86);
|
.popup-buttons {
|
||||||
text-align: center;
|
display: flex;
|
||||||
padding: 30rpx 0 10rpx;
|
justify-content: center;
|
||||||
font-size: 32rpx;
|
}
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-Message {
|
.btn {
|
||||||
color: rgba(255, 255, 255, 0.7);
|
height: 60rpx;
|
||||||
text-align: center;
|
line-height: 60rpx;
|
||||||
padding: 10rpx 20rpx 30rpx;
|
padding: 0 30rpx;
|
||||||
font-size: 28rpx;
|
min-width: 170rpx;
|
||||||
line-height: 1.5;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 图标样式 */
|
/* 解决按钮默认样式冲突 */
|
||||||
.svg {
|
.btn::after {
|
||||||
width: 72rpx;
|
border: none;
|
||||||
height: 60rpx;
|
}
|
||||||
margin-bottom: v-bind('iconStyle.marginBottom');
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮组 */
|
|
||||||
.popup-buttons {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮基础样式 */
|
|
||||||
.btn {
|
|
||||||
height: 60rpx;
|
|
||||||
line-height: 60rpx;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
margin: 0 10rpx;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
min-width: 170rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 确认按钮 */
|
|
||||||
.agreeBtn {
|
|
||||||
background: rgba(187, 230, 0, 1);
|
|
||||||
color: #232323;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 取消按钮 */
|
|
||||||
.cancelBtn {
|
|
||||||
background: transparent;
|
|
||||||
color: rgba(255, 255, 255, 0.7);
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
88
components/TimePicker/TimePicker.vue
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<picker-view
|
||||||
|
class="picker-body"
|
||||||
|
:value="timeIndex"
|
||||||
|
@change="handleTimeChange"
|
||||||
|
>
|
||||||
|
<!-- 分钟列 -->
|
||||||
|
<picker-view-column>
|
||||||
|
<view
|
||||||
|
v-for="min in minutes"
|
||||||
|
:key="min"
|
||||||
|
class="item"
|
||||||
|
:class="{ active: timeIndex[0] === minutes.indexOf(min) }"
|
||||||
|
>{{ min }}分</view>
|
||||||
|
</picker-view-column>
|
||||||
|
|
||||||
|
<!-- 秒数列 -->
|
||||||
|
<picker-view-column>
|
||||||
|
<view
|
||||||
|
v-for="sec in seconds"
|
||||||
|
:key="sec"
|
||||||
|
class="item"
|
||||||
|
:class="{ active: timeIndex[1] === seconds.indexOf(sec) }"
|
||||||
|
>{{ sec }}秒</view>
|
||||||
|
</picker-view-column>
|
||||||
|
</picker-view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "TimePicker",
|
||||||
|
props: {
|
||||||
|
// 初始时间(格式:{ minutes: '02', seconds: '30' })
|
||||||
|
defaultTime: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({ minutes: '00', seconds: '00' })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
minutes: Array.from({ length: 60 }, (_, i) => i.toString().padStart(2, '0')), // 00-59
|
||||||
|
seconds: Array.from({ length: 60 }, (_, i) => i.toString().padStart(2, '0')), // 00-59
|
||||||
|
timeIndex: [0, 0], // 当前选中索引
|
||||||
|
selectedTime: { minutes: '00', seconds: '00' } // 当前选择的时间
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 初始化默认时间
|
||||||
|
const minIndex = this.minutes.indexOf(this.defaultTime.minutes);
|
||||||
|
const secIndex = this.seconds.indexOf(this.defaultTime.seconds);
|
||||||
|
this.timeIndex = [minIndex, secIndex];
|
||||||
|
this.selectedTime = { ...this.defaultTime };
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 时间变化时更新选中值
|
||||||
|
handleTimeChange(e) {
|
||||||
|
this.timeIndex = e.detail.value;
|
||||||
|
const [minIdx, secIdx] = this.timeIndex;
|
||||||
|
this.selectedTime = {
|
||||||
|
minutes: this.minutes[minIdx],
|
||||||
|
seconds: this.seconds[secIdx]
|
||||||
|
};
|
||||||
|
this.$emit("change", this.selectedTime); // 实时通知父组件
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提供给父组件的方法:获取当前时间
|
||||||
|
getCurrentTime() {
|
||||||
|
return this.selectedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.picker-body {
|
||||||
|
height: 180px;
|
||||||
|
background: #3A3A3A;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.item {
|
||||||
|
color: rgba(255, 255, 255, 0.7);
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
.item.active {
|
||||||
|
color: #A3FF00; /* 选中项高亮 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -22,9 +22,17 @@
|
|||||||
<text v-if="rightText" :style="{ color: rightColor }" @click="handleRightClick">
|
<text v-if="rightText" :style="{ color: rightColor }" @click="handleRightClick">
|
||||||
{{ rightText }}
|
{{ rightText }}
|
||||||
</text>
|
</text>
|
||||||
|
<!-- 显示多个图标 -->
|
||||||
|
<template v-if="rightIcons && rightIcons.length > 0">
|
||||||
|
<image v-for="(icon, index) in rightIcons" :key="index" :src="icon.src"
|
||||||
|
@click="handleIconClick(index)" class="pathIMG" :style="{
|
||||||
|
width: icon.size || '40rpx',
|
||||||
|
height: icon.size || '40rpx',
|
||||||
|
marginLeft: index > 0 ? '20rpx' : '0'
|
||||||
|
}" />
|
||||||
|
</template>
|
||||||
<!-- 或显示图标 -->
|
<!-- 或显示图标 -->
|
||||||
<image v-if="rightIcon" :src="rightIcon" @click="handleRightClick" mode=""
|
<image v-if="rightIcon" :src="rightIcon" @click="handleRightClick" class="pathIMG">
|
||||||
class="pathIMG">
|
|
||||||
</image>
|
</image>
|
||||||
</slot>
|
</slot>
|
||||||
</view>
|
</view>
|
||||||
@ -60,6 +68,11 @@
|
|||||||
rightIconSize: { // 图标大小
|
rightIconSize: { // 图标大小
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 24
|
default: 24
|
||||||
|
},
|
||||||
|
rightIcons: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
// 格式: [{src: '/path/icon1.png'}, {src: '/path/icon2.png'}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -76,6 +89,10 @@
|
|||||||
},
|
},
|
||||||
handleRightClick() {
|
handleRightClick() {
|
||||||
this.$emit('right-click'); // 触发右侧点击事件
|
this.$emit('right-click'); // 触发右侧点击事件
|
||||||
|
},
|
||||||
|
// 新增图标点击方法
|
||||||
|
handleIconClick(index) {
|
||||||
|
this.$emit('icon-click', index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,10 @@
|
|||||||
"appid" : "uni.app.UNIA21EF43",
|
"appid" : "uni.app.UNIA21EF43",
|
||||||
"privacyDescription" : {
|
"privacyDescription" : {
|
||||||
"NSBluetoothPeripheralUsageDescription" : "需要蓝牙访问权限,用于设备通信",
|
"NSBluetoothPeripheralUsageDescription" : "需要蓝牙访问权限,用于设备通信",
|
||||||
"NSBluetoothAlwaysUsageDescription" : "需要蓝牙访问权限,用于设备通信"
|
"NSBluetoothAlwaysUsageDescription" : "需要蓝牙访问权限,用于设备通信",
|
||||||
|
"NSLocationWhenInUseUsageDescription" : "App需要您的同意,才能在使用期间访问位置",
|
||||||
|
"NSLocationAlwaysUsageDescription" : "App需要您的同意,才能始终访问位置",
|
||||||
|
"NSLocationAlwaysAndWhenInUseUsageDescription" : "App需要您的同意,才能始终访问位置"
|
||||||
},
|
},
|
||||||
"dSYMs" : false
|
"dSYMs" : false
|
||||||
},
|
},
|
||||||
@ -81,7 +84,8 @@
|
|||||||
"name" : "amapHG8nIFW5",
|
"name" : "amapHG8nIFW5",
|
||||||
"appkey_ios" : "065c43f02c7b627a74ad7dd23b16bb4f",
|
"appkey_ios" : "065c43f02c7b627a74ad7dd23b16bb4f",
|
||||||
"appkey_android" : "d7d852dbda2b95f6f796fb9a711a9fee"
|
"appkey_android" : "d7d852dbda2b95f6f796fb9a711a9fee"
|
||||||
}
|
},
|
||||||
|
"customStyle": true
|
||||||
},
|
},
|
||||||
"oauth" : {},
|
"oauth" : {},
|
||||||
"push" : {}
|
"push" : {}
|
||||||
|
|||||||
332
pages/210/addDevice/index.vue
Normal file
@ -0,0 +1,332 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<!-- 设备列表 -->
|
||||||
|
<scroll-view class="device-list" scroll-y>
|
||||||
|
<view class="device-card" v-for="(item, index) in deviceList" :key="index" @click="toggleSelect(index)">
|
||||||
|
<!-- 复选框 -->
|
||||||
|
<view class="checkbox" :class="{ checked: item.checked }">
|
||||||
|
<uni-icons v-if="item.checked" type="checkmarkempty" size="18" color="rgb(0, 0, 0)"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<!-- 设备信息 -->
|
||||||
|
<view class="device-content">
|
||||||
|
<view class="device-header">
|
||||||
|
<view class="deviceIMG">
|
||||||
|
<image :src="item.devicePic" class="IMG" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="device-name">
|
||||||
|
<view>设备:{{item.deviceName}}</view>
|
||||||
|
<view class="ID">
|
||||||
|
<view class="ID">ID:{{item.deviceImei}}</view>
|
||||||
|
<view class="onlines"
|
||||||
|
v-if="item.onlineStatus==1">在线</view>
|
||||||
|
<!-- 离线状态 -->
|
||||||
|
<view class="unlines"
|
||||||
|
v-if="item.onlineStatus==0">离线</view>
|
||||||
|
<view>电量:{{item.battery || '0'}}%</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="editInfmation">
|
||||||
|
<button class="login-btn" @click="sendTextMessage">添加</button>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<!-- 成功提示弹框 -->
|
||||||
|
<CustomPopup :show="showPopupFlag" :title="popupTitle" :message="popupMessage" icon="/static/images/common/success.png"
|
||||||
|
:confirm-text="popupConfirmText" :show-cancel="false" @confirm="onPopupConfirm" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CustomPopup from '@/components/CustomPopup/CustomPopup.vue'
|
||||||
|
import {
|
||||||
|
deviceInfo,
|
||||||
|
} from '@/api/common/index.js'
|
||||||
|
import {
|
||||||
|
deviceSendMessage
|
||||||
|
} from '@/api/6170/deviceControl.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
CustomPopup
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
deviceList: [],
|
||||||
|
messageToSend: '', //发送信息
|
||||||
|
showPopupFlag: false,
|
||||||
|
popupTitle: '',
|
||||||
|
popupMessage: '联机设备添加成功',
|
||||||
|
popupConfirmText: '确认'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSelect(index) {
|
||||||
|
this.deviceList[index].checked = !this.deviceList[index].checked
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
// 获取设备列表
|
||||||
|
getData(deviceType) {
|
||||||
|
this.loading = true;
|
||||||
|
let data = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
deviceType: deviceType
|
||||||
|
}
|
||||||
|
deviceInfo(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const newDevices = res.rows.map(device => ({
|
||||||
|
...device,
|
||||||
|
showConfirm: false,
|
||||||
|
checked: false
|
||||||
|
}));
|
||||||
|
this.total = res.total;
|
||||||
|
this.deviceList = newDevices
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 发送文本消息
|
||||||
|
sendTextMessage() {
|
||||||
|
const selectedDevices = this.deviceList.filter(item => item.checked)
|
||||||
|
const deviceIds = selectedDevices.map(item => item.id);
|
||||||
|
if (selectedDevices.length === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择一个设备',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
deviceIds: deviceIds
|
||||||
|
}
|
||||||
|
deviceSendMessage(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.showPopupFlag = true
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onPopupConfirm() {
|
||||||
|
this.showPopupFlag = false
|
||||||
|
uni.navigateBack()
|
||||||
|
console.log('用户点击了确定')
|
||||||
|
// 处理确认逻辑
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
|
// 监听 'deviceSend' 事件,获取传过来的数据
|
||||||
|
eventChannel.on('deviceSend', (data) => {
|
||||||
|
console.log('Received detail data:', data);
|
||||||
|
this.getData(data.data)
|
||||||
|
});
|
||||||
|
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
|
||||||
|
eventChannel.emit('ack', {})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: rgb(18, 18, 18);
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-list {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-card {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 95%;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border: 2rpx solid rgba(255, 255, 255, 0.5);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
display: flex;
|
||||||
|
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;
|
||||||
|
position: relative;
|
||||||
|
/* display: flex; */
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
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: 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;
|
||||||
|
font-size: 26rpx;
|
||||||
|
border-radius: 0px 8px 0px 8px;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
right: 0rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 52rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.online {
|
||||||
|
color: rgb(187, 230, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.unline {
|
||||||
|
color: rgba(255, 255, 255, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
padding-top: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deviceIMG {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
position: relative;
|
||||||
|
background-color: rgba(42, 42, 42, 0.6);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.IMG {
|
||||||
|
width: 68rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
margin-left: 17%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 15rpx;
|
||||||
|
height: 15rpx;
|
||||||
|
background: rgb(0, 171, 103);
|
||||||
|
border-radius: 50%;
|
||||||
|
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 {
|
||||||
|
width: 2rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
rgba(0, 0, 0, 0) 0%,
|
||||||
|
rgb(255, 255, 255) 50%,
|
||||||
|
rgba(255, 255, 255, 0) 100%);
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-editor {
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-input {
|
||||||
|
width: 95.9%;
|
||||||
|
height: 200rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: rgb(26, 26, 26);
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea {
|
||||||
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
background: rgba(42, 42, 42, 1);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editInfmation {
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 40rpx 40rpx 0px 0px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
background-color: rgb(187, 230, 0);
|
||||||
|
color: rgb(35, 35, 35);
|
||||||
|
border-radius: 50rpx;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
1384
pages/210/deviceControl/index.vue
Normal file
120
pages/210/historyRecords/index.vue
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<view class="histyRecords">
|
||||||
|
<scroll-view class="tab-bar" scroll-x="true" scroll-with-animation>
|
||||||
|
<view class="tab-container">
|
||||||
|
<view v-for="(tab, index) in tabs" :key="index"
|
||||||
|
:class="['tab-item', activeTab === index ? 'active' : '']" @click="switchTab(tab,index)">
|
||||||
|
{{tab.name}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<scroll-view class="content-list" scroll-y="true">
|
||||||
|
<view class="record-item" v-for="item in recodesInfo" :key="item.index">
|
||||||
|
<view class="record-details">
|
||||||
|
<text class="detail-time">开机时间</text>
|
||||||
|
<text class="detail-line">2026.08.29 21:13:58</text>
|
||||||
|
<text class="detail-line">关机时间</text>
|
||||||
|
<text class="detail-time">2025.06.30 00:45:20</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabs: [{
|
||||||
|
name: '开机',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '报警',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
activeTab: 0,
|
||||||
|
recodesInfo: [{}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// tab切换页
|
||||||
|
switchTab(tab, index) {
|
||||||
|
this.activeTab = index
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.histyRecords {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
background: rgba(18, 18, 18, 1);
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-bar {
|
||||||
|
width: 100%;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-container {
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-item {
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: rgba(187, 230, 0, 1);
|
||||||
|
border-bottom: 6rpx solid rgba(187, 230, 0, 1);
|
||||||
|
height: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-list {
|
||||||
|
height: calc(100vh - 300rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-item {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
background: rgba(26, 26, 26, 1);
|
||||||
|
border-radius: 18rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-details {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-line {
|
||||||
|
display: block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-time {
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-display {
|
||||||
|
position: absolute;
|
||||||
|
top: 30rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #BBE600;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
254
pages/210/onlineDevice/index.vue
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="device-page">
|
||||||
|
<view class="sendFlex">
|
||||||
|
<view class="Sendmessage" @click="location">呼叫</view>
|
||||||
|
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100"
|
||||||
|
style="height:80vh;">
|
||||||
|
<view v-if="deviceList.length>0">
|
||||||
|
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index"
|
||||||
|
class="device-card">
|
||||||
|
<view @click.stop="handleFile(item)">
|
||||||
|
<view class="device-header">
|
||||||
|
<view class="deviceIMG">
|
||||||
|
<image :src="item.devicePic" class="IMG" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="device-name">
|
||||||
|
<view>设备:{{item.deviceName}}</view>
|
||||||
|
<view class="ID">
|
||||||
|
<view class="ID">ID:{{item.deviceImei}}
|
||||||
|
</view>
|
||||||
|
<!-- 在线状态 -->
|
||||||
|
<view class="onlines">在线</view>
|
||||||
|
<!-- 离线状态 -->
|
||||||
|
<view class="offlines" v-if="item.onlineStatus==0">离线</view>
|
||||||
|
<view>电量:{{item.battery || '0'}}%</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="device-status">1</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<view class="content1" @click="addvideo">
|
||||||
|
<image src="/static/images/common/path1.png" class="path1"></image>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
deviceID: '',
|
||||||
|
deviceList: [],
|
||||||
|
loading: false,
|
||||||
|
deviceType:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 添加视频
|
||||||
|
addvideo() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/210/addDevice/index??id=${this.deviceID}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
let data = {
|
||||||
|
deviceId: this.deviceID
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 发生短信
|
||||||
|
handleSend() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/common/send/index',
|
||||||
|
events: {
|
||||||
|
ack: function(data) {}
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
res.eventChannel.emit('deviceSend', {
|
||||||
|
data:this.deviceType
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
// onLoad(options) {
|
||||||
|
// this.deviceID = options.id
|
||||||
|
|
||||||
|
// }
|
||||||
|
onLoad(options) {
|
||||||
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
|
eventChannel.on('onlineDevice', (data) => {
|
||||||
|
this.deviceType=data.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 页面整体样式 */
|
||||||
|
.device-page {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: rgb(18, 18, 18);
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sendFlex {
|
||||||
|
display: flex;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
justify-content: flex-end;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设备卡片 */
|
||||||
|
.device-card {
|
||||||
|
background-color: rgb(26, 26, 26);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
padding: 30rpx 0 10rpx 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-name {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
margin-left: 24rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: 75%;
|
||||||
|
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;
|
||||||
|
font-size: 26rpx;
|
||||||
|
border-radius: 0px 8px 0px 8px;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
right: 0rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 52rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.8)
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
width: 8rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 25rpx;
|
||||||
|
top: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-id {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
position: relative;
|
||||||
|
padding: 0rpx 0rpx 30rpx 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deviceIMG {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
position: relative;
|
||||||
|
background-color: rgba(42, 42, 42, 0.6);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.IMG {
|
||||||
|
width: 68rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
margin-left: 17%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 15rpx;
|
||||||
|
height: 15rpx;
|
||||||
|
background: rgb(0, 171, 103);
|
||||||
|
border-radius: 50%;
|
||||||
|
top: 20rpx;
|
||||||
|
left: -20rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
.offlines {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offlines::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 15rpx;
|
||||||
|
height: 15rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.4);
|
||||||
|
border-radius: 50%;
|
||||||
|
top: 20rpx;
|
||||||
|
left: -20rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
.content1 {
|
||||||
|
height: 160rpx;
|
||||||
|
background: rgb(26, 26, 26);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Sendmessage {
|
||||||
|
margin-left: 50rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
}
|
||||||
|
|
||||||
|
.path1 {
|
||||||
|
width: 62rpx;
|
||||||
|
height: 62rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<text>{{
|
<text>{{
|
||||||
tabs[activeTab].name === '我的分享'
|
tabs[activeTab].name === '我的分享'
|
||||||
? `分享给“${group.sharedTo}”的设备`
|
? `分享给“${group.sharedTo}”的设备`
|
||||||
: `来自“${group.sharedTo}”分享的设备`
|
: `来自“${group.othersharedTo}”分享的设备`
|
||||||
}}</text>
|
}}</text>
|
||||||
<text class="edit-btn"
|
<text class="edit-btn"
|
||||||
@click="toggleEdit(groupIndex)">{{editingGroup === groupIndex ? '完成' : '编辑'}}</text>
|
@click="toggleEdit(groupIndex)">{{editingGroup === groupIndex ? '完成' : '编辑'}}</text>
|
||||||
@ -40,8 +40,11 @@
|
|||||||
<view class="ID">
|
<view class="ID">
|
||||||
<view class="ID">
|
<view class="ID">
|
||||||
ID:{{item.deviceImei}}</view>
|
ID:{{item.deviceImei}}</view>
|
||||||
<view class="onlines">在线</view>
|
<!-- 在线状态 -->
|
||||||
<view>电量:{{item.battery || '80'}}%</view>
|
<view class="onlines" v-if="item.onlineStatus==1">在线</view>
|
||||||
|
<!-- 离线状态 -->
|
||||||
|
<view class="offlines" v-if="item.onlineStatus==0">离线</view>
|
||||||
|
<view>电量:{{item.battery || '0'}}%</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -49,11 +52,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<!-- 加载状态提示 -->
|
|
||||||
<!-- <view class="loading-status">
|
|
||||||
<text v-if="loading">加载中...</text>
|
|
||||||
<text v-if="finished">没有更多数据了</text>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="noDATA">
|
<view v-else class="noDATA">
|
||||||
<view>
|
<view>
|
||||||
@ -67,7 +65,7 @@
|
|||||||
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
|
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
|
||||||
<view class="agreement-popupC" @click.stop>
|
<view class="agreement-popupC" @click.stop>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/delel.png" class="svg" mode="aspectFit"></image>
|
<image src="/static/images/common/delel.png" class="svg" mode="aspectFit"></image>
|
||||||
<uni-icon class="trash"></uni-icon>
|
<uni-icon class="trash"></uni-icon>
|
||||||
<view class="popup-Title">
|
<view class="popup-Title">
|
||||||
{{ tabs[activeTab].name === '我的分享' ? '确定停止分享该设备' : '确定移除他人分享给你的这台设备' }}
|
{{ tabs[activeTab].name === '我的分享' ? '确定停止分享该设备' : '确定移除他人分享给你的这台设备' }}
|
||||||
@ -117,10 +115,12 @@
|
|||||||
const groups = {};
|
const groups = {};
|
||||||
this.deviceList.forEach(device => {
|
this.deviceList.forEach(device => {
|
||||||
// 这里假设device.sharedTo是分享目标的手机号
|
// 这里假设device.sharedTo是分享目标的手机号
|
||||||
const key = device.sharedTo || '未分享';
|
const key = this.activeTab === 0 ? device.phonenumber : device.otherPhonenumber;
|
||||||
|
const displayName = this.activeTab === 0 ? device.phonenumber : device.otherPhonenumber;
|
||||||
if (!groups[key]) {
|
if (!groups[key]) {
|
||||||
groups[key] = {
|
groups[key] = {
|
||||||
sharedTo: key,
|
sharedTo: displayName, // 显示用名称
|
||||||
|
othersharedTo: displayName, // 显示用名称
|
||||||
devices: []
|
devices: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -213,7 +213,8 @@
|
|||||||
const newDevices = res.rows.map(device => ({
|
const newDevices = res.rows.map(device => ({
|
||||||
...device,
|
...device,
|
||||||
showConfirm: false,
|
showConfirm: false,
|
||||||
sharedTo: device.phonenumber || '未分享'
|
sharedTo: device.phonenumber,
|
||||||
|
othersharedTo: device.otherPhonenumber
|
||||||
}));
|
}));
|
||||||
// 分页处理
|
// 分页处理
|
||||||
if (this.page === 1) {
|
if (this.page === 1) {
|
||||||
|
|||||||
413
pages/6170/callPolice/index.vue
Normal file
@ -0,0 +1,413 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<!-- 设备列表 -->
|
||||||
|
<view class="allSelect" @click="selectAll"> 全选</view>
|
||||||
|
<scroll-view class="device-list" scroll-y>
|
||||||
|
<view class="device-card" v-for="(item, index) in deviceList" :key="index" @click="toggleSelect(index)">
|
||||||
|
<!-- 复选框 -->
|
||||||
|
<view class="checkbox" :class="{ checked: item.checked }">
|
||||||
|
<uni-icons v-if="item.checked" type="checkmarkempty" size="18" color="rgb(0, 0, 0)"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<!-- 设备信息 -->
|
||||||
|
<view class="device-content">
|
||||||
|
<view class="device-header">
|
||||||
|
<view class="deviceIMG">
|
||||||
|
<image :src="item.devicePic" class="IMG" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
<view class="device-name">
|
||||||
|
<view>设备:{{item.deviceName}}</view>
|
||||||
|
<view class="ID">
|
||||||
|
<view class="ID">ID:{{item.deviceImei}}</view>
|
||||||
|
<view class="onlines" v-if="item.onlineStatus==1">在线</view>
|
||||||
|
<!-- 离线状态 -->
|
||||||
|
<view class="unlines" v-if="item.onlineStatus==0">离线</view>
|
||||||
|
<view>电量:{{item.battery || '0'}}%</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="editInfmation">
|
||||||
|
<button class="login-btn qz" @click="forceAlarm">强制报警</button>
|
||||||
|
<button class="login-btn jc" @click="cancelAlarm">解除报警</button>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<!-- 强制报警提示弹框 -->
|
||||||
|
<CustomPopup v-if="popupType === 'force'" :show="showPopupFlag" popupBorder="1rpx solid rgba(224, 52, 52, 0.3)"
|
||||||
|
:message="popupMessage" icon="/static/images/6170/bj.png" :confirm-text="popupConfirmText"
|
||||||
|
:show-cancel="false" @close="onclosePopup" @confirm="onPopupConfirm" confirmBtnBg="rgba(224, 52, 52, 1)"
|
||||||
|
confirmBtnColor="#fff" />
|
||||||
|
<!-- 解除报警 -->
|
||||||
|
<CustomPopup v-if="popupType === 'cancel'" :show="showPopupFlag" popupBorder="1rpx solid rgba(224, 52, 52, 0.3)"
|
||||||
|
:message="popupMessage" icon="/static/images/6170/svg.png" :confirm-text="popupConfirmText"
|
||||||
|
:show-cancel="false" @close="onclosePopup" @confirm="onPopupConfirm" confirmBtnBg="rgba(224, 52, 52, 1)"
|
||||||
|
confirmBtnColor="#fff" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CustomPopup from '@/components/CustomPopup/CustomPopup.vue'
|
||||||
|
import {
|
||||||
|
deviceInfo,
|
||||||
|
} from '@/api/common/index.js'
|
||||||
|
import {
|
||||||
|
deviceSendAlarmMessage
|
||||||
|
} from '@/api/6170/callPolice.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
CustomPopup
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
deviceList: [],
|
||||||
|
messageToSend: '', //发送信息
|
||||||
|
showPopupFlag: false,
|
||||||
|
popupTitle: '',
|
||||||
|
popupMessage: '确认要对所选设备开启强制报警?',
|
||||||
|
popupConfirmText: '确认',
|
||||||
|
popupType: 'force', // 'force' or 'cancel'
|
||||||
|
pendingAlarmAction: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
selectedDeviceIds() {
|
||||||
|
return this.deviceList.filter(item => item.checked).map(item => item.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onclosePopup() {
|
||||||
|
this.showPopupFlag = false
|
||||||
|
},
|
||||||
|
toggleSelect(index) {
|
||||||
|
this.deviceList[index].checked = !this.deviceList[index].checked
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
// 全选/取消全选
|
||||||
|
selectAll() {
|
||||||
|
console.log('123');
|
||||||
|
const allSelected = this.deviceList.every(item => item.checked);
|
||||||
|
this.deviceList.forEach(item => {
|
||||||
|
item.checked = !allSelected;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
// 获取设备列表
|
||||||
|
getData(deviceType) {
|
||||||
|
this.loading = true;
|
||||||
|
let data = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
deviceType: deviceType
|
||||||
|
}
|
||||||
|
deviceInfo(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
const newDevices = res.rows.map(device => ({
|
||||||
|
...device,
|
||||||
|
showConfirm: false,
|
||||||
|
checked: false
|
||||||
|
}));
|
||||||
|
this.total = res.total;
|
||||||
|
this.deviceList = newDevices
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 强制报警
|
||||||
|
forceAlarm() {
|
||||||
|
const selectedDevices = this.deviceList.filter(item => item.checked)
|
||||||
|
const deviceIds = selectedDevices.map(item => item.id);
|
||||||
|
if (selectedDevices.length === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择一个设备',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.popupType = 'force';
|
||||||
|
this.popupMessage = '确认要对所选设备开启强制报警?';
|
||||||
|
this.showPopupFlag = true;
|
||||||
|
this.pendingAlarmAction = 1
|
||||||
|
|
||||||
|
},
|
||||||
|
// 解除报警
|
||||||
|
cancelAlarm() {
|
||||||
|
const selectedDevices = this.deviceList.filter(item => item.checked);
|
||||||
|
if (selectedDevices.length === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择一个设备',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.popupType = 'cancel';
|
||||||
|
this.popupMessage = '确认要解除所选设备的报警状态?';
|
||||||
|
this.showPopupFlag = true;
|
||||||
|
this.pendingAlarmAction = 0
|
||||||
|
},
|
||||||
|
sendAlarmCommand(type) {
|
||||||
|
const selectedDevices = this.deviceList.filter(item => item.checked);
|
||||||
|
const deviceIds = selectedDevices.map(item => item.id);
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
deviceIds: deviceIds,
|
||||||
|
instructValue: this.pendingAlarmAction, // '强制或者解除'
|
||||||
|
}
|
||||||
|
deviceSendAlarmMessage(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
this.showPopupFlag = false
|
||||||
|
uni.$emit('deviceStatusUpdate', {});
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 500)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 点击确认状态
|
||||||
|
onPopupConfirm() {
|
||||||
|
this.sendAlarmCommand(this.popupType);
|
||||||
|
|
||||||
|
// 处理确认逻辑
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
|
// 监听 'deviceSend' 事件,获取传过来的数据
|
||||||
|
eventChannel.on('devicePolice', (data) => {
|
||||||
|
this.getData(data.data)
|
||||||
|
});
|
||||||
|
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
|
||||||
|
eventChannel.emit('ack', {})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: rgb(18, 18, 18);
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.allSelect {
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
float: right;
|
||||||
|
padding: 25rpx;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-list {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0rpx 20rpx;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-card {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 95%;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border: 2rpx solid rgba(255, 255, 255, 0.5);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox.checked {
|
||||||
|
background: rgba(224, 52, 52, 1);
|
||||||
|
border-color: rgba(224, 52, 52, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-content {
|
||||||
|
background-color: rgb(26, 26, 26);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
position: relative;
|
||||||
|
/* display: flex; */
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
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: 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;
|
||||||
|
font-size: 26rpx;
|
||||||
|
border-radius: 0px 8px 0px 8px;
|
||||||
|
background-color: rgb(42, 42, 42);
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
right: 0rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 52rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.online {
|
||||||
|
color: rgb(187, 230, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.unline {
|
||||||
|
color: rgba(255, 255, 255, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
padding-top: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deviceIMG {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
position: relative;
|
||||||
|
background-color: rgba(42, 42, 42, 0.6);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.IMG {
|
||||||
|
width: 68rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
margin-left: 17%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.onlines::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 15rpx;
|
||||||
|
height: 15rpx;
|
||||||
|
background: rgb(0, 171, 103);
|
||||||
|
border-radius: 50%;
|
||||||
|
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 {
|
||||||
|
width: 2rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
rgba(0, 0, 0, 0) 0%,
|
||||||
|
rgb(255, 255, 255) 50%,
|
||||||
|
rgba(255, 255, 255, 0) 100%);
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-editor {
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-input {
|
||||||
|
width: 95.9%;
|
||||||
|
height: 200rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: rgb(26, 26, 26);
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea {
|
||||||
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
background: rgba(42, 42, 42, 1);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editInfmation {
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 40rpx 40rpx 0px 0px;
|
||||||
|
width: 96%;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
color: rgb(35, 35, 35);
|
||||||
|
border-radius: 50rpx;
|
||||||
|
width: 40%;
|
||||||
|
color: #fff;
|
||||||
|
height: 88rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qz {
|
||||||
|
background: rgba(224, 52, 52, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.jc {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.87);
|
||||||
|
background: rgba(18, 18, 18, 1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -6,7 +6,7 @@
|
|||||||
<!-- 使用自定义导航栏 -->
|
<!-- 使用自定义导航栏 -->
|
||||||
<view v-show="!pageLoading">
|
<view v-show="!pageLoading">
|
||||||
<custom-navbar :title="navTitle" :showBack="true" color="#FFFFFF"
|
<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>
|
@right-click="shareUp"></custom-navbar>
|
||||||
<view class="device-detail-container" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="device-detail-container" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||||
<!-- 设备电量信息 -->
|
<!-- 设备电量信息 -->
|
||||||
@ -16,16 +16,22 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="battery-v1">
|
<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>
|
||||||
<view class="battery-v2">90%</view>
|
<view class="battery-v2"
|
||||||
|
:style="{color: deviceInfo.batteryPercentage < 20 ? '#FF0000' : ''}">
|
||||||
|
{{deviceInfo.batteryPercentage}}%
|
||||||
|
</view>
|
||||||
<view class="battery-v3">电量</view>
|
<view class="battery-v3">电量</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="deviceInfo.chargeState==1">
|
||||||
|
<image src="/static/images/common/chargeState.png" class="chargeStateIMG"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="battery-v1">
|
<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>
|
||||||
<view class="battery-v2">1小时</view>
|
<view class="battery-v2">{{deviceInfo.batteryRemainingTime || '0'}}分钟</view>
|
||||||
<view class="battery-v3">续航时间</view>
|
<view class="battery-v3">续航时间</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -42,28 +48,46 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="info-row">
|
<view class="info-row">
|
||||||
<text class="info-label">设备状态</text>
|
<text class="info-label">设备状态</text>
|
||||||
<text class="info-value status-running">运行中</text>
|
<text class="info-value status-running">{{deviceInfo.onlineStatus===0?'离线':'在线'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-row">
|
<view class="info-row">
|
||||||
<text class="info-label">定位信息</text>
|
<text class="info-label" style="display: flex; align-items: center;">定位信息</text>
|
||||||
<view class="info-value status-running" @click="gpsPosition">
|
<view class="info-value status-running" @click="gpsPosition(deviceInfo)">
|
||||||
<view class="info-value status-running">114.72 30.28</view>
|
<view class="info-value status-running">
|
||||||
<view class="info-value status-running">深圳市龙华区富源晟</view>
|
{{ 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>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="callpolice" v-if="deviceInfo.onlineStatus==0">
|
||||||
|
<view class="">设备强制报警中</view>
|
||||||
|
<view>
|
||||||
|
<uni-icons type="closeempty" size="15" color="rgba(255, 255, 255, 0.9)"
|
||||||
|
@click="handlePolice"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="info-row">
|
<view class="info-row">
|
||||||
<text class="info-label">灯光亮度</text>
|
<text class="info-label">灯光亮度</text>
|
||||||
<text class="info-value status-running">{{ sliderValue }}%</text>
|
<text class="info-value status-running">{{ sliderValue }}%</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- 灯光亮度控制 -->
|
<!-- 灯光亮度控制 -->
|
||||||
<view class="control-card">
|
<view class="control-card" @touchstart="cardTouchStart" @touchmove="cardTouchMove"
|
||||||
<slider :value="sliderValue" min="10" max="100" activeColor="rgb(187, 230, 0)"
|
@touchend="cardTouchEnd">
|
||||||
backgroundColor="rgb(26, 26, 26)" :show-value="false" @changing="onSliderChanging"
|
<view @touchmove.prevent>
|
||||||
@change="onSliderChanging" />
|
<slider :value="sliderValue" min="10" max="100" activeColor="rgb(187, 230, 0)"
|
||||||
|
backgroundColor="rgb(26, 26, 26)" :show-value="false" @changing="onSliderChanging"
|
||||||
|
@change="onSliderChangeEnd" block-color="#fff" block-size="20" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 灯光模式选择 -->
|
<!-- 灯光模式选择 -->
|
||||||
@ -71,7 +95,7 @@
|
|||||||
<view class="mode-buttons">
|
<view class="mode-buttons">
|
||||||
<view class="mode-v1" v-if="hasPermission('1')">
|
<view class="mode-v1" v-if="hasPermission('1')">
|
||||||
<view class="mode-v2" @click="selectMode('main')">
|
<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>
|
||||||
<view class="battery-v2">灯光模式</view>
|
<view class="battery-v2">灯光模式</view>
|
||||||
<view class="mode-v3">{{ currentMainMode }}</view>
|
<view class="mode-v3">{{ currentMainMode }}</view>
|
||||||
@ -80,15 +104,16 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mode-v1" v-if="hasPermission('2')">
|
<view class="mode-v1" v-if="hasPermission('2')">
|
||||||
<view class="mode-v2" @click="lasermode">
|
<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>
|
||||||
<view class="battery-v2">激光模式</view>
|
<view class="battery-v2">激光模式</view>
|
||||||
|
<view class="mode-v3">{{currentlaserMode}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mode-v1" v-if="hasPermission('3')">
|
<view class="mode-v1" v-if="hasPermission('3')">
|
||||||
<view class="mode-v2" @click="uploadStartup">
|
<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>
|
||||||
<view class="battery-v2">开机画面</view>
|
<view class="battery-v2">开机画面</view>
|
||||||
<view class="mode-v3">上传</view>
|
<view class="mode-v3">上传</view>
|
||||||
@ -111,19 +136,23 @@
|
|||||||
<button class="send-btn1" @click="sendPersonnelInfo">发送</button>
|
<button class="send-btn1" @click="sendPersonnelInfo">发送</button>
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<text class="form-label">单位:</text>
|
<text class="form-label">单位:</text>
|
||||||
<input class="form-input" placeholder="请输入单位" v-model="personnelInfo.unitName" />
|
<input class="form-input" placeholder="请输入单位" v-model="personnelInfo.unitName"
|
||||||
|
:maxlength="15" />
|
||||||
</view>
|
</view>
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<text class="form-label">姓名:</text>
|
<text class="form-label">姓名:</text>
|
||||||
<input class="form-input" placeholder="请输入姓名" v-model="personnelInfo.name" />
|
<input class="form-input" placeholder="请输入姓名" v-model="personnelInfo.name"
|
||||||
|
:maxlength="15" />
|
||||||
</view>
|
</view>
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<text class="form-label">职位:</text>
|
<text class="form-label">职位:</text>
|
||||||
<input class="form-input" placeholder="请输入职位" v-model="personnelInfo.position" />
|
<input class="form-input" placeholder="请输入职位" v-model="personnelInfo.position"
|
||||||
|
:maxlength="15" />
|
||||||
</view>
|
</view>
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<text class="form-label">ID:</text>
|
<text class="form-label">ID:</text>
|
||||||
<input class="form-input" placeholder="请输入ID号" v-model="personnelInfo.code" />
|
<input class="form-input" placeholder="请输入ID号" v-model="personnelInfo.code"
|
||||||
|
:maxlength="15" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -135,7 +164,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<input class="form-input" placeholder="请输入文字" v-model="messageToSend" />
|
<input class="form-input1" maxlength="20" placeholder="请输入文字" v-model="messageToSend"
|
||||||
|
@input="filterChinese" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 产品信息 -->
|
<!-- 产品信息 -->
|
||||||
@ -143,15 +173,15 @@
|
|||||||
<view class="section-title">产品信息</view>
|
<view class="section-title">产品信息</view>
|
||||||
<view class="mode-buttons">
|
<view class="mode-buttons">
|
||||||
<view class="mode_1" @click="productparams">
|
<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" class="cpIMG" mode="aspectFit"></image>
|
||||||
<view class="">产品参数</view>
|
<view class="">产品参数</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mode_1" @click="operatingInst">
|
<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" class="cpIMG" mode="aspectFit"></image>
|
||||||
<view class="">操作说明</view>
|
<view class="">操作说明</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mode_1" @click="operatingVideo">
|
<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" class="cpIMG" mode="aspectFit"></image>
|
||||||
<view class="">操作视频</view>
|
<view class="">操作视频</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -185,16 +215,12 @@
|
|||||||
<view class="popup-title">上传开机画面</view>
|
<view class="popup-title">上传开机画面</view>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view class="example-body">
|
<view class="example-body">
|
||||||
<!-- <uni-file-picker limit="1" class="custom-file-picker"></uni-file-picker> -->
|
|
||||||
<view class="icoContent" @click="checkImgUpload">
|
<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"
|
<image v-if="selectedImage" :src="selectedImage" mode="aspectFit" class="img"
|
||||||
style="width: 100%; height: 100%;"></image>
|
style="width: 100%; height: 100%;"></image>
|
||||||
<image v-else mode="aspectFit" class="img"
|
<image v-else mode="aspectFit" class="img"
|
||||||
src="/static/images/6155/DeviceDetail/add.png"></image>
|
src="/static/images/6155/DeviceDetail/add.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="example_title">点击上传图片</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 按钮组 -->
|
<!-- 按钮组 -->
|
||||||
@ -208,9 +234,9 @@
|
|||||||
<!-- 上传画面弹窗 -->
|
<!-- 上传画面弹窗 -->
|
||||||
<view class="agreement-popupC" @click.stop>
|
<view class="agreement-popupC" @click.stop>
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<view class="popup-title">确认开启激光模式?</view>
|
<view class="popup-title">{{ isLaserOn ? '确认关闭激光模式?' : '确认开启激光模式?' }}</view>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view class="popup-Title">
|
<view class="popup-Title" v-if="!isLaserOn">
|
||||||
<view>注意事项</view>
|
<view>注意事项</view>
|
||||||
<view>1.禁止直视光源或反射面!</view>
|
<view>1.禁止直视光源或反射面!</view>
|
||||||
<view>2.避免直射人或易燃物!</view>
|
<view>2.避免直射人或易燃物!</view>
|
||||||
@ -225,8 +251,40 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 人员信息成功提示弹框 -->
|
<!-- 人员信息成功提示弹框 -->
|
||||||
<CustomPopup :show="showPopupFlag" :message="popupMessage" icon="/static/images/sendSucc.png"
|
<CustomPopup v-if="popupType === 'person'" :show="showPopupFlag" :message="popupMessage"
|
||||||
:confirm-text="popupConfirmText" :show-cancel="false" @confirm="onPopupConfirm" />
|
icon="/static/images/common/sendSucc.png" :confirm-text="popupConfirmText" :show-cancel="false"
|
||||||
|
@confirm="onPopupConfirm" />
|
||||||
|
<!-- 开机log上传成功的弹框提示 -->
|
||||||
|
<CustomPopup v-if="popupType === 'logo'" :show="showPopupFlag" :message="popupMessage"
|
||||||
|
icon="/static/images/common/upload.png" :confirm-text="popupConfirmText" :show-cancel="false"
|
||||||
|
@confirm="onPopupConfirm" />
|
||||||
|
<!--============= 电量低于提示弹框=========== -->
|
||||||
|
<CustomPopup v-if="popupType === 'bettery'" :show="showPopupFlag"
|
||||||
|
popupBorder="1rpx solid rgba(224, 52, 52, 0.3)" :message="popupMessage" title="设备电量低于20%"
|
||||||
|
titleColor="rgba(224, 52, 52, 1)" icon="/static/images/common/path.png" :confirm-text="popupConfirmText"
|
||||||
|
:show-cancel="true" @cancel="onPopupConfirm" @confirm="onPopupConfirm"
|
||||||
|
confirmBtnBg="rgba(224, 52, 52, 1)" confirmBtnColor="#fff" />
|
||||||
|
<!-- 解除报警 -->
|
||||||
|
<CustomPopup v-if="popupType === 'cancel'" :show="showPopupFlag"
|
||||||
|
popupBorder="1rpx solid rgba(224, 52, 52, 0.3)" :message="popupMessage"
|
||||||
|
icon="/static/images/6170/svg.png" :confirm-text="popupConfirmText" :show-cancel="false"
|
||||||
|
@confirm="onPopupConfirmPolice" confirmBtnBg="rgba(224, 52, 52, 1)" confirmBtnColor="#fff" />
|
||||||
|
</view>
|
||||||
|
<!-- ===============进度条============== -->
|
||||||
|
<view
|
||||||
|
v-if="Progress.show"
|
||||||
|
@click="closeProgress"
|
||||||
|
:style="{
|
||||||
|
position: 'fixed',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
backgroundColor: Progress.maskBgColor,
|
||||||
|
zIndex: 999
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<Progress :config="Progress" @click.stop />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -237,27 +295,36 @@
|
|||||||
deviceDetail,
|
deviceDetail,
|
||||||
registerPersonInfo,
|
registerPersonInfo,
|
||||||
deviceSendMessage,
|
deviceSendMessage,
|
||||||
deviceShareId
|
deviceShareId,
|
||||||
|
lightModeSettings, //灯光模式设置
|
||||||
|
laserModeSettings, //激光模式设置
|
||||||
|
lightBrightnessSettings, //灯光亮度设置
|
||||||
} from '@/api/6170/deviceControl.js'
|
} from '@/api/6170/deviceControl.js'
|
||||||
import {
|
|
||||||
getDeviceId
|
|
||||||
} from '../../../store/BLETools';
|
|
||||||
import {
|
import {
|
||||||
baseURL,
|
baseURL,
|
||||||
getToken,
|
getToken,
|
||||||
clientid
|
clientid
|
||||||
} from '@/utils/request'
|
} from '@/utils/request'
|
||||||
|
import {
|
||||||
|
deviceSendAlarmMessage
|
||||||
|
} from '@/api/6170/callPolice.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
lastBrightnessTime: 0,
|
||||||
|
isCardSliding: false,
|
||||||
|
cardRect: null,
|
||||||
|
touchStartX: 0,
|
||||||
|
touchStartY: 0,
|
||||||
pageLoading: true,
|
pageLoading: true,
|
||||||
mainMode: 'string',
|
mainMode: 'string',
|
||||||
secondaryMode: 'string',
|
secondaryMode: 'string',
|
||||||
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
|
||||||
navTitle: "",
|
navTitle: "",
|
||||||
sliderValue: 30,
|
sliderValue: 25,
|
||||||
lightModeA: false,
|
lightModeA: false,
|
||||||
currentMainMode: '强光',
|
currentMainMode: '强光',
|
||||||
|
currentlaserMode: "关闭",
|
||||||
lightModeB: false,
|
lightModeB: false,
|
||||||
lightModeC: false, //激光提示框
|
lightModeC: false, //激光提示框
|
||||||
items: [],
|
items: [],
|
||||||
@ -273,13 +340,6 @@
|
|||||||
code: '',
|
code: '',
|
||||||
},
|
},
|
||||||
deviceInfo: {},
|
deviceInfo: {},
|
||||||
modeInstructions: {
|
|
||||||
'关灯': [1, 0, 0, 0, 0],
|
|
||||||
'强光': [1, 1, 0, 0, 0],
|
|
||||||
'弱光': [1, 2, 0, 0, 0],
|
|
||||||
'爆闪': [1, 3, 0, 0, 0],
|
|
||||||
'泛光': [1, 4, 0, 0, 0]
|
|
||||||
},
|
|
||||||
activePermissions: [], // 存储当前设备的权限数组
|
activePermissions: [], // 存储当前设备的权限数组
|
||||||
isSharedDevice: false, // 标记是否来自分享
|
isSharedDevice: false, // 标记是否来自分享
|
||||||
isRightIconVisible: false,
|
isRightIconVisible: false,
|
||||||
@ -289,7 +349,26 @@
|
|||||||
showUploadPopup: false,
|
showUploadPopup: false,
|
||||||
selectedImage: null, // 添加这个变量来存储选择的图片
|
selectedImage: null, // 添加这个变量来存储选择的图片
|
||||||
file: '',
|
file: '',
|
||||||
selectedItemIndex: 0
|
selectedItemIndex: 0,
|
||||||
|
popupType: 'person', //弹框类型
|
||||||
|
isLaserOn: false,
|
||||||
|
// 进度条
|
||||||
|
Progress: {
|
||||||
|
show: false, //是否显示
|
||||||
|
height: '40rpx',
|
||||||
|
showMask: true, //是否显示mask
|
||||||
|
maskBgColor: 'rgba(0, 0, 0, 0.5)', // 半透明黑色遮罩
|
||||||
|
contentBgColor: 'rgba(18, 18, 18, 0.8)', // 主背景带透明度
|
||||||
|
showText: true, //是否显示当前进度的文字
|
||||||
|
txtColor: '#ffffffde', //文字的颜色
|
||||||
|
curr: 20, //当前进度
|
||||||
|
total: 100, //总进度
|
||||||
|
proBgColor: '#2a2a2a', //进度条底色,
|
||||||
|
proBorder: '', //进度条border
|
||||||
|
currBgColor: '#bbe600', //当前进度底色
|
||||||
|
currBorder: '', //当前进度border
|
||||||
|
borderRadius: '10rpx'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -298,21 +377,145 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
filterChinese(e) {
|
||||||
|
const value = e.detail.value;
|
||||||
|
// 允许中文和常见中文标点
|
||||||
|
this.messageToSend = value.replace(/[^\u4e00-\u9fa5,。?!、;:“”‘’()【】《》…—]/g, '');
|
||||||
|
// 修复某些平台输入法兼容性问题
|
||||||
|
this.$nextTick(() => {
|
||||||
|
e.target.value = this.messageToSend;
|
||||||
|
});
|
||||||
|
},
|
||||||
// 点击弹框外的区域关闭
|
// 点击弹框外的区域关闭
|
||||||
closePopup() {
|
closePopup() {
|
||||||
this.lightModeA = false;
|
this.lightModeA = false;
|
||||||
this.lightModeB = false;
|
this.lightModeB = false;
|
||||||
this.lightModeC = false;
|
this.lightModeC = false;
|
||||||
},
|
},
|
||||||
|
closeProgress() {
|
||||||
|
this.Progress.show = false; // 直接关闭进度条
|
||||||
|
},
|
||||||
// *******定位******
|
// *******定位******
|
||||||
gpsPosition() {
|
gpsPosition(item) {
|
||||||
|
// 添加调试日志
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/common/map/index'
|
url: '/pages/common/map/index',
|
||||||
|
events: {
|
||||||
|
ack: function(data) {}
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
res.eventChannel.emit('Map', {
|
||||||
|
data: item
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 强制报警()
|
||||||
|
handlePolice() {
|
||||||
|
this.popupType = 'cancel';
|
||||||
|
this.popupMessage = '确认要解除所选设备的报警状态';
|
||||||
|
this.showPopupFlag = true;
|
||||||
|
},
|
||||||
// ***********进度条***********
|
// ***********进度条***********
|
||||||
|
cardTouchStart(e) {
|
||||||
|
if (!this.cardRect) return;
|
||||||
|
this.touchStartX = e.touches[0].clientX;
|
||||||
|
this.touchStartY = e.touches[0].clientY;
|
||||||
|
},
|
||||||
|
|
||||||
|
cardTouchMove(e) {
|
||||||
|
if (!this.cardRect || e.touches.length === 0) return;
|
||||||
|
const deltaX = e.touches[0].clientX - this.touchStartX;
|
||||||
|
const deltaY = e.touches[0].clientY - this.touchStartY;
|
||||||
|
|
||||||
|
// 只有当水平滑动距离大于垂直距离时,才判断为有效滑动
|
||||||
|
if (Math.abs(deltaX) > Math.abs(deltaY)) {
|
||||||
|
this.isCardSliding = true;
|
||||||
|
this.updateSliderFromTouch(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cardTouchEnd(e) {
|
||||||
|
if (this.isCardSliding) {
|
||||||
|
// 触摸结束时,调用滑动结束的处理函数来发送最终值
|
||||||
|
this.onSliderChangeEnd({
|
||||||
|
detail: {
|
||||||
|
value: this.sliderValue
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.isCardSliding = false;
|
||||||
|
}
|
||||||
|
this.touchStartX = 0;
|
||||||
|
this.touchStartY = 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
updateSliderFromTouch(e) {
|
||||||
|
const touchX = e.touches[0].clientX;
|
||||||
|
const cardLeft = this.cardRect.left;
|
||||||
|
const cardWidth = this.cardRect.width;
|
||||||
|
let relativeX = touchX - cardLeft;
|
||||||
|
// 边界处理
|
||||||
|
if (relativeX < 0) relativeX = 0;
|
||||||
|
if (relativeX > cardWidth) relativeX = cardWidth;
|
||||||
|
const newValue = Math.round((relativeX / cardWidth) * 100);
|
||||||
|
// 调用已有的节流函数来更新值和发送命令
|
||||||
|
this.onSliderChanging({
|
||||||
|
detail: {
|
||||||
|
value: newValue
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
onSliderChanging(e) {
|
onSliderChanging(e) {
|
||||||
this.sliderValue = e.detail.value;
|
if (!this.cardRect) return;
|
||||||
|
let value = e.detail.value;
|
||||||
|
if (value < 10) {
|
||||||
|
value = 10;
|
||||||
|
}
|
||||||
|
this.sliderValue = value; // 实时更新UI
|
||||||
|
|
||||||
|
const now = Date.now();
|
||||||
|
// 使用节流防止指令发送过于频繁
|
||||||
|
if (now - this.lastBrightnessTime > 200) { // 200毫秒节流
|
||||||
|
this.lastBrightnessTime = now;
|
||||||
|
|
||||||
|
// 增加轻微的震动反馈,提升手感
|
||||||
|
uni.vibrateShort({
|
||||||
|
type: 'light'
|
||||||
|
});
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
deviceId: this.deviceID,
|
||||||
|
instructValue: this.sliderValue + '.00',
|
||||||
|
deviceImei:this.itemInfo.deviceImei
|
||||||
|
}
|
||||||
|
lightBrightnessSettings(data).then((res) => {
|
||||||
|
if (res.code !== 200) {
|
||||||
|
// 可以在这里处理错误,但滑动中不建议用toast
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSliderChangeEnd(e) {
|
||||||
|
let value = e.detail.value;
|
||||||
|
if (value < 10) {
|
||||||
|
value = 10;
|
||||||
|
}
|
||||||
|
this.sliderValue = value;
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
deviceId: this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId,
|
||||||
|
instructValue: this.sliderValue + '.00',
|
||||||
|
deviceImei:this.itemInfo.deviceImei
|
||||||
|
}
|
||||||
|
lightBrightnessSettings(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 可以在此处理成功反馈
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.msg || '亮度调节失败'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
selectMode(type) {
|
selectMode(type) {
|
||||||
this.modeType = type;
|
this.modeType = type;
|
||||||
@ -321,30 +524,37 @@
|
|||||||
this.items = [{
|
this.items = [{
|
||||||
text: '强光',
|
text: '强光',
|
||||||
selected: this.currentMainMode === '强光', // 修正匹配条件
|
selected: this.currentMainMode === '强光', // 修正匹配条件
|
||||||
image: '/static/images/sett.png',
|
image: '/static/images/6170/sett.png',
|
||||||
|
instructValue: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '弱光',
|
text: '弱光',
|
||||||
selected: this.currentMainMode === '弱光',
|
selected: this.currentMainMode === '弱光',
|
||||||
image: '/static/images/sett.png'
|
image: '/static/images/6170/rg.png',
|
||||||
|
instructValue: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '爆闪',
|
text: '爆闪',
|
||||||
selected: this.currentMainMode === '爆闪',
|
selected: this.currentMainMode === '爆闪',
|
||||||
image: '/static/images/bs.png'
|
image: '/static/images/6170/bs.png',
|
||||||
|
instructValue: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '泛光',
|
text: '泛光',
|
||||||
selected: this.currentMainMode === '泛光',
|
selected: this.currentMainMode === '泛光',
|
||||||
image: '/static/images/settt.png'
|
image: '/static/images/6170/settt.png',
|
||||||
|
instructValue: '4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '关闭',
|
||||||
|
selected: this.currentMainMode === '关闭',
|
||||||
|
image: '/static/images/6170/close.png',
|
||||||
|
instructValue: '0'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 激光模式
|
// 人员信息登录
|
||||||
lasermode() {
|
|
||||||
this.lightModeC = true
|
|
||||||
},
|
|
||||||
toggleForm() {
|
toggleForm() {
|
||||||
this.isFormExpanded = !this.isFormExpanded;
|
this.isFormExpanded = !this.isFormExpanded;
|
||||||
},
|
},
|
||||||
@ -366,28 +576,64 @@
|
|||||||
},
|
},
|
||||||
// 灯光模式的确认
|
// 灯光模式的确认
|
||||||
handleSumbit() {
|
handleSumbit() {
|
||||||
if (this.selectedItemIndex === null) return;
|
if (this.selectedItemIndex === null) return;
|
||||||
const selectedItem = this.items[this.selectedItemIndex];
|
const selectedItem = this.items[this.selectedItemIndex];
|
||||||
const instruction = this.modeInstructions[selectedItem.text];
|
console.log(selectedItem, 'selectedItemselectedItem');
|
||||||
console.log(selectedItem, 'selectedItemselectedItem');
|
// 修正这里的赋值错误,应该保存索引而不是文本
|
||||||
// 修正这里的赋值错误,应该保存索引而不是文本
|
this.selectedItemIndex = this.selectedItemIndex;
|
||||||
this.selectedItemIndex = this.selectedItemIndex;
|
let data = {
|
||||||
console.log(this.selectedItemIndex,'this.selectedItemIndexthis.selectedItemIndex');
|
deviceId: this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId,
|
||||||
// if (instruction) {
|
instructValue: selectedItem.instructValue,
|
||||||
// const topic = `B/${this.itemInfo.deviceImei}`;
|
deviceImei:this.itemInfo.deviceImei
|
||||||
// const message = JSON.stringify(instruction);
|
}
|
||||||
// // 确保mqttClient已连接
|
lightModeSettings(data).then((res) => {
|
||||||
// if (this.mqttClient && this.mqttClient.client && this.mqttClient.client.isConnected()) {
|
if (res.code == 200) {
|
||||||
// this.mqttClient.publish(topic, message);
|
uni.showToast({
|
||||||
// console.log('已发送指令:', instruction);
|
icon: 'none',
|
||||||
// } else {
|
title: res.msg
|
||||||
// uni.showToast({
|
})
|
||||||
// title: 'MQTT未连接',
|
this.lightModeA = false;
|
||||||
// icon: 'none'
|
} else {
|
||||||
// });
|
uni.showToast({
|
||||||
// }
|
icon: 'none',
|
||||||
// }
|
title: res.msg
|
||||||
this.lightModeA = false;
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 激光模式
|
||||||
|
lasermode() {
|
||||||
|
this.lightModeC = true
|
||||||
|
},
|
||||||
|
// 激光确认框提交
|
||||||
|
handleBtn() {
|
||||||
|
const instructValue = this.isLaserOn ? 0 : 1;
|
||||||
|
let data = {
|
||||||
|
deviceId: this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId,
|
||||||
|
instructValue: instructValue,
|
||||||
|
deviceImei:this.itemInfo.deviceImei
|
||||||
|
}
|
||||||
|
laserModeSettings(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.msg
|
||||||
|
})
|
||||||
|
this.isLaserOn = !this.isLaserOn;
|
||||||
|
this.currentlaserMode = this.isLaserOn ? "开启" : "关闭"; // 更新显示文本
|
||||||
|
this.lightModeC = false
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
//激光取消
|
||||||
|
handleDisagree() {
|
||||||
|
this.lightModeC = false
|
||||||
},
|
},
|
||||||
// 上传开机画面
|
// 上传开机画面
|
||||||
uploadStartup() {
|
uploadStartup() {
|
||||||
@ -414,7 +660,7 @@
|
|||||||
}
|
}
|
||||||
this.selectedImage = res.tempFilePaths[0];
|
this.selectedImage = res.tempFilePaths[0];
|
||||||
console.log('选择的图片:', res);
|
console.log('选择的图片:', res);
|
||||||
this.file = res.tempFiles[0].file
|
//this.file = res.tempFiles[0].file
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('选择图片失败:', err);
|
console.error('选择图片失败:', err);
|
||||||
@ -434,12 +680,21 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 显示进度条
|
||||||
|
this.Progress = {
|
||||||
|
...this.Progress,
|
||||||
|
show: true,
|
||||||
|
curr: 0,
|
||||||
|
showText: true
|
||||||
|
};
|
||||||
|
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: baseURL + '/app/device/uploadLogo',
|
url: baseURL + '/app/bjq/device/uploadLogo',
|
||||||
filePath: this.selectedImage,
|
filePath: this.selectedImage,
|
||||||
name: this.file,
|
name: 'file',
|
||||||
formData: {
|
formData: {
|
||||||
deviceId: this.deviceID,
|
deviceId: this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId,
|
||||||
|
deviceImei:this.itemInfo.deviceImei
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
'Authorization': 'Bearer ' + getToken(),
|
'Authorization': 'Bearer ' + getToken(),
|
||||||
@ -450,10 +705,6 @@
|
|||||||
try {
|
try {
|
||||||
const responseData = JSON.parse(res.data);
|
const responseData = JSON.parse(res.data);
|
||||||
if (responseData.code === 200) {
|
if (responseData.code === 200) {
|
||||||
uni.showToast({
|
|
||||||
title: responseData.msg,
|
|
||||||
icon: 'success'
|
|
||||||
});
|
|
||||||
this.selectedImage = '';
|
this.selectedImage = '';
|
||||||
this.file = null;
|
this.file = null;
|
||||||
this.lightModeB = false
|
this.lightModeB = false
|
||||||
@ -468,12 +719,12 @@
|
|||||||
title: '上传失败',
|
title: '上传失败',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
|
this.Progress.show = false; // 上传失败隐藏进度条
|
||||||
} finally {
|
} finally {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 分享
|
// 分享
|
||||||
shareUp() {
|
shareUp() {
|
||||||
@ -492,48 +743,29 @@
|
|||||||
|
|
||||||
// 操作说明
|
// 操作说明
|
||||||
operatingInst() {
|
operatingInst() {
|
||||||
|
let id = this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/operatingInstruct/index?id=${this.deviceID}`
|
url: `/pages/common/operatingInstruct/index?id=${id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 产品参数
|
// 产品参数
|
||||||
productparams() {
|
productparams() {
|
||||||
|
let id = this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/productDes/index?id=${this.deviceID}`
|
url: `/pages/common/productDes/index?id=${id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 操作视频
|
// 操作视频
|
||||||
operatingVideo() {
|
operatingVideo() {
|
||||||
|
let id = this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/operationVideo/index?id=${this.deviceID}`
|
url: `/pages/common/operationVideo/index?id=${id}`
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 激光确认框
|
|
||||||
handleBtn() {
|
|
||||||
this.lightModeC = false
|
|
||||||
},
|
|
||||||
//取消
|
|
||||||
handleDisagree() {
|
|
||||||
this.lightModeC = false
|
|
||||||
},
|
|
||||||
// 发送人员信息
|
// 发送人员信息
|
||||||
sendPersonnelInfo() {
|
sendPersonnelInfo() {
|
||||||
// if (!this.mqttClient || !this.mqttClient.client.isConnected()) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: 'MQTT未连接',
|
|
||||||
// icon: 'none'
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// const topic = `device/command/${this.deviceID}/personnel`;
|
|
||||||
// const message = JSON.stringify(this.personnelInfo);
|
|
||||||
// this.mqttClient.publish(topic, message);
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '人员信息已发送',
|
|
||||||
// icon: 'success'
|
|
||||||
// });
|
|
||||||
|
|
||||||
if (!this.personnelInfo.unitName) {
|
if (!this.personnelInfo.unitName) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '单位名称不能为空',
|
title: '单位名称不能为空',
|
||||||
@ -571,11 +803,12 @@
|
|||||||
name: this.personnelInfo.name,
|
name: this.personnelInfo.name,
|
||||||
position: this.personnelInfo.position,
|
position: this.personnelInfo.position,
|
||||||
unitName: this.personnelInfo.unitName,
|
unitName: this.personnelInfo.unitName,
|
||||||
deviceId: this.deviceID
|
deviceId: this.apiType === 'listA' ? this.deviceID : this.itemInfo.deviceId,
|
||||||
}
|
}
|
||||||
registerPersonInfo(data).then((res) => {
|
registerPersonInfo(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
this.popupType = 'person';
|
||||||
this.showPopupFlag = true
|
this.showPopupFlag = true
|
||||||
this.popupMessage = '人员信息发送成功'
|
this.popupMessage = '人员信息发送成功'
|
||||||
} else {
|
} else {
|
||||||
@ -590,6 +823,32 @@
|
|||||||
this.showPopupFlag = false
|
this.showPopupFlag = false
|
||||||
console.log('用户点击了确定')
|
console.log('用户点击了确定')
|
||||||
},
|
},
|
||||||
|
// 解除报警
|
||||||
|
onPopupConfirmPolice() {
|
||||||
|
let data = {
|
||||||
|
deviceIds: this.apiType === 'listA' ? [this.deviceID] : [this.itemInfo.deviceId],
|
||||||
|
instructValue: 0, // '解除报警'
|
||||||
|
}
|
||||||
|
deviceSendAlarmMessage(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
this.showPopupFlag = false
|
||||||
|
setTimeout(() => {
|
||||||
|
this.fetchDeviceDetail(this.deviceID);
|
||||||
|
uni.$emit('deviceStatusUpdate', {});
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 发送文本消息
|
// 发送文本消息
|
||||||
sendTextMessage() {
|
sendTextMessage() {
|
||||||
if (!this.messageToSend) {
|
if (!this.messageToSend) {
|
||||||
@ -605,11 +864,14 @@
|
|||||||
})
|
})
|
||||||
let data = {
|
let data = {
|
||||||
sendMsg: this.messageToSend,
|
sendMsg: this.messageToSend,
|
||||||
deviceIds: [this.deviceID]
|
//deviceIds: [this.deviceID],
|
||||||
|
deviceIds: this.apiType === 'listA' ? [this.deviceID] : [this.itemInfo.deviceId],
|
||||||
|
|
||||||
}
|
}
|
||||||
deviceSendMessage(data).then((res) => {
|
deviceSendMessage(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
this.popupType = 'person';
|
||||||
this.showPopupFlag = true
|
this.showPopupFlag = true
|
||||||
this.popupMessage = '发送信息成功'
|
this.popupMessage = '发送信息成功'
|
||||||
} else {
|
} else {
|
||||||
@ -619,18 +881,19 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// const topic = `device/command/${this.deviceID}/message`;
|
|
||||||
// this.mqttClient.publish(topic, this.messageToSend);
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '消息已发送',
|
|
||||||
// icon: 'success'
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
// 统一处理返回方法
|
// 统一处理返回方法
|
||||||
handleDeviceData(res, isFromShared = false) {
|
handleDeviceData(res, isFromShared = false) {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// 最后关闭加载状态
|
// 最后关闭加载状态
|
||||||
this.pageLoading = false
|
this.pageLoading = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
uni.createSelectorQuery().in(this).select('.control-card').boundingClientRect(data => {
|
||||||
|
if (data) {
|
||||||
|
this.cardRect = data;
|
||||||
|
}
|
||||||
|
}).exec();
|
||||||
|
})
|
||||||
this.deviceInfo = res.data
|
this.deviceInfo = res.data
|
||||||
this.personnelInfo = {
|
this.personnelInfo = {
|
||||||
unitName: res.data.personnelInfo?.unitName || '',
|
unitName: res.data.personnelInfo?.unitName || '',
|
||||||
@ -683,7 +946,14 @@
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
handleMqttLost() {
|
||||||
|
this.Progress = {
|
||||||
|
...this.Progress,
|
||||||
|
show: false, // 隐藏进度条
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const eventChannel = this.getOpenerEventChannel();
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
@ -705,23 +975,65 @@
|
|||||||
// 订阅来自设备的状态更新
|
// 订阅来自设备的状态更新
|
||||||
const statusTopic = `A/${this.itemInfo.deviceImei}`;
|
const statusTopic = `A/${this.itemInfo.deviceImei}`;
|
||||||
this.mqttClient.subscribe(statusTopic, (payload) => {
|
this.mqttClient.subscribe(statusTopic, (payload) => {
|
||||||
console.log(`收到来自 ${statusTopic} 的消息:`, payload);
|
try {
|
||||||
// uni.showModal({
|
console.log(`收到来自 ${statusTopic} 的消息:`, payload);
|
||||||
// title: '收到设备消息',
|
//收到电量上报。延迟20s请求接口数据
|
||||||
// content: payload,
|
const parsedMessage = typeof payload === 'string' ? JSON.parse(payload) :
|
||||||
// showCancel: false
|
payload;
|
||||||
// });
|
const deviceState = parsedMessage.state; // 直接取 state 数组
|
||||||
|
// ✅ 发送全局事件通知主页面更新
|
||||||
|
uni.$emit('deviceStatusUpdate', {
|
||||||
|
message: parsedMessage, // 消息内容
|
||||||
|
timestamp: new Date().getTime() // 时间戳
|
||||||
|
});
|
||||||
|
if (deviceState[0] === 12) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.fetchDeviceDetail(data.data.id);
|
||||||
|
}, 20000);
|
||||||
|
// 这里判断电量低于20%,弹框提示
|
||||||
|
if (this.deviceInfo.batteryPercentage < 20) {
|
||||||
|
this.popupType = 'bettery'
|
||||||
|
this.popupMessage = '请及时充电';
|
||||||
|
this.showPopupFlag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 处理上传照片进度消息
|
||||||
|
if (deviceState[0] === 3) {
|
||||||
|
const progress = deviceState[1];
|
||||||
|
// 更新进度条
|
||||||
|
this.Progress = {
|
||||||
|
...this.Progress,
|
||||||
|
curr: progress * 2,
|
||||||
|
show: progress < 50 // 进度达到100时自动隐藏
|
||||||
|
};
|
||||||
|
// 当进度为100时显示成功弹框
|
||||||
|
if (progress === 50) {
|
||||||
|
this.popupType = 'logo';
|
||||||
|
this.popupMessage = '上传成功';
|
||||||
|
this.showPopupFlag = true;
|
||||||
|
this.lightModeB = false; // 关闭上传弹窗
|
||||||
|
this.selectedImage = ''; // 清空已选图片
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('解析MQTT消息失败:', error, '原始消息:', payload);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
|
// 设置连接丢失回调
|
||||||
|
uni.$on('mqttConnectionLost', this.handleMqttLost);
|
||||||
if (this.apiType === 'listA') {
|
if (this.apiType === 'listA') {
|
||||||
this.fetchDeviceDetail(data.data.id)
|
this.fetchDeviceDetail(data.data.id)
|
||||||
} else {
|
} else {
|
||||||
this.fetchSharedDeviceDetail(data.data.deviceId)
|
// 查分享权限详情
|
||||||
|
this.fetchSharedDeviceDetail(data.data.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
|
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
|
||||||
eventChannel.emit('ack', {})
|
eventChannel.emit('ack', {
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
@ -729,6 +1041,10 @@
|
|||||||
if (this.mqttClient) {
|
if (this.mqttClient) {
|
||||||
this.mqttClient.disconnect();
|
this.mqttClient.disconnect();
|
||||||
}
|
}
|
||||||
|
uni.$off('mqttConnectionLost', this.handleMqttLost);
|
||||||
|
if (this.mqttClient) {
|
||||||
|
this.mqttClient.disconnect();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -796,7 +1112,6 @@
|
|||||||
width: 204rpx;
|
width: 204rpx;
|
||||||
height: 144rpx;
|
height: 144rpx;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
object-fit: contain;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dlIMG {
|
.dlIMG {
|
||||||
@ -804,6 +1119,12 @@
|
|||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chargeStateIMG {
|
||||||
|
width: 27rpx;
|
||||||
|
height: 37rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.cpIMG {
|
.cpIMG {
|
||||||
width: 66rpx;
|
width: 66rpx;
|
||||||
height: 66rpx;
|
height: 66rpx;
|
||||||
@ -859,7 +1180,7 @@
|
|||||||
.info-card {
|
.info-card {
|
||||||
background-color: rgb(26, 26, 26);
|
background-color: rgb(26, 26, 26);
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 10rpx 30rpx 5rpx 30rpx;
|
padding: 10rpx 20rpx 5rpx 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -873,6 +1194,7 @@
|
|||||||
.info-label {
|
.info-label {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-value {
|
.info-value {
|
||||||
@ -885,6 +1207,13 @@
|
|||||||
text-align: end;
|
text-align: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.locationGPS {
|
||||||
|
width: 88%;
|
||||||
|
text-align: end;
|
||||||
|
float: right;
|
||||||
|
line-height: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.control-card {
|
.control-card {
|
||||||
background-color: rgb(26, 26, 26);
|
background-color: rgb(26, 26, 26);
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
@ -952,6 +1281,18 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.callpolice {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: rgba(224, 52, 52, 1);
|
||||||
|
padding: 15rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 35rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.example-body {
|
.example-body {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@ -1014,6 +1355,7 @@
|
|||||||
.form-label {
|
.form-label {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-input {
|
.form-input {
|
||||||
@ -1021,6 +1363,15 @@
|
|||||||
border: 1rpx solid transparent;
|
border: 1rpx solid transparent;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input1 {
|
||||||
|
height: 80rpx;
|
||||||
|
border: 1rpx solid transparent;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
width: 98%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-section {
|
.product-section {
|
||||||
@ -1100,7 +1451,7 @@
|
|||||||
/* 弹窗主体 */
|
/* 弹窗主体 */
|
||||||
.agreement-popup {
|
.agreement-popup {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40%;
|
height: 50%;
|
||||||
background-color: rgb(42, 42, 42);
|
background-color: rgb(42, 42, 42);
|
||||||
border-radius: 60rpx 60rpx 0rpx 0rpx;
|
border-radius: 60rpx 60rpx 0rpx 0rpx;
|
||||||
padding: 40rpx;
|
padding: 40rpx;
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
<view class="agreement-mask" v-if="shareShow" @click="closePopup('share')">
|
<view class="agreement-mask" v-if="shareShow" @click="closePopup('share')">
|
||||||
<view class="agreement-popup" @click.stop>
|
<view class="agreement-popup" @click.stop>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/success.png" mode="aspectFit" class="svg"></image>
|
<image src="/static/images/common/success.png" mode="aspectFit" class="svg"></image>
|
||||||
<view>
|
<view>
|
||||||
<view class="popup-Title">设备分享成功</view>
|
<view class="popup-Title">设备分享成功</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<view class="device-info" v-for="(item, index) in deviceList" :key="index">
|
<view class="device-info" v-for="(item, index) in deviceList" :key="index">
|
||||||
<view class="device-header" @click.stop="handleFile(item)">
|
<view class="device-header" @click.stop="handleFile(item)">
|
||||||
<view class="deviceIMG">
|
<view class="deviceIMG">
|
||||||
<image src="@/static/images/user.png" mode="aspectFit" class="IMG"></image>
|
<image src="@/static/images/common/user.png" mode="aspectFit" class="IMG"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="device-name">
|
<view class="device-name">
|
||||||
<view>用户名:{{item.deviceName}}</view>
|
<view>用户名:{{item.deviceName}}</view>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
|
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
|
||||||
<view class="agreement-popup" @click.stop>
|
<view class="agreement-popup" @click.stop>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/delel.png" mode="" class="svg"></image>
|
<image src="/static/images/common/delel.png" mode="" class="svg"></image>
|
||||||
<uni-icon class="trash"></uni-icon>
|
<uni-icon class="trash"></uni-icon>
|
||||||
<view>
|
<view>
|
||||||
<view class="popup-Title">确定移除该用户!</view>
|
<view class="popup-Title">确定移除该用户!</view>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
},
|
},
|
||||||
getData(val) {
|
getData(val) {
|
||||||
let data = {
|
let data = {
|
||||||
deviceid: val
|
deviceId: val
|
||||||
}
|
}
|
||||||
deviceShareList(data).then((res) => {
|
deviceShareList(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<!-- 上传画面弹窗 -->
|
<!-- 上传画面弹窗 -->
|
||||||
<view class="agreement-popupC">
|
<view class="agreement-popupC">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/path2.png" mode="" class="path2"></image>
|
<image src="/static/images/common/path2.png" mode="" class="path2"></image>
|
||||||
<view class="popup-Title">
|
<view class="popup-Title">
|
||||||
<view>保存成功!</view>
|
<view>保存成功!</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<view class="vehicle-list" v-if="vehicles.length>0">
|
<view class="vehicle-list" v-if="vehicles.length>0">
|
||||||
<view v-for="(item, index) in vehicles" :key="index">
|
<view v-for="(item, index) in vehicles" :key="index">
|
||||||
<view class="vehicle-item" @click="alltypeInfo(item)">
|
<view class="vehicle-item" @click="alltypeInfo(item)">
|
||||||
<image src="/static/images/bip.6.png" mode="" class="IMG"></image>
|
<image src="/static/images/common/bip.6.png" mode="" class="IMG"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="plate-number">{{ item.typeName }}</view>
|
<view class="plate-number">{{ item.typeName }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -2,22 +2,25 @@
|
|||||||
<view>
|
<view>
|
||||||
<!-- 使用自定义导航栏 -->
|
<!-- 使用自定义导航栏 -->
|
||||||
<custom-navbar :title="navTitle" :showBack="false" backgroundColor="#202020" color="#FFFFFF"
|
<custom-navbar :title="navTitle" :showBack="false" backgroundColor="#202020" color="#FFFFFF"
|
||||||
rightIcon="/static/images/add.png" @right-click="scan"></custom-navbar>
|
rightIcon="/static/images/common/add.png" @right-click="scan"></custom-navbar>
|
||||||
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
<view class="device-page" :style="{ paddingTop: navBarHeight + 'px' }">
|
||||||
<!-- handleSend 发送信息 -->
|
<!-- handleSend 发送信息 -->
|
||||||
<scroll-view class="tab-bar" scroll-x="true" scroll-with-animation>
|
<view class="tab-bar-wrap">
|
||||||
<view class="tab-container">
|
<scroll-view class="tab-bar" scroll-x="true" scroll-with-animation>
|
||||||
<view v-for="(tab, index) in tabs" :key="index"
|
<view class="tab-container">
|
||||||
:class="['tab-item', activeTab === index ? 'active' : '']" @click="switchTab(tab,index)">
|
<view v-for="(tab, index) in tabs" :key="index"
|
||||||
{{tab.typeName}}
|
:class="['tab-item', activeTab === index ? 'active' : '']" @click="switchTab(tab,index)">
|
||||||
|
{{tab.typeName}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="tab-more" @click="allMore">
|
||||||
|
<image src="/static/images/common/more.png" mode="aspectFit" class="more"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="uniui-more">
|
</view>
|
||||||
<image @click="allMore" src="/static/images/more.png" mode="" class="more"></image>
|
<view class="sendFlex"
|
||||||
</view>
|
v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0 && activeTabInfo.typeName=='BJQ6170'">
|
||||||
</scroll-view>
|
<view class="callpolice" @click="callpolice">报警</view>
|
||||||
<view class="sendFlex" v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0">
|
|
||||||
<!-- <view class="callpolice">报警</view> -->
|
|
||||||
<view class="Sendmessage" @click="location">位置</view>
|
<view class="Sendmessage" @click="location">位置</view>
|
||||||
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
||||||
</view>
|
</view>
|
||||||
@ -27,7 +30,8 @@
|
|||||||
<uni-swipe-action ref="swipeAction">
|
<uni-swipe-action ref="swipeAction">
|
||||||
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
|
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
|
||||||
<uni-swipe-action-item :right-options="Options"
|
<uni-swipe-action-item :right-options="Options"
|
||||||
@click="handleSwipeClick($event, item, index)" class="device-card">
|
@click="handleSwipeClick($event, item, index)" class="device-card"
|
||||||
|
:style="{ border: item.communicationMode==0 && item.onlineStatus==0 ? '1px solid rgba(224, 52, 52, 1)' : 'none' }">
|
||||||
<view @click.stop="handleFile(item)">
|
<view @click.stop="handleFile(item)">
|
||||||
<view class="device-header">
|
<view class="device-header">
|
||||||
<view class="deviceIMG">
|
<view class="deviceIMG">
|
||||||
@ -39,17 +43,24 @@
|
|||||||
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
|
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
|
||||||
</view>
|
</view>
|
||||||
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
||||||
<view class="onlines" v-if="item.communicationMode==0">在线</view>
|
<!-- 在线状态 -->
|
||||||
<view>电量:90%</view>
|
<view class="onlines"
|
||||||
|
v-if="item.communicationMode==0 && item.onlineStatus==1">在线</view>
|
||||||
|
<!-- 离线状态 -->
|
||||||
|
<view class="offlines"
|
||||||
|
v-if="item.communicationMode==0 && item.onlineStatus==0">离线</view>
|
||||||
|
<view>电量:{{item.battery || '0'}}%</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="item.communicationMode==1">
|
<view class="device-callpolice"
|
||||||
|
v-if="item.communicationMode==0 && item.onlineStatus==0">报警中</view>
|
||||||
|
<view v-if="item.communicationMode==1">
|
||||||
<view class="device-status online">已连接</view>
|
<view class="device-status online">已连接</view>
|
||||||
<view class="device-status unline">未连接</view>
|
<view class="device-status unline">未连接</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/images/cires.png" class="circle" mode="aspectFit"></image>
|
<image src="/static/images/common/cires.png" class="circle" mode="aspectFit"></image>
|
||||||
</uni-swipe-action-item>
|
</uni-swipe-action-item>
|
||||||
</block>
|
</block>
|
||||||
</uni-swipe-action>
|
</uni-swipe-action>
|
||||||
@ -67,10 +78,10 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 删除弹框 -->
|
<!-- 删除弹框 -->
|
||||||
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')">
|
<view class="agreement-mask" v-if="deleteShow" @click="closePopup('delete')" catchtouchmove="true">
|
||||||
<view class="agreement-popupC" @click.stop>
|
<view class="agreement-popupC" @click.stop>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/dell.png" mode="" class="svg"></image>
|
<image src="/static/images/common/dell.png" mode="" class="svg"></image>
|
||||||
<uni-icon class="trash"></uni-icon>
|
<uni-icon class="trash"></uni-icon>
|
||||||
<view>
|
<view>
|
||||||
<view class="popup-Title">确定删除所选设备!</view>
|
<view class="popup-Title">确定删除所选设备!</view>
|
||||||
@ -83,7 +94,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- =========重命名============== -->
|
<!-- =========重命名============== -->
|
||||||
<view class="agreement-mask" v-if="RenameModel" @click="closePopup('rename')">
|
<view class="agreement-mask" v-if="RenameModel" @click="closePopup('rename')" catchtouchmove="true">
|
||||||
<view class="agreement-popupD" @click.stop>
|
<view class="agreement-popupD" @click.stop>
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view>
|
<view>
|
||||||
@ -101,9 +112,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 小提示框 -->
|
<!-- 小提示框 -->
|
||||||
<view class="tooltip-box" v-if="showTooltip">
|
<view class="tooltip-box" v-if="showTooltip" @click="closePopupTooltip" catchtouchmove="true">
|
||||||
<view class="tooltip-arrow"></view>
|
<view class="tooltip-arrow"></view>
|
||||||
<view class="tooltip-content">
|
<view class="tooltip-content" @click.stop>
|
||||||
<view class="tooltip-item" v-for="(item, index) in menuItems" :key="index"
|
<view class="tooltip-item" v-for="(item, index) in menuItems" :key="index"
|
||||||
@click="handleMenuClick(item)">
|
@click="handleMenuClick(item)">
|
||||||
<image :src="item.icon" class="item-icon" />
|
<image :src="item.icon" class="item-icon" />
|
||||||
@ -112,9 +123,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- ====分享,类型提示框==== -->
|
<!-- ====分享,类型提示框==== -->
|
||||||
<view class="tooltip-share" v-if="showshare">
|
<view class="tooltip-share" v-if="showshare" @click="closePopupTooltip" catchtouchmove="true">
|
||||||
<view class="tooltip-arrow"></view>
|
<view class="tooltip-arrow"></view>
|
||||||
<view class="tooltip-content">
|
<view class="tooltip-content" @click.stop>
|
||||||
<view class="tooltip-item" v-for="(item, index) in shareItems" :key="index"
|
<view class="tooltip-item" v-for="(item, index) in shareItems" :key="index"
|
||||||
@click="handleshareClick(item)">
|
@click="handleshareClick(item)">
|
||||||
<image :src="item.icon" class="item-icon" />
|
<image :src="item.icon" class="item-icon" />
|
||||||
@ -163,23 +174,23 @@
|
|||||||
RenameModel: false,
|
RenameModel: false,
|
||||||
menuItems: [{
|
menuItems: [{
|
||||||
text: '扫一扫添加',
|
text: '扫一扫添加',
|
||||||
icon: '/static/images/scane.png',
|
icon: '/static/images/common/scane.png',
|
||||||
action: 'scan'
|
action: 'scan'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '蓝牙添加',
|
text: '蓝牙添加',
|
||||||
icon: '/static/images/bluetooth.png',
|
icon: '/static/images/common/bluetooth.png',
|
||||||
action: 'bluetooth'
|
action: 'bluetooth'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
shareItems: [{
|
shareItems: [{
|
||||||
text: '所有类型',
|
text: '所有类型',
|
||||||
icon: '/static/images/type.png',
|
icon: '/static/images/common/type.png',
|
||||||
action: 'type'
|
action: 'type'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '所有分享',
|
text: '所有分享',
|
||||||
icon: '/static/images/share.png',
|
icon: '/static/images/common/share.png',
|
||||||
action: 'share'
|
action: 'share'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -289,17 +300,38 @@
|
|||||||
onScrollToLower() {
|
onScrollToLower() {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
// 添加扫一三图标
|
// 添加扫一扫图标
|
||||||
scan() {
|
scan() {
|
||||||
this.showTooltip = !this.showTooltip;
|
this.showTooltip = !this.showTooltip;
|
||||||
},
|
},
|
||||||
|
closePopupTooltip() {
|
||||||
|
this.showTooltip = !this.showTooltip
|
||||||
|
this.showshare = !this.showshare
|
||||||
|
},
|
||||||
// 添加设备,扫一扫,蓝牙
|
// 添加设备,扫一扫,蓝牙
|
||||||
handleMenuClick(item) {
|
handleMenuClick(item) {
|
||||||
this.showTooltip = false; // 关闭弹窗
|
this.showTooltip = false; // 关闭弹窗
|
||||||
switch (item.action) {
|
switch (item.action) {
|
||||||
case 'scan':
|
case 'scan':
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: '/pages/common/scan/scan'
|
// url: '/pages/common/scan/scan'
|
||||||
|
// });
|
||||||
|
// 扫一扫
|
||||||
|
uni.scanCode({
|
||||||
|
success: (res) => {
|
||||||
|
console.log('条码内容:' + res.result);
|
||||||
|
// 跳转并传递扫描结果
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/common/qrcode/qrcode?deviceId=${encodeURIComponent(res.result)}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log('扫码失败', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '扫码失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'bluetooth':
|
case 'bluetooth':
|
||||||
@ -311,7 +343,6 @@
|
|||||||
},
|
},
|
||||||
// 右滑点击事件处理
|
// 右滑点击事件处理
|
||||||
handleSwipeClick(e, item, index) {
|
handleSwipeClick(e, item, index) {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
content
|
content
|
||||||
} = e
|
} = e
|
||||||
@ -346,6 +377,7 @@
|
|||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.onIntall();
|
this.onIntall();
|
||||||
|
this.getTab()
|
||||||
}, 500);
|
}, 500);
|
||||||
this.deleteShow = false
|
this.deleteShow = false
|
||||||
// 关闭所有滑动项
|
// 关闭所有滑动项
|
||||||
@ -394,10 +426,27 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 报警
|
||||||
|
callpolice() {
|
||||||
|
const currentTab = this.tabs[this.activeTab];
|
||||||
|
const deviceType = currentTab.id || '';
|
||||||
|
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/6170/callPolice/index',
|
||||||
|
events: {
|
||||||
|
ack: function(data) {}
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
res.eventChannel.emit('devicePolice', {
|
||||||
|
data: deviceType
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 发生短信
|
// 发生短信
|
||||||
handleSend() {
|
handleSend() {
|
||||||
const currentTab = this.tabs[this.activeTab];
|
const currentTab = this.tabs[this.activeTab];
|
||||||
const deviceType = currentTab.id || 'all';
|
const deviceType = currentTab.id || '';
|
||||||
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
|
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/common/send/index',
|
url: '/pages/common/send/index',
|
||||||
@ -414,13 +463,21 @@
|
|||||||
// 位置
|
// 位置
|
||||||
location() {
|
location() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/common/map/index'
|
url: '/pages/common/map/index',
|
||||||
|
events: {
|
||||||
|
ack: function(data) {}
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
// 页面跳转成功后的回调函数
|
||||||
|
res.eventChannel.emit('Map', {
|
||||||
|
data: this.deviceList,
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleFile(item) {
|
handleFile(item) {
|
||||||
//console.log('item' + JSON.stringify(item));
|
// communicationMode 0是4G 1是蓝牙,考虑多个4g设备
|
||||||
// communicationMode 0是4G 1是蓝牙
|
if (item.typeName == 'BJQ6170') {
|
||||||
if (item.communicationMode == 0) {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6170/deviceControl/index",
|
url: "/pages/6170/deviceControl/index",
|
||||||
events: {
|
events: {
|
||||||
@ -434,14 +491,29 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else if (item.typeName == 'HBY210') {
|
||||||
|
const currentTab = this.tabs[this.activeTab];
|
||||||
|
const deviceType = currentTab.id || '';
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/210/deviceControl/index",
|
||||||
|
events: {
|
||||||
|
ack: function(data) {}
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
// 页面跳转成功后的回调函数
|
||||||
|
res.eventChannel.emit('deviceControl', {
|
||||||
|
data: item,
|
||||||
|
deviceType: deviceType,
|
||||||
|
apiType: 'listA' // 自定义标识
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (item.typeName == '6155') {
|
if (item.typeName == '6155') {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/deviceDetail",
|
url: "/pages/6155/deviceDetail",
|
||||||
events: {
|
events: {
|
||||||
ack: function(data) {
|
ack: function(data) {}
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
res.eventChannel.emit('detailData', {
|
res.eventChannel.emit('detailData', {
|
||||||
@ -450,14 +522,36 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onIntall() {
|
onIntall() {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.finished = false;
|
this.finished = false;
|
||||||
this.getData(this.deviceType); // 重新加载第一页数据
|
this.getData(this.deviceType); // 重新加载第一页数据
|
||||||
},
|
},
|
||||||
|
updateDeviceStatus(data) {
|
||||||
|
this.deviceList = this.deviceList
|
||||||
|
.map(item => {
|
||||||
|
if (!item) return null; // 如果 item 是 undefined/null,返回 null
|
||||||
|
if (item.communicationMode == 0) {
|
||||||
|
let messageData;
|
||||||
|
try {
|
||||||
|
messageData = data.message;
|
||||||
|
} catch (e) {
|
||||||
|
return item; // 解析失败则返回原 item
|
||||||
|
}
|
||||||
|
const [deviceId, onlineStatus, battery] = messageData.state || [];
|
||||||
|
console.log('我收到消息了没', item.battery);
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
battery: battery ?? item.battery,
|
||||||
|
onlineStatus: onlineStatus ?? item.onlineStatus,
|
||||||
|
lastUpdate: data.timestamp,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
.filter(Boolean);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getTab()
|
this.getTab()
|
||||||
@ -467,11 +561,19 @@
|
|||||||
this.getTab() // 刷新数据
|
this.getTab() // 刷新数据
|
||||||
this.onIntall()
|
this.onIntall()
|
||||||
});
|
});
|
||||||
|
// 监听设备状态更新事件
|
||||||
|
uni.$on('deviceStatusUpdate', (data) => {
|
||||||
|
console.log('列表收到消息了么');
|
||||||
|
this.onIntall()
|
||||||
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
// 组件销毁前移除监听器
|
// 组件销毁前移除监听器
|
||||||
uni.$off('refreshDeviceList');
|
uni.$off('refreshDeviceList');
|
||||||
},
|
},
|
||||||
|
onUnload() {
|
||||||
|
uni.$off('deviceStatusUpdate');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -498,11 +600,10 @@
|
|||||||
|
|
||||||
.tab-container {
|
.tab-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
/* justify-content: space-around; */
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
/* min-width: 100%; */
|
padding-right: 80rpx;
|
||||||
/* 最小宽度 */
|
/* 预留更多按钮空间 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-item {
|
.tab-item {
|
||||||
@ -530,26 +631,26 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-more {
|
.tab-bar-wrap {
|
||||||
|
display: flex;
|
||||||
|
/* 横向排列 */
|
||||||
|
align-items: baseline;
|
||||||
|
/* 垂直居中 */
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
/* 可选(若需要绝对定位 fallback) */
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-more {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
/* 与Tab的间距 */
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: linear-gradient(-88.60deg, rgba(18, 18, 18, 1), rgba(18, 18, 18, 0) 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.more {
|
.more {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 8rpx;
|
height: 8rpx;
|
||||||
/* position: absolute; */
|
|
||||||
/* right: 0rpx;
|
|
||||||
z-index: 100; */
|
|
||||||
float: right;
|
|
||||||
top: -95rpx
|
|
||||||
}
|
|
||||||
|
|
||||||
.gprs {
|
|
||||||
width: 28rpx;
|
|
||||||
height: 35rpx;
|
|
||||||
position: absolute;
|
|
||||||
left: 50rpx
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Sendmessage {
|
.Sendmessage {
|
||||||
@ -599,6 +700,20 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.device-callpolice {
|
||||||
|
width: 122rpx;
|
||||||
|
height: 52rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
border-radius: 0px 8px 0px 8px;
|
||||||
|
background-color: rgba(224, 52, 52, 1);
|
||||||
|
position: absolute;
|
||||||
|
top: 0rpx;
|
||||||
|
right: -4rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 52rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.device-status {
|
.device-status {
|
||||||
width: 122rpx;
|
width: 122rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
@ -672,6 +787,21 @@
|
|||||||
left: -20rpx
|
left: -20rpx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.offlines {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offlines::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 15rpx;
|
||||||
|
height: 15rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.4);
|
||||||
|
border-radius: 50%;
|
||||||
|
top: 20rpx;
|
||||||
|
left: -20rpx
|
||||||
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
width: 2rpx;
|
width: 2rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="pageContent">
|
<view class="pageContent">
|
||||||
<image src="/static/images/login.png" mode="" class="login-bg"></image>
|
<image src="/static/images/common/login.png" mode="" class="login-bg"></image>
|
||||||
<view class="content_con">
|
<view class="content_con">
|
||||||
欢迎登录
|
欢迎登录
|
||||||
</view>
|
</view>
|
||||||
@ -49,7 +49,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -61,8 +60,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showView: false,
|
showView: false,
|
||||||
phone: '13058067817', //手机号码
|
phone: '13800138002', //手机号码
|
||||||
code: "", //验证码
|
code: "123456", //验证码
|
||||||
agreed: false,
|
agreed: false,
|
||||||
isCounting: false,
|
isCounting: false,
|
||||||
countdown: 0,
|
countdown: 0,
|
||||||
|
|||||||
@ -1,236 +1,175 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="map-container">
|
<view>
|
||||||
<!-- 背景保护层 -->
|
<view class="page-body">
|
||||||
<view class="map-background"></view>
|
<view class="page-section page-section-gap">
|
||||||
<view id="mapWrapper" ref="mapRef" class="map-wrapper"></view>
|
<map style="width: 100%; height: 100vh;"
|
||||||
<!-- 加载提示 -->
|
:latitude="latitude"
|
||||||
<view v-if="loading" class="loading-mask">
|
:longitude="longitude"
|
||||||
<view class="loading-content">地图加载中...</view>
|
:markers="covers"
|
||||||
</view>
|
@markertap="onMarkerTap"
|
||||||
</view>
|
:scale="16">
|
||||||
|
</map>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 加载提示 -->
|
||||||
|
<view v-if="loading" class="loading-mask">
|
||||||
|
<view class="loading-content">加载中...</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true
|
title: 'map',
|
||||||
}
|
latitude: 39.909, // 默认纬度
|
||||||
},
|
longitude: 116.39742, // 默认经度
|
||||||
methods: {
|
covers: [], // 标记点数组
|
||||||
hideLoading() {
|
loading: true, // 加载状态
|
||||||
this.loading = false
|
markerData: [] // 存储原始标记数据
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
onLoad() {
|
||||||
|
// 获取事件通道
|
||||||
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
|
// 监听传递过来的位置数据
|
||||||
|
eventChannel.on('Map', (receivedData) => {
|
||||||
|
this.loading = true;
|
||||||
|
this.covers = [];
|
||||||
|
//先获取data属性内容
|
||||||
|
const dataContent = receivedData.data;
|
||||||
|
//data是数组
|
||||||
|
if (Array.isArray(dataContent)) {
|
||||||
|
// 过滤掉经纬度为空的设备
|
||||||
|
const validDevices = dataContent.filter(device =>
|
||||||
|
device.latitude !== null &&
|
||||||
|
device.longitude !== null &&
|
||||||
|
device.latitude !== '' &&
|
||||||
|
device.longitude !== ''
|
||||||
|
);
|
||||||
|
this.markerData = validDevices;
|
||||||
|
if (validDevices.length > 0) {
|
||||||
|
this.processMultipleMarkers(validDevices);
|
||||||
|
} else {
|
||||||
|
console.log('没有有效的设备经纬度数据');
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//data是单个设备对象
|
||||||
|
else if (typeof dataContent === 'object' && dataContent !== null) {
|
||||||
|
if (this.validateMarker(dataContent)) {
|
||||||
|
this.markerData = [dataContent];
|
||||||
|
this.processSingleMarker(dataContent);
|
||||||
|
} else {
|
||||||
|
console.log('单个设备数据缺少有效的经纬度');
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 处理单个标记点
|
||||||
|
processSingleMarker(marker) {
|
||||||
|
// 转换经纬度为数字
|
||||||
|
const lat = parseFloat(marker.latitude);
|
||||||
|
const lng = parseFloat(marker.longitude);
|
||||||
|
// 设置地图中心
|
||||||
|
this.latitude = lat;
|
||||||
|
this.longitude = lng;
|
||||||
|
// 创建标记点
|
||||||
|
this.covers = [{
|
||||||
|
id: marker.deviceImei, // 适配deviceId字段
|
||||||
|
latitude: lat,
|
||||||
|
longitude: lng,
|
||||||
|
iconPath: marker.devicePic || '/static/images/common/device.png',
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
anchor: {x: 0.5, y: 0.5}, // 锚点在中心
|
||||||
|
callout: {
|
||||||
|
content: `ID: ${marker.deviceImei}`
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 处理多个标记点
|
||||||
|
processMultipleMarkers(markers) {
|
||||||
|
// 使用第一个有效标记点的位置作为地图中心
|
||||||
|
const firstMarker = markers[0];
|
||||||
|
this.latitude = parseFloat(firstMarker.latitude);
|
||||||
|
this.longitude = parseFloat(firstMarker.longitude);
|
||||||
|
|
||||||
|
// 转换所有有效标记点
|
||||||
|
this.covers = markers.map((marker, index) => ({
|
||||||
|
id: marker.deviceId || marker.id || marker.deviceImei || index + 1,
|
||||||
|
latitude: parseFloat(marker.latitude),
|
||||||
|
longitude: parseFloat(marker.longitude),
|
||||||
|
iconPath: marker.devicePic || '/static/images/common/device.png',
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
anchor: {x: 0.5, y: 0.5},
|
||||||
|
callout: {
|
||||||
|
content: `ID: ${marker.deviceImei}`,
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 验证标记点是否包含必要信息
|
||||||
|
validateMarker(marker) {
|
||||||
|
// 验证经纬度是否有效
|
||||||
|
const hasValidLat = marker.latitude && marker.latitude !== '' && !isNaN(parseFloat(marker.latitude));
|
||||||
|
const hasValidLng = marker.longitude && marker.longitude !== '' && !isNaN(parseFloat(marker.longitude));
|
||||||
|
return hasValidLat && hasValidLng;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 标记点点击事件
|
||||||
|
onMarkerTap(e) {
|
||||||
|
const clickedMarker = this.markerData.find(
|
||||||
|
item =>item.deviceImei === e.markerId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script module="amap" lang="renderjs">
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
markers: [],
|
|
||||||
customPopup: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// 初始设置背景色
|
|
||||||
const container = document.getElementById('mapWrapper')
|
|
||||||
container.style.backgroundColor = '#121212'
|
|
||||||
container.style.transition = 'background 0.5s'
|
|
||||||
|
|
||||||
this.initMap()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async loadScript(url) {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
const script = document.createElement('script')
|
|
||||||
script.src = url
|
|
||||||
script.onload = resolve
|
|
||||||
document.head.appendChild(script)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
async initMap() {
|
|
||||||
try {
|
|
||||||
// 动态加载SDK
|
|
||||||
if (!window.AMap) {
|
|
||||||
await this.loadScript(
|
|
||||||
'https://webapi.amap.com/maps?v=2.0&key=90bc158992feb8ccd0145e168cab1307'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const container = document.getElementById('mapWrapper')
|
|
||||||
container.innerHTML = `
|
|
||||||
<div id="amapContainer" style="
|
|
||||||
width:100%;
|
|
||||||
height:100%;
|
|
||||||
opacity:0;
|
|
||||||
transition:opacity 0.8s ease-out;
|
|
||||||
background:#121212;
|
|
||||||
"></div>
|
|
||||||
`
|
|
||||||
|
|
||||||
// 初始化地图
|
|
||||||
this.map = new AMap.Map('amapContainer', {
|
|
||||||
viewMode: '3D',
|
|
||||||
zoom: 13,
|
|
||||||
center: [114.305, 30.592],
|
|
||||||
mapStyle: 'amap://styles/grey'
|
|
||||||
})
|
|
||||||
|
|
||||||
// 地图加载完成后淡入
|
|
||||||
this.map.on('complete', () => {
|
|
||||||
document.getElementById('amapContainer').style.opacity = 1
|
|
||||||
this.$ownerInstance.callMethod('hideLoading')
|
|
||||||
|
|
||||||
// 添加标记点
|
|
||||||
const wuhanPoints = [
|
|
||||||
{ lnglat: [114.404, 30.507], name: "华中科技大学" },
|
|
||||||
{ lnglat: [114.428, 30.476], name: "光谷金融港" },
|
|
||||||
{ lnglat: [114.433, 30.504], name: "武汉东站" }
|
|
||||||
]
|
|
||||||
wuhanPoints.forEach(point => {
|
|
||||||
this.addMarker(point.lnglat, point.name)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// 创建自定义弹窗
|
|
||||||
this.createCustomPopup()
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
console.error('初始化失败:', e)
|
|
||||||
this.$ownerInstance.callMethod('hideLoading')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
createCustomPopup() {
|
|
||||||
this.customPopup = document.createElement('div')
|
|
||||||
this.customPopup.className = 'custom-map-popup'
|
|
||||||
this.customPopup.innerHTML = `
|
|
||||||
<div class="popup-content">
|
|
||||||
<div class="popup-title"></div>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
this.customPopup.style.display = 'none'
|
|
||||||
document.getElementById('amapContainer').appendChild(this.customPopup)
|
|
||||||
},
|
|
||||||
|
|
||||||
addMarker(position, title) {
|
|
||||||
const marker = new AMap.Marker({
|
|
||||||
position: new AMap.LngLat(...position),
|
|
||||||
map: this.map,
|
|
||||||
icon: 'https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png',
|
|
||||||
})
|
|
||||||
|
|
||||||
marker.on('click', () => {
|
|
||||||
this.showCustomPopup(position, title)
|
|
||||||
})
|
|
||||||
|
|
||||||
this.markers.push(marker)
|
|
||||||
return marker
|
|
||||||
},
|
|
||||||
|
|
||||||
showCustomPopup(position, title) {
|
|
||||||
const pixel = this.map.lngLatToContainer(position)
|
|
||||||
this.customPopup.querySelector('.popup-title').textContent = title
|
|
||||||
this.customPopup.style.display = 'block'
|
|
||||||
this.customPopup.style.left = `${pixel.x}px`
|
|
||||||
this.customPopup.style.top = `${pixel.y}px`
|
|
||||||
|
|
||||||
this.map.on('click', this.hideCustomPopup)
|
|
||||||
},
|
|
||||||
|
|
||||||
hideCustomPopup() {
|
|
||||||
if (this.customPopup) {
|
|
||||||
this.customPopup.style.display = 'none'
|
|
||||||
}
|
|
||||||
this.map.off('click', this.hideCustomPopup)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* 基础样式 */
|
.loading-mask {
|
||||||
.map-container {
|
position: absolute;
|
||||||
width: 100%;
|
top: 0;
|
||||||
height: 100vh;
|
left: 0;
|
||||||
position: relative;
|
width: 100%;
|
||||||
overflow: hidden;
|
height: 100%;
|
||||||
}
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
.map-background {
|
.loading-content {
|
||||||
position: absolute;
|
color: #fff;
|
||||||
width: 100%;
|
font-size: 16px;
|
||||||
height: 100%;
|
padding: 12px 24px;
|
||||||
background: #121212;
|
background: rgba(0, 0, 0, 0.7);
|
||||||
z-index: 1;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.map-wrapper {
|
.empty-tip {
|
||||||
width: 100%;
|
position: absolute;
|
||||||
height: 100%;
|
top: 50%;
|
||||||
position: relative;
|
left: 50%;
|
||||||
z-index: 2;
|
transform: translate(-50%, -50%);
|
||||||
}
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
color: #fff;
|
||||||
/* 加载提示 */
|
padding: 10px 20px;
|
||||||
.loading-mask {
|
border-radius: 4px;
|
||||||
position: absolute;
|
z-index: 99;
|
||||||
top: 0;
|
}
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: #121212;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading-content {
|
|
||||||
color: rgba(255,255,255,0.9);
|
|
||||||
font-size: 16px;
|
|
||||||
padding: 12px 24px;
|
|
||||||
background: rgba(0,0,0,0.7);
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 弹窗样式 */
|
|
||||||
.custom-map-popup {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 9999;
|
|
||||||
transform: translate(-50%, -100%);
|
|
||||||
min-width: 200rpx;
|
|
||||||
pointer-events: none;
|
|
||||||
animation: popupFadeIn 0.3s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-content {
|
|
||||||
background: rgba(18,45,74,0.95);
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 12rpx 24rpx;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: center;
|
|
||||||
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
|
||||||
border: 1px solid rgba(255,255,255,0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-content:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
bottom: -8px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
border-width: 8px 8px 0;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: rgba(18,45,74,0.95) transparent transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes popupFadeIn {
|
|
||||||
from { opacity: 0; transform: translate(-50%, -90%); }
|
|
||||||
to { opacity: 1; transform: translate(-50%, -100%); }
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<!-- 多选模式下的选中标记 -->
|
<!-- 多选模式下的选中标记 -->
|
||||||
<view class="checkmark" v-if="isDeleteMode && selectedImages.includes(index)">
|
<view class="checkmark" v-if="isDeleteMode && selectedImages.includes(index)">
|
||||||
<image src="/static/images/delete-icon.png" mode="aspectFill"></image>
|
<image src="/static/images/common/delete-icon.png" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<view class="agreement-mask" v-if="deleteShow">
|
<view class="agreement-mask" v-if="deleteShow">
|
||||||
<view class="agreement-popupC">
|
<view class="agreement-popupC">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/dell.png" mode="" class="svg"></image>
|
<image src="/static/images/common/dell.png" mode="" class="svg"></image>
|
||||||
<uni-icon class="trash"></uni-icon>
|
<uni-icon class="trash"></uni-icon>
|
||||||
<view>
|
<view>
|
||||||
<view class="popup-Title">确定删除所选设备!</view>
|
<view class="popup-Title">确定删除所选设备!</view>
|
||||||
|
|||||||
@ -10,20 +10,20 @@
|
|||||||
@click="handleSwipeClick($event, index,item)" class="content">
|
@click="handleSwipeClick($event, index,item)" class="content">
|
||||||
<view class="image-box" @click="openVideoUrl(item.videoUrl)">
|
<view class="image-box" @click="openVideoUrl(item.videoUrl)">
|
||||||
<view class="deviceIMG">
|
<view class="deviceIMG">
|
||||||
<image src="/static/images/video.png" mode="" class="video"></image>
|
<image src="/static/images/common/video.png" mode="" class="video"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="file-title">{{item.videoName}}</view>
|
<view class="file-title">{{item.videoName}}</view>
|
||||||
<view class="file-baidu">{{item.videoUrl}}</view>
|
<view class="file-baidu">{{item.videoUrl}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/images/cires.png" class="circle"></image>
|
<image src="/static/images/common/cires.png" class="circle"></image>
|
||||||
</uni-swipe-action-item>
|
</uni-swipe-action-item>
|
||||||
</block>
|
</block>
|
||||||
</uni-swipe-action>
|
</uni-swipe-action>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="content1" @click="addvideo">
|
<view class="content1" @click="addvideo">
|
||||||
<image src="/static/images/path1.png" class="path1"></image>
|
<image src="/static/images/common/path1.png" class="path1"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<!-- 多选模式下的选中标记 -->
|
<!-- 多选模式下的选中标记 -->
|
||||||
<view class="checkmark" v-if="isDeleteMode && selectedImages.includes(index)">
|
<view class="checkmark" v-if="isDeleteMode && selectedImages.includes(index)">
|
||||||
<image src="/static/images/delete-icon.png" mode="aspectFill"></image>
|
<image src="/static/images/common/delete-icon.png" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<view class="agreement-mask" v-if="deleteShow">
|
<view class="agreement-mask" v-if="deleteShow">
|
||||||
<view class="agreement-popupC">
|
<view class="agreement-popupC">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<image src="/static/images/dell.png" mode="" class="svg"></image>
|
<image src="/static/images/common/dell.png" mode="" class="svg"></image>
|
||||||
<uni-icon class="trash"></uni-icon>
|
<uni-icon class="trash"></uni-icon>
|
||||||
<view>
|
<view>
|
||||||
<view class="popup-Title">确定删除所选设备!</view>
|
<view class="popup-Title">确定删除所选设备!</view>
|
||||||
|
|||||||
@ -2,16 +2,20 @@
|
|||||||
<view class="pageContent">
|
<view class="pageContent">
|
||||||
<!-- 初始状态 -->
|
<!-- 初始状态 -->
|
||||||
<view class="pause" v-if="!isConnecting">
|
<view class="pause" v-if="!isConnecting">
|
||||||
<image src="/static/images/svg.png" class="svg"></image>
|
<image src="/static/images/common/svg.png" class="svg"></image>
|
||||||
<view class="scanT">ID: {{ deviceId }}</view>
|
<view class="scanT">ID: {{ deviceId }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 连接中状态 -->
|
<!-- 连接中状态 -->
|
||||||
<view class="connecting-container" v-else>
|
<view class="connecting-container" v-else>
|
||||||
<view class="device-info">
|
<view class="device-info">
|
||||||
<view>
|
<view class="">
|
||||||
<image src="/static/images/bip.6.png" class="bip"></image>
|
<image src="/static/images/common/svg.png" class="svg"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view>
|
||||||
|
<image src="/static/images/bip.6.png" class="bip"></image>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
<text class="device-name">设备名:{{deviceId}}</text>
|
<text class="device-name">设备名:{{deviceId}}</text>
|
||||||
<text class="device-model1">ID:{{deviceId}}</text>
|
<text class="device-model1">ID:{{deviceId}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -16,32 +16,29 @@
|
|||||||
<view class="device-name">
|
<view class="device-name">
|
||||||
<view>设备:{{item.deviceName}}</view>
|
<view>设备:{{item.deviceName}}</view>
|
||||||
<view class="ID">
|
<view class="ID">
|
||||||
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
|
<view class="ID">ID:{{item.deviceImei}}</view>
|
||||||
</view>
|
<view class="onlines"
|
||||||
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
v-if="item.onlineStatus==1">在线</view>
|
||||||
<!-- <view class="onlines" v-if="item.communicationMode==0">在线</view> -->
|
<!-- 离线状态 -->
|
||||||
<view class="unlines" v-if="item.communicationMode==0">离线</view>
|
<view class="unlines"
|
||||||
<view>电量:90%</view>
|
v-if="item.onlineStatus==0">离线</view>
|
||||||
|
<view>电量:{{item.battery || '0'}}%</view>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="editInfmation">
|
<view class="editInfmation">
|
||||||
<view class="ql-editor">编辑信息</view>
|
<view class="ql-editor">编辑信息</view>
|
||||||
<view class="ql-input">
|
<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"
|
||||||
v-model="messageToSend" />
|
v-model="messageToSend" :maxlength="20"/>
|
||||||
</view>
|
</view>
|
||||||
<button class="login-btn" @click="sendTextMessage">发送</button>
|
<button class="login-btn" @click="sendTextMessage">发送</button>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!-- 成功提示弹框 -->
|
<!-- 成功提示弹框 -->
|
||||||
<CustomPopup :show="showPopupFlag" :title="popupTitle" :message="popupMessage" icon="/static/images/sendSucc.png"
|
<CustomPopup :show="showPopupFlag" :title="popupTitle" :message="popupMessage" icon="/static/images/common/sendSucc.png"
|
||||||
:confirm-text="popupConfirmText" :show-cancel="false" @confirm="onPopupConfirm" />
|
:confirm-text="popupConfirmText" :show-cancel="false" @confirm="onPopupConfirm" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -168,6 +165,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox {
|
.checkbox {
|
||||||
|
|||||||
@ -1,29 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="pageContent">
|
<view class="pageContent">
|
||||||
<image src="/static/images/login.png" mode="" class="login-bg"></image>
|
<image src="/static/images/common/login.png" mode="" class="login-bg"></image>
|
||||||
<view class="content_con">
|
<view class="content_con">
|
||||||
<view class="user_logo">
|
<view class="user_logo">
|
||||||
<image src="/static/images/logo.png" class="logo"></image>
|
<image src="/static/images/common/logo.png" class="logo"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="user-right">
|
<view class="user-right">
|
||||||
<view class="user-title">星汉研创</view>
|
<view class="user-title">富源晟科技</view>
|
||||||
<view class="ID">ID:123456</view>
|
<view class="ID">ID:123456</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="menu-list">
|
<view class="menu-list">
|
||||||
<view class="menu-item" @click="userAgree">
|
<view class="menu-item" @click="userAgree">
|
||||||
<image src="/static/images/xy.png" class="icon"></image>
|
<image src="/static/images/common/xy.png" class="icon"></image>
|
||||||
<text class="title">用户协议</text>
|
<text class="title">用户协议</text>
|
||||||
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-item" @click="privacyAgree">
|
<view class="menu-item" @click="privacyAgree">
|
||||||
<image src="/static/images/ys.png" class="icon"></image>
|
<image src="/static/images/common/ys.png" class="icon"></image>
|
||||||
<text class="title">隐私协议</text>
|
<text class="title">隐私协议</text>
|
||||||
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-item" @click="aboutUs">
|
<view class="menu-item" @click="aboutUs">
|
||||||
<image src="/static/images/wm.png" class="icon"></image>
|
<image src="/static/images/common/wm.png" class="icon"></image>
|
||||||
<text class="title">关于我们</text>
|
<text class="title">关于我们</text>
|
||||||
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
BIN
static/images/210/bj.png
Normal file
|
After Width: | Height: | Size: 392 B |
BIN
static/images/210/bj_1.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
static/images/210/lj.png
Normal file
|
After Width: | Height: | Size: 319 B |
BIN
static/images/210/ls.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
static/images/210/time.png
Normal file
|
After Width: | Height: | Size: 510 B |
BIN
static/images/210/zd-HL.png
Normal file
|
After Width: | Height: | Size: 496 B |
BIN
static/images/210/zd.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
static/images/6170/bj.png
Normal file
|
After Width: | Height: | Size: 398 B |
BIN
static/images/6170/bs.png
Normal file
|
After Width: | Height: | Size: 405 B |
BIN
static/images/6170/close.png
Normal file
|
After Width: | Height: | Size: 400 B |
BIN
static/images/6170/jg.png
Normal file
|
After Width: | Height: | Size: 309 B |
BIN
static/images/6170/rg.png
Normal file
|
After Width: | Height: | Size: 496 B |
BIN
static/images/6170/set.png
Normal file
|
After Width: | Height: | Size: 395 B |
BIN
static/images/6170/sett.png
Normal file
|
After Width: | Height: | Size: 384 B |
BIN
static/images/6170/settt.png
Normal file
|
After Width: | Height: | Size: 686 B |
BIN
static/images/6170/svg.png
Normal file
|
After Width: | Height: | Size: 413 B |
|
Before Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 265 B |
|
Before Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 171 B |
BIN
static/images/common/add.png
Normal file
|
After Width: | Height: | Size: 111 B |
BIN
static/images/common/bip.6.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
static/images/common/bluetooth.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
static/images/common/chargeState.png
Normal file
|
After Width: | Height: | Size: 966 B |
BIN
static/images/common/cires.png
Normal file
|
After Width: | Height: | Size: 128 B |
BIN
static/images/common/cp.png
Normal file
|
After Width: | Height: | Size: 270 B |
BIN
static/images/common/delel.png
Normal file
|
After Width: | Height: | Size: 444 B |
BIN
static/images/common/delete-icon.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
static/images/common/dell.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
static/images/common/device.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
static/images/common/dl.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
static/images/common/login.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
static/images/common/logo.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
static/images/common/more.png
Normal file
|
After Width: | Height: | Size: 150 B |
BIN
static/images/common/nz.png
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
static/images/common/path.png
Normal file
|
After Width: | Height: | Size: 408 B |
BIN
static/images/common/path1.png
Normal file
|
After Width: | Height: | Size: 139 B |
BIN
static/images/common/path2.png
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
static/images/common/path7.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
static/images/common/scan.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
static/images/common/scane.png
Normal file
|
After Width: | Height: | Size: 210 B |
BIN
static/images/common/sendSucc.png
Normal file
|
After Width: | Height: | Size: 444 B |
BIN
static/images/common/shape.png
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
static/images/common/share.png
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
static/images/common/sm.png
Normal file
|
After Width: | Height: | Size: 250 B |
BIN
static/images/common/sp.png
Normal file
|
After Width: | Height: | Size: 195 B |
BIN
static/images/common/success.png
Normal file
|
After Width: | Height: | Size: 456 B |
BIN
static/images/common/svg.png
Normal file
|
After Width: | Height: | Size: 471 B |
BIN
static/images/common/type.png
Normal file
|
After Width: | Height: | Size: 197 B |
BIN
static/images/common/upload.png
Normal file
|
After Width: | Height: | Size: 252 B |
BIN
static/images/common/user.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
static/images/common/video.png
Normal file
|
After Width: | Height: | Size: 355 B |
BIN
static/images/common/wm.png
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
static/images/common/xy.png
Normal file
|
After Width: | Height: | Size: 239 B |
BIN
static/images/common/ys.png
Normal file
|
After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 486 B |
|
Before Width: | Height: | Size: 605 B |
|
Before Width: | Height: | Size: 766 B |
|
Before Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 250 B |
|
Before Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 901 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 563 B |