1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/site/site"],{"1c2b":function(e,t,i){"use strict";var n=i("4986"),o=i.n(n);o.a},"29ef":function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={onLoad:function(e){if(console.log(e),this.stationInfo=JSON.parse(e.item),this.stationInfo.pictures){var t=this.stationInfo.pictures.split(",");t.length>0&&(this.tops=t)}this.getStationsInfo(),this.getConfigStationInfo()},mounted:function(){var t=this;this.$app.act.selectorQuery(this,"#footer").then((function(i){var n=e.getWindowInfo(),o=9*n.windowWidth/16;t.mainHeight=n.windowHeight-o-i.height+10}))},data:function(){return{user_info:this.$app.storage.get("USER_INFO"),mainHeight:0,tops:["../../static/img/$temp-site.png"],another:!1,terminals:[],entInfo:{title:"服务提供",name:"华能贵州盘州市风电有限责任公司",code:"915205555155625655",tel:"0851-8815158",businessLicenceUrl:"/static/img/$temp-site01.jpg"},stationInfo:"",deviceList:[],timePricesList:[],nowPriceTime:{},service:{tel:"400-0000-0000",work:"09:00 至 18:00"},busineHours:""}},methods:{getStationsInfo:function(){var e=this;this.$api.base("post","/chargeApi/getStationsInfoAndUpdateDecice",{stationId:this.stationInfo.id},{}).then((function(t){e.deviceList=t.devices,e.timePricesList=t.prices,e.nowPriceTime=t.nowPriceTime;for(var i=0;i<e.deviceList.length;i++)if(e.terminals.push(e.deviceList[i]),2==i)break}))},getStatusNum:function(e){for(var t=0,i=0;i<this.deviceList.length;i++){var n=this.deviceList[i];2!=e||2!=n.deviceStatus&&3!=n.deviceStatus&&4!=n.deviceStatus?n.deviceStatus==e&&t++:t++}return t},getSatesObj:function(e){var t={};return 2==e.deviceStatus||4==e.deviceStatus?t={name:"占用",color:"blue"}:3==e.deviceStatus?t={name:"充电中",color:"orange"}:0==e.deviceStatus?t={name:"离线",color:"grey"}:1==e.deviceStatus?t={name:"空闲",color:"green"}:255==e.deviceStatus&&(t={name:"故障",color:"err"}),t},getdeviceTypeName:function(e){var t="";switch(e){case"1":t="直流设备";break;case"2":t="交流设备";break;case"3":t="交直流一体设备";break;case"4":t="无线设备";break;case"5":t="其他";break}return t},getPriceLable:function(e){var t="";switch(e){case 1:t="谷";break;case 2:t="平";break;case 3:t="峰";break}return t},getConfigStationInfo:function(){var e=this;this.$api.static(this.$config.url.configUrl+"stationConfi.json").then((function(t){console.log("获取的配置文件信息:",t),e.entInfo=t.entInfo,e.service=t.service,e.busineHours=t.busineHours}))},callPhone:function(e){this.$app.act.callPhone(e)},openCustomerService:function(){this.$refs.service.open()},openEnt_Serve:function(){this.entInfo.title="服务提供",this.$refs.entInfo.open()},openEnt_Invoicing:function(){this.entInfo.title="发票提供",this.$refs.entInfo.open()},closeEnt:function(){this.$refs.entInfo.close()},closeService:function(){this.$refs.service.close()},openLocation:function(){e.openLocation({latitude:Number(this.stationInfo.lat),longitude:Number(this.stationInfo.lng)})},goTerminal:function(e){0!=e.deviceStatus&&255!=e.deviceStatus&&this.$app.url.goto("/pages/terminal/terminal?deviceId="+e.id+"&deviceStatus="+e.deviceStatus)},toDeiceAll:function(){JSON.stringify(this.timePricesList),this.nowPriceTime.id;this.$app.url.goto("/pages/site-more/site-more?stationId="+this.stationInfo.id)},toPriceAll:function(){this.$app.url.goto("/pages/site-more/site-more?show=1&stationId="+this.stationInfo.id)},sacn:function(){var e=this;this.$app.act.scan().then((function(t){console.log(t);var i=e.getUrlParams(t.result);i&&i.connectorCode?e.getDeviceInfo(i.connectorCode):e.$app.popup.alert("二维码不正确。","温馨提示!")}))},getUrlParams:function(e){var t,i=/[?&]+([^=&]+)=([^&]*)/gi,n={};while(t=i.exec(e))n[t[1]]=t[2];return n},getDeviceInfo:function(e){var t=this;this.$api.base("post","/chargeApi/checkDevicesBySn",{sn:e},{}).then((function(e){console.log("设备信息:",e),t.goTerminal(e.device)}))}}};t.default=i}).call(this,i("df3c")["default"])},4968:function(e,t,i){"use strict";i.r(t);var n=i("751f"),o=i("64f4");for(var s in o)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return o[e]}))}(s);i("1c2b");var a=i("828b"),c=Object(a["a"])(o["default"],n["b"],n["c"],!1,null,"0ad66f20",null,!1,n["a"],void 0);t["default"]=c.exports},4986:function(e,t,i){},"64f4":function(e,t,i){"use strict";i.r(t);var n=i("29ef"),o=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=o.a},"751f":function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return n}));var n={axBody:function(){return i.e("components/ax-body/ax-body").then(i.bind(null,"8839"))}},o=function(){var e=this,t=e.$createElement,i=(e._self._c,e.nowPriceTime.price?parseFloat(e.nowPriceTime.price).toFixed(4):null),n=e.getStatusNum(1),o=e.getStatusNum(2),s=e.getStatusNum(0),a=e.__map(e.terminals,(function(t,i){var n=e.__get_orig(t),o=e.getSatesObj(t),s=e.getSatesObj(t),a=e.getdeviceTypeName(t.eType);return{$orig:n,m3:o,m4:s,m5:a}})),c=e.nowPriceTime.price?e.nowPriceTime.price.toFixed(4):null;e.$mp.data=Object.assign({},{$root:{g0:i,m0:n,m1:o,m2:s,l0:a,g1:c}})},s=[]},c8d7:function(e,t,i){"use strict";(function(e,t){var n=i("47a9");i("2acb");n(i("3240"));var o=n(i("4968"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(o.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])}},[["c8d7","common/runtime","common/vendor"]]]);
|