1
0
forked from dyf/APP

6170增加强制报警页面功能

This commit is contained in:
fengerli
2025-08-02 16:32:48 +08:00
parent d0aca9e730
commit c15e7b4aad
9 changed files with 855 additions and 241 deletions

View File

@ -1,182 +1,183 @@
<template>
<view class="agreement-mask" v-if="show" @click="closePopup">
<view class="agreement-popup" @click.stop>
<view class="popup-content">
<!-- 动态图标 -->
<image v-if="showIcon && icon" :src="icon" mode="aspectFit" class="svg"></image>
<view class="text-content">
<!-- 动态标题 -->
<view class="popup-Title" v-if="title">{{ title }}</view>
<!-- 动态消息内容 -->
<view class="popup-Message" v-if="message">{{ message }}</view>
</view>
</view>
<!-- 按钮组 -->
<view class="popup-buttons">
<button v-if="showCancel" class="btn cancelBtn" @click="handleCancel">{{ cancelText }}</button>
<button class="btn agreeBtn" @click="handleConfirm">{{ confirmText }}</button>
</view>
</view>
</view>
<view class="agreement-mask" v-if="show" @click="closePopup">
<view class="agreement-popup" @click.stop>
<view class="popup-content">
<!-- 动态图标 -->
<image v-if="showIcon && icon" :src="icon" mode="aspectFit" class="svg"></image>
<view class="text-content">
<!-- 动态标题 -->
<view class="popup-Title" v-if="title">{{ title }}</view>
<!-- 动态消息内容 -->
<view class="popup-Message" v-if="message">{{ message }}</view>
</view>
</view>
<!-- 按钮组 -->
<view class="popup-buttons">
<button v-if="showCancel" class="btn cancelBtn" @click="handleCancel">{{ cancelText }}</button>
<button class="btn agreeBtn" @click="handleConfirm">{{ confirmText }}</button>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
// 控制显示
show: {
type: Boolean,
default: false
},
// 标题内容(可选)
title: {
type: String,
default: ''
},
// 消息内容
message: {
type: String,
default: ''
},
// 确认按钮文本
confirmText: {
type: String,
default: '确定'
},
// 取消按钮文本
cancelText: {
type: String,
default: '取消'
},
// 是否显示取消按钮
showCancel: {
type: Boolean,
default: false
},
// 是否显示图标
showIcon: {
type: Boolean,
default: true
},
// 图标路径(支持网络和本地路径)
icon: {
type: String,
default: ''
},
// 图标样式
iconStyle: {
type: Object,
default: () => ({
width: '58rpx',
height: '62rpx',
marginBottom: '20rpx'
})
}
},
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)
}
}
}
export default {
props: {
// 控制显示
show: {
type: Boolean,
default: false
},
// 标题内容(可选)
title: {
type: String,
default: ''
},
// 消息内容
message: {
type: String,
default: ''
},
// 确认按钮文本
confirmText: {
type: String,
default: '确定'
},
// 取消按钮文本
cancelText: {
type: String,
default: '取消'
},
// 是否显示取消按钮
showCancel: {
type: Boolean,
default: false
},
// 是否显示图标
showIcon: {
type: Boolean,
default: true
},
// 图标路径(支持网络和本地路径)
icon: {
type: String,
default: ''
},
// 图标样式
iconStyle: {
type: Object,
default: () => ({
width: '58rpx',
height: '62rpx',
marginBottom: '20rpx'
})
}
},
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>
<style scoped>
/* 遮罩层 */
.agreement-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
/* 遮罩层 */
.agreement-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
/* 弹窗主体 */
.agreement-popup {
width: 60%;
background-color: rgb(42, 42, 42);
border-radius: 40rpx;
padding: 30rpx;
text-align: center;
border: 1px solid rgba(255, 200, 78, 0.3);
}
/* 弹窗主体 */
.agreement-popup {
width: 66%;
background: rgba(56, 57, 52, 0.4);
border-radius: 40rpx;
padding: 30rpx;
text-align: center;
border: 1px solid rgba(187, 230, 0, 0.3);
}
.popup-content {
display: flex;
flex-direction: column;
align-items: center;
}
.popup-content {
display: flex;
flex-direction: column;
align-items: center;
}
.text-content {
width: 100%;
}
.text-content {
width: 100%;
}
.popup-Title {
color: rgba(255, 255, 255, 0.86);
text-align: center;
padding: 30rpx 0 10rpx;
font-size: 32rpx;
font-weight: bold;
}
.popup-Title {
color: rgba(255, 255, 255, 0.86);
text-align: center;
padding: 30rpx 0 10rpx;
font-size: 32rpx;
font-weight: bold;
}
.popup-Message {
color: rgba(255, 255, 255, 0.7);
text-align: center;
padding: 10rpx 20rpx 30rpx;
font-size: 28rpx;
line-height: 1.5;
}
.popup-Message {
color: rgba(255, 255, 255, 0.7);
text-align: center;
padding: 10rpx 20rpx 30rpx;
font-size: 28rpx;
line-height: 1.5;
white-space: nowrap;
}
/* 图标样式 */
.svg {
width: 72rpx;
height: 60rpx;
margin-bottom: v-bind('iconStyle.marginBottom');
}
/* 图标样式 */
.svg {
width: 72rpx;
height: 60rpx;
margin-bottom: v-bind('iconStyle.marginBottom');
}
/* 按钮组 */
.popup-buttons {
display: flex;
justify-content: center;
margin-top: 20rpx;
}
/* 按钮组 */
.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;
}
/* 按钮基础样式 */
.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;
}
/* 确认按钮 */
.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);
}
/* 取消按钮 */
.cancelBtn {
background: transparent;
color: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(255, 255, 255, 0.3);
}
</style>

