From 37f5047a46c6e1844a57ad1c1fbbd477feac6333 Mon Sep 17 00:00:00 2001 From: liub Date: Mon, 30 Mar 2026 13:17:47 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AE=8C=E6=88=906075J=E8=93=9D=E7=89=99?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 2 +- App.vue | 5 +- components/TextToHex/TextToHexV1.vue | 6 +- pages/018A/HBY018A.vue | 4 +- pages/100/HBY100.vue | 10 +- pages/100J/HBY100-J.vue | 4 +- pages/102/HBY102.vue | 57 +-- pages/210/HBY210.vue | 4 +- pages/4877/BJQ4877.vue | 4 +- pages/4877/BJQ4877V1.vue | 4 +- pages/6075/BJQ6075.vue | 4 +- pages/6075J/BJQ6075J.vue | 403 ++++++++++++--------- pages/6107/BJQ6107.vue | 4 +- pages/6155/BJQ6155.vue | 4 +- pages/6155/deviceDetail.vue | 4 +- pages/6170/deviceControl/index.vue | 104 +++++- pages/6331/BJQ6331.vue | 4 +- pages/650/HBY650.vue | 4 +- pages/670/HBY670.vue | 4 +- pages/7305/BJQ7305.vue | 4 +- pages/common/addBLE/addEquip.vue | 11 +- pages/common/addScan/ScanEquip.vue | 5 +- pages/common/callPolice/index.vue | 2 +- pages/common/index/index.vue | 50 +-- pages/common/user/index.vue | 10 +- static/images/6155/DeviceDetail/battry.png | Bin 268 -> 0 bytes static/images/6155/DeviceDetail/time.png | Bin 321 -> 0 bytes static/images/common/dl.png | Bin 244 -> 0 bytes static/images/common/nz.png | Bin 382 -> 0 bytes utils/BleHelper.js | 2 +- utils/BleReceive.js | 32 +- utils/Common.js | 2 +- 32 files changed, 472 insertions(+), 281 deletions(-) delete mode 100644 static/images/6155/DeviceDetail/battry.png delete mode 100644 static/images/6155/DeviceDetail/time.png delete mode 100644 static/images/common/dl.png delete mode 100644 static/images/common/nz.png diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 95fb682..92f9bed 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -7,7 +7,7 @@ }, { "customPlaygroundType" : "local", - "playground" : "standard", + "playground" : "custom", "type" : "uni-app:app-android" }, { diff --git a/App.vue b/App.vue index 7988fae..5f1c716 100644 --- a/App.vue +++ b/App.vue @@ -3,7 +3,7 @@ import upgrade from '@/utils/update.js'; // 延迟断开蓝牙:选择文件/录音等会触发 onHide,8 秒内返回则不断开 - const BLE_DISCONNECT_DELAY = 8000; + const BLE_DISCONNECT_DELAY = 30000; let _bleDisconnectTimer = null; export default { @@ -74,6 +74,9 @@ initOS(); } + + let system=uni.getSystemInfoSync(); + console.log("system=",system); // #endif }, onShow: function() { diff --git a/components/TextToHex/TextToHexV1.vue b/components/TextToHex/TextToHexV1.vue index d3237ad..36612d1 100644 --- a/components/TextToHex/TextToHexV1.vue +++ b/components/TextToHex/TextToHexV1.vue @@ -124,9 +124,10 @@ */ async drawAndGetPixels() { // 第一次调用时先预热画布(解决APP重新打开后第一次获取数据不完整的问题) - await this.warmupCanvas(); + // await this.warmupCanvas(); let convertCharToMatrix=function(imageData) { + debugger; // console.log("imgData=",imageData) let matrix = []; @@ -166,6 +167,7 @@ } let drawTxt=async (textLine)=> { + debugger; let result = {}; let ctx = this.ctx; @@ -226,7 +228,7 @@ let arr = []; // 循环处理每行文本 for (let i = 0; i < this.validTxts.length; i++) { - +debugger; let linePixls = []; let item = this.validTxts[i]; diff --git a/pages/018A/HBY018A.vue b/pages/018A/HBY018A.vue index 36fa6c6..176d060 100644 --- a/pages/018A/HBY018A.vue +++ b/pages/018A/HBY018A.vue @@ -7,14 +7,14 @@ - + {{formData.sta_PowerPercent}}% 电量 - + {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue index 6b11d7e..6820055 100644 --- a/pages/100/HBY100.vue +++ b/pages/100/HBY100.vue @@ -28,14 +28,14 @@ - + {{formData.sta_battery}}% 电量 - + {{formData.sta_system?dic.sta_system[formData.sta_system]:"" }} 设备状态 @@ -475,9 +475,9 @@ sta_system: { "0": '关机', - "1": '仅充电', - "2": '开机未充电', - "3": '开机且充电', + "1": '充电中',//仅充电 + "2": '未充电',//开机未充电 + "3": '充电中',//开机且充电 "": "" } diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 97bac15..5083e56 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -11,7 +11,7 @@ - + {{ deviceInfo.batteryPercentage }}% @@ -20,7 +20,7 @@ - + {{ Math.floor((Number(deviceInfo.batteryRemainingTime) || 0) / 60) }}小时 diff --git a/pages/102/HBY102.vue b/pages/102/HBY102.vue index d7c368e..7f1adab 100644 --- a/pages/102/HBY102.vue +++ b/pages/102/HBY102.vue @@ -28,14 +28,14 @@ - + {{formData.sta_PowerPercent}}% 电量 - + {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} @@ -526,7 +526,7 @@ these.formData.bleStatu = true; }); } - + this.getWarns(); // this.getLinkedCnt(); }, computed: { @@ -673,7 +673,7 @@ } let warnKey = "102_" + these.device.id + "_warning"; - let linkKey = "102_" + these.device.id + "_linked"; + // let linkKey = "102_" + these.device.id + "_linked"; let p1 = new Promise((succ, err) => { uni.getStorage({ key: warnKey, @@ -690,33 +690,33 @@ }); }); - let p2 = new Promise((succ, err) => { - uni.getStorage({ - key: linkKey, - success(res) { - console.error("获取到联机数据", res); - let data = res.data; - let fs = data.filter(v => { - return !v.read - }); - console.error("未读联机数据", fs); - succ(fs); - }, - fail(ex) { - err(null); - } - }); - }); + // let p2 = new Promise((succ, err) => { + // uni.getStorage({ + // key: linkKey, + // success(res) { + // console.error("获取到联机数据", res); + // let data = res.data; + // let fs = data.filter(v => { + // return !v.read + // }); + // console.error("未读联机数据", fs); + // succ(fs); + // }, + // fail(ex) { + // err(null); + // } + // }); + // }); - Promise.allSettled([p1, p2]).then(results => { + Promise.allSettled([p1]).then(results => { let fs = []; if (results[0].status == 'fulfilled') { fs = fs.concat(results[0].value); } - if (results[1].status == 'fulfilled') { - fs = fs.concat(results[1].value); - } + // if (results[1].status == 'fulfilled') { + // fs = fs.concat(results[1].value); + // } console.error("获取到未读消息", fs); these.$set(these.Status.navbar.icons[0], "math", fs.length); }); @@ -945,7 +945,7 @@ sosSetting(item, isOk) { - +debugger; if (!this.permissions.includes('46') && this.Status.apiType !== 'listA') { this.showPop({ @@ -1034,7 +1034,8 @@ }); } else { - task(item.key); + let newval=this.formData.sta_LedType===item.key?'led_off':item.key; + task(newval); } } @@ -1155,7 +1156,7 @@ this.Status.BottomMenu.activeIndex = active; let msg = []; - if (json.sta_PowerPercent <= 20 && (json.sta_charge === 0 || json.sta_charge === '0')) { + if (json.sta_PowerPercent <= 20 && json.sta_PowerPercent!=this.formData.sta_PowerPercent && (json.sta_charge === 0 || json.sta_charge === '0')) { msg.push("设备电量低"); } diff --git a/pages/210/HBY210.vue b/pages/210/HBY210.vue index 9e6f65f..dc931a7 100644 --- a/pages/210/HBY210.vue +++ b/pages/210/HBY210.vue @@ -18,14 +18,14 @@ - + {{deviceInfo.batteryPercentage}}% 电量 - + {{deviceInfo.batteryRemainingTime}}分钟 续航时间 diff --git a/pages/4877/BJQ4877.vue b/pages/4877/BJQ4877.vue index 9cd023d..9c3c0c2 100644 --- a/pages/4877/BJQ4877.vue +++ b/pages/4877/BJQ4877.vue @@ -26,14 +26,14 @@ - + {{formData.sta_PowerPercent}}% 电量 - + + + + + @@ -405,7 +423,7 @@ Status: { pageHide: null }, - inteval: 120 + inteval: 1000 } }, computed: { @@ -461,8 +479,7 @@ }, getDevice: function() { if (ble) { - console.log("LinkedList=", ble.data.LinkedList); - console.log("this.device=", this.itemInfo); + let f = ble.data.LinkedList.find((v) => { if (v.macAddress == this.itemInfo.deviceMac) { if (!this.formData.deviceId) { @@ -926,6 +943,7 @@ }, + // 激光确认框提交 handleBtn() { @@ -1561,16 +1579,69 @@ // 强制报警() handlePolice() { this.popupType = 'cancel'; - this.popupMessage = '确认要解除所选设备的报警状态'; + this.popupMessage = '确认解除报警状态'; this.showPopupFlag = true; + // this.popupConfirmText=""; }, + OpenWarn(val){//开启/解除强制报警 + const topic = `B/${this.itemInfo.deviceImei}`; + let message={"instruct":[7,val,0,0,0,0]}; + message=JSON.stringify(message); + + let flag=this.mqttClient.publish(topic, message, { + qos: 1 + }); + if(flag){ + this.itemInfo.alarmStatus=val; + } + + this.showPopupFlag = false; + }, + warnToggle(){ + if(this.itemInfo.alarmStatus==1){ + this.popupType = 'cancel'; + this.popupMessage = '确认解除报警状态'; + + }else{ + this.popupType = 'openWarn'; + this.popupMessage = '确认开启报警状态'; + + } + this.showPopupFlag = true; + // this.popupConfirmText="开启"; + // let val=1; + // let msg="确认开启强制报警?"; + // if(this.itemInfo.alarmStatus==1){ + // val=0; + // msg="确认解除强制报警?"; + // } + + // let mqSend=()=>{ + // const topic = `B/${this.itemInfo.deviceImei}`; + // let message={"instruct":[7,val,0,0,0,0]}; + // message=JSON.stringify(message); + + // let flag=this.mqttClient.publish(topic, message, { + // qos: 1 + // }); + // if(flag){ + // this.itemInfo.alarmStatus=val; + // } + + // } + + + + }, + // 解除报警逻辑 async onPopupConfirmPolice() { if (this.deviceInfo.onlineStatus !== 1) { - uni.showToast({ - title: '设备已离线', - icon: 'none' - }); + // uni.showToast({ + // title: '设备已离线', + // icon: 'none' + // }); + this.OpenWarn(0);//走mq直发 return; } this.isPolling = true; // 标记开始轮询 @@ -1595,8 +1666,10 @@ title: registerRes.msg, icon: 'none' }) + return } + this.itemInfo.alarmStatus=0; // 4. 获取设备状态FunctionAccessBatchStatusRule 批量 let deviceImei = this.itemInfo.deviceImei let typeName = this.itemInfo.typeName @@ -2210,6 +2283,11 @@ width: 47%; display: flex; text-align: center; + box-sizing: border-box; + border: 1rpx solid #00000000; + } + .mode-v1.active{ + border:1rpx solid #bbe600 !important; } .mode-v2 { diff --git a/pages/6331/BJQ6331.vue b/pages/6331/BJQ6331.vue index c372de2..0b52b2a 100644 --- a/pages/6331/BJQ6331.vue +++ b/pages/6331/BJQ6331.vue @@ -6,14 +6,14 @@ - + {{formData.battary}}% 电量 - + {{formData.xuhang}} 续航时间 diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index 081ac7e..dd3d34b 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -27,14 +27,14 @@ - + {{formData.battary}}% 电量 - + {{formData.xuhang}} 续航时间 diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index 1187d22..1b9238b 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -22,14 +22,14 @@ - + {{formData.battary}}% 电量 - + {{formData.xuhang}} 续航时间 diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index 0fe2112..2940bbd 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -26,14 +26,14 @@ - + {{formData.battary}}% 电量 - + {{formData.xuhang}} 续航时间 diff --git a/pages/common/addBLE/addEquip.vue b/pages/common/addBLE/addEquip.vue index ac06bba..ba8ec17 100644 --- a/pages/common/addBLE/addEquip.vue +++ b/pages/common/addBLE/addEquip.vue @@ -530,7 +530,7 @@ ble.StartSearch().then(result => { // console.log("开始搜索成功", result); - + these.Status.BottomMenu.show=false; }).catch(err => { console.error("开始搜索失败:", err); if (err.code === 10001) { @@ -582,6 +582,9 @@ ble.showBlueSetting(false); }, DeviceVerdict(deviceId) { //判断是否是目标设备 + if (these.Status.isPageHidden) { + return; + } console.log("deviceid=", deviceId); console.log("these.device=", these.device) if (these.device) { //从设备详情过来的,回设备详情去 @@ -618,6 +621,9 @@ } //找到目标设备的处理方法 let deviceOK = () => { + if (these.Status.isPageHidden) { + return; + } hideLoading(these); eventChannel.emit('BindOver', these.device); @@ -779,6 +785,9 @@ execLink().then((res) => { console.log("res=", res); + if(this.Status.isPageHidden){ + return; + } linkCallback(res); }).catch(ex => { console.error("ex=", ex) diff --git a/pages/common/addScan/ScanEquip.vue b/pages/common/addScan/ScanEquip.vue index dc6bb27..ac99392 100644 --- a/pages/common/addScan/ScanEquip.vue +++ b/pages/common/addScan/ScanEquip.vue @@ -24,7 +24,7 @@ - + 对准二维码进行扫描 @@ -284,9 +284,10 @@ .btnOK { color: rgba(255, 255, 255, 0.6); font-family: 'PingFang SC'; - font-size: 30rpx; + font-size: 40rpx; font-weight: 400; letter-spacing: 5rpx; + margin-top: 20rpx; } .btnOK.active { diff --git a/pages/common/callPolice/index.vue b/pages/common/callPolice/index.vue index 920a09a..4df8bfc 100644 --- a/pages/common/callPolice/index.vue +++ b/pages/common/callPolice/index.vue @@ -363,7 +363,7 @@ } //统一通信协议方法 let CommonSend = () => { - let json=JSON.stringify({ins_ShakeBit:1}); + let json=JSON.stringify({ins_ShakeBit:isAlarming?1:0}); for (let i = 0; i < deviceImeiList.length; i++) { let imei = deviceImeiList[i]; mq.sendData("B/"+imei,json,false); diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue index a734c0d..1fbee95 100644 --- a/pages/common/index/index.vue +++ b/pages/common/index/index.vue @@ -18,13 +18,10 @@ - + 报警 位置 - 发送信息 + 发送信息 -1 + ShowSendmessage() { + return this.dic.showMsgTypes.indexOf(this.activeTabInfo.typeName) > -1 }, - showMap(){ - return this.dic.showMapTypes.indexOf(this.activeTabInfo.typeName)>-1 + showMap() { + return this.dic.showMapTypes.indexOf(this.activeTabInfo.typeName) > -1 }, - showWarn(){ - return this.dic.showCallPolice.indexOf(this.activeTabInfo.typeName)>-1 + showWarn() { + return this.dic.showCallPolice.indexOf(this.activeTabInfo.typeName) > -1 } }, data() { @@ -254,10 +251,15 @@ deviceName: "", //重命名 activeTabInfo: '', dic: { - showMsgTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'BJQ6075J'],//需要发送消息的类型 - showMapTypes:['BJQ6170','HBY210','HBY670','BJQ6075','HBY018A','HBY100-J','BJQ6075J','HBY008A','HBY100-Y'],//需要显示地图的类型 - showCallPolice:['BJQ6170','HBY210','HBY670','BJQ6075','HBY018A','HBY100-J','BJQ6075J','HBY008A','HBY100-Y']//需要发送报警的类型 - } + showMsgTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'BJQ6075J'], //需要发送消息的类型 + showMapTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J', 'HBY008A', + 'HBY100-Y' + ], //需要显示地图的类型 + showCallPolice: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J', + 'HBY008A', 'HBY100-Y' + ] //需要发送报警的类型 + }, + isPageShow: true } }, methods: { @@ -299,8 +301,11 @@ this.updateBleStatu(); }, bleStateRecovery() { - console.log("蓝牙适配器恢复可用,重连断开的设备"); - ble.linkAllDevices(); + if (this.isPageShow) { + console.log("蓝牙适配器恢复可用,重连断开的设备"); + ble.linkAllDevices(); + } + }, bleBreak(res) { @@ -738,8 +743,11 @@ .filter(Boolean); }, }, + onHide() { + this.isPageShow = false; + }, onShow() { - + this.isPageShow = true; if (ble) { //因为vue视图只能后退不能隐藏后再显示 //所以回到首页后将其他所有页面的订阅都删除 diff --git a/pages/common/user/index.vue b/pages/common/user/index.vue index 74d9807..a18efb8 100644 --- a/pages/common/user/index.vue +++ b/pages/common/user/index.vue @@ -77,6 +77,8 @@ import { Logout } from '@/api/common/login.js' + import bleTool from '@/utils/BleHelper.js'; + var ble=null; export default { data() { return { @@ -87,6 +89,7 @@ }, onLoad() { var these=this; + ble=bleTool.getBleTool(); uni.getSystemInfo({ success(res) { if(res.uniPlatform=='app'){ @@ -139,7 +142,12 @@ uni.showToast({ title: '退出成功', icon: 'success' - }) + }); + if(ble){ + ble.StopSearch().catch(ex => {}); + ble.disconnectDevice().catch(ex => {}); + } + uni.reLaunch({ url: '/pages/common/login/index' }); diff --git a/static/images/6155/DeviceDetail/battry.png b/static/images/6155/DeviceDetail/battry.png deleted file mode 100644 index 7c812ac2627a9f8c2e01f4ea9bd092353763576c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkh3?$9N*lqwR#^NA%C&rs6b?Si}l>na*S0K&s zpMhaj8pFmUhV^L->rxrEWHM~dU|5sJusR)t)})`Fo!kdh##0jH7tFxOFQu#|C_VZA z$(Y$Ojz@vwb)GJcAr*6y6A}cBIFB-%>*8@Z(5A`A#Obgy=uOZ=3)99eosTAQr34&R z6+M#B<*ha2py>1v4raZX7cLxBxoRoQx<$!z;i)q*Rvt^r-XGJvYFQk@r6}5Ky?{+a z>!XU4^KW@wqr@tM^Vj1JC-ng6pgRovaNAdJ;x-*&?~O;dcq{}T98jXUHx3v IIVCg!0Q5~+X#fBK diff --git a/static/images/6155/DeviceDetail/time.png b/static/images/6155/DeviceDetail/time.png deleted file mode 100644 index 68a4826c51a3794c4e2468a61285dac913f240b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^8bGYY!VDyhC0Ig%6k~CayA$KhlREW44u618h%1o( ze>~v-alij3eE*;DlkI#V0Tf~_3GxeOaA?^7|C^}9H=w|IPZ!6KiaC2H-R3>4z~jnW z!VqN0u!zTDG0y~+_x8aXPj7y*Jm~6g*5muOIkNp&d?b16`^ipc)NcsPXE@EIura_j z$5XJxg}+Tsnbku(-s7aA;b|@x-VpU=6=5ugT~*(i3L1Lw@NCWh(9&z{f57jSfXH6! zpQ7d4&G*UL{f^w3Vz9HmHm%u4&EMYH@X&#PI^Or^%r&ywW<7W*b3X0&#I79sn!vh= z`QtH#u4N>LH)`48ngC99FMT|K_}xA@O#~lf8z2 RP6NHh;OXk;vd$@?2>@A*eh2^n diff --git a/static/images/common/dl.png b/static/images/common/dl.png deleted file mode 100644 index 1e17edb26b2492db831babfa58db87342ca72b30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkh3?$9N*lqwR=>VS)SB4d-KqkYgbcR)F3@cI? z)}%8m%>=Pmr|)Oz76eLhlmz(&t1+CMEEOZjzwvfy5>Twc)5S5w;&ifrh)8+D0S2Ac zrY4@IB%TOIr2wu)?7{ODn0bP0l+XkKGvQ1B diff --git a/static/images/common/nz.png b/static/images/common/nz.png deleted file mode 100644 index 8b99e567b289b69bc6e6222e40237c350a53281f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 382 zcmV-^0fGLBP) { //订阅消息 - // console.log("收到订阅消息", receive); + console.log("收到订阅消息", receive); let f = this.data.LinkedList.find((v) => { return v.deviceId == receive.deviceId; }) diff --git a/utils/BleReceive.js b/utils/BleReceive.js index 4793bb0..17341ae 100644 --- a/utils/BleReceive.js +++ b/utils/BleReceive.js @@ -14,7 +14,8 @@ class BleReceive { '/pages/100/HBY100': this.Receive_100.bind(this), '/pages/102/HBY102': this.Receive_102.bind(this), '/pages/6170/deviceControl/index':this.Receive_6170.bind(this), - '/pages/100J/HBY100-J': this.Receive_100J.bind(this) + '/pages/100J/HBY100-J': this.Receive_100J.bind(this), + '/pages/6075J/BJQ6075J':this.Receive_6075.bind(this) }; } @@ -893,7 +894,36 @@ Receive_6170(receive, f, path, recArr) { } + Receive_6075(receive,f,path,recArr){ + let receiveData = {}; + + try { + receiveData = JSON.parse(receive.str); + + let recCnt = recArr.find(v => { + return v.key.replace(/\//g, "").toLowerCase() == f.device.detailPageUrl + .replace(/\//g, "").toLowerCase(); + }); + if (!recCnt) { + // if (receiveData.sta_PowerPercent <= 20) { + // uni.showModal({ + // title: "提示", + // content: "设备'" + f.device.deviceName + "'电量低", + // showCancel: false + // }); + // } + + + } + + } catch (error) { + receiveData = {}; + console.log("文本解析失败", error) + } + return receiveData; + + } } diff --git a/utils/Common.js b/utils/Common.js index 58f0695..5d501b9 100644 --- a/utils/Common.js +++ b/utils/Common.js @@ -282,7 +282,7 @@ export default { value: "46", label: "手动报警", checked: false, - type: ['210','102'] + type: ['210','102','6170'] }, { value: "47", -- 2.43.5 From 6654ee54b508213c80e8a7ed2b0645790abcac40 Mon Sep 17 00:00:00 2001 From: liub Date: Wed, 1 Apr 2026 08:46:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?008A=E5=8A=9F=E8=83=BD=E5=BC=80=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 2 +- components/MsgBox/MsgBox.vue | 6 +- pages.json | 2 +- pages/018A/HBY018A.vue | 8 +- pages/100/HBY100.vue | 16 +- pages/100J/audioManager/AudioList.vue | 2 +- pages/100J/audioManager/Recording.vue | 2 +- pages/102/HBY102.vue | 18 +- pages/4877/BJQ4877.vue | 18 +- pages/4877/BJQ4877CheckColor.vue | 2 +- pages/4877/BJQ4877V1.vue | 8 +- pages/6075J/BJQ6075J.vue | 16 +- pages/6107/BJQ6107.vue | 6 +- pages/6155/BJQ6155.vue | 36 +- pages/6155/deviceDetail.vue | 24 +- pages/6170/deviceControl/index.vue | 6 +- pages/6331/BJQ6331.vue | 4 +- pages/650/HBY650.vue | 26 +- pages/670/HBY670.vue | 44 +- pages/7305/BJQ7305.vue | 24 +- pages/common/addDevice/addBle.vue | 537 ++++++++++++------ pages/common/audioManager/AudioList.vue | 2 +- pages/common/audioManager/Recording.vue | 2 +- pages/common/user/logOff.vue | 2 +- .../DeviceDetail => common}/uploadErr.png | Bin utils/MsgPops.js | 35 +- 26 files changed, 532 insertions(+), 316 deletions(-) rename static/images/{6155/DeviceDetail => common}/uploadErr.png (100%) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 92f9bed..95fb682 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -7,7 +7,7 @@ }, { "customPlaygroundType" : "local", - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" }, { diff --git a/components/MsgBox/MsgBox.vue b/components/MsgBox/MsgBox.vue index 8cefd65..c7a7d52 100644 --- a/components/MsgBox/MsgBox.vue +++ b/components/MsgBox/MsgBox.vue @@ -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" } } diff --git a/pages.json b/pages.json index 64d3058..772c296 100644 --- a/pages.json +++ b/pages.json @@ -429,7 +429,7 @@ { "path": "pages/common/addDevice/addBle", "style": { - "navigationBarTitleText": "蓝牙添加设备" + "navigationStyle": "custom" } }, { diff --git a/pages/018A/HBY018A.vue b/pages/018A/HBY018A.vue index 176d060..8be3957 100644 --- a/pages/018A/HBY018A.vue +++ b/pages/018A/HBY018A.vue @@ -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) { diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue index 6820055..edc6b87 100644 --- a/pages/100/HBY100.vue +++ b/pages/100/HBY100.vue @@ -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) { diff --git a/pages/100J/audioManager/AudioList.vue b/pages/100J/audioManager/AudioList.vue index 6ec61c5..45fb2af 100644 --- a/pages/100J/audioManager/AudioList.vue +++ b/pages/100J/audioManager/AudioList.vue @@ -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) { diff --git a/pages/100J/audioManager/Recording.vue b/pages/100J/audioManager/Recording.vue index 2ff2e10..3563803 100644 --- a/pages/100J/audioManager/Recording.vue +++ b/pages/100J/audioManager/Recording.vue @@ -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) { diff --git a/pages/102/HBY102.vue b/pages/102/HBY102.vue index 7f1adab..1ab809c 100644 --- a/pages/102/HBY102.vue +++ b/pages/102/HBY102.vue @@ -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) { diff --git a/pages/4877/BJQ4877.vue b/pages/4877/BJQ4877.vue index 9c3c0c2..a6da37e 100644 --- a/pages/4877/BJQ4877.vue +++ b/pages/4877/BJQ4877.vue @@ -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) { diff --git a/pages/4877/BJQ4877CheckColor.vue b/pages/4877/BJQ4877CheckColor.vue index c258f59..d1637b4 100644 --- a/pages/4877/BJQ4877CheckColor.vue +++ b/pages/4877/BJQ4877CheckColor.vue @@ -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) { diff --git a/pages/4877/BJQ4877V1.vue b/pages/4877/BJQ4877V1.vue index 1491555..153718a 100644 --- a/pages/4877/BJQ4877V1.vue +++ b/pages/4877/BJQ4877V1.vue @@ -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) { diff --git a/pages/6075J/BJQ6075J.vue b/pages/6075J/BJQ6075J.vue index e9c6e12..d6310a2 100644 --- a/pages/6075J/BJQ6075J.vue +++ b/pages/6075J/BJQ6075J.vue @@ -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: '去连接', diff --git a/pages/6107/BJQ6107.vue b/pages/6107/BJQ6107.vue index 3d0d043..84fb5db 100644 --- a/pages/6107/BJQ6107.vue +++ b/pages/6107/BJQ6107.vue @@ -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" }, diff --git a/pages/6155/BJQ6155.vue b/pages/6155/BJQ6155.vue index 4d2b5da..65de89b 100644 --- a/pages/6155/BJQ6155.vue +++ b/pages/6155/BJQ6155.vue @@ -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, diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue index ef29fc8..2420b44 100644 --- a/pages/6155/deviceDetail.vue +++ b/pages/6155/deviceDetail.vue @@ -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, diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 3010b2b..37b46ba 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -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); diff --git a/pages/6331/BJQ6331.vue b/pages/6331/BJQ6331.vue index 0b52b2a..0c21335 100644 --- a/pages/6331/BJQ6331.vue +++ b/pages/6331/BJQ6331.vue @@ -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: '去连接', diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index dd3d34b..a42aa07 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -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", }); diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index 1b9238b..dd054e8 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -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", }); diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index 2940bbd..32b4d38 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -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", }); diff --git a/pages/common/addDevice/addBle.vue b/pages/common/addDevice/addBle.vue index 0063bf4..509d0b2 100644 --- a/pages/common/addDevice/addBle.vue +++ b/pages/common/addDevice/addBle.vue @@ -1,6 +1,22 @@ @@ -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; + } \ No newline at end of file diff --git a/pages/common/audioManager/AudioList.vue b/pages/common/audioManager/AudioList.vue index 1015b47..9f8267d 100644 --- a/pages/common/audioManager/AudioList.vue +++ b/pages/common/audioManager/AudioList.vue @@ -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) { diff --git a/pages/common/audioManager/Recording.vue b/pages/common/audioManager/Recording.vue index d960fc5..1eeb44f 100644 --- a/pages/common/audioManager/Recording.vue +++ b/pages/common/audioManager/Recording.vue @@ -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) { diff --git a/pages/common/user/logOff.vue b/pages/common/user/logOff.vue index 34ded02..628d251 100644 --- a/pages/common/user/logOff.vue +++ b/pages/common/user/logOff.vue @@ -2,7 +2,7 @@ - + 注销账号后账号将永久失效且不可恢复, diff --git a/static/images/6155/DeviceDetail/uploadErr.png b/static/images/common/uploadErr.png similarity index 100% rename from static/images/6155/DeviceDetail/uploadErr.png rename to static/images/common/uploadErr.png diff --git a/utils/MsgPops.js b/utils/MsgPops.js index 295ba05..fd61c84 100644 --- a/utils/MsgPops.js +++ b/utils/MsgPops.js @@ -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: '全部关闭', -- 2.43.5 From 4391d30f86d17d1cd27adcc68d256631a6a5b4e3 Mon Sep 17 00:00:00 2001 From: liub Date: Thu, 2 Apr 2026 08:45:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8A=A0=E5=85=A5008A=E6=96=B0=E4=BA=A7?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/MsgBox/MsgBox.vue | 2 +- pages.json | 7 + pages/008A/HBY008A.vue | 1268 ++++++++++++++++++++++++++++ pages/6075J/BJQ6075J.vue | 8 +- pages/6170/deviceControl/index.vue | 16 +- pages/650/HBY650.vue | 11 +- pages/670/HBY670.vue | 8 +- pages/common/addDevice/addBle.vue | 17 +- 8 files changed, 1298 insertions(+), 39 deletions(-) create mode 100644 pages/008A/HBY008A.vue diff --git a/components/MsgBox/MsgBox.vue b/components/MsgBox/MsgBox.vue index c7a7d52..41f8d0c 100644 --- a/components/MsgBox/MsgBox.vue +++ b/components/MsgBox/MsgBox.vue @@ -130,7 +130,7 @@ return json; }, - //弹出预定好的三种弹窗 + //弹出预定好的四种弹窗 showMsg(msg, btnTxt, type, okCallback) { let cfg = { diff --git a/pages.json b/pages.json index 772c296..e06e62d 100644 --- a/pages.json +++ b/pages.json @@ -446,6 +446,13 @@ "navigationStyle": "custom", "fullscreen": true } + }, + { + "path" : "pages/008A/HBY008A", + "style" : + { + "navigationBarTitleText" : "HBY008A" + } } ], diff --git a/pages/008A/HBY008A.vue b/pages/008A/HBY008A.vue new file mode 100644 index 0000000..6293c63 --- /dev/null +++ b/pages/008A/HBY008A.vue @@ -0,0 +1,1268 @@ + + + + + \ No newline at end of file diff --git a/pages/6075J/BJQ6075J.vue b/pages/6075J/BJQ6075J.vue index d6310a2..9017abb 100644 --- a/pages/6075J/BJQ6075J.vue +++ b/pages/6075J/BJQ6075J.vue @@ -1067,13 +1067,7 @@ '0')); // 包序号 - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + dataView.setUint16(3, packetData.length*2,false); // 包t长度 // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 37b46ba..49e0c3c 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -141,7 +141,7 @@ + :color="'#000000'" :fontSize="14" :returnType="10" /> 人员信息登记 @@ -423,7 +423,7 @@ Status: { pageHide: null }, - inteval: 1000 + inteval: 200 } }, computed: { @@ -921,7 +921,7 @@ json.instruct[1] = parseInt(selectedItem.instructValue); ble.sendString(f.deviceId, json).then(res => { - console.log("ble send success") + console.log("ble send success",json); this.lightModeA = false; }).catch(ex => { console.error("ble send fail,mqsending....") @@ -1226,15 +1226,9 @@ dataView.setUint8(0, 0x55); // 帧头 dataView.setUint8(1, 0x02); // 帧类型:开机画面 dataView.setUint8(2, currentPacket); // 包序号 + dataView.setUint16(3, packetData.length*2,false); // 包t长度 - - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index a42aa07..25866bc 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -975,17 +975,10 @@ import request, { baseURL } from '@/utils/request.js'; // 填充头部 dataView.setUint8(0, 0x55); // 帧头 dataView.setUint8(1, 0x02); // 帧类型:开机画面 - dataView.setUint8(2, '0x' + currentPacket.toString(16).padStart(2, - '0')); // 包序号 + dataView.setUint8(2, currentPacket); // 包序号 - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + dataView.setUint16(3, packetData.length*2,false); // 包t长度 // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index dd054e8..51c0e12 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -1799,13 +1799,7 @@ '0')); // 包序号 - if (packetData.length == 250) { - dataView.setUint8(3, 0x01); - dataView.setUint8(4, 0xF4); - } else { - dataView.setUint8(3, 0x00); - dataView.setUint8(4, 0x64); - } + dataView.setUint16(3, packetData.length*2,false); // 包t长度 // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { diff --git a/pages/common/addDevice/addBle.vue b/pages/common/addDevice/addBle.vue index 509d0b2..6b76de8 100644 --- a/pages/common/addDevice/addBle.vue +++ b/pages/common/addDevice/addBle.vue @@ -125,7 +125,8 @@ MsgClose, MsgWarning, showPop, - MsgClear + MsgClear, + MsgInfo } from '@/utils/MsgPops.js'; import MQTT from '@/utils/MqHelper.js'; @@ -412,8 +413,7 @@ } - 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,''); @@ -557,13 +557,22 @@ setTimeout(()=>{ - MsgSuccess("如需要在PC上查看此数据,请复制链接后在PC端打开,然后点右上角扫码授权","复制链接",these,()=>{ + MsgInfo("如需要在PC上查看此数据,请复制链接后通过微信发送到PC,在PC端打开,然后点右上角扫码授权","复制链接",these,true,()=>{ + console.log("执行复制"); uni.setClipboardData({ data:'https://static-mp-5b7c35fc-f6fe-4100-a2e1-3669e4d4bfc9.next.bspapp.com/AppTools/views/index.html', success(){ uni.showToast({ title:'已复制链接' }); + + + plus.runtime.openURL('weixin://', (err) => { + MsgError("打开微信失败,请手动打开微信粘贴"); + }); + }, + fail(ex){ + console.error("无法复制",ex) } }); }); -- 2.43.5 From aef68d59682e1166a377ba7449d94c984fcd6108 Mon Sep 17 00:00:00 2001 From: liub Date: Fri, 3 Apr 2026 08:48:00 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=B1=E8=B4=A5=E6=97=B6=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/008A/HBY008A.vue | 6 + pages/018A/HBY018A.vue | 169 +++--------- pages/100/HBY100.vue | 222 ++++------------ pages/102/HBY102.vue | 221 ++++++++-------- pages/4877/BJQ4877.vue | 214 +++++++-------- pages/6075J/BJQ6075J.vue | 14 +- pages/6107/BJQ6107.vue | 124 ++++----- pages/6155/BJQ6155.vue | 65 +++-- pages/6155/deviceDetail.vue | 48 ++-- pages/6170/deviceControl/index.vue | 8 + pages/6331/BJQ6331.vue | 85 +++--- pages/650/HBY650.vue | 219 ++++++---------- pages/670/HBY670.vue | 406 +++++++++++++++-------------- pages/7305/BJQ7305.vue | 65 +++-- pages/common/addBLE/LinkBle.vue | 6 +- pages/common/addBLE/addEquip.vue | 3 + pages/common/addDevice/addBle.vue | 10 +- pages/common/index/index.vue | 8 +- utils/BleHelper.js | 4 +- 19 files changed, 851 insertions(+), 1046 deletions(-) diff --git a/pages/008A/HBY008A.vue b/pages/008A/HBY008A.vue index 6293c63..2dd2dc4 100644 --- a/pages/008A/HBY008A.vue +++ b/pages/008A/HBY008A.vue @@ -325,6 +325,9 @@ these.formData.bleStatu = 'connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); }); @@ -351,6 +354,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -480,6 +484,8 @@ updateLoading(these, { text: ex.msg }) + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }).finally(() => { setTimeout(() => { hideLoading(these); diff --git a/pages/018A/HBY018A.vue b/pages/018A/HBY018A.vue index 8be3957..a8a5ae1 100644 --- a/pages/018A/HBY018A.vue +++ b/pages/018A/HBY018A.vue @@ -16,7 +16,8 @@ - {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} + + {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} 设备状态 @@ -54,7 +55,7 @@ + @click="sosSetting(dic.sta_LightType[4],4)"> {{formData.sta_LedType==='led_alarm'?'报警中':'声光报警'}} 解除 @@ -72,7 +73,7 @@ @@ -118,21 +119,13 @@ - - - + - + @@ -144,7 +137,15 @@ showLoading, hideLoading, updateLoading - } from '@/utils/loading.js' + } from '@/utils/loading.js'; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' import request, { baseURL } from '@/utils/request.js' @@ -167,26 +168,7 @@ curr: 0, total: 0, pageHide: false, - Pop: { - showPop: false, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '您确定要这样做吗?', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '设备名称', - modelValue: '', - visibleClose: false, - okCallback: null, - buttonCancelText: '', - showCancel: false, - }, + usrToggle: false, }, @@ -340,7 +322,10 @@ these.formData.deviceId = f.deviceId; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; these.formData.sta_IntrusTime = 0; these.formData.sta_sosadd = ""; these.setBleFormData(); @@ -362,7 +347,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, computed: { @@ -401,7 +389,7 @@ these.setBleFormData(); }).catch(ex => { - this.showMsg(ex.msg); + MsgError(ex.msg,'',these); }); }, @@ -443,7 +431,7 @@ these.setBleFormData(); resolve(); }).catch(ex => { - this.showMsg(ex.msg); + MsgError(ex.msg,'',these); reject(ex); }); }); @@ -451,7 +439,7 @@ } if (item.key == 'led_alarm') { - this.showPop({ + showPop({ message: '确定开启声光报警?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -462,10 +450,10 @@ buttonText: "开启", showCancel: true, buttonCancelText: '取消' - }); + },these); } else { if (this.formData.sta_LedType == 'led_alarm') { - this.showPop({ + showPop({ message: '确定解除声光报警模式?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -482,7 +470,7 @@ showCancel: true, buttonCancelText: '取消' - }); + },these); } else { task(item.key); } @@ -559,7 +547,8 @@ }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + these.formData.bleStatu = 'err'; }).finally(() => { setTimeout(() => { hideLoading(these); @@ -620,7 +609,7 @@ if (msg.length > 0) { - this.showMsg(msg.join(',')); + MsgError(msg.join(','),'',these); } these.setBleFormData(); @@ -655,7 +644,7 @@ }, showBleUnConnect() { - this.showPop({ + showPop({ message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -683,7 +672,7 @@ } }) } - }); + },these); }, proParam: function() { @@ -714,90 +703,10 @@ - closePop: function() { - this.Status.Pop.showPop = false; - - if (this.Status.Pop.cancelCallback) { - this.Status.Pop.cancelCallback(); - } - }, - HidePop: function() { - if (this.Status.Pop.clickEvt == 'SendUsr') { - - } - - - this.Status.Pop.showPop = false; - if (this.Status.Pop.okCallback) { - this.Status.Pop.okCallback(); - } - }, - showPop: function(option) { - // hideLoading(this); - let def = { - showPop: true, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '', - modelValue: '', - visibleClose: false, - okCallback: null, - showSlot: false, - buttonCancelText: '', - showCancel: false, - } - - let keys = Object.keys(def); - - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - if (key in option) { - continue; - } - this.Status.Pop[key] = def[key]; - } - if (option) { - keys = Object.keys(option); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - - this.Status.Pop[key] = option[key]; - } - } - - if (!option.borderColor) { - option.borderColor = '#BBE600'; - option.buttonBgColor = '#BBE600'; - } - these.Status.Pop.showPop = true; - }, - showMsg(msg, isSucc) { - let icoUrl = '/static/images/common/uploadErr.png'; - let borderColor = "#e034344d"; - let buttonBgColor = "#E03434"; - if (isSucc) { - icoUrl = '/static/images/common/success.png'; - borderColor = "#BBE600"; - buttonBgColor = "#BBE600"; - } - this.showPop({ - message: msg, - iconUrl: icoUrl, - borderColor: borderColor, - buttonBgColor: buttonBgColor, - buttonText: '确定', - okCallback: null - }); - } + + + + } } diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue index edc6b87..a07fe3c 100644 --- a/pages/100/HBY100.vue +++ b/pages/100/HBY100.vue @@ -10,7 +10,7 @@ + @click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons"> {{item.math>9?'9+':item.math}} @@ -62,9 +62,9 @@ {{getbleStatu}} + 设备状态 + {{formData.sta_system?dic.sta_system[formData.sta_system]:"" }} + --> @@ -96,9 +96,10 @@ + v-for="item,index in dic.sta_VoiceType" :class="{'active':formData.sta_VoiceType===item.key, + 'displayNone' :!Status.usrToggle && index> + 3 + }"> {{item.name}} @@ -121,12 +122,12 @@ + :class="{'active':formData.sta_VoiceType==='8'}"> + src="/static/images/common/play.png" mode="aspectFit"> + src="/static/images/common/pauseActive.png" mode="aspectFit"> 播放语音 @@ -163,9 +164,9 @@ }" v-on:click.stop="lightTypeSet(item,index)"> + src="/static/images/100/light.png" mode="aspectFit"> + src="/static/images/100/lightActive.png" mode="aspectFit"> @@ -193,8 +194,8 @@ + activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde" + @change="onBrightnessChanged" @changing="onBrightnessChanging" class="custom-slider" /> @@ -205,8 +206,8 @@ + activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde" + @change="onFreqChanged" @changing="onFreqChanging" class="custom-slider" /> @@ -217,8 +218,8 @@ + activeColor="#bbe600" backgroundColor="#686767" block-size="20" block-color="#ffffffde" + @change="onVolumeChanged" @changing="onVolumeChanging" class="custom-slider" /> @@ -246,27 +247,9 @@ - - - - - + + @@ -279,7 +262,15 @@ showLoading, hideLoading, updateLoading - } from '@/utils/loading.js' + } from '@/utils/loading.js'; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js'; import request, { baseURL } from '@/utils/request.js'; @@ -311,26 +302,7 @@ curr: 0, total: 0, pageHide: false, - Pop: { - showPop: false, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '您确定要这样做吗?', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '设备名称', - modelValue: '', - visibleClose: false, - okCallback: null, - buttonCancelText: '', - showCancel: false, - }, + BottomMenu: { show: false, showHeader: true, @@ -520,7 +492,7 @@ this.$watch("formData.sta_battery", (newVal, oldVal) => { if (newVal <= 20 && this.formData.sta_system == 2) { - this.showMsg("设备电量低"); + MsgError("设备电量低",'',these); } }); @@ -582,6 +554,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); these.setBleFormData(); @@ -602,7 +575,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, computed: { @@ -656,14 +632,14 @@ audioManager() { if (!this.permissions.includes('52') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } uni.navigateTo({ @@ -846,7 +822,7 @@ text: "握手成功,等待设备响应" }); }).catch(ex => { - this.showMsg(ex.msg); + MsgError(ex.msg,'',these); }); }, @@ -991,14 +967,14 @@ onFreqChanging(e){ if (!this.permissions.includes('51') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } let f = this.getDevice(); @@ -1043,14 +1019,14 @@ onFreqChanging(e){ if (!this.permissions.includes('50') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -1083,12 +1059,12 @@ onFreqChanging(e){ this.formData.sta_VoiceType = val; these.setBleFormData(); }).catch(ex => { - this.showMsg(ex.msg); + MsgError(ex.msg,'',these); }); }, showUnWarn(val) { - this.showPop({ + showPop({ message: '确定解除声光报警模式?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1102,20 +1078,20 @@ onFreqChanging(e){ showCancel: true, buttonCancelText: '取消' - }); + },these); }, sosSetting(item, isOk) { if (!this.permissions.includes('50') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -1164,7 +1140,7 @@ onFreqChanging(e){ }) .catch(ex => { - this.showMsg(ex.msg); + MsgError(ex.msg,'',these); }); } @@ -1173,7 +1149,7 @@ onFreqChanging(e){ this.showUnWarn(0); } else { - this.showPop({ + showPop({ message: '确定开启强制报警?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1182,7 +1158,7 @@ onFreqChanging(e){ buttonText: "开启", showCancel: true, buttonCancelText: '取消' - }); + },these); } @@ -1371,6 +1347,7 @@ onFreqChanging(e){ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -1393,7 +1370,7 @@ onFreqChanging(e){ }, showBleUnConnect() { - this.showPop({ + showPop({ message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1421,7 +1398,7 @@ onFreqChanging(e){ } }) } - }); + },these); }, proParam: function() { @@ -1452,93 +1429,8 @@ onFreqChanging(e){ - closePop: function() { - this.Status.Pop.showPop = false; - - if (this.Status.Pop.cancelCallback) { - this.Status.Pop.cancelCallback(); - } - }, - HidePop: function() { - if (this.Status.Pop.clickEvt == 'SendUsr') { - - } - - - this.Status.Pop.showPop = false; - if (this.Status.Pop.okCallback) { - this.Status.Pop.okCallback(); - } - }, - showPop: function(option) { - // hideLoading(this); - let def = { - showPop: true, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '', - modelValue: '', - visibleClose: false, - okCallback: null, - showSlot: false, - buttonCancelText: '', - showCancel: false, - } - - let keys = Object.keys(def); - - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - if (key in option) { - continue; - } - this.Status.Pop[key] = def[key]; - } - if (option) { - keys = Object.keys(option); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - - this.Status.Pop[key] = option[key]; - } - } - - if (!option.borderColor) { - option.borderColor = '#BBE600'; - option.buttonBgColor = '#BBE600'; - } - these.Status.Pop.showPop = true; - }, - showMsg(msg, isSucc) { - let icoUrl = '/static/images/common/uploadErr.png'; - let borderColor = "#e034344d"; - let buttonBgColor = "#E03434"; - if (isSucc) { - icoUrl = '/static/images/common/success.png'; - borderColor = "#BBE600"; - buttonBgColor = "#BBE600"; - } - this.showPop({ - message: msg, - iconUrl: icoUrl, - borderColor: borderColor, - buttonBgColor: buttonBgColor, - buttonText: '确定', - okCallback: null - }); - }, - btnClick() { - - } + + } } diff --git a/pages/102/HBY102.vue b/pages/102/HBY102.vue index 1ab809c..57d147c 100644 --- a/pages/102/HBY102.vue +++ b/pages/102/HBY102.vue @@ -10,7 +10,7 @@ + v-for="item,index in Status.navbar.icons"> {{item.math>9?'9+':item.math}} @@ -37,7 +37,8 @@ - {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} + + {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} 设备状态 @@ -60,7 +61,7 @@ 蓝牙状态 - {{getbleStatu}} + {{getbleStatu}} 信道:{{formData.sta_Channel}} @@ -79,7 +80,7 @@ + @click="sosSetting(dic.sta_LightType[6],6)"> {{formData.sta_LedType==='led_alarm'?'报警中':'强制报警'}} 解除 @@ -97,7 +98,7 @@ @@ -125,7 +126,7 @@ {return v.group!=='sta_LedType'})" :class="{'active':formData[item.group]===item.key, 'marginLeft':index%2===1, 'displayNone':!item.show }" v-on:click.stop="actionSett(item,index)"> @@ -172,16 +173,16 @@ + :borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor" + :buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor" + :iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText" + @buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle" + v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText" + :showCancel="Status.Pop.showCancel" @cancelPop="closePop" :showSlot="Status.Pop.showSlot"> 修改信道 + placeholder-class="popup-prompt-input-placeHolder" v-model="formData.ins_Channel" /> @@ -194,6 +195,7 @@ + @@ -211,6 +213,14 @@ } from '@/utils/request.js' import Common from '@/utils/Common.js' + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' const pagePath = "/pages/102/HBY102"; var ble = null; @@ -502,6 +512,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); these.formData.sta_IntrusTime = 0; these.formData.sta_sosadd = ""; @@ -524,7 +535,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } this.getWarns(); // this.getLinkedCnt(); @@ -596,14 +610,14 @@ if (!this.permissions.includes('55') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -772,14 +786,14 @@ if (!this.permissions.includes(item.permission) && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -840,7 +854,7 @@ if (val === 'E49_on') { - this.showPop({ + showPop({ message: '确定开启联机模式?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -852,7 +866,7 @@ showCancel: true, buttonCancelText: '取消' - }); + },these); } else { task(); } @@ -922,7 +936,7 @@ } if (val == 'status_off') { - this.showPop({ + showPop({ message: '确定关闭物体感应功能?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -934,7 +948,7 @@ showCancel: true, buttonCancelText: '取消' - }); + },these); } else { task(); } @@ -945,17 +959,16 @@ sosSetting(item, isOk) { -debugger; if (!this.permissions.includes('46') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -993,7 +1006,7 @@ debugger; these.setBleFormData(); resolve(); }).catch(ex => { - this.showMsg(ex.msg); + MsgError(ex.msg,null,these); reject(ex); }); }); @@ -1001,7 +1014,7 @@ debugger; } if (item.key == 'led_alarm') { - this.showPop({ + showPop({ message: '确定开启强制报警?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1012,10 +1025,10 @@ debugger; buttonText: "开启", showCancel: true, buttonCancelText: '取消' - }); + },these); } else { if (this.formData.sta_LedType == 'led_alarm') { - this.showPop({ + showPop({ message: '确定解除声光报警模式?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1032,7 +1045,7 @@ debugger; showCancel: true, buttonCancelText: '取消' - }); + },these); } else { let newval=this.formData.sta_LedType===item.key?'led_off':item.key; task(newval); @@ -1202,7 +1215,7 @@ debugger; name: deviceName }); } - this.showMsg(msg.join(',')); + MsgError(msg.join(','),'',these); }); return; // clearInterval(instrusionTime); @@ -1222,7 +1235,7 @@ debugger; // this.formData.sta_IntrusTime = 0; } if (msg.length > 0) { - this.showMsg(msg.join(',')); + MsgError(msg.join(','),'',these); } @@ -1346,6 +1359,7 @@ debugger; these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -1367,7 +1381,7 @@ debugger; }, showBleUnConnect() { - this.showPop({ + showPop({ message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1395,7 +1409,7 @@ debugger; } }) } - }); + },these); }, proParam: function() { @@ -1423,93 +1437,76 @@ debugger; } }); }, - - - closePop: function() { - this.Status.Pop.showPop = false; + this.Status.Pop.showPop = false; - if (this.Status.Pop.cancelCallback) { - this.Status.Pop.cancelCallback(); - } - }, - HidePop: function() { - if (this.Status.Pop.clickEvt == 'SendUsr') { + if (this.Status.Pop.cancelCallback) { + this.Status.Pop.cancelCallback(); + } +}, +HidePop: function() { + if (this.Status.Pop.clickEvt == 'SendUsr') { - } + } - this.Status.Pop.showPop = false; - if (this.Status.Pop.okCallback) { - this.Status.Pop.okCallback(); - } - }, - showPop: function(option) { - // hideLoading(this); - let def = { - showPop: true, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '', - modelValue: '', - visibleClose: false, - okCallback: null, - showSlot: false, - buttonCancelText: '', - showCancel: false, - } + this.Status.Pop.showPop = false; + if (this.Status.Pop.okCallback) { + this.Status.Pop.okCallback(); + } +}, +showPop: function(option) { + hideLoading(this); + let def = { + showPop: true, //是否显示弹窗 + popType: 'custom', + bgColor: '#383934bd', + borderColor: '#BBE600', + textColor: '#ffffffde', + buttonBgColor: '#BBE600', + buttonTextColor: '#232323DE', + iconUrl: '', + message: '', + buttonText: '确定', + clickEvt: '', + visiblePrompt: false, + promptTitle: '', + modelValue: '', + visibleClose: false, + okCallback: null, + showSlot: false, + buttonCancelText: '', + showCancel: false, + } - let keys = Object.keys(def); + let keys = Object.keys(def); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - if (key in option) { - continue; - } - this.Status.Pop[key] = def[key]; - } - if (option) { - keys = Object.keys(option); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; + if (key in option) { + continue; + } + this.Status.Pop[key] = def[key]; + } + if (option) { + keys = Object.keys(option); + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; - this.Status.Pop[key] = option[key]; - } - } + this.Status.Pop[key] = option[key]; + } + } - if (!option.borderColor) { - option.borderColor = '#BBE600'; - option.buttonBgColor = '#BBE600'; - } - these.Status.Pop.showPop = true; - }, - showMsg(msg, isSucc) { - let icoUrl = '/static/images/common/uploadErr.png'; - let borderColor = "#e034344d"; - let buttonBgColor = "#E03434"; - if (isSucc) { - icoUrl = '/static/images/common/success.png'; - borderColor = "#BBE600"; - buttonBgColor = "#BBE600"; - } - this.showPop({ - message: msg, - iconUrl: icoUrl, - borderColor: borderColor, - buttonBgColor: buttonBgColor, - buttonText: '确定', - okCallback: null - }); - } + if (!option.borderColor) { + option.borderColor = '#BBE600'; + option.buttonBgColor = '#BBE600'; + } + these.Status.Pop.showPop = true; +} + + + + } } diff --git a/pages/4877/BJQ4877.vue b/pages/4877/BJQ4877.vue index a6da37e..3691fab 100644 --- a/pages/4877/BJQ4877.vue +++ b/pages/4877/BJQ4877.vue @@ -10,7 +10,7 @@ + @click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons"> {{item.math>9?'9+':item.math}} @@ -33,12 +33,12 @@ + + + {{formData.xuhang}} + 续航时间 + + --> @@ -72,17 +72,17 @@ + + + --> @@ -95,13 +95,13 @@ + :class="{active:formData.sta_SOSType===item.val,marginLeft:index%2==1}" + v-on:click.stop="sosSetting(item,index)"> + :src="item.img" mode="aspectFit"> + :src="item.activeImg" mode="aspectFit"> {{item['text']}} @@ -128,8 +128,8 @@ + :class="{active:item.id==formData.sta_GroupType,marginNoLeft:index%3===0}" + @click.stop="groupSetting(item,index)"> @@ -153,7 +153,7 @@ + :class="formData.sta_ArrowMode=='right_off'?'active':''"> @@ -164,13 +164,13 @@ 朝左 + :class="formData.sta_ArrowMode=='right_on'?'active':''"> + mode="aspectFit"> 朝右 @@ -185,7 +185,7 @@ + :class="formData.sta_ArrowType=='red_front'?'redactive':''"> 红色 @@ -194,7 +194,7 @@ + :class="formData.sta_ArrowType=='green_back'?'greenactive':''"> 绿色 @@ -217,7 +217,7 @@ + :class="formData.sta_ArrowType=='red_all'?'active':''"> @@ -228,13 +228,13 @@ 红色双向 + :class="formData.sta_ArrowType=='green_all'?'active':''"> + mode="aspectFit"> 绿色双向 @@ -266,22 +266,22 @@ + :borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor" + :buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor" + :iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText" + @buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle" + v-model="Status.Pop.modelValue" @closePop="closePop" :buttonCancelText="Status.Pop.buttonCancelText" + :showCancel="Status.Pop.showCancel" @cancelPop="closePop" :showSlot="Status.Pop.showSlot"> 修改信道 + placeholder-class="popup-prompt-input-placeHolder" v-model="formData.sta_Channel" /> - + @@ -304,7 +304,14 @@ } from '@/api/4877/BJQ4877.js'; import MqTool from '@/utils/MqHelper.js' - + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' const pagePath = "/pages/4877/BJQ4877"; var ble = null; @@ -711,14 +718,14 @@ if (!this.permissions.includes('55') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -749,7 +756,7 @@ cancelCallback: () => { this.Status.ShowEditChannel = false; } - }); + },these); }, onChannelChanging() { let regex = /^(0|([1-9]\d?)|1[01]\d|12[0-5])$/; @@ -792,14 +799,14 @@ if (!this.permissions.includes('53') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -855,14 +862,14 @@ groupCheck() { if (!this.permissions.includes('54') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } uni.navigateTo({ @@ -916,7 +923,7 @@ showUnWarn(val) { - // this.showPop({ + // showPop({ // message: '确定解除声光报警模式?', // iconUrl: "/static/images/common/uploadErr.png", // borderColor: "#e034344d", @@ -938,14 +945,14 @@ if (!this.permissions.includes('54') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -997,14 +1004,14 @@ sosSetting(item, index) { if (!this.permissions.includes('42') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } let f = this.getDevice(); @@ -1037,7 +1044,7 @@ let confirmTask = () => { - this.showPop({ + showPop({ message: '确定' + (this.formData.sta_SOSType === 'sos' ? '关闭' : '开启') + '声光报警模式?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1046,7 +1053,7 @@ buttonText: (this.formData.sta_SOSType === 'sos' ? '关闭' : '开启'), showCancel: true, buttonCancelText: '取消' - }); + },these); } if (item.val === 'sos') { confirmTask(); @@ -1258,7 +1265,7 @@ }, showBleUnConnect() { - this.showPop({ + showPop({ message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -1286,7 +1293,7 @@ } }) } - }); + },these); }, proParam: function() { @@ -1335,54 +1342,56 @@ this.Status.Pop.okCallback(); } }, - showPop: function(option) { - hideLoading(this); - let def = { - showPop: true, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '', - modelValue: '', - visibleClose: false, - okCallback: null, - showSlot: false, - buttonCancelText: '', - showCancel: false, - } + showPop: function (option) { + hideLoading(this); + let def = { + showPop: true, //是否显示弹窗 + popType: 'custom', + bgColor: '#383934bd', + borderColor: '#BBE600', + textColor: '#ffffffde', + buttonBgColor: '#BBE600', + buttonTextColor: '#232323DE', + iconUrl: '', + message: '', + buttonText: '确定', + clickEvt: '', + visiblePrompt: false, + promptTitle: '', + modelValue: '', + visibleClose: false, + okCallback: null, + showSlot: false, + buttonCancelText: '', + showCancel: false, + } - let keys = Object.keys(def); + let keys = Object.keys(def); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - if (key in option) { - continue; - } - this.Status.Pop[key] = def[key]; - } - if (option) { - keys = Object.keys(option); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; + if (key in option) { + continue; + } + this.Status.Pop[key] = def[key]; + } + if (option) { + keys = Object.keys(option); + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; - this.Status.Pop[key] = option[key]; - } - } + this.Status.Pop[key] = option[key]; + } + } - if (!option.borderColor) { - option.borderColor = '#BBE600'; - option.buttonBgColor = '#BBE600'; - } - these.Status.Pop.showPop = true; - }, + if (!option.borderColor) { + option.borderColor = '#BBE600'; + option.buttonBgColor = '#BBE600'; + } + these.Status.Pop.showPop = true; + }, + + showMsg(msg, isSucc) { let icoUrl = '/static/images/common/uploadErr.png'; let borderColor = "#e034344d"; @@ -1392,17 +1401,14 @@ borderColor = "#BBE600"; buttonBgColor = "#BBE600"; } - this.showPop({ + showPop({ message: msg, iconUrl: icoUrl, borderColor: borderColor, buttonBgColor: buttonBgColor, buttonText: '确定', okCallback: null - }); - }, - btnClick() { - + },this); } } } diff --git a/pages/6075J/BJQ6075J.vue b/pages/6075J/BJQ6075J.vue index 9017abb..487ea35 100644 --- a/pages/6075J/BJQ6075J.vue +++ b/pages/6075J/BJQ6075J.vue @@ -501,7 +501,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, onHide: function() { @@ -569,7 +572,10 @@ these.formData.bleStatu = 'connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; }); @@ -2074,7 +2080,8 @@ }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + these.formData.bleStatu = 'err'; }).finally(() => { setTimeout(() => { hideLoading(these); @@ -2102,6 +2109,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } diff --git a/pages/6107/BJQ6107.vue b/pages/6107/BJQ6107.vue index 84fb5db..750fc1b 100644 --- a/pages/6107/BJQ6107.vue +++ b/pages/6107/BJQ6107.vue @@ -16,7 +16,8 @@ - {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} + + {{formData.sta_charge?dic.sta_charge[formData.sta_charge+'']:"未充电" }} 设备状态 @@ -74,12 +75,12 @@ + :class="{'active':formData.sta_highSpeed && formData.sta_LedType===item.key}"> 强光 + :class="{'active':formData.sta_highSpeed===false && formData.sta_LedType===item.key}"> 工作光 @@ -93,7 +94,7 @@ + mode="aspectFit"> @@ -114,9 +115,9 @@ + mode="aspectFit"> + src="/static/images/common/playingActive.png" mode="aspectFit"> {{formData.isPlay?'正在播放':'播放语音'}} @@ -183,7 +184,7 @@ - + @@ -208,11 +209,11 @@ + :borderColor="item.borderColor" :textColor="item.textColor" :buttonBgColor="item.buttonBgColor" + :buttonTextColor="item.buttonTextColor" :iconUrl="item.iconUrl" :message="item.message" + :buttonText="item.buttonText" @buttonClick="item.okCallback(item)" :visiblePrompt="item.visiblePrompt" + :promptTitle="item.promptTitle" v-model="item.modelValue" @closePop="closePop(item)" + :buttonCancelText="item.buttonCancelText" :showCancel="item.showCancel" @cancelPop="closePop(item)" /> @@ -226,7 +227,7 @@ + color="#FFFFFFde"> @@ -239,8 +240,8 @@ + backgroundColor="#686767" block-size="20" block-color="#ffffffde" @change="volumechange" + @changing="volumechange" class="custom-slider" /> @@ -248,7 +249,7 @@ - + @@ -265,7 +266,16 @@ baseURL } from '@/utils/request.js' - import Common from '@/utils/Common.js' + import Common from '@/utils/Common.js'; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' + const pagePath = "/pages/018A/HBY018A"; var ble = null; @@ -419,7 +429,10 @@ these.formData.deviceId = f.deviceId; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; these.setBleFormData(); @@ -439,7 +452,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, computed: { @@ -551,7 +567,7 @@ this.closePop(item); } if (msg) { - this.showPop({ + showPop({ key: Common.guid(), message: msg, iconUrl: "/static/images/common/playingActive.png", @@ -561,7 +577,7 @@ buttonText: '确定', buttonCancelText: '取消', showCancel: true - }); + },these); } else { exec(); } @@ -667,7 +683,7 @@ // },500) } - this.showPop({ + showPop({ key: key, message: msg, iconUrl: "/static/images/common/uploadErr.png", @@ -677,7 +693,7 @@ buttonText: '确定', buttonCancelText: '取消', showCancel: true - }); + },these); }, deviceRecovry(res) { @@ -742,7 +758,8 @@ }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + these.formData.bleStatu = 'err'; }).finally(() => { setTimeout(() => { hideLoading(these); @@ -838,7 +855,7 @@ }, showBleUnConnect() { - this.showPop({ + showPop({ key: Common.guid(), message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", iconUrl: "/static/images/common/uploadErr.png", @@ -867,7 +884,7 @@ } }) } - }); + },these); }, proParam: function() { @@ -918,58 +935,7 @@ } }, - //根据传入的配置,自定义一个弹窗 - showPop: function(option) { - let def = { - key: '', - showPop: true, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '', - modelValue: '', - visibleClose: false, - okCallback: null, - showSlot: false, - buttonCancelText: '', - showCancel: false, - cancelCallback: null - } - let json = {}; - let keys = Object.keys(def); - - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - - json[key] = def[key]; - } - if (option) { - keys = Object.keys(option); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - - json[key] = option[key]; - } - } - - if (!json.borderColor) { - json.borderColor = '#BBE600'; - json.buttonBgColor = '#BBE600'; - } - json.showPop = true; - if (!('key' in json)) { - json.key = Common.guid(); - } - this.Msgboxs.push(json); - }, + showMsg(msg, type) { let cfg = { @@ -1008,7 +974,7 @@ buttonText: '确定', okCallback: this.closePop }; - this.showPop(options); + showPop(options,these); } } } diff --git a/pages/6155/BJQ6155.vue b/pages/6155/BJQ6155.vue index 65de89b..fecfa8c 100644 --- a/pages/6155/BJQ6155.vue +++ b/pages/6155/BJQ6155.vue @@ -10,7 +10,7 @@ + @click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons"> {{item.math>9?'9+':item.math}} @@ -74,8 +74,8 @@ + backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" @changing="sliderChanging" + class="custom-slider" /> @@ -124,23 +124,23 @@ 发送 + :color="'#000000'" :fontSize="16" /> 单位: + placeholder-class="usrplace" /> 部门: + placeholder-class="usrplace" /> 姓名: + placeholder-class="usrplace" /> @@ -162,17 +162,11 @@ - - + + @btnClick="btnClick"> @@ -182,6 +176,7 @@ + @@ -201,6 +196,14 @@ } from '@/utils/request.js'; var pagePath = "/pages/6155/BJQ6155"; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' var ble = null; var these = null; @@ -413,7 +416,10 @@ these.formData.bleStatu = 'connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; these.setBleFormData(); these.getDetail(); @@ -433,7 +439,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, onBackPress(e) { @@ -480,6 +489,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -640,7 +650,8 @@ }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + MsgError("连接错误:" + ex.msg, "确定", these); }).finally(() => { setTimeout(() => { hideLoading(these); @@ -769,11 +780,11 @@ return; } let os = plus.os.name; + // 分包发送图片数据 var sendImagePackets = function(ReSendNo) { return new Promise((resolve, reject) => { - // 总数据包数 let totalPackets = os=='Android'?52:200; let currentPacket = 1; @@ -808,11 +819,7 @@ // 计算当前包的数据 let packetSize = os == 'Android' ? 250 : 64; - // if (currentPacket <= 51) { - // packetSize = 250; // 前51个包每个500字节 - // } else { - // packetSize = 50; // 最后一个包100字节 - // } + // 创建数据包 let startIndex = (currentPacket - 1) * packetSize; @@ -824,7 +831,7 @@ let packetData = these.rgb565Data.slice(startIndex, endIndex); // 构建数据包 - let bufferSize = os ==packetSize.length*2+5; // 5 + packetData.length * 2; // 头部5字节 + 数据部分 + let bufferSize = packetData.length * 2+5; // 头部5字节 + 数据部分 let buffer = new ArrayBuffer(bufferSize); let dataView = new DataView(buffer); @@ -833,12 +840,12 @@ dataView.setUint8(1, 0x02); // 帧类型:开机画面 dataView.setUint8(2, currentPacket); // 包序号 dataView.setUint16(3, packetData.length*2,false); - + // 填充数据(每个RGB565值占2字节) for (let i = 0; i < packetData.length; i++) { dataView.setUint16(5 + i * 2, packetData[i], false); // 大端字节序 } - + //发送数据包 ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId, 10).then(() => { @@ -911,8 +918,9 @@ console.log("data=", data); these.Status.BottomMenu.show = false; these.rgb565Data = Common.convertToRGB565(data.piexls); - +console.log("1111111111") setTimeout(function() { + console.log("1111111111") sendImagePackets().catch(() => { }); @@ -1540,6 +1548,7 @@ option.buttonBgColor = '#BBE600'; } these.Status.Pop.showPop = true; + showPop(option, these); }, sendUsr() { if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') { diff --git a/pages/6155/deviceDetail.vue b/pages/6155/deviceDetail.vue index 2420b44..2ae3d7b 100644 --- a/pages/6155/deviceDetail.vue +++ b/pages/6155/deviceDetail.vue @@ -11,7 +11,7 @@ + @click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons"> {{item.math>9?'9+':item.math}} @@ -75,8 +75,8 @@ + backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" + @changing="sliderChange" class="custom-slider" /> @@ -125,23 +125,23 @@ 发送 + :color="'#000000'" :fontSize="14" /> 单位: + placeholder-class="usrplace" /> 部门: + placeholder-class="usrplace" /> 姓名: + placeholder-class="usrplace" /> @@ -163,17 +163,11 @@ - - + + @btnClick="btnClick"> @@ -183,6 +177,7 @@ + @@ -202,6 +197,14 @@ } from '@/utils/request.js'; var pagePath = "/pages/6155/deviceDetail"; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' var ble = null; var these = null; @@ -383,7 +386,10 @@ these.formData.bleStatu = 'connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + }); these.setBleFormData(); these.getDetail(); @@ -403,7 +409,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, onBackPress(e) { @@ -450,6 +459,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -621,7 +631,8 @@ }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + these.formData.bleStatu = 'err'; }).finally(() => { setTimeout(() => { hideLoading(these); @@ -1625,6 +1636,7 @@ option.buttonBgColor = '#BBE600'; } these.Status.Pop.showPop = true; + showPop(option,this); }, sendUsr() { diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 49e0c3c..61d2b63 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -471,6 +471,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:"+ex.msg,"确定",these); }); return; } @@ -583,6 +584,8 @@ updateLoading(these, { text: ex.msg }) + these.formData.bleStatu = 'err'; + MsgError("连接错误:"+ex.msg,"确定",these); }).finally(() => { setTimeout(() => { hideLoading(these); @@ -2023,6 +2026,9 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then( res => { these.formData.bleStatu = true; + }).catch(ex=>{ + these.formData.bleStatu = 'err'; + MsgError("连接错误:"+ex.msg,"确定",these); }); } } @@ -2043,6 +2049,8 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") this.formData.bleStatu = true; + }).catch(ex=>{ + MsgError("连接错误:"+ex.msg,"确定",these); }); } }, diff --git a/pages/6331/BJQ6331.vue b/pages/6331/BJQ6331.vue index 0c21335..fe6ed7c 100644 --- a/pages/6331/BJQ6331.vue +++ b/pages/6331/BJQ6331.vue @@ -22,19 +22,19 @@ - + 设备名称 {{device.deviceName}} - Mac地址 - {{device.deviceMac}} - + Mac地址 + {{device.deviceMac}} + 蓝牙名称 {{device.bluetoothName}} - + 蓝牙状态 {{formData.bleStatu?'已连接':'未连接'}} @@ -45,34 +45,34 @@ 照明模式 亮度 + :class="formData.lightCurr=='shuxie'?'active':'noActive'">亮度 + :class="formData.lightCurr=='shuxie'?'active':''"> + :src="formData.lightCurr=='shuxie'?'/static/images/6331/shuxieActive.png':'/static/images/6331/shuXie.png'" + mode="aspectFit"> 书写 + :src="formData.lightCurr=='work'?'/static/images/6331/workActive.png':'/static/images/6331/work.png'" + mode="aspectFit"> 工作光 + :src="formData.lightCurr=='jieN'?'/static/images/lightImg/jieNActive.png':'/static/images/lightImg/jieN.png'" + mode="aspectFit"> 节能光 @@ -130,7 +130,7 @@ + v-on:click.stop="audioManage()"> @@ -173,11 +173,11 @@ + :borderColor="Status.Pop.borderColor" :textColor="Status.Pop.textColor" + :buttonBgColor="Status.Pop.buttonBgColor" :buttonTextColor="Status.Pop.buttonTextColor" + :iconUrl="Status.Pop.iconUrl" :message="Status.Pop.message" :buttonText="Status.Pop.buttonText" + @buttonClick="HidePop" :visiblePrompt="Status.Pop.visiblePrompt" :promptTitle="Status.Pop.promptTitle" + v-model="Status.Pop.modelValue" @closePop="closePop" :showSlot="Status.Pop.showSlot"> @@ -186,8 +186,8 @@ + backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" + @changing="sliderChange" class="custom-slider" /> @@ -199,8 +199,8 @@ + backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" + @changing="sliderChange" class="custom-slider" /> @@ -209,7 +209,7 @@ + @btnClick="btnClick"> @@ -221,7 +221,7 @@ - + @@ -236,7 +236,15 @@ } from '@/utils/loading.js' import request, { baseURL } from '@/utils/request.js'; - import usrApi from '@/api/670/HBY670.js' + import usrApi from '@/api/670/HBY670.js'; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' const pagePath = "pages/6331/BJQ6331"; var ble = null; @@ -401,7 +409,10 @@ import request, { baseURL } from '@/utils/request.js'; these.formData.deviceId = f.deviceId; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; these.setBleFormData(); these.getDetail(); @@ -420,7 +431,10 @@ import request, { baseURL } from '@/utils/request.js'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, computed: { @@ -452,7 +466,7 @@ import request, { baseURL } from '@/utils/request.js'; let play = () => { alert('正在播放中'); } - this.showPop({ + showPop({ showPop: true, //是否显示弹窗 popType: 'custom', bgColor: '#383934bd', @@ -469,7 +483,7 @@ import request, { baseURL } from '@/utils/request.js'; modelValue: '', visibleClose: true, okCallback: play - }); + },these); }, audioManage() { //语音管理 uni.navigateTo({ @@ -594,12 +608,12 @@ import request, { baseURL } from '@/utils/request.js'; ble.sendHexs(f.deviceId, array, f.writeServiceId, f.wirteCharactId, 100).catch(ex => { - these.showPop({ + showPop({ message: "发送失败," + ex.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }); }, @@ -670,7 +684,8 @@ import request, { baseURL } from '@/utils/request.js'; }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + these.formData.bleStatu = 'err'; }).finally(() => { setTimeout(() => { hideLoading(these); @@ -734,7 +749,7 @@ import request, { baseURL } from '@/utils/request.js'; showBleUnConnect() { - this.showPop({ + showPop({ message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -762,7 +777,7 @@ import request, { baseURL } from '@/utils/request.js'; } }) } - }); + },these); diff --git a/pages/650/HBY650.vue b/pages/650/HBY650.vue index 25866bc..5ed064b 100644 --- a/pages/650/HBY650.vue +++ b/pages/650/HBY650.vue @@ -10,17 +10,17 @@ + @click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons"> {{item.math>9?'9+':item.math}} - + - + - + - + @@ -78,19 +78,19 @@ + @click="MainModeSetting('smalllow','staticBattery')"> 前置 + @click="MainModeSetting('low','staticBattery')"> 低档 + @click="MainModeSetting('center','staticBattery')"> 中档 + @click="MainModeSetting('hight','staticBattery')"> 高档 @@ -98,9 +98,9 @@ + @click="MainModeSetting('close','staticBattery')"> + 关闭 + --> @@ -114,7 +114,7 @@ + v-on:click.stop="ShowUpload()"> @@ -177,17 +177,11 @@ - - + + @btnClick="btnClick"> @@ -198,6 +192,7 @@ + @@ -213,7 +208,15 @@ } from '@/utils/loading.js' import request, { baseURL } from '@/utils/request.js'; - import usrApi from '@/api/670/HBY670.js' + import usrApi from '@/api/670/HBY670.js'; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' const pagePath = "/pages/650/HBY650"; var ble = null; @@ -234,24 +237,7 @@ import request, { baseURL } from '@/utils/request.js'; }, pageHide: false, - Pop: { - showPop: false, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '您确定要这样做吗?', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '设备名称', - modelValue: '', - visibleClose: false, - okCallback: null - }, + BottomMenu: { show: false, showHeader: true, @@ -404,7 +390,10 @@ import request, { baseURL } from '@/utils/request.js'; these.formData.bleStatu='connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; these.setBleFormData(); console.error("222222"); these.getDetail(); @@ -425,7 +414,10 @@ import request, { baseURL } from '@/utils/request.js'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, computed: { @@ -466,6 +458,7 @@ import request, { baseURL } from '@/utils/request.js'; these.formData.bleStatu = true; }).catch(ex=>{ these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -569,7 +562,8 @@ import request, { baseURL } from '@/utils/request.js'; }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + MsgError("连接错误:" + ex.msg, "确定", these); }).finally(() => { setTimeout(() => { hideLoading(these); @@ -655,12 +649,12 @@ import request, { baseURL } from '@/utils/request.js'; } if (these.formData.iswarn) { - these.showPop({ + showPop({ message: "环境存在漏电电源", iconUrl: "/static/images/6155/DeviceDetail/warnning.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); } these.setBleFormData(); @@ -733,14 +727,14 @@ import request, { baseURL } from '@/utils/request.js'; if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -813,12 +807,12 @@ import request, { baseURL } from '@/utils/request.js'; console.log("发送成功了"); }).catch((ex) => { - these.showPop({ + showPop({ message: ex.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }).finally(() => { @@ -838,7 +832,7 @@ import request, { baseURL } from '@/utils/request.js'; }, showBleUnConnect() { - this.showPop({ + showPop({ message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -866,19 +860,19 @@ import request, { baseURL } from '@/utils/request.js'; } }) } - }); + },these); }, LampToggle: function() { if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } this.formData.cMode = !this.formData.cMode; @@ -932,11 +926,11 @@ import request, { baseURL } from '@/utils/request.js'; if (currentPacket > totalPackets) { hideLoading(these); these.Status.BottomMenu.show = false; - these.showPop({ + showPop({ showPop: true, message: "上传成功", iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png", - }); + },these); if (!ReSendNo) { setTimeout(() => { these.HoldYouHand("transmit complete", 0, f @@ -1005,23 +999,23 @@ import request, { baseURL } from '@/utils/request.js'; }) currentPacket++; - setTimeout(sendNextPacket, 0); + setTimeout(sendNextPacket, 80); }).catch(err => { console.log("发送数据包失败了" + JSON.stringify(err)); if (err.code == '10007') { - setTimeout(sendNextPacket, 0); + setTimeout(sendNextPacket, 500); return; } these.Status.BottomMenu.show = false; - these.showPop({ + showPop({ message: err.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); hideLoading(these); reject(err); }); @@ -1037,12 +1031,12 @@ import request, { baseURL } from '@/utils/request.js'; sendNextPacket(); }).catch((err) => { console.log("握手没有成功"); - these.showPop({ + showPop({ message: err.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); hideLoading(these); reject(err); }); @@ -1114,11 +1108,11 @@ import request, { baseURL } from '@/utils/request.js'; } these.Status.BottomMenu.show = false; hideLoading(these); - these.showPop({ + showPop({ showPop: true, message: "上传成功", iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png" - }); + },these); @@ -1188,14 +1182,14 @@ import request, { baseURL } from '@/utils/request.js'; these.Status.BottomMenu.show = false; hideLoading(these); - these.showPop({ + showPop({ showPop: true, message: err.msg + ",发送失败了", borderColor: "#e034344d", buttonBgColor: "#E03434", buttonText: "确定", iconUrl: "/static/images/common/uploadErr.png" - }); + },these); reject(err); return; } @@ -1290,23 +1284,23 @@ import request, { baseURL } from '@/utils/request.js'; console.log("服务器未返回正确的数据"); - these.showPop({ + showPop({ message: "与服务器连接出现异常,请检查网络设置", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); } }).catch((ex) => { hideLoading(these); - these.showPop({ + showPop({ message: "出现异常," + ex.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }) } let f = these.getDevice(); @@ -1373,14 +1367,14 @@ import request, { baseURL } from '@/utils/request.js'; if (!this.permissions.includes('3') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } //上传开机画面 @@ -1422,84 +1416,19 @@ import request, { baseURL } from '@/utils/request.js'; this.Status.BottomMenu.activeIndex = index; }, - closePop: function() { - this.Status.Pop.showPop = false; - - if (this.Status.Pop.cancelCallback) { - this.Status.Pop.cancelCallback(); - } - }, - HidePop: function() { - if (this.Status.Pop.clickEvt == 'SendUsr') { - - } - - - this.Status.Pop.showPop = false; - if (this.Status.Pop.okCallback) { - this.Status.Pop.okCallback(); - } - }, - showPop: function(option) { - hideLoading(this); - let def = { - showPop: true, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '', - modelValue: '', - visibleClose: false, - okCallback: null, - showSlot: false, - buttonCancelText: '', - showCancel: false, - } - - let keys = Object.keys(def); - - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - if (key in option) { - continue; - } - this.Status.Pop[key] = def[key]; - } - if (option) { - keys = Object.keys(option); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - - this.Status.Pop[key] = option[key]; - } - } - - if (!option.borderColor) { - option.borderColor = '#BBE600'; - option.buttonBgColor = '#BBE600'; - } - these.Status.Pop.showPop = true; - }, + sendUsr: function(ReSendNo) { if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -1543,7 +1472,7 @@ import request, { baseURL } from '@/utils/request.js'; } - these.showPop({ + showPop({ showPop: true, //是否显示弹窗 popType: 'custom', bgColor: '#383934bd', @@ -1559,7 +1488,7 @@ import request, { baseURL } from '@/utils/request.js'; promptTitle: '', modelValue: '', visibleClose: true - }); + },these); these.setBleFormData(); @@ -1617,12 +1546,12 @@ import request, { baseURL } from '@/utils/request.js'; setTimeout(sendNextPacket, 0); }).catch(err => { - these.showPop({ + showPop({ message: "文字发送失败," + err.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }).finally(() => { hideLoading(these); }); @@ -1651,12 +1580,12 @@ import request, { baseURL } from '@/utils/request.js'; }).catch((ex) => { console.log("握手没有成功", ex); hideLoading(these); - these.showPop({ + showPop({ message: ex.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }); }, 0); diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index 51c0e12..a38d9fa 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -1,22 +1,24 @@ @@ -306,7 +311,14 @@ } from '@/utils/loading.js' import request, { baseURL } from '@/utils/request.js'; import lnglatConvert from '@/utils/wgs84_to_gcj02.js'; - + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' const pagePath = "/pages/670/HBY670"; var ble = null; var these = null; @@ -336,28 +348,28 @@ time: 0, inteval: null }, - Pop: { - showPop: false, //是否显示弹窗 + Pop: { + showPop: false, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', + popType: 'custom', + bgColor: '#383934bd', + borderColor: '#BBE600', + textColor: '#ffffffde', + buttonBgColor: '#BBE600', + buttonTextColor: '#232323DE', - iconUrl: '', - message: '您确定要这样做吗?', - buttonText: '确定', - showCancel: false, - buttonCancelText: '取消', - clickEvt: '', - visiblePrompt: false, - promptTitle: '设备名称', - modelValue: '', - visibleClose: false, - okCallback: null - }, + iconUrl: '', + message: '您确定要这样做吗?', + buttonText: '确定', + showCancel: false, + buttonCancelText: '取消', + clickEvt: '', + visiblePrompt: false, + promptTitle: '设备名称', + modelValue: '', + visibleClose: false, + okCallback: null + }, BottomMenu: { show: false, showHeader: true, @@ -490,8 +502,8 @@ recei = BleReceive.getBleReceive(); ble = BleTool.getBleTool(); this.$watch("formData.battary", (newVal, oldVal) => { - if (newVal <= 20 && this.formData.sta_system==2) { - this.showMsg("设备电量低"); + if (newVal <= 20 && this.formData.sta_system == 2) { + MsgError("设备电量低",'',these); } }); @@ -555,7 +567,10 @@ these.formData.bleStatu='connecting'; ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; }); }, @@ -568,7 +583,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, onHide: function() { @@ -615,6 +633,7 @@ these.formData.bleStatu = true; }).catch(ex=>{ these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -693,7 +712,8 @@ }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + these.formData.bleStatu = 'err'; }).finally(() => { setTimeout(() => { hideLoading(these); @@ -715,7 +735,7 @@ if (this.Status.bleLinkCnt > 3) { return; } - this.showPop({ + showPop({ message: "蓝牙未连接过该设备,请使用蓝牙重新添加该设备,取消" + (4 - this.Status.bleLinkCnt) + "次后不再提醒", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", @@ -747,7 +767,7 @@ } }) } - }); + },these); }, gotoMap() { let promise = lnglatConvert.wgs84_to_gcj02(this.formData.Lon, this.formData.Lat); @@ -943,11 +963,11 @@ // } if (keys.indexOf('sta_BreakNews') > -1) { //紧急通知 if(json.sta_BreakNews=='I get it'){ - these.showPop({ + showPop({ showPop: true, message: "用户已确认收到紧急通知", iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png" - }); + },these); } } @@ -1129,14 +1149,14 @@ msgs.push("设备静止报警中"); } if (msgs.length > 0) { - this.showPop({ + showPop({ message: msgs.join(";"), iconUrl: "/static/images/6155/DeviceDetail/warnning.png", borderColor: "#e034344d", buttonBgColor: "#E03434", buttonText: "确定", clickEvt: "staticWarn" - }); + },these); } @@ -1169,14 +1189,14 @@ lightSetting: function(type) { if (!this.permissions.includes('1') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } if (this.formData.lightCurr == type) { @@ -1212,12 +1232,12 @@ console.log("4g发送成功"); }).catch((ex) => { console.log("ex=", ex); - these.showPop({ + showPop({ message: "通信异常,请检查手机或设备网络", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }).finally(() => { hideLoading(these); @@ -1260,9 +1280,10 @@ CloseWarn: function(ispop) { //解除强制报警 let closeEvt = () => { - these.Status.Pop.showPop = false; + these.formData.qzwarn = false; + these.Status.staticWarn.inteval=null clearInterval(these.Status.staticWarn.inteval); let requestCloseSOS = () => { @@ -1276,12 +1297,12 @@ }).catch((ex) => { console.log("ex=", ex); - these.showPop({ + showPop({ message: "通信异常,请检查手机或设备网络", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }).finally(() => { hideLoading(these); @@ -1352,20 +1373,20 @@ this.Status.Pop.okCallback = null; }, clickEvt: 'time' - }); + },these); }, sosSetting: function(type) { debugger; if (!this.permissions.includes('42') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -1374,9 +1395,7 @@ type = "close"; } - showLoading(this, { - text: "请稍候..." - }); + let task = () => { let dic = { @@ -1432,12 +1451,12 @@ } }).catch((ex) => { console.log("ex=", ex); - these.showPop({ + showPop({ message: "通信异常,请检查手机或设备网络", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }).finally(() => { hideLoading(these); @@ -1484,7 +1503,11 @@ } let OpenSOS = () => { + showLoading(this, { + text: "请稍候..." + }); let execSos = () => { + these.formData.qzwarn = true; //标记为强制报警了 these.Status.staticWarn.time = 180; @@ -1550,17 +1573,18 @@ } else if (type == 'sg') //强制报警 { - this.showPop({ + showPop({ message: '确定开启声光报警模式?', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: OpenSOS, buttonText: "开启" - }); + },these); return; } else if (type == 'close') { - + console.log("this.formData.SOS=",this.formData.SOS); + console.log("inteval=",this.Status.staticWarn.inteval); if (this.formData.SOS = 'sg' && this.Status.staticWarn.inteval) { //解除声光报警 this.CloseWarn(true); } else { @@ -1578,14 +1602,14 @@ GearSetting: function(type) { //档位设置 if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } if (this.formData.modeCurr == type) { @@ -1620,12 +1644,12 @@ console.log("4g发送成功"); }).catch((ex) => { console.log("ex=", ex) - these.showPop({ + showPop({ message: "通信异常,请检查手机或设备网络", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }).finally(() => { hideLoading(these); @@ -1676,14 +1700,14 @@ proDetail: function(type) { if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } uni.navigateTo({ @@ -1706,21 +1730,21 @@ deviceImei: these.device.deviceImei }).then((res) => { if (res.code == 200) { - these.showPop({ + showPop({ showPop: true, message: "上传成功", iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png", - }); + },these); resolve(); return; } else { - these.showPop({ + showPop({ message: res.errMsg ? res.errMsg : "未知的原因上传失败了", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); reject(res); } }).catch((ex) => { @@ -1752,11 +1776,11 @@ if (currentPacket > totalPackets) { hideLoading(these); these.Status.BottomMenu.show = false; - these.showPop({ + showPop({ showPop: true, message: "上传成功", iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png", - }); + },these); if (!ReSendNo) { setTimeout(() => { these.HoldYouHand("transmit complete", 0, f @@ -1826,11 +1850,11 @@ }); currentPacket++; - setTimeout(sendNextPacket, 0); + setTimeout(sendNextPacket, 80); }).catch(err => { console.log("发送数据包失败了" + JSON.stringify(err)); if (err.code == '10007') { - setTimeout(sendNextPacket, 0); + setTimeout(sendNextPacket, 500); return; } else { updateLoading(these, { @@ -1839,7 +1863,7 @@ sendImgByRequest().then(resolve).catch(reject); } // these.Status.BottomMenu.show = false; - // these.showPop({ + // showPop({ // message: err.msg, // iconUrl: "/static/images/common/uploadErr.png", // borderColor: "#e034344d", @@ -1937,11 +1961,11 @@ } these.Status.BottomMenu.show = false; hideLoading(these); - these.showPop({ + showPop({ showPop: true, message: "上传成功", iconUrl: "/static/images/6155/DeviceDetail/uploadSuccess.png" - }); + },these); @@ -1989,7 +2013,7 @@ - let inteval = 30; + let inteval = 50; console.log("开始发送一段视频"); // ble.sendData(f.deviceId, buffer, f.writeServiceId, f .wirteCharactId, 10).then(() => { @@ -2013,14 +2037,14 @@ these.Status.BottomMenu.show = false; hideLoading(these); - these.showPop({ + showPop({ showPop: true, message: err.msg + ",发送失败了", borderColor: "#e034344d", buttonBgColor: "#E03434", buttonText: "确定", iconUrl: "/static/images/common/uploadErr.png" - }); + },these); reject(err); return; } @@ -2117,23 +2141,23 @@ console.log("服务器未返回正确的数据", arr); - these.showPop({ + showPop({ message: "与服务器连接出现异常,请检查网络设置", iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); } }).catch((ex) => { hideLoading(these); - these.showPop({ + showPop({ message: "出现异常," + ex.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }) } @@ -2199,14 +2223,14 @@ ShowUpload: function() { if (!this.permissions.includes('3') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } //上传开机画面 @@ -2248,86 +2272,86 @@ this.Status.BottomMenu.activeIndex = index; }, - HidePop: function() { - if (this.Status.Pop.clickEvt == 'staticWarn') { - // this.Status.staticWarnTime=0; - // clearInterval(this.Status.staticWarn.inteval); - // this.formData.staticWarn=false; - } - if (this.Status.Pop.okCallback) { - console.log("执行点击按钮回调"); - this.Status.Pop.okCallback(); - } + HidePop: function () { + if (this.Status.Pop.clickEvt == 'staticWarn') { + // this.Status.staticWarnTime=0; + // clearInterval(this.Status.staticWarn.inteval); + // this.formData.staticWarn=false; + } + if (this.Status.Pop.okCallback) { + console.log("执行点击按钮回调"); + this.Status.Pop.okCallback(); + } - this.Status.Pop.showPop = false; - }, - closePop: function() { - this.Status.Pop.showPop = false; + this.Status.Pop.showPop = false; + }, + closePop: function () { + this.Status.Pop.showPop = false; - if (this.Status.Pop.cancelCallback) { - this.Status.Pop.cancelCallback(); - } - }, - showPop: function(option) { - hideLoading(this); - let def = { - showPop: true, //是否显示弹窗 - popType: 'custom', - bgColor: '#383934bd', - borderColor: '#BBE600', - textColor: '#ffffffde', - buttonBgColor: '#BBE600', - buttonTextColor: '#232323DE', - iconUrl: '', - message: '', - buttonText: '确定', - clickEvt: '', - visiblePrompt: false, - promptTitle: '', - modelValue: '', - visibleClose: false, - okCallback: null, - showSlot: false, - buttonCancelText: '', - showCancel: false, - } + if (this.Status.Pop.cancelCallback) { + this.Status.Pop.cancelCallback(); + } + }, + showPop: function (option) { + hideLoading(this); + let def = { + showPop: true, //是否显示弹窗 + popType: 'custom', + bgColor: '#383934bd', + borderColor: '#BBE600', + textColor: '#ffffffde', + buttonBgColor: '#BBE600', + buttonTextColor: '#232323DE', + iconUrl: '', + message: '', + buttonText: '确定', + clickEvt: '', + visiblePrompt: false, + promptTitle: '', + modelValue: '', + visibleClose: false, + okCallback: null, + showSlot: false, + buttonCancelText: '', + showCancel: false, + } - let keys = Object.keys(def); + let keys = Object.keys(def); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - if (key in option) { - continue; - } - this.Status.Pop[key] = def[key]; - } - if (option) { - keys = Object.keys(option); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; + if (key in option) { + continue; + } + this.Status.Pop[key] = def[key]; + } + if (option) { + keys = Object.keys(option); + for (let i = 0; i < keys.length; i++) { + let key = keys[i]; - this.Status.Pop[key] = option[key]; - } - } + this.Status.Pop[key] = option[key]; + } + } - if (!option.borderColor) { - option.borderColor = '#BBE600'; - option.buttonBgColor = '#BBE600'; - } - these.Status.Pop.showPop = true; - }, + if (!option.borderColor) { + option.borderColor = '#BBE600'; + option.buttonBgColor = '#BBE600'; + } + these.Status.Pop.showPop = true; + }, sendUsr: function(ReSendNo) { if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } @@ -2343,7 +2367,7 @@ code: this.formData.usrid }; api.sendUsr(json).then((res) => { - these.showPop({ + showPop({ showPop: true, //是否显示弹窗 popType: 'custom', bgColor: '#383934bd', @@ -2359,15 +2383,15 @@ promptTitle: '', modelValue: '', visibleClose: true - }); + },these); these.setBleFormData(); }).catch((ex) => { - these.showPop({ + showPop({ message: "文字发送失败," + ex.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); }).finally(() => { hideLoading(these); }); @@ -2415,7 +2439,7 @@ } - these.showPop({ + showPop({ showPop: true, //是否显示弹窗 popType: 'custom', bgColor: '#383934bd', @@ -2431,7 +2455,7 @@ promptTitle: '', modelValue: '', visibleClose: true - }); + },these); these.setBleFormData(); hideLoading(these); @@ -2522,7 +2546,7 @@ requestSend(); // console.log("握手没有成功", ex); // hideLoading(these); - // these.showPop({ + // showPop({ // message: ex.msg, // iconUrl: "/static/images/common/uploadErr.png", // borderColor: "#e034344d", @@ -2538,14 +2562,14 @@ if (!this.permissions.includes('5') && this.Status.apiType !== 'listA') { - this.showPop({ + showPop({ message: '无操作权限', iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", okCallback: null, buttonText: "确定" - }) + },these) return; } if (!this.formData.msgTxt) { @@ -2573,7 +2597,7 @@ }).then((res) => { console.log("res=", res) if (res.code == 200) { - these.showPop({ + showPop({ showPop: true, //是否显示弹窗 popType: 'custom', bgColor: '#383934bd', @@ -2589,7 +2613,7 @@ promptTitle: '', modelValue: '', visibleClose: true - }); + },these); // clearInterval(this.Status.msgOkIntval); @@ -2605,12 +2629,12 @@ } else { - these.showPop({ + showPop({ message: res.msg, iconUrl: "/static/images/common/uploadErr.png", borderColor: "#e034344d", buttonBgColor: "#E03434", - }); + },these); } }).finally(() => { hideLoading(this); diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index 32b4d38..f6d93d5 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -10,7 +10,7 @@ + @click.stop="handleRightClick(item,index)" v-for="item,index in Status.navbar.icons"> {{item.math>9?'9+':item.math}} @@ -73,8 +73,8 @@ + backgroundColor="#00000000" block-size="20" block-color="#ffffffde" @change="sliderChange" + @changing="sliderChanging" class="custom-slider" /> @@ -89,14 +89,14 @@ + + + + + 辅灯模式 + 泛光模式 + + --> @@ -114,20 +114,20 @@ 发送 + :bgColor="'#FFFFFF'" :color="'#000000'" :fontSize="13" /> 单位: - + 部门: - + 姓名: - + @@ -149,17 +149,11 @@ - - + + @btnClick="btnClick"> @@ -169,6 +163,7 @@ + @@ -183,7 +178,14 @@ } from '@/utils/loading.js' import BleReceive from '@/utils/BleReceive'; import Common from '@/utils/Common.js'; - + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js' var ble = null; var these = null; var BrighInteval = null; @@ -363,7 +365,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; these.setBleFormData(); these.getDetail(); @@ -384,7 +389,10 @@ ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => { console.log("连接成功") these.formData.bleStatu = true; - }); + }).catch(ex => { + these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); + });; } }, computed: { @@ -452,6 +460,7 @@ these.formData.bleStatu = true; }).catch(ex => { these.formData.bleStatu = 'err'; + MsgError("连接错误:" + ex.msg, "确定", these); }); return; } @@ -560,7 +569,8 @@ }).catch(ex => { updateLoading(these, { text: ex.msg - }) + }); + these.formData.bleStatu = 'err'; }).finally(() => { setTimeout(() => { hideLoading(these); @@ -1177,6 +1187,7 @@ debugger; option.buttonBgColor = '#BBE600'; } these.Status.Pop.showPop = true; + showPop(option,this); }, sendUsr() { if (!this.permissions.includes('4') && this.Status.apiType !== 'listA') { diff --git a/pages/common/addBLE/LinkBle.vue b/pages/common/addBLE/LinkBle.vue index c882392..6d7de22 100644 --- a/pages/common/addBLE/LinkBle.vue +++ b/pages/common/addBLE/LinkBle.vue @@ -281,9 +281,9 @@ return; } //无效的设备回调 - let deviceInvalid = () => { - - these.$set(these.device, "deviceName", ""); + let deviceInvalid = () => { + these.$set(these.device, "deviceName", ""); + } clearTimeout(this.Statu.timeInteval); diff --git a/pages/common/addBLE/addEquip.vue b/pages/common/addBLE/addEquip.vue index c21b672..18165c9 100644 --- a/pages/common/addBLE/addEquip.vue +++ b/pages/common/addBLE/addEquip.vue @@ -767,6 +767,9 @@ if (index == total) { console.log("连接了N次都没连上"); reject(ex); + updateLoading(this, { + text: ex.msg + }) return; } index++; diff --git a/pages/common/addDevice/addBle.vue b/pages/common/addDevice/addBle.vue index 6b76de8..d963791 100644 --- a/pages/common/addDevice/addBle.vue +++ b/pages/common/addDevice/addBle.vue @@ -886,8 +886,9 @@ ble.disconnectDevice().finally(dis => { ble.StopSearch().finally(res => { - - this.EquipMents = []; + + setTimeout(()=>{ + this.EquipMents = []; this.PairEquip = []; ble.StartSearch().then(result => { @@ -895,6 +896,8 @@ console.error("err=", err); MsgError("出现错误:" + err.msg, '', these); }); + },200); + }).catch(ex => { console.error("ex=", ex); MsgError("出现错误:" + ex.msg, '', these); @@ -1023,6 +1026,9 @@ }).catch((ex) => { if (index == total) { console.log("连接了N次都没连上"); + updateLoading(this, { + text: ex.msg + }); reject(ex); return; } diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue index 87e4aeb..1fbee95 100644 --- a/pages/common/index/index.vue +++ b/pages/common/index/index.vue @@ -252,8 +252,12 @@ activeTabInfo: '', dic: { showMsgTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'BJQ6075J'], //需要发送消息的类型 - showMapTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J', 'HBY008A','HBY100-Y'], //需要显示地图的类型 - showCallPolice: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J','HBY008A', 'HBY100-Y'] //需要发送报警的类型 + showMapTypes: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J', 'HBY008A', + 'HBY100-Y' + ], //需要显示地图的类型 + showCallPolice: ['BJQ6170', 'HBY210', 'HBY670', 'BJQ6075', 'HBY018A', 'HBY100-J', 'BJQ6075J', + 'HBY008A', 'HBY100-Y' + ] //需要发送报警的类型 }, isPageShow: true } diff --git a/utils/BleHelper.js b/utils/BleHelper.js index 08be2b4..3d2b207 100644 --- a/utils/BleHelper.js +++ b/utils/BleHelper.js @@ -909,7 +909,7 @@ class BleHelper { this.updateCache(); } - }, 500); + }, 100); }); @@ -1157,7 +1157,7 @@ class BleHelper { //停止搜索 StopSearch() { if (this.data.platform == 'web' || !this.data.discovering) { - console.error("web平台或当前没有搜索,直接返回"); + console.error("web平台或当前没有搜索,直接返回",this.data.discovering); return Promise.resolve(); } let p1 = new Promise((resolve, reject) => { -- 2.43.5 From 1264ec70a20291df2408741b2b1a84c0544389bf Mon Sep 17 00:00:00 2001 From: liub Date: Fri, 3 Apr 2026 10:01:04 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=B0=86=E4=BA=A7=E5=93=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E3=80=81=E6=93=8D=E4=BD=9C=E8=AF=B4=E6=98=8E=E3=80=81?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=A7=86=E9=A2=91=E5=B0=81=E8=A3=85=E6=88=90?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ProParams/ProParams.vue | 112 +++ pages.json | 8 +- pages/008A/HBY008A.vue | 95 +-- pages/018A/HBY018A.vue | 96 +-- pages/100/HBY100.vue | 85 +- pages/100J/HBY100-J.vue | 105 +-- pages/100Y/HBY100Y.vue | 1213 ++++++++++++++++++++++++++++ pages/102/HBY102.vue | 92 +-- pages/210/HBY210.vue | 37 +- pages/4877/BJQ4877.vue | 88 +- pages/4877/BJQ4877V1.vue | 89 +- pages/6075J/BJQ6075J.vue | 73 +- pages/6107/BJQ6107.vue | 91 +-- pages/6155/BJQ6155.vue | 86 +- pages/6155/deviceDetail.vue | 85 +- pages/6170/deviceControl/index.vue | 41 +- pages/6331/BJQ6331.vue | 85 +- pages/650/HBY650.vue | 86 +- pages/670/HBY670.vue | 80 +- pages/7305/BJQ7305.vue | 88 +- 20 files changed, 1406 insertions(+), 1329 deletions(-) create mode 100644 components/ProParams/ProParams.vue create mode 100644 pages/100Y/HBY100Y.vue diff --git a/components/ProParams/ProParams.vue b/components/ProParams/ProParams.vue new file mode 100644 index 0000000..11742ea --- /dev/null +++ b/components/ProParams/ProParams.vue @@ -0,0 +1,112 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index e06e62d..9289587 100644 --- a/pages.json +++ b/pages.json @@ -451,7 +451,13 @@ "path" : "pages/008A/HBY008A", "style" : { - "navigationBarTitleText" : "HBY008A" + "navigationStyle": "custom" + } + }, + { + "path": "pages/100Y/HBY100Y", + "style": { + "navigationBarTitleText": "" } } diff --git a/pages/008A/HBY008A.vue b/pages/008A/HBY008A.vue index 2dd2dc4..a6b2dd8 100644 --- a/pages/008A/HBY008A.vue +++ b/pages/008A/HBY008A.vue @@ -23,14 +23,14 @@ - + {{formData.battary}}% 电量 - + {{formData.xuhang}} 续航时间 @@ -43,10 +43,7 @@ 设备名称 {{device.deviceName}} - - 设备IMEI - {{device.deviceImei}} - + Mac地址 @@ -65,55 +62,10 @@ {{formData.sta_system}} - - 定位信息 - - - {{formData.Lon}} - - - - - {{formData.Lat}} - - - - - - - {{formData.address}} - - - - - - - + - - - - - - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - - + + @@ -143,9 +95,9 @@ var eventChannel = null; var these = null; var ble = null; - var rec = null; + var recei = null; var mq = null; - + var pagePath="pages/008A/HBY008A"; export default { data() { @@ -163,7 +115,7 @@ src: '/static/images/common/shape.png' } ], - title: 'BJQ6075', + title: 'HBY008A', showBack: true, height: 90 }, @@ -241,9 +193,11 @@ onUnload() { console.log("页面卸载,释放资源"); let statusTopic = `A/${this.formData.imei?this.formData.imei:this.device.deviceImei}`; - + if(ble){ ble.removeAllCallback(pagePath); - ble.removeReceiveCallback(pagePath); + ble.removeReceiveCallback(pagePath); + } + if (mq) { mq.unsubscribe(statusTopic); mq.disconnect(); @@ -258,7 +212,8 @@ this.Status.pageHide = true; }, - onload() { + onLoad() { + these = this; recei = BleReceive.getBleReceive(); ble = BleTool.getBleTool(); @@ -270,7 +225,7 @@ ble.addDisposeCallback(these.deviceDispose, pagePath); ble.addRecoveryCallback(these.deviceRecovry, pagePath); - let eventChannel = this.getOpenerEventChannel(); + eventChannel = this.getOpenerEventChannel(); eventChannel.on('detailData', function(data) { @@ -493,23 +448,7 @@ }); }, - proDetail: function(pgetpe) { - debugger; - if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') { - - MsgError("无操作权限", "确定", this); - - return; - } - let url = '/pages/common/' + pgetpe + '/index?id=' + (this.device.id ? this.device.id : 0); - - uni.navigateTo({ - url: url, - fail(ex) { - console.error(ex); - } - }); - }, + prevPage() { uni.navigateBack({ diff --git a/pages/018A/HBY018A.vue b/pages/018A/HBY018A.vue index a8a5ae1..2c38b37 100644 --- a/pages/018A/HBY018A.vue +++ b/pages/018A/HBY018A.vue @@ -93,34 +93,7 @@ - - - - - - - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - - - - - - + @@ -675,31 +648,6 @@ },these); }, - proParam: function() { - - uni.navigateTo({ - url: '/pages/common/productDes/index?id=' + this.device.id, - success(ev) { - - } - }); - }, - handRemark: function() { - uni.navigateTo({ - url: '/pages/common/operatingInstruct/index?id=' + this.device.id, - success(ev) { - - } - }); - }, - handVideo: function() { - uni.navigateTo({ - url: '/pages/common/operationVideo/index?id=' + this.device.id, - success(ev) { - - } - }); - }, @@ -1071,47 +1019,7 @@ text-align: left; } - .proinfo .itemcontent { - display: flex; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-content: center; - justify-content: space-evenly; - } - - .proinfo .item { - width: 180rpx; - height: 180rpx; - box-sizing: border-box; - padding: 40rpx; - border-radius: 16rpx; - background: rgba(26, 26, 26, 1); - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-content: center; - justify-content: center; - align-items: center; - } - - .proinfo .item .img { - width: 50rpx; - height: 50rpx; - - - } - - .proinfo .item .txt { - color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; - font-size: 24rpx; - font-weight: 400; - margin-top: 20rpx; - letter-spacing: 0.07px; - text-align: left; - } - + .slider-container { padding: 0px; diff --git a/pages/100/HBY100.vue b/pages/100/HBY100.vue index a07fe3c..2e11bab 100644 --- a/pages/100/HBY100.vue +++ b/pages/100/HBY100.vue @@ -229,23 +229,7 @@ - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - + @@ -1401,31 +1385,7 @@ onFreqChanging(e){ },these); }, - proParam: function() { - - uni.navigateTo({ - url: '/pages/common/productDes/index?id=' + this.device.id, - success(ev) { - - } - }); - }, - handRemark: function() { - uni.navigateTo({ - url: '/pages/common/operatingInstruct/index?id=' + this.device.id, - success(ev) { - - } - }); - }, - handVideo: function() { - uni.navigateTo({ - url: '/pages/common/operationVideo/index?id=' + this.device.id, - success(ev) { - - } - }); - }, + @@ -1795,46 +1755,7 @@ onFreqChanging(e){ text-align: left; } - .proinfo .itemcontent { - display: flex; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-content: center; - justify-content: space-evenly; - } - - .proinfo .item { - width: 180rpx; - height: 180rpx; - box-sizing: border-box; - padding: 40rpx; - border-radius: 16rpx; - background: rgba(26, 26, 26, 1); - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-content: center; - justify-content: center; - align-items: center; - } - - .proinfo .item .img { - width: 50rpx; - height: 50rpx; - - - } - - .proinfo .item .txt { - color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; - font-size: 24rpx; - font-weight: 400; - margin-top: 20rpx; - letter-spacing: 0.07px; - text-align: left; - } + .slider-container { diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 0496367..ec3ff87 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -190,36 +190,9 @@ backgroundColor="#686767" block-size="20" block-color="#ffffffde" @change="onVolumeChanging" @changing="onVolumeChanging" class="custom-slider" /> - - 产品信息 - - - - - 产品参数 - - - - - 操作说明 - - - - - 操作视频 - - - - - + + @@ -231,7 +204,15 @@ showLoading, hideLoading, updateLoading - } from '@/utils/loading.js' + } from '@/utils/loading.js'; + import { + MsgSuccess, + MsgError, + MsgClose, + MsgWarning, + showPop, + MsgInfo + } from '@/utils/MsgPops.js'; import request, { baseURL } from '@/utils/request.js'; @@ -1460,29 +1441,7 @@ }, showBleUnConnect() {}, - proParam: function() { - uni.navigateTo({ - url: '/pages/common/productDes/index?id=' + this.deviceInfo.deviceId, - success(ev) {} - }); - }, - handRemark: function() { - uni.navigateTo({ - url: '/pages/common/operatingInstruct/index?id=' + this.deviceInfo.deviceId, - success(ev) { - - } - }); - }, - handVideo: function() { - uni.navigateTo({ - url: '/pages/common/operationVideo/index?id=' + this.deviceInfo.deviceId, - success(ev) { - - } - }); - }, - + closePop: function() { this.Status.Pop.showPop = false; @@ -1547,6 +1506,7 @@ option.buttonBgColor = '#BBE600'; } these.Status.Pop.showPop = true; + showPop(option,this); }, btnClick() { @@ -1920,44 +1880,7 @@ text-align: left; } - .proinfo .itemcontent { - display: flex; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-content: center; - justify-content: space-evenly; - } - - .proinfo .item { - width: 180rpx; - height: 180rpx; - box-sizing: border-box; - padding: 40rpx; - border-radius: 16rpx; - background: rgba(26, 26, 26, 1); - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-content: center; - justify-content: center; - align-items: center; - } - - .proinfo .item .img { - width: 50rpx; - height: 50rpx; - } - - .proinfo .item .txt { - color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; - font-size: 24rpx; - font-weight: 400; - margin-top: 20rpx; - letter-spacing: 0.07px; - text-align: left; - } + .slider-container { padding: 0px; diff --git a/pages/100Y/HBY100Y.vue b/pages/100Y/HBY100Y.vue new file mode 100644 index 0000000..cf619a7 --- /dev/null +++ b/pages/100Y/HBY100Y.vue @@ -0,0 +1,1213 @@ + + + + + \ No newline at end of file diff --git a/pages/102/HBY102.vue b/pages/102/HBY102.vue index 57d147c..113d0ed 100644 --- a/pages/102/HBY102.vue +++ b/pages/102/HBY102.vue @@ -148,29 +148,7 @@ - - - - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - - - - + - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - + @@ -2136,18 +2120,7 @@ }); }, - proDetail: function(pgetpe) { - - - let url = '/pages/common/' + pgetpe + '/index?id=' + (this.device.id ? this.device.id : 0); - - uni.navigateTo({ - url: url, - fail(ex) { - console.error(ex); - } - }); - }, + prevPage() { uni.navigateBack({ @@ -2552,47 +2525,7 @@ text-align: left; } - .proinfo .itemcontent { - display: flex; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-content: center; - justify-content: space-evenly; - } - - .proinfo .item { - width: 180rpx; - height: 180rpx; - box-sizing: border-box; - padding: 40rpx; - border-radius: 16rpx; - background: rgba(26, 26, 26, 1); - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-content: center; - justify-content: center; - align-items: center; - } - - .proinfo .item .img { - width: 50rpx; - height: 50rpx; - - - } - - .proinfo .item .txt { - color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; - font-size: 24rpx; - font-weight: 400; - margin-top: 20rpx; - letter-spacing: 0.07px; - text-align: left; - } - + .slider-container { padding: 0px; diff --git a/pages/6107/BJQ6107.vue b/pages/6107/BJQ6107.vue index 750fc1b..840d484 100644 --- a/pages/6107/BJQ6107.vue +++ b/pages/6107/BJQ6107.vue @@ -184,29 +184,7 @@ - - - - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - - - - + - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - + + @@ -1861,27 +1846,7 @@ } } }, - // 操作说明 - operatingInst() { - let id = this.computedDeviceId - uni.navigateTo({ - url: `/pages/common/operatingInstruct/index?id=${id}` - }) - }, - // 产品参数 - productparams() { - let id = this.computedDeviceId - uni.navigateTo({ - url: `/pages/common/productDes/index?id=${id}` - }) - }, - // 操作视频 - operatingVideo() { - let id = this.computedDeviceId - uni.navigateTo({ - url: `/pages/common/operationVideo/index?id=${id}` - }) - }, + // 发送mqtt查询设备信息 queryDeviceStatus() { if (this.mqttClient && this.mqttClient.isConnected()) { diff --git a/pages/6331/BJQ6331.vue b/pages/6331/BJQ6331.vue index fe6ed7c..ed179ee 100644 --- a/pages/6331/BJQ6331.vue +++ b/pages/6331/BJQ6331.vue @@ -153,23 +153,7 @@ - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - + - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - + @@ -878,31 +862,7 @@ import request, { baseURL } from '@/utils/request.js'; this.formData.cMode = !this.formData.cMode; this.MainModeSetting(this.formData.cMode, "lamp"); }, - proParam: function() { - - uni.navigateTo({ - url: '/pages/common/productDes/index?id=' + this.device.id, - success(ev) { - - } - }); - }, - handRemark: function() { - uni.navigateTo({ - url: '/pages/common/operatingInstruct/index?id=' + this.device.id, - success(ev) { - - } - }); - }, - handVideo: function() { - uni.navigateTo({ - url: '/pages/common/operationVideo/index?id=' + this.device.id, - success(ev) { - - } - }); - }, + checkImgUpload: function(type, index) { console.log("123213213213"); let f = these.getDevice(); @@ -1961,47 +1921,7 @@ import request, { baseURL } from '@/utils/request.js'; text-align: left; } - .proinfo .itemcontent { - display: flex; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-content: center; - justify-content: space-evenly; - } - - .proinfo .item { - width: 180rpx; - height: 180rpx; - box-sizing: border-box; - padding: 40rpx; - border-radius: 16rpx; - background: rgba(26, 26, 26, 1); - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-content: center; - justify-content: center; - align-items: center; - } - - .proinfo .item .img { - width: 50rpx; - height: 50rpx; - - - } - - .proinfo .item .txt { - color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; - font-size: 24rpx; - font-weight: 400; - margin-top: 20rpx; - letter-spacing: 0.07px; - text-align: left; - } - + .slider-container { padding: 0px; diff --git a/pages/670/HBY670.vue b/pages/670/HBY670.vue index a38d9fa..a76b342 100644 --- a/pages/670/HBY670.vue +++ b/pages/670/HBY670.vue @@ -252,23 +252,7 @@ - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - + @@ -1697,26 +1681,7 @@ setTimeout(task, 0); }, - proDetail: function(type) { - if (!this.permissions.includes('41') && this.Status.apiType !== 'listA') { - - showPop({ - message: '无操作权限', - iconUrl: "/static/images/common/uploadErr.png", - borderColor: "#e034344d", - buttonBgColor: "#E03434", - okCallback: null, - buttonText: "确定" - },these) - return; - } - uni.navigateTo({ - url: '/pages/common/' + type + '/index?id=' + this.device.id, - success(ev) { - - } - }); - }, + checkImgUpload: function(type, index) { console.log("123213213213"); @@ -3031,46 +2996,7 @@ text-align: left; } - .proinfo .itemcontent { - display: flex; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-content: center; - justify-content: space-evenly; - } - - .proinfo .item { - width: 180rpx; - height: 180rpx; - box-sizing: border-box; - padding: 40rpx; - border-radius: 16rpx; - background: rgba(26, 26, 26, 1); - display: flex; - flex-direction: column; - flex-wrap: nowrap; - align-content: center; - justify-content: center; - align-items: center; - } - - .proinfo .item .img { - width: 50rpx; - height: 50rpx; - - - } - - .proinfo .item .txt { - color: rgba(255, 255, 255, 0.6); - font-family: PingFang SC; - font-size: 24rpx; - font-weight: 400; - margin-top: 20rpx; - letter-spacing: 0.07px; - text-align: left; - } + .slider-container { diff --git a/pages/7305/BJQ7305.vue b/pages/7305/BJQ7305.vue index f6d93d5..a5f89ab 100644 --- a/pages/7305/BJQ7305.vue +++ b/pages/7305/BJQ7305.vue @@ -131,25 +131,7 @@ - - 产品信息 - - - - 产品参数 - - - - 操作说明 - - - - 操作视频 - - - - - +