mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
0c56a3e599
Made-with: Cursor Former-commit-id: 571c9a99ee26d90505e550c287eb8ad8d743ff8d
1 line
41 KiB
JavaScript
1 line
41 KiB
JavaScript
(window["webpackJsonp_security-control"]=window["webpackJsonp_security-control"]||[]).push([["chunk-bb2e143a"],{"1d98":function(e,t,a){e.exports=a.p+"img/hezi-online.23e20376.svg"},"1e3f":function(e,t,a){e.exports=a.p+"img/ipc-offline.9181666b.svg"},"2f28":function(e,t,a){e.exports=a.p+"img/5.e69bad60.svg"},"30d1":function(e,t,a){e.exports=a.p+"img/16.5d462cf8.svg"},3810:function(e,t){e.exports="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QOPaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzE0MiA3OS4xNjA5MjQsIDIwMTcvMDcvMTMtMDE6MDY6MzkgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6YTBkOTNjOTMtMTRkNS00Y2UyLWFmOGUtNTYwMDJkNzQ5MGM4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjVEQzhEOUY0NjI5QTExRUFCOUYyOEIxNEMyMUFCQ0ZGIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjVEQzhEOUYzNjI5QTExRUFCOUYyOEIxNEMyMUFCQ0ZGIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE3IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MGFiZjY0MjktN2E3MC00NDM1LWE2ZTQtMzYzZWZkOTY2MWZlIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NjI0NWNjOGQtOTkzMC0xMTdkLTlhY2ItYzAzOGQwY2FkMmFjIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoKDBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAgABgAwERAAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPBUtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZqbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEyobHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+DlJWWl5iZmpucnZ6fkqOkpaanqKmqq6ytrq+v/aAAwDAQACEQMRAD8A9N4q7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FWiQBU7DFVM3UA6uPoqf1YaW3LcQtsHH07frxpbVcCuxV2KuxV2KuxV2KuxVZLKsacm+geJxVLpZpJDVjt2HbJgMVgBPTfFXEEdcVVoLl4zQ7p4f0xIW0wVgyhgag9MgybxV2KuxV2KuxV2KpfeSFpSvZdvp75IMSoAVIHjhVOYoo41CoKeJ7nIsll1FG8TFhuqkg9xiEFKckhF2Mh+KM/MYCkIzIpdirsVdirsVdiqVS/3j/M/rybFaKVFemKp5kWS2UAxODsCpr92KpLkmKtZ/36/I/qwFQmORZOxV2KuxV2KuxVLbpOEzeDbj6cmGJUsVTayLG2TkKeHuMiUhZqBb0NhtUcj7YQpSzChFWKEsz9hsPngKQjcil2KuxV2KuxV2KqU8IlSnRh9k4QVat7W3H2hykHVW7fRhtFIsAAUHTAlxAIoRUHqDiqCuLWBmpGKP3p0Hzw2ilaONY0Cr0GRSuxV2KuxV2KuxV2KuxVayq3UdOh74q6kg6SN9ND+sYbVxVj9p2I8Nh+qmNq2AAKAUGBW8VdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdir//Z"},4:function(e,t){},"4e80":function(e,t,a){e.exports=a.p+"img/device.88b656a8.svg"},5:function(e,t){},6:function(e,t){},"60d0":function(e,t,a){e.exports=a.p+"img/6.9966f972.svg"},"6ca1d":function(e,t,a){e.exports=a.p+"img/17.ce211ea3.svg"},7:function(e,t){},"739e":function(e,t,a){e.exports=a.p+"img/hezi-offline.a860bd37.svg"},7545:function(e,t,a){e.exports=a.p+"img/ipc-online.ee0c9563.svg"},7889:function(e,t,a){},"7a58":function(e,t,a){e.exports=a.p+"img/nvr-offline.937cb21e.svg"},"7eb6":function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var r=a("970b"),i=a.n(r),n=a("ed6d"),o=a.n(n),s=a("6b58"),c=a.n(s),l=a("36c6"),d=a.n(l),p=a("2b0e");function u(e){var t=h();return function(){var a,r=d()(e);if(t){var i=d()(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return c()(this,a)}}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var f=function(e){o()(a,e);var t=u(a);function a(){return i()(this,a),t.apply(this,arguments)}return a}(p["default"])},"7faf":function(e,t,a){e.exports=a.p+"img/18.a7e278a9.svg"},8:function(e,t){},8933:function(e,t,a){e.exports=a.p+"img/task.be0c063e.svg"},9:function(e,t){},9157:function(e,t,a){e.exports=a.p+"img/11.3c2bd05d.svg"},a093:function(e,t,a){e.exports=a.p+"media/alarm.56a0cf36.wav"},a53a:function(e,t,a){e.exports=a.p+"img/zhuapai-offline.47469e7e.svg"},b633:function(e,t,a){},b7b0:function(e,t,a){e.exports=a.p+"img/2.8d2895c0.svg"},cc82:function(e,t,a){"use strict";a("7889")},db6c:function(e,t,a){"use strict";a("b633")},dbab:function(e,t,a){e.exports=a.p+"img/zhuapai-online.ec313ee6.svg"},dc5b:function(e,t,a){e.exports=a.p+"img/15.dbec71aa.svg"},de4f:function(e,t,a){e.exports={elInputWidth:"200px",elInputNumberWidth:"200px",elTextareaWidth:"300px",elSelectWidth:"200px",appHeaderBg:"#014051",appIconBg:"#6758F3",appIconColor:"#FFFFFF",appIconSize:"30px",appNameColor:"#FFFFFF",appNameSize:"30px"}},deba:function(e,t,a){e.exports=a.p+"img/time.0ed9c24c.svg"},e223:function(e,t,a){e.exports=a.p+"img/nvr-online.0d409b27.svg"},e5da:function(e,t,a){e.exports=a.p+"img/1.c45034e8.svg"},e888:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"alarm-search-container"},[e._m(0),a("el-select",{staticClass:"search-input",attrs:{placeholder:"请选择布控类型"},on:{change:e.handleRepoTypeChange},model:{value:e.searchForm.controlTypeCode,callback:function(t){e.$set(e.searchForm,"controlTypeCode",t)},expression:"searchForm.controlTypeCode"}},e._l(e.controlTypeCodes,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.code}})})),1),e._m(1),a("div",{staticClass:"custom-cascader-block search-input"},[e.controlTypeCodeCache?a("div",{staticClass:"virtual-control-type",attrs:{disabled:!e.searchForm.controlTypeCode}},[e._v(" 已选"+e._s(e.controlTypeCodeCache)+"种任务 ")]):e._e(),a("el-cascader",{attrs:{disabled:!e.searchForm.controlTypeCode,options:e.controlTaskNames,separator:" ","collapse-tags":"",placeholder:"请选择布控任务","show-all-levels":!1,props:{multiple:!0,value:"id",label:"name"}},on:{change:e.handleCascaderChange},nativeOn:{click:function(t){return e.cliclCascader.apply(null,arguments)}},model:{value:e.searchForm.controlTypeCodeCache,callback:function(t){e.$set(e.searchForm,"controlTypeCodeCache",t)},expression:"searchForm.controlTypeCodeCache"}})],1),e._m(2),a("el-select",{staticClass:"search-input",attrs:{"popper-class":"device-select-wrap",clearable:"",placeholder:"请选择布控设备"},on:{focus:e.deviceFocus,clear:e.deviceClear},model:{value:e.searchForm.deviceTemps,callback:function(t){e.$set(e.searchForm,"deviceTemps",t)},expression:"searchForm.deviceTemps"}}),"#/alarmInformation/record"===e.currentAddress?a("el-date-picker",{staticClass:"security-control-search-input",style:{"margin-right":"10px"},attrs:{clearable:"","value-format":"timestamp",type:"datetimerange","default-time":e.defaultTime,"picker-options":e.pickerOptions,"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right"},on:{focus:e.datePickFoucs,change:e.dateTimeChange},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}}):e._e(),a("el-button",{staticClass:"search-button",attrs:{type:"primary",disabled:e.isLoading},on:{click:e.fetchData}},[e._v("查询")]),e.showMoreSearchButton?a("el-button",{staticClass:"search-button",attrs:{type:"primary"},on:{click:e.searchMore}},[e._v("高级查询")]):e._e(),a("el-button",{attrs:{disabled:e.isLoading},on:{click:e.resetSearchParams}},[e._v("重置")]),e.deviceSelectVisible?a("device-select-dialog",{ref:"dsDialog",attrs:{"task-ids":e.flatten(e.searchForm.controlTypeCodeCache)},on:{confirm:e.confirmDeviceSelect,cancel:e.cancelDevice}}):e._e()],1)},i=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"label-title"},[a("span",[e._v("布控类型")])])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"label-title"},[a("span",[e._v("布控任务")])])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"label-title"},[a("span",[e._v("布控设备")])])}],n=a("970b"),o=a.n(n),s=a("5bc3"),c=a.n(s),l=a("ed6d"),d=a.n(l),p=a("6b58"),u=a.n(p),h=a("36c6"),f=a.n(h),m=a("9ab4"),v=a("60a3"),y=a("b028"),g=a("020c"),C=a("2fe1"),T=a("e33d");function b(e){var t=A();return function(){var a,r=f()(e);if(t){var i=f()(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return u()(this,a)}}function A(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var E=function(e){d()(a,e);var t=b(a);function a(){var e;return o()(this,a),e=t.apply(this,arguments),e.controlTypeCodes=[],e.controlTaskNames=[],e.controlTypeCodeCache=0,e.taskDeviceCodesAll=[],e.deviceList=[],e.currentAddress="",e.defaultTime=[],e.times=[],e.isLoading=!1,e.showMoreSearchButton=!1,e.pickerOptions={disabledDate:function(e){var t=Object(T["localDateStr"])();return e.getTime()>new Date(t+" 23:59:59")},shortcuts:[{text:"最近一周",onClick:function(t){e.shortcutDateTime(t,7)}},{text:"最近一个月",onClick:function(t){e.shortcutDateTime(t,30)}},{text:"最近三个月",onClick:function(t){e.shortcutDateTime(t,90)}}]},e.searchForm={controlTypeCode:"",deviceTemps:"",devices:[],deviceIds:[],controlTypeCodeCache:[]},e}return c()(a,[{key:"watchSearchParamsChange",value:function(e){e&&(this.searchForm=this.searchParams)}},{key:"handleRepoTypeChange",value:function(){this.searchForm.deviceTemps="",this.fetchTaskNameList(),this.fetchData()}},{key:"fetchControlType",value:function(){var e=this;this.service.fetchAlarmTontrolType().then((function(t){if(t.success){var a=t.data&&t.data.filter((function(e){return e.flag}));e.controlTypeCodes=a||[],e.controlTypeCodes.unshift({name:"全部",code:"ALL",type:"",flag:!0}),e.searchForm.controlTypeCode="ALL"}else e.$message.error(t.message)}))}},{key:"fetchHighSearchButton",value:function(){var e=this;this.service.enableHighSearch().then((function(t){t.success&&(e.showMoreSearchButton=t.data)}))}},{key:"fetchTaskNameList",value:function(){var e=this,t=this.searchForm.controlTypeCode||"ALL";this.controlTypeCodeCache=0,this.searchForm.controlTaskIds=[],this.searchForm.controlTypeCodeCache=[],this.service.getControlTypeList({type:t}).then((function(t){t.success?e.controlTaskNames=t.data||[]:e.$message.error(t.message)}))}},{key:"shortcutDateTime",value:function(e,t){var a=Object(T["localDateStr"])(),r=new Date(a+" 23:59:59"),i=Object(T["localDateStr"])(+new Date-24*t*3600*1e3),n=new Date(i+" 00:00:00");1===t&&(r=new Date(i+" 23:59:59")),e.$emit("pick",[n,r])}},{key:"cliclCascader",value:function(){}},{key:"flatten",value:function(e){var t=[];if(e)for(var a=0;a<e.length;a++)Array.isArray(e[a])?t=t.concat(this.flatten(e[a])):t.push(e[a]);return t}},{key:"searchMore",value:function(){this.$emit("searchMore")}},{key:"fetchDeviceByTask",value:function(){var e=this;this.taskDeviceCodesAll=[],this.service.getTaskDevice({taskIds:this.flatten(this.searchForm.controlTypeCodeCache)}).then((function(t){if(t.success){var a=t.data||[];a.forEach((function(t){t.devices.forEach((function(t){t.channel&&t.channel.length>0?t.channel.forEach((function(t){-1===e.taskDeviceCodesAll.indexOf(t.deviceId)&&e.taskDeviceCodesAll.push(t.deviceId)})):-1===e.taskDeviceCodesAll.indexOf(t.deviceId)&&e.taskDeviceCodesAll.push(t.deviceId)}))}))}else e.$message.error(t.message)}))}},{key:"handleCascaderChange",value:function(e){e=e||[],e&&(this.$emit("currentPageChange"),this.searchForm.controlTaskIds=this.flatten(e),this.controlTypeCodeCache=e.length,this.searchForm.deviceTemps="",this.searchForm.devices=[],this.subDevicesIds=[],this.fetchDeviceByTask())}},{key:"datePickFoucs",value:function(){this.defaultTime=["00:00:00","23:59:59"]}},{key:"dateTimeChange",value:function(e){e&&e.length?(this.searchForm.startTime=e[0],this.searchForm.endTime=e[1],this.$emit("currentPageChange")):this.initSearchTimeData(!1)}},{key:"initSearchTimeData",value:function(e){var t=Object(T["localDateStr"])(),a=new Date(t+" 23:59:59"),r=Object(T["localDateStr"])(new Date(+new Date-2592e6)),i=new Date(r+" 00:00:00");this.times=e?[i,a]:[],r=r.replace(/\//g,"-"),t=t.replace(/\//g,"-"),this.searchForm.startTime=+i,this.searchForm.endTime=+a}},{key:"resetSearchParams",value:function(){var e=this;this.searchForm={controlTypeCode:"ALL",controlTaskIds:[],deviceTemps:"",devices:[],deviceIds:[],controlTypeCodeCache:[],pageNo:1,pageSize:10,highSearch:[]},this.isLoading=!0,this.subDevicesIds=[],this.deviceList=[],this.dsDialog&&this.dsDialog.clear(),this.fetchTaskNameList(),this.initSearchTimeData(!0),this.$emit("resetSearchParams"),this.fetchData(),setTimeout((function(){e.isLoading=!1}),1e3)}},{key:"cancelDevice",value:function(){this.searchForm.deviceTemps="",this.dsDialog&&this.dsDialog.clear()}},{key:"deviceClear",value:function(){this.deviceList=[],this.subDevicesIds=[],this.searchForm.devices=[],this.searchForm.deviceIds=[],this.searchForm.deviceTemps="",this.subDevicesIds=[],this.dsDialog&&this.dsDialog.clear(),this.fetchData()}},{key:"fetchData",value:function(){var e=this;this.isLoading=!0,setTimeout((function(){e.isLoading=!1}),1e3),this.$emit("fetch",this.searchForm,this.taskDeviceCodesAll)}},{key:"created",value:function(){this.currentAddress=window.location.hash,this.searchForm=this.searchParams,this.fetchControlType(),this.fetchTaskNameList(),this.initSearchTimeData(!0)}}]),a}(Object(C["mixins"])(y["a"]));m["a"]([Object(v["e"])({default:function(){}})],E.prototype,"searchParams",void 0),m["a"]([Object(v["h"])("searchParams",{deep:!0,immediate:!0})],E.prototype,"watchSearchParamsChange",null),E=m["a"]([Object(v["a"])({components:{DeviceSelectDialog:g["a"]}})],E);var k=E,I=k,D=(a("db6c"),a("2877")),x=Object(D["a"])(I,r,i,!1,null,null,null);t["a"]=x.exports},ef24:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("qz-card",{style:{width:e.switchCardSize(this.data,1),height:e.switchCardSize(this.data,2)},attrs:{title:e.data.controlTypeName,subtitle:e.captureTimeFormat(e.data),"show-header":!1,config:e.config,images:e.imagesRecord},on:{cardClick:e.handleCardClick},scopedSlots:e._u([{key:"footer",fn:function(){},proxy:!0},{key:"afterImage",fn:function(){return[a("div",{staticClass:"alarm-container"},[a("div",{staticClass:"alarm-header"},[a("span",{staticClass:"task-type"},[e._v(e._s(e.controlTypeNameShow(e.data)))]),e.data.alarmLevel?a("p",{class:["alarm-level",e.alarmLevelOperate(e.data.alarmLevel,2)]},[a("span",{staticClass:"alarm-level-text"},[e._v(e._s(e.alarmLevelOperate(e.data.alarmLevel,1)))])]):e._e(),"FREQUENT_STRANGER"===e.data.controlTypeCode?a("div",{staticClass:"frequent-style"},[e._v(" 最近"),a("span",[e._v(e._s(e.data.recentDays||0===e.data.recentDays?e.data.recentDays:"-"))]),e._v("天内出现:"),a("span",{staticClass:"frequent-numbers"},[e._v(e._s(e.data.appearanceTimes||0===e.data.appearanceTimes?e.data.appearanceTimes:"-"))]),e._v(e._s(e.data.appearanceMethod||0===e.data.appearanceMethod?0===e.data.appearanceMethod?"次":"天":"-")),a("span")]):"GATHER"===e.data.controlTypeCode?a("div",{staticClass:"roi-message"},[e._v(" 当前区域"),a("span",{staticClass:"roi-number"},[e._v(e._s(e.data.snapNum||0===e.data.snapNum?e.data.snapNum:"-"))]),e._v("人"),a("span",[e._v("(阈值上限"+e._s(e.data.threshold||0===e.data.threshold?e.data.threshold:"-")+"人)")])]):e._e()]),a("div",{staticClass:"alarm-label-container"},[e.content.length>0?a("div",{staticClass:"qz-card-content__form"},e._l(e.content,(function(t,r){return a("div",{key:r,staticClass:"card-form-item"},[a("el-tooltip",{attrs:{placement:"bottom","max-width":"200",content:t.label}},[a("img",{staticClass:"img-icon",attrs:{src:t.icon?t.icon:"",alt:""}})]),e.data.controlTypeCode&&e.excludeTypes.indexOf(e.data.controlTypeCode)>-1?a("span",[t.value.length>=13?a("el-tooltip",{key:r,staticClass:"item",attrs:{content:t.value,effect:"dark",placement:"bottom"}},[a("p",{staticClass:"label-value",style:{marginLeft:"3px"}},[e._v(e._s(t.value))])]):a("p",{staticClass:"label-value"},[e._v(e._s(t.value||"-"))])],1):a("span",[t.value.length>=17?a("el-tooltip",{key:r,staticClass:"item",attrs:{content:t.value,effect:"dark",placement:"bottom"}},[a("p",{staticClass:"label-value",style:{width:"210px",marginLeft:"3px"}},[e._v(" "+e._s(t.value)+" ")])]):a("p",{staticClass:"label-value",style:{width:"210px"}},[e._v(e._s(t.value||"-"))])],1)],1)})),0):e._e()])])]},proxy:!0}])},["FACE_PROPERTIES"===e.data.controlTypeCode||"BODY_PROPERTIES"===e.data.controlTypeCode?a("div",{staticClass:"properties-container",attrs:{slot:"innerImage"},slot:"innerImage"},e._l(e.taskProperties,(function(t,r){return a("div",{key:r,staticClass:"property-label"},[a("span",{staticClass:"property-item"},[e._v(e._s(t))])])})),0):e._e()])},i=[],n=a("c973"),o=a.n(n),s=a("970b"),c=a.n(s),l=a("5bc3"),d=a.n(l),p=a("ed6d"),u=a.n(p),h=a("6b58"),f=a.n(h),m=a("36c6"),v=a.n(m),y=a("a34a"),g=a.n(y),C=a("9ab4"),T=a("60a3"),b=a("1668"),A=a("e33d"),E=a("6fc5"),k=a("9dba"),I=a("0613");function D(e){var t=x();return function(){var a,r=v()(e);if(t){var i=v()(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return f()(this,a)}}function x(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var R=a("deba"),w=a("4e80"),O=a("8933"),F=function(e){u()(a,e);var t=D(a);function a(){var e;return c()(this,a),e=t.apply(this,arguments),e.currentUserName="",e.watermarkSetting={text:"",fontSize:30,offsetY:200,fontColor:"rgba(0,0,0,0.3)"},e.captureTimeFormat=b["g"],e.imageDataFormat=b["k"],e.captureImgHideDescType=b["f"],e.deployImgHideType=b["i"],e.groupDisaplyName=b["j"],e.cardIdShowLogic=b["h"],e.alarmShowGroupNumber=b["b"],e.typeJudege=A["typeJudege"],e.taskProperties=[],e.excludeTypes=["STRANGER","FREQUENT_STRANGER","DEVICE_ROI","NON_VEHICLE","PLATE"],e.config={},e.content=[],e.images=[],e.dataRecord={},e}return d()(a,[{key:"imagesRecord",get:function(){return this.images},set:function(e){}},{key:"watchDataChange",value:function(e){e&&this.init()}},{key:"created",value:function(){var e=Object(E["e"])(k["a"],I["a"]);this.currentUserName=e.userInfo&&Object.keys(e.userInfo).length>0?e.userInfo.loginName:"",this.watermarkSetting.text=this.currentUserName+" "+this.$utils.parseDate(new Date),this.data&&this.init()}},{key:"init",value:function(){this.config={title:this.data.controlTypeName,subtitle:this.captureTimeFormat(this.data),headColor:this.data.color||"red",fontColor:"#ffffff"};var e=this.formatAlarmProperties(this.data.taskProperties);e&&e.length>0&&(this.taskProperties=Object.assign([],e),this.taskProperties.length>=4&&(this.taskProperties=this.taskProperties.splice(0,3))),this.getContent();var t=this.imageDataFormat(this.data,"capture",!1);this.calcWidth(t)}},{key:"swicthImageSize",value:function(e,t){return e&&1===t?"THREE_LEVEL_CONTROL"===e.controlTypeCode||"SMOKING"===e.controlTypeCode||"FIRE"===e.controlTypeCode||"VEHICLE_ILLEGAL_PARK"===e.controlTypeCode||"VEHICLE_BLOCKED"===e.controlTypeCode?"249":"STRANGER"===e.controlTypeCode||"FREQUENT_STRANGER"===e.controlTypeCode||"DEVICE_ROI"===e.controlTypeCode||"NON_VEHICLE"===e.controlTypeCode||"PLATE"===e.controlTypeCode||"BATTERY_VEHICLE"===e.controlTypeCode?"182":(e.controlTypeCode,"120"):e&&2===t?"GATHER"===e.controlTypeCode||"HELMENT"===e.controlTypeCode?"131":"STRANGER"===e.controlTypeCode||"FREQUENT_STRANGER"===e.controlTypeCode||"DEVICE_ROI"===e.controlTypeCode||"NON_VEHICLE"===e.controlTypeCode||"PLATE"===e.controlTypeCode||"BATTERY_VEHICLE"===e.controlTypeCode?"182":(e.controlTypeCode,"120"):void 0}},{key:"switchCardSize",value:function(e,t){if(e&&1===t)return"GATHER"===e.controlTypeCode||"BLACK_LIST"===e.controlTypeCode||"FACE_PROPERTIES"===e.controlTypeCode||"BODY_PROPERTIES"===e.controlTypeCode||"HELMENT"===e.controlTypeCode?"249px":"STRANGER"===e.controlTypeCode||"FREQUENT_STRANGER"===e.controlTypeCode||"DEVICE_ROI"===e.controlTypeCode||"NON_VEHICLE"===e.controlTypeCode||"PLATE"===e.controlTypeCode?"182px":"249px";if(e&&2===t)switch(e.controlTypeCode){case"GATHER":return"264px";case"STRANGER":return"294px";case"FACE_PROPERTIES":return"230px";case"BODY_PROPERTIES":return"230px";case"FREQUENT_STRANGER":return"322px";case"DEVICE_ROI":return"294px";case"BLACK_LIST":return"240px";case"HELMENT":return"251px";case"TAMPER_ALARM":return"120px";case"PLATE":return"310px";default:return"234px"}}},{key:"controlTypeNameShow",value:function(e){var t=["BLACK_LIST","DEVICE_ROI","PLATE","FACE_PROPERTIES","BODY_PROPERTIES"];if(e&&e.controlTypeCode&&-1===t.indexOf(e.controlTypeCode))return e.controlTypeName;switch(e.controlTypeCode){case"BLACK_LIST":return e.name?e.name:"未知人员";case"DEVICE_ROI":return e.name?e.name:"未知人员";case"PLATE":return e.plate?e.plate:"-";case"FACE_PROPERTIES":return"人脸属性匹配";case"BODY_PROPERTIES":return"行人属性匹配"}}},{key:"calcWidth",value:function(e){var t=new Image,a={fontColor:"rgba(0,0,0,0.3)"};t.src=e,"GATHER"===this.data.controlTypeCode||"HELMENT"===this.data.controlTypeCode?(a.fontSize=100,a.offsetY=800,a.offsetX=100):(a.fontSize=30,a.offsetY=250,a.offsetX=30),this.getImages(a)}},{key:"getImages",value:function(){var e=o()(g.a.mark((function e(t){var a,r,i,n=this;return g.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=[],this.images=Object.assign([]),r=JSON.parse(JSON.stringify(t)),r.text=this.watermarkSetting.text,i={url:"FIRE"===this.data.controlTypeCode||"VEHICLE_ILLEGAL_PARK"===this.data.controlTypeCode||"VEHICLE_BLOCKED"===this.data.controlTypeCode?this.imageDataFormat(this.data,"parano",!1):this.imageDataFormat(this.data,"capture",!1),preview:!1,marker:"BLACK_LIST"===this.data.controlTypeCode?"抓拍照":"",watermark:!1,width:this.swicthImageSize(this.data,1),height:this.swicthImageSize(this.data,2),watermarkSetting:r,fitContainer:!0},a.push(i),this.deployImgHideType(this.data)&&a.push({url:this.imageDataFormat(this.data,"deploy",!1),preview:!1,marker:this.groupDisaplyName(this.data),watermark:!1,width:"120",height:"120",watermarkSetting:r,fitContainer:!0}),this.$nextTick((function(){n.$set(n,"images","TAMPER_ALARM"==n.data.controlTypeCode?[]:a)})),this.$forceUpdate();case 9:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"alarmLevelOperate",value:function(e,t){if(e&&""!==e&&1===t)switch(e){case 1:return"一级";case 2:return"二级";case 3:return"三级";case 4:return"四级";case 5:return"五级"}else if(e&&""!==e&&2===t)switch(e){case 1:return"first-level";case 2:return"second-level";case 3:return"third-level";case 4:return"fourth-level";case 5:return"fifth-level"}}},{key:"getContent",value:function(){this.content=[],"GROUP_COMPARE"===this.data.controlTypeCode&&this.content.push({label:"人员名称2",value:this.data.subsidiaryName}),this.content.push({label:"设备名称",value:this.data.subDeviceName?this.data.subDeviceName:this.data.deviceName,icon:w}),this.content.push({label:"抓拍时间",value:this.$utils.parseDate(this.data.captureTime),icon:R}),this.content.push({label:"任务名称",value:this.data.controlTaskName,icon:O})}},{key:"formatAlarmProperties",value:function(e){var t=[];return e&&e.length&&e.map((function(e){t.push(e.value)})),t}},{key:"playVideo",value:function(e,t){!0===t.hasVideo&&this.$emit("playVideo",e,t)}},{key:"handleCardClick",value:function(){"TAMPER_ALARM"!=this.data.controlTypeCode&&this.$emit("cardClick",this.data)}},{key:"mounted",value:function(){}}]),a}(T["g"]);C["a"]([Object(T["e"])({default:function(){},type:Object})],F.prototype,"data",void 0),C["a"]([Object(T["e"])({default:!1,type:Boolean})],F.prototype,"showVideo",void 0),C["a"]([Object(T["h"])("data",{immediate:!0})],F.prototype,"watchDataChange",null),F=C["a"]([Object(T["a"])({name:"alarm-card"})],F);var N=F,S=N,M=(a("cc82"),a("2877")),P=Object(M["a"])(S,r,i,!1,null,null,null);t["a"]=P.exports},f2e6:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("span",["/alarmBoard/map"===this.$route.path?r("el-main",{staticClass:"alarm-map-board-page security-control-main no-pb has-map"},[r("div",{staticClass:"alarm-list-search-container security-control-search-container"},[r("alarm-search",{ref:"alarmSearch",attrs:{searchParams:e.alarmMapBoardEntity},on:{resetSearchParams:e.resetSearchParams,fetch:e.fetchData}})],1),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],staticClass:"alarm-map-board-container alarm-body-common has-map"},[r("div",{staticClass:"alarm-map-board-main"},[[r("div",{staticClass:"map-component"},[e.showMap?r("qz-map",{ref:"qzMap",attrs:{id:"mapId",markerAlarms:e.markerAlarmList,mapInitinalOptions:e.mapProps.mapInitinalOptions,deviceFilterCodes:e.alarmMapBoardEntity.devices,showAll:!1,alarms:e.mapProps.alarms,busId:e.mapProps.busId,service:e.Server,points:e.mapProps.points,limit:[1,4],data:e.mapProps.points,autoFitView:!1,playerPluginUrl:e.dcsUrlRecord},on:{pointsUpdated:e.setFitView,alarmShow:e.setFitViewAlarm},scopedSlots:e._u([{key:"alarmdialog",fn:function(t){var a=t.data;return[r("div",{staticClass:"personal-alarm-card-info pic-alarm-block",staticStyle:{margin:"0"}},[r("div",{staticClass:"personal-info-header",style:"background:"+a.color+";position: relative;"},[r("span",[e._v(e._s(a.controlTypeName))]),r("i",{staticClass:"el-icon-circle-close",staticStyle:{position:"absolute",right:"8px",top:"13px",cursor:"pointer"},on:{click:function(t){return e.closeDialog(a)}}})]),r("div",{staticClass:"personal-footer-view-text",staticStyle:{padding:"0 8px",margin:"12px 0","font-size":"14px","word-break":"break-all"}},[e._v("任务名称:"+e._s(a.controlTaskName))]),r("div",{staticClass:"personal-footer-view-text",staticStyle:{padding:"0 8px",margin:"12px 0","font-size":"14px","word-break":"break-all"}},[e._v("设备区域:"+e._s(a.areaName))]),r("div",{staticClass:"personal-footer-view-text",staticStyle:{padding:"0 8px",margin:"12px 0","font-size":"14px","word-break":"break-all"}},[e._v("设备名称:"+e._s(a.deviceName))])])]}}],null,!1,3238000538)}):e._e()],1),r("div",{staticClass:"has-map-component"},[r("div",{staticClass:"aside-left-header"},[r("h4",[r("span",[e._v("设备报警记录")])])]),e.alarmMapBoardData.length?r("div",{staticClass:"subscribe-data-card"},[r("div",{staticClass:"alarm-map-boxs"},e._l(e.alarmMapBoardData,(function(t,a){return r("alarm-card",{key:a,attrs:{data:t},on:{cardClick:e.previewPersonalInfo}})})),1)]):r("qz-no-data")],1)]],2)]),e.alarmInfoVisible?r("div",[r("el-dialog",{class:e.currentAlarmData.controlTypeCode+"_dialog_wrapper",attrs:{"custom-class":"preview-special-alarm-dialog",title:e.currentTypeName+"报警详情",visible:e.alarmInfoVisible,"append-to-body":"",top:"0"},on:{"update:visible":function(t){e.alarmInfoVisible=t},close:e.cancelAlarmOperate}},[r("alarm-info",{attrs:{pType:e.alarmType,data:e.currentAlarmData,isShowVideo:!1}})],1)],1):e._e(),r("audio",{ref:"voice",attrs:{preload:"auto",id:"voiceId"}}),r("audio",{staticClass:"audio-default",attrs:{id:"voiceDefault",src:a("a093"),preload:"auto"}})]):e._e(),r("router-view")],1)},i=[],n=a("c973"),o=a.n(n),s=a("970b"),c=a.n(s),l=a("5bc3"),d=a.n(l),p=a("ed6d"),u=a.n(p),h=a("6b58"),f=a.n(h),m=a("36c6"),v=a.n(m),y=a("a34a"),g=a.n(y),C=a("9ab4"),T=a("60a3"),b=a("2b0e"),A=(new b["default"],a("e7fc")),E=a("0613"),k=a("e33d"),I=function(){function e(){c()(this,e)}return d()(e,null,[{key:"create",value:function(t,a){var r=(E["a"].state.user&&E["a"].state.user.userInfo||{})["businessId"],i=Object(k["userToken"])().get();r&&(e.clientId||(window.mqttClient&&(window.mqttClient.connected&&window.mqttClient.end(!0),window.mqttClient=null),e.clientId="".concat(r,"_").concat((new Date).getTime(),"_").concat((1e10*Math.random()).toFixed()),e.client=Object(A["connect"])("ws://".concat(location.hostname,":8083/mqtt"),{clean:!0,connectTimeout:4e3,clientId:e.clientId,username:"alarm-app",password:"Basic ".concat(i),reconnectPeriod:15e3}),window.mqttClient=e.client),e.client.on("connect",(function(){e.client.subscribe("".concat(e.clientId),(function(e){e||t()}))})),e.client.on("message",(function(e,t,r){var i=JSON.parse(Object(k["Utf8ArrayToStr"])(t));a(i)})),e.client.on("end",(function(){})),e.client.on("close",(function(){})),e.client.on("error",(function(e){})))}},{key:"end",value:function(){e.client&&(e.client.end(),e.clientId="",e.client=null)}}]),e}();I.client=null,I.clientId="";var D=a("2ef0"),x=a.n(D),R=a("f5ea"),w=a("c2a7"),O=a("ef24"),F=a("e888"),N=a("2fe1"),S=a("9523"),M=a.n(S);function P(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function L(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?P(Object(a),!0).forEach((function(t){M()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):P(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function _(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=V(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){s=!0,n=e},f:function(){try{o||null==a.return||a.return()}finally{if(s)throw n}}}}function V(e,t){if(e){if("string"===typeof e)return B(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function Y(e){var t=j();return function(){var a,r=v()(e);if(t){var i=v()(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return f()(this,a)}}function j(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var H=function(e){u()(r,e);var t=Y(r);function r(){var e;return c()(this,r),e=t.apply(this,arguments),e.allDeviceList=[],e.markerAlarmList=[],e.playerServer="",e.playerServerSave="",e.showMap=!1,e.alarmMapBoardEntity={},e.mapProps={},e}return d()(r,[{key:"created",value:function(){var e=o()(g.a.mark((function e(){return g.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.fetchAllDeviceData(),e.next=3,this.fetchDcsAccount();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"fetchDcsAccount",value:function(){var e=this;return this.service.getDCSAccount({deviceTypeCode:"dcs"}).then((function(t){if(t.success&&t.data.length>0){var a=t.data[0];a.cameraUserName&&a.cameraPassword&&a.cameraIp?e.playerServerSave="".concat(a.cameraUserName,":").concat(a.cameraPassword,"@").concat(a.cameraIp,":2015"):e.playerServerSave=""}}))}},{key:"fetchAllDeviceData",value:function(){var e=this;this.service.getTaskDevice({taskIds:[]}).then((function(t){if(t.success){e.allDeviceList=[];var a,r=_(t.data);try{for(r.s();!(a=r.n()).done;){var i=a.value;e.allDeviceList=e.allDeviceList.concat(i.devices)}}catch(n){r.e(n)}finally{r.f()}e.showDevicePoints(),e.showMap=!0}else e.$message.error(t.message)})).catch((function(e){}))}},{key:"showDevicePoints",value:function(){var e=this;this.mapProps.points=[];this.mapProps.points=[],this.allDeviceList.forEach((function(t){t.channel&&t.channel.length>0?(t.channel||[]).forEach((function(a){e.alarmMapBoardEntity.devices.length>0?e.alarmMapBoardEntity.devices.indexOf(t.deviceCode)>-1&&e.generateMapPointsFromDevice(t,a):e.generateMapPointsFromDevice(t,a)})):e.alarmMapBoardEntity.devices.length>0?e.alarmMapBoardEntity.devices.indexOf(t.deviceCode)>-1&&e.generateMapPointsFromDevice(t):e.generateMapPointsFromDevice(t)}))}},{key:"generateMapPointsFromDevice",value:function(e,t){var a={};t?(a.edgeName=e.deviceName,a.deviceName=t.deviceName,e=t):a.deviceName=e.deviceName;var r=!isNaN(e.longitude)&&Number(e.longitude),i=!isNaN(e.latitude)&&Number(e.latitude);this.mapProps.points.push({objectType:"camera",objectId:e.deviceId,deviceCode:e.deviceId,data:L(L({},a),{},{areaName:e.areaName,identifyType:e.identifyType,rtspUrl:e.cameraMainRtspUrl,dcs:0===e.fromDcm,playerServer:0===e.fromDcm?this.playerServerSave:""}),lon:r,lat:i,rtspUrl:e.cameraMainRtspUrl,status:+e.status,onlineStatus:+e.onlineStatus,id:e.deviceId,x:e.mapX,y:e.mapY,draggable:!0})}},{key:"mapAlarmsDataSubscribe",value:function(e){var t=this;function r(a,r,i,n,o,s,c){var l={objectId:e.subDeviceId?e.subDeviceId:e.deviceId,autoCloseTime:1e4,dialogWidth:216,dialogHeight:c?178:148,text:'\n <div class="personal-info-header" style="background:'.concat(a,'">\n <span>').concat(r,'</span>\n </div>\n <div class="personal-footer-view-text" style="margin:12px 0;font-size:14px; word-break: break-all;">任务名称:').concat(n,'</div>\n <div class="personal-footer-view-text" style="margin:12px 0;font-size:14px; word-break: break-all;">设备区域:').concat(o,"</div>\n ").concat(c?'<div class="personal-footer-view-text" style="margin:12px 0;font-size:14px; word-break: break-all;">边端名称:'.concat(c,"</div>"):"",'\n <div class="personal-footer-view-text" style="margin:12px 0;font-size:14px; word-break: break-all;">设备名称:').concat(s,"</div>\n ")};i>=0?t.mapProps.alarms.splice(i,1,l):t.mapProps.alarms.unshift(l)}if(e.hasTips){var i=e&&"GROUP_COMPARE"===e.controlTypeCode?e.masterCaptureImage:e.captureImage,n=(e&&"GROUP_COMPARE"===e.controlTypeCode?e.subsidiaryCaptureImage:e.imgUrl,e&&e.controlTypeCode,e&&e.controlTypeCode,e&&"STRANGER"!==e.controlTypeCode&&"GATHER"!==e.controlTypeCode&&e.controlTypeCode,e&&e.controlTypeCode,e.controlTypeName),o=e.areaName,s=e.deviceName,c=e.subDeviceName,l=e.controlTaskName,d=e.color||"red",p=this.mapProps.alarms&&this.mapProps.alarms.findIndex((function(t){return t.objectId===(e.subDeviceId?e.subDeviceId:e.deviceId)})),u=new Image;u.src=i,u.onerror=function(e){i=a("3810"),r(d,n,p,l,o,s,c)},u.onload=function(e){r(d,n,p,l,o,s,c)}}}},{key:"picMapAlarmSubscribe",value:function(e){this.$utils.parseDate(e.captureTime);var t=this.markerAlarmList.findIndex((function(t){return t.objectId===(e.subDeviceId?e.subDeviceId:e.deviceId)})),a={objectId:e.subDeviceId?e.subDeviceId:e.deviceId,autoCloseTime:1e4,color:e.color||"red",controlTypeName:e.controlTypeName,controlTaskName:e.controlTaskName,areaName:e.areaName,deviceName:e.deviceName};t>=0?this.markerAlarmList.splice(t,1,a):this.markerAlarmList.unshift(a)}}]),r}(T["g"]);H=C["a"]([T["a"]],H);var U=H,q=(a("de4f"),a("103b"));function G(e){var t=z();return function(){var a,r=v()(e);if(t){var i=v()(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return f()(this,a)}}function z(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var Q=function(e){u()(r,e);var t=G(r);function r(){var e;return c()(this,r),e=t.apply(this,arguments),e.alarmMapBoardData=[],e.isLoading=!1,e.Server=q["a"],e.alarmMapBoardEntity={controlTypeCode:"",deviceTemps:"",devices:[],deviceIds:[],controlTypeCodeCache:[]},e.controlTypeCodes=[],e.controlTaskNames=[],e.controlTypeCodeCache=0,e.isDeviceLoading=!1,e.deviceList=[],e.subDevicesIds=[],e.isPlaying=!1,e.typeJudege=k["typeJudege"],e.coordinateOperate=k["coordinateOperate"],e.dcsUrlRecord="./alarm-front/player/DCSPlugin-1.2.0.exe",e.alarmInfoVisible=!1,e.hasDevice=!1,e.subDevices=[],e.alarmType="realTime",e.currentAlarmData={},e.currentDeviceData={},e.businessId=e.$store.state.user.userInfo.businessId,e.currentTypeName="",e.playMp3DefEl=void 0,e.playMp3El=void 0,e.allTaskForDevice=[],e.subscribeMapObj={},e.picMapAlarms=[],e.mapProps={busId:e.businessId,mapInitinalOptions:{zoom:18,center:[113.3466,23.1005]},points:[],alarms:[]},e}return d()(r,[{key:"created",value:function(){var e=o()(g.a.mark((function e(){return g.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"mounted",value:function(){I.create(this.fetchData,this.initAlarmData),this.fetchData(this.alarmMapBoardEntity,[]),window.onbeforeunload=this.onbeforeunload,this.initVoiceElement()}},{key:"beforeDestroy",value:function(){I.end(),window.onresize=null,window.onbeforeunload=null,this.playMp3DefEl&&this.playMp3DefEl.pause(),this.playMp3El&&this.playMp3El.pause(),this.playMp3DefEl&&this.playMp3DefEl.removeEventListener("ended",this.handleVoiceFn),this.playMp3El&&this.playMp3El.removeEventListener("ended",this.handleVoiceFn)}},{key:"initVoiceElement",value:function(){this.playMp3DefEl=document.getElementById("voiceDefault"),this.playMp3El=document.getElementById("voiceId"),this.playMp3DefEl&&this.playMp3DefEl.addEventListener("ended",this.handleVoiceFn),this.playMp3El&&this.playMp3El.addEventListener("ended",this.handleVoiceFn)}},{key:"handleVoiceFn",value:function(){this.isPlaying=!1}},{key:"onbeforeunload",value:function(){I.end()}},{key:"flatten",value:function(e){var t=[];if(e)for(var a=0;a<e.length;a++)Array.isArray(e[a])?t=t.concat(this.flatten(e[a])):t.push(e[a]);return t}},{key:"filterAlarmData",value:function(e,t){var a,r=!1;return a=this.flatten(e.controlTypeCodeCache),e.devices&&(e.devices.length>0&&0===a.length&&e.devices.indexOf(t.deviceId)>-1&&(r=!0),0===e.devices.length&&a.length>0&&a.indexOf(t.controlTaskId)>-1&&(r=!0),e.devices.length>0&&a.length>0&&a.indexOf(t.controlTaskId)>-1&&e.devices.indexOf(t.deviceId)>-1&&(r=!0)),r}},{key:"initAlarmData",value:function(e){var t=this;e&&e.forEach((function(e){t.alarmMapBoardData.length>=10&&t.alarmMapBoardData.pop(),t.coordinateOperate(e),t.subscribeDataChange(e),t.alarmMapBoardData.unshift(e)}))}},{key:"subscribeDataChange",value:function(e){if(this.subscribeMapObj[e.deviceId]){var t=this.subscribeMapObj[e.deviceId];e.renderCreateTime=+new Date,e.renderCreateTime-t.renderCreateTime>=1e4&&this.setSubscirbeAlarm(e)}else e.renderCreateTime=+new Date,this.setSubscirbeAlarm(e);this.playVoice(e)}},{key:"setSubscirbeAlarm",value:function(e){this.subscribeMapObj[e.deviceId]=e,this.mapAlarmsDataSubscribe(e),this.picMapAlarmSubscribe(e)}},{key:"resetSearchParams",value:function(){this.alarmMapBoardEntity={controlTypeCode:"ALL",deviceTemps:"",devices:[],deviceIds:[],controlTypeCodeCache:[]}}},{key:"setFitViewAlarm",value:function(){var e=this;this.$nextTick((function(){var t=x.a.get(e,"$refs.qzMap.$refs.fcMap.fcMap",null);if(t){var a=t.map,r=t.mapAlarm._mapAlarmIds,i=Object.keys(r),n=i[t.currentMarker];try{a&&r[n]&&t.setFitView(r[n],null,null,a.getZoom())}catch(o){}}}))}},{key:"playVoice",value:function(e){e.hasSound&&(this.isPlaying||(e.useDefaultSound?(this.playMp3DefEl&&this.playMp3DefEl.pause(),this.playMp3DefEl.play().catch((function(e){})),this.isPlaying=!0):(this.playMp3El&&this.playMp3El.pause(),this.playMp3El.src=e.soundUrl,this.playMp3El.play().catch((function(e){})),this.isPlaying=!0)))}},{key:"previewPersonalInfo",value:function(e){this.alarmType="realTime",this.currentAlarmData=e,this.currentTypeName=e.controlTypeName,"FREQUENT_STRANGER"!==e.controlTypeCode?this.alarmInfoVisible=!0:this.$router.push({path:"/alarmBoard/frequent",query:{id:e.id}})}},{key:"cancelAlarmOperate",value:function(){this.alarmType="",this.currentAlarmData={},this.currentTypeName="",this.alarmInfoVisible=!1}},{key:"fetchData",value:function(e,t){var a=this;e||(e=this.alarmMapBoardEntity),this.alarmMapBoardEntity=e,0===e.devices.length&&this.flatten(e.controlTypeCodeCache).length>0&&(e.devices=t,this.alarmMapBoardEntity.devices=t);var r=Object.assign({},e);r.controlTypeCode=r.controlTypeCode?r.controlTypeCode:"ALL",r.clientId=I.clientId,this.isLoading=!0,this.service.fetchRealRecordPage(r).then((function(e){if(e.success){var t=e.data||[];t.forEach((function(e){a.coordinateOperate(e)})),t.length=t.length>=10?10:t.length,a.alarmMapBoardData=t}else a.$message.error(e.message);a.isLoading=!1})).catch((function(){a.isLoading=!1}))}},{key:"imgLoadErrorHandle",value:function(e,t){e&&(e[t]=a("3810"))}},{key:"setFitView",value:function(){var e=this;this.$nextTick((function(){e.$refs.qzMap&&e.$refs.qzMap.setFitView()}))}},{key:"closeDialog",value:function(e){var t=this.$refs["qzMap"];t&&t.closeAlarmByHand&&t.closeAlarmByHand(e.objectId)}}]),r}(Object(N["mixins"])(U));C["a"]([Object(T["f"])("alarmSearch")],Q.prototype,"alarmSearch",void 0),Q=C["a"]([Object(T["a"])({components:{AlarmInfo:w["a"],AlarmSearch:F["a"],AlarmCard:O["a"],QzMap:R["a"]}})],Q);var W=Q,X=W,Z=a("2877"),J=Object(Z["a"])(X,r,i,!1,null,null,null);t["default"]=J.exports}}]); |