View File

@ -1,6 +1,6 @@
{
"pages": [
{
"path": "pages/common/login/index",
"style": {
@ -8,9 +8,9 @@
}
},
{
"path": "pages/common/index/index",
"style": {
@ -65,6 +65,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/6170/callPolice/index",
"style": {
"navigationBarTitleText": "报警"
}
},
{
"path": "pages/210/deviceControl/index",
"style": {
@ -98,31 +105,27 @@
}
},
{
"path" : "pages/common/addBLE/addEquip",
"style" :
{
"navigationBarTitleText" : "添加设备"
"path": "pages/common/addBLE/addEquip",
"style": {
"navigationBarTitleText": "添加设备"
}
},
{
"path" : "pages/common/addBLE/LinkBle",
"style" :
{
"navigationBarTitleText" : "扫描到的设备"
"path": "pages/common/addBLE/LinkBle",
"style": {
"navigationBarTitleText": "扫描到的设备"
}
},
{
"path" : "pages/6155/deviceDetail",
"style" :
{
"navigationBarTitleText" : "HBY 6155"
"path": "pages/6155/deviceDetail",
"style": {
"navigationBarTitleText": "HBY 6155"
}
},
{
"path" : "pages/6155/ImgCrop",
"style" :
{
"navigationBarTitleText" : "图像裁剪",
"path": "pages/6155/ImgCrop",
"style": {
"navigationBarTitleText": "图像裁剪",
"navigationStyle": "custom",
"fullscreen": true
}
@ -145,7 +148,7 @@
"navigationBarTitleText": "所有分享"
}
},
{
"path": "pages/6170/share/index",
"style": {
@ -163,8 +166,15 @@
"style": {
"navigationBarTitleText": "分享管理"
}
},
{
"path": "pages/210/onlineDevice/index",
"style": {
"navigationBarTitleText": "联机设备"
}
}
],
],
"tabBar": {
"color": "#fff",
"selectedColor": "#BBE600",

View File

@ -25,7 +25,7 @@
<view class="battery-v1">
<image src="/static/images/common/nz.png" class="dlIMG" mode="aspectFit"></image>
<view>
<view class="battery-v2">1小时</view>
<view class="battery-v2">{{deviceInfo.batteryRemainingTime}}分钟</view>
<view class="battery-v3">续航时间</view>
</view>
</view>
@ -58,17 +58,24 @@
</view>
<!-- ===========主副机选择============= -->
<view class="mode-section">
<view class="radio-group">
<view v-for="(item, index) in radioList" :key="index" @click="handleRadioSelect(index)"
class="group-item">
<view class="radio-icon" :class="{ 'selected': radioSelected === index }">
{{ item }}
<view class="uni-border"></view>
</view>
</view>
</view>
</view>
<!-- 灯光模式选择 -->
<view class="mode-section">
<view class="mode-buttons">
<view class="mode-v1">
<view class="mode-v2" @click="selectMode('main')">
<view class="mode-v2" @click="selectMode">
<image src="/static/images/210/lj.png" class="setIMG"></image>
<view>
<view class="battery-v2">灯光模式</view>
<view class="mode-v3">{{ currentMainMode }}</view>
<view class="battery-v2">联机设备</view>
</view>
</view>
</view>
@ -115,7 +122,7 @@
</view>
</view>
</view>
</view>
</view>
@ -278,9 +285,7 @@
secondaryMode: 'string',
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
navTitle: "",
lightModeA: false,
currentMainMode: '强光',
lightModeB: false,
lightModeC: false, //激光提示框
items: [],
@ -306,12 +311,9 @@
showUploadPopup: false,
selectedImage: null, // 添加这个变量来存储选择的图片
file: '',
selectedItemIndex: 0
}
},
computed: {
popupTitle() {
return this.modeType === 'main' ? '灯光模式' : '激光模式';
selectedItemIndex: 0,
radioList: ['M', 'S'],
radioSelected: 0, // -1表示未选中任何项
}
},
methods: {
@ -321,48 +323,21 @@
this.lightModeB = false;
this.lightModeC = false;
},
handleRadioSelect(index) {
this.radioSelected = index;
console.log('选中了单选选项:', this.radioList[index]);
},
// *******定位******
gpsPosition() {
uni.navigateTo({
url: '/pages/common/map/index'
})
},
selectMode(type) {
this.modeType = type;
this.lightModeA = true;
if (type === 'main') {
this.items = [{
text: '强光',
selected: this.currentMainMode === '强光', // 修正匹配条件
image: '/static/images/sett.png',
instructValue: '1'
},
{
text: '弱光',
selected: this.currentMainMode === '弱光',
image: '/static/images/rg.png',
instructValue: '2'
},
{
text: '爆闪',
selected: this.currentMainMode === '爆闪',
image: '/static/images/bs.png',
instructValue: '3'
},
{
text: '泛光',
selected: this.currentMainMode === '泛光',
image: '/static/images/settt.png',
instructValue: '4'
},
{
text: '关闭',
selected: this.currentMainMode === '关闭',
image: '/static/images/close.png',
instructValue: '0'
},
];
}
// 联机设备
selectMode() {
uni.navigateTo({
url:'/pages/210/onlineDevice/index'
})
},
// 人员信息登录
toggleForm() {
@ -488,7 +463,7 @@
// 显示上传中加载提示
uni.showLoading({
title: '上传中...',
mask: true
mask: true
});
uni.uploadFile({
@ -717,7 +692,7 @@
});
});
});
this.fetchDeviceDetail(data.data.id)
this.fetchDeviceDetail(data.data.id)
});
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
@ -857,6 +832,41 @@
padding-top: 10rpx;
}
.radio-group {
display: flex;
gap: 12px;
align-items: center;
margin-bottom: 20rpx;
font-size:200rpx;
}
.group-item {
background: rgba(26, 26, 26, 1);
width: 100%;
height: 136rpx;
border-radius: 72rpx;
text-align: center;
line-height:136rpx;
position: relative;
}
.radio-icon.selected {
background-color: rgba(174, 214, 0, 1);
transition: background-color 0.3s;
border-radius: 72rpx;
}
.radio-icon{
font-size:50rpx;
}
.uni-border{
border:4rpx solid rgba(26, 26, 26, 1);
width:96%;
height:123rpx;
position: absolute;
top:7rpx;
left:6rpx;
border-radius:72rpx;
}
.info-card {
background-color: rgb(26, 26, 26);
border-radius: 16rpx;
@ -885,10 +895,12 @@
color: rgba(255, 255, 255, 0.6);
text-align: end;
}
.status-greend{
.status-greend {
color: rgba(174, 214, 0, 1);
text-align: end;
}
.light {
position: absolute;
/* top:10rpx; */

View File

@ -0,0 +1,241 @@
<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
}
},
methods: {
// 添加视频
addvideo() {
uni.navigateTo({
url: `/pages/common/addvideo/index??id=${this.deviceID}`
})
},
getData() {
let data = {
deviceId: this.deviceID
}
},
// 发生短信
handleSend() {
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
uni.navigateTo({
url: '/pages/common/send/index',
events: {
ack: function(data) {}
},
success: (res) => {
res.eventChannel.emit('deviceSend', {
});
}
})
},
},
onShow() {
this.getData()
},
onLoad(options) {
this.deviceID = options.id
}
}
</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>

