1 line
9.1 KiB
JavaScript
1 line
9.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-eedcf37e"],{"0a09":function(t,e,i){var n=i("cc17");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("499e").default;a("42074fe0",n,!0,{sourceMap:!1,shadowMode:!1})},"619f":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"power_equipment"}},[i("c-title",{attrs:{hide:!1,text:"我的设备"}}),i("van-tabs",{attrs:{id:"tab"},on:{click:t.onClick},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[i("van-tab",{attrs:{title:"设备",name:"0"}})],1),i("div",{staticClass:"content"},[i("div",{staticClass:"all"},[t._v("设备总数:"+t._s(t.total))]),t._l(t.datas,(function(e,n){return i("div",{key:n,staticClass:"block"},[i("div",{staticClass:"title",on:{click:function(i){return t.expand(e)}}},[t._v(" "+t._s(e.equipment_no)+" ")]),e.checked?i("div",{staticClass:"other"},[e.info.device_data?i("div",[i("span",[t._v("设备状态:")]),i("span",{staticStyle:{color:"#ff2c29"}},[t._v(t._s(e.info.device_data.device_status))])]):t._e(),e.info.device_data?i("div",[i("span",[t._v("设备信号强度:")]),i("span",{staticStyle:{color:"#ff2c29"}},[t._v(t._s(e.info.device_data.device_wifi))])]):t._e(),e.info.device_data?i("div",[i("span",[t._v(" 设备网络类型:")]),i("span",{staticStyle:{color:"#ff2c29"}},[t._v(t._s(e.info.device_data.network))])]):t._e()]):t._e(),i("div",{staticClass:"qr_code"},[i("div",{staticClass:"btn_one",on:{click:function(i){return t.scan(e)}}},[t._v(" 查看二维码 ")]),i("div",{staticClass:"btn_two",on:{click:function(i){return t.toRecord(e.id)}}},[t._v(" 核销记录 ")]),i("div",{staticClass:"btn-three",on:{click:function(i){return t.Delete(e.id)}}},[t._v(" 删除设备 ")])]),i("div",{staticClass:"line",staticStyle:{height:"0.3125rem","background-color":"#f5f7fa",margin:"0 -0.75rem"}})])}))],2),i("div",{staticClass:"bind_wrap",class:[3==t.fun.getPhoneEnv()?"pc":""]},[i("div",{staticClass:"bind_btn",on:{click:t.toBind}},[t._v("绑定设备")])]),t.show?i("van-popup",{staticClass:"pop",staticStyle:{display:"flex","align-items":"center"},style:{height:"50%",width:"80%"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[i("div",{staticClass:"qr_code"},[i("img",{attrs:{src:t.qr_code}}),i("p",{staticStyle:{color:"#999"}},[t._v("长按保存二维码")])])]):t._e()],1)},a=[],o=(i("e7e5"),i("d399")),c=(i("d3b7"),i("159b"),i("99af"),i("6968")),r=i("ac0d"),d={mixins:[r["a"]],data:function(){return{page:1,isLoadMore:!0,last_page:0,datas:[],total:1,show:!1,qr_code:""}},components:{cTitle:c["a"]},mounted:function(){},methods:{initData:function(){this.show=!1,this.qr_code=""},toRecord:function(t){this.$router.push(this.fun.getUrl("powerNotes",{id:t}))},Delete:function(t){var e=this,i={id:t};$http.get("plugin.energy-cabin.frontend.dealer-terminal.del-equipment",i,"加载中...").then((function(t){1===t.result?(Object(o["a"])(t.msg),e.getData()):Object(o["a"])(t.msg)}),(function(t){}))},expand:function(t){var e=this;if(t.checked=!t.checked,e.$forceUpdate(),t.checked){var i={id:t.id};$http.get("plugin.energy-cabin.frontend.dealer-terminal.get-device-data",i,"加载中...").then((function(i){1===i.result?(t.info=i.data,e.$forceUpdate()):Object(o["a"])(i.msg)}),(function(t){}))}},scan:function(t){this.show=!0,this.qr_code=t.qr_code_url},getMoreData:function(){var t=this,e={page:this.page};this.isLoadMore=!1,this.page>=this.last_page||(this.page=this.page+1,e.page=this.page,$http.get("plugin.energy-cabin.frontend.dealer-terminal.get-equipment-list",e,"加载中").then((function(e){if(t.isLoadMore=!0,1!==e.result)return t.page=t.page-1,void(t.isLoadMore=!1);e.data.data.forEach((function(t,e,i){t.checked=!1,t.info={}})),t.datas=t.datas.concat(e.data.data)})).catch((function(t){})))},getData:function(){var t=this,e={page:this.page};$http.get("plugin.energy-cabin.frontend.dealer-terminal.get-equipment-list",e,"加载中...").then((function(e){1===e.result?(t.isLoadMore=!0,t.last_page=e.data.last_page,t.total=e.data.total,t.last_page||(t.last_page=0),t.datas=e.data.data,t.datas.forEach((function(t,e,i){t.checked=!1,t.info={}}))):Object(o["a"])(e.msg)}),(function(t){}))},toBind:function(){this.$router.push(this.fun.getUrl("bindEquipment"))}},activated:function(){this.initData(),this.getData()}},l=d,s=l,p=(i("fd9b"),i("2877")),f=Object(p["a"])(s,n,a,!1,null,"4265db69",null);e["default"]=f.exports},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=document.documentElement,a=document.body,o={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return n&&n.scrollTop?t=n.scrollTop:a&&(t=a.scrollTop),t},getClientHeight:function(){var t=0;return t=a.clientHeight&&n.clientHeight?Math.min(a.clientHeight,n.clientHeight):Math.max(a.clientHeight,n.clientHeight),t},getScrollHeight:function(){return Math.max(a.scrollHeight,n.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},cc17:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,"#power_equipment[data-v-4265db69]{height:100vh;background-color:#fff}#power_equipment .content[data-v-4265db69]{background-color:#fff;padding-bottom:2.5rem}#power_equipment .content .all[data-v-4265db69]{height:2.1875rem;background-color:#f4f4f4;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;padding-left:1rem}#power_equipment .content .block[data-v-4265db69]{padding:0 .75rem;margin-bottom:.3125rem}#power_equipment .content .block .title[data-v-4265db69]{padding:1.125rem 0;padding-left:.5rem;border-bottom:1px solid #f5f7fa;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#power_equipment .content .block .title .connect[data-v-4265db69]{color:#ff2c29;font-size:12px}#power_equipment .content .block .other[data-v-4265db69]{border-bottom:1px solid #f5f7fa;text-align:left;padding:.5rem 0}#power_equipment .content .block .other div[data-v-4265db69]:first-child{margin-top:0}#power_equipment .content .block .other div[data-v-4265db69]{padding-left:.5rem;margin-top:.5rem}#power_equipment .content .block .qr_code[data-v-4265db69]{padding:.75rem;padding-right:.25rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}#power_equipment .content .block .qr_code .btn_one[data-v-4265db69]{width:6.0625rem;background-color:#ff2c29;border-radius:.9375rem;color:#fff}#power_equipment .content .block .qr_code .btn_one[data-v-4265db69],#power_equipment .content .block .qr_code .btn_two[data-v-4265db69]{height:1.8125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-size:12px;margin-right:1.3125rem}#power_equipment .content .block .qr_code .btn-three[data-v-4265db69],#power_equipment .content .block .qr_code .btn_two[data-v-4265db69]{width:5.25rem;border-radius:.9375rem;border:.0625rem solid #ff2c29;color:#ff2c29}#power_equipment .content .block .qr_code .btn-three[data-v-4265db69]{height:1.8125rem;font-size:12px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#power_equipment .bind_wrap[data-v-4265db69]{position:fixed;bottom:.25rem;width:100%}#power_equipment .bind_wrap .bind_btn[data-v-4265db69]{width:18.75rem;height:2.5rem;background-color:#ff2c29;border-radius:1.25rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#fff;font-size:16px;margin:0 auto}.pc[data-v-4265db69]{position:absolute;width:375px!important}.pop[data-v-4265db69]{border-radius:.75rem}.pop .qr_code[data-v-4265db69]{margin:0 auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}",""]),t.exports=e},fd9b:function(t,e,i){"use strict";i("0a09")}}]); |