008A功能开始
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
},
|
||||
{
|
||||
"customPlaygroundType" : "local",
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
|
||||
let cfg = {
|
||||
error: {
|
||||
icoUrl: '/static/images/6155/DeviceDetail/uploadErr.png',
|
||||
icoUrl: '/static/images/common/uploadErr.png',
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434"
|
||||
},
|
||||
@ -148,6 +148,10 @@
|
||||
icoUrl: '/static/images/common/warning.png',
|
||||
borderColor: "#FFC84E",
|
||||
buttonBgColor: "#FFC84E",
|
||||
},
|
||||
info:{
|
||||
borderColor: "#BBE600",
|
||||
buttonBgColor: "#BBE600"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -429,7 +429,7 @@
|
||||
{
|
||||
"path": "pages/common/addDevice/addBle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "蓝牙添加设备"
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -453,7 +453,7 @@
|
||||
if (item.key == 'led_alarm') {
|
||||
this.showPop({
|
||||
message: '确定开启声光报警?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -467,7 +467,7 @@
|
||||
if (this.formData.sta_LedType == 'led_alarm') {
|
||||
this.showPop({
|
||||
message: '确定解除声光报警模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -657,7 +657,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -781,7 +781,7 @@
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -658,7 +658,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -993,7 +993,7 @@ onFreqChanging(e){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1045,7 +1045,7 @@ onFreqChanging(e){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1090,7 +1090,7 @@ onFreqChanging(e){
|
||||
showUnWarn(val) {
|
||||
this.showPop({
|
||||
message: '确定解除声光报警模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -1110,7 +1110,7 @@ onFreqChanging(e){
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1175,7 +1175,7 @@ onFreqChanging(e){
|
||||
} else {
|
||||
this.showPop({
|
||||
message: '确定开启强制报警?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: task,
|
||||
@ -1395,7 +1395,7 @@ onFreqChanging(e){
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -1519,7 +1519,7 @@ onFreqChanging(e){
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -758,7 +758,7 @@
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -1165,7 +1165,7 @@
|
||||
if (okCallback === undefined) {
|
||||
okCallback = null;
|
||||
}
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -598,7 +598,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -774,7 +774,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -842,7 +842,7 @@
|
||||
if (val === 'E49_on') {
|
||||
this.showPop({
|
||||
message: '确定开启联机模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -924,7 +924,7 @@
|
||||
if (val == 'status_off') {
|
||||
this.showPop({
|
||||
message: '确定关闭物体感应功能?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -950,7 +950,7 @@ debugger;
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1003,7 +1003,7 @@ debugger;
|
||||
if (item.key == 'led_alarm') {
|
||||
this.showPop({
|
||||
message: '确定开启强制报警?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -1017,7 +1017,7 @@ debugger;
|
||||
if (this.formData.sta_LedType == 'led_alarm') {
|
||||
this.showPop({
|
||||
message: '确定解除声光报警模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -1369,7 +1369,7 @@ debugger;
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -1493,7 +1493,7 @@ debugger;
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -713,7 +713,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -794,7 +794,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -857,7 +857,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -918,7 +918,7 @@
|
||||
showUnWarn(val) {
|
||||
// this.showPop({
|
||||
// message: '确定解除声光报警模式?',
|
||||
// iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
// iconUrl: "/static/images/common/uploadErr.png",
|
||||
// borderColor: "#e034344d",
|
||||
// buttonBgColor: "#E03434",
|
||||
// okCallback: () => {
|
||||
@ -940,7 +940,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -999,7 +999,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1039,7 +1039,7 @@
|
||||
let confirmTask = () => {
|
||||
this.showPop({
|
||||
message: '确定' + (this.formData.sta_SOSType === 'sos' ? '关闭' : '开启') + '声光报警模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: task,
|
||||
@ -1260,7 +1260,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -1384,7 +1384,7 @@
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -195,7 +195,7 @@
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -507,7 +507,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
showUnWarn(val) {
|
||||
this.showPop({
|
||||
message: '确定解除声光报警模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: () => {
|
||||
@ -562,7 +562,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
if (item.val === 'sos') {
|
||||
this.showPop({
|
||||
message: '确定开启声光报警模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: task,
|
||||
@ -760,7 +760,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -884,7 +884,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -774,7 +774,7 @@
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "确定",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png"
|
||||
iconUrl: "/static/images/common/uploadErr.png"
|
||||
}, these);
|
||||
reject(err);
|
||||
these.videoHexArray = null;
|
||||
@ -864,7 +864,7 @@
|
||||
if (arr[0].status == 'rejected') {
|
||||
showPop({
|
||||
message: "设备准备未就绪",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
}, these);
|
||||
@ -891,7 +891,7 @@
|
||||
|
||||
showPop({
|
||||
message: "与服务器连接出现异常,请检查网络设置",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
}, these);
|
||||
@ -902,7 +902,7 @@
|
||||
hideLoading(these);
|
||||
showPop({
|
||||
message: "出现异常," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
}, these);
|
||||
@ -974,7 +974,7 @@
|
||||
err = err.join(";");
|
||||
showPop({
|
||||
message: err,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
}, these);
|
||||
@ -1106,7 +1106,7 @@
|
||||
these.closeAction();
|
||||
showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1129,7 +1129,7 @@
|
||||
console.log("握手没有成功");
|
||||
showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1924,7 +1924,7 @@
|
||||
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
|
||||
@ -670,7 +670,7 @@
|
||||
this.showPop({
|
||||
key: key,
|
||||
message: msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: sosToggle,
|
||||
@ -841,7 +841,7 @@
|
||||
this.showPop({
|
||||
key: Common.guid(),
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -974,7 +974,7 @@
|
||||
|
||||
let cfg = {
|
||||
error: {
|
||||
icoUrl: '/static/images/6155/DeviceDetail/uploadErr.png',
|
||||
icoUrl: '/static/images/common/uploadErr.png',
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434"
|
||||
},
|
||||
|
||||
@ -698,7 +698,7 @@
|
||||
if (this.formData.battary <= 20) {
|
||||
this.showPop({
|
||||
message: "设备电量低",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -733,7 +733,7 @@
|
||||
showBleUnConnect() {
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -860,7 +860,7 @@
|
||||
these.Status.BottomMenu.show = false;
|
||||
these.showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -883,7 +883,7 @@
|
||||
console.log("握手没有成功");
|
||||
these.showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -939,7 +939,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1072,7 +1072,7 @@
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "确定",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png"
|
||||
iconUrl: "/static/images/common/uploadErr.png"
|
||||
});
|
||||
reject(err);
|
||||
these.videoHexArray = null;
|
||||
@ -1162,7 +1162,7 @@
|
||||
if (arr[0].status == 'rejected') {
|
||||
these.showPop({
|
||||
message: "设备准备未就绪",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1189,7 +1189,7 @@
|
||||
|
||||
these.showPop({
|
||||
message: "与服务器连接出现异常,请检查网络设置",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1200,7 +1200,7 @@
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
message: "出现异常," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1273,7 +1273,7 @@
|
||||
err = err.join(";");
|
||||
these.showPop({
|
||||
message: err,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1297,7 +1297,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1353,7 +1353,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1437,7 +1437,7 @@
|
||||
}).catch((ex) => {
|
||||
these.showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1546,7 +1546,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1585,7 +1585,7 @@
|
||||
if (err) {
|
||||
this.showPop({
|
||||
message: "单位、部门、姓名必须填写且最多8字",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1706,7 +1706,7 @@
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
message: "发送失败: " + (err.msg || err.message),
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1723,7 +1723,7 @@
|
||||
hideLoading(these);
|
||||
this.showPop({
|
||||
message: "发送失败: " + (ex.msg || ex.message),
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1793,7 +1793,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
|
||||
@ -678,7 +678,7 @@
|
||||
if (this.formData.battary <= 20) {
|
||||
this.showPop({
|
||||
message: "设备电量低",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -713,7 +713,7 @@
|
||||
showBleUnConnect() {
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -913,7 +913,7 @@
|
||||
these.Status.BottomMenu.show = false;
|
||||
these.showPop({
|
||||
message: "发送数据包失败了" + err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -972,7 +972,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1285,7 +1285,7 @@
|
||||
err = err.join(";");
|
||||
these.showPop({
|
||||
message: err,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1362,7 +1362,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1442,7 +1442,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1522,7 +1522,7 @@
|
||||
}).catch((ex) => {
|
||||
these.showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1632,7 +1632,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1658,7 +1658,7 @@
|
||||
if (err) {
|
||||
this.showPop({
|
||||
message: "单位、部门、姓名必须填写且最多7字",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1756,7 +1756,7 @@
|
||||
hideLoading(these);
|
||||
this.showPop({
|
||||
message: "发送失败: " + (ex.msg || ex.message),
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1798,7 +1798,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
|
||||
@ -514,7 +514,7 @@
|
||||
|
||||
showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -1272,7 +1272,7 @@
|
||||
|
||||
showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
}, these);
|
||||
@ -1295,7 +1295,7 @@
|
||||
console.log("握手没有成功");
|
||||
showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
}, these);
|
||||
|
||||
@ -596,7 +596,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
ble.sendHexs(f.deviceId, array, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
|
||||
these.showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -736,7 +736,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
|
||||
@ -735,7 +735,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -815,7 +815,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
these.showPop({
|
||||
message: ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -840,7 +840,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -873,7 +873,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1025,7 +1025,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
these.showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1046,7 +1046,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
console.log("握手没有成功");
|
||||
these.showPop({
|
||||
message: err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1201,7 +1201,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "确定",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png"
|
||||
iconUrl: "/static/images/common/uploadErr.png"
|
||||
});
|
||||
reject(err);
|
||||
return;
|
||||
@ -1299,7 +1299,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
these.showPop({
|
||||
message: "与服务器连接出现异常,请检查网络设置",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1310,7 +1310,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
message: "出现异常," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1382,7 +1382,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1501,7 +1501,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1626,7 +1626,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
|
||||
these.showPop({
|
||||
message: "文字发送失败," + err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1660,7 +1660,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
message: ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
|
||||
@ -717,7 +717,7 @@
|
||||
}
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备,取消" + (4 - this.Status.bleLinkCnt) + "次后不再提醒",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -1171,7 +1171,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1214,7 +1214,7 @@
|
||||
console.log("ex=", ex);
|
||||
these.showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1278,7 +1278,7 @@
|
||||
console.log("ex=", ex);
|
||||
these.showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1341,7 +1341,7 @@
|
||||
showHeader: true,
|
||||
headerTxt: "强制报警",
|
||||
message: message,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "解除报警",
|
||||
@ -1360,7 +1360,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1434,7 +1434,7 @@
|
||||
console.log("ex=", ex);
|
||||
these.showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1552,7 +1552,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '确定开启声光报警模式?',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: OpenSOS,
|
||||
@ -1580,7 +1580,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1622,7 +1622,7 @@
|
||||
console.log("ex=", ex)
|
||||
these.showPop({
|
||||
message: "通信异常,请检查手机或设备网络",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1678,7 +1678,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1717,7 +1717,7 @@
|
||||
|
||||
these.showPop({
|
||||
message: res.errMsg ? res.errMsg : "未知的原因上传失败了",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1847,7 +1847,7 @@
|
||||
// these.Status.BottomMenu.show = false;
|
||||
// these.showPop({
|
||||
// message: err.msg,
|
||||
// iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
// iconUrl: "/static/images/common/uploadErr.png",
|
||||
// borderColor: "#e034344d",
|
||||
// buttonBgColor: "#E03434",
|
||||
// });
|
||||
@ -2025,7 +2025,7 @@
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: "确定",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png"
|
||||
iconUrl: "/static/images/common/uploadErr.png"
|
||||
});
|
||||
reject(err);
|
||||
return;
|
||||
@ -2125,7 +2125,7 @@
|
||||
|
||||
these.showPop({
|
||||
message: "与服务器连接出现异常,请检查网络设置",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -2136,7 +2136,7 @@
|
||||
hideLoading(these);
|
||||
these.showPop({
|
||||
message: "出现异常," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -2207,7 +2207,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -2328,7 +2328,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -2370,7 +2370,7 @@
|
||||
}).catch((ex) => {
|
||||
these.showPop({
|
||||
message: "文字发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -2530,7 +2530,7 @@
|
||||
// hideLoading(these);
|
||||
// these.showPop({
|
||||
// message: ex.msg,
|
||||
// iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
// iconUrl: "/static/images/common/uploadErr.png",
|
||||
// borderColor: "#e034344d",
|
||||
// buttonBgColor: "#E03434",
|
||||
// });
|
||||
@ -2546,7 +2546,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -2613,7 +2613,7 @@
|
||||
} else {
|
||||
these.showPop({
|
||||
message: res.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
|
||||
@ -620,7 +620,7 @@
|
||||
if ('battary' in json && this.formData.battary <= 20) {
|
||||
this.showPop({
|
||||
message: "设备电量低",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -656,7 +656,7 @@
|
||||
showBleUnConnect() {
|
||||
this.showPop({
|
||||
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '去连接',
|
||||
@ -766,7 +766,7 @@
|
||||
these.Status.BottomMenu.show = false;
|
||||
these.showPop({
|
||||
message: "发送数据包失败了: " + err.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -931,7 +931,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -951,7 +951,7 @@
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1081,7 +1081,7 @@
|
||||
}).catch((ex) => {
|
||||
these.showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1183,7 +1183,7 @@ debugger;
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1209,7 +1209,7 @@ debugger;
|
||||
if (err) {
|
||||
this.showPop({
|
||||
message: "单位、部门、姓名必须填写且最多5字",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1360,7 +1360,7 @@ debugger;
|
||||
} else {
|
||||
this.showPop({
|
||||
message: "出现异常发送失败",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1407,7 +1407,7 @@ debugger;
|
||||
|
||||
this.showPop({
|
||||
message: '无操作权限',
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
okCallback: null,
|
||||
@ -1439,7 +1439,7 @@ debugger;
|
||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
|
||||
these.showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
@ -1488,7 +1488,7 @@ debugger;
|
||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
|
||||
these.showPop({
|
||||
message: "发送失败," + ex.msg,
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
|
||||
@ -1,6 +1,22 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
|
||||
<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>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="topStatric">
|
||||
|
||||
|
||||
@ -10,6 +26,9 @@
|
||||
</view>
|
||||
<view class="lblTitle">
|
||||
<view>添加:{{type.typeName}} 设备数量:{{devicesCnt}}</view>
|
||||
|
||||
|
||||
|
||||
<view class="btn" style="color: #FFFFFF;" @click="ReSearch()">刷新</view>
|
||||
</view>
|
||||
<view class="lblTitle">
|
||||
@ -69,15 +88,13 @@
|
||||
</view>
|
||||
<view class="name lbl">
|
||||
设备名:
|
||||
<text class="green">{{item.device_name}}</text>
|
||||
<text class="green">{{item.device_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rightIco " :class="item.isUpload?'bggreen':'bgred'">
|
||||
|
||||
|
||||
|
||||
<!-- <image :src="isItemLink(item,index,'upload')" class="img" mode="aspectFit">
|
||||
</image> -->
|
||||
|
||||
|
||||
|
||||
@ -87,6 +104,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<global-loading ref="loading" />
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -98,19 +117,41 @@
|
||||
hideLoading,
|
||||
updateLoading
|
||||
} from '@/utils/loading.js'
|
||||
import common from '@/utils/Common.js'
|
||||
import common from '@/utils/Common.js'
|
||||
const pagePath = "pages/common/addBLE/addEquip";
|
||||
import {
|
||||
MsgSuccess,
|
||||
MsgError,
|
||||
MsgClose,
|
||||
MsgWarning,
|
||||
showPop,
|
||||
MsgClear
|
||||
} from '@/utils/MsgPops.js';
|
||||
import MQTT from '@/utils/MqHelper.js';
|
||||
|
||||
var ble = null;
|
||||
var these = null;
|
||||
var eventChannel = null;
|
||||
var time = null;
|
||||
var time1 = null;
|
||||
// var serv = null;
|
||||
var mq = null;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Status: {
|
||||
intval: null,
|
||||
pcAuthori: false,
|
||||
navbar: {
|
||||
icons: [
|
||||
|
||||
{
|
||||
src: '/static/images/common/scane.png'
|
||||
}
|
||||
],
|
||||
title: '添加设备',
|
||||
showBack: true,
|
||||
height: 90
|
||||
}
|
||||
},
|
||||
search: '',
|
||||
groupid: '',
|
||||
@ -120,7 +161,8 @@
|
||||
EquipMents: [], //搜索出来的设备
|
||||
devices: [],
|
||||
devicesCnt: 0,
|
||||
privateNetUrl: ''
|
||||
privateNetUrl: '',
|
||||
scanKey: ''
|
||||
|
||||
}
|
||||
},
|
||||
@ -137,18 +179,30 @@
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
ble.StopSearch().then(res => {
|
||||
console.log("停止搜索成功")
|
||||
}).catch(ex => {
|
||||
console.error("停止搜索成功", ex);
|
||||
});
|
||||
ble.removeAllCallback(pagePath);
|
||||
ble.disconnectDevice();
|
||||
if (ble) {
|
||||
ble.StopSearch().then(res => {
|
||||
console.log("停止搜索成功")
|
||||
}).catch(ex => {
|
||||
console.error("停止搜索成功", ex);
|
||||
});
|
||||
ble.removeAllCallback(pagePath);
|
||||
ble.disconnectDevice();
|
||||
}
|
||||
|
||||
|
||||
if (mq) {
|
||||
mq.disconnect();
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
these = this;
|
||||
|
||||
|
||||
mq = MQTT.getMqTool();
|
||||
mq.init();
|
||||
|
||||
this.groupid = common.DateFormat(new Date(), 'yyyy-MM-dd HH:mm:ss');
|
||||
these = this;
|
||||
|
||||
ble = bleTool.getBleTool();
|
||||
// serv = serTool.serverInit();
|
||||
|
||||
@ -356,12 +410,13 @@
|
||||
if (!arr[i].name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
arr[i].name=arr[i].name.replace(/\r\n/g, '').replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
arr[i].name = arr[i].name.replace(/\r\n/g, '').replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
||||
'');
|
||||
|
||||
|
||||
|
||||
let f = these.EquipMents.find(function(v, index) {
|
||||
if (v.deviceId == arr[i].deviceId) {
|
||||
these.$set(these.EquipMents[index], "RSSI", arr[i].RSSI);
|
||||
@ -381,7 +436,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
these.sendEquipToMq();
|
||||
// console.log("equip=", these.EquipMents)
|
||||
}, pagePath);
|
||||
// console.log("addEquip")
|
||||
@ -403,6 +458,7 @@
|
||||
console.log("111111");
|
||||
}
|
||||
if (f.imei) {
|
||||
f.imei = f.imei.replace(/\u0000/g, '');
|
||||
item = this.EquipMents.find((v, index) => {
|
||||
if (v.deviceId == f.deviceId) {
|
||||
v.imei = f.imei;
|
||||
@ -474,7 +530,7 @@
|
||||
|
||||
let callback = () => {
|
||||
these.getTypeDeviceCnt().then(res => {
|
||||
console.error("设备数量:",res);
|
||||
console.error("设备数量:", res);
|
||||
these.devicesCnt = res;
|
||||
if (res > 0 && res <= 10000) {
|
||||
these.getAlltypeDevices().then(devs => {
|
||||
@ -490,10 +546,28 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
callback();
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
MsgSuccess("如需要在PC上查看此数据,请复制链接后在PC端打开,然后点右上角扫码授权","复制链接",these,()=>{
|
||||
uni.setClipboardData({
|
||||
data:'https://static-mp-5b7c35fc-f6fe-4100-a2e1-3669e4d4bfc9.next.bspapp.com/AppTools/views/index.html',
|
||||
success(){
|
||||
uni.showToast({
|
||||
title:'已复制链接'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},500);
|
||||
},
|
||||
|
||||
onShow: function() {
|
||||
@ -503,65 +577,87 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
prevPage() {
|
||||
uni.navigateBack({
|
||||
|
||||
});
|
||||
},
|
||||
handleRightClick: function(s, e) {
|
||||
|
||||
this.scan();
|
||||
},
|
||||
initWatch() {
|
||||
this.$watch("devicesCnt", (newVal, oldVal) => {
|
||||
const phone = uni.getStorageSync('phone');
|
||||
mq.sendData('pc/' + phone, JSON.stringify({
|
||||
devicesCnt: this.devicesCnt
|
||||
}), false);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
//获取某个类型下的所有设备
|
||||
getAlltypeDevices() {
|
||||
return new Promise((succ, err) => {
|
||||
|
||||
let json = {
|
||||
"tenant_id": this.type.tenantId,
|
||||
"deviceType": this.type.deviceTypeId
|
||||
};
|
||||
|
||||
request({
|
||||
url: "/app/xinghan/device/getEquipAllByType",
|
||||
method: 'POST',
|
||||
data: json,
|
||||
}).then(res=>{
|
||||
|
||||
if(res && res.code==200){
|
||||
|
||||
succ(res.data);
|
||||
return;
|
||||
}
|
||||
err(res);
|
||||
}).catch(ex=>{
|
||||
console.error("ex=",ex);
|
||||
err(ex);
|
||||
});
|
||||
|
||||
|
||||
let json = {
|
||||
"tenant_id": this.type.tenantId,
|
||||
"deviceType": this.type.deviceTypeId
|
||||
};
|
||||
|
||||
request({
|
||||
url: "/app/xinghan/device/getEquipAllByType",
|
||||
method: 'POST',
|
||||
data: json,
|
||||
}).then(res => {
|
||||
|
||||
if (res && res.code == 200) {
|
||||
|
||||
succ(res.data);
|
||||
return;
|
||||
}
|
||||
err(res);
|
||||
}).catch(ex => {
|
||||
console.error("ex=", ex);
|
||||
err(ex);
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
//获取类型下的设备数量
|
||||
getTypeDeviceCnt() {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
|
||||
|
||||
|
||||
let json = {
|
||||
"tenant_id": this.type.tenantId,
|
||||
"deviceType": this.type.deviceTypeId
|
||||
};
|
||||
console.error("json=",json);
|
||||
|
||||
request({
|
||||
url: "/app/xinghan/device/getEquipCountByType",
|
||||
method: 'POST',
|
||||
data: json,
|
||||
}).then(res=>{
|
||||
console.error("getEquipCountByType res.data=",res.data)
|
||||
if(res && res.code==200){
|
||||
|
||||
resolve(res.data);
|
||||
return;
|
||||
}
|
||||
reject(res);
|
||||
}).catch(ex=>{
|
||||
console.error("ex=",ex);
|
||||
reject(ex);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let json = {
|
||||
"tenant_id": this.type.tenantId,
|
||||
"deviceType": this.type.deviceTypeId
|
||||
};
|
||||
console.error("json=", json);
|
||||
|
||||
request({
|
||||
url: "/app/xinghan/device/getEquipCountByType",
|
||||
method: 'POST',
|
||||
data: json,
|
||||
}).then(res => {
|
||||
console.error("getEquipCountByType res.data=", res.data)
|
||||
if (res && res.code == 200) {
|
||||
|
||||
resolve(res.data);
|
||||
return;
|
||||
}
|
||||
reject(res);
|
||||
}).catch(ex => {
|
||||
console.error("ex=", ex);
|
||||
reject(ex);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
getDevice(item) {
|
||||
@ -581,37 +677,40 @@
|
||||
if (this.devicesCnt > 0) {
|
||||
if (this.devices && this.devices.length > 0) {
|
||||
let eqp = this.devices.find(v => {
|
||||
let flag= v.bluetooth_name.replace(/\r\n/g, '').replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '') == item.name;
|
||||
|
||||
let flag = v.bluetooth_name.replace(/\r\n/g, '').replace(
|
||||
/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '') == item.name;
|
||||
|
||||
return flag;
|
||||
|
||||
|
||||
});
|
||||
if (eqp) {
|
||||
|
||||
|
||||
these.$set(these.EquipMents[fIndex], "isUpload",
|
||||
true);
|
||||
these.$set(these.EquipMents[fIndex], "remark",
|
||||
"校验完成,设备已入库");
|
||||
these.$set(these.EquipMents[fIndex], "macAddress",
|
||||
eqp.device_mac);
|
||||
these.$set(these.EquipMents[fIndex], "device_name",eqp.device_name);
|
||||
console.log("从缓存中找到了设备",eqp);
|
||||
these.$set(these.EquipMents[fIndex], "device_name", eqp.device_name);
|
||||
console.log("从缓存中找到了设备", eqp);
|
||||
resolve(eqp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.error("缓存中找不到此设备22222222",this.devices);
|
||||
// console.error("缓存中找不到此设备22222222", this.devices);
|
||||
these.$set(these.EquipMents[fIndex], "remark",
|
||||
"校验完成,设备未入库");
|
||||
reject(null);
|
||||
|
||||
these.sendEquipToMq();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
let succCallback=(data)=>{
|
||||
if(data){
|
||||
|
||||
|
||||
|
||||
let succCallback = (data) => {
|
||||
if (data) {
|
||||
these.$set(these.EquipMents[fIndex], "isUpload",
|
||||
true);
|
||||
these.$set(these.EquipMents[fIndex], "remark",
|
||||
@ -620,77 +719,176 @@
|
||||
data.device_mac);
|
||||
these.$set(these.EquipMents[fIndex], "imei", data
|
||||
.device_imei);
|
||||
these.$set(these.EquipMents[fIndex], "device_name",data.device_name);
|
||||
}
|
||||
else{
|
||||
console.error("设备未入库111111",data)
|
||||
these.$set(these.EquipMents[fIndex], "device_name", data.device_name);
|
||||
} else {
|
||||
console.error("设备未入库111111", data)
|
||||
these.$set(these.EquipMents[fIndex], "remark",
|
||||
"校验完成,设备未入库");
|
||||
}
|
||||
|
||||
these.sendEquipToMq();
|
||||
}
|
||||
|
||||
let errCallback=()=>{
|
||||
|
||||
let errCallback = () => {
|
||||
these.$set(these.EquipMents[fIndex], "remark",
|
||||
"校验出现异常");
|
||||
|
||||
these.sendEquipToMq();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
let p2=new Promise((resolve,reject)=>{
|
||||
|
||||
|
||||
|
||||
|
||||
let p2 = new Promise((resolve, reject) => {
|
||||
let json = {
|
||||
"tenant_id": this.type.tenantId,
|
||||
"deviceType": this.type.deviceTypeId,
|
||||
"deviceName": item.name
|
||||
};
|
||||
|
||||
|
||||
request({
|
||||
url:'/app/xinghan/device/GetDeviceByName',
|
||||
data:json,
|
||||
url: '/app/xinghan/device/GetDeviceByName',
|
||||
data: json,
|
||||
method: 'POST'
|
||||
}).then(res=>{
|
||||
if(res && res.code==200){
|
||||
|
||||
|
||||
resolve(res.data);
|
||||
return;
|
||||
|
||||
|
||||
}).then(res => {
|
||||
if (res && res.code == 200) {
|
||||
|
||||
|
||||
resolve(res.data);
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
reject(res);
|
||||
}).catch(ex=>{
|
||||
}).catch(ex => {
|
||||
reject(ex);
|
||||
});
|
||||
})
|
||||
|
||||
Promise.any([p2]).then(res=>{
|
||||
|
||||
Promise.any([p2]).then(res => {
|
||||
succCallback(res);
|
||||
}).catch(ex=>{
|
||||
|
||||
}).catch(ex => {
|
||||
errCallback(ex);
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
scan() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
console.log('条码内容:' + res.result);
|
||||
|
||||
|
||||
let getUrlParams = (url) => {
|
||||
var p = {},
|
||||
s = (url.indexOf('?') > -1 ? url.split('?')[1] : '').split('&');
|
||||
for (var i = 0; i < s.length; i++) {
|
||||
if (!s[i]) continue;
|
||||
var kv = s[i].split('=');
|
||||
p[decodeURIComponent(kv[0])] = kv[1] ? decodeURIComponent(kv[1].replace(
|
||||
/\+/g, ' ')) : '';
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
let json = getUrlParams(res.result);
|
||||
if (!json.key) {
|
||||
uni.showModal({
|
||||
title: '错误',
|
||||
content: "无效的二维码"
|
||||
})
|
||||
return;
|
||||
}
|
||||
this.scanKey = json.key;
|
||||
let msg = {
|
||||
scanResult: '已扫码',
|
||||
scanCode: 200
|
||||
};
|
||||
mq.sendData('pc/' + json.key, JSON.stringify(msg), false);
|
||||
uni.showModal({
|
||||
title: '授权申请',
|
||||
content: 'pc端授权登陆',
|
||||
confirmText: '同意',
|
||||
cancelText: '拒绝',
|
||||
showCancel: true,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
these.pcAuthori(json);
|
||||
return;
|
||||
}
|
||||
if (res.cancel) {
|
||||
msg.scanResult = "用户拒绝授权";
|
||||
msg.scanCode = 500;
|
||||
mq.sendData('pc/' + json.key, JSON.stringify(msg), false);
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('扫码失败', err);
|
||||
uni.showToast({
|
||||
title: '扫码失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
pcAuthori() { //同意授权
|
||||
const token = 'Bearer ' + uni.getStorageSync('token');
|
||||
const clientid = uni.getStorageSync('clientID');
|
||||
const phone = uni.getStorageSync('phone');
|
||||
let msg = {
|
||||
scanResult: '用户同意授权',
|
||||
scanUsr: phone,
|
||||
scanCode: 0,
|
||||
Authorization: token,
|
||||
clientid: clientid,
|
||||
};
|
||||
console.log("同意授权", msg);
|
||||
this.Status.pcAuthori = true;
|
||||
mq.sendData('pc/' + this.scanKey, JSON.stringify(msg), false);
|
||||
|
||||
these.sendEquipToMq();
|
||||
|
||||
|
||||
},
|
||||
sendEquipToMq() {
|
||||
if (mq && this.scanKey) {
|
||||
const phone = uni.getStorageSync('phone');
|
||||
setTimeout(() => {
|
||||
mq.sendData('pc/' + phone, JSON.stringify({
|
||||
EquipMents: this.EquipMents
|
||||
}), false);
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
ReSearch() {
|
||||
if (!ble) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ble.disconnectDevice().finally(dis => {
|
||||
|
||||
|
||||
ble.StopSearch().finally(res => {
|
||||
|
||||
|
||||
this.EquipMents = [];
|
||||
this.PairEquip = [];
|
||||
ble.StartSearch().then(result => {
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
console.error("err=", err);
|
||||
MsgError("出现错误:" + err.msg, '', these);
|
||||
});
|
||||
}).catch(ex => {
|
||||
console.error("ex=", ex);
|
||||
MsgError("出现错误:" + ex.msg, '', these);
|
||||
});
|
||||
});
|
||||
|
||||
@ -727,7 +925,7 @@
|
||||
this.devices.push({
|
||||
bluetooth_name: item.name,
|
||||
device_mac: item.macAddress,
|
||||
device_name:item.name
|
||||
device_name: item.name
|
||||
});
|
||||
this.devicesCnt = this.devices.length;
|
||||
|
||||
@ -742,63 +940,31 @@
|
||||
if (v.deviceId == item.deviceId) {
|
||||
this.$set(this.EquipMents[index], "isUpload", false);
|
||||
this.$set(this.EquipMents[index], "remark", res.msg);
|
||||
|
||||
|
||||
this.devices.find((d,i)=>{
|
||||
if(d.device_mac==item.macAddress){
|
||||
|
||||
this.$set(this.EquipMents[index], "device_name", d.device_name);
|
||||
|
||||
|
||||
this.devices.find((d, i) => {
|
||||
if (d.device_mac == item.macAddress) {
|
||||
|
||||
this.$set(this.EquipMents[index], "device_name", d
|
||||
.device_name);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}).catch(ex => {}).finally(() => {
|
||||
these.sendEquipToMq();
|
||||
});
|
||||
}
|
||||
|
||||
time = setTimeout(exec, 100)
|
||||
},
|
||||
isItemLink: function(item, index, type) {
|
||||
|
||||
let src = '/static/images/BLEAdd/noLink.png';
|
||||
if (!item) {
|
||||
|
||||
return src;
|
||||
}
|
||||
if (type == 'link') {
|
||||
if (this.PairEquip && this.PairEquip.length) {
|
||||
if (this.PairEquip.length > 0) {
|
||||
let f = this.PairEquip.find(function(v) {
|
||||
return v.deviceId == item.deviceId;
|
||||
});
|
||||
if (f) {
|
||||
src = '/static/images/BLEAdd/linked.png';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} else if (type == 'mac') {
|
||||
if (item.macAddress) {
|
||||
src = '/static/images/BLEAdd/linked.png';
|
||||
}
|
||||
} else if (type == 'imei') {
|
||||
if (item.imei) {
|
||||
src = '/static/images/BLEAdd/linked.png';
|
||||
}
|
||||
} else if (type == 'upload') {
|
||||
if (item.isUpload) {
|
||||
src = '/static/images/BLEAdd/linked.png';
|
||||
}
|
||||
}
|
||||
|
||||
return src;
|
||||
},
|
||||
Link: function(item) {
|
||||
let exec = () => {
|
||||
|
||||
@ -865,6 +1031,8 @@
|
||||
|
||||
execLink().then((res) => {
|
||||
linkCallback(res);
|
||||
|
||||
these.sendEquipToMq();
|
||||
}).catch(ex => {
|
||||
console.log("ex=", ex)
|
||||
uni.showModal({
|
||||
@ -1042,6 +1210,7 @@
|
||||
width: 100%;
|
||||
height: calc(100% - 186rpx);
|
||||
overflow-y: scroll;
|
||||
margin-top: 120rpx;
|
||||
}
|
||||
|
||||
.list .item {
|
||||
@ -1253,6 +1422,16 @@
|
||||
animation: rotateClockwise 3s linear infinite;
|
||||
}
|
||||
|
||||
.topStatric {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
z-index: 99;
|
||||
background-color: #121212;
|
||||
}
|
||||
|
||||
/* #ifdef H5 */
|
||||
.topStatric {
|
||||
|
||||
@ -1274,17 +1453,13 @@
|
||||
margin-top: 240rpx;
|
||||
}
|
||||
|
||||
.topStatric {
|
||||
top: 90rpx
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.topStatric {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
z-index: 99;
|
||||
background-color: #121212;
|
||||
}
|
||||
|
||||
|
||||
.uni-mt-5 {
|
||||
background-color: #000000;
|
||||
@ -1293,4 +1468,22 @@
|
||||
.uni-easyinput__content {
|
||||
background-color: #121212 !important;
|
||||
}
|
||||
|
||||
.navbarRight .img {
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.uni-navbar--fixed {
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
/deep/ .uni-navbar--fixed {
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
/deep/ .uni-navbar__placeholder {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
@ -872,7 +872,7 @@
|
||||
these.Status.Pop.showPop = true;
|
||||
},
|
||||
showMsg(msg, isSucc) {
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -1206,7 +1206,7 @@
|
||||
if (okCallback === undefined) {
|
||||
okCallback = null;
|
||||
}
|
||||
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png';
|
||||
let icoUrl = '/static/images/common/uploadErr.png';
|
||||
let borderColor = "#e034344d";
|
||||
let buttonBgColor = "#E03434";
|
||||
if (isSucc) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="contentBg maincontent">
|
||||
<view class="main">
|
||||
<view class="center">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/uploadErr.png" mode="aspectFit"></image>
|
||||
<image class="img" src="/static/images/common/uploadErr.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="txt" style="margin-top: 30rpx;">
|
||||
注销账号后账号将永久失效且不可恢复,
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@ -1,11 +1,12 @@
|
||||
var MsgType = {
|
||||
error: "error",
|
||||
succ: "succ",
|
||||
warn: "warn"
|
||||
warn: "warn",
|
||||
info:'info'
|
||||
}
|
||||
var time = null;
|
||||
// 显示成功
|
||||
export const MsgSuccess = (msg, btnTxt, ev) => {
|
||||
export const MsgSuccess = (msg, btnTxt, ev,tapCallback) => {
|
||||
|
||||
if (!ev) {
|
||||
|
||||
@ -15,13 +16,13 @@ export const MsgSuccess = (msg, btnTxt, ev) => {
|
||||
|
||||
return null;
|
||||
}
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.succ);
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.succ,tapCallback);
|
||||
|
||||
createClear(ev);
|
||||
return option;
|
||||
}
|
||||
//显示失败
|
||||
export const MsgError = (msg, btnTxt, ev) => {
|
||||
export const MsgError = (msg, btnTxt, ev,tapCallback) => {
|
||||
|
||||
if (!ev) {
|
||||
|
||||
@ -32,12 +33,12 @@ export const MsgError = (msg, btnTxt, ev) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.error);
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.error,tapCallback);
|
||||
createClear(ev);
|
||||
return option;
|
||||
}
|
||||
//显示警告
|
||||
export const MsgWarning = (msg, btnTxt, ev, isClear) => {
|
||||
export const MsgWarning = (msg, btnTxt, ev, isClear,tapCallback) => {
|
||||
if (!ev) {
|
||||
|
||||
return null;
|
||||
@ -46,7 +47,7 @@ export const MsgWarning = (msg, btnTxt, ev, isClear) => {
|
||||
|
||||
return null;
|
||||
}
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.warn);
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.warn,tapCallback);
|
||||
if (isClear === undefined || isClear) {
|
||||
createClear(ev);
|
||||
}
|
||||
@ -55,7 +56,25 @@ export const MsgWarning = (msg, btnTxt, ev, isClear) => {
|
||||
|
||||
|
||||
}
|
||||
//显示警告
|
||||
export const MsgInfo = (msg, btnTxt, ev, isClear,btnCallback) => {
|
||||
if (!ev) {
|
||||
|
||||
return null;
|
||||
}
|
||||
if (!ev.$refs.msgPop) {
|
||||
|
||||
return null;
|
||||
}
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.info,btnCallback);
|
||||
if (isClear === undefined || isClear) {
|
||||
createClear(ev);
|
||||
}
|
||||
|
||||
return option;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 隐藏loading
|
||||
export const MsgClose = (options, ev) => {
|
||||
@ -109,7 +128,7 @@ const createClear = (ev) => {
|
||||
showPop({
|
||||
key: key,
|
||||
message: "消息太多, 是否全部关闭",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '全部关闭',
|
||||
|
||||
Reference in New Issue
Block a user