体验优化添加失败时的提醒
This commit is contained in:
@ -325,6 +325,9 @@
|
||||
these.formData.bleStatu = 'connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
});
|
||||
|
||||
@ -351,6 +354,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -480,6 +484,8 @@
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
<view class="row">
|
||||
<image class="img" src="/static/images/common/time.png" mode="aspectFit"></image>
|
||||
<view class="txt">
|
||||
<view class="bigTxt">{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}
|
||||
<view class="bigTxt">
|
||||
{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}
|
||||
</view>
|
||||
<view class="smallTxt">设备状态</view>
|
||||
</view>
|
||||
@ -54,7 +55,7 @@
|
||||
<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)">
|
||||
@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>
|
||||
@ -72,7 +73,7 @@
|
||||
|
||||
<view class="lampMode">
|
||||
<view class="mode fleft " v-for="item,index in dic.sta_LightType.filter(v=>{return v.group=='sta_LedType'})"
|
||||
:class="{'active':formData[item.group]===item.key,
|
||||
:class="{'active':formData[item.group]===item.key,
|
||||
'marginLeft':index%2===1,
|
||||
'displayNone':!item.show
|
||||
}" v-on:click.stop="LighSetting(item,index)">
|
||||
@ -118,21 +119,13 @@
|
||||
|
||||
|
||||
</view>
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" />
|
||||
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
|
||||
|
||||
<global-loading ref="loading" />
|
||||
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -144,7 +137,15 @@
|
||||
showLoading,
|
||||
hideLoading,
|
||||
updateLoading
|
||||
} from '@/utils/loading.js'
|
||||
} from '@/utils/loading.js';
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
import request, {
|
||||
baseURL
|
||||
} from '@/utils/request.js'
|
||||
@ -167,26 +168,7 @@
|
||||
curr: 0,
|
||||
total: 0,
|
||||
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,
|
||||
},
|
||||
@ -340,7 +322,10 @@
|
||||
these.formData.deviceId = f.deviceId;
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
these.formData.sta_IntrusTime = 0;
|
||||
these.formData.sta_sosadd = "";
|
||||
these.setBleFormData();
|
||||
@ -362,7 +347,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -401,7 +389,7 @@
|
||||
these.setBleFormData();
|
||||
|
||||
}).catch(ex => {
|
||||
this.showMsg(ex.msg);
|
||||
MsgError(ex.msg,'',these);
|
||||
|
||||
});
|
||||
},
|
||||
@ -443,7 +431,7 @@
|
||||
these.setBleFormData();
|
||||
resolve();
|
||||
}).catch(ex => {
|
||||
this.showMsg(ex.msg);
|
||||
MsgError(ex.msg,'',these);
|
||||
reject(ex);
|
||||
});
|
||||
});
|
||||
@ -451,7 +439,7 @@
|
||||
|
||||
}
|
||||
if (item.key == 'led_alarm') {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定开启声光报警?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -462,10 +450,10 @@
|
||||
buttonText: "开启",
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
});
|
||||
},these);
|
||||
} else {
|
||||
if (this.formData.sta_LedType == 'led_alarm') {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定解除声光报警模式?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -482,7 +470,7 @@
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
|
||||
});
|
||||
},these);
|
||||
} else {
|
||||
task(item.key);
|
||||
}
|
||||
@ -559,7 +547,8 @@
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -620,7 +609,7 @@
|
||||
|
||||
|
||||
if (msg.length > 0) {
|
||||
this.showMsg(msg.join(','));
|
||||
MsgError(msg.join(','),'',these);
|
||||
}
|
||||
these.setBleFormData();
|
||||
|
||||
@ -655,7 +644,7 @@
|
||||
},
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -683,7 +672,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
|
||||
proParam: function() {
|
||||
@ -714,90 +703,10 @@
|
||||
|
||||
|
||||
|
||||
closePop: function() {
|
||||
this.Status.Pop.showPop = false;
|
||||
|
||||
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) {
|
||||
// hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
icoUrl = '/static/images/common/success.png';
|
||||
borderColor = "#BBE600";
|
||||
buttonBgColor = "#BBE600";
|
||||
}
|
||||
this.showPop({
|
||||
message: msg,
|
||||
iconUrl: icoUrl,
|
||||
borderColor: borderColor,
|
||||
buttonBgColor: buttonBgColor,
|
||||
buttonText: '确定',
|
||||
okCallback: null
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<view slot="right">
|
||||
<view class="navbarRight center">
|
||||
<view class="imgContent" :class="{'visibilityHidden':Status.apiType!=item.apiType}"
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
<image class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<view class="baber" v-if="item.math">{{item.math>9?'9+':item.math}}</view>
|
||||
</view>
|
||||
@ -62,9 +62,9 @@
|
||||
<text class="value" :class="formData.bleStatu?'green':'red'">{{getbleStatu}}</text>
|
||||
</view>
|
||||
<!-- <view class="item">
|
||||
<text class="lbl">设备状态</text>
|
||||
<text class="value">{{formData.sta_system?dic.sta_system[formData.sta_system]:"" }}</text>
|
||||
</view> -->
|
||||
<text class="lbl">设备状态</text>
|
||||
<text class="value">{{formData.sta_system?dic.sta_system[formData.sta_system]:"" }}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="lampMode">
|
||||
@ -96,9 +96,10 @@
|
||||
<view class="modeSetting">
|
||||
|
||||
<view class="arrow" @click.stop="openVolume(item,index)" v-if="item.show"
|
||||
v-for="item,index in dic.sta_VoiceType" :class="{'active':formData.sta_VoiceType===item.key,
|
||||
'displayNone':!Status.usrToggle && index>3
|
||||
}">
|
||||
v-for="item,index in dic.sta_VoiceType" :class="{'active':formData.sta_VoiceType===item.key,
|
||||
'displayNone' :!Status.usrToggle && index>
|
||||
3
|
||||
}">
|
||||
<view class="outCircle">
|
||||
<view class="item">
|
||||
<view class="text">{{item.name}}</view>
|
||||
@ -121,12 +122,12 @@
|
||||
|
||||
<view class="lampMode">
|
||||
<view class="mode fleft " v-on:click.stop="openVolume(null,'8')"
|
||||
:class="{'active':formData.sta_VoiceType==='8'}">
|
||||
:class="{'active':formData.sta_VoiceType==='8'}">
|
||||
<view class="leftImg">
|
||||
<image class="img" :class="{'displayNone':formData.sta_VoiceType==='8'}"
|
||||
src="/static/images/common/play.png" mode="aspectFit"></image>
|
||||
src="/static/images/common/play.png" mode="aspectFit"></image>
|
||||
<image class="img" :class="{'displayNone':formData.sta_VoiceType!=='8'}"
|
||||
src="/static/images/common/pauseActive.png" mode="aspectFit"></image>
|
||||
src="/static/images/common/pauseActive.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
<text class="bigTxt">播放语音</text>
|
||||
@ -163,9 +164,9 @@
|
||||
}" v-on:click.stop="lightTypeSet(item,index)">
|
||||
<view class="leftImg">
|
||||
<image class="img" :class="{'displayNone':formData.sta_LightType===item.key}"
|
||||
src="/static/images/100/light.png" mode="aspectFit"></image>
|
||||
src="/static/images/100/light.png" mode="aspectFit"></image>
|
||||
<image class="img" :class="{'displayNone':formData.sta_LightType!==item.key}"
|
||||
src="/static/images/100/lightActive.png" mode="aspectFit"></image>
|
||||
src="/static/images/100/lightActive.png" mode="aspectFit"></image>
|
||||
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
@ -193,8 +194,8 @@
|
||||
|
||||
<view class="slider-container">
|
||||
<slider min="10" max="100" step="10" :disabled="false" :value="formData.sta_LightDimmer"
|
||||
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
|
||||
@change="onBrightnessChanged" @changing="onBrightnessChanging" class="custom-slider" />
|
||||
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
|
||||
@change="onBrightnessChanged" @changing="onBrightnessChanging" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
@ -205,8 +206,8 @@
|
||||
|
||||
<view class="slider-container">
|
||||
<slider min="0.5" max="10" step="0.5" :disabled="false" :value="formData.sta_LightFreq"
|
||||
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
|
||||
@change="onFreqChanged" @changing="onFreqChanging" class="custom-slider" />
|
||||
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
|
||||
@change="onFreqChanged" @changing="onFreqChanging" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
@ -217,8 +218,8 @@
|
||||
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="8" step="1" :disabled="false" :value="formData.sta_VoiceVolume"
|
||||
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
|
||||
@change="onVolumeChanged" @changing="onVolumeChanging" class="custom-slider" />
|
||||
activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde"
|
||||
@change="onVolumeChanged" @changing="onVolumeChanging" class="custom-slider" />
|
||||
</view>
|
||||
|
||||
|
||||
@ -246,27 +247,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" />
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<!-- <BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
<view>
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
<image mode="aspectFit" class="img" src="/static/images/6155/DeviceDetail/add.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</BottomSlideMenuPlus> -->
|
||||
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
<global-loading ref="loading" />
|
||||
</view>
|
||||
</template>
|
||||
@ -279,7 +262,15 @@
|
||||
showLoading,
|
||||
hideLoading,
|
||||
updateLoading
|
||||
} from '@/utils/loading.js'
|
||||
} from '@/utils/loading.js';
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js';
|
||||
import request, {
|
||||
baseURL
|
||||
} from '@/utils/request.js';
|
||||
@ -311,26 +302,7 @@
|
||||
curr: 0,
|
||||
total: 0,
|
||||
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,
|
||||
},
|
||||
|
||||
BottomMenu: {
|
||||
show: false,
|
||||
showHeader: true,
|
||||
@ -520,7 +492,7 @@
|
||||
|
||||
this.$watch("formData.sta_battery", (newVal, oldVal) => {
|
||||
if (newVal <= 20 && this.formData.sta_system == 2) {
|
||||
this.showMsg("设备电量低");
|
||||
MsgError("设备电量低",'',these);
|
||||
}
|
||||
});
|
||||
|
||||
@ -582,6 +554,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
these.setBleFormData();
|
||||
|
||||
@ -602,7 +575,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -656,14 +632,14 @@
|
||||
audioManager() {
|
||||
if (!this.permissions.includes('52') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
@ -846,7 +822,7 @@
|
||||
text: "握手成功,等待设备响应"
|
||||
});
|
||||
}).catch(ex => {
|
||||
this.showMsg(ex.msg);
|
||||
MsgError(ex.msg,'',these);
|
||||
});
|
||||
},
|
||||
|
||||
@ -991,14 +967,14 @@ onFreqChanging(e){
|
||||
|
||||
if (!this.permissions.includes('51') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
let f = this.getDevice();
|
||||
@ -1043,14 +1019,14 @@ onFreqChanging(e){
|
||||
|
||||
if (!this.permissions.includes('50') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1083,12 +1059,12 @@ onFreqChanging(e){
|
||||
this.formData.sta_VoiceType = val;
|
||||
these.setBleFormData();
|
||||
}).catch(ex => {
|
||||
this.showMsg(ex.msg);
|
||||
MsgError(ex.msg,'',these);
|
||||
});
|
||||
},
|
||||
|
||||
showUnWarn(val) {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定解除声光报警模式?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1102,20 +1078,20 @@ onFreqChanging(e){
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
|
||||
});
|
||||
},these);
|
||||
},
|
||||
sosSetting(item, isOk) {
|
||||
|
||||
if (!this.permissions.includes('50') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1164,7 +1140,7 @@ onFreqChanging(e){
|
||||
|
||||
})
|
||||
.catch(ex => {
|
||||
this.showMsg(ex.msg);
|
||||
MsgError(ex.msg,'',these);
|
||||
});
|
||||
}
|
||||
|
||||
@ -1173,7 +1149,7 @@ onFreqChanging(e){
|
||||
this.showUnWarn(0);
|
||||
|
||||
} else {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定开启强制报警?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1182,7 +1158,7 @@ onFreqChanging(e){
|
||||
buttonText: "开启",
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
});
|
||||
},these);
|
||||
}
|
||||
|
||||
|
||||
@ -1371,6 +1347,7 @@ onFreqChanging(e){
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -1393,7 +1370,7 @@ onFreqChanging(e){
|
||||
},
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1421,7 +1398,7 @@ onFreqChanging(e){
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
|
||||
proParam: function() {
|
||||
@ -1452,93 +1429,8 @@ onFreqChanging(e){
|
||||
|
||||
|
||||
|
||||
closePop: function() {
|
||||
this.Status.Pop.showPop = false;
|
||||
|
||||
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) {
|
||||
// hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
icoUrl = '/static/images/common/success.png';
|
||||
borderColor = "#BBE600";
|
||||
buttonBgColor = "#BBE600";
|
||||
}
|
||||
this.showPop({
|
||||
message: msg,
|
||||
iconUrl: icoUrl,
|
||||
borderColor: borderColor,
|
||||
buttonBgColor: buttonBgColor,
|
||||
buttonText: '确定',
|
||||
okCallback: null
|
||||
});
|
||||
},
|
||||
btnClick() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<view slot="right">
|
||||
<view class="navbarRight center">
|
||||
<view class="imgContent" @click.stop="handleRightClick(item,index)"
|
||||
v-for="item,index in Status.navbar.icons">
|
||||
v-for="item,index in Status.navbar.icons">
|
||||
<image class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<view class="baber" v-if="item.math">{{item.math>9?'9+':item.math}}</view>
|
||||
</view>
|
||||
@ -37,7 +37,8 @@
|
||||
<view class="row">
|
||||
<image class="img" src="/static/images/common/time.png" mode="aspectFit"></image>
|
||||
<view class="txt">
|
||||
<view class="bigTxt">{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}
|
||||
<view class="bigTxt">
|
||||
{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}
|
||||
</view>
|
||||
<view class="smallTxt">设备状态</view>
|
||||
</view>
|
||||
@ -60,7 +61,7 @@
|
||||
</view>
|
||||
<view class="item" @click.top="bleStatuToggle">
|
||||
<text class="lbl">蓝牙状态</text>
|
||||
<text class="value" :class="(!formData.bleStatu || formData.bleStatu==='err')?'red':'green'">{{getbleStatu}}</text>
|
||||
<text class="value" :class="(!formData.bleStatu || formData.bleStatu==='err')?'red':'green'">{{getbleStatu}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">信道:{{formData.sta_Channel}}</text>
|
||||
@ -79,7 +80,7 @@
|
||||
<view class="lampMode">
|
||||
<view class="sosContent">
|
||||
<view class="btnSos openSos center" :class="{active:formData.sta_LedType==='led_alarm'}"
|
||||
@click="sosSetting(dic.sta_LightType[6],6)">
|
||||
@click="sosSetting(dic.sta_LightType[6],6)">
|
||||
{{formData.sta_LedType==='led_alarm'?'报警中':'强制报警'}}
|
||||
</view>
|
||||
<view class="btnSos closeSos center" @click="sosSetting(dic.sta_LightType[5],5)">解除</view>
|
||||
@ -97,7 +98,7 @@
|
||||
|
||||
<view class="lampMode">
|
||||
<view class="mode fleft " v-for="item,index in dic.sta_LightType.filter(v=>{return v.group=='sta_LedType'})"
|
||||
:class="{'active':formData[item.group]===item.key,
|
||||
:class="{'active':formData[item.group]===item.key,
|
||||
'marginLeft':index%2===1,
|
||||
'displayNone':!item.show
|
||||
}" v-on:click.stop="actionSett(item,index)">
|
||||
@ -125,7 +126,7 @@
|
||||
</view>
|
||||
<view class="lampMode">
|
||||
<view class="mode fleft "
|
||||
v-for="item,index in dic.sta_LightType.filter(v=>{return v.group!=='sta_LedType'})" :class="{'active':formData[item.group]===item.key,
|
||||
v-for="item,index in dic.sta_LightType.filter(v=>{return v.group!=='sta_LedType'})" :class="{'active':formData[item.group]===item.key,
|
||||
'marginLeft':index%2===1,
|
||||
'displayNone':!item.show
|
||||
}" v-on:click.stop="actionSett(item,index)">
|
||||
@ -172,16 +173,16 @@
|
||||
</view>
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" :showSlot="Status.Pop.showSlot">
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" :showSlot="Status.Pop.showSlot">
|
||||
<view v-if="Status.ShowEditChannel" class="popup-prompt">
|
||||
<text class="popup-prompt-title">修改信道</text>
|
||||
<input class="popup-prompt-input" type="number" placeholder="1-125的整数"
|
||||
placeholder-class="popup-prompt-input-placeHolder" v-model="formData.ins_Channel" />
|
||||
placeholder-class="popup-prompt-input-placeHolder" v-model="formData.ins_Channel" />
|
||||
|
||||
</view>
|
||||
</MessagePopup>
|
||||
@ -194,6 +195,7 @@
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @itemClick="btnClick" @close="closeActionSheet">
|
||||
|
||||
</BottomSlideMenuPlus>
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -211,6 +213,14 @@
|
||||
} from '@/utils/request.js'
|
||||
|
||||
import Common from '@/utils/Common.js'
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
const pagePath = "/pages/102/HBY102";
|
||||
|
||||
var ble = null;
|
||||
@ -502,6 +512,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
these.formData.sta_IntrusTime = 0;
|
||||
these.formData.sta_sosadd = "";
|
||||
@ -524,7 +535,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
this.getWarns();
|
||||
// this.getLinkedCnt();
|
||||
@ -596,14 +610,14 @@
|
||||
|
||||
if (!this.permissions.includes('55') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -772,14 +786,14 @@
|
||||
|
||||
if (!this.permissions.includes(item.permission) && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -840,7 +854,7 @@
|
||||
|
||||
|
||||
if (val === 'E49_on') {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定开启联机模式?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -852,7 +866,7 @@
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
|
||||
});
|
||||
},these);
|
||||
} else {
|
||||
task();
|
||||
}
|
||||
@ -922,7 +936,7 @@
|
||||
}
|
||||
|
||||
if (val == 'status_off') {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定关闭物体感应功能?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -934,7 +948,7 @@
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
|
||||
});
|
||||
},these);
|
||||
} else {
|
||||
task();
|
||||
}
|
||||
@ -945,17 +959,16 @@
|
||||
|
||||
|
||||
sosSetting(item, isOk) {
|
||||
debugger;
|
||||
if (!this.permissions.includes('46') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -993,7 +1006,7 @@ debugger;
|
||||
these.setBleFormData();
|
||||
resolve();
|
||||
}).catch(ex => {
|
||||
this.showMsg(ex.msg);
|
||||
MsgError(ex.msg,null,these);
|
||||
reject(ex);
|
||||
});
|
||||
});
|
||||
@ -1001,7 +1014,7 @@ debugger;
|
||||
|
||||
}
|
||||
if (item.key == 'led_alarm') {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定开启强制报警?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1012,10 +1025,10 @@ debugger;
|
||||
buttonText: "开启",
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
});
|
||||
},these);
|
||||
} else {
|
||||
if (this.formData.sta_LedType == 'led_alarm') {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定解除声光报警模式?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1032,7 +1045,7 @@ debugger;
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
|
||||
});
|
||||
},these);
|
||||
} else {
|
||||
let newval=this.formData.sta_LedType===item.key?'led_off':item.key;
|
||||
task(newval);
|
||||
@ -1202,7 +1215,7 @@ debugger;
|
||||
name: deviceName
|
||||
});
|
||||
}
|
||||
this.showMsg(msg.join(','));
|
||||
MsgError(msg.join(','),'',these);
|
||||
});
|
||||
return;
|
||||
// clearInterval(instrusionTime);
|
||||
@ -1222,7 +1235,7 @@ debugger;
|
||||
// this.formData.sta_IntrusTime = 0;
|
||||
}
|
||||
if (msg.length > 0) {
|
||||
this.showMsg(msg.join(','));
|
||||
MsgError(msg.join(','),'',these);
|
||||
}
|
||||
|
||||
|
||||
@ -1346,6 +1359,7 @@ debugger;
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -1367,7 +1381,7 @@ debugger;
|
||||
},
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1395,7 +1409,7 @@ debugger;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
|
||||
proParam: function() {
|
||||
@ -1423,93 +1437,76 @@ debugger;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
closePop: function() {
|
||||
this.Status.Pop.showPop = false;
|
||||
this.Status.Pop.showPop = false;
|
||||
|
||||
if (this.Status.Pop.cancelCallback) {
|
||||
this.Status.Pop.cancelCallback();
|
||||
}
|
||||
},
|
||||
HidePop: function() {
|
||||
if (this.Status.Pop.clickEvt == 'SendUsr') {
|
||||
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) {
|
||||
// hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
this.Status.Pop.showPop = false;
|
||||
if (this.Status.Pop.okCallback) {
|
||||
this.Status.Pop.okCallback();
|
||||
}
|
||||
},
|
||||
showPop: function(option) {
|
||||
hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
|
||||
let keys = Object.keys(def);
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
icoUrl = '/static/images/common/success.png';
|
||||
borderColor = "#BBE600";
|
||||
buttonBgColor = "#BBE600";
|
||||
}
|
||||
this.showPop({
|
||||
message: msg,
|
||||
iconUrl: icoUrl,
|
||||
borderColor: borderColor,
|
||||
buttonBgColor: buttonBgColor,
|
||||
buttonText: '确定',
|
||||
okCallback: null
|
||||
});
|
||||
}
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<view slot="right">
|
||||
<view class="navbarRight center">
|
||||
<view class="imgContent" :class="{'visibilityHidden':Status.apiType!=item.apiType}"
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
<image class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<view class="baber" v-if="item.math">{{item.math>9?'9+':item.math}}</view>
|
||||
</view>
|
||||
@ -33,12 +33,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="row">
|
||||
<image class="img" src="/static/images/common/time.png" mode="aspectFit"></image>
|
||||
<view class="txt">
|
||||
<view class="bigTxt">{{formData.xuhang}}</view>
|
||||
<view class="smallTxt">续航时间</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<image class="img" src="/static/images/common/time.png" mode="aspectFit"></image>
|
||||
<view class="txt">
|
||||
<view class="bigTxt">{{formData.xuhang}}</view>
|
||||
<view class="smallTxt">续航时间</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="eqinfo">
|
||||
@ -72,17 +72,17 @@
|
||||
</view>
|
||||
|
||||
<!-- <view class="lamp">
|
||||
<view class="title">
|
||||
<text>信道设置</text>
|
||||
<text>{{formData.sta_Channel}}</text>
|
||||
</view>
|
||||
<view class="title">
|
||||
<text>信道设置</text>
|
||||
<text>{{formData.sta_Channel}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="lampMode">
|
||||
<slider min="1" max="125" step="1" :disabled="false" :value="formData.sta_Channel" activeColor="#bbe600"
|
||||
backgroundColor="#686767" block-size="20" block-color="#ffffffde" @change="onChannelChanging"
|
||||
@changing="onChannelChanging" class="custom-slider" />
|
||||
</view> -->
|
||||
<view class="lampMode">
|
||||
<slider min="1" max="125" step="1" :disabled="false" :value="formData.sta_Channel" activeColor="#bbe600"
|
||||
backgroundColor="#686767" block-size="20" block-color="#ffffffde" @change="onChannelChanging"
|
||||
@changing="onChannelChanging" class="custom-slider" />
|
||||
</view> -->
|
||||
|
||||
<view class="lamp">
|
||||
<view class="title">
|
||||
@ -95,13 +95,13 @@
|
||||
|
||||
<view class="lampMode">
|
||||
<view class="mode fleft " v-for="item,index in dic.SOS"
|
||||
:class="{active:formData.sta_SOSType===item.val,marginLeft:index%2==1}"
|
||||
v-on:click.stop="sosSetting(item,index)">
|
||||
:class="{active:formData.sta_SOSType===item.val,marginLeft:index%2==1}"
|
||||
v-on:click.stop="sosSetting(item,index)">
|
||||
<view class="leftImg">
|
||||
<image class="img" :class="(formData.sta_SOSType!==item.val || !item.activeImg)?'':'displayNone'"
|
||||
:src="item.img" mode="aspectFit"></image>
|
||||
:src="item.img" mode="aspectFit"></image>
|
||||
<image class="img" :class="(formData.sta_SOSType===item.val && item.activeImg)?'':'displayNone'"
|
||||
:src="item.activeImg" mode="aspectFit"></image>
|
||||
:src="item.activeImg" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
<text class="bigTxt">{{item['text']}}</text>
|
||||
@ -128,8 +128,8 @@
|
||||
<view class="lampMode">
|
||||
<view class="colorContent">
|
||||
<view v-for="item,index in formData.groups" class="item"
|
||||
:class="{active:item.id==formData.sta_GroupType,marginNoLeft:index%3===0}"
|
||||
@click.stop="groupSetting(item,index)">
|
||||
:class="{active:item.id==formData.sta_GroupType,marginNoLeft:index%3===0}"
|
||||
@click.stop="groupSetting(item,index)">
|
||||
|
||||
<view class="polygon" :style="{backgroundColor:item.hex}">
|
||||
|
||||
@ -153,7 +153,7 @@
|
||||
<view class="modeSetting">
|
||||
|
||||
<view class="arrow" @click.stop="ArrowModeSet('right_off')"
|
||||
:class="formData.sta_ArrowMode=='right_off'?'active':''">
|
||||
:class="formData.sta_ArrowMode=='right_off'?'active':''">
|
||||
<view class="outCircle">
|
||||
<view class="item">
|
||||
<image class="img nomal" src="/static/images/4877/arrow.png" mode="aspectFit"></image>
|
||||
@ -164,13 +164,13 @@
|
||||
<view class="text">朝左</view>
|
||||
</view>
|
||||
<view class="arrow" @click.stop="ArrowModeSet('right_on')"
|
||||
:class="formData.sta_ArrowMode=='right_on'?'active':''">
|
||||
:class="formData.sta_ArrowMode=='right_on'?'active':''">
|
||||
<view class="outCircle">
|
||||
<view class="item">
|
||||
<image class="img nomal translate" src="/static/images/4877/arrow.png" mode="aspectFit">
|
||||
</image>
|
||||
<image class="img activity translate" src="/static/images/4877/arrowActive.png"
|
||||
mode="aspectFit"></image>
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text">朝右</view>
|
||||
@ -185,7 +185,7 @@
|
||||
<view class="modeSetting">
|
||||
|
||||
<view class="arrow" @click.stop="ArrowSet('red_front')"
|
||||
:class="formData.sta_ArrowType=='red_front'?'redactive':''">
|
||||
:class="formData.sta_ArrowType=='red_front'?'redactive':''">
|
||||
<view class="outCircle">
|
||||
<view class="item">
|
||||
<view class="text">红色</view>
|
||||
@ -194,7 +194,7 @@
|
||||
|
||||
</view>
|
||||
<view class="arrow" @click.stop="ArrowSet('green_back')"
|
||||
:class="formData.sta_ArrowType=='green_back'?'greenactive':''">
|
||||
:class="formData.sta_ArrowType=='green_back'?'greenactive':''">
|
||||
<view class="outCircle">
|
||||
<view class="item">
|
||||
<view class="text">绿色</view>
|
||||
@ -217,7 +217,7 @@
|
||||
<view class="modeSetting">
|
||||
|
||||
<view class="arrow" @click.stop="ArrowSet('red_all')"
|
||||
:class="formData.sta_ArrowType=='red_all'?'active':''">
|
||||
:class="formData.sta_ArrowType=='red_all'?'active':''">
|
||||
<view class="outCircle">
|
||||
<view class="item">
|
||||
<image class="img nomal" src="/static/images/4877/arrowLR.png" mode="aspectFit"></image>
|
||||
@ -228,13 +228,13 @@
|
||||
<view class="text">红色双向</view>
|
||||
</view>
|
||||
<view class="arrow" @click.stop="ArrowSet('green_all')"
|
||||
:class="formData.sta_ArrowType=='green_all'?'active':''">
|
||||
:class="formData.sta_ArrowType=='green_all'?'active':''">
|
||||
<view class="outCircle">
|
||||
<view class="item">
|
||||
<image class="img nomal translate" src="/static/images/4877/arrowLR.png" mode="aspectFit">
|
||||
</image>
|
||||
<image class="img activity translate" src="/static/images/4877/arrowLRActive.png"
|
||||
mode="aspectFit"></image>
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text">绿色双向</view>
|
||||
@ -266,22 +266,22 @@
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" :showSlot="Status.Pop.showSlot">
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText"
|
||||
:showCancel="Status.Pop.showCancel" @cancelPop="closePop" :showSlot="Status.Pop.showSlot">
|
||||
<view v-if="Status.ShowEditChannel" class="popup-prompt">
|
||||
<text class="popup-prompt-title">修改信道</text>
|
||||
<input class="popup-prompt-input" type="number" placeholder="1-125的整数"
|
||||
placeholder-class="popup-prompt-input-placeHolder" v-model="formData.sta_Channel" />
|
||||
placeholder-class="popup-prompt-input-placeHolder" v-model="formData.sta_Channel" />
|
||||
|
||||
</view>
|
||||
</MessagePopup>
|
||||
|
||||
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
<global-loading ref="loading" />
|
||||
</view>
|
||||
</template>
|
||||
@ -304,7 +304,14 @@
|
||||
} from '@/api/4877/BJQ4877.js';
|
||||
|
||||
import MqTool from '@/utils/MqHelper.js'
|
||||
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
const pagePath = "/pages/4877/BJQ4877";
|
||||
|
||||
var ble = null;
|
||||
@ -711,14 +718,14 @@
|
||||
|
||||
if (!this.permissions.includes('55') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -749,7 +756,7 @@
|
||||
cancelCallback: () => {
|
||||
this.Status.ShowEditChannel = false;
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
onChannelChanging() {
|
||||
let regex = /^(0|([1-9]\d?)|1[01]\d|12[0-5])$/;
|
||||
@ -792,14 +799,14 @@
|
||||
|
||||
if (!this.permissions.includes('53') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -855,14 +862,14 @@
|
||||
groupCheck() {
|
||||
if (!this.permissions.includes('54') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
@ -916,7 +923,7 @@
|
||||
|
||||
|
||||
showUnWarn(val) {
|
||||
// this.showPop({
|
||||
// showPop({
|
||||
// message: '确定解除声光报警模式?',
|
||||
// iconUrl: "/static/images/common/uploadErr.png",
|
||||
// borderColor: "#e034344d",
|
||||
@ -938,14 +945,14 @@
|
||||
|
||||
if (!this.permissions.includes('54') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -997,14 +1004,14 @@
|
||||
sosSetting(item, index) {
|
||||
if (!this.permissions.includes('42') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
let f = this.getDevice();
|
||||
@ -1037,7 +1044,7 @@
|
||||
|
||||
|
||||
let confirmTask = () => {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定' + (this.formData.sta_SOSType === 'sos' ? '关闭' : '开启') + '声光报警模式?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1046,7 +1053,7 @@
|
||||
buttonText: (this.formData.sta_SOSType === 'sos' ? '关闭' : '开启'),
|
||||
showCancel: true,
|
||||
buttonCancelText: '取消'
|
||||
});
|
||||
},these);
|
||||
}
|
||||
if (item.val === 'sos') {
|
||||
confirmTask();
|
||||
@ -1258,7 +1265,7 @@
|
||||
},
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -1286,7 +1293,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
|
||||
proParam: function() {
|
||||
@ -1335,54 +1342,56 @@
|
||||
this.Status.Pop.okCallback();
|
||||
}
|
||||
},
|
||||
showPop: function(option) {
|
||||
hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
showPop: function (option) {
|
||||
hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
|
||||
let keys = Object.keys(def);
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
|
||||
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
@ -1392,17 +1401,14 @@
|
||||
borderColor = "#BBE600";
|
||||
buttonBgColor = "#BBE600";
|
||||
}
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: msg,
|
||||
iconUrl: icoUrl,
|
||||
borderColor: borderColor,
|
||||
buttonBgColor: buttonBgColor,
|
||||
buttonText: '确定',
|
||||
okCallback: null
|
||||
});
|
||||
},
|
||||
btnClick() {
|
||||
|
||||
},this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -501,7 +501,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
onHide: function() {
|
||||
@ -569,7 +572,10 @@
|
||||
these.formData.bleStatu = 'connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
});
|
||||
|
||||
|
||||
@ -2074,7 +2080,8 @@
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -2102,6 +2109,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
<view class="row">
|
||||
<image class="img" src="/static/images/common/time.png" mode="aspectFit"></image>
|
||||
<view class="txt">
|
||||
<view class="bigTxt">{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}
|
||||
<view class="bigTxt">
|
||||
{{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }}
|
||||
</view>
|
||||
<view class="smallTxt">设备状态</view>
|
||||
</view>
|
||||
@ -74,12 +75,12 @@
|
||||
<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}">
|
||||
: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}">
|
||||
:class="{'active':formData.sta_highSpeed===false && formData.sta_LedType===item.key}">
|
||||
<view class="checkbox "></view>
|
||||
<text>工作光</text>
|
||||
</view>
|
||||
@ -93,7 +94,7 @@
|
||||
<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">
|
||||
mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
@ -114,9 +115,9 @@
|
||||
<view class="mode fleft " @click.stop="playVolume()" :class="{'active':formData.isPlay}">
|
||||
<view class="leftImg">
|
||||
<image class="img" :class="{'displayNone':formData.isPlay}" src="/static/images/common/play.png"
|
||||
mode="aspectFit"></image>
|
||||
mode="aspectFit"></image>
|
||||
<image class="img" :class="{'displayNone':!formData.isPlay}"
|
||||
src="/static/images/common/playingActive.png" mode="aspectFit"></image>
|
||||
src="/static/images/common/playingActive.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
<text class="bigTxt">{{formData.isPlay?'正在播放':'播放语音'}}</text>
|
||||
@ -183,7 +184,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
|
||||
|
||||
<view class="proinfo lamp">
|
||||
@ -208,11 +209,11 @@
|
||||
</view>
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup v-for="item,key in Msgboxs" :visible="item.showPop" :type="item.popType" :bgColor="item.bgColor"
|
||||
:borderColor="item.borderColor" :textColor="item.textColor" :buttonBgColor="item.buttonBgColor"
|
||||
:buttonTextColor="item.buttonTextColor" :iconUrl="item.iconUrl" :message="item.message"
|
||||
:buttonText="item.buttonText" @buttonClick="item.okCallback(item)" :visiblePrompt="item.visiblePrompt"
|
||||
:promptTitle="item.promptTitle" v-model="item.modelValue" @closePop="closePop(item)"
|
||||
:buttonCancelText="item.buttonCancelText" :showCancel="item.showCancel" @cancelPop="closePop(item)" />
|
||||
:borderColor="item.borderColor" :textColor="item.textColor" :buttonBgColor="item.buttonBgColor"
|
||||
:buttonTextColor="item.buttonTextColor" :iconUrl="item.iconUrl" :message="item.message"
|
||||
:buttonText="item.buttonText" @buttonClick="item.okCallback(item)" :visiblePrompt="item.visiblePrompt"
|
||||
:promptTitle="item.promptTitle" v-model="item.modelValue" @closePop="closePop(item)"
|
||||
:buttonCancelText="item.buttonCancelText" :showCancel="item.showCancel" @cancelPop="closePop(item)" />
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
|
||||
@ -226,7 +227,7 @@
|
||||
|
||||
<view class="header">
|
||||
<uni-icons @click.stop="Status.showVolumPop=false" type="closeempty" size="15"
|
||||
color="#FFFFFFde"></uni-icons>
|
||||
color="#FFFFFFde"></uni-icons>
|
||||
</view>
|
||||
<view class="txtContent">
|
||||
<view class="volTxt">
|
||||
@ -239,8 +240,8 @@
|
||||
<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" />
|
||||
backgroundColor="#686767" block-size="20" block-color="#ffffffde" @change="volumechange"
|
||||
@changing="volumechange" class="custom-slider" />
|
||||
|
||||
|
||||
</view>
|
||||
@ -248,7 +249,7 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -265,7 +266,16 @@
|
||||
baseURL
|
||||
} from '@/utils/request.js'
|
||||
|
||||
import Common from '@/utils/Common.js'
|
||||
import Common from '@/utils/Common.js';
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
|
||||
const pagePath = "/pages/018A/HBY018A";
|
||||
|
||||
var ble = null;
|
||||
@ -419,7 +429,10 @@
|
||||
these.formData.deviceId = f.deviceId;
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
|
||||
these.setBleFormData();
|
||||
|
||||
@ -439,7 +452,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -551,7 +567,7 @@
|
||||
this.closePop(item);
|
||||
}
|
||||
if (msg) {
|
||||
this.showPop({
|
||||
showPop({
|
||||
key: Common.guid(),
|
||||
message: msg,
|
||||
iconUrl: "/static/images/common/playingActive.png",
|
||||
@ -561,7 +577,7 @@
|
||||
buttonText: '确定',
|
||||
buttonCancelText: '取消',
|
||||
showCancel: true
|
||||
});
|
||||
},these);
|
||||
} else {
|
||||
exec();
|
||||
}
|
||||
@ -667,7 +683,7 @@
|
||||
// },500)
|
||||
}
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
key: key,
|
||||
message: msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
@ -677,7 +693,7 @@
|
||||
buttonText: '确定',
|
||||
buttonCancelText: '取消',
|
||||
showCancel: true
|
||||
});
|
||||
},these);
|
||||
|
||||
},
|
||||
deviceRecovry(res) {
|
||||
@ -742,7 +758,8 @@
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -838,7 +855,7 @@
|
||||
},
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
key: Common.guid(),
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
@ -867,7 +884,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
|
||||
proParam: function() {
|
||||
@ -918,58 +935,7 @@
|
||||
}
|
||||
|
||||
},
|
||||
//根据传入的配置,自定义一个弹窗
|
||||
showPop: function(option) {
|
||||
let def = {
|
||||
key: '',
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
cancelCallback: null
|
||||
}
|
||||
let json = {};
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
json[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
json[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!json.borderColor) {
|
||||
json.borderColor = '#BBE600';
|
||||
json.buttonBgColor = '#BBE600';
|
||||
}
|
||||
json.showPop = true;
|
||||
if (!('key' in json)) {
|
||||
json.key = Common.guid();
|
||||
}
|
||||
this.Msgboxs.push(json);
|
||||
},
|
||||
|
||||
showMsg(msg, type) {
|
||||
|
||||
let cfg = {
|
||||
@ -1008,7 +974,7 @@
|
||||
buttonText: '确定',
|
||||
okCallback: this.closePop
|
||||
};
|
||||
this.showPop(options);
|
||||
showPop(options,these);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<view slot="right">
|
||||
<view class="navbarRight center">
|
||||
<view class="imgContent" :class="{'visibilityHidden':Status.apiType!=item.apiType}"
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
<image class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<view class="baber" v-if="item.math">{{item.math>9?'9+':item.math}}</view>
|
||||
</view>
|
||||
@ -74,8 +74,8 @@
|
||||
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600"
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" @changing="sliderChanging"
|
||||
class="custom-slider" />
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" @changing="sliderChanging"
|
||||
class="custom-slider" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -124,23 +124,23 @@
|
||||
<view class="btnSend fright" v-on:click.stop="sendUsr">发送</view>
|
||||
<view class="clear"></view>
|
||||
<TextToHexV1 class="TextToHex" ref="textToHex" :txts="formData.textLines" :bgColor="'#FFFFFF'"
|
||||
:color="'#000000'" :fontSize="16" />
|
||||
:color="'#000000'" :fontSize="16" />
|
||||
</view>
|
||||
|
||||
<view class="item">
|
||||
<text class="lbl">单位:</text>
|
||||
<input class="value" v-model.trim="formData.textLines[0]" placeholder="请输入单位" maxlength="8"
|
||||
placeholder-class="usrplace" />
|
||||
placeholder-class="usrplace" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">部门:</text>
|
||||
<input class="value" v-model.trim="formData.textLines[1]" placeholder="请输入姓名" maxlength="8"
|
||||
placeholder-class="usrplace" />
|
||||
placeholder-class="usrplace" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">姓名:</text>
|
||||
<input class="value" v-model.trim="formData.textLines[2]" placeholder="请输入职位" maxlength="8"
|
||||
placeholder-class="usrplace" />
|
||||
placeholder-class="usrplace" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -162,17 +162,11 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" @closePop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
|
||||
:promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" />
|
||||
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@btnClick="btnClick">
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
<image mode="aspectFit" class="img" src="/static/images/6155/DeviceDetail/add.png"></image>
|
||||
@ -182,6 +176,7 @@
|
||||
</BottomSlideMenuPlus>
|
||||
|
||||
<global-loading ref="loading" />
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -201,6 +196,14 @@
|
||||
} from '@/utils/request.js';
|
||||
|
||||
var pagePath = "/pages/6155/BJQ6155";
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
|
||||
var ble = null;
|
||||
var these = null;
|
||||
@ -413,7 +416,10 @@
|
||||
these.formData.bleStatu = 'connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
these.setBleFormData();
|
||||
these.getDetail();
|
||||
|
||||
@ -433,7 +439,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
onBackPress(e) {
|
||||
@ -480,6 +489,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -640,7 +650,8 @@
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -769,11 +780,11 @@
|
||||
return;
|
||||
}
|
||||
let os = plus.os.name;
|
||||
|
||||
// 分包发送图片数据
|
||||
var sendImagePackets = function(ReSendNo) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
// 总数据包数
|
||||
let totalPackets = os=='Android'?52:200;
|
||||
let currentPacket = 1;
|
||||
@ -808,11 +819,7 @@
|
||||
|
||||
// 计算当前包的数据
|
||||
let packetSize = os == 'Android' ? 250 : 64;
|
||||
// if (currentPacket <= 51) {
|
||||
// packetSize = 250; // 前51个包每个500字节
|
||||
// } else {
|
||||
// packetSize = 50; // 最后一个包100字节
|
||||
// }
|
||||
|
||||
|
||||
// 创建数据包
|
||||
let startIndex = (currentPacket - 1) * packetSize;
|
||||
@ -824,7 +831,7 @@
|
||||
let packetData = these.rgb565Data.slice(startIndex,
|
||||
endIndex);
|
||||
// 构建数据包
|
||||
let bufferSize = os ==packetSize.length*2+5; // 5 + packetData.length * 2; // 头部5字节 + 数据部分
|
||||
let bufferSize = packetData.length * 2+5; // 头部5字节 + 数据部分
|
||||
let buffer = new ArrayBuffer(bufferSize);
|
||||
let dataView = new DataView(buffer);
|
||||
|
||||
@ -833,12 +840,12 @@
|
||||
dataView.setUint8(1, 0x02); // 帧类型:开机画面
|
||||
dataView.setUint8(2, currentPacket); // 包序号
|
||||
dataView.setUint16(3, packetData.length*2,false);
|
||||
|
||||
|
||||
// 填充数据(每个RGB565值占2字节)
|
||||
for (let i = 0; i < packetData.length; i++) {
|
||||
dataView.setUint16(5 + i * 2, packetData[i], false); // 大端字节序
|
||||
}
|
||||
|
||||
|
||||
//发送数据包
|
||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId,
|
||||
10).then(() => {
|
||||
@ -911,8 +918,9 @@
|
||||
console.log("data=", data);
|
||||
these.Status.BottomMenu.show = false;
|
||||
these.rgb565Data = Common.convertToRGB565(data.piexls);
|
||||
|
||||
console.log("1111111111")
|
||||
setTimeout(function() {
|
||||
console.log("1111111111")
|
||||
sendImagePackets().catch(() => {
|
||||
|
||||
});
|
||||
@ -1540,6 +1548,7 @@
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
showPop(option, these);
|
||||
},
|
||||
sendUsr() {
|
||||
if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<view slot="right">
|
||||
<view class="navbarRight center">
|
||||
<view class="imgContent" :class="{'visibilityHidden':Status.apiType!=item.apiType}"
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
<image class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<view class="baber" v-if="item.math">{{item.math>9?'9+':item.math}}</view>
|
||||
</view>
|
||||
@ -75,8 +75,8 @@
|
||||
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600"
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -125,23 +125,23 @@
|
||||
<view class="btnSend fright" v-on:click.stop="sendUsr">发送</view>
|
||||
<view class="clear"></view>
|
||||
<TextToHexV1 class="TextToHex" ref="textToHex" :txts="formData.textLines" :bgColor="'#FFFFFF'"
|
||||
:color="'#000000'" :fontSize="14" />
|
||||
:color="'#000000'" :fontSize="14" />
|
||||
</view>
|
||||
|
||||
<view class="item">
|
||||
<text class="lbl">单位:</text>
|
||||
<input class="value" v-model.trim="formData.textLines[0]" placeholder="请输入单位"
|
||||
placeholder-class="usrplace" />
|
||||
placeholder-class="usrplace" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">部门:</text>
|
||||
<input class="value" v-model.trim="formData.textLines[1]" placeholder="请输入姓名"
|
||||
placeholder-class="usrplace" />
|
||||
placeholder-class="usrplace" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">姓名:</text>
|
||||
<input class="value" v-model.trim="formData.textLines[2]" placeholder="请输入职位"
|
||||
placeholder-class="usrplace" />
|
||||
placeholder-class="usrplace" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -163,17 +163,11 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" @closePop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
|
||||
:promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" />
|
||||
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@btnClick="btnClick">
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
<image mode="aspectFit" class="img" src="/static/images/6155/DeviceDetail/add.png"></image>
|
||||
@ -183,6 +177,7 @@
|
||||
</BottomSlideMenuPlus>
|
||||
|
||||
<global-loading ref="loading" />
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -202,6 +197,14 @@
|
||||
} from '@/utils/request.js';
|
||||
|
||||
var pagePath = "/pages/6155/deviceDetail";
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
|
||||
var ble = null;
|
||||
var these = null;
|
||||
@ -383,7 +386,10 @@
|
||||
these.formData.bleStatu = 'connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
these.setBleFormData();
|
||||
these.getDetail();
|
||||
|
||||
@ -403,7 +409,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
onBackPress(e) {
|
||||
@ -450,6 +459,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -621,7 +631,8 @@
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -1625,6 +1636,7 @@
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
showPop(option,this);
|
||||
},
|
||||
sendUsr() {
|
||||
|
||||
|
||||
@ -471,6 +471,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:"+ex.msg,"确定",these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -583,6 +584,8 @@
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:"+ex.msg,"确定",these);
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -2023,6 +2026,9 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(
|
||||
res => {
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex=>{
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:"+ex.msg,"确定",these);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -2043,6 +2049,8 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
this.formData.bleStatu = true;
|
||||
}).catch(ex=>{
|
||||
MsgError("连接错误:"+ex.msg,"确定",these);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@ -22,19 +22,19 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="eqinfo">
|
||||
<view class="item">
|
||||
<view class="item">
|
||||
<text class="lbl">设备名称</text>
|
||||
<text class="value">{{device.deviceName}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">Mac地址</text>
|
||||
<text class="value">{{device.deviceMac}}</text>
|
||||
</view>
|
||||
<text class="lbl">Mac地址</text>
|
||||
<text class="value">{{device.deviceMac}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">蓝牙名称</text>
|
||||
<text class="value">{{device.bluetoothName}}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="item">
|
||||
<text class="lbl">蓝牙状态</text>
|
||||
<text class="value" :class="formData.bleStatu?'green':'red'">{{formData.bleStatu?'已连接':'未连接'}}</text>
|
||||
@ -45,34 +45,34 @@
|
||||
<view class="title">
|
||||
<text>照明模式</text>
|
||||
<text @click="showLihgtPercent('shuxie')"
|
||||
:class="formData.lightCurr=='shuxie'?'active':'noActive'">亮度</text>
|
||||
:class="formData.lightCurr=='shuxie'?'active':'noActive'">亮度</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="lightMode">
|
||||
<view class="item" @click="lightSetting('shuxie')" @longpress="showLihgtPercent('shuxie')"
|
||||
:class="formData.lightCurr=='shuxie'?'active':''">
|
||||
:class="formData.lightCurr=='shuxie'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='shuxie'?'/static/images/6331/shuxieActive.png':'/static/images/6331/shuXie.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='shuxie'?'/static/images/6331/shuxieActive.png':'/static/images/6331/shuXie.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">书写</view>
|
||||
</view>
|
||||
<view class="item" @click="lightSetting('work')" :class="formData.lightCurr=='work'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='work'?'/static/images/6331/workActive.png':'/static/images/6331/work.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='work'?'/static/images/6331/workActive.png':'/static/images/6331/work.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">工作光</view>
|
||||
</view>
|
||||
<view class="item" @click="lightSetting('jieN')" :class="formData.lightCurr=='jieN'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='jieN'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='jieN'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">节能光</view>
|
||||
</view>
|
||||
@ -130,7 +130,7 @@
|
||||
</view>
|
||||
|
||||
<view class="mode fleft marginLeft noMargintop" :class="formData.cMode?'active':''"
|
||||
v-on:click.stop="audioManage()">
|
||||
v-on:click.stop="audioManage()">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6331/upload.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
@ -173,11 +173,11 @@
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :showSlot="Status.Pop.showSlot">
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" :showSlot="Status.Pop.showSlot">
|
||||
|
||||
<view :class="Status.showLightingSet?'':'displayNone'">
|
||||
<view class="slideTitle">
|
||||
@ -186,8 +186,8 @@
|
||||
</view>
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600"
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -199,8 +199,8 @@
|
||||
</view>
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="100" step="1" :disabled="false" :value="formData.volume" activeColor="#bbe600"
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChange" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -209,7 +209,7 @@
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@btnClick="btnClick">
|
||||
<view>
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
@ -221,7 +221,7 @@
|
||||
|
||||
<global-loading ref="loading" />
|
||||
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -236,7 +236,15 @@
|
||||
} from '@/utils/loading.js'
|
||||
import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
import usrApi from '@/api/670/HBY670.js'
|
||||
import usrApi from '@/api/670/HBY670.js';
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
const pagePath = "pages/6331/BJQ6331";
|
||||
|
||||
var ble = null;
|
||||
@ -401,7 +409,10 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
these.formData.deviceId = f.deviceId;
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
these.setBleFormData();
|
||||
these.getDetail();
|
||||
|
||||
@ -420,7 +431,10 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -452,7 +466,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
let play = () => {
|
||||
alert('正在播放中');
|
||||
}
|
||||
this.showPop({
|
||||
showPop({
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
@ -469,7 +483,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
modelValue: '',
|
||||
visibleClose: true,
|
||||
okCallback: play
|
||||
});
|
||||
},these);
|
||||
},
|
||||
audioManage() { //语音管理
|
||||
uni.navigateTo({
|
||||
@ -594,12 +608,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
|
||||
ble.sendHexs(f.deviceId, array, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
});
|
||||
|
||||
},
|
||||
@ -670,7 +684,8 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -734,7 +749,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -762,7 +777,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -10,17 +10,17 @@
|
||||
<view slot="right">
|
||||
<view class="navbarRight center">
|
||||
<view class="imgContent" :class="{'visibilityHidden':Status.apiType!=item.apiType}"
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
<image class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<view class="baber" v-if="item.math">{{item.math>9?'9+':item.math}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</uni-nav-bar>
|
||||
|
||||
|
||||
<view class="eq">
|
||||
<view class="leftImg" @click.stop="previewImg(device.devicePic?device.devicePic:formData.img)">
|
||||
<image class="img" :src="device.devicePic?device.devicePic:formData.img" mode="aspectFit"></image>
|
||||
@ -78,19 +78,19 @@
|
||||
|
||||
<view class="modeSetting">
|
||||
<view class="item" :class="formData.modeCurr=='smalllow'?'active':''"
|
||||
@click="MainModeSetting('smalllow','staticBattery')">
|
||||
@click="MainModeSetting('smalllow','staticBattery')">
|
||||
<view class="p100 center">前置</view>
|
||||
</view>
|
||||
<view class="item" :class="formData.modeCurr=='low'?'active':''"
|
||||
@click="MainModeSetting('low','staticBattery')">
|
||||
@click="MainModeSetting('low','staticBattery')">
|
||||
<view class="p100 center">低档</view>
|
||||
</view>
|
||||
<view class="item " :class="formData.modeCurr=='center'?'active':''"
|
||||
@click="MainModeSetting('center','staticBattery')">
|
||||
@click="MainModeSetting('center','staticBattery')">
|
||||
<view class="p100 center">中档</view>
|
||||
</view>
|
||||
<view class="item " :class="formData.modeCurr=='hight'?'active':''"
|
||||
@click="MainModeSetting('hight','staticBattery')">
|
||||
@click="MainModeSetting('hight','staticBattery')">
|
||||
<view class="p100 center">高档</view>
|
||||
</view>
|
||||
|
||||
@ -98,9 +98,9 @@
|
||||
|
||||
|
||||
<!-- <view class="item " :class="formData.modeCurr=='close'?'active':''"
|
||||
@click="MainModeSetting('close','staticBattery')">
|
||||
<view class="p100 center">关闭</view>
|
||||
</view> -->
|
||||
@click="MainModeSetting('close','staticBattery')">
|
||||
<view class="p100 center">关闭</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="lampMode">
|
||||
<view class="mode fleft" :class="formData.cMode?'active':''" v-on:click.stop="LampToggle()">
|
||||
@ -114,7 +114,7 @@
|
||||
</view>
|
||||
|
||||
<view class="mode marginLeft fleft" :class="formData.cMode=='mode'?'':'active'"
|
||||
v-on:click.stop="ShowUpload()">
|
||||
v-on:click.stop="ShowUpload()">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/open.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
@ -177,17 +177,11 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle"
|
||||
v-model="Status.Pop.modelValue" @closePop="closePop" />
|
||||
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@btnClick="btnClick">
|
||||
<view>
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
@ -198,6 +192,7 @@
|
||||
</BottomSlideMenuPlus>
|
||||
|
||||
<global-loading ref="loading" />
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -213,7 +208,15 @@
|
||||
} from '@/utils/loading.js'
|
||||
import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
import usrApi from '@/api/670/HBY670.js'
|
||||
import usrApi from '@/api/670/HBY670.js';
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
const pagePath = "/pages/650/HBY650";
|
||||
|
||||
var ble = null;
|
||||
@ -234,24 +237,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
},
|
||||
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
|
||||
},
|
||||
|
||||
BottomMenu: {
|
||||
show: false,
|
||||
showHeader: true,
|
||||
@ -404,7 +390,10 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
these.formData.bleStatu='connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
these.setBleFormData();
|
||||
console.error("222222");
|
||||
these.getDetail();
|
||||
@ -425,7 +414,10 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -466,6 +458,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex=>{
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -569,7 +562,8 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -655,12 +649,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}
|
||||
|
||||
if (these.formData.iswarn) {
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "环境存在漏电电源",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/warnning.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
}
|
||||
|
||||
these.setBleFormData();
|
||||
@ -733,14 +727,14 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -813,12 +807,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
console.log("发送成功了");
|
||||
}).catch((ex) => {
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: ex.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
|
||||
}).finally(() => {
|
||||
|
||||
@ -838,7 +832,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
},
|
||||
showBleUnConnect() {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -866,19 +860,19 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
LampToggle: function() {
|
||||
if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
this.formData.cMode = !this.formData.cMode;
|
||||
@ -932,11 +926,11 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
if (currentPacket > totalPackets) {
|
||||
hideLoading(these);
|
||||
these.Status.BottomMenu.show = false;
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: "上传成功",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png",
|
||||
});
|
||||
},these);
|
||||
if (!ReSendNo) {
|
||||
setTimeout(() => {
|
||||
these.HoldYouHand("transmit complete", 0, f
|
||||
@ -1005,23 +999,23 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
})
|
||||
currentPacket++;
|
||||
|
||||
setTimeout(sendNextPacket, 0);
|
||||
setTimeout(sendNextPacket, 80);
|
||||
}).catch(err => {
|
||||
console.log("发送数据包失败了" + JSON.stringify(err));
|
||||
if (err.code == '10007') {
|
||||
setTimeout(sendNextPacket, 0);
|
||||
setTimeout(sendNextPacket, 500);
|
||||
return;
|
||||
}
|
||||
these.Status.BottomMenu.show = false;
|
||||
|
||||
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
hideLoading(these);
|
||||
reject(err);
|
||||
});
|
||||
@ -1037,12 +1031,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
sendNextPacket();
|
||||
}).catch((err) => {
|
||||
console.log("握手没有成功");
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
hideLoading(these);
|
||||
reject(err);
|
||||
});
|
||||
@ -1114,11 +1108,11 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}
|
||||
these.Status.BottomMenu.show = false;
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: "上传成功",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
|
||||
});
|
||||
},these);
|
||||
|
||||
|
||||
|
||||
@ -1188,14 +1182,14 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
these.Status.BottomMenu.show = false;
|
||||
hideLoading(these);
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: err.msg + ",发送失败了",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "确定",
|
||||
iconUrl: "/static/images/common/uploadErr.png"
|
||||
});
|
||||
},these);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
@ -1290,23 +1284,23 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
console.log("服务器未返回正确的数据");
|
||||
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "与服务器连接出现异常,请检查网络设置",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
}
|
||||
|
||||
}).catch((ex) => {
|
||||
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "出现异常," + ex.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
})
|
||||
}
|
||||
let f = these.getDevice();
|
||||
@ -1373,14 +1367,14 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
if (!this.permissions.includes('3') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
//上传开机画面
|
||||
@ -1422,84 +1416,19 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
this.Status.BottomMenu.activeIndex = index;
|
||||
|
||||
},
|
||||
closePop: function() {
|
||||
this.Status.Pop.showPop = false;
|
||||
|
||||
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) {
|
||||
hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
|
||||
sendUsr: function(ReSendNo) {
|
||||
|
||||
if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1543,7 +1472,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
}
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
@ -1559,7 +1488,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: true
|
||||
});
|
||||
},these);
|
||||
these.setBleFormData();
|
||||
|
||||
|
||||
@ -1617,12 +1546,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
setTimeout(sendNextPacket, 0);
|
||||
}).catch(err => {
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "文字发送失败," + err.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
}).finally(() => {
|
||||
hideLoading(these);
|
||||
});
|
||||
@ -1651,12 +1580,12 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
}).catch((ex) => {
|
||||
console.log("握手没有成功", ex);
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: ex.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
});
|
||||
}, 0);
|
||||
|
||||
|
||||
@ -1,22 +1,24 @@
|
||||
<template>
|
||||
<view class="content contentBg">
|
||||
<uni-nav-bar :border="false" @clickLeft="prevPage" fixed="true" statusBar="true"
|
||||
background-color="#121212" color="#FFFFFF" :title="Status.navbar.title">
|
||||
<template v-slot:left><view>
|
||||
<uni-icons type="left" size="24" color="#FFFFFF"></uni-icons>
|
||||
</view></template>
|
||||
<uni-nav-bar :border="false" @clickLeft="prevPage" fixed="true" statusBar="true"
|
||||
background-color="#121212" color="#FFFFFF" :title="Status.navbar.title">
|
||||
<template v-slot:left>
|
||||
<view>
|
||||
<uni-icons type="left" size="24" color="#FFFFFF"></uni-icons>
|
||||
</view>
|
||||
</template>
|
||||
<block slot="right">
|
||||
<view class="navbarRight center">
|
||||
<image @click.stop="handleRightClick(index,item)" v-for="item,index in Status.navbar.icons" class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<image @click.stop="handleRightClick(index,item)" v-for="item,index in Status.navbar.icons" class="img" :src="item.src" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
||||
|
||||
</block>
|
||||
</uni-nav-bar>
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="eq" >
|
||||
|
||||
|
||||
|
||||
<view class="eq">
|
||||
<view class="leftImg" @click.stop="previewImg(device.devicePic?device.devicePic:formData.img)">
|
||||
<image class="img" :src="device.devicePic?device.devicePic:formData.img" mode="aspectFit"></image>
|
||||
</view>
|
||||
@ -55,7 +57,7 @@
|
||||
<text class="lbl">蓝牙名称</text>
|
||||
<text class="value valueFont">{{device.bluetoothName}}</text>
|
||||
</view>
|
||||
<view class="item" @click.top="bleStatuToggle">
|
||||
<view class="item" @click.top="bleStatuToggle">
|
||||
<text class="lbl">蓝牙状态</text>
|
||||
<text class="value" :class="formData.bleStatu?'green':'red'">{{getbleStatu}}</text>
|
||||
</view>
|
||||
@ -80,7 +82,7 @@
|
||||
|
||||
<view style="width:80%;float: right;text-align: right;" class="valueFont">
|
||||
<uni-icons type="location" size="17" color="rgba(255, 255, 255, 0.8)"
|
||||
style="vertical-align: bottom;" />
|
||||
style="vertical-align: bottom;" />
|
||||
{{formData.address}}
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
@ -114,19 +116,19 @@
|
||||
</view>
|
||||
<view class="modeSetting">
|
||||
<view class="item" :class="formData.modeCurr=='low'?'active':''"
|
||||
@click="GearSetting('low','staticBattery')">
|
||||
@click="GearSetting('low','staticBattery')">
|
||||
<view class="p100 center">低档</view>
|
||||
</view>
|
||||
<view class="item " :class="formData.modeCurr=='center'?'active':''"
|
||||
@click="GearSetting('center','staticBattery')">
|
||||
@click="GearSetting('center','staticBattery')">
|
||||
<view class="p100 center">中档</view>
|
||||
</view>
|
||||
<view class="item " :class="formData.modeCurr=='hight'?'active':''"
|
||||
@click="GearSetting('hight','staticBattery')">
|
||||
@click="GearSetting('hight','staticBattery')">
|
||||
<view class="p100 center">高档</view>
|
||||
</view>
|
||||
<view class="item " :class="formData.modeCurr=='close'?'active':''"
|
||||
@click="GearSetting('close','staticBattery')">
|
||||
@click="GearSetting('close','staticBattery')">
|
||||
<view class="p100 center">关闭</view>
|
||||
</view>
|
||||
|
||||
@ -138,18 +140,19 @@
|
||||
<view class="item" @click="sosSetting('sg')" :class="formData.SOS=='sg'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.SOS=='sg'?'/static/images/670/sgActive.png':'/static/images/670/sg.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.SOS=='sg'?'/static/images/670/sgActive.png':'/static/images/670/sg.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view :class="(formData.qzwarn && Status.staticWarn.time)?'':'displayNone'">
|
||||
报警中{{Status.staticWarn.time}}</view>
|
||||
报警中{{Status.staticWarn.time}}
|
||||
</view>
|
||||
<view :class="(formData.qzwarn && Status.staticWarn.time)?'displayNone':''" class="txt">声光报警</view>
|
||||
</view>
|
||||
<view class="item" @click="sosSetting('rb')" :class="formData.SOS=='rb'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.SOS=='rb'?'/static/images/670/rbActive.png':'/static/images/670/rb.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.SOS=='rb'?'/static/images/670/rbActive.png':'/static/images/670/rb.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">红蓝闪烁</view>
|
||||
</view>
|
||||
@ -161,24 +164,24 @@
|
||||
<view class="item" @click="lightSetting('qiang')" :class="formData.lightCurr=='qiang'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='qiang'?'/static/images/670/qiangActive.png':'/static/images/670/qiang.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='qiang'?'/static/images/670/qiangActive.png':'/static/images/670/qiang.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">强光</view>
|
||||
</view>
|
||||
<view class="item" @click="lightSetting('ruo')" :class="formData.lightCurr=='ruo'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='ruo'?'/static/images/670/ruoActive.png':'/static/images/670/ruo.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='ruo'?'/static/images/670/ruoActive.png':'/static/images/670/ruo.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">弱光</view>
|
||||
</view>
|
||||
<view class="item" @click="lightSetting('close')" :class="formData.lightCurr=='close'?'active':''">
|
||||
<view class="imgContent center">
|
||||
<image class="img"
|
||||
:src="formData.lightCurr=='close'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
|
||||
mode="aspectFit"></image>
|
||||
:src="formData.lightCurr=='close'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'"
|
||||
mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt">关闭</view>
|
||||
</view>
|
||||
@ -230,7 +233,7 @@
|
||||
|
||||
<view class="item">
|
||||
<input maxlength="16" class="value" style="text-indent: 20rpx;" v-model="formData.msgTxt"
|
||||
placeholder="请输入文字" placeholder-class="usrplace" />
|
||||
placeholder="请输入文字" placeholder-class="usrplace" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -267,18 +270,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" @closePop="closePop" @cancelPop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
|
||||
:promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" :showCancel="Status.Pop.showCancel"
|
||||
:buttonCancelText="Status.Pop.buttonCancelText" />
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@btnClick="btnClick">
|
||||
<view>
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
@ -288,7 +283,17 @@
|
||||
</view>
|
||||
</BottomSlideMenuPlus>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" @closePop="closePop" @cancelPop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
|
||||
:promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" :showCancel="Status.Pop.showCancel"
|
||||
:buttonCancelText="Status.Pop.buttonCancelText" />
|
||||
|
||||
<global-loading ref="loading" />
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -306,7 +311,14 @@
|
||||
} from '@/utils/loading.js'
|
||||
import request, { baseURL } from '@/utils/request.js';
|
||||
import lnglatConvert from '@/utils/wgs84_to_gcj02.js';
|
||||
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
const pagePath = "/pages/670/HBY670";
|
||||
var ble = null;
|
||||
var these = null;
|
||||
@ -336,28 +348,28 @@
|
||||
time: 0,
|
||||
inteval: null
|
||||
},
|
||||
Pop: {
|
||||
showPop: false, //是否显示弹窗
|
||||
Pop: {
|
||||
showPop: false, //是否显示弹窗
|
||||
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
|
||||
iconUrl: '',
|
||||
message: '您确定要这样做吗?',
|
||||
buttonText: '确定',
|
||||
showCancel: false,
|
||||
buttonCancelText: '取消',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '设备名称',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null
|
||||
},
|
||||
iconUrl: '',
|
||||
message: '您确定要这样做吗?',
|
||||
buttonText: '确定',
|
||||
showCancel: false,
|
||||
buttonCancelText: '取消',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '设备名称',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null
|
||||
},
|
||||
BottomMenu: {
|
||||
show: false,
|
||||
showHeader: true,
|
||||
@ -490,8 +502,8 @@
|
||||
recei = BleReceive.getBleReceive();
|
||||
ble = BleTool.getBleTool();
|
||||
this.$watch("formData.battary", (newVal, oldVal) => {
|
||||
if (newVal <= 20 && this.formData.sta_system==2) {
|
||||
this.showMsg("设备电量低");
|
||||
if (newVal <= 20 && this.formData.sta_system == 2) {
|
||||
MsgError("设备电量低",'',these);
|
||||
}
|
||||
});
|
||||
|
||||
@ -555,7 +567,10 @@
|
||||
these.formData.bleStatu='connecting';
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
});
|
||||
|
||||
},
|
||||
@ -568,7 +583,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
onHide: function() {
|
||||
@ -615,6 +633,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex=>{
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -693,7 +712,8 @@
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -715,7 +735,7 @@
|
||||
if (this.Status.bleLinkCnt > 3) {
|
||||
return;
|
||||
}
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备,取消" + (4 - this.Status.bleLinkCnt) + "次后不再提醒",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
@ -747,7 +767,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},these);
|
||||
},
|
||||
gotoMap() {
|
||||
let promise = lnglatConvert.wgs84_to_gcj02(this.formData.Lon, this.formData.Lat);
|
||||
@ -943,11 +963,11 @@
|
||||
// }
|
||||
if (keys.indexOf('sta_BreakNews') > -1) { //紧急通知
|
||||
if(json.sta_BreakNews=='I get it'){
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: "用户已确认收到紧急通知",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
|
||||
});
|
||||
},these);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1129,14 +1149,14 @@
|
||||
msgs.push("设备静止报警中");
|
||||
}
|
||||
if (msgs.length > 0) {
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: msgs.join(";"),
|
||||
iconUrl: "/static/images/6155/DeviceDetail/warnning.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "确定",
|
||||
clickEvt: "staticWarn"
|
||||
});
|
||||
},these);
|
||||
}
|
||||
|
||||
|
||||
@ -1169,14 +1189,14 @@
|
||||
lightSetting: function(type) {
|
||||
if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
if (this.formData.lightCurr == type) {
|
||||
@ -1212,12 +1232,12 @@
|
||||
console.log("4g发送成功");
|
||||
}).catch((ex) => {
|
||||
console.log("ex=", ex);
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
|
||||
}).finally(() => {
|
||||
hideLoading(these);
|
||||
@ -1260,9 +1280,10 @@
|
||||
CloseWarn: function(ispop) { //解除强制报警
|
||||
let closeEvt = () => {
|
||||
|
||||
these.Status.Pop.showPop = false;
|
||||
|
||||
|
||||
these.formData.qzwarn = false;
|
||||
these.Status.staticWarn.inteval=null
|
||||
clearInterval(these.Status.staticWarn.inteval);
|
||||
|
||||
let requestCloseSOS = () => {
|
||||
@ -1276,12 +1297,12 @@
|
||||
|
||||
}).catch((ex) => {
|
||||
console.log("ex=", ex);
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
|
||||
}).finally(() => {
|
||||
hideLoading(these);
|
||||
@ -1352,20 +1373,20 @@
|
||||
this.Status.Pop.okCallback = null;
|
||||
},
|
||||
clickEvt: 'time'
|
||||
});
|
||||
},these);
|
||||
},
|
||||
sosSetting: function(type) {
|
||||
debugger;
|
||||
if (!this.permissions.includes('42') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1374,9 +1395,7 @@
|
||||
type = "close";
|
||||
}
|
||||
|
||||
showLoading(this, {
|
||||
text: "请稍候..."
|
||||
});
|
||||
|
||||
let task = () => {
|
||||
|
||||
let dic = {
|
||||
@ -1432,12 +1451,12 @@
|
||||
}
|
||||
}).catch((ex) => {
|
||||
console.log("ex=", ex);
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
|
||||
}).finally(() => {
|
||||
hideLoading(these);
|
||||
@ -1484,7 +1503,11 @@
|
||||
}
|
||||
|
||||
let OpenSOS = () => {
|
||||
showLoading(this, {
|
||||
text: "请稍候..."
|
||||
});
|
||||
let execSos = () => {
|
||||
|
||||
these.formData.qzwarn = true; //标记为强制报警了
|
||||
|
||||
these.Status.staticWarn.time = 180;
|
||||
@ -1550,17 +1573,18 @@
|
||||
} else if (type == 'sg') //强制报警
|
||||
{
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '确定开启声光报警模式?',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: OpenSOS,
|
||||
buttonText: "开启"
|
||||
});
|
||||
},these);
|
||||
return;
|
||||
} else if (type == 'close') {
|
||||
|
||||
console.log("this.formData.SOS=",this.formData.SOS);
|
||||
console.log("inteval=",this.Status.staticWarn.inteval);
|
||||
if (this.formData.SOS = 'sg' && this.Status.staticWarn.inteval) { //解除声光报警
|
||||
this.CloseWarn(true);
|
||||
} else {
|
||||
@ -1578,14 +1602,14 @@
|
||||
GearSetting: function(type) { //档位设置
|
||||
if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
if (this.formData.modeCurr == type) {
|
||||
@ -1620,12 +1644,12 @@
|
||||
console.log("4g发送成功");
|
||||
}).catch((ex) => {
|
||||
console.log("ex=", ex)
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
|
||||
}).finally(() => {
|
||||
hideLoading(these);
|
||||
@ -1676,14 +1700,14 @@
|
||||
proDetail: function(type) {
|
||||
if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
@ -1706,21 +1730,21 @@
|
||||
deviceImei: these.device.deviceImei
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: "上传成功",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png",
|
||||
});
|
||||
},these);
|
||||
resolve();
|
||||
return;
|
||||
} else {
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: res.errMsg ? res.errMsg : "未知的原因上传失败了",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
reject(res);
|
||||
}
|
||||
}).catch((ex) => {
|
||||
@ -1752,11 +1776,11 @@
|
||||
if (currentPacket > totalPackets) {
|
||||
hideLoading(these);
|
||||
these.Status.BottomMenu.show = false;
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: "上传成功",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png",
|
||||
});
|
||||
},these);
|
||||
if (!ReSendNo) {
|
||||
setTimeout(() => {
|
||||
these.HoldYouHand("transmit complete", 0, f
|
||||
@ -1826,11 +1850,11 @@
|
||||
});
|
||||
currentPacket++;
|
||||
|
||||
setTimeout(sendNextPacket, 0);
|
||||
setTimeout(sendNextPacket, 80);
|
||||
}).catch(err => {
|
||||
console.log("发送数据包失败了" + JSON.stringify(err));
|
||||
if (err.code == '10007') {
|
||||
setTimeout(sendNextPacket, 0);
|
||||
setTimeout(sendNextPacket, 500);
|
||||
return;
|
||||
} else {
|
||||
updateLoading(these, {
|
||||
@ -1839,7 +1863,7 @@
|
||||
sendImgByRequest().then(resolve).catch(reject);
|
||||
}
|
||||
// these.Status.BottomMenu.show = false;
|
||||
// these.showPop({
|
||||
// showPop({
|
||||
// message: err.msg,
|
||||
// iconUrl: "/static/images/common/uploadErr.png",
|
||||
// borderColor: "#e034344d",
|
||||
@ -1937,11 +1961,11 @@
|
||||
}
|
||||
these.Status.BottomMenu.show = false;
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: "上传成功",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png"
|
||||
});
|
||||
},these);
|
||||
|
||||
|
||||
|
||||
@ -1989,7 +2013,7 @@
|
||||
|
||||
|
||||
|
||||
let inteval = 30;
|
||||
let inteval = 50;
|
||||
console.log("开始发送一段视频"); //
|
||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
|
||||
.wirteCharactId, 10).then(() => {
|
||||
@ -2013,14 +2037,14 @@
|
||||
these.Status.BottomMenu.show = false;
|
||||
hideLoading(these);
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true,
|
||||
message: err.msg + ",发送失败了",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "确定",
|
||||
iconUrl: "/static/images/common/uploadErr.png"
|
||||
});
|
||||
},these);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
@ -2117,23 +2141,23 @@
|
||||
console.log("服务器未返回正确的数据", arr);
|
||||
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "与服务器连接出现异常,请检查网络设置",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
}
|
||||
|
||||
}).catch((ex) => {
|
||||
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "出现异常," + ex.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
})
|
||||
}
|
||||
|
||||
@ -2199,14 +2223,14 @@
|
||||
ShowUpload: function() {
|
||||
if (!this.permissions.includes('3') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
//上传开机画面
|
||||
@ -2248,86 +2272,86 @@
|
||||
this.Status.BottomMenu.activeIndex = index;
|
||||
|
||||
},
|
||||
HidePop: function() {
|
||||
if (this.Status.Pop.clickEvt == 'staticWarn') {
|
||||
// this.Status.staticWarnTime=0;
|
||||
// clearInterval(this.Status.staticWarn.inteval);
|
||||
// this.formData.staticWarn=false;
|
||||
}
|
||||
if (this.Status.Pop.okCallback) {
|
||||
console.log("执行点击按钮回调");
|
||||
this.Status.Pop.okCallback();
|
||||
}
|
||||
HidePop: function () {
|
||||
if (this.Status.Pop.clickEvt == 'staticWarn') {
|
||||
// this.Status.staticWarnTime=0;
|
||||
// clearInterval(this.Status.staticWarn.inteval);
|
||||
// this.formData.staticWarn=false;
|
||||
}
|
||||
if (this.Status.Pop.okCallback) {
|
||||
console.log("执行点击按钮回调");
|
||||
this.Status.Pop.okCallback();
|
||||
}
|
||||
|
||||
this.Status.Pop.showPop = false;
|
||||
},
|
||||
closePop: function() {
|
||||
this.Status.Pop.showPop = false;
|
||||
this.Status.Pop.showPop = false;
|
||||
},
|
||||
closePop: function () {
|
||||
this.Status.Pop.showPop = false;
|
||||
|
||||
if (this.Status.Pop.cancelCallback) {
|
||||
this.Status.Pop.cancelCallback();
|
||||
}
|
||||
},
|
||||
showPop: function(option) {
|
||||
hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
if (this.Status.Pop.cancelCallback) {
|
||||
this.Status.Pop.cancelCallback();
|
||||
}
|
||||
},
|
||||
showPop: function (option) {
|
||||
hideLoading(this);
|
||||
let def = {
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
borderColor: '#BBE600',
|
||||
textColor: '#ffffffde',
|
||||
buttonBgColor: '#BBE600',
|
||||
buttonTextColor: '#232323DE',
|
||||
iconUrl: '',
|
||||
message: '',
|
||||
buttonText: '确定',
|
||||
clickEvt: '',
|
||||
visiblePrompt: false,
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: false,
|
||||
okCallback: null,
|
||||
showSlot: false,
|
||||
buttonCancelText: '',
|
||||
showCancel: false,
|
||||
}
|
||||
|
||||
let keys = Object.keys(def);
|
||||
let keys = Object.keys(def);
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
if (key in option) {
|
||||
continue;
|
||||
}
|
||||
this.Status.Pop[key] = def[key];
|
||||
}
|
||||
if (option) {
|
||||
keys = Object.keys(option);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
this.Status.Pop[key] = option[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
if (!option.borderColor) {
|
||||
option.borderColor = '#BBE600';
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
sendUsr: function(ReSendNo) {
|
||||
|
||||
if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2343,7 +2367,7 @@
|
||||
code: this.formData.usrid
|
||||
};
|
||||
api.sendUsr(json).then((res) => {
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
@ -2359,15 +2383,15 @@
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: true
|
||||
});
|
||||
},these);
|
||||
these.setBleFormData();
|
||||
}).catch((ex) => {
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: "文字发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
}).finally(() => {
|
||||
hideLoading(these);
|
||||
});
|
||||
@ -2415,7 +2439,7 @@
|
||||
|
||||
}
|
||||
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
@ -2431,7 +2455,7 @@
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: true
|
||||
});
|
||||
},these);
|
||||
these.setBleFormData();
|
||||
hideLoading(these);
|
||||
|
||||
@ -2522,7 +2546,7 @@
|
||||
requestSend();
|
||||
// console.log("握手没有成功", ex);
|
||||
// hideLoading(these);
|
||||
// these.showPop({
|
||||
// showPop({
|
||||
// message: ex.msg,
|
||||
// iconUrl: "/static/images/common/uploadErr.png",
|
||||
// borderColor: "#e034344d",
|
||||
@ -2538,14 +2562,14 @@
|
||||
|
||||
if (!this.permissions.includes('5') && this.Status.apiType !== 'listA') {
|
||||
|
||||
this.showPop({
|
||||
showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
buttonText: "确定"
|
||||
})
|
||||
},these)
|
||||
return;
|
||||
}
|
||||
if (!this.formData.msgTxt) {
|
||||
@ -2573,7 +2597,7 @@
|
||||
}).then((res) => {
|
||||
console.log("res=", res)
|
||||
if (res.code == 200) {
|
||||
these.showPop({
|
||||
showPop({
|
||||
showPop: true, //是否显示弹窗
|
||||
popType: 'custom',
|
||||
bgColor: '#383934bd',
|
||||
@ -2589,7 +2613,7 @@
|
||||
promptTitle: '',
|
||||
modelValue: '',
|
||||
visibleClose: true
|
||||
});
|
||||
},these);
|
||||
|
||||
// clearInterval(this.Status.msgOkIntval);
|
||||
|
||||
@ -2605,12 +2629,12 @@
|
||||
|
||||
|
||||
} else {
|
||||
these.showPop({
|
||||
showPop({
|
||||
message: res.msg,
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
},these);
|
||||
}
|
||||
}).finally(() => {
|
||||
hideLoading(this);
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<view slot="right">
|
||||
<view class="navbarRight center">
|
||||
<view class="imgContent" :class="{'visibilityHidden':Status.apiType!=item.apiType}"
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
@click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons">
|
||||
<image class="img" :src="item.src" mode="aspectFit"></image>
|
||||
<view class="baber" v-if="item.math">{{item.math>9?'9+':item.math}}</view>
|
||||
</view>
|
||||
@ -73,8 +73,8 @@
|
||||
|
||||
<view class="slider-container">
|
||||
<slider min="1" max="100" step="1" :disabled="false" :value="formData.liangDu" activeColor="#bbe600"
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChanging" class="custom-slider" />
|
||||
backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange"
|
||||
@changing="sliderChanging" class="custom-slider" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -89,14 +89,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mode marginLeft fleft" v-on:click.stop="ModeSetting('fu')">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/fuLamp.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
<text class="bigTxt">辅灯模式</text>
|
||||
<text class="smallTxt">泛光模式</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/fuLamp.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="rightTxt">
|
||||
<text class="bigTxt">辅灯模式</text>
|
||||
<text class="smallTxt">泛光模式</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="mode marginLeft fleft" v-on:click.stop="UploadOpenImg()">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/open.png" mode="aspectFit"></image>
|
||||
@ -114,20 +114,20 @@
|
||||
<view class="btnSend fright" v-on:click.stop="sendUsr">发送</view>
|
||||
<view class="clear"></view>
|
||||
<textToDotMatrixFor7305 class="TextToHex" ref="textToHex" :txts="formData.textLines"
|
||||
:bgColor="'#FFFFFF'" :color="'#000000'" :fontSize="13" />
|
||||
:bgColor="'#FFFFFF'" :color="'#000000'" :fontSize="13" />
|
||||
</view>
|
||||
|
||||
<view class="item">
|
||||
<text class="lbl">单位:</text>
|
||||
<input class="value" v-model="formData.inputLines[0]" placeholder="请输入单位" placeholder-class="usrplace" />
|
||||
<input class="value" maxlength="5" v-model="formData.inputLines[0]" placeholder="请输入单位" placeholder-class="usrplace" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">部门:</text>
|
||||
<input class="value" v-model="formData.inputLines[1]" placeholder="请输入姓名" placeholder-class="usrplace" />
|
||||
<input class="value" maxlength="5" v-model="formData.inputLines[1]" placeholder="请输入姓名" placeholder-class="usrplace" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="lbl">姓名:</text>
|
||||
<input class="value" v-model="formData.inputLines[2]" placeholder="请输入职位" placeholder-class="usrplace" />
|
||||
<input class="value" maxlength="5" v-model="formData.inputLines[2]" placeholder="请输入职位" placeholder-class="usrplace" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -149,17 +149,11 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗通知 -->
|
||||
<MessagePopup :visible="Status.Pop.showPop" :type="Status.Pop.popType" :bgColor="Status.Pop.bgColor"
|
||||
:borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor"
|
||||
:buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor"
|
||||
:iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText"
|
||||
@buttonClick="HidePop" @closePop="closePop" :visiblePrompt="Status.Pop.visiblePrompt"
|
||||
:promptTitle="Status.Pop.promptTitle" v-model="Status.Pop.modelValue" />
|
||||
|
||||
|
||||
<!-- 下方菜单 -->
|
||||
<BottomSlideMenuPlus :config="Status.BottomMenu" @close="closeMenu" @itemClick="handleItemClick"
|
||||
@btnClick="btnClick">
|
||||
@btnClick="btnClick">
|
||||
<view class="addIco">
|
||||
<view class="icoContent center" v-on:click.stop="checkImgUpload()">
|
||||
<image mode="aspectFit" class="img" src="/static/images/6155/DeviceDetail/add.png"></image>
|
||||
@ -169,6 +163,7 @@
|
||||
</BottomSlideMenuPlus>
|
||||
|
||||
<global-loading ref="loading" />
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -183,7 +178,14 @@
|
||||
} from '@/utils/loading.js'
|
||||
import BleReceive from '@/utils/BleReceive';
|
||||
import Common from '@/utils/Common.js';
|
||||
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgInfo
|
||||
} from '@/utils/MsgPops.js'
|
||||
var ble = null;
|
||||
var these = null;
|
||||
var BrighInteval = null;
|
||||
@ -363,7 +365,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
these.setBleFormData();
|
||||
these.getDetail();
|
||||
|
||||
@ -384,7 +389,10 @@
|
||||
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
|
||||
console.log("连接成功")
|
||||
these.formData.bleStatu = true;
|
||||
});
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -452,6 +460,7 @@
|
||||
these.formData.bleStatu = true;
|
||||
}).catch(ex => {
|
||||
these.formData.bleStatu = 'err';
|
||||
MsgError("连接错误:" + ex.msg, "确定", these);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -560,7 +569,8 @@
|
||||
}).catch(ex => {
|
||||
updateLoading(these, {
|
||||
text: ex.msg
|
||||
})
|
||||
});
|
||||
these.formData.bleStatu = 'err';
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
hideLoading(these);
|
||||
@ -1177,6 +1187,7 @@ debugger;
|
||||
option.buttonBgColor = '#BBE600';
|
||||
}
|
||||
these.Status.Pop.showPop = true;
|
||||
showPop(option,this);
|
||||
},
|
||||
sendUsr() {
|
||||
if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') {
|
||||
|
||||
@ -281,9 +281,9 @@
|
||||
return;
|
||||
}
|
||||
//无效的设备回调
|
||||
let deviceInvalid = () => {
|
||||
|
||||
these.$set(these.device, "deviceName", "");
|
||||
let deviceInvalid = () => {
|
||||
these.$set(these.device, "deviceName", "");
|
||||
|
||||
|
||||
}
|
||||
clearTimeout(this.Statu.timeInteval);
|
||||
|
||||
@ -767,6 +767,9 @@
|
||||
if (index == total) {
|
||||
console.log("连接了N次都没连上");
|
||||
reject(ex);
|
||||
updateLoading(this, {
|
||||
text: ex.msg
|
||||
})
|
||||
return;
|
||||
}
|
||||
index++;
|
||||
|
||||
@ -886,8 +886,9 @@
|
||||
ble.disconnectDevice().finally(dis => {
|
||||
|
||||
ble.StopSearch().finally(res => {
|
||||
|
||||
this.EquipMents = [];
|
||||
|
||||
setTimeout(()=>{
|
||||
this.EquipMents = [];
|
||||
this.PairEquip = [];
|
||||
ble.StartSearch().then(result => {
|
||||
|
||||
@ -895,6 +896,8 @@
|
||||
console.error("err=", err);
|
||||
MsgError("出现错误:" + err.msg, '', these);
|
||||
});
|
||||
},200);
|
||||
|
||||
}).catch(ex => {
|
||||
console.error("ex=", ex);
|
||||
MsgError("出现错误:" + ex.msg, '', these);
|
||||
@ -1023,6 +1026,9 @@
|
||||
}).catch((ex) => {
|
||||
if (index == total) {
|
||||
console.log("连接了N次都没连上");
|
||||
updateLoading(this, {
|
||||
text: ex.msg
|
||||
});
|
||||
reject(ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -252,8 +252,12 @@
|
||||
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'] //需要发送报警的类型
|
||||
showMapTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J', 'HBY008A',
|
||||
'HBY100-Y'
|
||||
], //需要显示地图的类型
|
||||
showCallPolice: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J',
|
||||
'HBY008A', 'HBY100-Y'
|
||||
] //需要发送报警的类型
|
||||
},
|
||||
isPageShow: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user