2 lines
9.0 KiB
JavaScript
2 lines
9.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ae62b016"],{2379:function(t,e,i){t.exports=i.p+"9bd77f36df9057eef4019cec75e6d932.svg"},"2c3e":function(t,e,i){var n=i("da84"),o=i("83ab"),a=i("9f7f").MISSED_STICKY,s=i("c6b6"),c=i("9bf2").f,r=i("69f3").get,l=RegExp.prototype,u=n.TypeError;o&&a&&c(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===s(this))return!!r(this).sticky;throw u("Incompatible receiver, RegExp required")}}})},4032:function(t,e,i){t.exports=i.p+"b5dd9dba39162e1200d19c96bc356dd4.svg"},"4d63":function(t,e,i){var n=i("83ab"),o=i("da84"),a=i("e330"),s=i("94ca"),c=i("7156"),r=i("9112"),l=i("9bf2").f,u=i("241c").f,d=i("3a9b"),f=i("44e7"),p=i("577e"),g=i("ad6d"),v=i("9f7f"),h=i("6eeb"),m=i("d039"),b=i("1a2d"),M=i("69f3").enforce,y=i("2626"),C=i("b622"),w=i("fce3"),E=i("107c"),x=C("match"),_=o.RegExp,I=_.prototype,k=o.SyntaxError,R=a(g),$=a(I.exec),L=a("".charAt),S=a("".replace),N=a("".indexOf),T=a("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,A=/a/g,O=/a/g,P=new _(A)!==A,j=v.MISSED_STICKY,F=v.UNSUPPORTED_Y,z=n&&(!P||j||w||E||m((function(){return O[x]=!1,_(A)!=A||_(O)==O||"/a/i"!=_(A,"i")}))),H=function(t){for(var e,i=t.length,n=0,o="",a=!1;n<=i;n++)e=L(t,n),"\\"!==e?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),o+=e):o+="[\\s\\S]":o+=e+L(t,++n);return o},U=function(t){for(var e,i=t.length,n=0,o="",a=[],s={},c=!1,r=!1,l=0,u="";n<=i;n++){if(e=L(t,n),"\\"===e)e+=L(t,++n);else if("]"===e)c=!1;else if(!c)switch(!0){case"["===e:c=!0;break;case"("===e:$(D,T(t,n+1))&&(n+=2,r=!0),o+=e,l++;continue;case">"===e&&r:if(""===u||b(s,u))throw new k("Invalid capture group name");s[u]=!0,a[a.length]=[u,l],r=!1,u="";continue}r?u+=e:o+=e}return[o,a]};if(s("RegExp",z)){for(var Y=function(t,e){var i,n,o,a,s,l,u=d(I,this),g=f(t),v=void 0===e,h=[],m=t;if(!u&&g&&v&&t.constructor===Y)return t;if((g||d(I,t))&&(t=t.source,v&&(e="flags"in m?m.flags:R(m))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),m=t,w&&"dotAll"in A&&(n=!!e&&N(e,"s")>-1,n&&(e=S(e,/s/g,""))),i=e,j&&"sticky"in A&&(o=!!e&&N(e,"y")>-1,o&&F&&(e=S(e,/y/g,""))),E&&(a=U(t),t=a[0],h=a[1]),s=c(_(t,e),u?this:I,Y),(n||o||h.length)&&(l=M(s),n&&(l.dotAll=!0,l.raw=Y(H(t),i)),o&&(l.sticky=!0),h.length&&(l.groups=h)),t!==m)try{r(s,"source",""===m?"(?:)":m)}catch(b){}return s},q=function(t){t in Y||l(Y,t,{configurable:!0,get:function(){return _[t]},set:function(e){_[t]=e}})},K=u(_),J=0;K.length>J;)q(K[J++]);I.constructor=Y,Y.prototype=I,h(o,"RegExp",Y)}y("RegExp")},"50c9":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",{staticClass:"map-container"},[i("div",{ref:"myMap",attrs:{id:"myMap"}}),t.show?i("div",{staticClass:"location"},[t._v(" "+t._s(t.$t("table.longitude"))+":"+t._s(t.item.longitude)+", "+t._s(t.$t("table.latitude"))+":"+t._s(t.item.latitude)+" ")]):t._e(),i("div",{staticClass:"tips"},[i("div",{staticClass:"bottom"}),i("div",{staticClass:"item"},[i("span",{staticClass:"pot",style:"background: #00ff00;"}),i("span",[t._v(t._s(t.$t("device.onLine")))])]),i("div",{staticClass:"item"},[i("i",{staticClass:"iconfont icon-danguiti"}),i("span",[t._v(t._s(t.$t("device.cabinetType1")))])]),i("div",{staticClass:"item"},[i("span",{staticClass:"pot",style:"background: #F3CF02;"}),i("span",[t._v(t._s(t.$t("device.outLine")))])]),i("div",{staticClass:"item"},[i("i",{staticClass:"iconfont icon-duoguiti"}),i("span",[t._v(t._s(t.$t("device.cabinetType2")))])]),i("div",{staticClass:"item"},[i("span",{staticClass:"pot",style:"background: #D2351F;"}),i("span",[t._v(t._s(t.$t("home.alarm")))])])]),i("div",{staticClass:"search"},[i("el-autocomplete",{attrs:{"fetch-suggestions":t.querySearch,"prefix-icon":"el-icon-search",placeholder:t.$t("pEnter")+t.$t("device.deviceCode"),clearable:""},on:{select:t.handleFilter},model:{value:t.searchItem,callback:function(e){t.searchItem=e},expression:"searchItem"}})],1),t.$store.state.gis.gisDialog?i("EnergyCabinet",{attrs:{deviceData:t.seletedItem}}):t._e()],1)},o=[],a=(i("d81d"),i("4de4"),i("d3b7"),i("159b"),i("99af"),i("ac1f"),i("5319"),i("4d63"),i("c607"),i("2c3e"),i("25f0"),i("00b4"),i("eb2f")),s=i("aa98"),c={name:"BingMap",components:{EnergyCabinet:a["a"]},data:function(){return{list:[],mapList:[],seletedItem:{},item:{},map:null,show:!1,searchItem:""}},activated:function(){this.getCabinetList()},mounted:function(){var t=this;Object(s["l"])().then((function(e){console.log(e);var i=[];t.list=e.data.list.map((function(t){var e=i.filter((function(e){return e===t.siteCode}));return i.push(t.siteCode),t.numIndex=e.length,console.log(e,"1-----"),t})),t.initMap().then((function(){console.log("加载成功...",Microsoft),t.loadingMap()}))}))},updated:function(){},methods:{getCabinetList:function(){var t=this,e=this;console.log(this.map,"this.map"),this.map||this.loadMap(),Object(s["l"])().then((function(n){console.log(n);var o=[];t.list=n.data.list.map((function(t){var e=o.filter((function(e){return e===t.siteCode}));return o.push(t.siteCode),t.numIndex=e.length,console.log(e,"1-----"),t})),t.map.entities.clear(),t.list.forEach((function(n){var o=new Microsoft.Maps.Pushpin({latitude:n.latitude||0,longitude:n.longitude||0},{icon:i("9956")("./".concat(1==n.online?"normal":"fault").concat(1==n.cabinetType?"":"s",".svg")),anchor:new Microsoft.Maps.Point(40+25*n.numIndex,40),title:n.deviceName});t.map.entities.push(o),Microsoft.Maps.Events.addHandler(o,"click",(function(){e.goLink(n),console.log(n,"Microsoft !== undefined")}))}))}))},goLink:function(t){this.seletedItem=t,this.map.setView({center:new Microsoft.Maps.Location(t.latitude,t.longitude),zoom:15}),this.$store.state.gis.deviceName=t.deviceName,this.$store.state.gis.gisDialog=!0},initMap:function(){var t=this.$i18n.locale;t="zh"==t?"zh-CN":t,console.log(t,"lang");var e="As2AhniKpC-v86mSiiJVKNwebR8WcyYw9ICr4RDcnHhpCo5HwcSUPbyYjdoDn77R",i="http://www.bing.com/api/maps/mapcontrol?setLang="+t+"&key="+e;return console.log(i),new Promise((function(t,e){if("undefined"!==typeof Microsoft)return console.log(o,"Microsoft !== undefined"),t(),!0;var n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",i),document.body.appendChild(n);var o=0,a=setInterval((function(){console.log(o,"加载..."),o>=40&&(e(),clearInterval(a)),"undefined"!==typeof Microsoft&&(t(),clearInterval(a)),o+=1}),100)}))},loadMap:function(){var t=this;this.map=new Microsoft.Maps.Map(document.getElementById("myMap"),{zoom:5,showCopyright:!1}),Microsoft.Maps.Events.addHandler(this.map,"rightclick",(function(t){console.log(t.location,t,t.longitude,"Microsoft !== undefined"),e.item=t&&t.location,e.show=!0,setTimeout((function(){e.show=!1}),6e4)}));var e=this,n=this.map.getCenter();console.log(this.map,n),this.list.forEach((function(n){var o=new Microsoft.Maps.Pushpin({latitude:n.latitude||0,longitude:n.longitude||0},{icon:i("9956")("./".concat(1==n.online?"normal":"fault").concat(1==n.cabinetType?"":"s",".svg")),anchor:new Microsoft.Maps.Point(40+25*n.numIndex,40),title:n.deviceName});t.map.entities.push(o),t.mapList.push(o),Microsoft.Maps.Events.addHandler(o,"click",(function(){e.goLink(n),console.log(n,"Microsoft !== undefined")}))}))},loadingMap:function(){var t=this;setTimeout((function(){console.log("检查是否加载成功...",t.map),t.map||t.loadingMap()}),200),this.loadMap()},querySearch:function(t,e){var i;t||(i=this.list.map((function(t){return{label:t.deviceCode,latitude:t.latitude,longitude:t.longitude,value:t.deviceName}})),e(i)),t=t.replace(/[-]/g,"[-]"),t=t.replace(/[(|(]/g,"[(]"),t=t.replace(/[)|)]/g,"[)]");var n=new RegExp(t);i=this.list.filter((function(t){return n.test(t.deviceCode)||n.test(t.deviceName)})),i=i.map((function(t){return{label:t.deviceCode,latitude:t.latitude,longitude:t.longitude,value:t.deviceName}})),console.log(i,this.list),e(i)},handleFilter:function(t){this.map.setView({center:new Microsoft.Maps.Location(t.latitude,t.longitude),zoom:15})}}},r=c,l=(i("8f32"),i("b065"),i("2877")),u=Object(l["a"])(r,n,o,!1,null,"569051f9",null);e["default"]=u.exports},5273:function(t,e,i){t.exports=i.p+"5a41dc7276f8fc56a3ab2dcbe2d83b79.svg"},"5f3a":function(t,e,i){t.exports=i.p+"48070211cbc83cefb19af43a33b5682e.svg"},"6e9f":function(t,e,i){t.exports=i.p+"46ab537aba1d9109bd64cf9641e26f43.svg"},"8f32":function(t,e,i){"use strict";i("c3e8")},9956:function(t,e,i){var n={"./alarm.svg":"df19","./alarms.svg":"6e9f","./fault.svg":"5273","./faults.svg":"4032","./normal.svg":"2379","./normals.svg":"5f3a"};function o(t){var e=a(t);return i(e)}function a(t){if(!i.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}o.keys=function(){return Object.keys(n)},o.resolve=a,t.exports=o,o.id="9956"},af98:function(t,e,i){},b065:function(t,e,i){"use strict";i("af98")},c3e8:function(t,e,i){},c607:function(t,e,i){var n=i("da84"),o=i("83ab"),a=i("fce3"),s=i("c6b6"),c=i("9bf2").f,r=i("69f3").get,l=RegExp.prototype,u=n.TypeError;o&&a&&c(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===s(this))return!!r(this).dotAll;throw u("Incompatible receiver, RegExp required")}}})},df19:function(t,e,i){t.exports=i.p+"8c88bf8df025c391b7894b387a32167c.svg"}}]);
|
||
//# sourceMappingURL=chunk-ae62b016.b1f33875.js.map
|