| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/new-site/new-site"],{"01c2":function(t,e,n){"use strict";n.r(e);var i=n("6ce8"),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=o.a},"6ce8":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={onLoad:function(t){console.log(t),this.stationInfo=JSON.parse(t.item),this.getStationsInfo(),this.getConfigStationInfo()},mounted:function(){var e=this;this.$app.act.selectorQuery(this,"#footer").then((function(n){var i=t.getWindowInfo(),o=9*i.windowWidth/16;e.mainHeight=i.windowHeight-o-n.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:"",bannerIndex:1,stationDetail:{},siteSelectIndex:0,siteSortList:[{total:0,text:"空闲",status:1},{total:0,text:"占用",status:2},{total:0,text:"离线",status:0}],filteredConnectorList:[]}},methods:{swiperChange:function(t){this.bannerIndex=t.detail.current+1},getStationsInfo:function(){var t=this,e=this.$app.storage.get("USER_LOCATION");this.$api.base("get","/applet/v1/station/detail",{stationId:parseInt(this.stationInfo.stationId),longitude:e.split(",")[0]||0,latitude:e.split(",")[1]||0},{}).then((function(e){e.data.pictures=JSON.parse(e.data.pictures);var n={"空闲":e.data.idleCount,"占用":e.data.occupiedCount,"离线":e.data.offlineCount};t.siteSortList.forEach((function(t){t.total=n[t.text]||0})),t.stationDetail=e.data,t.siteSelectIndex=0,t.filteredConnectorList=t.stationDetail.connectorList.filter((function(t){return 1==t.status})).slice(0,3)}))},selectItem:function(t,e){this.siteSelectIndex=e,1===t.status?(this.filteredConnectorList=this.stationDetail.connectorList.filter((function(t){return 1==t.status})).slice(0,3),console.log("空闲过滤后的connectorList:",this.filteredConnectorList)):2===t.status?(this.filteredConnectorList=this.stationDetail.connectorList.filter((function(t){return 2==t.status})).slice(0,3),console.log("占用过滤后的connectorList:",this.filteredConnectorList)):0===t.status&&(this.filteredConnectorList=this.stationDetail.connectorList.filter((function(t){return 0==t.status})).slice(0,3),console.log("离线过滤后的connectorList:",this.filteredConnectorList))},getSatesObj:function(t){var e={};return 2==t.status?e={color:"blue"}:0==t.status?e={color:"grey"}:1==t.status&&(e={color:"green"}),e},formatStatusName:function(t){return t.replace(/\([^)]*\)/g,"")},getConfigStationInfo:function(){var t=this;this.$api.static(this.$config.url.configUrl+"stationConfi.json").then((function(e){console.log("获取的配置文件信息:",e.busineHours),t.entInfo=e.entInfo,t.service=e.service,t.busineHours=e}))},callPhone:function(t){this.$app.act.callPhone(t)},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(){t.openLocation({latitude:Number(this.stationInfo.lat),longitude:Number(this.stationInfo.lng)})},goTerminal:function(t){0!=t.status&&255!=t.status&&this.$app.url.goto("/pages/terminal/terminal?deviceId="+t.connectorCode+"&deviceStatus="+t.status)},toDeiceAll:function(){this.$app.url.goto("/pages/site-more/site-more?stationId="+this.stationDetail.stationId)},toPriceAll:function(){this.$app.url.goto("/pages/site-more/site-more?show=1&stationId="+this.stationDetail.stationId)},sacn:function(){var t=this;this.$app.act.scan().then((function(e){console.log(e);var n=t.getUrlParams(e.result);n&&n.connectorCode?t.getDeviceInfo(n.connectorCode):t.$app.popup.alert("二维码不正确。","温馨提示!")}))},getUrlParams:function(t){var e,n=/[?&]+([^=&]+)=([^&]*)/gi,i={};while(e=n.exec(t))i[e[1]]=e[2];return i},getDeviceInfo:function(t){var e=this;this.$api.base("get","/applet/v1/station/connector/detail",{connectorCode:t},{}).then((function(t){console.log("设备信息:",t),e.goTerminal(t.data)}))}}};e.default=n}).call(this,n("df3c")["default"])},"77c0":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={axBody:function(){return n.e("components/ax-body/ax-body").then(n.bind(null,"e199"))}},o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.stationDetail.pictures?t.stationDetail.pictures.length:null),i=t.__map(t.filteredConnectorList,(function(e,n){var i=t.__get_orig(e),o=t.getSatesObj(e),s=t.formatStatusName(e.statusName);return{$orig:i,m0:o,m1:s}})),o=t.filteredConnectorList.length;t.$mp.data=Object.assign({},{$root:{g0:n,l0:i,g1:o}})},s=[]},7893:function(t,e,n){},aa55:function(t,e,n){"use strict";var i=n("7893"),o=n.n(i);o.a},bf12:function(t,e,n){"use strict";n.r(e);var i=n("77c0"),o=n("01c2");for(var s in o)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(s);n("aa55");var a=n("828b"),r=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"1decae71",null,!1,i["a"],void 0);e["default"]=r.exports},e5a1:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("6a42");i(n("3240"));var o=i(n("bf12"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["e5a1","common/runtime","common/vendor"]]]);
|