View 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/6170/bj.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('devicePolice', (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;
width: 100%;
position: fixed;
bottom: 50rpx;
box-sizing: border-box;
}
.login-btn {
margin-top: 30rpx;
background-color: rgb(187, 230, 0);
color: rgb(35, 35, 35);
border-radius: 50rpx;
width: 90%;
}
</style>

View File

@ -144,7 +144,7 @@
</view>
<view class="form-row">
<input class="form-input" placeholder="请输入文字" v-model="messageToSend" />
<input class="form-input" maxlength="20" placeholder="请输入文字" v-model="messageToSend" />
</view>
</view>
<!-- 产品信息 -->

View File

@ -19,7 +19,7 @@
</view>
</view>
<view class="sendFlex" v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0">
<!-- <view class="callpolice">报警</view> -->
<view class="callpolice" @click="callpolice">报警</view>
<view class="Sendmessage" @click="location">位置</view>
<view class="Sendmessage" @click="handleSend">发送信息</view>
</view>
@ -402,6 +402,23 @@
}
})
},
// 报警
callpolice(){
const currentTab = this.tabs[this.activeTab];
const deviceType = currentTab.id || 'all';
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() {
const currentTab = this.tabs[this.activeTab];

View File

@ -165,6 +165,7 @@
display: flex;
align-items: center;
width: 95%;
margin-bottom: 20rpx;
}
.checkbox {

BIN
static/images/6170/bj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB