008A功能开始

This commit is contained in:
liub
2026-04-01 08:46:32 +08:00
parent d134c67a16
commit 6654ee54b5
26 changed files with 532 additions and 316 deletions

View File

@ -7,7 +7,7 @@
}, },
{ {
"customPlaygroundType" : "local", "customPlaygroundType" : "local",
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {

View File

@ -135,7 +135,7 @@
let cfg = { let cfg = {
error: { error: {
icoUrl: '/static/images/6155/DeviceDetail/uploadErr.png', icoUrl: '/static/images/common/uploadErr.png',
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434" buttonBgColor: "#E03434"
}, },
@ -148,6 +148,10 @@
icoUrl: '/static/images/common/warning.png', icoUrl: '/static/images/common/warning.png',
borderColor: "#FFC84E", borderColor: "#FFC84E",
buttonBgColor: "#FFC84E", buttonBgColor: "#FFC84E",
},
info:{
borderColor: "#BBE600",
buttonBgColor: "#BBE600"
} }
} }

View File

@ -429,7 +429,7 @@
{ {
"path": "pages/common/addDevice/addBle", "path": "pages/common/addDevice/addBle",
"style": { "style": {
"navigationBarTitleText": "蓝牙添加设备" "navigationStyle": "custom"
} }
}, },
{ {

View File

@ -453,7 +453,7 @@
if (item.key == 'led_alarm') { if (item.key == 'led_alarm') {
this.showPop({ this.showPop({
message: '确定开启声光报警?', message: '确定开启声光报警?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -467,7 +467,7 @@
if (this.formData.sta_LedType == 'led_alarm') { if (this.formData.sta_LedType == 'led_alarm') {
this.showPop({ this.showPop({
message: '确定解除声光报警模式?', message: '确定解除声光报警模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -657,7 +657,7 @@
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -781,7 +781,7 @@
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -658,7 +658,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -993,7 +993,7 @@ onFreqChanging(e){
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1045,7 +1045,7 @@ onFreqChanging(e){
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1090,7 +1090,7 @@ onFreqChanging(e){
showUnWarn(val) { showUnWarn(val) {
this.showPop({ this.showPop({
message: '确定解除声光报警模式?', message: '确定解除声光报警模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -1110,7 +1110,7 @@ onFreqChanging(e){
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1175,7 +1175,7 @@ onFreqChanging(e){
} else { } else {
this.showPop({ this.showPop({
message: '确定开启强制报警?', message: '确定开启强制报警?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: task, okCallback: task,
@ -1395,7 +1395,7 @@ onFreqChanging(e){
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -1519,7 +1519,7 @@ onFreqChanging(e){
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -758,7 +758,7 @@
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -1165,7 +1165,7 @@
if (okCallback === undefined) { if (okCallback === undefined) {
okCallback = null; okCallback = null;
} }
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -598,7 +598,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -774,7 +774,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -842,7 +842,7 @@
if (val === 'E49_on') { if (val === 'E49_on') {
this.showPop({ this.showPop({
message: '确定开启联机模式?', message: '确定开启联机模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -924,7 +924,7 @@
if (val == 'status_off') { if (val == 'status_off') {
this.showPop({ this.showPop({
message: '确定关闭物体感应功能?', message: '确定关闭物体感应功能?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -950,7 +950,7 @@ debugger;
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1003,7 +1003,7 @@ debugger;
if (item.key == 'led_alarm') { if (item.key == 'led_alarm') {
this.showPop({ this.showPop({
message: '确定开启强制报警?', message: '确定开启强制报警?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -1017,7 +1017,7 @@ debugger;
if (this.formData.sta_LedType == 'led_alarm') { if (this.formData.sta_LedType == 'led_alarm') {
this.showPop({ this.showPop({
message: '确定解除声光报警模式?', message: '确定解除声光报警模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -1369,7 +1369,7 @@ debugger;
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -1493,7 +1493,7 @@ debugger;
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -713,7 +713,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -794,7 +794,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -857,7 +857,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -918,7 +918,7 @@
showUnWarn(val) { showUnWarn(val) {
// this.showPop({ // this.showPop({
// message: '确定解除声光报警模式?', // message: '确定解除声光报警模式?',
// iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", // iconUrl: "/static/images/common/uploadErr.png",
// borderColor: "#e034344d", // borderColor: "#e034344d",
// buttonBgColor: "#E03434", // buttonBgColor: "#E03434",
// okCallback: () => { // okCallback: () => {
@ -940,7 +940,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -999,7 +999,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1039,7 +1039,7 @@
let confirmTask = () => { let confirmTask = () => {
this.showPop({ this.showPop({
message: '确定' + (this.formData.sta_SOSType === 'sos' ? '关闭' : '开启') + '声光报警模式?', message: '确定' + (this.formData.sta_SOSType === 'sos' ? '关闭' : '开启') + '声光报警模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: task, okCallback: task,
@ -1260,7 +1260,7 @@
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -1384,7 +1384,7 @@
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -195,7 +195,7 @@
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -507,7 +507,7 @@ import request, { baseURL } from '@/utils/request.js';
showUnWarn(val) { showUnWarn(val) {
this.showPop({ this.showPop({
message: '确定解除声光报警模式?', message: '确定解除声光报警模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: () => { okCallback: () => {
@ -562,7 +562,7 @@ import request, { baseURL } from '@/utils/request.js';
if (item.val === 'sos') { if (item.val === 'sos') {
this.showPop({ this.showPop({
message: '确定开启声光报警模式?', message: '确定开启声光报警模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: task, okCallback: task,
@ -760,7 +760,7 @@ import request, { baseURL } from '@/utils/request.js';
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -884,7 +884,7 @@ import request, { baseURL } from '@/utils/request.js';
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -774,7 +774,7 @@
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: "确定", buttonText: "确定",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png" iconUrl: "/static/images/common/uploadErr.png"
}, these); }, these);
reject(err); reject(err);
these.videoHexArray = null; these.videoHexArray = null;
@ -864,7 +864,7 @@
if (arr[0].status == 'rejected') { if (arr[0].status == 'rejected') {
showPop({ showPop({
message: "设备准备未就绪", message: "设备准备未就绪",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}, these); }, these);
@ -891,7 +891,7 @@
showPop({ showPop({
message: "与服务器连接出现异常,请检查网络设置", message: "与服务器连接出现异常,请检查网络设置",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}, these); }, these);
@ -902,7 +902,7 @@
hideLoading(these); hideLoading(these);
showPop({ showPop({
message: "出现异常," + ex.msg, message: "出现异常," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}, these); }, these);
@ -974,7 +974,7 @@
err = err.join(";"); err = err.join(";");
showPop({ showPop({
message: err, message: err,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}, these); }, these);
@ -1106,7 +1106,7 @@
these.closeAction(); these.closeAction();
showPop({ showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1129,7 +1129,7 @@
console.log("握手没有成功"); console.log("握手没有成功");
showPop({ showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1924,7 +1924,7 @@
showPop({ showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',

View File

@ -670,7 +670,7 @@
this.showPop({ this.showPop({
key: key, key: key,
message: msg, message: msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: sosToggle, okCallback: sosToggle,
@ -841,7 +841,7 @@
this.showPop({ this.showPop({
key: Common.guid(), key: Common.guid(),
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -974,7 +974,7 @@
let cfg = { let cfg = {
error: { error: {
icoUrl: '/static/images/6155/DeviceDetail/uploadErr.png', icoUrl: '/static/images/common/uploadErr.png',
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434" buttonBgColor: "#E03434"
}, },

View File

@ -698,7 +698,7 @@
if (this.formData.battary <= 20) { if (this.formData.battary <= 20) {
this.showPop({ this.showPop({
message: "设备电量低", message: "设备电量低",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -733,7 +733,7 @@
showBleUnConnect() { showBleUnConnect() {
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -860,7 +860,7 @@
these.Status.BottomMenu.show = false; these.Status.BottomMenu.show = false;
these.showPop({ these.showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -883,7 +883,7 @@
console.log("握手没有成功"); console.log("握手没有成功");
these.showPop({ these.showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -939,7 +939,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1072,7 +1072,7 @@
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: "确定", buttonText: "确定",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png" iconUrl: "/static/images/common/uploadErr.png"
}); });
reject(err); reject(err);
these.videoHexArray = null; these.videoHexArray = null;
@ -1162,7 +1162,7 @@
if (arr[0].status == 'rejected') { if (arr[0].status == 'rejected') {
these.showPop({ these.showPop({
message: "设备准备未就绪", message: "设备准备未就绪",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1189,7 +1189,7 @@
these.showPop({ these.showPop({
message: "与服务器连接出现异常,请检查网络设置", message: "与服务器连接出现异常,请检查网络设置",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1200,7 +1200,7 @@
hideLoading(these); hideLoading(these);
these.showPop({ these.showPop({
message: "出现异常," + ex.msg, message: "出现异常," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1273,7 +1273,7 @@
err = err.join(";"); err = err.join(";");
these.showPop({ these.showPop({
message: err, message: err,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1297,7 +1297,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1353,7 +1353,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1437,7 +1437,7 @@
}).catch((ex) => { }).catch((ex) => {
these.showPop({ these.showPop({
message: "发送失败," + ex.msg, message: "发送失败," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1546,7 +1546,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1585,7 +1585,7 @@
if (err) { if (err) {
this.showPop({ this.showPop({
message: "单位、部门、姓名必须填写且最多8字", message: "单位、部门、姓名必须填写且最多8字",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1706,7 +1706,7 @@
hideLoading(these); hideLoading(these);
these.showPop({ these.showPop({
message: "发送失败: " + (err.msg || err.message), message: "发送失败: " + (err.msg || err.message),
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1723,7 +1723,7 @@
hideLoading(these); hideLoading(these);
this.showPop({ this.showPop({
message: "发送失败: " + (ex.msg || ex.message), message: "发送失败: " + (ex.msg || ex.message),
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1793,7 +1793,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,

View File

@ -678,7 +678,7 @@
if (this.formData.battary <= 20) { if (this.formData.battary <= 20) {
this.showPop({ this.showPop({
message: "设备电量低", message: "设备电量低",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -713,7 +713,7 @@
showBleUnConnect() { showBleUnConnect() {
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -913,7 +913,7 @@
these.Status.BottomMenu.show = false; these.Status.BottomMenu.show = false;
these.showPop({ these.showPop({
message: "发送数据包失败了" + err.msg, message: "发送数据包失败了" + err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -972,7 +972,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1285,7 +1285,7 @@
err = err.join(";"); err = err.join(";");
these.showPop({ these.showPop({
message: err, message: err,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1362,7 +1362,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1442,7 +1442,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1522,7 +1522,7 @@
}).catch((ex) => { }).catch((ex) => {
these.showPop({ these.showPop({
message: "发送失败," + ex.msg, message: "发送失败," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1632,7 +1632,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1658,7 +1658,7 @@
if (err) { if (err) {
this.showPop({ this.showPop({
message: "单位、部门、姓名必须填写且最多7字", message: "单位、部门、姓名必须填写且最多7字",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1756,7 +1756,7 @@
hideLoading(these); hideLoading(these);
this.showPop({ this.showPop({
message: "发送失败: " + (ex.msg || ex.message), message: "发送失败: " + (ex.msg || ex.message),
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1798,7 +1798,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,

View File

@ -514,7 +514,7 @@
showPop({ showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -1272,7 +1272,7 @@
showPop({ showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}, these); }, these);
@ -1295,7 +1295,7 @@
console.log("握手没有成功"); console.log("握手没有成功");
showPop({ showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}, these); }, these);

View File

@ -596,7 +596,7 @@ import request, { baseURL } from '@/utils/request.js';
ble.sendHexs(f.deviceId, array, f.writeServiceId, f.wirteCharactId, 100).catch(ex => { ble.sendHexs(f.deviceId, array, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
these.showPop({ these.showPop({
message: "发送失败," + ex.msg, message: "发送失败," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -736,7 +736,7 @@ import request, { baseURL } from '@/utils/request.js';
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',

View File

@ -735,7 +735,7 @@ import request, { baseURL } from '@/utils/request.js';
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -815,7 +815,7 @@ import request, { baseURL } from '@/utils/request.js';
these.showPop({ these.showPop({
message: ex.msg, message: ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -840,7 +840,7 @@ import request, { baseURL } from '@/utils/request.js';
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -873,7 +873,7 @@ import request, { baseURL } from '@/utils/request.js';
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1025,7 +1025,7 @@ import request, { baseURL } from '@/utils/request.js';
these.showPop({ these.showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1046,7 +1046,7 @@ import request, { baseURL } from '@/utils/request.js';
console.log("握手没有成功"); console.log("握手没有成功");
these.showPop({ these.showPop({
message: err.msg, message: err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1201,7 +1201,7 @@ import request, { baseURL } from '@/utils/request.js';
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: "确定", buttonText: "确定",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png" iconUrl: "/static/images/common/uploadErr.png"
}); });
reject(err); reject(err);
return; return;
@ -1299,7 +1299,7 @@ import request, { baseURL } from '@/utils/request.js';
these.showPop({ these.showPop({
message: "与服务器连接出现异常,请检查网络设置", message: "与服务器连接出现异常,请检查网络设置",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1310,7 +1310,7 @@ import request, { baseURL } from '@/utils/request.js';
hideLoading(these); hideLoading(these);
these.showPop({ these.showPop({
message: "出现异常," + ex.msg, message: "出现异常," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1382,7 +1382,7 @@ import request, { baseURL } from '@/utils/request.js';
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1501,7 +1501,7 @@ import request, { baseURL } from '@/utils/request.js';
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1626,7 +1626,7 @@ import request, { baseURL } from '@/utils/request.js';
these.showPop({ these.showPop({
message: "文字发送失败," + err.msg, message: "文字发送失败," + err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1660,7 +1660,7 @@ import request, { baseURL } from '@/utils/request.js';
hideLoading(these); hideLoading(these);
these.showPop({ these.showPop({
message: ex.msg, message: ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });

View File

@ -717,7 +717,7 @@
} }
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备,取消" + (4 - this.Status.bleLinkCnt) + "次后不再提醒", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备,取消" + (4 - this.Status.bleLinkCnt) + "次后不再提醒",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -1171,7 +1171,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1214,7 +1214,7 @@
console.log("ex=", ex); console.log("ex=", ex);
these.showPop({ these.showPop({
message: "通信异常,请检查手机或设备网络", message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1278,7 +1278,7 @@
console.log("ex=", ex); console.log("ex=", ex);
these.showPop({ these.showPop({
message: "通信异常,请检查手机或设备网络", message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1341,7 +1341,7 @@
showHeader: true, showHeader: true,
headerTxt: "强制报警", headerTxt: "强制报警",
message: message, message: message,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: "解除报警", buttonText: "解除报警",
@ -1360,7 +1360,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1434,7 +1434,7 @@
console.log("ex=", ex); console.log("ex=", ex);
these.showPop({ these.showPop({
message: "通信异常,请检查手机或设备网络", message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1552,7 +1552,7 @@
this.showPop({ this.showPop({
message: '确定开启声光报警模式?', message: '确定开启声光报警模式?',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: OpenSOS, okCallback: OpenSOS,
@ -1580,7 +1580,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1622,7 +1622,7 @@
console.log("ex=", ex) console.log("ex=", ex)
these.showPop({ these.showPop({
message: "通信异常,请检查手机或设备网络", message: "通信异常,请检查手机或设备网络",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1678,7 +1678,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1717,7 +1717,7 @@
these.showPop({ these.showPop({
message: res.errMsg ? res.errMsg : "未知的原因上传失败了", message: res.errMsg ? res.errMsg : "未知的原因上传失败了",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1847,7 +1847,7 @@
// these.Status.BottomMenu.show = false; // these.Status.BottomMenu.show = false;
// these.showPop({ // these.showPop({
// message: err.msg, // message: err.msg,
// iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", // iconUrl: "/static/images/common/uploadErr.png",
// borderColor: "#e034344d", // borderColor: "#e034344d",
// buttonBgColor: "#E03434", // buttonBgColor: "#E03434",
// }); // });
@ -2025,7 +2025,7 @@
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: "确定", buttonText: "确定",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png" iconUrl: "/static/images/common/uploadErr.png"
}); });
reject(err); reject(err);
return; return;
@ -2125,7 +2125,7 @@
these.showPop({ these.showPop({
message: "与服务器连接出现异常,请检查网络设置", message: "与服务器连接出现异常,请检查网络设置",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -2136,7 +2136,7 @@
hideLoading(these); hideLoading(these);
these.showPop({ these.showPop({
message: "出现异常," + ex.msg, message: "出现异常," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -2207,7 +2207,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -2328,7 +2328,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -2370,7 +2370,7 @@
}).catch((ex) => { }).catch((ex) => {
these.showPop({ these.showPop({
message: "文字发送失败," + ex.msg, message: "文字发送失败," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -2530,7 +2530,7 @@
// hideLoading(these); // hideLoading(these);
// these.showPop({ // these.showPop({
// message: ex.msg, // message: ex.msg,
// iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", // iconUrl: "/static/images/common/uploadErr.png",
// borderColor: "#e034344d", // borderColor: "#e034344d",
// buttonBgColor: "#E03434", // buttonBgColor: "#E03434",
// }); // });
@ -2546,7 +2546,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -2613,7 +2613,7 @@
} else { } else {
these.showPop({ these.showPop({
message: res.msg, message: res.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });

View File

@ -620,7 +620,7 @@
if ('battary' in json && this.formData.battary <= 20) { if ('battary' in json && this.formData.battary <= 20) {
this.showPop({ this.showPop({
message: "设备电量低", message: "设备电量低",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -656,7 +656,7 @@
showBleUnConnect() { showBleUnConnect() {
this.showPop({ this.showPop({
message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '去连接', buttonText: '去连接',
@ -766,7 +766,7 @@
these.Status.BottomMenu.show = false; these.Status.BottomMenu.show = false;
these.showPop({ these.showPop({
message: "发送数据包失败了: " + err.msg, message: "发送数据包失败了: " + err.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -931,7 +931,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -951,7 +951,7 @@
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1081,7 +1081,7 @@
}).catch((ex) => { }).catch((ex) => {
these.showPop({ these.showPop({
message: "发送失败," + ex.msg, message: "发送失败," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1183,7 +1183,7 @@ debugger;
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1209,7 +1209,7 @@ debugger;
if (err) { if (err) {
this.showPop({ this.showPop({
message: "单位、部门、姓名必须填写且最多5字", message: "单位、部门、姓名必须填写且最多5字",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1360,7 +1360,7 @@ debugger;
} else { } else {
this.showPop({ this.showPop({
message: "出现异常发送失败", message: "出现异常发送失败",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1407,7 +1407,7 @@ debugger;
this.showPop({ this.showPop({
message: '无操作权限', message: '无操作权限',
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
okCallback: null, okCallback: null,
@ -1439,7 +1439,7 @@ debugger;
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 100).catch(ex => { ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
these.showPop({ these.showPop({
message: "发送失败," + ex.msg, message: "发送失败," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });
@ -1488,7 +1488,7 @@ debugger;
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 100).catch(ex => { ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 100).catch(ex => {
these.showPop({ these.showPop({
message: "发送失败," + ex.msg, message: "发送失败," + ex.msg,
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
}); });

View File

@ -1,6 +1,22 @@
<template> <template>
<view class="content"> <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"> <view class="topStatric">
@ -10,6 +26,9 @@
</view> </view>
<view class="lblTitle"> <view class="lblTitle">
<view>添加:{{type.typeName}} 设备数量:{{devicesCnt}}</view> <view>添加:{{type.typeName}} 设备数量:{{devicesCnt}}</view>
<view class="btn" style="color: #FFFFFF;" @click="ReSearch()">刷新</view> <view class="btn" style="color: #FFFFFF;" @click="ReSearch()">刷新</view>
</view> </view>
<view class="lblTitle"> <view class="lblTitle">
@ -76,8 +95,6 @@
<!-- <image :src="isItemLink(item,index,'upload')" class="img" mode="aspectFit">
</image> -->
@ -87,6 +104,8 @@
</view> </view>
</view> </view>
<global-loading ref="loading" /> <global-loading ref="loading" />
<MsgBox ref="msgPop" />
</view> </view>
</template> </template>
@ -100,17 +119,39 @@
} from '@/utils/loading.js' } from '@/utils/loading.js'
import common from '@/utils/Common.js' import common from '@/utils/Common.js'
const pagePath = "pages/common/addBLE/addEquip"; 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 ble = null;
var these = null; var these = null;
var eventChannel = null; var eventChannel = null;
var time = null; var time = null;
var time1 = null; var time1 = null;
// var serv = null; var mq = null;
export default { export default {
data() { data() {
return { return {
Status: { Status: {
intval: null, intval: null,
pcAuthori: false,
navbar: {
icons: [
{
src: '/static/images/common/scane.png'
}
],
title: '添加设备',
showBack: true,
height: 90
}
}, },
search: '', search: '',
groupid: '', groupid: '',
@ -120,7 +161,8 @@
EquipMents: [], //搜索出来的设备 EquipMents: [], //搜索出来的设备
devices: [], devices: [],
devicesCnt: 0, devicesCnt: 0,
privateNetUrl: '' privateNetUrl: '',
scanKey: ''
} }
}, },
@ -137,6 +179,7 @@
}, },
onUnload() { onUnload() {
if (ble) {
ble.StopSearch().then(res => { ble.StopSearch().then(res => {
console.log("停止搜索成功") console.log("停止搜索成功")
}).catch(ex => { }).catch(ex => {
@ -144,11 +187,22 @@
}); });
ble.removeAllCallback(pagePath); ble.removeAllCallback(pagePath);
ble.disconnectDevice(); ble.disconnectDevice();
}
if (mq) {
mq.disconnect();
}
}, },
onLoad() { onLoad() {
these = this;
mq = MQTT.getMqTool();
mq.init();
this.groupid = common.DateFormat(new Date(), 'yyyy-MM-dd HH:mm:ss'); this.groupid = common.DateFormat(new Date(), 'yyyy-MM-dd HH:mm:ss');
these = this;
ble = bleTool.getBleTool(); ble = bleTool.getBleTool();
// serv = serTool.serverInit(); // serv = serTool.serverInit();
@ -358,7 +412,8 @@
} }
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,
'');
@ -381,7 +436,7 @@
} }
} }
these.sendEquipToMq();
// console.log("equip=", these.EquipMents) // console.log("equip=", these.EquipMents)
}, pagePath); }, pagePath);
// console.log("addEquip") // console.log("addEquip")
@ -403,6 +458,7 @@
console.log("111111"); console.log("111111");
} }
if (f.imei) { if (f.imei) {
f.imei = f.imei.replace(/\u0000/g, '');
item = this.EquipMents.find((v, index) => { item = this.EquipMents.find((v, index) => {
if (v.deviceId == f.deviceId) { if (v.deviceId == f.deviceId) {
v.imei = f.imei; v.imei = f.imei;
@ -474,7 +530,7 @@
let callback = () => { let callback = () => {
these.getTypeDeviceCnt().then(res => { these.getTypeDeviceCnt().then(res => {
console.error("设备数量:",res); console.error("设备数量:", res);
these.devicesCnt = res; these.devicesCnt = res;
if (res > 0 && res <= 10000) { if (res > 0 && res <= 10000) {
these.getAlltypeDevices().then(devs => { these.getAlltypeDevices().then(devs => {
@ -493,7 +549,25 @@
callback(); 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() { onShow: function() {
@ -503,6 +577,28 @@
}, },
methods: { 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() { getAlltypeDevices() {
return new Promise((succ, err) => { return new Promise((succ, err) => {
@ -516,16 +612,16 @@
url: "/app/xinghan/device/getEquipAllByType", url: "/app/xinghan/device/getEquipAllByType",
method: 'POST', method: 'POST',
data: json, data: json,
}).then(res=>{ }).then(res => {
if(res && res.code==200){ if (res && res.code == 200) {
succ(res.data); succ(res.data);
return; return;
} }
err(res); err(res);
}).catch(ex=>{ }).catch(ex => {
console.error("ex=",ex); console.error("ex=", ex);
err(ex); err(ex);
}); });
@ -542,22 +638,22 @@
"tenant_id": this.type.tenantId, "tenant_id": this.type.tenantId,
"deviceType": this.type.deviceTypeId "deviceType": this.type.deviceTypeId
}; };
console.error("json=",json); console.error("json=", json);
request({ request({
url: "/app/xinghan/device/getEquipCountByType", url: "/app/xinghan/device/getEquipCountByType",
method: 'POST', method: 'POST',
data: json, data: json,
}).then(res=>{ }).then(res => {
console.error("getEquipCountByType res.data=",res.data) console.error("getEquipCountByType res.data=", res.data)
if(res && res.code==200){ if (res && res.code == 200) {
resolve(res.data); resolve(res.data);
return; return;
} }
reject(res); reject(res);
}).catch(ex=>{ }).catch(ex => {
console.error("ex=",ex); console.error("ex=", ex);
reject(ex); reject(ex);
}); });
@ -581,7 +677,8 @@
if (this.devicesCnt > 0) { if (this.devicesCnt > 0) {
if (this.devices && this.devices.length > 0) { if (this.devices && this.devices.length > 0) {
let eqp = this.devices.find(v => { 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; return flag;
@ -594,24 +691,26 @@
"校验完成,设备已入库"); "校验完成,设备已入库");
these.$set(these.EquipMents[fIndex], "macAddress", these.$set(these.EquipMents[fIndex], "macAddress",
eqp.device_mac); eqp.device_mac);
these.$set(these.EquipMents[fIndex], "device_name",eqp.device_name); these.$set(these.EquipMents[fIndex], "device_name", eqp.device_name);
console.log("从缓存中找到了设备",eqp); console.log("从缓存中找到了设备", eqp);
resolve(eqp); resolve(eqp);
return; return;
} }
} }
console.error("缓存中找不到此设备22222222",this.devices); // console.error("缓存中找不到此设备22222222", this.devices);
these.$set(these.EquipMents[fIndex], "remark", these.$set(these.EquipMents[fIndex], "remark",
"校验完成,设备未入库"); "校验完成,设备未入库");
reject(null); reject(null);
these.sendEquipToMq();
return; return;
} }
let succCallback=(data)=>{ let succCallback = (data) => {
if(data){ if (data) {
these.$set(these.EquipMents[fIndex], "isUpload", these.$set(these.EquipMents[fIndex], "isUpload",
true); true);
these.$set(these.EquipMents[fIndex], "remark", these.$set(these.EquipMents[fIndex], "remark",
@ -620,25 +719,26 @@
data.device_mac); data.device_mac);
these.$set(these.EquipMents[fIndex], "imei", data these.$set(these.EquipMents[fIndex], "imei", data
.device_imei); .device_imei);
these.$set(these.EquipMents[fIndex], "device_name",data.device_name); these.$set(these.EquipMents[fIndex], "device_name", data.device_name);
} } else {
else{ console.error("设备未入库111111", data)
console.error("设备未入库111111",data)
these.$set(these.EquipMents[fIndex], "remark", these.$set(these.EquipMents[fIndex], "remark",
"校验完成,设备未入库"); "校验完成,设备未入库");
} }
these.sendEquipToMq();
} }
let errCallback=()=>{ let errCallback = () => {
these.$set(these.EquipMents[fIndex], "remark", these.$set(these.EquipMents[fIndex], "remark",
"校验出现异常"); "校验出现异常");
these.sendEquipToMq();
} }
let p2=new Promise((resolve,reject)=>{ let p2 = new Promise((resolve, reject) => {
let json = { let json = {
"tenant_id": this.type.tenantId, "tenant_id": this.type.tenantId,
"deviceType": this.type.deviceTypeId, "deviceType": this.type.deviceTypeId,
@ -646,11 +746,11 @@
}; };
request({ request({
url:'/app/xinghan/device/GetDeviceByName', url: '/app/xinghan/device/GetDeviceByName',
data:json, data: json,
method: 'POST' method: 'POST'
}).then(res=>{ }).then(res => {
if(res && res.code==200){ if (res && res.code == 200) {
resolve(res.data); resolve(res.data);
@ -660,19 +760,115 @@
} }
reject(res); reject(res);
}).catch(ex=>{ }).catch(ex => {
reject(ex); reject(ex);
}); });
}) })
Promise.any([p2]).then(res=>{ Promise.any([p2]).then(res => {
succCallback(res); succCallback(res);
}).catch(ex=>{
}).catch(ex => {
errCallback(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() { ReSearch() {
if (!ble) { if (!ble) {
return; return;
@ -688,9 +884,11 @@
}).catch(err => { }).catch(err => {
console.error("err=", err); console.error("err=", err);
MsgError("出现错误:" + err.msg, '', these);
}); });
}).catch(ex => { }).catch(ex => {
console.error("ex=", ex); console.error("ex=", ex);
MsgError("出现错误:" + ex.msg, '', these);
}); });
}); });
@ -727,7 +925,7 @@
this.devices.push({ this.devices.push({
bluetooth_name: item.name, bluetooth_name: item.name,
device_mac: item.macAddress, device_mac: item.macAddress,
device_name:item.name device_name: item.name
}); });
this.devicesCnt = this.devices.length; this.devicesCnt = this.devices.length;
@ -744,10 +942,11 @@
this.$set(this.EquipMents[index], "remark", res.msg); this.$set(this.EquipMents[index], "remark", res.msg);
this.devices.find((d,i)=>{ this.devices.find((d, i) => {
if(d.device_mac==item.macAddress){ if (d.device_mac == item.macAddress) {
this.$set(this.EquipMents[index], "device_name", d.device_name); this.$set(this.EquipMents[index], "device_name", d
.device_name);
return true; return true;
} }
}); });
@ -758,47 +957,14 @@
}); });
} }
}) }).catch(ex => {}).finally(() => {
these.sendEquipToMq();
});
} }
time = setTimeout(exec, 100) 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) { Link: function(item) {
let exec = () => { let exec = () => {
@ -865,6 +1031,8 @@
execLink().then((res) => { execLink().then((res) => {
linkCallback(res); linkCallback(res);
these.sendEquipToMq();
}).catch(ex => { }).catch(ex => {
console.log("ex=", ex) console.log("ex=", ex)
uni.showModal({ uni.showModal({
@ -1042,6 +1210,7 @@
width: 100%; width: 100%;
height: calc(100% - 186rpx); height: calc(100% - 186rpx);
overflow-y: scroll; overflow-y: scroll;
margin-top: 120rpx;
} }
.list .item { .list .item {
@ -1253,6 +1422,16 @@
animation: rotateClockwise 3s linear infinite; 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 */ /* #ifdef H5 */
.topStatric { .topStatric {
@ -1274,17 +1453,13 @@
margin-top: 240rpx; margin-top: 240rpx;
} }
.topStatric {
top: 90rpx
}
/* #endif */ /* #endif */
.topStatric {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
position: fixed;
top: 0rpx;
z-index: 99;
background-color: #121212;
}
.uni-mt-5 { .uni-mt-5 {
background-color: #000000; background-color: #000000;
@ -1293,4 +1468,22 @@
.uni-easyinput__content { .uni-easyinput__content {
background-color: #121212 !important; 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> </style>

View File

@ -872,7 +872,7 @@
these.Status.Pop.showPop = true; these.Status.Pop.showPop = true;
}, },
showMsg(msg, isSucc) { showMsg(msg, isSucc) {
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -1206,7 +1206,7 @@
if (okCallback === undefined) { if (okCallback === undefined) {
okCallback = null; okCallback = null;
} }
let icoUrl = '/static/images/6155/DeviceDetail/uploadErr.png'; let icoUrl = '/static/images/common/uploadErr.png';
let borderColor = "#e034344d"; let borderColor = "#e034344d";
let buttonBgColor = "#E03434"; let buttonBgColor = "#E03434";
if (isSucc) { if (isSucc) {

View File

@ -2,7 +2,7 @@
<view class="contentBg maincontent"> <view class="contentBg maincontent">
<view class="main"> <view class="main">
<view class="center"> <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>
<view class="txt" style="margin-top: 30rpx;"> <view class="txt" style="margin-top: 30rpx;">
注销账号后账号将永久失效且不可恢复, 注销账号后账号将永久失效且不可恢复,

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,11 +1,12 @@
var MsgType = { var MsgType = {
error: "error", error: "error",
succ: "succ", succ: "succ",
warn: "warn" warn: "warn",
info:'info'
} }
var time = null; var time = null;
// 显示成功 // 显示成功
export const MsgSuccess = (msg, btnTxt, ev) => { export const MsgSuccess = (msg, btnTxt, ev,tapCallback) => {
if (!ev) { if (!ev) {
@ -15,13 +16,13 @@ export const MsgSuccess = (msg, btnTxt, ev) => {
return null; 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); createClear(ev);
return option; return option;
} }
//显示失败 //显示失败
export const MsgError = (msg, btnTxt, ev) => { export const MsgError = (msg, btnTxt, ev,tapCallback) => {
if (!ev) { if (!ev) {
@ -32,12 +33,12 @@ export const MsgError = (msg, btnTxt, ev) => {
return null; 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); createClear(ev);
return option; return option;
} }
//显示警告 //显示警告
export const MsgWarning = (msg, btnTxt, ev, isClear) => { export const MsgWarning = (msg, btnTxt, ev, isClear,tapCallback) => {
if (!ev) { if (!ev) {
return null; return null;
@ -46,7 +47,7 @@ export const MsgWarning = (msg, btnTxt, ev, isClear) => {
return null; 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) { if (isClear === undefined || isClear) {
createClear(ev); 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 // 隐藏loading
export const MsgClose = (options, ev) => { export const MsgClose = (options, ev) => {
@ -109,7 +128,7 @@ const createClear = (ev) => {
showPop({ showPop({
key: key, key: key,
message: "消息太多, 是否全部关闭", message: "消息太多, 是否全部关闭",
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png", iconUrl: "/static/images/common/uploadErr.png",
borderColor: "#e034344d", borderColor: "#e034344d",
buttonBgColor: "#E03434", buttonBgColor: "#E03434",
buttonText: '全部关闭', buttonText: '全部关闭',