webpackJsonp([0],{"+BTi":function(e,t){},"2kvA":function(e,t,n){"use strict";t.__esModule=!0,t.getStyle=t.once=t.off=t.on=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.hasClass=m,t.addClass=function(e,t){if(!e)return;for(var n=e.className,i=(t||"").split(" "),o=0,a=i.length;o<a;o++){var r=i[o];r&&(e.classList?e.classList.add(r):m(e,r)||(n+=" "+r))}e.classList||(e.className=n)},t.removeClass=function(e,t){if(!e||!t)return;for(var n=t.split(" "),i=" "+e.className+" ",o=0,a=n.length;o<a;o++){var r=n[o];r&&(e.classList?e.classList.remove(r):m(e,r)&&(i=i.replace(" "+r+" "," ")))}e.classList||(e.className=d(i))},t.setStyle=function e(t,n,o){if(!t||!n)return;if("object"===(void 0===n?"undefined":i(n)))for(var a in n)n.hasOwnProperty(a)&&e(t,a,n[a]);else"opacity"===(n=u(n))&&c<9?t.style.filter=isNaN(o)?"":"alpha(opacity="+100*o+")":t.style[n]=o};var o,a=n("7+uW");var r=((o=a)&&o.__esModule?o:{default:o}).default.prototype.$isServer,s=/([\:\-\_]+(.))/g,l=/^moz([A-Z])/,c=r?0:Number(document.documentMode),d=function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},u=function(e){return e.replace(s,function(e,t,n,i){return i?n.toUpperCase():n}).replace(l,"Moz$1")},p=t.on=!r&&document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent("on"+t,n)},f=t.off=!r&&document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent("on"+t,n)};t.once=function(e,t,n){p(e,t,function i(){n&&n.apply(this,arguments),f(e,t,i)})};function m(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}t.getStyle=c<9?function(e,t){if(!r){if(!e||!t)return null;"float"===(t=u(t))&&(t="styleFloat");try{switch(t){case"opacity":try{return e.filters.item("alpha").opacity/100}catch(e){return 1}default:return e.style[t]||e.currentStyle?e.currentStyle[t]:null}}catch(n){return e.style[t]}}}:function(e,t){if(!r){if(!e||!t)return null;"float"===(t=u(t))&&(t="cssFloat");try{var n=document.defaultView.getComputedStyle(e,"");return e.style[t]||n?n[t]:null}catch(n){return e.style[t]}}}},"6Twh":function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){if(a.default.prototype.$isServer)return 0;if(void 0!==r)return r;var e=document.createElement("div");e.className="el-scrollbar__wrap",e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",e.appendChild(n);var i=n.offsetWidth;return e.parentNode.removeChild(e),r=t-i};var i,o=n("7+uW"),a=(i=o)&&i.__esModule?i:{default:i};var r=void 0},"7J9s":function(e,t,n){"use strict";t.__esModule=!0,t.PopupManager=void 0;var i=l(n("7+uW")),o=l(n("jmaC")),a=l(n("OAzY")),r=l(n("6Twh")),s=n("2kvA");function l(e){return e&&e.__esModule?e:{default:e}}var c=1,d=void 0;t.default={props:{visible:{type:Boolean,default:!1},openDelay:{},closeDelay:{},zIndex:{},modal:{type:Boolean,default:!1},modalFade:{type:Boolean,default:!0},modalClass:{},modalAppendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1}},beforeMount:function(){this._popupId="popup-"+c++,a.default.register(this._popupId,this)},beforeDestroy:function(){a.default.deregister(this._popupId),a.default.closeModal(this._popupId),this.restoreBodyStyle()},data:function(){return{opened:!1,bodyPaddingRight:null,computedBodyPaddingRight:0,withoutHiddenClass:!0,rendered:!1}},watch:{visible:function(e){var t=this;if(e){if(this._opening)return;this.rendered?this.open():(this.rendered=!0,i.default.nextTick(function(){t.open()}))}else this.close()}},methods:{open:function(e){var t=this;this.rendered||(this.rendered=!0);var n=(0,o.default)({},this.$props||this,e);this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),clearTimeout(this._openTimer);var i=Number(n.openDelay);i>0?this._openTimer=setTimeout(function(){t._openTimer=null,t.doOpen(n)},i):this.doOpen(n)},doOpen:function(e){if(!this.$isServer&&(!this.willOpen||this.willOpen())&&!this.opened){this._opening=!0;var t=function e(t){return 3===t.nodeType&&e(t=t.nextElementSibling||t.nextSibling),t}(this.$el),n=e.modal,i=e.zIndex;if(i&&(a.default.zIndex=i),n&&(this._closing&&(a.default.closeModal(this._popupId),this._closing=!1),a.default.openModal(this._popupId,a.default.nextZIndex(),this.modalAppendToBody?void 0:t,e.modalClass,e.modalFade),e.lockScroll)){this.withoutHiddenClass=!(0,s.hasClass)(document.body,"el-popup-parent--hidden"),this.withoutHiddenClass&&(this.bodyPaddingRight=document.body.style.paddingRight,this.computedBodyPaddingRight=parseInt((0,s.getStyle)(document.body,"paddingRight"),10)),d=(0,r.default)();var o=document.documentElement.clientHeight<document.body.scrollHeight,l=(0,s.getStyle)(document.body,"overflowY");d>0&&(o||"scroll"===l)&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.computedBodyPaddingRight+d+"px"),(0,s.addClass)(document.body,"el-popup-parent--hidden")}"static"===getComputedStyle(t).position&&(t.style.position="absolute"),t.style.zIndex=a.default.nextZIndex(),this.opened=!0,this.onOpen&&this.onOpen(),this.doAfterOpen()}},doAfterOpen:function(){this._opening=!1},close:function(){var e=this;if(!this.willClose||this.willClose()){null!==this._openTimer&&(clearTimeout(this._openTimer),this._openTimer=null),clearTimeout(this._closeTimer);var t=Number(this.closeDelay);t>0?this._closeTimer=setTimeout(function(){e._closeTimer=null,e.doClose()},t):this.doClose()}},doClose:function(){this._closing=!0,this.onClose&&this.onClose(),this.lockScroll&&setTimeout(this.restoreBodyStyle,200),this.opened=!1,this.doAfterClose()},doAfterClose:function(){a.default.closeModal(this._popupId),this._closing=!1},restoreBodyStyle:function(){this.modal&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.bodyPaddingRight,(0,s.removeClass)(document.body,"el-popup-parent--hidden")),this.withoutHiddenClass=!0}}},t.PopupManager=a.default},GXEp:function(e,t){},JYWD:function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"h",function(){return a}),n.d(t,"n",function(){return r}),n.d(t,"j",function(){return s}),n.d(t,"g",function(){return l}),n.d(t,"i",function(){return c}),n.d(t,"f",function(){return d}),n.d(t,"a",function(){return u}),n.d(t,"e",function(){return p}),n.d(t,"k",function(){return f}),n.d(t,"m",function(){return m}),n.d(t,"c",function(){return v}),n.d(t,"q",function(){return h}),n.d(t,"l",function(){return g}),n.d(t,"o",function(){return y}),n.d(t,"d",function(){return w}),n.d(t,"p",function(){return b});var i=n("59if"),o=function(e){return Object(i.c)("data/api-d/device/deleteDevice",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},a=function(e){return Object(i.c)("data/api-d/device/getDeviceById",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},r=function(e){return Object(i.c)("data/api-d/device/saveDevice",{body:e})},s=function(e){return Object(i.b)("data/api-d/device/findPlatDeviceList",{body:e})},l=function(e){return Object(i.b)("data/api-d/device/getDeviceBrand",{body:e})},c=function(e){return Object(i.c)("data/api-d/device/getDeviceType",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},d=function(e){return Object(i.b)("data/api-d/cluster/findClusterList",{body:e})},u=function(e){return Object(i.b)("data/api-d/cluster/delete",{body:e})},p=function(e){return Object(i.c)("data/api-d/cluster/getClusterDeviceTree",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},f=function(e){return Object(i.c)("data/api-d/cluster/findClusterInfoByNodeIp",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},m=function(e){return Object(i.c)("data/api-d/cluster/save",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},v=function(e){return Object(i.b)("data//api-d/device/findAllDevices",{body:e})},h=function(e){return Object(i.b)("data/api-d/device/updatePosById",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},g=function(e){return Object(i.b)("data/api-d/device/getStatus",{body:e,header:{"Content-Type":"application/x-www-form-urlencoded"}})},y=function(e){return Object(i.b)("data/api-d/device/updatePublicIpPort",{body:e})},w=function(e){return Object(i.b)("data/api-d/org/findOrg",{body:e})},b=function(e){return Object(i.b)("data/api-d/device/updateOrg",{body:e})}},OAzY:function(e,t,n){"use strict";t.__esModule=!0;var i,o=n("7+uW"),a=(i=o)&&i.__esModule?i:{default:i},r=n("2kvA");var s=!1,l=!1,c=2e3,d=function(){if(!a.default.prototype.$isServer){var e=p.modalDom;return e?s=!0:(s=!1,e=document.createElement("div"),p.modalDom=e,e.addEventListener("touchmove",function(e){e.preventDefault(),e.stopPropagation()}),e.addEventListener("click",function(){p.doOnModalClick&&p.doOnModalClick()})),e}},u={},p={modalFade:!0,getInstance:function(e){return u[e]},register:function(e,t){e&&t&&(u[e]=t)},deregister:function(e){e&&(u[e]=null,delete u[e])},nextZIndex:function(){return p.zIndex++},modalStack:[],doOnModalClick:function(){var e=p.modalStack[p.modalStack.length-1];if(e){var t=p.getInstance(e.id);t&&t.closeOnClickModal&&t.close()}},openModal:function(e,t,n,i,o){if(!a.default.prototype.$isServer&&e&&void 0!==t){this.modalFade=o;for(var l=this.modalStack,c=0,u=l.length;c<u;c++){if(l[c].id===e)return}var p=d();if((0,r.addClass)(p,"v-modal"),this.modalFade&&!s&&(0,r.addClass)(p,"v-modal-enter"),i)i.trim().split(/\s+/).forEach(function(e){return(0,r.addClass)(p,e)});setTimeout(function(){(0,r.removeClass)(p,"v-modal-enter")},200),n&&n.parentNode&&11!==n.parentNode.nodeType?n.parentNode.appendChild(p):document.body.appendChild(p),t&&(p.style.zIndex=t),p.tabIndex=0,p.style.display="",this.modalStack.push({id:e,zIndex:t,modalClass:i})}},closeModal:function(e){var t=this.modalStack,n=d();if(t.length>0){var i=t[t.length-1];if(i.id===e){if(i.modalClass)i.modalClass.trim().split(/\s+/).forEach(function(e){return(0,r.removeClass)(n,e)});t.pop(),t.length>0&&(n.style.zIndex=t[t.length-1].zIndex)}else for(var o=t.length-1;o>=0;o--)if(t[o].id===e){t.splice(o,1);break}}0===t.length&&(this.modalFade&&(0,r.addClass)(n,"v-modal-leave"),setTimeout(function(){0===t.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",p.modalDom=void 0),(0,r.removeClass)(n,"v-modal-leave")},200))}};Object.defineProperty(p,"zIndex",{configurable:!0,get:function(){return l||(c=(a.default.prototype.$ELEMENT||{}).zIndex||c,l=!0),c},set:function(e){c=e}});a.default.prototype.$isServer||window.addEventListener("keydown",function(e){if(27===e.keyCode){var t=function(){if(!a.default.prototype.$isServer&&p.modalStack.length>0){var e=p.modalStack[p.modalStack.length-1];if(!e)return;return p.getInstance(e.id)}}();t&&t.closeOnPressEscape&&(t.handleClose?t.handleClose():t.handleAction?t.handleAction("cancel"):t.close())}}),t.default=p},aW5l:function(e,t,n){"use strict";t.__esModule=!0,t.default={mounted:function(){},methods:{getMigratingConfig:function(){return{props:{},events:{}}}}}},fPll:function(e,t,n){"use strict";t.__esModule=!0,t.default={methods:{dispatch:function(e,t,n){for(var i=this.$parent||this.$root,o=i.$options.componentName;i&&(!o||o!==e);)(i=i.$parent)&&(o=i.$options.componentName);i&&i.$emit.apply(i,[t].concat(n))},broadcast:function(e,t,n){(function e(t,n,i){this.$children.forEach(function(o){o.$options.componentName===t?o.$emit.apply(o,[n].concat(i)):e.apply(o,[t,n].concat([i]))})}).call(this,e,t,n)}}}},jmaC:function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){for(var t=1,n=arguments.length;t<n;t++){var i=arguments[t]||{};for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];void 0!==a&&(e[o]=a)}}return e}},mtrD:function(e,t){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=151)}({0:function(e,t){e.exports=function(e,t,n,i,o,a){var r,s=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(r=e,s=e.default);var c,d="function"==typeof s?s.options:s;if(t&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0),n&&(d.functional=!0),o&&(d._scopeId=o),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=c):i&&(c=i),c){var u=d.functional,p=u?d.render:d.beforeCreate;u?(d._injectStyles=c,d.render=function(e,t){return c.call(t),p(e,t)}):d.beforeCreate=p?[].concat(p,c):[c]}return{esModule:r,exports:s,options:d}}},151:function(e,t,n){"use strict";t.__esModule=!0;var i,o=n(152),a=(i=o)&&i.__esModule?i:{default:i};a.default.install=function(e){e.component(a.default.name,a.default)},t.default=a.default},152:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(153),o=n.n(i),a=n(154),r=n(0)(o.a,a.a,!1,null,null,null);t.default=r.exports},153:function(e,t,n){"use strict";t.__esModule=!0,t.default={name:"ElButton",inject:{elForm:{default:""},elFormItem:{default:""}},props:{type:{type:String,default:"default"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},buttonSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},buttonDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},methods:{handleClick:function(e){this.$emit("click",e)}}}},154:function(e,t,n){"use strict";var i={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"el-button",class:[e.type?"el-button--"+e.type:"",e.buttonSize?"el-button--"+e.buttonSize:"",{"is-disabled":e.buttonDisabled,"is-loading":e.loading,"is-plain":e.plain,"is-round":e.round,"is-circle":e.circle}],attrs:{disabled:e.buttonDisabled||e.loading,autofocus:e.autofocus,type:e.nativeType},on:{click:e.handleClick}},[e.loading?n("i",{staticClass:"el-icon-loading"}):e._e(),e.icon&&!e.loading?n("i",{class:e.icon}):e._e(),e.$slots.default?n("span",[e._t("default")],2):e._e()])},staticRenderFns:[]};t.a=i}})},oGil:function(e,t){},pw6x:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("nznj"),o=n("JYWD"),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function i(o,a){try{var r=t[o](a),s=r.value}catch(e){return void n(e)}if(!r.done)return Promise.resolve(s).then(function(e){i("next",e)},function(e){i("throw",e)});e(s)}("next")})}}var s={components:{},props:{newId:{default:"amap",type:String},zoomSize:{default:12,type:Number}},computed:{newMapId:function(){return this.newId&&""!==this.newId?this.newId:"amap"},newDefaultMapZoom:function(){return this.zoomSize&&""!==this.zoomSize?this.zoomSize:14}},data:function(){return{mapObject:{},deviceMarkers:[],textInfoWindow:{},textInfoWindow2:{},indexPlayer:1,point:{},deviceBrandList:[]}},methods:{InitMap:function(){console.log(this.newMapId,"初始化地图!!!!");var e=new AMap.Map(this.newMapId,{center:[116.397428,39.90923],resizeEnable:!0,zoom:this.newDefaultMapZoom});AMap.plugin(["AMap.ToolBar"],function(){e.addControl(new AMap.ToolBar({liteStyle:!0}))}),this.getDeviceBrand(),this.mapObject=e,this.textInfoWindow=new AMap.InfoWindow({isCustomL:!0,autoMove:!0,closeWhenClickMap:!0,size:new AMap.Size(430,410),offset:new AMap.Pixel(-5,-18)}),this.textInfoWindow2=new AMap.InfoWindow({isCustomL:!0,autoMove:!1,closeWhenClickMap:!0,size:new AMap.Size(430,410),offset:new AMap.Pixel(0,-20)})},amapPto:function(e,t){e&&t&&this.mapObject.panTo(new AMap.LngLat(e,t))},amapCreateMarker:function(e){var t=this,n=(this.mapObject,e||[]);if(!(n&&n.length>0&&n[0]))return!1;var s=n.length-1;this.amapPto(n[s].longitude,n[s].latitude);console.log(n,"mapData");for(var l=0;l<n.length;l++)if(n[l].longitude&&n[l].latitude&&"None"!==n[l].longitude&&"None"!==n[l].latitude){var c=function(){var e=t.getvideoUrl(n[l]);t.$set(n[l],"url",e);var a=new AMap.LngLat(n[l].longitude,n[l].latitude),s=new AMap.Icon({size:new AMap.Size(48,48),image:"/static/img/icon/green_camer.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(36,36)}),c=new AMap.Icon({size:new AMap.Size(94,106),image:"/static/img/icon/green_camer_active.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(94,106)}),d=new AMap.Icon({size:new AMap.Size(48,48),image:"/static/img/icon/red_camer.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(36,36)}),u=new AMap.Icon({size:new AMap.Size(48,48),image:"/static/img/icon/gray_camer.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(36,36)}),p=new AMap.Icon({size:new AMap.Size(94,106),image:"/static/img/icon/gray_camer_active.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(94,106)}),f=new AMap.Icon({size:new AMap.Size(94,106),image:"/static/img/icon/red_camer_active.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(94,106)}),m=new AMap.Icon({size:new AMap.Size(48,48),image:"/static/img/icon/green_server.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(36,36)}),v=new AMap.Icon({size:new AMap.Size(94,106),image:"/static/img/icon/green_server_active.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(94,106)}),h=new AMap.Icon({size:new AMap.Size(48,48),image:"/static/img/icon/red_server.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(36,36)}),g=new AMap.Icon({size:new AMap.Size(94,106),image:"/static/img/icon/red_server_active.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(94,106)}),y=new AMap.Icon({size:new AMap.Size(48,48),image:"/static/img/icon/gray_server.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(36,36)}),w=new AMap.Icon({size:new AMap.Size(94,106),image:"/static/img/icon/gray_server_active.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(94,106)}),b=(new AMap.Icon({size:new AMap.Size(48,48),image:"/static/img/map/camera_device_alarm.png",imageOffset:new AMap.Pixel(0,0),imageSize:new AMap.Size(48,48)}),void 0);if(0===n[l].status?"101"===n[l].type?((b=new AMap.Marker({position:a,icon:s,offset:new AMap.Pixel(-25,-40)})).Icon_original=s,b.Icon_active=c):"103"===n[l].type&&((b=new AMap.Marker({position:a,icon:m,offset:new AMap.Pixel(-25,-40)})).Icon_original=m,b.Icon_active=v):1===n[l].status?"101"===n[l].type?((b=new AMap.Marker({position:a,icon:d,offset:new AMap.Pixel(-25,-40)})).Icon_original=d,b.Icon_active=f):"103"===n[l].type&&((b=new AMap.Marker({position:a,icon:h,offset:new AMap.Pixel(-25,-40)})).Icon_original=h,b.Icon_active=g):-1===n[l].status&&("101"===n[l].type?((b=new AMap.Marker({position:a,icon:u,offset:new AMap.Pixel(-25,-40)})).Icon_original=u,b.Icon_active=p):"103"===n[l].type&&((b=new AMap.Marker({position:a,icon:y,offset:new AMap.Pixel(-25,-40)})).Icon_original=y,b.Icon_active=w)),void 0===b)return{v:!1};t.mapObject.add(b),b.index=l,b.data=n[l],b.id=n[l].id,b.visibility="hidden",-1===Object(i.c)(n[l].id,t.deviceMarkers,"id")&&t.deviceMarkers.push(b);var M,_,x,I,S=t,A=(M=r(regeneratorRuntime.mark(function e(){var n,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.i)();case 2:n=e.sent,i=void 0,n&&n.success&&0!==n.data.length&&n.data.forEach(function(e){e.value===b.data.type&&(i=e.name)}),a='<div class="pb10">\n <div style="height:70%;width:100%">\n <div id="dynamicallyPlayers" style="width:410px;height:287px;" class="flex-center">\n <div id="img" style="background-image: url(\'/static/img/map/1111.jpg\');width:100%;height:100%" class="img-icon"></div>\n </div>\n </div>\n <div style="height:30%;" class="">\n <div class="flex-row-between">\n <div class="flex-row-left">\n <span>设备类型:'+i+'</span>\n </div>\n <div id="toDetails" class="flex-row-right">\n <a href="javascript:console.log(\'\')">详情</a>\n </div>\n </div>\n \n <div class="flex-row-between">\n <div class="flex-row-left">\n <span>设备位置:'+b.data.address+'</span>\n </div>\n <div class="flex-row-right">\n <i class="d-block fas fa-edit" id="toEdit" click=""></i>\n </div>\n </div>\n \n </div>\n <div style="width:100%;visibility:'+b.visibility+';" class="flex-center">\n <button id="saveLnglat" type="button" class="btn btn-secondary btn-sm">保存坐标</button>\n </div> \n </div>',t.textInfoWindow.setContent(a),t.textInfoWindow.open(t.mapObject,b.getPosition()),console.log(document.getElementById("vxg_media_player1"),"this.textInfoWindow.getContent()"),setTimeout(function(){null!==document.querySelector("#"+t.newMapId+" #toDetails")&&(document.querySelector("#"+t.newMapId+" #toDetails").onclick=function(){S.$emit("toDetails",b)},document.querySelector("#"+t.newMapId+" #toEdit").onclick=function(){S.setDrag(b)},document.querySelector("#"+t.newMapId+" #saveLnglat").onclick=function(){S.saveLnglat(b)},document.querySelector("#"+t.newMapId+" #img").onclick=function(){console.log("能否走到这一步");var e=document.getElementById("dynamicallyPlayers"),n=document.getElementById("img");e.removeChild(n),t.indexPlayer++;var i="vxg_media_player1"+t.indexPlayer,o=document.createElement("div");o.setAttribute("id",i),o.setAttribute("class","vxgplayer"),document.getElementById("dynamicallyPlayers").appendChild(o),console.log(b.data.url,"vxgplayer"),vxgplayer(i,{url:b.data.url,nmf_path:"media_player.nmf",nmf_src:"/static/vxgplayer-1.8.31/pnacl/Release/media_player.nmf",latency:3e5,width:"380",height:"260",aspect_ratio_mode:1,autohide:3,controls:!0,connection_timeout:5e3,connection_udp:0,custom_digital_zoom:!1}).ready(function(){console.log(" =>ready player "+i),console.log(" <=ready player "+i)})})},100);case 10:case"end":return e.stop()}},e,t)})),function(){return M.apply(this,arguments)}),O=(_=r(regeneratorRuntime.mark(function e(){var n,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(t.textInfoWindow2.getIsOpen(),"getIsOpen"),t.textInfoWindow2.getIsOpen()||t.textInfoWindow.getIsOpen()){e.next=11;break}return e.next=4,Object(o.i)();case 4:n=e.sent,i=void 0,n&&n.success&&0!==n.data.length&&n.data.forEach(function(e){e.value===b.data.type&&(i=e.name)}),a='<div class="pb10">\n <div style="height:70%;width:100%">\n <div id="dynamicallyPlayers2" style="width:380px;height:260px;padding:10px" class="flex-center">\n <div style="background-image: url(\'/static/img/map/1111.jpg\');width:100%;height:100%" class="img-icon"></div>\n </div>\n </div>\n <div style="height:30%;" class="">\n <div class="flex-row-between">\n <div class="flex-row-left">\n <span>设备类型:'+i+'</span>\n </div>\n <div id="toDetails" class="flex-row-right">\n <a href="javascript:console.log(\'\')">详情</a>\n </div>\n </div>\n \n <div class="flex-row-between">\n <div class="flex-row-left">\n <span>设备位置:'+b.data.address+'</span>\n </div>\n <div class="flex-row-right">\n <i class="d-block fas fa-edit" id="toEdit" click=""></i>\n </div>\n </div>\n \n </div>\n <div style="width:100%" class="flex-center">\n <button id="saveLnglat" type="button" class="btn btn-secondary btn-sm">保存坐标</button>\n </div> \n </div>',t.textInfoWindow2.setContent(a),t.textInfoWindow2.open(t.mapObject,b.getPosition()),setTimeout(function(){null!==document.querySelector("#"+t.newMapId+" #toDetails2")&&(document.querySelector("#"+t.newMapId+" #toDetails2").onclick=function(){S.$emit("toDetails",b)},document.querySelector("#"+t.newMapId+" #dynamicallyPlayers2").onclick=function(){t.opentextInfoWindow()})},100);case 11:case"end":return e.stop()}},e,t)})),x=r(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log("关闭InfoWin"),t.textInfoWindow.close();case 2:case"end":return e.stop()}},e,t)})),function(){return x.apply(this,arguments)}),z=(I=r(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log(n,"跳转详情页面"),t.$emit("toDetails",n.target);case 2:case"end":return e.stop()}},e,t)})),function(e){return I.apply(this,arguments)});b.on("mouseover",A),b.on("mouseout",O),b.on("click",z,b),b.on("dragging",A)}();if("object"===(void 0===c?"undefined":a(c)))return c.v}},setActiveDeviceMarkers:function(e){var t=this,n=e||[],i=this.deviceMarkers||[];if(0===n.length)return!1;var o=[];n.forEach(function(e,n){var a=!0,r=!1,s=void 0;try{for(var l,c=i[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var d=l.value;d.id==e.id?(o.push(d),0===n&&t.amapPto(d.data.longitude,d.data.latitude)):"online"===d.data.status?(d.setIcon(d.Icon_online),d.setAnimation("AMAP_ANIMATION_NONE")):"unOnline"===d.data.status&&(d.setIcon(d.Icon_unOnline),d.setAnimation("AMAP_ANIMATION_NONE"))}}catch(e){r=!0,s=e}finally{try{!a&&c.return&&c.return()}finally{if(r)throw s}}});var a=!0,r=!1,s=void 0;try{for(var l,c=o[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var d=l.value;d.setIcon(d.Icon_active),d.setOffset(new AMap.Pixel(-47,-80))}}catch(e){r=!0,s=e}finally{try{!a&&c.return&&c.return()}finally{if(r)throw s}}},removeActiveDeviceMarkers:function(){var e=this.deviceMarkers||[],t=!0,n=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var r=o.value;r.setIcon(r.Icon_original),r.setOffset(new AMap.Pixel(-25,-40)),r.setAnimation("AMAP_ANIMATION_NONE")}}catch(e){n=!0,i=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw i}}},listenInfoWin:function(){},listenMouseUp:function(e){console.log(e,"鼠标在这里松开")},listenMouseOve:function(e){this.point={};var t=e.lnglat;0!==Object.keys(t).length&&(this.point=t),console.log(this.point,"this.point")},listenMouseDown:function(e){console.log(e,"鼠标在这里按下鼠标")},receveLnglat:function(e){var t=this;console.log(e,"================"),AMap.event.addListenerOnce(this.mapObject,"mousemove",this.listenMouseOve),setTimeout(function(){if(0!==Object.keys(t.point).length){e.longitude=t.point.lng,e.latitude=t.point.lat;var n=[];n.push(e),t.amapCreateMarker(n),t.$nextTick(function(){t.deviceMarkers.forEach(function(n){n.data.id===e.id&&t.saveLnglat(n)})}),console.log(e," 将要打印的点")}},100)},removeToMarker:function(e){console.log(e,"鼠标移动的回调函数")},setDrag:function(e){e.setDraggable(!0),this.$toast({type:"success",message:"您现在可以对该设备进行移动了,别忘了保存坐标!"}),this.$set(e,"visibility","visible")},saveLnglat:function(e){e.setDraggable(!1),this.$set(e,"visibility","hidden"),this.$emit("updatePos",e)},getDeviceType:function(){var e=this;return r(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.i)();case 2:if(!(n=e.sent)||!n.success){e.next=5;break}return e.abrupt("return",n.data);case 5:case"end":return e.stop()}},t,e)}))()},closeInfoWin:function(){console.log("关闭InfoWin2"),this.textInfoWindow2.close()},getDeviceBrand:function(){var e=this;return r(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.g)();case 2:n=t.sent,e.deviceBrandList=n.success&&200===n.code&&n.data?n.data:[];case 4:case"end":return t.stop()}},t,e)}))()},getvideoUrl:function(e){if(!this.deviceBrandList.length)return"";var t=this.deviceBrandList.filter(function(t){return t.value===e.brand});if(1===t.length){var n=t[0]&&t[0].urlTemplate?t[0].urlTemplate:"";return["username","password","ip","port"].map(function(t){n=n.replace("["+t+"]",e[t]?e[t]:"")}),n}return""}},mounted:function(){this.InitMap()},created:function(){}},l=n("XyMi");var c=function(e){n("oGil")},d=Object(l.a)(s,function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"map",attrs:{id:this.newMapId}})},[],!1,c,null,null);t.default=d.exports}});
|