批量报警、批量发送消息,分供应商处理
This commit is contained in:
80
App.vue
80
App.vue
@ -30,43 +30,41 @@
|
|||||||
//以上代码仅在开发时使用,否则会出现不可预知的问题。
|
//以上代码仅在开发时使用,否则会出现不可预知的问题。
|
||||||
|
|
||||||
// #ifdef APP|APP-PLUS
|
// #ifdef APP|APP-PLUS
|
||||||
|
if (plus.runtime.isAgreePrivacy()) {
|
||||||
bleTool.getBleTool();
|
|
||||||
|
|
||||||
var appid = plus.runtime.appid;
|
|
||||||
console.log('应用的 appid 为:' + appid);
|
|
||||||
|
|
||||||
|
|
||||||
uni.getPushClientId({
|
bleTool.getBleTool();
|
||||||
success(res) {
|
|
||||||
console.log("推送信息:", res);
|
uni.getPushClientId({
|
||||||
uni.setStorageSync('push_cid', res.cid);
|
success(res) {
|
||||||
},
|
console.log("推送信息:", res);
|
||||||
fail(err) {
|
uni.setStorageSync('push_cid', res.cid);
|
||||||
console.error(err)
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.error(err)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!uni.setAppBadgeNumber) { //兼容鸿蒙的写法
|
||||||
|
uni.setAppBadgeNumber = plus.runtime.setBadgeNumber;
|
||||||
}
|
}
|
||||||
});
|
uni.onPushMessage((res) => {
|
||||||
if(!uni.setAppBadgeNumber){//兼容鸿蒙的写法
|
console.log("收到推送消息:", res); //监听推送消息
|
||||||
uni.setAppBadgeNumber=plus.runtime.setBadgeNumber;
|
if (res.type == 'click') {
|
||||||
}
|
//将App角标设置为0,清空app在消息中心的所有消息
|
||||||
uni.onPushMessage((res) => {
|
uni.setAppBadgeNumber(0);
|
||||||
console.log("收到推送消息:", res); //监听推送消息
|
plus.push.clear();
|
||||||
if(res.type=='click'){
|
return;
|
||||||
//将App角标设置为0,清空app在消息中心的所有消息
|
}
|
||||||
uni.setAppBadgeNumber(0);
|
uni.createPushMessage({
|
||||||
plus.push.clear();
|
title: res.data.title,
|
||||||
return;
|
content: res.data.content,
|
||||||
}
|
payload: res.data.payload
|
||||||
uni.createPushMessage({
|
});
|
||||||
title: res.data.title,
|
|
||||||
content: res.data.content,
|
|
||||||
payload:res.data.payload
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
@ -74,18 +72,15 @@
|
|||||||
console.log('App Show');
|
console.log('App Show');
|
||||||
|
|
||||||
//将检查更新换到onshow,因为苹果用户喜欢一直挂着
|
//将检查更新换到onshow,因为苹果用户喜欢一直挂着
|
||||||
uni.getSystemInfo({
|
// #ifdef APP|APP-PLUS
|
||||||
success: function(res) {
|
|
||||||
if (res.uniPlatform == 'app') {
|
|
||||||
|
|
||||||
let appid = plus.runtime.appid;
|
let appid = plus.runtime.appid;
|
||||||
if (appid !== 'HBuilder') {
|
console.log("appid=", appid);
|
||||||
console.log("appid=", appid);
|
|
||||||
upgrade.checkAndUpdateWgt();
|
if (appid !== 'HBuilder') {
|
||||||
}
|
upgrade.checkAndUpdateWgt();
|
||||||
}
|
}
|
||||||
}
|
// #endif
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide');
|
console.log('App Hide');
|
||||||
@ -212,5 +207,4 @@
|
|||||||
font-family: "PingFangBold";
|
font-family: "PingFangBold";
|
||||||
src: url("~@/static/fonts/PingFangBold.ttf") format("opentype");
|
src: url("~@/static/fonts/PingFangBold.ttf") format("opentype");
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
25
pages.json
25
pages.json
@ -52,8 +52,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/common/send/index",
|
"path": "pages/common/send/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "发送信息",
|
"navigationBarTitleText": "发送信息"
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -102,10 +101,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/6170/callPolice/index",
|
"path": "pages/common/callPolice/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "报警",
|
"navigationBarTitleText": "报警"
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -160,14 +158,7 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/6155/ImgCrop",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "图像裁剪",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"fullscreen": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/6075/BJQ6075",
|
"path": "pages/6075/BJQ6075",
|
||||||
"style": {
|
"style": {
|
||||||
@ -447,6 +438,14 @@
|
|||||||
{
|
{
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/common/ImgCrop/ImgCrop",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "图像裁剪",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"fullscreen": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@ -679,7 +679,7 @@
|
|||||||
}
|
}
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOverPath: function(data) {
|
ImgCutOverPath: function(data) {
|
||||||
that.selectedImage = data.picPath;
|
that.selectedImage = data.picPath;
|
||||||
|
|||||||
@ -1145,7 +1145,7 @@
|
|||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOver: function(data) {
|
ImgCutOver: function(data) {
|
||||||
|
|
||||||
|
|||||||
@ -909,7 +909,7 @@
|
|||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOver: function(data) {
|
ImgCutOver: function(data) {
|
||||||
|
|
||||||
|
|||||||
@ -1,100 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<canvas id="splashCanvas" canvas-id="splashCanvas" :style="{'width':width+'px','height':height+'px'}" style=" z-index: 9999;position: fixed; visibility: hidden;"></canvas>
|
|
||||||
|
|
||||||
|
|
||||||
<qf-image-cropper :src="src" :showAngle="false" :width="cropWidth" :height="cropHeight" fileType="jpg"
|
|
||||||
@crop="handleCrop" :areaScale="0.1" :minScale="0.1" :gpu="true">
|
|
||||||
</qf-image-cropper>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue';
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
QfImageCropper
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
src: "",
|
|
||||||
Statu: false,
|
|
||||||
width:160,
|
|
||||||
height:80,
|
|
||||||
times:10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed:{
|
|
||||||
cropWidth(){
|
|
||||||
return this.width*this.times;
|
|
||||||
}
|
|
||||||
,
|
|
||||||
cropHeight(){
|
|
||||||
return this.height*this.times;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad: function(option) {
|
|
||||||
const eventChannel = this.getOpenerEventChannel();
|
|
||||||
var these = this;
|
|
||||||
eventChannel.on('checkImg', (rec)=> {
|
|
||||||
console.log("我收到你的消息了,消息内容是:" + JSON.stringify(rec));
|
|
||||||
this.src = rec.data;
|
|
||||||
this.width=rec.width?rec.width:160;
|
|
||||||
this.height=rec.height?rec.height:80;
|
|
||||||
this.times=rec.times?rec.times:10;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleCrop(e) {
|
|
||||||
|
|
||||||
var these = this;
|
|
||||||
const eventChannel = these.getOpenerEventChannel();
|
|
||||||
this.Statu = true;
|
|
||||||
console.log("裁剪完成");
|
|
||||||
console.log(e.tempFilePath);
|
|
||||||
eventChannel.emit('ImgCutOver_Path',e.tempFilePath);
|
|
||||||
const ctx = uni.createCanvasContext('splashCanvas', this);
|
|
||||||
ctx.drawImage(
|
|
||||||
e.tempFilePath,
|
|
||||||
0,0,these.width,these.height
|
|
||||||
);
|
|
||||||
setTimeout(() => {
|
|
||||||
ctx.draw(false, ()=>{
|
|
||||||
console.log("abcdefg")
|
|
||||||
uni.canvasGetImageData({
|
|
||||||
canvasId: 'splashCanvas',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
width: these.width,
|
|
||||||
height: these.height,
|
|
||||||
success: (res) => {
|
|
||||||
// 处理像素数据并发送
|
|
||||||
|
|
||||||
console.log("res.data.length="+res.data.length);
|
|
||||||
eventChannel.emit('ImgCutOverPath', {
|
|
||||||
picPath: e.tempFilePath
|
|
||||||
});
|
|
||||||
|
|
||||||
eventChannel.emit('ImgCutOver',{piexls:res.data,picPath:e.tempFilePath});
|
|
||||||
|
|
||||||
uni.navigateBack();
|
|
||||||
},
|
|
||||||
fail: (err) => {
|
|
||||||
reject(`获取canvas数据失败: ${err.errMsg}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.canvas {
|
|
||||||
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -926,7 +926,7 @@
|
|||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOver: function(data) {
|
ImgCutOver: function(data) {
|
||||||
|
|
||||||
|
|||||||
@ -979,7 +979,7 @@
|
|||||||
}
|
}
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOver: function(data) {
|
ImgCutOver: function(data) {
|
||||||
that.selectedImage = data.picPath;
|
that.selectedImage = data.picPath;
|
||||||
|
|||||||
@ -1051,7 +1051,7 @@ import request, { baseURL } from '@/utils/request.js';
|
|||||||
var gotoCutImg = (imgPath) => {
|
var gotoCutImg = (imgPath) => {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOver: function(data) {
|
ImgCutOver: function(data) {
|
||||||
// console.log("我收到裁剪后的图片了,感谢老铁," + data)
|
// console.log("我收到裁剪后的图片了,感谢老铁," + data)
|
||||||
|
|||||||
@ -1871,7 +1871,7 @@
|
|||||||
var gotoCutImg = (imgPath) => {
|
var gotoCutImg = (imgPath) => {
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOver: function(data) {
|
ImgCutOver: function(data) {
|
||||||
// console.log("我收到裁剪后的图片了,感谢老铁," + data)
|
// console.log("我收到裁剪后的图片了,感谢老铁," + data)
|
||||||
|
|||||||
@ -783,7 +783,7 @@
|
|||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/6155/ImgCrop",
|
url: "/pages/ImgCrop/ImgCrop",
|
||||||
events: {
|
events: {
|
||||||
ImgCutOver: function(data) {
|
ImgCutOver: function(data) {
|
||||||
//将8位的二进制数组转换成16进制数据
|
//将8位的二进制数组转换成16进制数据
|
||||||
|
|||||||
100
pages/common/ImgCrop/ImgCrop.vue
Normal file
100
pages/common/ImgCrop/ImgCrop.vue
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<canvas id="splashCanvas" canvas-id="splashCanvas" :style="{'width':width+'px','height':height+'px'}" style=" z-index: 9999;position: fixed; visibility: hidden;"></canvas>
|
||||||
|
|
||||||
|
|
||||||
|
<qf-image-cropper :src="src" :showAngle="false" :width="cropWidth" :height="cropHeight" fileType="jpg"
|
||||||
|
@crop="handleCrop" :areaScale="0.1" :minScale="0.1" :gpu="true">
|
||||||
|
</qf-image-cropper>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import QfImageCropper from '@/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
QfImageCropper
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
src: "",
|
||||||
|
Statu: false,
|
||||||
|
width:160,
|
||||||
|
height:80,
|
||||||
|
times:10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
cropWidth(){
|
||||||
|
return this.width*this.times;
|
||||||
|
}
|
||||||
|
,
|
||||||
|
cropHeight(){
|
||||||
|
return this.height*this.times;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad: function(option) {
|
||||||
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
|
var these = this;
|
||||||
|
eventChannel.on('checkImg', (rec)=> {
|
||||||
|
console.log("我收到你的消息了,消息内容是:" + JSON.stringify(rec));
|
||||||
|
this.src = rec.data;
|
||||||
|
this.width=rec.width?rec.width:160;
|
||||||
|
this.height=rec.height?rec.height:80;
|
||||||
|
this.times=rec.times?rec.times:10;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleCrop(e) {
|
||||||
|
|
||||||
|
var these = this;
|
||||||
|
const eventChannel = these.getOpenerEventChannel();
|
||||||
|
this.Statu = true;
|
||||||
|
console.log("裁剪完成");
|
||||||
|
console.log(e.tempFilePath);
|
||||||
|
eventChannel.emit('ImgCutOver_Path',e.tempFilePath);
|
||||||
|
const ctx = uni.createCanvasContext('splashCanvas', this);
|
||||||
|
ctx.drawImage(
|
||||||
|
e.tempFilePath,
|
||||||
|
0,0,these.width,these.height
|
||||||
|
);
|
||||||
|
setTimeout(() => {
|
||||||
|
ctx.draw(false, ()=>{
|
||||||
|
console.log("abcdefg")
|
||||||
|
uni.canvasGetImageData({
|
||||||
|
canvasId: 'splashCanvas',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: these.width,
|
||||||
|
height: these.height,
|
||||||
|
success: (res) => {
|
||||||
|
// 处理像素数据并发送
|
||||||
|
|
||||||
|
console.log("res.data.length="+res.data.length);
|
||||||
|
eventChannel.emit('ImgCutOverPath', {
|
||||||
|
picPath: e.tempFilePath
|
||||||
|
});
|
||||||
|
|
||||||
|
eventChannel.emit('ImgCutOver',{piexls:res.data,picPath:e.tempFilePath});
|
||||||
|
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
reject(`获取canvas数据失败: ${err.errMsg}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.canvas {
|
||||||
|
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -2,11 +2,12 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- 设备列表 -->
|
<!-- 设备列表 -->
|
||||||
<view class="allSelect" @click="selectAll"> 全选</view>
|
<view class="allSelect" @click="selectAll"> 全选</view>
|
||||||
<scroll-view class="device-list" scroll-y>
|
<mescroll-uni class="device-list" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption"
|
||||||
<view class="device-card" v-for="(item, index) in deviceList" :key="index"
|
:down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }">
|
||||||
@click="item.onlineStatus === 1 ? toggleSelect(index) : null">
|
|
||||||
|
<view class="device-card" v-for="(item, index) in deviceList" :key="index" @click="toggleSelect(index)">
|
||||||
<!-- 复选框 -->
|
<!-- 复选框 -->
|
||||||
<view class="checkbox" :class="{ checked: item.checked, disabled: item.onlineStatus !== 1 }">
|
<view class="checkbox" :class="{ checked: item.checked }">
|
||||||
<uni-icons v-if="item.checked" type="checkmarkempty" size="18" color="rgb(0, 0, 0)"></uni-icons>
|
<uni-icons v-if="item.checked" type="checkmarkempty" size="18" color="rgb(0, 0, 0)"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<!-- 设备信息 -->
|
<!-- 设备信息 -->
|
||||||
@ -28,11 +29,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="editInfmation">
|
</mescroll-uni>
|
||||||
<button class="login-btn qz" @click="forceAlarm">强制报警</button>
|
<view class="editInfmation">
|
||||||
<button class="login-btn jc" @click="cancelAlarm">解除报警</button>
|
<button class="login-btn qz" @click="forceAlarm">强制报警</button>
|
||||||
</view>
|
<button class="login-btn jc" @click="cancelAlarm">解除报警</button>
|
||||||
</scroll-view>
|
</view>
|
||||||
|
|
||||||
<!-- 强制报警提示弹框 -->
|
<!-- 强制报警提示弹框 -->
|
||||||
<CustomPopup v-if="popupType === 'force'" :show="showPopupFlag" popupBorder="1rpx solid rgba(224, 52, 52, 0.3)"
|
<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"
|
:message="popupMessage" icon="/static/images/6170/bj.png" :confirm-text="popupConfirmText"
|
||||||
@ -68,9 +70,14 @@
|
|||||||
deviceRealTimeStatus //设备状态
|
deviceRealTimeStatus //设备状态
|
||||||
} from '@/api/6170/deviceControl.js'
|
} from '@/api/6170/deviceControl.js'
|
||||||
|
|
||||||
|
import MescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue';
|
||||||
|
|
||||||
|
var timeout = null;
|
||||||
|
var these = null;
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
CustomPopup
|
CustomPopup,
|
||||||
|
MescrollUni
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -83,18 +90,38 @@
|
|||||||
pendingAlarmAction: '',
|
pendingAlarmAction: '',
|
||||||
sendInfo: '',
|
sendInfo: '',
|
||||||
// 2. 核心:typeName 与接口的映射表
|
// 2. 核心:typeName 与接口的映射表
|
||||||
alarmApiMapping: {
|
dic: {
|
||||||
'HBY100-J': { //100J类型
|
alarmApiMapping: [{
|
||||||
sendApi: deviceForceAlarmActivation,
|
type: ['HBY100-J'],
|
||||||
statusTypeName: 'FunctionAccessBatchStatusRule_BJQ100J'
|
sendApi: deviceForceAlarmActivation,
|
||||||
},
|
statusTypeName: 'FunctionAccessBatchStatusRule_BJQ100J'
|
||||||
'BJQ6170': { //6170类型
|
},
|
||||||
sendApi: deviceSendAlarmMessage,
|
{
|
||||||
statusTypeName: 'FunctionAccessBatchStatusRule_BJQ200J'
|
type: ['BJQ6170'],
|
||||||
}
|
sendApi: deviceSendAlarmMessage,
|
||||||
|
statusTypeName: 'FunctionAccessBatchStatusRule_BJQ200J'
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
total: 0
|
total: 0,
|
||||||
|
mescroll: null,
|
||||||
|
downOption: {
|
||||||
|
auto: true,
|
||||||
|
autoShowLoading: false,
|
||||||
|
},
|
||||||
|
upOption: {
|
||||||
|
auto: false,
|
||||||
|
noMoreSize: 0,
|
||||||
|
offset: 50,
|
||||||
|
isLock: false,
|
||||||
|
empty: {
|
||||||
|
tip: '暂无数据',
|
||||||
|
hideScroll: false
|
||||||
|
},
|
||||||
|
textNoMore: '没有更多数据了'
|
||||||
|
},
|
||||||
|
mescrollHeight: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -105,13 +132,52 @@
|
|||||||
currentApiConfig() {
|
currentApiConfig() {
|
||||||
const currentTypeName = this.sendInfo.typeName || '';
|
const currentTypeName = this.sendInfo.typeName || '';
|
||||||
// 匹配到则用对应配置,匹配不到用默认配置
|
// 匹配到则用对应配置,匹配不到用默认配置
|
||||||
return this.alarmApiMapping[currentTypeName] || {
|
let f= this.dic.alarmApiMapping.find(v=>{
|
||||||
sendApi: deviceDefaultAlarm,
|
return v.type.indexOf(currentTypeName)>-1;
|
||||||
statusTypeName: 'FunctionAccessBatchStatusRule_Default'
|
});
|
||||||
};
|
if(f){
|
||||||
|
return f;
|
||||||
|
}else{
|
||||||
|
return {
|
||||||
|
sendApi: deviceDefaultAlarm,
|
||||||
|
statusTypeName: 'FunctionAccessBatchStatusRule_Default'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getSystemInfoSyncH() {
|
||||||
|
|
||||||
|
let sysInfo = uni.getSystemInfoSync();
|
||||||
|
|
||||||
|
// 底部 footer 高度约 220rpx + 120rpx = 340rpx,转换为 px(1rpx = sysInfo.pixelRatio / 750 * 屏幕宽度?不,直接用 rpx 转 px 公式)
|
||||||
|
let footerHeight = 340 * (sysInfo.screenWidth / 750); // rpx 转 px
|
||||||
|
|
||||||
|
// console.log("footerHeight=", footerHeight);
|
||||||
|
this.mescrollHeight = sysInfo.screenHeight - footerHeight;
|
||||||
|
// console.log("mescrollHeight=", this.mescrollHeight);
|
||||||
|
},
|
||||||
|
mescrollInit(mescroll) {
|
||||||
|
this.mescroll = mescroll;
|
||||||
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
downCallback() {
|
||||||
|
|
||||||
|
|
||||||
|
if (this.mescroll) {
|
||||||
|
this.mescroll.resetUpScroll(false);
|
||||||
|
this.mescroll.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
this.getData(this.sendInfo.id);
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
// 上拉加载
|
||||||
|
upCallback() {
|
||||||
|
this.getData(this.sendInfo.id);
|
||||||
|
},
|
||||||
onclosePopup() {
|
onclosePopup() {
|
||||||
this.showPopupFlag = false
|
this.showPopupFlag = false
|
||||||
},
|
},
|
||||||
@ -123,37 +189,56 @@
|
|||||||
selectAll() {
|
selectAll() {
|
||||||
console.log('123');
|
console.log('123');
|
||||||
// 仅对在线设备进行全选/取消
|
// 仅对在线设备进行全选/取消
|
||||||
const allSelected = this.deviceList.every(item => item.onlineStatus === 1 && item.checked);
|
const allSelected = this.deviceList.every(item => item.checked);
|
||||||
this.deviceList.forEach(item => {
|
this.deviceList.forEach(item => {
|
||||||
// 离线设备不修改checked状态
|
// 离线设备不修改checked状态
|
||||||
if (item.onlineStatus === 1) {
|
|
||||||
item.checked = !allSelected;
|
item.checked = !allSelected;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
// 获取设备列表
|
// 获取设备列表
|
||||||
getData(deviceType) {
|
getData(deviceType) {
|
||||||
console.log(deviceType, 'deviceTypedeviceType');
|
clearTimeout(timeout);
|
||||||
this.loading = true;
|
timeout = setTimeout(() => {
|
||||||
let data = {
|
console.log(deviceType, 'deviceTypedeviceType');
|
||||||
pageNum: 1,
|
this.loading = true;
|
||||||
pageSize: 50,
|
let data = {
|
||||||
deviceType: deviceType
|
pageNum: 1,
|
||||||
}
|
pageSize: 50,
|
||||||
deviceInfo(data).then((res) => {
|
deviceType: deviceType
|
||||||
if (res.code == 200) {
|
|
||||||
const newDevices = res.rows.map(device => ({
|
|
||||||
...device,
|
|
||||||
showConfirm: false,
|
|
||||||
checked: false
|
|
||||||
}));
|
|
||||||
this.total = res.total;
|
|
||||||
this.deviceList = newDevices
|
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
deviceInfo(data).then((res) => {
|
||||||
this.loading = false;
|
if (res.code == 200) {
|
||||||
});
|
const newDevices = res.rows.map(device => ({
|
||||||
|
...device,
|
||||||
|
showConfirm: false,
|
||||||
|
checked: false
|
||||||
|
}));
|
||||||
|
this.total = res.total;
|
||||||
|
this.deviceList = newDevices;
|
||||||
|
|
||||||
|
let hasNext = true;
|
||||||
|
if (res.rows.length < this.size || this.deviceList.length >= this
|
||||||
|
.total) {
|
||||||
|
hasNext = false;
|
||||||
|
} else {
|
||||||
|
hasNext = true;
|
||||||
|
}
|
||||||
|
this.mescroll.endSuccess(res.rows.length, hasNext);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.mescroll.endSuccess(0, false);
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(ex => {
|
||||||
|
this.mescroll.endSuccess(0, false);
|
||||||
|
});
|
||||||
|
|
||||||
|
}, 200);
|
||||||
|
|
||||||
},
|
},
|
||||||
// 强制报警
|
// 强制报警
|
||||||
forceAlarm() {
|
forceAlarm() {
|
||||||
@ -252,13 +337,15 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
these = this;
|
||||||
const eventChannel = this.getOpenerEventChannel();
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
// 监听 'deviceSend' 事件,获取传过来的数据
|
// 监听 'deviceSend' 事件,获取传过来的数据
|
||||||
eventChannel.on('devicePolice', (data) => {
|
eventChannel.on('devicePolice', (data) => {
|
||||||
this.getData(data.data.id)
|
this.getData(data.data.id)
|
||||||
this.sendInfo = data.data
|
this.sendInfo = data.data
|
||||||
});
|
});
|
||||||
eventChannel.emit('ack', {})
|
eventChannel.emit('ack', {});
|
||||||
|
this.getSystemInfoSyncH();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -18,13 +18,16 @@
|
|||||||
<image src="/static/images/common/more.png" mode="aspectFit" class="more"></image>
|
<image src="/static/images/common/more.png" mode="aspectFit" class="more"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="sendFlex" v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0 || activeTabInfo.communicationMode==2">
|
<view class="sendFlex"
|
||||||
<view class="callpolice" @click="callpolice">报警</view>
|
v-show="showSendFlex"
|
||||||
<view class="Sendmessage" @click="location">位置</view>
|
>
|
||||||
<view class="Sendmessage" @click="handleSend" v-if="activeTabInfo.typeName!=='HBY100-J'">发送信息</view>
|
<view class="callpolice" @click="callpolice" v-show="showWarn">报警</view>
|
||||||
</view> -->
|
<view class="Sendmessage" @click="location" v-show="showMap">位置</view>
|
||||||
<!-- <scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100" style="height:80vh;"> -->
|
<view class="Sendmessage" @click="handleSend"
|
||||||
<mescroll-uni class="device-list" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption"
|
v-show="ShowSendmessage">发送信息</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<mescroll-uni class="device-list" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption"
|
||||||
:down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }">
|
:down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }">
|
||||||
<view v-if="deviceList.length>0">
|
<view v-if="deviceList.length>0">
|
||||||
<uni-swipe-action ref="swipeAction">
|
<uni-swipe-action ref="swipeAction">
|
||||||
@ -40,15 +43,15 @@
|
|||||||
<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 || item.communicationMode==2">ID:{{item.deviceImei}}
|
<view class="ID"
|
||||||
|
v-if="item.communicationMode==0 || item.communicationMode==2">
|
||||||
|
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"
|
<view class="onlines" v-if="item.onlineStatus==1">在线</view>
|
||||||
v-if="item.onlineStatus==1">在线</view>
|
|
||||||
<!-- 离线状态 -->
|
<!-- 离线状态 -->
|
||||||
<view class="offlines"
|
<view class="offlines" v-if="item.onlineStatus==0">离线</view>
|
||||||
v-if="item.onlineStatus==0">离线</view>
|
|
||||||
<view>电量:{{item.battery || '0'}}%</view>
|
<view>电量:{{item.battery || '0'}}%</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -74,7 +77,7 @@
|
|||||||
暂无数据
|
暂无数据
|
||||||
</view> -->
|
</view> -->
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
<!-- </scroll-view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 删除弹框 -->
|
<!-- 删除弹框 -->
|
||||||
<view class="agreement-mask" v-if="deleteShow" @click.stop="closePopup('delete')" catchtouchmove="true">
|
<view class="agreement-mask" v-if="deleteShow" @click.stop="closePopup('delete')" catchtouchmove="true">
|
||||||
@ -116,7 +119,7 @@
|
|||||||
<view class="tooltip-content" @click.stop>
|
<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" mode="aspectFit"/>
|
<image :src="item.icon" class="item-icon" mode="aspectFit" />
|
||||||
<text>{{ item.text }}</text>
|
<text>{{ item.text }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -146,17 +149,34 @@
|
|||||||
} from '@/api/common/index.js'
|
} from '@/api/common/index.js'
|
||||||
import bleTool from '@/utils/BleHelper.js';
|
import bleTool from '@/utils/BleHelper.js';
|
||||||
import MescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue'
|
import MescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue'
|
||||||
import BleReceive from '@/utils/BleReceive';
|
import BleReceive from '@/utils/BleReceive';
|
||||||
|
|
||||||
var pagePath = 'pages/common/index';
|
var pagePath = 'pages/common/index';
|
||||||
var ble = null;
|
var ble = null;
|
||||||
var timeout = null;
|
var timeout = null;
|
||||||
var recei=null;
|
var recei = null;
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
MescrollUni
|
MescrollUni
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
showSendFlex(){
|
||||||
|
// return this.activeTab && this.activeTab.id !== ''&& (this.activeTabInfo.communicationMode==0 || this.activeTabInfo.communicationMode==2);
|
||||||
|
if(this.showMap || this.ShowSendmessage || this.showWarn){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
ShowSendmessage(){
|
||||||
|
return this.dic.showMsgTypes.indexOf(this.activeTabInfo.typeName)>-1
|
||||||
|
},
|
||||||
|
showMap(){
|
||||||
|
return this.dic.showMapTypes.indexOf(this.activeTabInfo.typeName)>-1
|
||||||
|
},
|
||||||
|
showWarn(){
|
||||||
|
return this.dic.showCallPolice.indexOf(this.activeTabInfo.typeName)>-1
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mescroll: null,
|
mescroll: null,
|
||||||
@ -187,8 +207,7 @@ import BleReceive from '@/utils/BleReceive';
|
|||||||
navTitle: "我的设备",
|
navTitle: "我的设备",
|
||||||
deleteShow: false,
|
deleteShow: false,
|
||||||
RenameModel: false,
|
RenameModel: false,
|
||||||
menuItems: [
|
menuItems: [{
|
||||||
{
|
|
||||||
text: '扫一扫添加',
|
text: '扫一扫添加',
|
||||||
icon: '/static/images/common/scane.png',
|
icon: '/static/images/common/scane.png',
|
||||||
action: 'scan'
|
action: 'scan'
|
||||||
@ -233,7 +252,12 @@ import BleReceive from '@/utils/BleReceive';
|
|||||||
|
|
||||||
deviceId: '',
|
deviceId: '',
|
||||||
deviceName: "", //重命名
|
deviceName: "", //重命名
|
||||||
activeTabInfo: ''
|
activeTabInfo: '',
|
||||||
|
dic: {
|
||||||
|
showMsgTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'BJQ6075J'],//需要发送消息的类型
|
||||||
|
showMapTypes:['BJQ6170','HBY210','HBY670','BJQ6075','HBY018A','HBY100-J','BJQ6075J','HBY008A','HBY100-Y'],//需要显示地图的类型
|
||||||
|
showCallPolice:['BJQ6170','HBY210','HBY670','BJQ6075','HBY018A','HBY100-J','BJQ6075J','HBY008A','HBY100-Y']//需要发送报警的类型
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -496,7 +520,7 @@ import BleReceive from '@/utils/BleReceive';
|
|||||||
case 'scan':
|
case 'scan':
|
||||||
// 扫一扫
|
// 扫一扫
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/common/addScan/ScanEquip'
|
url: '/pages/common/addScan/ScanEquip'
|
||||||
});
|
});
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -619,7 +643,7 @@ import BleReceive from '@/utils/BleReceive';
|
|||||||
const deviceType = currentTab.id || '';
|
const deviceType = currentTab.id || '';
|
||||||
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
|
console.log(`跳转到发送信息页面\n当前设备类型: ${deviceType}\n设备类型名称: ${currentTab.typeName}`);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/6170/callPolice/index',
|
url: '/pages/common/callPolice/index',
|
||||||
events: {
|
events: {
|
||||||
ack: function(data) {}
|
ack: function(data) {}
|
||||||
},
|
},
|
||||||
@ -666,7 +690,7 @@ import BleReceive from '@/utils/BleReceive';
|
|||||||
// 列表跳转
|
// 列表跳转
|
||||||
handleFile(item) {
|
handleFile(item) {
|
||||||
let url = item.detailPageUrl;
|
let url = item.detailPageUrl;
|
||||||
// url="/pages/6075/BJQ6075L";
|
// url="/pages/6075/BJQ6075L";
|
||||||
// if(!url){
|
// if(!url){
|
||||||
// url="/pages/6075/BJQ6075"
|
// url="/pages/6075/BJQ6075"
|
||||||
// }
|
// }
|
||||||
@ -772,8 +796,8 @@ import BleReceive from '@/utils/BleReceive';
|
|||||||
this.updateBleStatu();
|
this.updateBleStatu();
|
||||||
}, pagePath);
|
}, pagePath);
|
||||||
|
|
||||||
let phone=uni.getStorageSync("phone");
|
let phone = uni.getStorageSync("phone");
|
||||||
if(phone==='17671332251'){//先写死方便自己使用,后面按人员权限区分
|
if (phone === '17671332251') { //先写死方便自己使用,后面按人员权限区分
|
||||||
this.menuItems.push({
|
this.menuItems.push({
|
||||||
text: '上报设备',
|
text: '上报设备',
|
||||||
icon: '/static/images/common/add.png',
|
icon: '/static/images/common/add.png',
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- 设备列表 -->
|
<!-- 设备列表 -->
|
||||||
<scroll-view class="device-list" scroll-y>
|
<!-- <scroll-view class="device-list" scroll-y> -->
|
||||||
<view class="device-card" v-for="(item, index) in deviceList" :key="index"
|
<mescroll-uni class="device-list" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption"
|
||||||
@click="item.onlineStatus === 1 ? toggleSelect(index) : null">
|
:down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }">
|
||||||
|
<view class="device-card" v-for="(item, index) in deviceList" :key="index" @click="toggleSelect(index)">
|
||||||
<!-- 复选框 -->
|
<!-- 复选框 -->
|
||||||
<view class="checkbox" :class="{ checked: item.checked, disabled: item.onlineStatus !== 1 }">
|
<view class="checkbox" :class="{ checked: item.checked }">
|
||||||
<uni-icons v-if="item.checked" type="checkmarkempty" size="18" color="rgb(0, 0, 0)"></uni-icons>
|
<uni-icons v-if="item.checked" type="checkmarkempty" size="18" color="rgb(0, 0, 0)"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<!-- 设备信息 -->
|
<!-- 设备信息 -->
|
||||||
@ -27,7 +28,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="editInfmation">
|
</mescroll-uni>
|
||||||
|
<!-- </scroll-view> -->
|
||||||
|
|
||||||
|
<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"
|
||||||
@ -35,7 +39,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<button class="login-btn" @click.stop="sendTextMessage">发送</button>
|
<button class="login-btn" @click.stop="sendTextMessage">发送</button>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
|
||||||
<!-- 成功提示弹框 -->
|
<!-- 成功提示弹框 -->
|
||||||
<CustomPopup :show="showPopupFlag" :title="popupTitle" :message="popupMessage"
|
<CustomPopup :show="showPopupFlag" :title="popupTitle" :message="popupMessage"
|
||||||
icon="/static/images/common/sendSucc.png" :confirm-text="popupConfirmText" :show-cancel="false"
|
icon="/static/images/common/sendSucc.png" :confirm-text="popupConfirmText" :show-cancel="false"
|
||||||
@ -44,138 +47,284 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CustomPopup from '@/components/CustomPopup/CustomPopup.vue'
|
import CustomPopup from '@/components/CustomPopup/CustomPopup.vue'
|
||||||
import {
|
import {
|
||||||
deviceInfo,
|
deviceInfo,
|
||||||
} from '@/api/common/index.js'
|
} from '@/api/common/index.js'
|
||||||
import {
|
import {
|
||||||
deviceSendMessage,
|
deviceSendMessage,
|
||||||
deviceRealTimeStatus //设备状态
|
deviceRealTimeStatus //设备状态
|
||||||
} from '@/api/6170/deviceControl.js'
|
} from '@/api/6170/deviceControl.js'
|
||||||
import {
|
import {
|
||||||
generateShortId,
|
generateShortId,
|
||||||
getdeviceSTatus
|
getdeviceSTatus
|
||||||
} from '@/utils/function.js';
|
} from '@/utils/function.js';
|
||||||
export default {
|
import MescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue';
|
||||||
components: {
|
|
||||||
CustomPopup
|
var timer=null;
|
||||||
},
|
var these=null;
|
||||||
data() {
|
export default {
|
||||||
return {
|
components: {
|
||||||
deviceList: [],
|
CustomPopup,
|
||||||
messageToSend: '', //发送信息
|
MescrollUni
|
||||||
showPopupFlag: false,
|
|
||||||
popupTitle: '',
|
|
||||||
popupMessage: '信息发送成功!',
|
|
||||||
popupConfirmText: '确认',
|
|
||||||
isSending: false,
|
|
||||||
sendInfo: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onPullDownRefresh() {
|
|
||||||
// 执行下拉刷新时的操作,比如重新获取数据
|
|
||||||
this.getData();
|
|
||||||
},
|
},
|
||||||
toggleSelect(index) {
|
data() {
|
||||||
this.deviceList[index].checked = !this.deviceList[index].checked
|
return {
|
||||||
this.$forceUpdate()
|
deviceList: [],
|
||||||
},
|
messageToSend: '', //发送信息
|
||||||
// 获取设备列表
|
showPopupFlag: false,
|
||||||
getData(deviceType) {
|
popupTitle: '',
|
||||||
this.loading = true;
|
popupMessage: '信息发送成功!',
|
||||||
let data = {
|
popupConfirmText: '确认',
|
||||||
pageNum: 1,
|
isSending: false,
|
||||||
pageSize: 50,
|
sendInfo: {},
|
||||||
deviceType: deviceType
|
mescroll: null,
|
||||||
|
downOption: {
|
||||||
|
auto: true,
|
||||||
|
autoShowLoading: false,
|
||||||
|
},
|
||||||
|
upOption: {
|
||||||
|
auto: false,
|
||||||
|
noMoreSize: 0,
|
||||||
|
offset: 50,
|
||||||
|
isLock: false,
|
||||||
|
empty: {
|
||||||
|
tip: '暂无数据',
|
||||||
|
hideScroll: false
|
||||||
|
},
|
||||||
|
textNoMore: '没有更多数据了'
|
||||||
|
},
|
||||||
|
mescrollHeight: 0,
|
||||||
}
|
}
|
||||||
deviceInfo(data).then((res) => {
|
},
|
||||||
if (res.code == 200) {
|
methods: {
|
||||||
const newDevices = res.rows.map(device => ({
|
getSystemInfoSyncH() {
|
||||||
...device,
|
|
||||||
showConfirm: false,
|
let sysInfo = uni.getSystemInfoSync();
|
||||||
checked: false
|
|
||||||
}));
|
// 底部 footer 高度约 220rpx + 120rpx = 340rpx,转换为 px(1rpx = sysInfo.pixelRatio / 750 * 屏幕宽度?不,直接用 rpx 转 px 公式)
|
||||||
this.total = res.total;
|
let footerHeight = 500 * (sysInfo.screenWidth / 750); // rpx 转 px
|
||||||
this.deviceList = newDevices
|
|
||||||
|
// console.log("footerHeight=", footerHeight);
|
||||||
|
this.mescrollHeight = sysInfo.screenHeight - footerHeight;
|
||||||
|
// console.log("mescrollHeight=", this.mescrollHeight);
|
||||||
|
},
|
||||||
|
mescrollInit(mescroll) {
|
||||||
|
this.mescroll = mescroll;
|
||||||
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
downCallback() {
|
||||||
|
|
||||||
|
console.log("触发下拉刷新");
|
||||||
|
if (this.mescroll) {
|
||||||
|
this.mescroll.resetUpScroll(false);
|
||||||
|
this.mescroll.scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
this.getData(this.sendInfo.id);
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 发送文本消息
|
// 上拉加载
|
||||||
async sendTextMessage() {
|
upCallback() {
|
||||||
// 防重复提交
|
console.log("触发上拉加载");
|
||||||
if (this.isSending) return;
|
|
||||||
const selectedDevices = this.deviceList.filter(item => item.checked)
|
|
||||||
const deviceIds = selectedDevices.map(item => item.id);
|
this.getData(this.sendInfo.id);
|
||||||
const deviceImeiList = selectedDevices.map(item => item.deviceImei);
|
},
|
||||||
if (selectedDevices.length === 0) {
|
// onPullDownRefresh() {
|
||||||
uni.showToast({
|
// // 执行下拉刷新时的操作,比如重新获取数据
|
||||||
title: '请选择一个设备',
|
// this.getData();
|
||||||
icon: 'none'
|
// },
|
||||||
});
|
toggleSelect(index) {
|
||||||
return;
|
this.deviceList[index].checked = !this.deviceList[index].checked
|
||||||
}
|
this.$forceUpdate()
|
||||||
if (!this.messageToSend) {
|
},
|
||||||
uni.showToast({
|
// 获取设备列表
|
||||||
title: '请输入要发送的文字',
|
getData(deviceType) {
|
||||||
icon: 'none'
|
clearTimeout(timer);
|
||||||
});
|
timer=setTimeout(()=>{
|
||||||
return;
|
console.log("开始加载第"+(this.mescroll? this.mescroll.num:1)+'页数据')
|
||||||
}
|
this.loading = true;
|
||||||
this.isSending = true;
|
let data = {
|
||||||
let loadingShown = false;
|
pageNum:this.mescroll? this.mescroll.num:1,
|
||||||
try {
|
pageSize: 50,
|
||||||
uni.showLoading({
|
deviceType: deviceType
|
||||||
title: '发送中...',
|
}
|
||||||
mask: true
|
deviceInfo(data).then((res) => {
|
||||||
});
|
if (res.code == 200) {
|
||||||
loadingShown = true;
|
const newDevices = res.rows.map(device => ({
|
||||||
// 2. 准备请求数据
|
...device,
|
||||||
const batchId = generateShortId();
|
showConfirm: false,
|
||||||
const data = {
|
checked: false
|
||||||
sendMsg: this.messageToSend,
|
}));
|
||||||
deviceIds: deviceIds,
|
this.total = res.total;
|
||||||
batchId: batchId,
|
this.deviceList = newDevices
|
||||||
typeName: this.sendInfo.typeName,
|
|
||||||
batchId: batchId,
|
this.total = res.total;
|
||||||
deviceImeiList: deviceImeiList
|
// 判断是否加载完成
|
||||||
};
|
let hasNext = true;
|
||||||
// 3.人员信息
|
if (res.rows.length < this.size || this.deviceList.length >= this
|
||||||
const registerRes = await deviceSendMessage(data);
|
.total) {
|
||||||
if (registerRes.code !== 200) {
|
hasNext = false;
|
||||||
|
} else {
|
||||||
|
hasNext = true;
|
||||||
|
}
|
||||||
|
this.mescroll.endSuccess(res.rows.length, hasNext);
|
||||||
|
}else {
|
||||||
|
this.mescroll.endSuccess(0, false);
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(ex=>{
|
||||||
|
|
||||||
|
this.mescroll.endSuccess(0, false);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
},200);
|
||||||
|
|
||||||
|
},
|
||||||
|
// 发送文本消息
|
||||||
|
sendTextMessage() {
|
||||||
|
// 防重复提交
|
||||||
|
if (this.isSending) return;
|
||||||
|
const selectedDevices = this.deviceList.filter(item => item.checked)
|
||||||
|
const deviceIds = selectedDevices.map(item => item.id);
|
||||||
|
const deviceImeiList = selectedDevices.map(item => item.deviceImei);
|
||||||
|
if (selectedDevices.length === 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: registerRes.msg,
|
title: '请选择一个设备',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
// 4. 获取设备状态
|
if (!this.messageToSend) {
|
||||||
let deviceImei = this.sendInfo.deviceImei
|
uni.showToast({
|
||||||
let typeName = this.sendInfo.typeName
|
title: '请输入要发送的文字',
|
||||||
const statusRes = await getdeviceSTatus({
|
icon: 'none'
|
||||||
functionMode: 2,
|
});
|
||||||
batchId,
|
return;
|
||||||
typeName:'FunctionAccessBatchStatusRule',
|
|
||||||
deviceImei,
|
|
||||||
interval: 500
|
|
||||||
},
|
|
||||||
deviceRealTimeStatus
|
|
||||||
);
|
|
||||||
if (statusRes.data.functionAccess === 'OK') {
|
|
||||||
// 5. 显示成功弹窗
|
|
||||||
this.showPopupFlag = true
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
this.isSending = true;
|
||||||
uni.showToast({
|
//FYS的方法
|
||||||
title: error.message,
|
let FYSSend =async () => {
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
} finally {
|
try {
|
||||||
uni.hideLoading();
|
uni.showLoading({
|
||||||
this.isSending = false;
|
title: '发送中...',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. 准备请求数据
|
||||||
|
const batchId = generateShortId();
|
||||||
|
const data = {
|
||||||
|
sendMsg: this.messageToSend,
|
||||||
|
deviceIds: deviceIds,
|
||||||
|
batchId: batchId,
|
||||||
|
typeName: this.sendInfo.typeName,
|
||||||
|
batchId: batchId,
|
||||||
|
deviceImeiList: deviceImeiList
|
||||||
|
};
|
||||||
|
// 3.人员信息
|
||||||
|
const registerRes = await deviceSendMessage(data);
|
||||||
|
if (registerRes.code !== 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: registerRes.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 4. 获取设备状态
|
||||||
|
let deviceImei = this.sendInfo.deviceImei
|
||||||
|
let typeName = this.sendInfo.typeName
|
||||||
|
const statusRes = await getdeviceSTatus({
|
||||||
|
functionMode: 2,
|
||||||
|
batchId,
|
||||||
|
typeName: 'FunctionAccessBatchStatusRule',
|
||||||
|
deviceImei,
|
||||||
|
interval: 500
|
||||||
|
},
|
||||||
|
deviceRealTimeStatus
|
||||||
|
);
|
||||||
|
if (statusRes.data.functionAccess === 'OK') {
|
||||||
|
// 5. 显示成功弹窗
|
||||||
|
this.showPopupFlag = true
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
uni.showToast({
|
||||||
|
title: error.message,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading();
|
||||||
|
this.isSending = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//XS的方法
|
||||||
|
let XSSend=() => {
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.showPopupFlag=true;
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
|
||||||
|
this.isSending = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//FS的方法
|
||||||
|
let FSSend = () => {
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.showPopupFlag = true
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
|
||||||
|
this.isSending = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let device = selectedDevices[0];
|
||||||
|
let sendDic = [{
|
||||||
|
urls: ['/pages/6170/deviceControl/index', '/pages/210/HBY210', '/pages/6075/BJQ6075',
|
||||||
|
'/pages/100J/HBY100-J'
|
||||||
|
],
|
||||||
|
send: FYSSend,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
urls: ['/pages/670/HBY670'],
|
||||||
|
send: XSSend
|
||||||
|
},
|
||||||
|
{
|
||||||
|
urls: ['/pages/6075J/BJQ6075J'],
|
||||||
|
send: FSSend
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
let f = sendDic.find(v => {
|
||||||
|
return v.urls.indexOf(device.detailPageUrl)>-1;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (f) {
|
||||||
|
f.send();
|
||||||
|
} else {
|
||||||
|
FYSSend();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onPopupConfirm() {
|
onPopupConfirm() {
|
||||||
this.showPopupFlag = false
|
this.showPopupFlag = false
|
||||||
@ -185,227 +334,236 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
these=this;
|
||||||
const eventChannel = this.getOpenerEventChannel();
|
const eventChannel = this.getOpenerEventChannel();
|
||||||
// 监听 'deviceSend' 事件,获取传过来的数据
|
// 监听 'deviceSend' 事件,获取传过来的数据
|
||||||
eventChannel.on('deviceSend', (data) => {
|
eventChannel.on('deviceSend', (data) => {
|
||||||
console.log('Received detail data:', data);
|
console.log('Received detail data:', data);
|
||||||
this.getData(data.data.id)
|
|
||||||
this.sendInfo = data.data
|
this.sendInfo = data.data
|
||||||
|
this.downCallback();
|
||||||
});
|
});
|
||||||
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
|
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
|
||||||
eventChannel.emit('ack', {})
|
eventChannel.emit('ack', {});
|
||||||
|
|
||||||
|
this.getSystemInfoSyncH();
|
||||||
},
|
},
|
||||||
}
|
onUnload() {
|
||||||
|
clearTimeout(timer);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.container {
|
.container {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background-color: rgb(18, 18, 18);
|
background-color: rgb(18, 18, 18);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-list {
|
.device-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-card {
|
.device-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox {
|
.checkbox {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
border: 2rpx solid rgba(255, 255, 255, 0.5);
|
border: 2rpx solid rgba(255, 255, 255, 0.5);
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox.checked {
|
.checkbox.checked {
|
||||||
background-color: rgb(187, 230, 0);
|
background-color: rgb(187, 230, 0);
|
||||||
border-color: rgb(187, 230, 0);
|
border-color: rgb(187, 230, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-content {
|
.device-content {
|
||||||
background-color: rgb(26, 26, 26);
|
background-color: rgb(26, 26, 26);
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
/* display: flex; */
|
/* display: flex; */
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-header {
|
.device-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-name {
|
.device-name {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
width: 83%;
|
width: 83%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ID {
|
.ID {
|
||||||
color: rgba(255, 255, 255, 0.6);
|
color: rgba(255, 255, 255, 0.6);
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-status {
|
.device-status {
|
||||||
width: 122rpx;
|
width: 122rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
border-radius: 0px 8px 0px 8px;
|
border-radius: 0px 8px 0px 8px;
|
||||||
background-color: rgb(42, 42, 42);
|
background-color: rgb(42, 42, 42);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0rpx;
|
top: 0rpx;
|
||||||
right: 0rpx;
|
right: 0rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 52rpx;
|
line-height: 52rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.online {
|
.online {
|
||||||
color: rgb(187, 230, 0);
|
color: rgb(187, 230, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.unline {
|
.unline {
|
||||||
color: rgba(255, 255, 255, 0.4);
|
color: rgba(255, 255, 255, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-info {
|
.device-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deviceIMG {
|
.deviceIMG {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: rgba(42, 42, 42, 0.6);
|
background-color: rgba(42, 42, 42, 0.6);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.IMG {
|
.IMG {
|
||||||
width: 68rpx;
|
width: 68rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
margin-left: 17%;
|
margin-left: 17%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.onlines {
|
.onlines {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.onlines::before {
|
.onlines::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 15rpx;
|
width: 15rpx;
|
||||||
height: 15rpx;
|
height: 15rpx;
|
||||||
background: rgb(0, 171, 103);
|
background: rgb(0, 171, 103);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
left: -20rpx
|
left: -20rpx
|
||||||
}
|
}
|
||||||
|
|
||||||
.unlines {
|
.unlines {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unlines::before {
|
.unlines::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 15rpx;
|
width: 15rpx;
|
||||||
height: 15rpx;
|
height: 15rpx;
|
||||||
background: rgba(255, 255, 255, 0.4);
|
background: rgba(255, 255, 255, 0.4);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
left: -20rpx
|
left: -20rpx
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
width: 2rpx;
|
width: 2rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
background: linear-gradient(90deg,
|
background: linear-gradient(90deg,
|
||||||
rgba(0, 0, 0, 0) 0%,
|
rgba(0, 0, 0, 0) 0%,
|
||||||
rgb(255, 255, 255) 50%,
|
rgb(255, 255, 255) 50%,
|
||||||
rgba(255, 255, 255, 0) 100%);
|
rgba(255, 255, 255, 0) 100%);
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-editor {
|
.ql-editor {
|
||||||
color: rgba(255, 255, 255, 0.6);
|
color: rgba(255, 255, 255, 0.6);
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ql-input {
|
.ql-input {
|
||||||
width: 95.9%;
|
width: 95.9%;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 30rpx;
|
padding: 20rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
background: rgb(26, 26, 26);
|
background: rgb(26, 26, 26);
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea {
|
.textarea {
|
||||||
color: rgba(255, 255, 255, 0.8);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
background: rgba(42, 42, 42, 1);
|
background: rgba(42, 42, 42, 1);
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 10rpx;
|
padding: 10rpx;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
}
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.editInfmation {
|
.editInfmation {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
border-radius: 40rpx 40rpx 0px 0px;
|
border-radius: 40rpx 40rpx 0px 0px;
|
||||||
background: rgba(28, 28, 28, 1);
|
background: rgba(28, 28, 28, 1);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 50rpx;
|
bottom: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.login-btn {
|
.login-btn {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
background-color: rgb(187, 230, 0);
|
background-color: rgb(187, 230, 0);
|
||||||
color: rgb(35, 35, 35);
|
color: rgb(35, 35, 35);
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox.disabled {
|
.checkbox.disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||||
border-color: rgba(255, 255, 255, 0.2) !important;
|
border-color: rgba(255, 255, 255, 0.2) !important;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
/* 阻止点击事件 */
|
/* 阻止点击事件 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 可选:离线设备的卡片整体置灰 */
|
/* 可选:离线设备的卡片整体置灰 */
|
||||||
.device-card[data-offline="true"] {
|
.device-card[data-offline="true"] {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user