完成6107静态页面
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
"name" : "星汉物联",
|
"name" : "星汉物联",
|
||||||
"appid" : "__UNI__A21EF43",
|
"appid" : "__UNI__A21EF43",
|
||||||
"description" : "设备管控",
|
"description" : "设备管控",
|
||||||
"versionName" : "1.0.10",
|
"versionName" : "1.0.11",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
|
|||||||
@ -369,6 +369,13 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText" : "BJQ6107"
|
"navigationBarTitleText" : "BJQ6107"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/6155/BJQ6155",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "BJQ6155"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -370,7 +370,7 @@ import request, { baseURL } from '@/utils/request.js';
|
|||||||
sta_GroupType: -1, //配组
|
sta_GroupType: -1, //配组
|
||||||
sta_ArrowType: '', //箭头方向
|
sta_ArrowType: '', //箭头方向
|
||||||
warnTime: 0,
|
warnTime: 0,
|
||||||
sta_Channel: 80,
|
sta_Channel: 31,
|
||||||
sta_ArrowMode:'',
|
sta_ArrowMode:'',
|
||||||
groups: [
|
groups: [
|
||||||
|
|
||||||
|
|||||||
@ -44,24 +44,8 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="warnnig">
|
|
||||||
<view>设备静止报警中!</view>
|
|
||||||
</view>
|
|
||||||
<view class="warnnig">
|
|
||||||
<view>设备声光报警中!</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="lampMode">
|
|
||||||
<view class="sosContent">
|
|
||||||
<view class="btnSos openSos center" :class="{active:formData.sta_LedType==='led_alarm'}"
|
|
||||||
@click="sosSetting(dic.sta_LightType[4],4)">
|
|
||||||
{{formData.sta_LedType==='led_alarm'?'报警中':'声光报警'}}
|
|
||||||
</view>
|
|
||||||
<view class="btnSos closeSos center" @click="sosSetting(dic.sta_LightType[3],3)">解除</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<view class="lamp">
|
<view class="lamp">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
@ -71,24 +55,53 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="lampMode">
|
<view class="lampMode">
|
||||||
<view class="mode fleft " v-for="item,index in dic.sta_LightType.filter(v=>{return v.group=='sta_LedType'})"
|
<view class="lightMode fleft " v-for="item,index in dic.sta_LightType" :class="{'active':formData.sta_LedType===item.key,
|
||||||
:class="{'active':formData[item.group]===item.key,
|
|
||||||
'marginLeft':index%2===1,
|
'marginLeft':index%2===1,
|
||||||
'displayNone':!item.show
|
'displayNone':!item.show
|
||||||
}" v-on:click.stop="LighSetting(item,index)">
|
}" v-on:click.stop="LighSetting(item,index)">
|
||||||
<view class="leftImg">
|
<view class="h50">
|
||||||
<image class="img" :src="formData[item.group]===item.key?item.activeImg:item.img" mode="aspectFit">
|
<view class="lightType ">
|
||||||
</image>
|
<view class="imgContent center">
|
||||||
|
<image class="img" :src="item.img" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<text>{{item.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="switch">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="h50">
|
||||||
|
<view class="workMode">
|
||||||
|
<view class="item" @click.stop="highSpeedSetting(item,index,true)"
|
||||||
|
:class="{'active':formData.sta_highSpeed && formData.sta_LedType===item.key}">
|
||||||
|
<view class="checkbox"></view>
|
||||||
|
<text>强光</text>
|
||||||
|
</view>
|
||||||
|
<view class="item " @click.stop="highSpeedSetting(item,index,false)"
|
||||||
|
:class="{'active':formData.sta_highSpeed===false && formData.sta_LedType===item.key}">
|
||||||
|
<view class="checkbox "></view>
|
||||||
|
<text>工作光</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mode fleft marginLeft" :class="{'rbActive':formData.SOS}" v-on:click.stop="sosSetting()">
|
||||||
|
<view class="leftImg">
|
||||||
|
<image class="img" :src="formData.SOS?'/static/images/670/sgActive.png':'/static/images/670/sg.png'"
|
||||||
|
mode="aspectFit">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
<view class="rightTxt">
|
<view class="rightTxt">
|
||||||
<text class="bigTxt">{{item.name}}</text>
|
<text class="bigTxt">红蓝警示</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="clear"></view>
|
<view class="clear"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lamp">
|
<view class="lamp">
|
||||||
@ -98,16 +111,15 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="lampMode">
|
<view class="lampMode">
|
||||||
<view class="mode fleft " v-on:click.stop="playVolume()"
|
<view class="mode fleft " @click.stop="playVolume()" :class="{'active':formData.isPlay}">
|
||||||
:class="{'active':formData.sta_VoiceType==='8'}">
|
|
||||||
<view class="leftImg">
|
<view class="leftImg">
|
||||||
<image class="img" :class="{'displayNone':formData.sta_VoiceType==='8'}"
|
<image class="img" :class="{'displayNone':formData.isPlay}" src="/static/images/common/play.png"
|
||||||
src="/static/images/common/play.png" mode="aspectFit"></image>
|
mode="aspectFit"></image>
|
||||||
<image class="img" :class="{'displayNone':formData.sta_VoiceType!=='8'}"
|
<image class="img" :class="{'displayNone':!formData.isPlay}"
|
||||||
src="/static/images/common/pauseActive.png" mode="aspectFit"></image>
|
src="/static/images/common/playingActive.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="rightTxt">
|
<view class="rightTxt">
|
||||||
<text class="bigTxt">播放语音</text>
|
<text class="bigTxt">{{formData.isPlay?'正在播放':'播放语音'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -122,7 +134,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mode fleft marginLeft" v-on:click.stop="volumechange()">
|
<view class="mode fleft " v-on:click.stop="showVolmePop()">
|
||||||
<view class="leftImg">
|
<view class="leftImg">
|
||||||
<image class="img" src="/static/images/common/uploadCloud.png" mode="aspectFit"></image>
|
<image class="img" src="/static/images/common/uploadCloud.png" mode="aspectFit"></image>
|
||||||
|
|
||||||
@ -195,19 +207,47 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 弹窗通知 -->
|
<!-- 弹窗通知 -->
|
||||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
<MessagePopup v-for="item,key in Msgboxs" :visible="item.showPop" :type="item.popType" :bgColor="item.bgColor"
|
||||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
:borderColor="item.borderColor" :textColor="item.textColor" :buttonBgColor="item.buttonBgColor"
|
||||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
:buttonTextColor="item.buttonTextColor" :iconUrl="item.iconUrl" :message="item.message"
|
||||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
:buttonText="item.buttonText" @buttonClick="item.okCallback(item)" :visiblePrompt="item.visiblePrompt"
|
||||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
:promptTitle="item.promptTitle" v-model="item.modelValue" @closePop="closePop(item)"
|
||||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
:buttonCancelText="item.buttonCancelText" :showCancel="item.showCancel" @cancelPop="closePop(item)" />
|
||||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" />
|
|
||||||
|
|
||||||
<!-- 下方菜单 -->
|
<!-- 下方菜单 -->
|
||||||
|
|
||||||
|
|
||||||
<global-loading ref="loading" />
|
<global-loading ref="loading" />
|
||||||
|
|
||||||
|
<view class="mask" v-show="Status.showVolumPop" @click.stop="Status.showVolumPop=false"></view>
|
||||||
|
<view class="volPop" v-show="Status.showVolumPop" @click.stop="Status.showVolumPop=false">
|
||||||
|
|
||||||
|
<view class="volContent" @click.stop="">
|
||||||
|
|
||||||
|
<view class="header">
|
||||||
|
<uni-icons @click.stop="Status.showVolumPop=false" type="closeempty" size="15"
|
||||||
|
color="#FFFFFFde"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="txtContent">
|
||||||
|
<view class="volTxt">
|
||||||
|
音量
|
||||||
|
</view>
|
||||||
|
<view class="volMath">
|
||||||
|
{{formData.volumn}}%
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="slider-container">
|
||||||
|
|
||||||
|
<slider min="0" max="100" step="1" :disabled="false" :value="formData.volumn" activeColor="#bbe600"
|
||||||
|
backgroundColor="#686767" block-size="20" block-color="#ffffffde" @change="volumechange"
|
||||||
|
@changing="volumechange" class="custom-slider" />
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -233,7 +273,7 @@
|
|||||||
var recei = null;
|
var recei = null;
|
||||||
|
|
||||||
var instrusionTime = null;
|
var instrusionTime = null;
|
||||||
|
var volumnTimer = null;
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -243,84 +283,54 @@
|
|||||||
curr: 0,
|
curr: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
pageHide: false,
|
pageHide: false,
|
||||||
Pop: {
|
|
||||||
showPop: false, //是否显示弹窗
|
|
||||||
popType: 'custom',
|
|
||||||
bgColor: '#383934bd',
|
|
||||||
borderColor: '#BBE600',
|
|
||||||
textColor: '#ffffffde',
|
|
||||||
buttonBgColor: '#BBE600',
|
|
||||||
buttonTextColor: '#232323DE',
|
|
||||||
iconUrl: '',
|
|
||||||
message: '您确定要这样做吗?',
|
|
||||||
buttonText: '确定',
|
|
||||||
clickEvt: '',
|
|
||||||
visiblePrompt: false,
|
|
||||||
promptTitle: '设备名称',
|
|
||||||
modelValue: '',
|
|
||||||
visibleClose: false,
|
|
||||||
okCallback: null,
|
|
||||||
buttonCancelText: '',
|
|
||||||
showCancel: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
usrToggle: false,
|
usrToggle: false,
|
||||||
|
showVolumPop: false
|
||||||
},
|
},
|
||||||
formData: {
|
formData: {
|
||||||
img: '/static/images/common/HBY102.png',
|
img: '/static/images/common/BJQ6107.png',
|
||||||
sta_PowerPercent: '',
|
sta_PowerPercent: '',
|
||||||
xuhang: '',
|
xuhang: '',
|
||||||
blename: '',
|
blename: '',
|
||||||
deviceId: '',
|
deviceId: '',
|
||||||
deviceName: '',
|
deviceName: '',
|
||||||
RSSI: '',
|
RSSI: '',
|
||||||
statu: '',
|
|
||||||
sta_address: '',
|
|
||||||
bleStatu: false,
|
bleStatu: false,
|
||||||
sta_charge: '',
|
SOS: false, //是否正在报警
|
||||||
sta_LedType: '',
|
sta_LedType: 'fan', //灯光状态
|
||||||
sta_RadarType: '',
|
sta_highSpeed: true, //是否是强光
|
||||||
sta_Online: '',
|
isPlay: false, //是否正在播放
|
||||||
warnTime: '',
|
volumn: 0,
|
||||||
sta_sosadd: "",
|
company: '',
|
||||||
sta_sosName: '',
|
usrname: '',
|
||||||
sta_IntrusTime: ''
|
job: '',
|
||||||
|
usrid: ''
|
||||||
},
|
},
|
||||||
dic: {
|
dic: {
|
||||||
sta_LightType: [
|
sta_LightType: [
|
||||||
|
|
||||||
{
|
{
|
||||||
key: 'led_flash',
|
key: 'ju',
|
||||||
name: '聚光/泛光',
|
name: '聚光',
|
||||||
show: true,
|
show: true,
|
||||||
img: '/static/images/6155/light.png',
|
img: '/static/images/6107/ju.png',
|
||||||
activeImg: '/static/images/100/lightActive.png',
|
activeImg: '/static/images/100/lightActive.png',
|
||||||
group: 'sta_LedType'
|
group: 'sta_LedType'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'led_low_flash',
|
key: 'fan',
|
||||||
name: '聚光',
|
name: '泛光',
|
||||||
show: true,
|
show: true,
|
||||||
img: '/static/images/102/lowFlash.png',
|
img: '/static/images/6107/fan.png',
|
||||||
activeImg: '/static/images/102/lowFlashActive.png',
|
activeImg: '/static/images/102/lowFlashActive.png',
|
||||||
group: 'sta_LedType'
|
group: 'sta_LedType'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'led_steady',
|
key: 'jufan',
|
||||||
name: '泛光',
|
name: '聚光/泛光',
|
||||||
show: true,
|
show: true,
|
||||||
img: '/static/images/102/liting.png',
|
img: '/static/images/6107/fanJu.png',
|
||||||
activeImg: '/static/images/102/litingActive.png',
|
activeImg: '/static/images/102/litingActive.png',
|
||||||
group: 'sta_LedType'
|
group: 'sta_LedType'
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'led_off',
|
|
||||||
name: '红蓝警示',
|
|
||||||
show: true,
|
|
||||||
img: '/static/images/100/light.png',
|
|
||||||
activeImg: '/static/images/100/lightActive.png',
|
|
||||||
group: 'sta_LedType'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -348,7 +358,8 @@
|
|||||||
alarmStatus: null,
|
alarmStatus: null,
|
||||||
detailPageUrl: "/pages/650/HBY650",
|
detailPageUrl: "/pages/650/HBY650",
|
||||||
showConfirm: false
|
showConfirm: false
|
||||||
}
|
},
|
||||||
|
Msgboxs: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -409,8 +420,7 @@
|
|||||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||||
these.formData.bleStatu = true;
|
these.formData.bleStatu = true;
|
||||||
});
|
});
|
||||||
these.formData.sta_IntrusTime = 0;
|
|
||||||
these.formData.sta_sosadd = "";
|
|
||||||
these.setBleFormData();
|
these.setBleFormData();
|
||||||
|
|
||||||
|
|
||||||
@ -429,8 +439,148 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
sendUsr() {
|
||||||
|
this.showMsg("敬请期待", "warn");
|
||||||
|
},
|
||||||
|
showVolmePop() {
|
||||||
|
this.Status.showVolumPop = true;
|
||||||
|
},
|
||||||
|
volumechange(e) {
|
||||||
|
let f = this.getDevice();
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (!f) {
|
||||||
|
this.showBleUnConnect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
f = {
|
||||||
|
deviceId: '12345'
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
this.formData.volumn = e.detail.value;
|
||||||
|
|
||||||
|
// 清除之前的定时器
|
||||||
|
if (volumnTimer) {
|
||||||
|
clearTimeout(volumnTimer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置新的定时器,控制发送频率
|
||||||
|
volumnTimer = setTimeout(() => {
|
||||||
|
|
||||||
|
// let json = {
|
||||||
|
// ins_volumn: [e.detail.value]
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ble.sendString(f.deviceId, json, f.writeServiceId, f.wirteCharactId, 30).then(res => {
|
||||||
|
these.setBleFormData();
|
||||||
|
// }).catch(ex => {
|
||||||
|
// uni.showModal({
|
||||||
|
// title: '错误',
|
||||||
|
// content: ex.msg
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}, 100);
|
||||||
|
},
|
||||||
|
audioManager() {
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/common/audioManager/AudioList',
|
||||||
|
events: {
|
||||||
|
audioApply: function(id) {
|
||||||
|
//应用某个语音时,将数据发送给设备
|
||||||
|
console.log("准备发送数据", id);
|
||||||
|
showLoading(these, {
|
||||||
|
text: '准备发送数据'
|
||||||
|
});
|
||||||
|
|
||||||
|
these.audioData.hexs = uni.getStorageSync(Common.pcmStorageKey + "_" + id);
|
||||||
|
console.log("hexs.length=", these.audioData.hexs.length)
|
||||||
|
these.HoldYouHand();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
success(res) {
|
||||||
|
let channel = res.eventChannel;
|
||||||
|
let f = these.getDevice();
|
||||||
|
channel.emit("deviceData", {
|
||||||
|
ble: f,
|
||||||
|
device: these.device
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
playVolume() {
|
||||||
|
|
||||||
|
|
||||||
|
let f = this.getDevice();
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (!f) {
|
||||||
|
this.showBleUnConnect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
f = {
|
||||||
|
deviceId: '12345'
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
let msg = "";
|
||||||
|
let buttonText = "";
|
||||||
|
if (!this.formData.isPlay) {
|
||||||
|
msg = "确定播放设备语音内容?";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
let exec = (item) => {
|
||||||
|
|
||||||
|
this.formData.isPlay = !this.formData.isPlay;
|
||||||
|
|
||||||
|
this.closePop(item);
|
||||||
|
}
|
||||||
|
if (msg) {
|
||||||
|
this.showPop({
|
||||||
|
key: Common.guid(),
|
||||||
|
message: msg,
|
||||||
|
iconUrl: "/static/images/common/playingActive.png",
|
||||||
|
borderColor: "#BBE6004d",
|
||||||
|
buttonBgColor: "#BBE600",
|
||||||
|
okCallback: exec,
|
||||||
|
buttonText: '确定',
|
||||||
|
buttonCancelText: '取消',
|
||||||
|
showCancel: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
exec();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
highSpeedSetting(item, index, flag) { //工作光、强光切换
|
||||||
|
if (this.formData.sta_LedType !== item.key) {
|
||||||
|
// this.formData.sta_highSpeed=true;
|
||||||
|
this.LighSetting(item, index);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let f = this.getDevice();
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (!f) {
|
||||||
|
this.showBleUnConnect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
f = {
|
||||||
|
deviceId: '12345'
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
this.formData.sta_highSpeed = flag;
|
||||||
|
},
|
||||||
|
LighSetting(item, index) { //灯光模式切换
|
||||||
|
|
||||||
LighSetting(item, index) {
|
|
||||||
let val = item.key;
|
let val = item.key;
|
||||||
if (item.key === this.formData.sta_LedType) {
|
if (item.key === this.formData.sta_LedType) {
|
||||||
val = 'led_off';
|
val = 'led_off';
|
||||||
@ -450,31 +600,23 @@
|
|||||||
deviceId: '12345'
|
deviceId: '12345'
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
this.formData.sta_LedType = val;
|
||||||
let json = {
|
let json = {
|
||||||
ins_LedType: val
|
ins_LedType: val
|
||||||
}
|
}
|
||||||
json = JSON.stringify(json);
|
json = JSON.stringify(json);
|
||||||
ble.sendString(f.deviceId, json, f.writeServiceId, f.wirteCharactId, 30).then(res => {
|
ble.sendString(f.deviceId, json, f.writeServiceId, f.wirteCharactId, 30).then(res => {
|
||||||
this.formData.sta_LedType = val;
|
|
||||||
these.setBleFormData();
|
these.setBleFormData();
|
||||||
|
|
||||||
}).catch(ex => {
|
}).catch(ex => {
|
||||||
this.showMsg(ex.msg);
|
this.showMsg(ex.msg);
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
sosSetting(item, isOk) {
|
sosSetting() {
|
||||||
|
|
||||||
if (item.key == 'led_alarm' && this.formData.sta_LedType == 'led_alarm') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.key == 'led_off' && this.formData.sta_LedType !== 'led_alarm') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let f = this.getDevice();
|
let f = this.getDevice();
|
||||||
@ -490,66 +632,44 @@
|
|||||||
deviceId: '12345'
|
deviceId: '12345'
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
debugger;
|
|
||||||
let task = (val) => {
|
|
||||||
let promise = new Promise((resolve, reject) => {
|
|
||||||
let json = {
|
|
||||||
ins_LedType: val
|
|
||||||
}
|
|
||||||
json = JSON.stringify(json);
|
|
||||||
ble.sendString(f.deviceId, json, f.writeServiceId, f.wirteCharactId, 30).then(res => {
|
|
||||||
this.formData.sta_LedType = val;
|
|
||||||
these.setBleFormData();
|
|
||||||
resolve();
|
|
||||||
}).catch(ex => {
|
|
||||||
this.showMsg(ex.msg);
|
|
||||||
reject(ex);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return promise;
|
|
||||||
|
|
||||||
}
|
|
||||||
if (item.key == 'led_alarm') {
|
|
||||||
this.showPop({
|
|
||||||
message: '确定开启声光报警?',
|
|
||||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
let val = !this.formData.SOS;
|
||||||
borderColor: "#e034344d",
|
let msg = "";
|
||||||
buttonBgColor: "#E03434",
|
let buttonText = "";
|
||||||
okCallback: () => {
|
if (val) {
|
||||||
task("led_alarm");
|
msg = "确定开启声光报警模式?";
|
||||||
},
|
|
||||||
buttonText: "开启",
|
|
||||||
showCancel: true,
|
|
||||||
buttonCancelText: '取消'
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
if (this.formData.sta_LedType == 'led_alarm') {
|
msg = "确定关闭声光报警模式?";
|
||||||
this.showPop({
|
|
||||||
message: '确定解除声光报警模式?',
|
|
||||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
|
||||||
borderColor: "#e034344d",
|
|
||||||
buttonBgColor: "#E03434",
|
|
||||||
okCallback: () => {
|
|
||||||
task(item.key).then(r => {
|
|
||||||
|
|
||||||
|
|
||||||
}).catch(ex => {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
buttonText: "解除",
|
|
||||||
showCancel: true,
|
|
||||||
buttonCancelText: '取消'
|
|
||||||
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
task(item.key);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
let key = Common.guid();
|
||||||
|
let sosToggle = (item) => {
|
||||||
|
//蓝牙/4g发送的指令
|
||||||
|
|
||||||
|
this.formData.SOS = val;
|
||||||
|
|
||||||
|
this.closePop(item);
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.showMsg("操作成功",'succ');
|
||||||
|
// },500)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.showPop({
|
||||||
|
key: key,
|
||||||
|
message: msg,
|
||||||
|
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||||
|
borderColor: "#e034344d",
|
||||||
|
buttonBgColor: "#E03434",
|
||||||
|
okCallback: sosToggle,
|
||||||
|
buttonText: '确定',
|
||||||
|
buttonCancelText: '取消',
|
||||||
|
showCancel: true
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deviceRecovry(res) {
|
deviceRecovry(res) {
|
||||||
@ -711,6 +831,7 @@
|
|||||||
showBleUnConnect() {
|
showBleUnConnect() {
|
||||||
|
|
||||||
this.showPop({
|
this.showPop({
|
||||||
|
key: Common.guid(),
|
||||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||||
borderColor: "#e034344d",
|
borderColor: "#e034344d",
|
||||||
@ -768,28 +889,31 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//关闭某个弹窗,并执行关闭的回调函数
|
||||||
|
closePop: function(item) {
|
||||||
|
|
||||||
closePop: function() {
|
if (item) {
|
||||||
this.Status.Pop.showPop = false;
|
this.Msgboxs.find((v, i) => {
|
||||||
|
if (item.key === v.key) {
|
||||||
|
this.Msgboxs.splice(i, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (item.cancelCallback) {
|
||||||
|
item.cancelCallback();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.Msgboxs.length > 0) {
|
||||||
|
this.Msgboxs.splice(this.Msgboxs.length - 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.Status.Pop.cancelCallback) {
|
|
||||||
this.Status.Pop.cancelCallback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
HidePop: function() {
|
|
||||||
if (this.Status.Pop.clickEvt == 'SendUsr') {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
this.Status.Pop.showPop = false;
|
|
||||||
if (this.Status.Pop.okCallback) {
|
|
||||||
this.Status.Pop.okCallback();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
//根据传入的配置,自定义一个弹窗
|
||||||
showPop: function(option) {
|
showPop: function(option) {
|
||||||
// hideLoading(this);
|
|
||||||
let def = {
|
let def = {
|
||||||
|
key: '',
|
||||||
showPop: true, //是否显示弹窗
|
showPop: true, //是否显示弹窗
|
||||||
popType: 'custom',
|
popType: 'custom',
|
||||||
bgColor: '#383934bd',
|
bgColor: '#383934bd',
|
||||||
@ -809,49 +933,74 @@
|
|||||||
showSlot: false,
|
showSlot: false,
|
||||||
buttonCancelText: '',
|
buttonCancelText: '',
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
|
cancelCallback: null
|
||||||
}
|
}
|
||||||
|
let json = {};
|
||||||
let keys = Object.keys(def);
|
let keys = Object.keys(def);
|
||||||
|
|
||||||
for (let i = 0; i < keys.length; i++) {
|
for (let i = 0; i < keys.length; i++) {
|
||||||
let key = keys[i];
|
let key = keys[i];
|
||||||
if (key in option) {
|
|
||||||
continue;
|
json[key] = def[key];
|
||||||
}
|
|
||||||
this.Status.Pop[key] = def[key];
|
|
||||||
}
|
}
|
||||||
if (option) {
|
if (option) {
|
||||||
keys = Object.keys(option);
|
keys = Object.keys(option);
|
||||||
for (let i = 0; i < keys.length; i++) {
|
for (let i = 0; i < keys.length; i++) {
|
||||||
let key = keys[i];
|
let key = keys[i];
|
||||||
|
|
||||||
this.Status.Pop[key] = option[key];
|
json[key] = option[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!option.borderColor) {
|
if (!json.borderColor) {
|
||||||
option.borderColor = '#BBE600';
|
json.borderColor = '#BBE600';
|
||||||
option.buttonBgColor = '#BBE600';
|
json.buttonBgColor = '#BBE600';
|
||||||
}
|
}
|
||||||
these.Status.Pop.showPop = true;
|
json.showPop = true;
|
||||||
|
if (!('key' in json)) {
|
||||||
|
json.key = Common.guid();
|
||||||
|
}
|
||||||
|
this.Msgboxs.push(json);
|
||||||
},
|
},
|
||||||
showMsg(msg, isSucc) {
|
showMsg(msg, type) {
|
||||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
|
||||||
let borderColor = "#e034344d";
|
let cfg = {
|
||||||
let buttonBgColor = "#E03434";
|
error: {
|
||||||
if (isSucc) {
|
icoUrl: '/static/images/6155/DeviceDetail/uploadErr.png',
|
||||||
icoUrl = '/static/images/common/success.png';
|
borderColor: "#e034344d",
|
||||||
borderColor = "#BBE600";
|
buttonBgColor: "#E03434"
|
||||||
buttonBgColor = "#BBE600";
|
},
|
||||||
|
succ: {
|
||||||
|
icoUrl: '/static/images/common/success.png',
|
||||||
|
borderColor: "#BBE600",
|
||||||
|
buttonBgColor: "#BBE600"
|
||||||
|
},
|
||||||
|
warn: {
|
||||||
|
icoUrl: '/static/images/6170/svg.png',
|
||||||
|
borderColor: "#FFC84E",
|
||||||
|
buttonBgColor: "#FFC84E",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.showPop({
|
|
||||||
|
if (!type) {
|
||||||
|
type = 'error';
|
||||||
|
}
|
||||||
|
if (!cfg[type]) {
|
||||||
|
type = 'error';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let guid = Common.guid();
|
||||||
|
let options = {
|
||||||
|
key: guid,
|
||||||
message: msg,
|
message: msg,
|
||||||
iconUrl: icoUrl,
|
iconUrl: cfg[type].icoUrl,
|
||||||
borderColor: borderColor,
|
borderColor: cfg[type].borderColor,
|
||||||
buttonBgColor: buttonBgColor,
|
buttonBgColor: cfg[type].buttonBgColor,
|
||||||
buttonText: '确定',
|
buttonText: '确定',
|
||||||
okCallback: null
|
okCallback: this.closePop
|
||||||
});
|
};
|
||||||
|
this.showPop(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1039,25 +1188,41 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.lampMode .mode {
|
.lampMode .mode,
|
||||||
|
.lampMode .lightMode {
|
||||||
width: calc(calc(100% - 34rpx) / 2);
|
width: calc(calc(100% - 34rpx) / 2);
|
||||||
|
height: 160rpx;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
background: rgba(26, 26, 26, 1);
|
background: rgba(26, 26, 26, 1);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
padding: 20rpx;
|
||||||
flex-wrap: nowrap;
|
|
||||||
align-content: center;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
padding: 30rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: #00000000;
|
border-color: #00000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lampMode .mode.active {
|
.lampMode .mode {
|
||||||
|
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode {
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .mode.active,
|
||||||
|
.lampMode .lightMode.active {
|
||||||
|
|
||||||
border-color: #aed600 !important;
|
border-color: #aed600 !important;
|
||||||
}
|
}
|
||||||
@ -1067,10 +1232,106 @@
|
|||||||
color: #aed600 !important;
|
color: #aed600 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode.marginLeft {
|
|
||||||
|
.lampMode .mode.rbActive {
|
||||||
|
|
||||||
|
border-color: #E03434 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .mode.rbActive .bigTxt {
|
||||||
|
|
||||||
|
color: #E03434 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.lampMode .lightMode .h50 {
|
||||||
|
height: 50%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .lightType {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .lightType .imgContent {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .lightType .imgContent .img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .workMode {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .workMode .item .checkbox {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1rpx solid #FFFFFF;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mode.marginLeft,
|
||||||
|
.lightMode.marginLeft {
|
||||||
margin-left: 34rpx !important;
|
margin-left: 34rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .workMode .item {
|
||||||
|
width: 50%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
font-family: 'PingFang SC';
|
||||||
|
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
letter-spacing: 0.14rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .workMode .item.active {
|
||||||
|
color: #aed600;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lampMode .lightMode .workMode .item.active .checkbox {
|
||||||
|
background-color: #aed600;
|
||||||
|
border-color: #aed600;
|
||||||
|
}
|
||||||
|
|
||||||
.mode .leftImg {
|
.mode .leftImg {
|
||||||
width: 70rpx;
|
width: 70rpx;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
@ -1103,7 +1364,8 @@
|
|||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode .bigTxt {
|
.mode .bigTxt,
|
||||||
|
.lightMode {
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(255, 255, 255, 0.87);
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
@ -1610,7 +1872,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sliderVal {
|
.sliderVal {
|
||||||
color: rgba(174, 214, 0, 1);
|
color: #aed600;
|
||||||
|
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@ -1619,4 +1881,88 @@
|
|||||||
letter-spacing: 0.07px;
|
letter-spacing: 0.07px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 9997;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
background-color: #00000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volPop {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 9998;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
top: 0rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volPop .volContent {
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
/* min-height: 300rpx; */
|
||||||
|
height: auto;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-shadow: 0 4px 32rpx rgba(0, 0, 0, 0.1);
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 10;
|
||||||
|
margin-top: -100rpx;
|
||||||
|
backdrop-filter: blur(28rpx);
|
||||||
|
background: #38393466;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volPop .header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.volPop .txtContent {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volTxt,
|
||||||
|
.volMath {
|
||||||
|
font-family: 'PingFang SC';
|
||||||
|
font-style: Regular;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
letter-spacing: 0.14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txtContent {
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx 20rpx 0rpx 20rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.volTxt {
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
}
|
||||||
|
|
||||||
|
.volMath {
|
||||||
|
color: rgba(174, 214, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
2181
pages/6155/BJQ6155.vue
Normal file
2181
pages/6155/BJQ6155.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<qf-image-cropper :src="src" :showAngle="false" :width="cropWidth" :height="cropHeight" fileType="jpg"
|
<qf-image-cropper :src="src" :showAngle="false" :width="cropWidth" :height="cropHeight" fileType="jpg"
|
||||||
@crop="handleCrop" :gpu="true">
|
@crop="handleCrop" :areaScale="0.1" :minScale="0.1" :gpu="true">
|
||||||
</qf-image-cropper>
|
</qf-image-cropper>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
BIN
static/images/6107/fan.png
Normal file
BIN
static/images/6107/fan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/images/6107/fanJu.png
Normal file
BIN
static/images/6107/fanJu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1003 B |
BIN
static/images/6107/ju.png
Normal file
BIN
static/images/6107/ju.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1003 B |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
BIN
static/images/common/playingActive.png
Normal file
BIN
static/images/common/playingActive.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Reference in New Issue
Block a user