zhgdyunapp/unpackage/dist/build/h5/static/js/pages-projectEnd-projectIndex-projectIndex.01b5eea1.js
2023-02-06 11:14:16 +08:00

1 line
34 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-projectEnd-projectIndex-projectIndex"],{"07de":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var o={headers:n("3b61").default,uniPopup:n("88f6").default,footers:n("2e0a").default},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"fullHeight projectIndexPage",staticStyle:{"background-color":"white"}},[n("v-uni-scroll-view",{class:5==e.accountType||6==e.accountType?"smallHeight":"",attrs:{"scroll-y":!0}},[n("headers",{attrs:{showBack:5!=e.accountType&&6!=e.accountType,themeType:"white"}},[n("v-uni-view",{staticClass:"headerName"},[e._v(e._s(e.projectDetail.projectName))])],1),n("v-uni-image",{staticClass:"projectIndexBG",style:{height:e.systemInfo.statusBarHeight+357+"px"},attrs:{src:"/static/projectIndexBG.png"}}),n("v-uni-view",{staticClass:"topBoxContent"},[n("v-uni-view",{staticStyle:{height:"20px"}}),n("v-uni-view",{staticClass:"progressBox"},[n("v-uni-image",{staticClass:"progressLine",attrs:{src:"/static/progressLine.png"}}),n("v-uni-view",{staticClass:"title1"},[e._v("工程进度")]),n("v-uni-view",{staticClass:"title2"},[n("v-uni-text",[e._v(e._s(e.projectDetail.periodRatio?e.projectDetail.periodRatio:"--"))]),n("v-uni-text",{staticClass:"unit"},[e._v("%")])],1),n("v-uni-text",{staticClass:"status",class:2==e.projectDetail.contractPeriodType?"redStatus":""},[e._v(e._s(1==e.projectDetail.contractPeriodType?"正常":"已延期"))])],1),n("v-uni-view",{staticClass:"weatherBox"},[n("v-uni-view",{staticClass:"top"},[e._v(e._s(e.weatherInfo.temperature)+"℃"),n("v-uni-image",{staticClass:"weatherIcon",attrs:{src:"/static/weatherIcon/"+e.weatherIcon(e.weatherInfo.weather)+".png"}})],1),n("v-uni-view",{staticClass:"bottom"},[e._v(e._s(e.weatherInfo.winddirection)+"风 "+e._s(e.weatherInfo.windpower)+"级")])],1),n("v-uni-view",{staticClass:"dateBox"},[n("v-uni-view",{staticClass:"item"},[n("v-uni-view",{},[e._v(e._s(null!=e.projectDetail.contractPeriodStartTime?e.projectDetail.contractPeriodStartTime:"—.—.—"))]),n("v-uni-view",{},[e._v("项目开工日期")])],1),n("v-uni-view",{staticClass:"item item2"},[n("v-uni-view",{},[e._v(e._s(null!=e.projectDetail.contractPeriodEndTime?e.projectDetail.contractPeriodEndTime:"—.—.—"))]),n("v-uni-view",{},[e._v("要求完成日期")])],1)],1)],1),n("v-uni-view",{staticClass:"moudleContent"},[n("v-uni-view",{staticClass:"moudleTitle"},[e._v("·已有产品·")]),n("v-uni-view",{staticClass:"moudleBox"},e._l(e.list,(function(t,o){return t.operation&&2==t.moduleType&&1==t.appShow?n("v-uni-view",{key:o,staticClass:"moudleItem",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.goMoudleFn(t)}}},[n("v-uni-view",{staticClass:"inner"},[1==e.iconType?n("v-uni-view",{staticClass:"imgBox"},[n("v-uni-image",{staticClass:"img",attrs:{src:"/static/moudleImg/"+t.moduleIcon+".png"}})],1):e._e(),2==e.iconType?n("v-uni-view",{staticClass:"imgBox"},[n("v-uni-image",{staticClass:"img",attrs:{src:"/static/moudleImg/"+t.bigModuleIcon+".png"}})],1):e._e(),n("v-uni-view",{staticClass:"desc"},[e._v(e._s(t.appName))])],1)],1):e._e()})),1)],1)],1),n("uni-popup",{ref:"popupqrcode",attrs:{type:"center"}},[n("v-uni-view",{staticClass:"qrcodeItem"},[n("v-uni-view",{staticClass:"title"},[e._v("打卡成功")]),n("v-uni-view",{staticClass:"checkingPointName"},[e._v("巡检点:"+e._s(e.qrCode.checkingPointName))]),n("v-uni-view",{staticClass:"position"},[e._v("巡检点位置:"+e._s(e.qrCode.position))])],1)],1),5==e.accountType||6==e.accountType?n("footers",{attrs:{activeTab:"projectEnd"}}):e._e()],1)},a=[]},"14a0":function(e,t,n){"use strict";var o=n("4ea4");n("4160"),n("c975"),n("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("3b61")),a=o(n("2e0a")),s=n("d875"),r={components:{headers:i.default,footers:a.default},data:function(){return{qrCode:{},projectDetail:{projectName:"",contractPeriodEndTime:"",contractPeriodStartTime:"",contractPeriodType:1,periodRatio:0},userInfo:{},searchsn:"",accountType:1,list:[],weatherInfo:{city:"--",weather:"-",temperature:"--",winddirection:"--",windpower:"--",humidity:"--"},iconType:"1",systemInfo:{statusBarHeight:0}}},onShow:function(){this.getSystemLogoConfig(),(0,s.closeBle)().then((function(e){console.log("断开蓝牙成功")})).catch((function(e){console.log("断开蓝牙失败")})),uni.getStorageSync("oldObj")&&uni.removeStorageSync("oldObj"),uni.getStorageSync("buildObj")&&uni.removeStorageSync("buildObj")},onLoad:function(){var e=JSON.parse(uni.getStorageSync("userInfo"));this.userInfo=e,this.accountType=e.accountType;var t=e.menuAuthority.moduleList;console.log("上面的",t),this.systemInfo=uni.getStorageSync("systemInfo"),this.getSystemLogoConfig(),this.getAllModule(t),5==this.accountType||6==this.accountType?(this.searchsn=e.sn,this.getProjectDetail()):(this.projectDetail=JSON.parse(uni.getStorageSync("projectDetail")),this.loadWeather()),this.viewVersionInfo()},onReady:function(){},methods:{viewVersionInfo:function(){return!1},weatherIcon:function(e){return"晴"==e?"w_sun":"多云"==e?"w_cloud":"阴"==e?"w_overcast":e.indexOf("雨")?"w_rain":e.indexOf("雷")?"w_thunder":e.indexOf("雪")?"w_snow":e.indexOf("雾")?"w_fog":"w_sun"},getSystemLogoConfig:function(){var e=this;this.sendRequest({url:"xmgl/systemLogoConfig/selectSystemLogoConfig",data:{},method:"GET",success:function(t){console.log(t.result.iconType),e.iconType=t.result.iconType?t.result.iconType:"1"}})},loadWeather:function(){var e=this;uni.request({url:"http://restapi.amap.com/v3/weather/weatherInfo",data:{key:"a3217cf9335d333c307abee2fce600b5",city:this.projectDetail.cityCode,extensions:"base",output:"JSON"},success:function(t){"1"==t.data.status&&t.data.lives[0]&&(e.weatherInfo=t.data.lives[0])}})},goMoudleFn:function(e){switch(e.plugin){case"markRoom":uni.navigateTo({url:"../markRoom/markRoom"});break;case"videoMonitor":uni.navigateTo({url:"../../videoManage/videoList?sn="+this.projectDetail.projectSn+"&pageType=backEnd"});break;case"projectInfo":uni.navigateTo({url:"../project/projectInfo"});break;case"environmentMonitor":uni.navigateTo({url:"../environment/menu"});break;case"laborManage":uni.navigateTo({url:"../laborManage/index"});break;case"constructionLog":uni.navigateTo({url:"../constructionLog/list"});break;case"electricBoxMange":uni.navigateTo({url:"../electricBox/index"});break;case"lifterManage":uni.navigateTo({url:"../lifterMonitoring/index"});break;case"carManage":uni.navigateTo({url:"../carManage/index"});break;case"towerManage":uni.navigateTo({url:"../towerManage/index"});break;case"dailyInspection":uni.navigateTo({url:"../dailyCheck/index"});break;case"qualitySpringback":uni.navigateTo({url:"../qualitySpringback/index"});break;case"unloadManage":uni.navigateTo({url:"../unload/index"});break;case"concreteMonitoring":uni.navigateTo({url:"../concreteMonitoring/index"});break;case"safeManage":uni.navigateTo({url:"../safeManage/safeIndex"});break;case"qualityManage":uni.navigateTo({url:"../qualityManage/index"});break;case"carWashManage":uni.navigateTo({url:"../carWashManage/index"});break;case"dangerBigProject":uni.navigateTo({url:"../dangerBigProject/index"});break;case"fileManage":uni.navigateTo({url:"../../fileManage/fileManage"});break;case"betonManage":uni.navigateTo({url:"../betonManage/index"});break;case"dangerBroadcast":uni.navigateTo({url:"../../alarmPage/index"});break;case"saosao":console.log("打开saosao");var t=this;uni.scanCode({scanType:["qrCode"],success:function(e){console.log("条码类型:"+e.scanType),console.log("条码内容:"+e.result);var n=JSON.parse(e.result),o={checkingPointId:n.checkingPointId,checkingPointName:n.checkingPointName,checkingPointUserId:t.userInfo.userId,checkingPointUserName:t.userInfo.realName||t.userInfo.account,position:n.position};t.sendRequest({url:"xmgl/checkingPointInfo/add",data:o,method:"POST",success:function(e){console.log(e,"res"),console.log(o,"==="),t.qrCode=o,t.$refs.popupqrcode.open(),setTimeout((function(e){t.$refs.popupqrcode.close()}),5e3)}})}});break;default:uni.showToast({icon:"none",title:"该产品暂未开放,敬请期待!"})}},getProjectDetail:function(){var e=this;this.sendRequest({url:"xmgl/project/getProjectInfoBySn",data:{projectSn:this.searchsn},method:"POST",success:function(t){e.projectDetail=t.result,uni.setStorageSync("projectDetail",JSON.stringify(t.result)),e.loadWeather()}})},getAllModule:function(e){var t=this;this.sendRequest({url:"xmgl/baseModule/list",data:{},method:"POST",success:function(n){console.log("打印0",n);var o=n.result;o.forEach((function(t,n){o[n].operation=!1,e.forEach((function(e){e.moduleId==t.moduleId&&(o[n].operation=!0,o[n].menuList=e.menuList)}))})),t.list=o}})}}};t.default=r},"1a74":function(e,t,n){"use strict";var o=n("634a"),i=n.n(o);i.a},"2e0a":function(e,t,n){"use strict";n.r(t);var o=n("ba40"),i=n("d9aa");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("39a8");var s,r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"10344498",null,!1,o["a"],s);t["default"]=c.exports},"2f01":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={props:["activeTab"],data:function(){return{tabList:[],userInfo:{accountType:1}}},mounted:function(){if(this.userInfo=JSON.parse(uni.getStorageSync("userInfo")),5==this.userInfo.accountType||6==this.userInfo.accountType)this.tabList.push({appName:"首页",moduleIcon2:"tabIcon-index",moduleIcon:"tabIcon-index-active",plugin:"projectEnd",appShow:1},{appName:"我的",moduleIcon2:"tabIcon-my2",moduleIcon:"tabIcon-my2-active",plugin:"my",appShow:1});else{for(var e=this.userInfo.menuAuthority.moduleList,t=0;t<e.length;t++)1==e[t].moduleType&&this.tabList.push(e[t]);this.tabList.push({appName:"我的",moduleIcon2:"tabIcon-my",moduleIcon:"tabIcon-my-select",plugin:"my",appShow:1})}},methods:{tabClick:function(e){switch(console.log(e),e){case"projectManage":uni.redirectTo({url:"../../pages/projectManage/projectManage"});break;case"videoManage":5==this.userInfo.accountType?uni.redirectTo({url:"../../pages/videoManage/videoList?sn="+that.userInfo.sn}):uni.redirectTo({url:"../../pages/areaTree/areaTree"});break;case"my":uni.redirectTo({url:"/pages/my/my"});break;case"personManage":uni.redirectTo({url:"../../pages/personManage/personManage"});break;case"projectEnd":uni.redirectTo({url:"/pages/projectEnd/projectIndex/projectIndex"});break;case"deviceManage":uni.redirectTo({url:"../../pages/deviceManage/deviceManage"});break;case"markRoom":uni.redirectTo({url:"../../pages/markRoomManage/markRoomManage"});break}}}};t.default=o},"344a":function(e,t,n){"use strict";n.r(t);var o=n("07de"),i=n("f126");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("1a74");var s,r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"24654d8f",null,!1,o["a"],s);t["default"]=c.exports},"34f5":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var o={uniTransition:n("bccb").default},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.showPopup?n("v-uni-view",{staticClass:"uni-popup",class:[e.popupstyle,e.isDesktop?"fixforpc-z-index":""]},[n("v-uni-view",{on:{touchstart:function(t){arguments[0]=t=e.$handleEvent(t),e.touchstart.apply(void 0,arguments)}}},[e.maskShow?n("uni-transition",{key:"1",attrs:{name:"mask","mode-class":"fade",styles:e.maskClass,duration:e.duration,show:e.showTrans},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTap.apply(void 0,arguments)}}}):e._e(),n("uni-transition",{key:"2",attrs:{"mode-class":e.ani,name:"content",styles:e.transClass,duration:e.duration,show:e.showTrans},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTap.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"uni-popup__wrapper",class:[e.popupstyle],style:{backgroundColor:e.bg},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.clear.apply(void 0,arguments)}}},[e._t("default")],2)],1)],1),e.maskShow?n("keypress",{on:{esc:function(t){arguments[0]=t=e.$handleEvent(t),e.onTap.apply(void 0,arguments)}}}):e._e()],1):e._e()},a=[]},"39a8":function(e,t,n){"use strict";var o=n("f939"),i=n.n(o);i.a},"3af3":function(e,t,n){"use strict";n.r(t);var o=n("de86"),i=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"5bc5":function(e,t,n){"use strict";n("7db0"),n("caad"),n("b64b"),n("2532"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={name:"Keypress",props:{disable:{type:Boolean,default:!1}},mounted:function(){var e=this,t={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},n=function(n){if(!e.disable){var o=Object.keys(t).find((function(e){var o=n.key,i=t[e];return i===o||Array.isArray(i)&&i.includes(o)}));o&&setTimeout((function(){e.$emit(o,{})}),0)}};document.addEventListener("keyup",n)},render:function(){}};t.default=o},"634a":function(e,t,n){var o=n("f84d");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("4f06").default;i("70a53f1e",o,!0,{sourceMap:!1,shadowMode:!1})},6510:function(e,t,n){"use strict";var o=n("e966"),i=n.n(o);i.a},7580:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.footerBox[data-v-10344498]{background-color:#fff;display:flex;width:100%;position:fixed;bottom:0;left:0;z-index:9999;border-top:1px solid hsla(0,0%,59.2%,.15)}.footerItem[data-v-10344498]{font-size:12px;flex:1;justify-content:center;text-align:center;color:#9495ad}.footerItem .tabIcon2[data-v-10344498]{display:none}.footerItem.active[data-v-10344498]{color:#5181f6}.footerItem.active .tabIcon2[data-v-10344498]{display:inline-block}.footerItem.active .tabIcon1[data-v-10344498]{display:none}.footerItem .desc[data-v-10344498]{padding-bottom:5px}.tabIcon[data-v-10344498]{width:26px;height:26px}.footerBox2 .desc[data-v-10344498]{padding-bottom:8px}.footerBox2 .footerItem:first-child .tabIcon[data-v-10344498]{padding-top:10px;width:23px;height:21px}.footerBox2 .footerItem:last-child .tabIcon[data-v-10344498]{padding-top:8px;width:20px;height:23px}',""]),e.exports=t},"88f6":function(e,t,n){"use strict";n.r(t);var o=n("34f5"),i=n("3af3");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("6510");var s,r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"cb0579da",null,!1,o["a"],s);t["default"]=c.exports},ba40:function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"footerBox",class:5==e.userInfo.accountType||6==e.userInfo.accountType?"footerBox2":""},e._l(e.tabList,(function(t,o){return 1==t.appShow?n("v-uni-view",{key:o,staticClass:"footerItem",class:e.activeTab==t.plugin?"active":"",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.tabClick(t.plugin)}}},[n("v-uni-image",{staticClass:"tabIcon tabIcon1",attrs:{src:"/static/"+t.moduleIcon2+".png"}}),n("v-uni-image",{staticClass:"tabIcon tabIcon2",attrs:{src:"/static/"+t.moduleIcon+".png"}}),n("v-uni-view",{staticClass:"desc"},[e._v(e._s(t.appName))])],1):e._e()})),1)},a=[]},d875:function(e,t,n){"use strict";n("99af"),n("4160"),n("d81d"),n("fb6a"),n("a434"),n("c19f"),n("ace4"),n("d3b7"),n("e25e"),n("4d63"),n("ac1f"),n("25f0"),n("5319"),n("498a"),n("5cc6"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("2954"),n("649e"),n("219c"),n("b39a"),n("72f7"),n("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.getBlooth=s,t.DeviceFound=c,t.closeBle=l,t.createBLE=d,t.notify=g,t.watchNotify=v,t.readBLE=x,t.writeBLE=w;var o=[],i=0;function a(e,t,n){for(var o=0;o<e.length;o++)if(e[o][t]===n)return o;return-1}function s(){return o=[],new Promise((function(e,t){uni.openBluetoothAdapter({success:function(n){r().then((function(n){console.log(n,"searchBlooth"),uni.onBluetoothDeviceFound((function(e){console.log(e,"搜索到蓝牙设备"),console.log(e.devices[0]);var t=a(o,"deviceId",e.devices[0].deviceId);console.log(t,"idx"),"-1"==t&&(!e.devices[0].localName||e.devices[0].name&&"未知设备"!=e.devices[0].name?e.devices[0].name&&"未知设备"!=e.devices[0].name&&o.push(e.devices[0]):(e.devices[0].name=e.devices[0].localName,o.push(e.devices[0])))})),setTimeout((function(){c().then((function(t){console.log(t,"DeviceFound"),console.log(o,"BLEList"),p(),e(t)})).catch((function(e){console.log(e,"searchBlooth1"),t(e)}))}),5e3)})).catch((function(e){console.log(e,"DeviceFound1"),t(e)}))},fail:function(e){console.log(e,"openBluetoothAdapter err"),t(e)}})}))}function r(){return new Promise((function(e,t){uni.startBluetoothDevicesDiscovery({success:function(t){console.log(t,"startBluetoothDevicesDiscovery"),e(t)},fail:function(e){t(e)}})}))}function c(){return u(),new Promise((function(e,t){uni.getBluetoothDevices({success:function(t){console.log(t,"蓝牙列表"),console.log(o,"BLEListBLEList"),e({devices:o})},fail:function(e){console.log(e,"错误的"),t(e)}})}))}function u(){uni.stopBluetoothDevicesDiscovery({success:function(e){console.log(e,"蓝牙停止")}})}function l(e,t){return console.log("closeBle"),new Promise((function(n,o){var i=uni.getStorageSync("BLECONNID");console.log(i,"closeBle"),i&&(uni.closeBLEConnection({deviceId:i,success:function(e){console.log("断开蓝牙连接",e),uni.removeStorageSync("RESCODE"),uni.removeStorageSync("BLECONNID")}}),uni.closeBluetoothAdapter({success:function(i){console.log("断开蓝牙模块",i),e&&uni.openBluetoothAdapter({success:function(n){console.log("打开蓝牙模块"),d({deviceId:e},t)},fail:function(e){console.log(e,"openBluetoothAdapter err"),o(e)}}),n(i)},fail:function(e){console.log(e),o(e)}}))}))}function d(e,t){return console.log("开始连接"),new Promise((function(n,o){uni.createBLEConnection({deviceId:e.deviceId,success:function(a){console.log(a,"createBLE success"),i=0,setTimeout((function(){f(e.deviceId,t).then((function(t){console.log("createBLE getAllService"),h(e.deviceId,t.uuid).then((function(e){console.log("createBLE getCharacteristics",e),n(e)})).catch((function(e){uni.hideLoading(),o(e)}))})).catch((function(e){uni.hideLoading(),o(e)}))}),2e3),console.log("create end")},fail:function(e){uni.hideLoading(),o(e)}})}))}function p(){console.log("onBLEConnectionStateChange"),uni.onBLEConnectionStateChange((function(e){console.log("device ".concat(e.deviceId," state has changed, connected: ").concat(e.connected)),e.deviceId&&e.connected&&(uni.setStorageSync("BLECONNID",e.deviceId),uni.setStorageSync("deviceName",name))}))}function f(e,t){return new Promise((function(n,o){uni.getBLEDeviceServices({deviceId:e,success:function(o){console.log("uni.getBLEDeviceServices"),console.log(o,i),0==o.services.length?(i++,i>3?l(e,t):f(e,t)):o.services.forEach((function(o,i){console.log(o,"deviceid"),o.isPrimary&&o.uuid===t&&(uni.setStorageSync("deviceId",e),uni.setStorageSync("serviceId",o.uuid),n(o))}))},fail:function(e){uni.hideLoading(),o(e)}})}))}function h(e,t){return new Promise((function(n,o){uni.getBLEDeviceCharacteristics({deviceId:e,serviceId:t,success:function(i){i.characteristics.forEach((function(a,s){a.properties.notify||a.properties.read||!a.properties.write||(uni.setStorageSync("characteristicId",a.uuid),console.log("characteristicId1",a.uuid)),!a.properties.notify||a.properties.read||a.properties.write?s!=i.characteristics.length-1||a.properties.write||(setTimeout((function(){uni.showToast({title:"该设备不支持读和写",icon:"none"})}),500),o(i)):(console.log("characteristicId2",a.uuid),g(e,t,a.uuid).then((function(e){n(e)})),v())}))},fail:function(e){o(e)}})}))}function g(e,t,n){return new Promise((function(o,i){uni.notifyBLECharacteristicValueChange({state:!0,deviceId:e,serviceId:t,characteristicId:n,success:function(e){o(e)},fail:function(e){i(e)}})}))}function v(e){function t(e){var t=Array.prototype.map.call(new Uint8Array(e),(function(e){return("00"+e.toString(16)).slice(-2)}));return t.join("")}return console.log("开始监听。。。"),new Promise((function(e,n){uni.onBLECharacteristicValueChange((function(e){console.log(e);var n=t(e.value),o=n.toUpperCase();console.log(o,"收到的");var i=m(o);uni.$emit("recvEvent",i)}))}))}function m(e){var t,n=e.trim(),o="0x"===n.substr(0,2).toLowerCase()?n.substr(2):n,i=o.length;if(i%2!==0)return alert("Illegal Format ASCII Code!"),"";for(var a=[],s=0;s<i;s+=2)t=parseInt(o.substr(s,2),16),a.push(String.fromCharCode(t));return a.join("")}function x(e,t,n){uni.readBLECharacteristicValue({deviceId:e,serviceId:t,characteristicId:n,success:function(e){},fail:function(e){}})}function b(e){var t=0;e=e.replace(/\s*/g,"");var n=e.length;if(n%2!=0)return null;n/=2;for(var o=new Array,i=0;i<n;i++){var a=e.substr(t,2),s=parseInt(a,16);o.push(s),t+=2}return o}function w(e){console.log("writeBLE before",e);var t=b(e);console.log(t),console.log("writeBLE after");var n=uni.getStorageSync("deviceId"),o=uni.getStorageSync("serviceId"),i=uni.getStorageSync("characteristicId");return console.log(n,o,i),new Promise((function(e,a){for(var s=0;s<t.length;s+=20){var r=0;if(s+20<t.length){for(var c=t,u=new ArrayBuffer(20),l=new DataView(u),d=s;d<s+20;d++)l.setUint8(d-s,c[d]);uni.writeBLECharacteristicValue({deviceId:n,serviceId:o,characteristicId:i,value:l.buffer,success:function(t){e(t)},fail:function(e){a(e)}}),y(.02)}else{c=t;r=20<t.length?c.length-s:c.length;for(var p=new ArrayBuffer(r),f=new DataView(p),h=s;h<c.length;h++)f.setUint8(h-s,c[h]);console.log("最后一包或第一数据:"),console.log(f.buffer),uni.writeBLECharacteristicValue({deviceId:n,serviceId:o,characteristicId:i,value:f.buffer,success:function(t){e(t)},fail:function(e){a(e)}}),y(.02)}}}))}function y(e){var t=(new Date).getTime();while((new Date).getTime()-t<e);}},d9aa:function(e,t,n){"use strict";n.r(t);var o=n("2f01"),i=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},de86:function(e,t,n){"use strict";var o=n("4ea4");n("c975"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("5bc5")),a={name:"uniPopup",components:{keypress:i.default},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"}},watch:{type:{handler:function(e){this.config[e]&&this[this.config[e]](!0)},immediate:!0},isDesktop:{handler:function(e){this.config[e]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(e){this.mkclick=e},immediate:!0},isMaskClick:{handler:function(e){this.mkclick=e},immediate:!0},showPopup:function(e){document.getElementsByTagName("body")[0].style.overflow=e?"hidden":"visible"}},data:function(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:this.isDesktop?"fixforpc-top":"top"}},computed:{isDesktop:function(){return this.popupWidth>=500&&this.popupHeight>=500},bg:function(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted:function(){var e=this,t=function(){var t=uni.getSystemInfoSync(),n=t.windowWidth,o=t.windowHeight,i=t.windowTop,a=t.safeArea,s=(t.screenHeight,t.safeAreaInsets);e.popupWidth=n,e.popupHeight=o+(i||0),a&&e.safeArea?e.safeAreaInsets=s.bottom:e.safeAreaInsets=0};t()},destroyed:function(){this.setH5Visible()},created:function(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible:function(){document.getElementsByTagName("body")[0].style.overflow="visible"},closeMask:function(){this.maskShow=!1},disableMask:function(){this.mkclick=!1},clear:function(e){e.stopPropagation(),this.clearPropagation=!0},open:function(e){this.showPopup&&(clearTimeout(this.timer),this.showPopup=!1);var t=["top","center","bottom","left","right","message","dialog","share"];e&&-1!==t.indexOf(e)||(e=this.type),this.config[e]?(this[this.config[e]](),this.$emit("change",{show:!0,type:e})):console.error("缺少类型:",e)},close:function(e){var t=this;this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout((function(){t.showPopup=!1}),300)},touchstart:function(){this.clearPropagation=!1},onTap:function(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top:function(e){var t=this;this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg},e||(this.showPopup=!0,this.showTrans=!0,this.$nextTick((function(){t.messageChild&&"message"===t.type&&t.messageChild.timerClose()})))},bottom:function(e){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg},e||(this.showPopup=!0,this.showTrans=!0)},center:function(e){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"},e||(this.showPopup=!0,this.showTrans=!0)},left:function(e){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)},right:function(e){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)}}};t.default=a},e966:function(e,t,n){var o=n("fbf4");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("4f06").default;i("79438f6a",o,!0,{sourceMap:!1,shadowMode:!1})},f126:function(e,t,n){"use strict";n.r(t);var o=n("14a0"),i=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},f84d:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.qrcodeItem[data-v-24654d8f]{padding:%?40?% %?30?%;width:%?480?%;background-color:#fff;border-radius:%?8?%}.qrcodeItem .title[data-v-24654d8f]{text-align:center;margin-bottom:%?12?%}.topBoxContent[data-v-24654d8f]{color:#fff;font-size:14px;height:260px;position:relative}.topBoxContent .dateBox[data-v-24654d8f]{display:flex;align-items:center;justify-content:center;position:relative;z-index:2}.topBoxContent .dateBox .item[data-v-24654d8f]{flex:1;text-align:center}.topBoxContent .dateBox .item2[data-v-24654d8f]{border-left:1px dashed #fff}.progressBox[data-v-24654d8f]{width:150px;height:150px;position:relative;text-align:center;margin:0 auto 25px}.progressBox .title1[data-v-24654d8f]{padding-top:24px}.progressBox .title2[data-v-24654d8f]{font-size:33px;margin:6px 0}.progressBox .title2 .unit[data-v-24654d8f]{font-size:20px}.progressBox .status[data-v-24654d8f]{width:52px;height:25px;background:#8fda5c;border-radius:12px;display:inline-block;line-height:25px}.progressBox .redStatus[data-v-24654d8f]{background:#ea6868}.progressBox .progressLine[data-v-24654d8f]{position:absolute;left:0;top:0;width:100%;height:100%}.weatherBox[data-v-24654d8f]{position:absolute;top:15px;right:15px;text-align:center}.weatherBox .top[data-v-24654d8f]{font-size:27px;display:flex;align-items:center}.weatherBox .weatherIcon[data-v-24654d8f]{width:36px;height:36px}.weatherBox .bottom[data-v-24654d8f]{font-size:10px}.projectIndexPage[data-v-24654d8f] .headerBox{background-color:initial;border-bottom:none}.progressBox[data-v-24654d8f]{width:150px;height:150px;position:relative;text-align:center;margin:0 auto 24px}.progressBox .title1[data-v-24654d8f]{padding-top:24px}.progressBox .title2[data-v-24654d8f]{font-size:33px;margin:6px 0}.progressBox .title2 .unit[data-v-24654d8f]{font-size:20px}.progressBox .status[data-v-24654d8f]{width:52px;height:25px;background:#8fda5c;border-radius:12px;display:inline-block;line-height:25px}.progressBox .redStatus[data-v-24654d8f]{background:#ea6868}.progressBox .progressLine[data-v-24654d8f]{position:absolute;left:0;top:0;width:100%;height:100%}.weatherBox[data-v-24654d8f]{position:absolute;top:10px;right:15px;text-align:center}.weatherBox .top[data-v-24654d8f]{font-size:27px;display:flex;align-items:center}.weatherBox .weatherIcon[data-v-24654d8f]{width:36px;height:36px}.weatherBox .bottom[data-v-24654d8f]{font-size:10px}.moudleBox2[data-v-24654d8f]{opacity:.6}.moudleBox[data-v-24654d8f]{overflow:hidden}.moudleItem[data-v-24654d8f]{float:left;width:33.33%;font-size:13px;text-align:center;margin-bottom:10px}.moudleItem .inner[data-v-24654d8f]{border:1px solid rgba(18,41,75,.06);padding:15px 0 15px;margin:0 5px;border-radius:5px}.moudleItem .img[data-v-24654d8f]{width:40px;height:40px}.moudleItem .desc[data-v-24654d8f]{margin-top:6px;color:rgba(38,45,71,.77)}.moudleTitle[data-v-24654d8f]{color:rgba(42,43,91,.5);font-size:13px;margin:0 0 15px;text-align:center}.smallHeight[data-v-24654d8f]{height:calc(100% - 63px)}.moudleContent[data-v-24654d8f]{box-shadow:0 4px 16px 0 rgba(212,220,236,.59);border-radius:8px;padding:15px 15px;margin:55px 15px 15px;position:relative;z-index:2}.projectIndexBG[data-v-24654d8f]{width:100%;height:357px;position:absolute;top:0;left:0}',""]),e.exports=t},f939:function(e,t,n){var o=n("7580");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("4f06").default;i("c512731a",o,!0,{sourceMap:!1,shadowMode:!1})},fbf4:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.uni-popup[data-v-cb0579da]{position:fixed;z-index:99}.uni-popup.top[data-v-cb0579da], .uni-popup.left[data-v-cb0579da], .uni-popup.right[data-v-cb0579da]{top:var(--window-top)}.uni-popup .uni-popup__wrapper[data-v-cb0579da]{display:block;position:relative\r\n /* iphonex 等安全区设置,底部安全区适配 */}.uni-popup .uni-popup__wrapper.left[data-v-cb0579da], .uni-popup .uni-popup__wrapper.right[data-v-cb0579da]{padding-top:var(--window-top);flex:1}.fixforpc-z-index[data-v-cb0579da]{z-index:999}.fixforpc-top[data-v-cb0579da]{top:0}',""]),e.exports=t}}]);