Files
starRiverProperty/frontend/alarm-front.20231109/js/chunk-2f459d84.6d5916d6.js
T
反编译工作区 0c56a3e599 chore(frontend): add static frontend build artifacts (portal, front_acs, etc.)
Made-with: Cursor

Former-commit-id: 571c9a99ee26d90505e550c287eb8ad8d743ff8d
2026-04-27 13:40:23 +08:00

1 line
111 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp_security-control"]=window["webpackJsonp_security-control"]||[]).push([["chunk-2f459d84"],{"090b":function(e,t,a){"use strict";a("4aab")},1:function(e,t){},1751:function(e,t,a){"use strict";a("c1e2")},1958: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"}},"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"},2:function(e,t){},2854:function(e,t,a){},2890:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dialogVisible?a("el-dialog",{attrs:{title:"通知设置","custom-class":"alarm-notice-dialog",width:"520px","append-to-body":"",visible:!0,"destory-on-close":!0},on:{close:e.closeDialog}},[a("el-form",{ref:"notifyForm",attrs:{"label-width":"100px","label-position":"top"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"邮箱收件人"}},[e._l(e.emailList,(function(t,i){return[a("el-select",{key:i,staticStyle:{"margin-bottom":"12px",width:"88%"},attrs:{placeholder:"请选择联系人邮箱",filterable:"",remote:"","remote-method":function(a){e.remoteMethod(a,t,i)},clearable:""},model:{value:t["value"],callback:function(a){e.$set(t,"value",a)},expression:"email['value']"}},e._l(t.emailMessagerList,(function(t){return a("el-option",{key:t.id,attrs:{"multiple-limit":10,label:t.name+"("+t.email+")",value:t.id}},[e._v(" "+e._s(t.name+"("+t.email+")"))])})),1),a("span",{key:t["key"]+"_"+i,staticClass:"delete-option",on:{click:function(a){return e.deleteInfoHuman(t,1)}}},[e._v("删除")])]}))],2),a("el-button",{attrs:{icon:"el-icon-plus"},on:{click:function(t){return e.addNoticeSeltDom("email")}}},[e._v("添加")])],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"})],1):e._e()},r=[],n=a("970b"),s=a.n(n),c=a("5bc3"),o=a.n(c),l=a("ed6d"),u=a.n(l),h=a("6b58"),f=a.n(h),p=a("36c6"),d=a.n(p),v=a("9ab4"),m=a("60a3");function y(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=g(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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,s=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){c=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(c)throw n}}}}function g(e,t){if(e){if("string"===typeof e)return k(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)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function b(e){var t=T();return function(){var a,i=d()(e);if(t){var r=d()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return f()(this,a)}}function T(){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 D=function(e){u()(a,e);var t=b(a);function a(){var e;return s()(this,a),e=t.apply(this,arguments),e.smsList=[{key:(new Date).getTime(),value:""}],e.emailList=[{key:(new Date).getTime(),value:"",emailMessagerList:[]}],e.dialogVisible=!1,e.emailRecord=[],e.emailListInit=[],e}return o()(a,[{key:"emailListChange",value:function(e,t){this.emailRecord=[];var a,i=y(e);try{for(i.s();!(a=i.n()).done;){var r=a.value;if(r.emailMessagerList.length>0){var n,s=y(r.emailMessagerList);try{for(s.s();!(n=s.n()).done;){var c=n.value;c.id===r.value&&this.emailRecord.push(c)}}catch(o){s.e(o)}finally{s.f()}}}}catch(o){i.e(o)}finally{i.f()}this.handleNotifySetting()}},{key:"closeDialog",value:function(){this.dialogVisible=!1}},{key:"cancelDialog",value:function(){this.dialogVisible=!1}},{key:"open",value:function(){var e=this;if(this.emailData.length>0)if(this.emailData[0].recipients.length>0){var t=[];this.emailData[0].recipients.map((function(e){t.push({key:(new Date).getTime(),value:e.id,emailMessagerList:[e]})})),this.emailList=t}else this.emailList=[{key:(new Date).getTime(),value:"",emailMessagerList:[]}];this.$nextTick((function(){e.dialogVisible=!0}))}},{key:"deleteInfoHuman",value:function(e,t){if(0===t){var a=this.smsList.indexOf(e);this.smsList.splice(a,1)}else{var i=this.emailList.indexOf(e);this.emailList.splice(i,1)}}},{key:"remoteMethod",value:function(e,t,a){var i=this;""!==e&&this.service.getHumanList({name:e}).then((function(e){e.success?t.emailMessagerList=e.data:(t.emailMessagerList=[],i.$message.error(e.message))}))}},{key:"addNoticeSeltDom",value:function(e){"phone"===e?this.smsList.push({key:(new Date).getTime(),value:""}):this.emailList.push({key:(new Date).getTime(),value:"",emailMessagerList:[]})}},{key:"handleNotifySetting",value:function(){var e=[],t={type:3,recipients:[]},a={type:2,recipients:[]};a["recipients"]=this.smsList.filter((function(e){return e["value"]})).map((function(e){return e["value"]})),t["recipients"]=this.emailList.filter((function(e){return e["value"]})).map((function(e){return e["value"]})),e.push(a),e.push(t),e[1].recipients=this.emailRecord,this.$emit("confirm",e)}},{key:"created",value:function(){}},{key:"mounted",value:function(){}}]),a}(m["g"]);v["a"]([Object(m["e"])({default:function(){return[]}})],D.prototype,"emailData",void 0),v["a"]([Object(m["h"])("emailList",{deep:!0})],D.prototype,"emailListChange",null),D=v["a"]([Object(m["a"])({})],D);var C=D,R=C,O=(a("cdee"),a("2877")),L=Object(O["a"])(R,i,r,!1,null,null,null);t["a"]=L.exports},3:function(e,t){},"454e":function(e,t,a){"use strict";a("f389")},"4aab":function(e,t,a){},5456:function(e,t,a){"use strict";a("2854")},"57de":function(e,t,a){"use strict";a("7087")},"63bf":function(e,t,a){"use strict";a.r(t);var i,r,n,s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("span",[a("qz-wrap",{staticClass:"control-task-container",scopedSlots:e._u([{key:"footer",fn:function(){return[a("div",[a("el-button",{on:{click:e.handleControlTaskCancel}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.saveTask}},[e._v("确定")])],1)]},proxy:!0}])},[a("main",{directives:[{name:"loading",rawName:"v-loading",value:e.pageLoading,expression:"pageLoading"}],staticClass:"control-task-main"},[a("div",{staticClass:"task-container"},[e.showStepComponent(e.formTask.type,"task")?a("control-task",{ref:"task",on:{change:e.handleTypeChange,identify:e.handleIdentifyChange},model:{value:e.formTask,callback:function(t){e.formTask=t},expression:"formTask"}}):e._e()],1),a("div",{staticClass:"alarm-rule-container"},[a("alarm-rule",{directives:[{name:"show",rawName:"v-show",value:e.showStepComponent(e.cacheData.type,"rule"),expression:"showStepComponent(cacheData.type, 'rule')"}],ref:"rule",attrs:{data:e.ruleForm,type:e.cacheData.type}})],1),a("div",[e.showStepComponent(e.cacheData.type,"person")?a("control-transfer",{ref:"person",attrs:{type:"person",serviceName:"getPersonGroupList",params:e.personParams,threshold:e.cacheData.threshold,searchTitle:"请输入人员库名称",imageStore:this.imagePersonStore},model:{value:e.selectedPersonLists,callback:function(t){e.selectedPersonLists=t},expression:"selectedPersonLists"}}):e._e(),e.showStepComponent(e.cacheData.type,"car")?a("control-transfer",{ref:"car",attrs:{type:"car",params:e.carParams,imageStore:this.imageCarStore,serviceName:"getCarGroupList",threshold:e.cacheData.threshold,searchTitle:"请输入车辆库名称"},model:{value:e.selectedCarLists,callback:function(t){e.selectedCarLists=t},expression:"selectedCarLists"}}):e._e()],1),e.showStepComponent(e.cacheData.type,"property")?a("control-property",{ref:"property",attrs:{type:e.cacheData.type,threshold:e.cacheData.threshold,propertiesReceive:e.propertiesReceive}}):e._e(),e.showStepComponent(e.cacheData.type,"area")?a("control-area",{ref:"area",attrs:{identifyType:e.cacheData.identifyType,deviceTypeFlag:e.cacheData.deviceTypeFlag,controlTaskCode:e.cacheData.type,mode:e.cacheData.mode},model:{value:e.selectedDeviceList,callback:function(t){e.selectedDeviceList=t},expression:"selectedDeviceList"}}):e._e()],1)]),a("router-view")],1)},c=[],o=a("c973"),l=a.n(o),u=a("970b"),h=a.n(u),f=a("5bc3"),p=a.n(f),d=a("ed6d"),v=a.n(d),m=a("6b58"),y=a.n(m),g=a("36c6"),k=a.n(g),b=a("a34a"),T=a.n(b),D=a("9ab4"),C=a("60a3"),R=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("qz-form-wrap",{style:{width:"100%"},attrs:{title:"基本信息"}},[a("div",{staticClass:"form-cont"},[a("control-notice-dialog",{ref:"noticeDialog",attrs:{emailData:e.form.controlTaskNotifyForms},on:{confirm:e.handleNoticeConfirm}}),a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"110px"}},["GROUP_COMPARE"===e.form.type?a("div",{staticClass:"form-tip form-item-flex"},[a("span",[e._v(" 提示:")]),e._v("两位布控人员同行,发生报警。阈值越低,越容易触发报警 ")]):e._e(),a("div",{staticClass:"task-form-container"},[a("div",{staticClass:"task-form-item"},[a("div",{staticClass:"task-form-item-left"},[a("el-form-item",{staticClass:"form-item-flex",attrs:{label:"任务名称",prop:"name"}},[a("el-input",{staticClass:"w-320",attrs:{placeholder:"请输入任务名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),a("div",{staticClass:"task-form-item-right"},[a("el-form-item",{style:{height:"32px"},attrs:{label:"任务有效期",prop:"taskTime"}},[a("el-date-picker",{staticClass:"security-control-dialog-date-picker w-320",attrs:{clearable:"","default-time":e.defaultTime,"picker-options":e.pickerOptions,"value-format":"timestamp",type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right",disabled:e.form.isForver},on:{focus:e.datePickFoucs,change:e.dateTimeChange},model:{value:e.fe_taskTime,callback:function(t){e.fe_taskTime=t},expression:"fe_taskTime"}}),a("span",{style:{position:"relative",top:"2px",right:"-10px"}},[a("el-checkbox",{on:{change:e.taskDateChange},model:{value:e.form.isForver,callback:function(t){e.$set(e.form,"isForver",t)},expression:"form.isForver"}},[e._v("长期有效")])],1)],1)],1)]),a("div",{staticClass:"task-form-item"},[e.showFormItem.timeWeek(e.form.type)?a("div",{staticClass:"task-form-item-left"},[a("el-form-item",{attrs:{label:"每日布控时间",prop:"fe_weekTimes"}},[a("el-time-picker",{staticClass:"w-320",style:{width:"320px"},attrs:{"is-range":"","range-separator":"至","value-format":"HH:mm:ss","start-placeholder":"开始时间","end-placeholder":"结束时间",placeholder:"选择时间范围",editable:!1},on:{change:e.handleWeekTimeChange},model:{value:e.form.fe_weekTimes,callback:function(t){e.$set(e.form,"fe_weekTimes",t)},expression:"form.fe_weekTimes"}})],1)],1):e._e(),e.showFormItem.timeWeek(e.form.type)?a("div",{staticClass:"task-form-item-right"},[a("el-form-item",{staticClass:"weeks-form-item",attrs:{label:"任务周期",required:""}},[a("el-select",{staticClass:"cascader-select-second",attrs:{clearable:"",multiple:""},on:{change:e.handleWeekdayChange},model:{value:e.weekdaysView,callback:function(t){e.weekdaysView=t},expression:"weekdaysView"}},e._l(e.weeks,(function(e){return a("el-option",{key:e.value,attrs:{value:e.value,label:e.label}})})),1),e.weekdaysRequired?a("div",{staticClass:"form-item-error weekdays-error"},[e._v(" 请选择任务周期 ")]):e._e()],1)],1):e._e()]),a("div",[a("div",[e.showFormItem.intervalTime(e.form.type)?a("el-form-item",{staticClass:"form-item-flex",attrs:{label:"间隔时间"}},[a("el-slider",{staticClass:"slider-cmp",attrs:{step:1,min:1,max:10},model:{value:e.form.intervalTime,callback:function(t){e.$set(e.form,"intervalTime","string"===typeof t?t.trim():t)},expression:"form.intervalTime"}}),a("span",{staticClass:"slider-number"},[a("el-input-number",{attrs:{min:1,"step-strictly":"",step:1,max:10,label:"请输入间隔时间"},model:{value:e.form.intervalTime,callback:function(t){e.$set(e.form,"intervalTime",t)},expression:"form.intervalTime"}})],1)],1):e._e()],1)]),a("div",[a("div",[a("el-form-item",{staticClass:"form-item-flex form-item-alarm",style:{height:"32px"},attrs:{label:"报警等级",prop:"alarmLevel"}},[a("el-radio-group",{model:{value:e.form.alarmLevel,callback:function(t){e.$set(e.form,"alarmLevel",t)},expression:"form.alarmLevel"}},e._l(e.alarmLevelTypes,(function(t,i){return a("el-radio",{key:i,attrs:{value:t.level,label:t.level,size:"small"}},[e._v(" "+e._s(t.name))])})),1),0===e.alarmLevelTypes.length?a("el-input",{staticClass:"w-320",attrs:{placeholder:"无报警等级信息",disabled:!0}}):e._e(),a("div",{staticClass:"alert-message"},[e._v("提示:报警等级对应规则请在预警规则中查看")]),a("el-link",{staticClass:"slider-number aletr-information",style:{position:"relative",top:"-5px",right:"0px"},attrs:{type:"primary"},on:{click:e.openNoticeDialog}},[e._v("设置通知人")])],1)],1)]),a("div",[a("div",[a("el-form-item",{staticClass:"form-item-flex form-item-alarm",style:{height:"32px"},attrs:{label:"声光报警",prop:"soundLightAlarm"}},[a("SoundLight",{attrs:{alarmDevices:e.form.alarmDevices},on:{chooseChannel:e.handleChooseChannel},model:{value:e.form.alarmUseFlag,callback:function(t){e.$set(e.form,"alarmUseFlag",t)},expression:"form.alarmUseFlag"}})],1)],1)])])])],1)])},O=[],L=a("2890"),S=a("9523"),E=a.n(S);(function(e){e["BLACK_LIST"]="BLACK_LIST",e["STRANGER"]="STRANGER",e["FREQUENT_STRANGER"]="FREQUENT_STRANGER",e["GROUP_COMPARE"]="GROUP_COMPARE",e["DEVICE_ROI"]="DEVICE_ROI",e["GATHER"]="GATHER",e["FACE_PROPERTIES"]="FACE_PROPERTIES",e["BODY_PROPERTIES"]="BODY_PROPERTIES",e["PLATE"]="PLATE",e["OTHER"]="OTHER",e["NON_VEHICLE"]="NON_VEHICLE",e["HELMENT"]="HELMENT",e["BATTERY_VEHICLE"]="BATTERY_VEHICLE",e["THREE_LEVEL_CONTROL"]="THREE_LEVEL_CONTROL",e["FIRE"]="FIRE",e["SMOKING"]="SMOKING",e["VEHICLE_BLOCKED"]="VEHICLE_BLOCKED",e["VEHICLE_ILLEGAL_PARK"]="VEHICLE_ILLEGAL_PARK"})(r||(r={})),function(e){e["TASK"]="task",e["PERSON"]="person",e["CAR"]="car",e["AREA"]="area",e["ROI"]="roi",e["RULE"]="rule",e["PROPERTY"]="property"}(n||(n={}));var I=[n.TASK,n.PERSON,n.AREA],w={person:{name:"布控人员",codes:[r.BLACK_LIST,r.STRANGER,r.FREQUENT_STRANGER,r.GROUP_COMPARE,r.OTHER]},car:{name:"布控车辆",codes:[r.PLATE]},area:{name:"选择点位",codes:[r.BLACK_LIST,r.STRANGER,r.FREQUENT_STRANGER,r.GROUP_COMPARE,r.DEVICE_ROI,r.NON_VEHICLE,r.GATHER,r.FACE_PROPERTIES,r.BODY_PROPERTIES,r.PLATE,r.OTHER,r.HELMENT,r.BATTERY_VEHICLE,r.FIRE,r.SMOKING,r.VEHICLE_BLOCKED,r.VEHICLE_ILLEGAL_PARK]},rule:{name:"报警规则",codes:[r.FREQUENT_STRANGER,r.GATHER]},property:{name:"布控属性",codes:[r.FACE_PROPERTIES,r.BODY_PROPERTIES]},task:{name:"布控任务",codes:[r.BLACK_LIST,r.STRANGER,r.FREQUENT_STRANGER,r.GROUP_COMPARE,r.DEVICE_ROI,r.NON_VEHICLE,r.GATHER,r.FACE_PROPERTIES,r.BODY_PROPERTIES,r.PLATE,r.OTHER,r.HELMENT,r.BATTERY_VEHICLE,r.FIRE,r.SMOKING,r.VEHICLE_BLOCKED,r.VEHICLE_ILLEGAL_PARK]}},x={threshold:function(e){return e!==r.GATHER&&e!==r.DEVICE_ROI&&e!==r.NON_VEHICLE},thresholdNum:function(e){return e===r.GATHER},frequency:function(e){return e===r.FREQUENT_STRANGER},intervalTime:function(e){return e===r.GROUP_COMPARE},identifyType:function(e){return e===r.BLACK_LIST||e===r.STRANGER||e&&-1===Object.keys(r).indexOf(e)},mode:function(e){return e===r.BLACK_LIST||e===r.STRANGER||e&&-1===Object.keys(r).indexOf(e)},timeWeek:function(e){return e!==r.FREQUENT_STRANGER},personProperty:function(e){return e===r.BODY_PROPERTIES||e===r.FACE_PROPERTIES},alarmLight:function(e){return!0}};i={},E()(i,r.FACE_PROPERTIES,"faceProperties"),E()(i,r.BODY_PROPERTIES,"bodyProperties");function _(e){var t=N();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function N(){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){v()(a,e);var t=_(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.alarmLevelTypes=[],e.emailMessagerList=[],e}return p()(a,[{key:"created",value:function(){var e=l()(T.a.mark((function e(){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.initRecordLevelList();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"initRecordLevelList",value:function(){var e=this;this.service.getRecordLevelList().then((function(t){t.success?(e.alarmLevelTypes=t.data,e.alarmLevelTypes=[{level:1,name:"一级"},{level:2,name:"二级"},{level:3,name:"三级"},{level:4,name:"四级"},{level:5,name:"五级"}]):(e.alarmLevelTypes=[],e.$message.error(t.message))}))}},{key:"fetchEmailList",value:function(){var e=this;this.service.getHumanList().then((function(t){t.success&&(e.emailMessagerList=t.data)}))}}]),a}(C["g"]);F=D["a"]([C["a"]],F);var P=F,A=a("2fe1"),j=a("e33d"),$=a("93f3"),B=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"slider-container"},[a("el-input-number",{staticClass:"input-number-style",attrs:{step:e.Opts["step"],min:e.Opts["min"],"step-strictly":"",max:99,label:"请输入报警阈值"},model:{value:e.thresholdReal,callback:function(t){e.thresholdReal=t},expression:"thresholdReal"}}),a("span",{staticClass:"slider-front"},[a("span",{staticClass:"thresholdMax-text"},[e._v("0")]),a("el-slider",{staticClass:"slider-bar",attrs:{step:e.Opts["step"],min:e.Opts["min"],max:99,"format-tooltip":e.formatTooltip},model:{value:e.thresholdRecord,callback:function(t){e.thresholdRecord=t},expression:"thresholdRecord"}}),a("span",{staticClass:"thresholdMin-text"},[e._v("99")])],1)],1),"FACE_PROPERTIES"!==e.type&&"BODY_PROPERTIES"!==e.type?a("div",{staticClass:"threshold-alert-message"},[e._v("提示:相似度"+e._s("BLACK_LIST"===e.type||"FREQUENT_STRANGER"===e.type?"小于":"大于")+"此阈值即触发预警")]):e._e()])},V=[];function M(e){var t=q();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function q(){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){v()(a,e);var t=M(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.thresholdRecord=20,e}return p()(a,[{key:"thresholdReceiveChange",value:function(e){this.thresholdRecord=e}},{key:"thresholdChange",value:function(){this.$emit("thresholdChange",this.thresholdRecord)}},{key:"thresholdReal",get:function(){return this.thresholdReceive},set:function(e){this.thresholdRecord=e}},{key:"Opts",get:function(){var e={min:0,step:1};return"GROUP_COMPARE"===this.type&&(e={min:10,step:10}),e}},{key:"formatTooltip",value:function(e){return 100===e?"0":e}}]),a}(C["g"]);D["a"]([Object(C["e"])({default:""})],H.prototype,"type",void 0),D["a"]([Object(C["d"])("thresholdChange",{default:80})],H.prototype,"thresholdReceive",void 0),D["a"]([Object(C["h"])("thresholdReceive",{immediate:!0})],H.prototype,"thresholdReceiveChange",null),D["a"]([Object(C["h"])("thresholdRecord")],H.prototype,"thresholdChange",null),H=D["a"]([Object(C["a"])({})],H);var G=H,K=G,U=(a("d6b4"),a("2877")),z=Object(U["a"])(K,B,V,!1,null,null,null),W=z.exports,J=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{style:{width:"500px"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.alarmUseFlag,callback:function(t){e.alarmUseFlag=t},expression:"alarmUseFlag"}}),e.alarmUseFlag?a("div",{staticClass:"mqtt-container"},[a("div",{staticClass:"item"},[a("div",{staticClass:"item-label"},[e._v("请选择MQTT设备:")]),a("el-select",{attrs:{clearable:"",placeholder:"请选择MQTT设备"},model:{value:e.device,callback:function(t){e.device=t},expression:"device"}},e._l(e.deviceList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.deviceName,value:e.deviceId}})})),1),a("el-popover",{attrs:{placement:"right",title:"操作说明","popper-class":"operating-instruct-container",width:"334",trigger:"click"}},[a("div",{staticClass:"step-title"},[e._v("步骤1【网络继电器添加】")]),a("div",{staticClass:"step-content"},[e._v("在设备管理添加网络继电器,详细添加方法见设备管理用户操作手册。")]),a("div",{staticClass:"step-title"},[e._v("步骤2【施工接线】")]),a("div",{staticClass:"step-content"},[e._v("将网络继电器连接电源,将声光报警器的报警声音线和蜂鸣线接入网络继电器的输出通道,接入NO口,声光报警器供电线接入COM口,确保螺丝拧紧。")]),a("div",{staticClass:"step-title"},[e._v("步骤3【选择继电器及通道】")]),a("div",{staticClass:"step-content"},[e._v("选择已接入的网络继电器,然后选择2步骤中已连接的通道。")]),a("div",{staticClass:"step-title"},[e._v("步骤4【报警输出调试】")]),a("div",{staticClass:"step-content"},[e._v("请在选择报警通道后点击调试按钮,观察对应通道的声光报警器是否正常报警,包括报警灯闪烁及发出蜂鸣音。若测试不成功,请检查连线及MQTT网络连接状态。")]),a("div",{staticClass:"button-after",attrs:{slot:"reference"},slot:"reference"},[a("i",{staticClass:"el-icon-info icon"}),a("el-button",{attrs:{type:"text"}},[e._v("查看操作声明")])],1)])],1),a("div",{staticClass:"driver"}),a("Chanel",{attrs:{subscribeTopic:e.subscribeTopic},on:{change:e.handleChanelChange},model:{value:e.channelParams[0],callback:function(t){e.$set(e.channelParams,0,t)},expression:"channelParams[0]"}}),a("Chanel",{attrs:{subscribeTopic:e.subscribeTopic},on:{change:e.handleChanelChange},model:{value:e.channelParams[1],callback:function(t){e.$set(e.channelParams,1,t)},expression:"channelParams[1]"}}),a("Chanel",{attrs:{subscribeTopic:e.subscribeTopic},on:{change:e.handleChanelChange},model:{value:e.channelParams[2],callback:function(t){e.$set(e.channelParams,2,t)},expression:"channelParams[2]"}}),a("Chanel",{attrs:{subscribeTopic:e.subscribeTopic},on:{change:e.handleChanelChange},model:{value:e.channelParams[3],callback:function(t){e.$set(e.channelParams,3,t)},expression:"channelParams[3]"}})],1):e._e()],1)},Q=[],Y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"item"},[a("div",{staticClass:"item-label"},[e._v("通道"+e._s(e.value.channelNum)+"")]),a("el-select",{attrs:{disabled:!e.value.deviceId,placeholder:"请选择"},model:{value:e.isConnect,callback:function(t){e.isConnect=t},expression:"isConnect"}},[a("el-option",{attrs:{label:"未连接",value:"0"}}),a("el-option",{attrs:{label:"已连接",value:"1"}})],1),a("el-button",{staticClass:"button-after",attrs:{type:"text",disabled:"0"===e.isConnect},on:{click:e.testDeviceChannel}},[e._v("调试")]),a("el-popover",{attrs:{placement:"right",title:"自定义设置",width:"280","popper-class":"control-soundLight-setting"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("div",{staticClass:"setting-container"},[a("qz-form",{ref:"formRef",attrs:{form:e.form,width:"180px","label-width":"130px",footer:!1,rows:e.rows},scopedSlots:e._u([{key:"intervalTimeTemp",fn:function(){return[a("span",{staticClass:"text"},[e._v("秒")]),a("el-button",{style:{marginLeft:"24px"},attrs:{type:"text"},on:{click:e.handleReset}},[e._v("重置")])]},proxy:!0}])}),a("span",{staticClass:"text"},[e._v("秒")]),a("el-button",{style:{marginLeft:"24px"},attrs:{type:"text"},on:{click:e.handleReset}},[e._v("重置")])],1),a("div",{staticClass:"time-scope"},[e._v("可输入时长范围:1-99999")]),a("div",{staticClass:"action-container"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleCancle}},[e._v("取消")]),a("el-button",{attrs:{size:"mini"},on:{click:e.handleSave}},[e._v("保存")])],1),a("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("自定义设置")])],1)],1)},X=[];function Z(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function ee(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(a),!0).forEach((function(t){E()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Z(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function te(e){var t=ae();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function ae(){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 ie=function(e){v()(a,e);var t=te(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.form={intervalTimeTemp:5},e.rows={intervalTimeTemp:{label:"报警持续时长:",valid:{validator:function(e,t,a){if(!t||t<1||t>99999||isNaN(t)||t%1!==0)return a(new Error("输入错误"));a()}}}},e.visible=!1,e.isConnect="0",e.intervalTime=5,e}return p()(a,[{key:"isConnectWatch",value:function(e){this.$emit("change",ee(ee({},this.value),{},{intervalTime:this.intervalTime,isConnect:this.isConnect}))}},{key:"valueWatch",value:function(e){var t=this.value,a=t.intervalTime,i=t.isConnect;this.isConnect=i,this.form.intervalTimeTemp=a,this.intervalTime=a}},{key:"handleCancle",value:function(){this.visible=!1}},{key:"handleSave",value:function(){var e=l()(T.a.mark((function e(){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.formRef.validate();case 2:this.intervalTime=this.form.intervalTimeTemp,this.$emit("change",ee(ee({},this.value),{},{intervalTime:this.intervalTime,isConnect:this.isConnect})),this.visible=!1;case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"handleReset",value:function(){this.form.intervalTimeTemp=5,this.intervalTime=5}},{key:"handleChange",value:function(){}},{key:"testDeviceChannel",value:function(){var e=l()(T.a.mark((function e(){var t;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,this.value.topic){e.next=4;break}return this.$message.warning("请先选择设备"),e.abrupt("return");case 4:return t={channelNum:this.value.channelNum,intervalTime:this.intervalTime,subscribeTopic:this.value.topic},e.next=7,this.service.occurSoundLight(t);case 7:this.$message.success("指令已下发,请查看声光报警器是否报警"),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](0);case 12:case"end":return e.stop()}}),e,this,[[0,10]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"created",value:function(){}}]),a}(C["g"]);D["a"]([Object(C["f"])()],ie.prototype,"formRef",void 0),D["a"]([Object(C["e"])({required:!1,type:Object})],ie.prototype,"value",void 0),D["a"]([Object(C["e"])({required:!1,type:String})],ie.prototype,"subscribeTopic",void 0),D["a"]([Object(C["h"])("isConnect")],ie.prototype,"isConnectWatch",null),D["a"]([Object(C["h"])("value",{deep:!0,immediate:!0})],ie.prototype,"valueWatch",null),ie=D["a"]([Object(C["a"])({})],ie);var re=ie,ne=re,se=(a("97dc"),Object(U["a"])(ne,Y,X,!1,null,null,null)),ce=se.exports;function oe(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function le(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(a),!0).forEach((function(t){E()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):oe(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function ue(e){var t=he();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function he(){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 fe=function(e){v()(a,e);var t=ue(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.initFlag=!0,e.alarmUseFlag=0,e.device="",e.visible=!1,e.subscribeTopic="",e.channelParams=[{deviceId:e.device,realDeviceId:"",topic:"",channelNum:1,intervalTime:5,isConnect:"0"},{deviceId:"",realDeviceId:"",topic:"",channelNum:2,intervalTime:5,isConnect:"0"},{deviceId:"",realDeviceId:"",topic:"",channelNum:3,intervalTime:5,isConnect:"0"},{deviceId:"",realDeviceId:"",topic:"",channelNum:4,intervalTime:5,isConnect:"0"}],e.deviceList=[],e}return p()(a,[{key:"deviceWatcher",value:function(e){e?(this.channelParams.forEach((function(t){t.deviceId=e})),this.getSubscribeTopic()):this.channelParams=[{deviceId:"",realDeviceId:"",topic:"",channelNum:1,intervalTime:5,isConnect:"0"},{deviceId:"",realDeviceId:"",topic:"",channelNum:2,intervalTime:5,isConnect:"0"},{deviceId:"",realDeviceId:"",topic:"",channelNum:3,intervalTime:5,isConnect:"0"},{deviceId:"",realDeviceId:"",topic:"",channelNum:4,intervalTime:5,isConnect:"0"}]}},{key:"deviceListWatcher",value:function(){this.getSubscribeTopic()}},{key:"channelParamsChange",value:function(e){this.$emit("chooseChannel",this.chooseChannel)}},{key:"valueChange",value:function(e){this.alarmUseFlag=e}},{key:"alarmUseFlagChange",value:function(e){this.$emit("input",e)}},{key:"alarmDevicesChange",value:function(e){this.initChanelParam(e)}},{key:"initChanelParam",value:function(e){if(e.length>0&&this.initFlag){this.device=e[0].deviceId;for(var t=JSON.parse(JSON.stringify(this.channelParams)),a=0;a<e.length;a++){for(var i=0;i<t.length;i++)if(t[i].channelNum===e[a].channelNum){var r=e[a],n=r.deviceId,s=r.realDeviceId,c=r.topic,o=r.channelNum,l=r.intervalTime;this.$set(t,i,{deviceId:n,realDeviceId:s,topic:c,channelNum:o,intervalTime:l,isConnect:"1"})}else{var u=e[a],h=u.deviceId,f=u.realDeviceId,p=u.topic;this.$set(t,i,le(le({},t[i]),{},{deviceId:h,realDeviceId:f,topic:p,isConnect:"0"}))}this.channelParams=t,this.initFlag=!1}this.$forceUpdate()}}},{key:"chooseChannel",get:function(){var e=this;return this.channelParams.filter((function(e){return"1"===e.isConnect})).map((function(t){return{deviceId:e.device,realDeviceId:t.realDeviceId,topic:t.topic,channelNum:t.channelNum,intervalTime:t.intervalTime}}))}},{key:"handleChanelChange",value:function(e){var t=e.channelNum;this.$set(this.channelParams,t-1,e)}},{key:"fetchDevice",value:function(){var e=l()(T.a.mark((function e(){var t,a;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.service.getSoundLightDevice({deviceTypeCode:"mqtt"});case 3:t=e.sent,a=t.data,this.deviceList=a.devices,e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"getSubscribeTopic",value:function(){var e=this,t=this.deviceList.filter((function(t){return t.deviceId===e.device}));this.subscribeTopic=t[0]&&t[0].subscribeTopic,this.channelParams.forEach((function(t){t.topic=e.subscribeTopic}))}},{key:"created",value:function(){var e=l()(T.a.mark((function e(){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.fetchDevice();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),a}(C["g"]);D["a"]([Object(C["e"])({required:!0,type:Number})],fe.prototype,"value",void 0),D["a"]([Object(C["e"])({required:!0,type:Array})],fe.prototype,"alarmDevices",void 0),D["a"]([Object(C["h"])("device")],fe.prototype,"deviceWatcher",null),D["a"]([Object(C["h"])("deviceList")],fe.prototype,"deviceListWatcher",null),D["a"]([Object(C["h"])("channelParams",{deep:!0})],fe.prototype,"channelParamsChange",null),D["a"]([Object(C["h"])("value")],fe.prototype,"valueChange",null),D["a"]([Object(C["h"])("alarmUseFlag")],fe.prototype,"alarmUseFlagChange",null),D["a"]([Object(C["h"])("alarmDevices")],fe.prototype,"alarmDevicesChange",null),fe=D["a"]([Object(C["a"])({components:{Chanel:ce}})],fe);var pe=fe,de=pe,ve=(a("454e"),Object(U["a"])(de,J,Q,!1,null,null,null)),me=ve.exports;function ye(e){var t=ge();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function ge(){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 ke=function(e){v()(a,e);var t=ye(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.showFormItem=x,e.weekdaysView=["0","1","2","3","4","5","6"],e.fe_taskTime="",e.defaultTime=[],e.weekdaysRequired=!1,e.weeks=$["d"],e.isTaskForver=!1,e.recordStartTime=Date.now(),e.recordEndTime=Date.now()+100,e.pickerOptions={disabledDate:function(e){return e.getTime()+864e5<=Date.now()},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)}},{text:"永久",onClick:function(t){e.setForver(t)}}]},e.form={name:"",weekdays:"1111111",fe_weekTimes:["00:00:00","23:59:59"],weekStartTime:"",weekEndTime:"",taskStartTime:"",taskEndTime:"",status:"0",operator:"",type:"",intervalTime:3,alarmLevel:1,description:"",taskTimeType:"",isForver:!0,taskTime:"",alarmDevices:[],alarmUseFlag:0},e.rules={name:[{required:!0,message:"请输入任务名称",trigger:"blur"},{min:1,max:32,message:"长度在 1 到 32 个字符",trigger:"blur"}],alarmLevel:[{required:!0,message:"请选择报警等级",trigger:"change"}],type:[{required:!0,message:"请选择布控类型",trigger:"change"}],fe_weekTimes:[{required:!0,message:"请选择每日布控时间",trigger:"change"}],deviceIdTemps:[{required:!0,message:"请选择设备",trigger:"blur"}],alarmDevice:[{required:!0,message:"请选择布控设备",trigger:"change"}],taskTime:[{required:!0,validator:e.validatorDate,trigger:["change","blur"]}]},e.isFirstMount=!0,e}return p()(a,[{key:"setForver",value:function(e){this.form.taskTime="",this.fe_taskTime="",this.form.isForver=!0,this.form.taskStartTime="",this.form.taskEndTime="",this.form.taskTimeType="FOREVER",e.$emit("pick",[])}},{key:"validatorDate",value:function(e,t,a){"FOREVER"===this.form.taskTimeType||"RANGE"===this.form.taskTimeType&&this.form.taskStartTime&&this.form.taskEndTime?a():a(new Error("请选择任务有效日期"))}},{key:"validateProperty",value:function(){this.$refs["form"]&&this.$refs["form"].validateField("properties")}},{key:"addFormTypeChangeListener",value:function(e){this.$emit("change",e)}},{key:"addValueChangeListener",value:function(){var e=l()(T.a.mark((function e(t){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t){e.next=6;break}return this.form=JSON.parse(JSON.stringify(t)),"FOREVER"===this.form.taskTimeType?this.$set(this.form,"isForver",!0):this.$set(this.form,"isForver",!1),e.next=6,this.initFormData();case 6:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"created",value:function(){var e=l()(T.a.mark((function e(){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.form.id||(this.form.operator=this.$store.state.user.userInfo.loginName);case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"initFormData",value:function(){var e=l()(T.a.mark((function e(){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.form.taskStartTime&&this.form.taskEndTime&&(this.form.taskTime=[this.form.taskStartTime||"",this.form.taskEndTime||""],this.fe_taskTime=[this.form.taskStartTime||"",this.form.taskEndTime||""]),this.initWeeks();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"initTaskTime",value:function(){"FOREVER"===this.form.taskTimeType?(this.form.taskStartTime=null,this.form.taskEndTime=null,this.form.taskTime=""):this.form.taskTime=[this.form.taskStartTime,this.form.taskEndTime]}},{key:"taskDateChange",value:function(e){e&&!0===e?(this.form.taskTimeType="FOREVER",this.form.taskStartTime="",this.form.taskEndTime="",this.form.taskTime="",this.fe_taskTime=""):this.form.taskTimeType="RANGE"}},{key:"initWeeks",value:function(){var e=this.form.weekdays,t=e&&e.split(""),a=[];t&&!t.length||!t||(t&&t.forEach((function(e,t){"1"===e&&a.push(t+"")})),this.weekdaysView=a)}},{key:"shortcutDateTime",value:function(e,t){var a=Object(j["localDateStr"])(),i=new Date(a+" 00:00:00"),r=Object(j["localDateStr"])(+new Date+24*t*3600*1e3),n=new Date(r+" 23:59:59");1===t&&(n=new Date(r+" 23:59:59")),e.$emit("pick",[i,n])}},{key:"handleWeekTimeChange",value:function(e){e&&e.length?(this.form.weekStartTime=e[0],this.form.weekEndTime=e[1]):(this.form.weekStartTime="",this.form.weekEndTime="")}},{key:"handleWeekdayChange",value:function(e){this.weekdaysRequired=!1;var t=[0,0,0,0,0,0,0];e&&e.forEach((function(e){for(var a=Number(e),i=0;i<t.length;i++)a===i&&(t[i]=1)})),this.form.weekdays=t.join(""),this.weekdaysView.length||(this.weekdaysRequired=!0)}},{key:"openNoticeDialog",value:function(){this.noticeDialog.open()}},{key:"datePickFoucs",value:function(){"FOREVER"===this.form.taskTimeType||this.form.id||(this.defaultTime=["00:00:00","23:59:59"])}},{key:"dateTimeChange",value:function(e){e&&e.length&&e[0]?(this.$set(this.form,"taskTimeType","RANGE"),this.form.isForver=!1,this.form.taskStartTime=e[0],this.form.taskEndTime=e[1]):(this.form.taskStartTime="",this.form.taskEndTime="",this.form.taskTime="")}},{key:"handleNoticeConfirm",value:function(e){this.form.controlTaskNotifyForms=e}},{key:"validate",value:function(){var e=this;return new Promise((function(t,a){e.taskForm.validate((function(a){a&&!e.weekdaysRequired?t(!0):t(!1)}))}))}},{key:"handleChooseChannel",value:function(e){this.form.alarmDevices=e}},{key:"mounted",value:function(){}}]),a}(Object(A["mixins"])(P));D["a"]([Object(C["f"])("configPropDialogRef")],ke.prototype,"configDialog",void 0),D["a"]([Object(C["f"])("noticeDialog")],ke.prototype,"noticeDialog",void 0),D["a"]([Object(C["f"])("form")],ke.prototype,"taskForm",void 0),D["a"]([Object(C["e"])({default:function(){},required:!0})],ke.prototype,"value",void 0),D["a"]([Object(C["h"])("form.type")],ke.prototype,"addFormTypeChangeListener",null),D["a"]([Object(C["h"])("value",{deep:!0,immediate:!0})],ke.prototype,"addValueChangeListener",null),ke=D["a"]([Object(C["a"])({components:{ControlNoticeDialog:L["a"],ThresholdeChoose:W,SoundLight:me}})],ke);var be=ke,Te=be,De=(a("f2df"),Object(U["a"])(Te,R,O,!1,null,null,null)),Ce=De.exports,Re=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("qz-form-wrap",{staticClass:"device-select-container",attrs:{title:"布控范围"}},[a("div",{staticClass:"control-area-component"},[a("div",{staticClass:"container"},[a("el-form",{ref:"addDeviceForm",attrs:{rules:e.fromRules,model:e.formData,"label-width":"110px"}},[e.showFormItem.mode(e.controlTaskCode)?a("el-form-item",{attrs:{label:"抓拍策略",prop:"mode",required:""}},[a("el-radio-group",{model:{value:e.formData.mode,callback:function(t){e.$set(e.formData,"mode",t)},expression:"formData.mode"}},[a("el-radio",{attrs:{label:0}},[e._v("质量优先")]),a("el-radio",{attrs:{label:1}},[e._v("实时优先")])],1)],1):e._e(),a("el-form-item",{attrs:{label:"布控范围",prop:"devices"}},[a("el-radio-group",{style:{marginBottom:"24px"},model:{value:e.deviceSelectRadio,callback:function(t){e.deviceSelectRadio=t},expression:"deviceSelectRadio"}},[a("el-radio-button",{attrs:{label:"0"}},[e._v("列表选点")]),a("el-radio-button",{attrs:{label:"1"}},[e._v("地图选点")])],1),"0"===e.deviceSelectRadio?a("qz-device-transfer",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],ref:"qzSelect",attrs:{"area-list":e.areaList,"device-list":e.deviceList,rightWidth:"450px",searchbar:!0,"custom-node":e.handleCustomNode,"active-area":e.activeAreaId,showTotal:!0,isROI:!0,deviceTypeOptions:e.deviceTypeOptions},on:{areaClick:e.handleAreaClick,roiClick:e.roiClick,areaSearch:e.handleAreaSearch,deviceSearch:e.handleDeviceSearch,change:e.devlceSelectChange},model:{value:e.deviceValue,callback:function(t){e.deviceValue=t},expression:"deviceValue"}}):a("map-device-selector",{attrs:{deviceList:e.deviceList,controlTaskCode:e.controlTaskCode},model:{value:e.deviceValue,callback:function(t){e.deviceValue=t},expression:"deviceValue"}}),e.isShowVaildMsg?a("span",{staticClass:"alertInfo"},[e._v("请选择布控设备")]):e._e(),a("control-roi",{ref:"roi",attrs:{devices:e.selectedDevice},on:{cancel:e.cancelRoi,change:e.roiChange},model:{value:e.selectedRoi,callback:function(t){e.selectedRoi=t},expression:"selectedRoi"}})],1)],1)],1)])])},Oe=[],Le=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dialogVisible?a("el-dialog",{attrs:{title:"设置ROI","close-on-click-modal":!1,visible:!0},on:{close:e.handleDialogClose}},[a("div",{staticClass:"control-roi-component"},[a("div",{staticClass:"container"},[a("div",{staticClass:"device-select"},[a("svg-icon",{attrs:{name:"zhuapai-online",color:"currentColor"}}),a("span",{staticClass:"deviceName-style"},[e._v(e._s(this.deviceOptions&&this.deviceOptions.length>0?this.deviceOptions[0].deviceName:""))])],1),e.showRoiPlayer&&e.dialogVisible?a("div",{staticClass:"roi-container"},[a("qz-roi",{attrs:{mode:"live",width:800,device:e.roiDevice,formComponent:e.formComponent,roiName:"围栏区域"},on:{select:e.roiChange},scopedSlots:e._u([{key:"player",fn:function(t){var i=t.stream;return[a("qz-player",{ref:"qzPlayer",attrs:{type:"live",mode:"live",devices:e.playerDeviceList,"player-server":e.playServer,"plugin-url":e.pluginUrl,"basic-config":e.playerConfig},on:{onStreamStatus:function(t){return e.onStreamStatus(t,i)}}})]}}],null,!1,3258902306),model:{value:e.roiData[e.deviceSelected],callback:function(t){e.$set(e.roiData,e.deviceSelected,t)},expression:"roiData[deviceSelected]"}})],1):e._e()])]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleDialogClose}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary",loading:e.isLoading},on:{click:e.handleDialogConfirm}},[e._v("确定")])],1)]):e._e()},Se=[],Ee=a("aea8"),Ie=a("fca5"),we=a.n(Ie),xe=a("5c96");function _e(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=Ne(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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,s=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){c=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(c)throw n}}}}function Ne(e,t){if(e){if("string"===typeof e)return Fe(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)?Fe(e,t):void 0}}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Pe(e){var t=Ae();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function Ae(){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 je=function(e){v()(a,e);var t=Pe(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.formComponent={button:xe["Button"],input:xe["Input"]},e.deviceOptions=[],e.deviceSelected="",e.isLoading=!1,e.dialogVisible=!1,e.roiData={},e.showRoiPlayer=!1,e.roiDevice={rtspUrl:"",deviceName:"",deviceCode:""},e.playerDeviceList=[],e.pluginUrl="./alarm-front/player/DCSPlugin-1.2.0.exe",e.playServer="",e.playServerSave="",e.playerConfig={row:1,cols:1,combines:{},autoPlay:!0,autofitView:!0},e.isShowVaildMsg=!1,e.isDcsDevice=!1,e}return p()(a,[{key:"onStreamStatus",value:function(e,t){t.listen(e,this.$refs.qzPlayer)}},{key:"devicesWatcher",value:function(e){var t,a=[],i=_e(this.devices);try{for(i.s();!(t=i.n()).done;){var r=t.value;r.channel&&r.channel.length>0?r.channel.forEach((function(e){a.push(e)})):a.push(r)}}catch(n){i.e(n)}finally{i.f()}this.deviceOptions=a}},{key:"handleDialogConfirm",value:function(){this.$emit("input",this.getFormatData()),this.$emit("change",this.getFormatData()),this.validate(),this.dialogVisible=!1}},{key:"handleDialogClose",value:function(){this.dialogVisible=!1,this.deviceOptions=[],this.$set(this.roiData,this.deviceSelected,[]),this.deviceSelected="",this.roiDevice={},this.$set(this,"roiData",{}),this.$emit("cancel")}},{key:"open",value:function(){var e=this;this.dialogVisible=!0,this.showRoiPlayer=!0,this.$nextTick((function(){e.changeDevice()}))}},{key:"selectDeviceObj",get:function(){var e=this,t=this.deviceOptions.find((function(t){return t.deviceId===e.deviceSelected}));return t||{}}},{key:"deviceSelectChange",value:function(){var e=this,t=this.deviceOptions.find((function(t){return t.deviceId===e.deviceSelected}));t&&(this.roiDevice={rtspUrl:t.cameraMainRtspUrl,deviceName:t.deviceName,deviceCode:t.deviceCode},this.playerDeviceList=[].concat({rtspUrl:t.cameraMainRtspUrl,dcs:0===t.fromDcm,playerServer:0===t.fromDcm?this.playServerSave:""}),this.playServer=0===t.fromDcm?this.playServerSave:"",t.cameraMainRtspUrl||this.$message.warning("当前设备暂无视频流地址,请选择其他设备进行绘制"))}},{key:"roiChange",value:function(){this.validate()}},{key:"backendTOdeviceValue",value:function(){if(0!==this.value.length){var e={};this.value.map((function(t){e[t.deviceId]||(e[t.deviceId]=[]),(t.roiList||[]).map((function(a){e[t.deviceId].push({deviceCode:t.deviceId,name:a.roiName,points:JSON.parse(a.roiCoordinate)})}))})),this.roiData=e}}},{key:"getFormatData",value:function(){var e=[];for(var t in this.roiData)e.push({deviceId:t,roiList:this.roiData[t].map((function(e){return{roiName:e.name,roiCoordinate:JSON.stringify(e.points)}}))});return e}},{key:"validate",value:function(){return!0}},{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.playServerSave="".concat(a.cameraUserName,":").concat(a.cameraPassword,"@").concat(a.cameraIp,":2015"):e.playServerSave=""}}))}},{key:"changeDevice",value:function(){var e=this;0!==this.deviceOptions.length&&(this.deviceOptions.map((function(t){e.$set(e.roiData,t.deviceId,[])})),this.deviceSelected=this.deviceOptions[0].deviceId,this.deviceSelectChange(),this.backendTOdeviceValue())}},{key:"created",value:function(){}},{key:"mounted",value:function(){var e=l()(T.a.mark((function e(){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.fetchDcsAccount();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),a}(C["g"]);D["a"]([Object(C["e"])({type:Array,default:function(){return[]}})],je.prototype,"devices",void 0),D["a"]([Object(C["e"])({type:Array,default:function(){return[]}})],je.prototype,"value",void 0),D["a"]([Object(C["h"])("devices",{immediate:!0,deep:!0})],je.prototype,"devicesWatcher",null),je=D["a"]([Object(C["a"])({components:{QzRoi:Ee["a"],QzPlayer:we.a}})],je);var $e=je,Be=$e,Ve=(a("fcb9a"),Object(U["a"])(Be,Le,Se,!1,null,null,null)),Me=Ve.exports,qe=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"map-DeviceSelect-container"},[a("qz-map",{ref:"mapRef",staticClass:"qz-map",attrs:{map:e.mapMode,points:e.devices,showFullscreenButton:!1,showSwitchAlarmButton:!1,mapInitinalOptions:e.mapProps.mapInitinalOptions,service:e.Server,showAll:!1,showPlayer:!1},on:{selection:e.handleSelection}}),a("draw-map",{on:{draw:e.handleDraw,clear:e.handleClear},model:{value:e.selectDevice,callback:function(t){e.selectDevice=t},expression:"selectDevice"}})],1)},He=[],Ge=a("103b"),Ke=a("f5ea"),Ue=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"draw-container"},[a("div",{staticClass:"actions"},[a("div",{staticClass:"action-item",on:{click:function(t){return e.handleClick(0)}}},[a("svg-icon",{staticClass:"icon",class:{active:0===e.activeIndex},attrs:{name:"rectan"}}),a("span",{staticClass:"text",class:{active:0===e.activeIndex}},[e._v("框选")])],1),a("div",{staticClass:"action-item",on:{click:function(t){return e.handleClick(1)}}},[a("svg-icon",{staticClass:"icon",class:{active:1===e.activeIndex},attrs:{name:"circle"}}),a("span",{staticClass:"text",class:{active:1===e.activeIndex}},[e._v("圆选")])],1),a("div",{staticClass:"action-item",on:{click:function(t){return e.handleClick(2)}}},[a("svg-icon",{staticClass:"icon",class:{active:2===e.activeIndex},attrs:{name:"polyline"}}),a("span",{staticClass:"text",class:{active:2===e.activeIndex}},[e._v("多边形")])],1),a("div",{staticClass:"action-item",on:{click:e.handleClear}},[a("svg-icon",{staticClass:"icon",attrs:{name:"clear"}}),a("span",{staticClass:"text"},[e._v("清除")])],1)]),e.checkDevicesOptions.length>0?a("div",{staticClass:"deviceList"},[a("div",{staticClass:"title"},[a("div",{staticClass:"pre"},[a("el-checkbox",{attrs:{indeterminate:e.checkDeviceIds.length>0&&e.checkDeviceIds.length<e.allDeviceIds.length},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}}),a("span",{staticClass:"label-text"},[e._v("已选摄像机("+e._s(e.value.length)+")")])],1)]),a("div",{staticClass:"device-container"},[a("el-tree",{ref:"deviceTree",attrs:{data:e.checkDevicesOptions,"show-checkbox":"","node-key":"deviceId","default-expanded-keys":[2,3],"default-expand-all":!0,"default-checked-keys":e.checkDeviceIds,props:e.defaultProps},on:{check:e.handleCheckChange}})],1)]):e._e()])},ze=[];function We(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function Je(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?We(Object(a),!0).forEach((function(t){E()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Qe(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=Ye(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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,s=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){c=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(c)throw n}}}}function Ye(e,t){if(e){if("string"===typeof e)return Xe(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)?Xe(e,t):void 0}}function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Ze(e){var t=et();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function et(){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 tt=function(e){v()(a,e);var t=Ze(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.checkDevicesOptions=[],e.checkedDevice=[],e.defaultProps={children:"channel",label:"deviceName"},e.checkDeviceIdsCache=[],e.checkAll=!1,e.activeIndex=-1,e}return p()(a,[{key:"checkDeviceIds",get:function(){var e=[];return this.value.forEach((function(t){if(t.channel){var a,i=Qe(t.channel);try{for(i.s();!(a=i.n()).done;){var r=a.value;e.push(r.deviceId)}}catch(n){i.e(n)}finally{i.f()}}else e.push(t.deviceId)})),e}},{key:"allDeviceIds",get:function(){var e=[];return this.checkDevicesOptions.forEach((function(t){if(t.channel){var a,i=Qe(t.channel);try{for(i.s();!(a=i.n()).done;){var r=a.value;e.push(r.deviceId)}}catch(n){i.e(n)}finally{i.f()}}else e.push(t.deviceId)})),e}},{key:"getDevicesByIds",get:function(){var e=this,t=[];return this.checkDeviceIdsCache.forEach((function(a){var i,r=Qe(e.checkDevicesOptions);try{for(r.s();!(i=r.n()).done;){var n=i.value;a===n.deviceId&&t.push(n)}}catch(s){r.e(s)}finally{r.f()}})),t}},{key:"checkDevicesOptionsWatcher",value:function(e){e.length===this.checkDeviceIds.length?this.checkAll=!0:this.checkAll=!1}},{key:"valueWatch",value:function(){var e=l()(T.a.mark((function e(t,a){var i=this;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.forEach((function(e){var t,a=!1,r=Qe(i.checkDevicesOptions);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n.deviceId===e.deviceId){a=!0;break}}}catch(s){r.e(s)}finally{r.f()}a||i.checkDevicesOptions.push(e)})),e.next=3,this.$nextTick();case 3:this.deviceTree.setCheckedKeys(this.checkDeviceIds),JSON.stringify(t)===JSON.stringify(this.checkDevicesOptions)&&(this.checkAll=!0);case 5:case"end":return e.stop()}}),e,this)})));function t(t,a){return e.apply(this,arguments)}return t}()},{key:"checkAllWatch",value:function(e){e?this.$emit("input",this.checkDevicesOptions):(this.deviceTree.setCheckedKeys([]),this.$emit("input",[]))}},{key:"reset",value:function(){this.checkAll=!1,this.checkDevicesOptions=[],this.$emit("clear",!1)}},{key:"handleRemove",value:function(e,t){var a=this.checkDevicesOptions[t].deviceId;this.checkDevicesOptions.splice(t,1);var i=this.checkDeviceIds.findIndex((function(e){return e===a}));i>-1&&this.checkDeviceIds.splice(i,1)}},{key:"handleClick",value:function(e){if(this.activeIndex===e)return this.activeIndex=-1,void this.emitValue();this.activeIndex=e,this.emitValue()}},{key:"handlePlay",value:function(){0!==this.checkedDevice.length?this.$emit("play",this.checkedDevice):this.$message.warning("请先选择设备!")}},{key:"handleClear",value:function(){this.checkAll=!1,this.activeIndex=-1,this.checkDevicesOptions=[],this.checkedDevice=[],this.$emit("clear")}},{key:"handleCheckBoxChange",value:function(e){this.$emit("input",this.getDevicesByIds)}},{key:"emitValue",value:function(){this.$emit("draw",this.activeIndex)}},{key:"handleCheckChange",value:function(e,t){var a=t.checkedKeys;this.deviceTree.setCheckedKeys(a);var i=this.getCheckDevicesByIds(a);this.$emit("input",i)}},{key:"getCheckDevicesByIds",value:function(e){var t=[];return this.checkDevicesOptions.forEach((function(a){if(e.includes(a.deviceId))t.push(a);else if(a.channel&&a.channel.length>0){var i=a.channel.filter((function(t){return e.includes(t.id)}));i.length>0&&t.push(Je(Je({},a),{},{channel:i}))}})),t}},{key:"mounted",value:function(){}}]),a}(C["g"]);D["a"]([Object(C["f"])()],tt.prototype,"deviceTree",void 0),D["a"]([Object(C["e"])({required:!0,type:Array})],tt.prototype,"value",void 0),D["a"]([Object(C["h"])("checkDevicesOptions")],tt.prototype,"checkDevicesOptionsWatcher",null),D["a"]([Object(C["h"])("value")],tt.prototype,"valueWatch",null),D["a"]([Object(C["h"])("checkAll")],tt.prototype,"checkAllWatch",null),tt=D["a"]([Object(C["a"])({components:{}})],tt);var at=tt,it=at,rt=(a("cb38"),Object(U["a"])(it,Ue,ze,!1,null,null,null)),nt=rt.exports;function st(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function ct(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?st(Object(a),!0).forEach((function(t){E()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):st(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function ot(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=lt(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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,s=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){c=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(c)throw n}}}}function lt(e,t){if(e){if("string"===typeof e)return ut(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)?ut(e,t):void 0}}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function ht(e){var t=ft();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function ft(){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 pt=function(e){v()(a,e);var t=ht(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.selectDevice=[],e.Server=Ge["a"],e.devices=[],e.mapProps={mapInitinalOptions:{zoom:6,clusterer:!0},locations:[]},e.checkDevicesOptions=[],e}return p()(a,[{key:"mapMode",get:function(){return"gis"}},{key:"selectDeviceWatch",value:function(e){this.$emit("input",e)}},{key:"handleSelection",value:function(e){var t=this;e.forEach((function(e){var a,i=!1,r=ot(t.selectDevice);try{for(r.s();!(a=r.n()).done;){var n=a.value;if(n.deviceId===e.deviceId){i=!0;break}}}catch(s){r.e(s)}finally{r.f()}i||t.selectDevice.push(e)}))}},{key:"fetchAllDevice",value:function(){var e=this;this.service.fetchDeviceList({controlTaskCode:this.controlTaskCode}).then((function(t){e.devices=(t.data.devices||[]).map((function(e){var t=!isNaN(e.longitude)&&Number(e.longitude),a=!isNaN(e.latitude)&&Number(e.latitude);return ct(ct({objectId:e.deviceName,lon:t,lat:a},e),{},{rtspUrl:e.cameraMainRtspUrl,status:+e.status,onlineStatus:+e.onlineStatus})}))}))}},{key:"handleClear",value:function(){this.clearDraw(),this.endDraw(),this.checkDevicesOptions=[],this.selectDevice=[]}},{key:"startDraw",value:function(e){return this.mapRef.startDraw(e)}},{key:"clearDraw",value:function(){return this.mapRef.clearDraw()}},{key:"endDraw",value:function(){return this.mapRef.endDraw()}},{key:"handleDraw",value:function(e){switch(e){case 3:this.clearDraw();break;case 2:this.startDraw("polygon");break;case 1:this.startDraw("circle");break;case 0:this.startDraw("rectangle");break;case-1:this.endDraw();break}}},{key:"created",value:function(){var e=l()(T.a.mark((function e(){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.fetchAllDevice();case 2:this.checkDevicesOptions=JSON.parse(JSON.stringify(this.value)),this.selectDevice=JSON.parse(JSON.stringify(this.value));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),a}(C["g"]);D["a"]([Object(C["f"])()],pt.prototype,"mapRef",void 0),D["a"]([Object(C["e"])({required:!0,type:Array})],pt.prototype,"value",void 0),D["a"]([Object(C["e"])({required:!0,type:String})],pt.prototype,"controlTaskCode",void 0),D["a"]([Object(C["h"])("selectDevice",{deep:!0})],pt.prototype,"selectDeviceWatch",null),pt=D["a"]([Object(C["a"])({components:{QzMap:Ke["a"],drawMap:nt}})],pt);var dt=pt,vt=dt,mt=(a("57de"),Object(U["a"])(vt,qe,He,!1,null,null,null)),yt=mt.exports;function gt(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function kt(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(a),!0).forEach((function(t){E()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):gt(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function bt(e){var t=Tt();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function Tt(){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 Dt=a("7545"),Ct=a("1e3f"),Rt=a("e223"),Ot=a("7a58"),Lt=a("dbab"),St=a("a53a"),Et=a("1d98"),It=a("739e"),wt=function(e){v()(a,e);var t=bt(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.selectedDevice=[],e.selectedRoi=[],e.isRoiShow=!1,e.deviceSelectRadio="0",e.fromRules={mode:[{required:!0,message:"请选择抓拍策略",trigger:["change"]}]},e.showFormItem=x,e.formData={mode:1},e.deviceTypeList={4:{onLine:Dt,offLine:Ct},5:{onLine:Lt,offLine:St},6:{onLine:Rt,offLine:Ot},8:{onLine:Et,offLine:It},7:{onLine:Rt,offLine:Ot}},e.areaListKeysRecord={},e.areaKeys={},e.deviceTypeOptions=[{label:"全部类型",value:"4"},{label:"后端设备",value:"0"},{label:"扬帆盒子",value:"1"},{label:"大眼睛",value:"2"},{label:"安全帽盒子",value:"3"}],e.areaList=[],e.areaListCopy=[],e.deviceList=[],e.deviceValue=[],e.activeAreaId="",e.isLoading=!1,e.isShowVaildMsg=!1,e.arrRecord={},e.tempListKeys=[],e.deviceListCopy=[],e.currentAreaId="",e}return p()(a,[{key:"modeChange",value:function(e){(e||0===e)&&(this.formData.mode=e)}},{key:"identifyTypeWatcher",value:function(e,t){e!==t&&(this.deviceValue=[])}},{key:"valueChange",value:function(e){e&&e.length>0&&(this.backendTOdeviceValue(),this.areaList&&0!==this.areaList.length?this.$set(this,"activeAreaId",this.value[0].areaId||""):this.fetchAreaTreeList())}},{key:"fetchAreaTreeList",value:function(e){var t=this;return new Promise((function(a,i){t.isLoading=!0;var r={};r.areaName=e||"",r.controlTaskCode=t.controlTaskCode,t.service.fetchAreaTreeList(r).then((function(e){t.isLoading=!1,e.success?(t.areaList=e.data||[],t.areaList&&t.areaList.length>0&&(t.areaList.forEach((function(e,a){e.online=e.onlineTotal,t.$set(t.areaList,a,kt({},e))})),t.areaList&&t.areaList.length>0&&t.value&&t.value.length>0&&t.$set(t,"activeAreaId",t.value[0].areaId||"")),t.areaListCopy=JSON.parse(JSON.stringify(t.areaList))||[],t.areaListKeys(t.areaList),t.tempListKeys=Object.keys(t.areaListKeysRecord)):t.$message.error(e.message),a(!0)}))}))}},{key:"roiChange",value:function(e){var t=this;this.deviceValue.forEach((function(e){e.deviceId!==t.selectedRoi[0].deviceId?e.channel&&e.channel.length>0&&e.channel.forEach((function(e){e.deviceId===t.selectedRoi[0].deviceId&&(e.roiList=t.selectedRoi[0].roiList)})):e.roiList=t.selectedRoi[0].roiList}))}},{key:"cancelRoi",value:function(){this.selectedDevice=[],this.selectedRoi=[]}},{key:"roiClick",value:function(e){this.selectedDevice=e?[].concat(e):[];var t={};t.deviceId=e.deviceId,t.roiList=e.roiList,this.selectedRoi=[].concat(t),this.roiRef.open(),this.isRoiShow=!0}},{key:"areaListKeys",value:function(e){var t=this;e.forEach((function(e){if(-1===Object.keys(t.areaListKeysRecord).indexOf(e.id)){t.areaListKeysRecord[e.id]=[];var a=[];e.children&&e.children.length>0&&e.children.forEach((function(e){-1===a.indexOf(e.id)&&a.push(e.id)})),t.areaListKeysRecord[e.id]=a,e.children&&e.children.length>0&&t.areaListKeys(e.children)}}))}},{key:"getParentAreaKeys",value:function(e){var t=this;e&&e.length>0&&e.forEach((function(e){-1===Object.keys(t.areaKeys).indexOf(e)&&(t.areaKeys[e]=[],t.tempListKeys.forEach((function(a){t.areaListKeysRecord[a].indexOf(e)>-1&&-1===t.areaKeys[e].indexOf(a)&&t.areaKeys[e].push(a)}))),t.areaListKeysRecord[e]&&t.areaListKeysRecord[e].length>0&&t.getParentAreaKeys(t.areaListKeysRecord[e])}))}},{key:"handleAreaClick",value:function(e){var t=this;this.currentAreaId=e.id||"";var a={areaId:e.id,controlTaskCode:this.controlTaskCode};return this.deviceList=[],new Promise((function(e,i){t.isLoading=!0,t.service.fetchDeviceList(a).then((function(a){t.isLoading=!1,a.success?(t.deviceList=a.data.devices||[],t.deviceList.length>0&&t.deviceList.forEach((function(e){e.channel&&e.channel.length>0?e.channel.forEach((function(e){e.disabled=!1})):e.disabled=!1})),t.deviceListCopy=JSON.parse(JSON.stringify(t.deviceList))):t.$message.error(a.message),e(!0)})).catch((function(){t.isLoading=!1}))}))}},{key:"devlceSelectChange",value:function(e){this.$emit("input",this.getFormatData()),this.isShowVaildMsg&&this.validSelectDevice()}},{key:"backendTOdeviceValue",value:function(){if(0!==this.value.length){var e=[];this.value.map((function(t){e.push(kt(kt({},t),{},{id:t.realDeviceId}))})),this.deviceValue=e}}},{key:"getFormatData",value:function(){var e=[];if(this.deviceValue&&this.deviceValue.length>0)return this.deviceValue.forEach((function(t){e.push({areaId:t.areaId,deviceName:t.deviceName,areaName:t.areaName,identifyType:t.identifyType,deviceTypeFlag:t.deviceTypeFlag,parentId:t.parentId,realDeviceId:t.realDeviceId,cameraMainRtspUrl:t.cameraMainRtspUrl,channel:t.channel,onlineStatus:t.onlineStatus,status:t.status,deviceTypeCategoryId:t.deviceTypeCategoryId,deviceCode:t.deviceCode,deviceId:t.deviceId,fromDcm:t.fromDcm,deviceTypeCode:t.deviceTypeCode,roiList:t.roiList||[]})})),e}},{key:"getSelectMode",value:function(){return this.formData.mode}},{key:"switchPicture",value:function(e){if(!this.deviceTypeList.hasOwnProperty(e.deviceTypeCategoryId)||!e.deviceTypeCategoryId)return"2"===e.onlineStatus?Dt:Ct;if("2"===e.onlineStatus)switch(e.deviceTypeCategoryId){case"4":return Dt;case"5":return Lt;case"6":return Rt;case"7":return Rt;case"8":return Et}else switch(e.deviceTypeCategoryId){case"4":return Ct;case"5":return St;case"6":return Ot;case"7":return Ot;case"8":return It}}},{key:"handleCustomNode",value:function(e,t,a){a.onlineStatus,0===a.identifyType&&a.channel,a.deviceTypeCategoryId;var i=this.switchPicture(a);return i&&""!==i?e("div",{class:"image-container"},[e("img",{attrs:{src:i}}),e("span",{class:"device-name-label"},[a.deviceName])]):e("div",[e("span",{domProps:{innerHTML:a.deviceName}})])}},{key:"filterRule2",value:function(e,t){var a=this;return e.filter((function(e,i){if(e.children&&e.children.length>0&&(e.children=a.filterRule2(e.children,t)),e.name.includes(t))return e.name.includes(t)}))}},{key:"handleAreaSearch",value:function(){var e=l()(T.a.mark((function e(t){return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:try{this.fetchAreaTreeList(t)}catch(a){}case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"handleDeviceSearch",value:function(){var e=l()(T.a.mark((function e(t,a){var i,r,n,s=this;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t){e.next=16;break}e.t0=t,e.next="1"===e.t0?4:"2"===e.t0?7:"0"===e.t0?10:"3"===e.t0?13:16;break;case 4:return i="1",r=0,e.abrupt("break",16);case 7:return i="2",r=0,e.abrupt("break",16);case 10:return i="0",r=1,e.abrupt("break",16);case 13:return i="3",r=1,e.abrupt("break",16);case 16:if(this.currentAreaId){e.next=20;break}this.$message.warning("请点选您要搜索的区域"),e.next=31;break;case 20:return e.prev=20,n={areaId:this.currentAreaId},i&&(n.deviceTypeFlag=i,n.identifyType=r),a&&(n.deviceName=a),n.controlTaskCode=this.controlTaskCode||"",this.deviceList=[],e.abrupt("return",new Promise((function(e,t){s.isLoading=!0,s.service.fetchDeviceList(n).then((function(t){s.isLoading=!1,s.deviceList=t.data.devices||[],s.deviceList.length>0&&s.deviceList.forEach((function(e){e.channel&&e.channel.length>0?e.channel.forEach((function(e){e.disabled=!1})):e.disabled=!1})),e(!0)})).catch((function(){s.isLoading=!1}))})));case 29:e.prev=29,e.t1=e["catch"](20);case 31:case"end":return e.stop()}}),e,this,[[20,29]])})));function t(t,a){return e.apply(this,arguments)}return t}()},{key:"validSelectDevice",value:function(){return this.isShowVaildMsg=0===this.deviceValue.length,this.isShowVaildMsg}},{key:"validate",value:function(){var e=this.validSelectDevice();return!e}},{key:"created",value:function(){}},{key:"mounted",value:function(){this.fetchAreaTreeList()}}]),a}(C["g"]);D["a"]([Object(C["f"])("roi")],wt.prototype,"roiRef",void 0),D["a"]([Object(C["e"])({type:Array,default:function(){return[]}})],wt.prototype,"value",void 0),D["a"]([Object(C["e"])({type:Boolean,default:!0})],wt.prototype,"isDeviceRequired",void 0),D["a"]([Object(C["e"])({type:Number,default:1})],wt.prototype,"identifyType",void 0),D["a"]([Object(C["e"])({type:String,default:""})],wt.prototype,"controlTaskCode",void 0),D["a"]([Object(C["e"])({type:Number,default:1})],wt.prototype,"mode",void 0),D["a"]([Object(C["h"])("mode")],wt.prototype,"modeChange",null),D["a"]([Object(C["f"])("qzSelect")],wt.prototype,"qzSelect",void 0),D["a"]([Object(C["h"])("identifyType",{deep:!0})],wt.prototype,"identifyTypeWatcher",null),D["a"]([Object(C["h"])("value",{deep:!0,immediate:!0})],wt.prototype,"valueChange",null),wt=D["a"]([Object(C["a"])({name:"ControlArea",components:{ControlRoi:Me,mapDeviceSelector:yt}})],wt);var xt=wt,_t=xt,Nt=(a("d43e"),Object(U["a"])(_t,Re,Oe,!1,null,null,null)),Ft=Nt.exports,Pt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"qz-steps-cont"},[e._l(e.opts,(function(t,i){return[a("QzStep",{key:i,attrs:{myStep:i+1,activeStep:e.curStep,opt:t}})]}))],2)},At=[],jt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"qz-step_cont",style:{"flex-basis":e.contStyle}},[a("div",{staticClass:"qz-step_head"},[a("div",{class:"qz-step_icon qz-step_icon-"+e.status},[e.myStep<e.activeStep?a("i",{staticClass:"el-icon-check"}):a("span",{},[e._v(e._s(e.myStep))])]),a("p",{class:"qz-step_title qz-step_title-"+e.status,attrs:{title:e.opt["title"]}},[e._v(e._s(e.opt["title"]))]),e.myStep<e.allStep?a("div",{class:"qz-step_line qz-step_line-"+e.status}):e._e()]),a("div",{class:"qz-step_desc qz-step_desc-"+e.status},[e._v(e._s(e.opt["desc"]))])])},$t=[];function Bt(e){var t=Vt();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function Vt(){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 Mt=["completed","active","undone"],qt=function(e){v()(a,e);var t=Bt(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.allStep=0,e}return p()(a,[{key:"status",get:function(){var e=this.myStep-this.activeStep,t=0===e?Mt[1]:e<0?Mt[0]:Mt[2];return t}},{key:"contStyle",get:function(){var e="auto";return this.allStep>1&&(e=(1/(this.allStep-1)*100).toFixed(2)),e+"%"}},{key:"created",value:function(){this.allStep=this.$parent.$props.opts.length}}]),a}(C["g"]);D["a"]([Object(C["e"])({default:1})],qt.prototype,"myStep",void 0),D["a"]([Object(C["e"])({default:1})],qt.prototype,"activeStep",void 0),D["a"]([Object(C["e"])({default:function(){return{}}})],qt.prototype,"opt",void 0),qt=D["a"]([Object(C["a"])({})],qt);var Ht=qt,Gt=Ht,Kt=(a("1751"),Object(U["a"])(Gt,jt,$t,!1,null,null,null)),Ut=Kt.exports;function zt(e){var t=Wt();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function Wt(){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 Jt=function(e){v()(a,e);var t=zt(a);function a(){return h()(this,a),t.apply(this,arguments)}return a}(C["g"]);D["a"]([Object(C["e"])({default:function(){return[]}})],Jt.prototype,"opts",void 0),D["a"]([Object(C["e"])({default:1})],Jt.prototype,"curStep",void 0),Jt=D["a"]([Object(C["a"])({components:{QzStep:Ut}})],Jt);var Qt=Jt,Yt=Qt,Xt=(a("7548"),Object(U["a"])(Yt,Pt,At,!1,null,null,null)),Zt=Xt.exports,ea={id:"",name:"",type:"",taskTimeType:"",taskStartTime:"",taskEndTime:"",weekdays:"",weekStartTime:"",weekEndTime:"",status:"",operator:"",description:"",alarmLevel:1,intervalTime:0,controlTaskNotifyForms:[],fe_weekTimes:[],isForver:!0,taskTime:"",alarmUseFlag:0,alarmDevices:[]},ta=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("qz-form-wrap",{staticClass:"rule-container",style:{width:"100%"},attrs:{title:"报警规则"}},["FREQUENT_STRANGER"===e.type?a("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-width":"110px"}},[a("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:"最近",required:""}},[a("div",{staticClass:"frequent-form-item"},[a("el-form-item",{attrs:{prop:"recentDays"}},[a("el-input-number",{staticStyle:{width:"132px"},attrs:{min:1,max:30,"controls-position":"right","step-strictly":"",clearable:""},model:{value:e.form.recentDays,callback:function(t){e.$set(e.form,"recentDays",t)},expression:"form.recentDays"}}),a("span",{staticClass:"days-label"},[e._v("天内,")])],1),a("div",{staticClass:"total-number-font"},[e._v("累计出现")]),a("el-form-item",{attrs:{prop:"appearanceTimes"}},[a("el-input-number",{staticStyle:{width:"132px"},attrs:{"controls-position":"right",min:0,"step-strictly":"",clearable:""},model:{value:e.form.appearanceTimes,callback:function(t){e.$set(e.form,"appearanceTimes",t)},expression:"form.appearanceTimes"}})],1),a("el-form-item",{staticClass:"appear-method-style",attrs:{prop:"appearanceMethod",required:""}},[a("el-select",{staticClass:"appear-method-content",attrs:{placeholder:""},model:{value:e.form.appearanceMethod,callback:function(t){e.$set(e.form,"appearanceMethod",t)},expression:"form.appearanceMethod"}},e._l(e.slelectMethods,(function(e){return a("el-option",{key:e.code,attrs:{label:e.name,value:e.code}})})),1)],1),a("div",{staticClass:"frequent-message"},[e._v(",视为频繁出没")])],1)])],1):e._e(),"GATHER"===e.type?a("el-form",{ref:"formGather",attrs:{rules:e.formRules,model:e.formRecord,"label-width":"110px"}},[a("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:" ",required:"",prop:"threshold"}},[a("span",{staticClass:"gather-alert-message"},[e._v("单布控区域内人数超过")]),a("el-input-number",{attrs:{min:0,"step-strictly":"",step:1,max:100,label:"请输入聚集人数阈值"},model:{value:e.formRecord.threshold,callback:function(t){e.$set(e.formRecord,"threshold",t)},expression:"formRecord.threshold"}}),a("span",{style:{"margin-left":"4px"}},[e._v(",视为人员异常聚集")])],1)],1):e._e()],1)},aa=[];function ia(e){var t=ra();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function ra(){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 na=function(e){v()(a,e);var t=ia(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.rules={recentDays:[{required:!0,message:"请选择时间",trigger:["blur","change"]}],appearanceTimes:[{required:!0,message:"请选择频次",trigger:"blur"}],appearanceMethod:[{required:!0,message:"请选择方式",trigger:"change"}]},e.formRecord={threshold:20},e.formRules={threshold:[{required:!0,message:"请选择聚集人数",trigger:["blur","change"]}]},e.form={recentDays:0,appearanceTimes:1,appearanceMethod:0},e.slelectMethods=[{code:0,name:"次"},{code:1,name:"天"}],e}return p()(a,[{key:"dataChange",value:function(e){e&&Object.keys(e).length>0&&("FREQUENT_STRANGER"===this.type?(this.$set(this.form,"recentDays",e.recentDays),this.$set(this.form,"appearanceTimes",e.appearanceTimes),this.$set(this.form,"appearanceMethod",e.appearanceMethod)):"GATHER"===this.type&&this.$set(this.formRecord,"threshold",e.threshold))}},{key:"validate",value:function(){var e=!1;return"FREQUENT_STRANGER"===this.type?this.formRef.validate((function(t){t&&(e=t)})):"GATHER"===this.type&&this.formGather.validate((function(t){t&&(e=t)})),e}}]),a}(C["g"]);D["a"]([Object(C["e"])({default:""})],na.prototype,"type",void 0),D["a"]([Object(C["f"])("form")],na.prototype,"formRef",void 0),D["a"]([Object(C["f"])("formGather")],na.prototype,"formGather",void 0),D["a"]([Object(C["e"])({default:function(){},type:Object})],na.prototype,"data",void 0),D["a"]([Object(C["h"])("data",{immediate:!0,deep:!0})],na.prototype,"dataChange",null),na=D["a"]([Object(C["a"])({})],na);var sa=na,ca=sa,oa=(a("5456"),Object(U["a"])(ca,ta,aa,!1,null,null,null)),la=oa.exports,ua=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"transferData-select-container"},[a("div",{staticClass:"left-panel"},[e._m(0),a("div",{staticClass:"pannel-data-container"},[a("div",{staticClass:"pannel-search-container"},[a("el-input",{staticClass:"pannel-search",attrs:{placeholder:e.searchTitle},on:{input:e.searchLeftData},model:{value:e.searchData,callback:function(t){e.searchData=t},expression:"searchData"}}),e.searchData?a("i",{staticClass:"el-icon-circle-close search-data-style",on:{click:e.clearSearchData}}):a("i",{staticClass:"el-icon-search search-data-style"})],1),e.leftListData&&e.leftListData.length>0?a("div",{staticClass:"left-data-container"},[a("el-checkbox-group",{on:{change:e.leftDataChange},model:{value:e.checkedLeftData,callback:function(t){e.checkedLeftData=t},expression:"checkedLeftData"}},[e._l(e.leftListData,(function(t){return[a("el-checkbox",{directives:[{name:"show",rawName:"v-show",value:t.isShow,expression:"item.isShow"}],key:t.name+t.id,attrs:{label:t.id,disabled:e.isDisabled(t)}},[e._v(e._s(t.name)+e._s(t.hasOwnProperty("personNum")?"("+t.personNum+")":"("+t.vehicleNum+")"))])]}))],2)],1):a("qz-no-data")],1),e.isShowVaildMsg?a("span",{staticClass:"alertInfo"},[e._v(e._s(this.serviceName&&"getPersonGroupList"===this.serviceName?"请选择人员库":"请选择车辆库"))]):e._e()]),a("div",{staticClass:"button-container"},[a("el-button",{class:["right-button",e.checkedRightData.length>0?"active-background":"lignt-background"],attrs:{icon:"el-icon-arrow-left",type:"primary"},on:{click:e.toLeft}}),a("el-button",{class:["left-button",e.checkedLeftData.length>0?"active-background":"lignt-background"],attrs:{icon:"el-icon-arrow-right",type:"primary"},on:{click:e.toRight}})],1),a("div",{staticClass:"right-panel"},[a("div",{staticClass:"pannel-title"},[a("el-checkbox",{staticClass:"right-select-all-button",attrs:{indeterminate:e.isIndeterminate},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")]),a("span",{staticClass:"number-selected"},[e._v(e._s(this.checkedRightData.length)+"/"+e._s(this.rightListData.length))])],1),a("div",{staticClass:"pannel-data-container"},[a("div",{staticClass:"right-data-container"},[e.rightListData&&e.rightListData.length>0?a("div",{staticClass:"right-hasData"},[a("el-checkbox-group",{on:{change:e.rightDataChange},model:{value:e.checkedRightData,callback:function(t){e.checkedRightData=t},expression:"checkedRightData"}},e._l(e.rightListData,(function(t){return a("el-checkbox",{key:t.id,attrs:{label:t.id}},[e._v(e._s(t.name)+e._s(t.hasOwnProperty("personNum")?"("+t.personNum+")":"("+t.vehicleNum+")"))])})),1)],1):a("qz-no-data")],1)])])])},ha=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pannel-title"},[a("span",{staticClass:"message-title left-title"},[e._v("待选")])])}],fa=a("448a"),pa=a.n(fa);function da(e){var t=va();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function va(){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 ma=function(e){v()(a,e);var t=da(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.searchData="",e.valueRecord=[],e.checkedRightData=[],e.checkedLeftData=[],e.data=[],e.isIndeterminate=!1,e.checkAll=!1,e.allListData=[],e.allListIds=[],e.leftListCopy=[],e.leftListData=[{name:"2",id:"2"}],e.rightListData=[],e.transferDataToRight=[],e.transferDataToLeft=[],e.rightListDataHas=[],e.leftListDataHas=[],e.rightListIds=[],e.personIdsSelected=[{id:"",includeLabels:[]}],e.isSearchResult=!1,e.isShowVaildMsg=!1,e}return p()(a,[{key:"isDisabled",value:function(e){return e.hasOwnProperty("personNum")?0===e.personNum:0===e.vehicleNum}},{key:"valueChange",value:function(e){this.valueRecord=JSON.parse(JSON.stringify(e)),this.getListData()}},{key:"validData",value:function(){return this.getRightIds(),this.isShowVaildMsg=this.rightListData&&0===this.rightListData.length,this.isShowVaildMsg&&this.$message.error(this.serviceName&&"getPersonGroupList"===this.serviceName?"请选择人员库":"请选择车辆库"),this.isShowVaildMsg}},{key:"rightDataChange",value:function(e){var t=this,a=e.length;this.checkAll=a===this.rightListData.length,this.isIndeterminate=a>0&&a<this.rightListData.length,this.transferDataToLeft=[],e&&e.length>0&&this.allListData.forEach((function(a){e.indexOf(a.id)>-1&&t.transferDataToLeft.push(a)})),this.transferDataToLeft=Array.from(new Set(this.transferDataToLeft)),this.rightListDataHas=this.rightListData.filter((function(t,a){return-1===e.indexOf(t.id)}))}},{key:"leftDataChange",value:function(e){var t=this;this.transferDataToRight=[],e&&e.length>0&&this.allListData.forEach((function(a){e.indexOf(a.id)>-1&&t.transferDataToRight.push(a)})),this.transferDataToRight=Array.from(new Set(this.transferDataToRight)),this.leftListDataHas=[],this.leftListDataHas=this.leftListData.filter((function(t,a){return-1===e.indexOf(t.id)}))}},{key:"generateData",value:function(){for(var e=[],t=1;t<=15;t++)e.push({key:t,name:"备选项 ".concat(t),id:t,disabled:t%4===0});return e}},{key:"clearSearchData",value:function(){this.searchData="",this.$set(this,"searchData",""),this.searchLeftData()}},{key:"searchLeftData",value:function(){var e=this;""!==this.searchData&&this.searchData?this.leftListData.forEach((function(t){var a=t.name,i=t.name.indexOf("(");i>-1&&(a=a.substring(0,i)),a.indexOf(e.searchData)>-1?(t.isShow=!0,e.isSearchResult=!0):(t.isShow=!1,e.isSearchResult=!0===e.isSearchResult)})):(this.leftListData.forEach((function(e){e.isShow=!0})),this.isSearchResult=!1)}},{key:"getAllListData",value:function(){var e=this;this.allListData=[],this.allListData&&Array.isArray(this.allListData)&&this.allListData.length>0&&this.allListData.forEach((function(t){e.allListIds.push(t.id)})),this.allListIds=Array.from(new Set(this.allListIds))}},{key:"handleCheckAllChange",value:function(e){var t=this,a=[];this.rightListData&&this.rightListData.length>0&&this.rightListData.forEach((function(e){a.push(e.id)})),a=Array.from(new Set(a)),this.checkedRightData=e?a:[],this.isIndeterminate=!1,this.transferDataToLeft=[],a&&a.length>0&&this.allListData.forEach((function(e){a.indexOf(e.id)>-1&&t.transferDataToLeft.push(e)})),this.transferDataToLeft=Array.from(new Set(this.transferDataToLeft)),this.rightListDataHas=this.rightListData.filter((function(e,t){return-1===a.indexOf(e.id)}))}},{key:"sortRule",value:function(e,t){return Number(e.dataIndex)-Number(t.dataIndex)}},{key:"toRight",value:function(){var e=[];this.transferDataToRight&&this.transferDataToRight.length>0?(e=[].concat(pa()(this.transferDataToRight),pa()(this.rightListData)),e.sort(this.sortRule),this.rightListData=JSON.parse(JSON.stringify(e)),this.transferDataToRight=[],this.leftListData=JSON.parse(JSON.stringify(this.leftListDataHas)),this.checkedLeftData=Object.assign([])):this.$message.warning("请勾选待选列表中的人员库"),this.validData()}},{key:"toLeft",value:function(){var e=[];this.transferDataToLeft&&this.transferDataToLeft.length>0?(e=[].concat(pa()(this.transferDataToLeft),pa()(this.leftListData)),e.sort(this.sortRule),this.leftListData=JSON.parse(JSON.stringify(e)),this.transferDataToLeft=[],this.rightListData=JSON.parse(JSON.stringify(this.rightListDataHas)),this.checkedRightData=Object.assign([]),this.checkAll=!1,this.isIndeterminate=!1):this.$message.warning("请勾选需要取消的人员库")}},{key:"getRightIds",value:function(){var e=this;this.rightListData.forEach((function(t){-1===e.rightListIds.indexOf(t.id)&&e.rightListIds.push(t.id)})),this.personIdsSelected[0].id=this.imageStore.id||"",this.personIdsSelected[0].includeLabels=this.rightListIds,this.$emit("change",this.personIdsSelected)}},{key:"validate",value:function(){var e=this.validData();return!e}},{key:"getListData",value:function(){var e=this;this.leftListData=[],this.rightListData=[],this.value&&Array.isArray(this.value)&&this.value.length>0?this.allListData&&this.allListData.length>0&&this.allListData.forEach((function(t){e.value.indexOf(t.id)>-1?e.rightListData.push(t):e.leftListData.push(t)})):this.leftListData=JSON.parse(JSON.stringify(this.allListData))}},{key:"getAllList",value:function(){var e=this;this.serviceName&&""!==this.serviceName?this.service[this.serviceName](this.params).then((function(t){if(t.success){if(e.allListData=t.data||[],e.allListData&&Array.isArray(e.allListData)&&e.allListData.length>0)for(var a in e.allListData)e.allListData[a].dataIndex=a,e.allListData[a].isShow=!0;e.getListData()}else e.allListData=[]})):this.allListData=[]}},{key:"created",value:function(){this.getAllList()}},{key:"mounted",value:function(){}}]),a}(C["g"]);D["a"]([Object(C["e"])({type:Array,default:function(){return[]}})],ma.prototype,"value",void 0),D["a"]([Object(C["e"])({type:String,default:""})],ma.prototype,"serviceName",void 0),D["a"]([Object(C["e"])({type:Object,default:function(){}})],ma.prototype,"params",void 0),D["a"]([Object(C["e"])({type:String,default:"请输入人员库名称"})],ma.prototype,"searchTitle",void 0),D["a"]([Object(C["e"])({type:Object,default:function(){}})],ma.prototype,"imageStore",void 0),D["a"]([Object(C["h"])("value",{deep:!0})],ma.prototype,"valueChange",null),ma=D["a"]([Object(C["a"])({})],ma);var ya=ma,ga=ya,ka=(a("090b"),Object(U["a"])(ga,ua,ha,!1,null,null,null)),ba=ka.exports,Ta=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("qz-form-wrap",{staticClass:"transfer-component",attrs:{title:e.showName}},[a("el-form",{ref:"addDeviceForm",attrs:{rules:e.fromRules,model:e.formData,"label-width":"110px"}},[a("el-form-item",{staticClass:"reset-bottom",attrs:{label:"相似度阈值",prop:"threshold"}},[a("ThresholdeChoose",{staticClass:"thregold-container",attrs:{type:e.type},model:{value:e.thresholdRecord,callback:function(t){e.thresholdRecord=t},expression:"thresholdRecord"}})],1),a("el-form-item",{attrs:{label:e.showServiceName,prop:"imageStore"}},[a("control-person-pool",{ref:"poolRef",attrs:{type:e.type,serviceName:e.serviceName,params:e.params,searchTitle:e.searchTitle,imageStore:e.imageStore},on:{change:e.dataChange},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1)],1)],1)},Da=[];function Ca(e){var t=Ra();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function Ra(){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 Oa=function(e){v()(a,e);var t=Ca(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.thresholdRecord=80,e.personIdsSelected=[],e.formData={},e.fromRules={imageStore:[{validator:e.checkImageStore,required:!0,trigger:["blur","change"]}],threshold:[{validator:e.checkThreshold,required:!0,trigger:["change","blur"]}]},e}return p()(a,[{key:"showName",get:function(){var e=this.$route.query.type;return"BLACK_LIST"===e?"布控黑名单":this.serviceName?"getPersonGroupList"===this.serviceName?"布控白名单":"布控车牌号":""}},{key:"showServiceName",get:function(){return this.serviceName?"getPersonGroupList"===this.serviceName?"人员库选择":"车辆库选择":""}},{key:"thresholdChange",value:function(e){(e||0===e)&&(this.thresholdRecord=e)}},{key:"checkImageStore",value:function(){}},{key:"dataChange",value:function(e){this.personIdsSelected=e}},{key:"checkThreshold",value:function(){}},{key:"validate",value:function(){var e=this.poolRef.validate();return e}}]),a}(C["g"]);D["a"]([Object(C["e"])({type:Array,default:function(){return[]}})],Oa.prototype,"value",void 0),D["a"]([Object(C["e"])({type:String,default:""})],Oa.prototype,"serviceName",void 0),D["a"]([Object(C["e"])({type:String,default:""})],Oa.prototype,"type",void 0),D["a"]([Object(C["e"])({type:Object,default:function(){}})],Oa.prototype,"params",void 0),D["a"]([Object(C["e"])({type:String,default:""})],Oa.prototype,"searchTitle",void 0),D["a"]([Object(C["e"])({type:Object,default:function(){}})],Oa.prototype,"imageStore",void 0),D["a"]([Object(C["e"])({type:Number,default:80})],Oa.prototype,"threshold",void 0),D["a"]([Object(C["h"])("threshold")],Oa.prototype,"thresholdChange",null),D["a"]([Object(C["f"])("poolRef")],Oa.prototype,"poolRef",void 0),Oa=D["a"]([Object(C["a"])({name:"TransferSelect",components:{ControlPersonPool:ba,ThresholdeChoose:W}})],Oa);var La=Oa,Sa=La,Ea=(a("aeb8"),Object(U["a"])(Sa,Ta,Da,!1,null,null,null)),Ia=Ea.exports,wa=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("qz-form-wrap",{staticClass:"property-container",attrs:{title:"布控属性"}},[a("div",{staticClass:"clear-all-button",on:{click:e.clearAll}},[e._v("清空已选")]),a("el-form",{ref:"addDeviceForm",attrs:{rules:e.fromRules,model:e.formData,"label-width":"110px"}},[a("el-form-item",{attrs:{prop:"properties"}},[e.propertiesList&&e.propertiesList.length>0?a("ul",{staticClass:"properties-box"},e._l(e.propertiesList,(function(t,i){return a("li",{key:t.code,staticClass:"perperty-item"},[a("span",{staticClass:"property-label"},[e._v(e._s(t.name))]),a("el-checkbox-group",{attrs:{max:1,size:"mini"},on:{change:e.selectChange},model:{value:e.formData[t.code],callback:function(a){e.$set(e.formData,t.code,a)},expression:"formData[item.code]"}},e._l(t.operation,(function(t){return a("el-checkbox",{key:t.name+i,attrs:{label:t.code}},[e._v(e._s(t.name))])})),1)],1)})),0):a("qz-no-data")],1),e.isShowVaildMsg?a("div",{staticClass:"alertInfo"},[e._v("请选择布控属性")]):e._e(),a("el-form-item",{staticClass:"threhold-container",attrs:{label:"抓拍质量分阈值",prop:"threshold"}},[a("ThresholdeChoose",{staticClass:"thregold-content",attrs:{type:e.type},model:{value:e.thresholdRecord,callback:function(t){e.thresholdRecord=t},expression:"thresholdRecord"}})],1)],1)],1)},xa=[];function _a(e){var t=Na();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function Na(){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 Fa=function(e){v()(a,e);var t=_a(a);function a(){var e,i;return h()(this,a),i=t.apply(this,arguments),i.propertiesList=[],i.thresholdRecord=80,i.isShowVaildMsg=!1,i.initFormData={},i.Type2Desc=(e={},E()(e,r.FACE_PROPERTIES,{tl:"管理人脸属性",desc:"多个人脸属性取交集的结果",warn:"暂无人脸属性,请点击管理人脸属性添加~",service:"fetchFaceProperties",dialogTl:"人脸属性管理"}),E()(e,r.BODY_PROPERTIES,{tl:"管理行人属性",desc:"多个行人属性取交集的结果",warn:"暂无行人属性,请点击管理行人属性添加~",service:"fetchBodyProperties",dialogTl:"行人属性管理"}),e),i.radio4=[],i.radio5=[],i.fromRules={threshold:[{validator:i.checkThreshold,required:!0,trigger:["change","blur"]}]},i.formData={},i}return p()(a,[{key:"typeChange",value:function(e){}},{key:"thresholdChange",value:function(e){(e||0===e)&&(this.thresholdRecord=e)}},{key:"propertyChange",value:function(e){var t=this;e&&e.length>0&&e.forEach((function(e){t.formData[e.code]=[].concat(e.value)}))}},{key:"checkThreshold",value:function(){}},{key:"getProperties",value:function(){var e=this,t="";t=this.Type2Desc[this.type].service,t&&this.service[t]().then((function(t){if(t.success){var a=[];a=t.data||[],a&&a.length>0&&a.forEach((function(t){e.formData[t.code]||e.$set(e.formData,t.code,[]),e.$set(e.initFormData,t.code,[])})),e.propertiesList=a}}))}},{key:"clearAll",value:function(){this.formData=JSON.parse(JSON.stringify(this.initFormData))}},{key:"validProperty",value:function(){var e=this,t=!0;return Object.keys(this.formData).forEach((function(a){t=!(e.formData[a]&&e.formData[a].length>0)&&!!t})),this.isShowVaildMsg=t,this.isShowVaildMsg}},{key:"validate",value:function(){var e=this.validProperty();return!e}},{key:"formDataBack",value:function(){var e=this,t=[];return this.formData&&Object.keys(this.formData).length>0&&Object.keys(this.formData).forEach((function(a){e.formData[a][0]&&e.formData[a][0].length>0&&t.push({code:a,value:e.formData[a][0]})})),t}},{key:"selectChange",value:function(){this.validate()}},{key:"created",value:function(){this.getProperties()}}]),a}(C["g"]);D["a"]([Object(C["e"])({type:String,default:""})],Fa.prototype,"type",void 0),D["a"]([Object(C["e"])({default:function(){return[]},type:Array})],Fa.prototype,"propertiesReceive",void 0),D["a"]([Object(C["e"])({type:Number,default:80})],Fa.prototype,"threshold",void 0),D["a"]([Object(C["h"])("type")],Fa.prototype,"typeChange",null),D["a"]([Object(C["h"])("threshold")],Fa.prototype,"thresholdChange",null),D["a"]([Object(C["h"])("propertiesReceive",{deep:!0})],Fa.prototype,"propertyChange",null),Fa=D["a"]([Object(C["a"])({name:"TransferSelect",components:{ThresholdeChoose:W}})],Fa);var Pa=Fa,Aa=Pa,ja=(a("ceca"),Object(U["a"])(Aa,wa,xa,!1,null,null,null)),$a=ja.exports;function Ba(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=Va(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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,s=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return s=e.done,e},e:function(e){c=!0,n=e},f:function(){try{s||null==a.return||a.return()}finally{if(c)throw n}}}}function Va(e,t){if(e){if("string"===typeof e)return Ma(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)?Ma(e,t):void 0}}function Ma(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function qa(e){var t=Ha();return function(){var a,i=k()(e);if(t){var r=k()(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return y()(this,a)}}function Ha(){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 Ga=function(e){v()(a,e);var t=qa(a);function a(){var e;return h()(this,a),e=t.apply(this,arguments),e.stepNum=1,e.pageLoading=!1,e.controlStepList=w,e.TaskFormList=ea,e.personParams={name:""},e.carParams={name:""},e.cacheData={name:"",mode:1,fe_weekTimes:["00:00:00","23:59:59"],weekdays:"1111111",weekStartTime:"",weekEndTime:"",taskStartTime:"",taskEndTime:"",status:"0",operator:"",type:"",threshold:80,intervalTime:3,alarmLevel:1,identifyType:1,deviceTypeFlag:"0",description:"",recentDays:0,appearanceTimes:1,appearanceMethod:0,taskTimeType:"",controlTaskNotifyForms:[],isForver:!1,taskTime:"",vehicleImageStoreForm:[],alarmDevices:[],alarmUseFlag:0},e.formTask={name:"",weekdays:"1111111",fe_weekTimes:["00:00:00","23:59:59"],weekStartTime:"",weekEndTime:"",taskStartTime:"",taskEndTime:"",status:"0",operator:e.taskOperator,type:"",intervalTime:3,alarmLevel:1,description:"",taskTimeType:"FOREVER",isForver:!0,taskTime:"",alarmDevices:[],alarmUseFlag:0},e.ruleForm={},e.currentControlType=r.BLACK_LIST,e.completeLoading=!1,e.stepNameList=[],e.taskId="",e.selectedDeviceList=[],e.isDeviceOffline=!1,e.taskType="",e.propertiesReceive=[],e.selectedCarLists=[],e.imagePersonStore={},e.imageCarStore={},e.selectedPersonLists=[],e.personId="",e.activeIndex="alarmList-page",e.isAllValid=!1,e}return p()(a,[{key:"handleControlTaskCancel",value:function(){this.$router.push({path:"/alarmInformation",query:{type:this.cacheData.type||"BLACK_LIST",activeIndex:this.activeIndex}})}},{key:"created",value:function(){this.taskId=this.$route.query.id,this.taskType=this.$route.query.type?this.$route.query.type:"BLACK_LIST",this.activeIndex=this.$route.query.activeIndex||"alarmList-page",this.cacheData.type=this.taskType,this.formTask.type=this.taskType,this.$set(this,"cacheData",this.cacheData),this.taskId&&this.fetchTaskInfo()}},{key:"getStepOpts",get:function(){var e=this,t=[];return Object.keys(w).forEach((function(a){var i=w[a],n=i["codes"],s=r[e.currentControlType]||r.OTHER;n.indexOf(s)>-1&&t.push({title:i["name"]})})),t}},{key:"taskOperator",get:function(){return this.$store.state.user.userInfo.loginName}},{key:"fetchComponentData",value:function(){var e=l()(T.a.mark((function e(){var t,a,i,r,s,c,o,l,u,h,f,p,d,v,m,y,g,k,b,D=this;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=!0,!(this.stepNameList&&this.stepNameList.length>0)){e.next=32;break}a=Ba(this.stepNameList),e.prev=4,a.s();case 6:if((i=a.n()).done){e.next=22;break}if(r=i.value,r!==n.TASK){e.next=15;break}return e.next=11,this.taskRef.validate();case 11:s=e.sent,c=Object.keys(ea),s?function(){var e=Object.assign({},D.cacheData);c&&c.length>0&&c.forEach((function(t){D.taskRef.form.hasOwnProperty(t)&&(e[t]=D.taskRef.form[t])})),t=!1!==t,D.$set(D,"cacheData",e)}():t=!1;case 15:if(r===n.PERSON&&(o=this.personRef.validate(),this.cacheData.threshold=this.personRef.thresholdRecord,o?(this.cacheData.imageStoreForm=this.personRef.personIdsSelected,this.selectedPersonLists=this.cacheData.imageStoreForm&&this.cacheData.imageStoreForm.length>0?this.cacheData.imageStoreForm[0].includeLabels:[],t=!1!==t,this.$set(this,"cacheData",this.cacheData)):t=!1),r===n.AREA)if(l=this.areaRef.validate(),"BLACK_LIST"!==this.cacheData.type&&"STRANGER"!==this.cacheData.type||(this.cacheData.mode=this.areaRef.getSelectMode(),this.$set(this,"cacheData",this.cacheData)),l){if(u=this.areaRef.getFormatData(),u&&u.length>0){h=Ba(u);try{for(h.s();!(f=h.n()).done;)p=f.value,"3"===p.onlineStatus?this.isDeviceOffline=!0:this.isDeviceOffline=this.isDeviceOffline||!1}catch(T){h.e(T)}finally{h.f()}}this.$set(this.cacheData,"devices",u),this.$set(this,"cacheData",this.cacheData),t=!1!==t}else t=!1;r===n.RULE&&(d=this.ruleRef.validate(),d?("GATHER"===this.cacheData.type?(v=this.ruleRef.formRecord,this.cacheData.threshold=v.threshold,this.$set(this,"cacheData",this.cacheData)):"FREQUENT_STRANGER"===this.cacheData.type&&(m=this.ruleRef.form,this.cacheData.appearanceMethod=m.appearanceMethod,this.cacheData.appearanceTimes=m.appearanceTimes,this.cacheData.recentDays=m.recentDays,this.$set(this,"cacheData",this.cacheData)),t=!1!==t):t=!1),r===n.CAR&&(y=this.carRef.validate(),this.cacheData.threshold=this.carRef.thresholdRecord,this.$set(this,"cacheData",this.cacheData),y?(g=this.carRef.personIdsSelected,this.cacheData.vehicleImageStoreForm=g,this.selectedCarLists=this.cacheData.vehicleImageStoreForm&&this.cacheData.vehicleImageStoreForm.length>0?this.cacheData.vehicleImageStoreForm[0].includeLabels:[],this.$set(this,"cacheData",this.cacheData),t=!1!==t):t=!1),r===n.PROPERTY&&(k=this.propertyRef.validate(),k?(b=this.propertyRef.formDataBack(),this.cacheData.threshold=this.propertyRef.thresholdRecord,"FACE_PROPERTIES"===this.cacheData.type?this.cacheData.faceProperties=b:"BODY_PROPERTIES"===this.cacheData.type&&(this.cacheData.bodyProperties=b),this.$set(this,"cacheData",this.cacheData),t=!1!==t):t=!1);case 20:e.next=6;break;case 22:e.next=27;break;case 24:e.prev=24,e.t0=e["catch"](4),a.e(e.t0);case 27:return e.prev=27,a.f(),e.finish(27);case 30:e.next=33;break;case 32:t=!1;case 33:return e.abrupt("return",t);case 34:case"end":return e.stop()}}),e,this,[[4,24,27,30]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"saveTask",value:function(){var e=l()(T.a.mark((function e(){var t=this;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.fetchComponentData();case 2:this.isAllValid=e.sent,this.isAllValid&&(this.isDeviceOffline?(this.$message.info({message:"提示:所选相机中存在离线设备,请在布控任务开始前将设备调试至在线状态(可忽略此提示继续保存)",duration:2e3}),setTimeout((function(){t.taskId?t.fetchEditControlTask():t.fetchAddControlTask()}),2e3)):this.taskId?this.fetchEditControlTask():this.fetchAddControlTask());case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"fetchAddControlTask",value:function(){var e=this;if(!this.completeLoading){this.completeLoading=!0;var t=this.cacheData;"FREQUENT_STRANGER"===t.type&&(t.taskTimeType="FOREVER"),this.service.addControlTask(t).then((function(t){t.success?(e.$message.success("新增区域布控成功!"),e.isDeviceOffline=!1,e.$router.push({path:"/alarmInformation",query:{type:e.cacheData.type||"BLACK_LIST",activeIndex:e.activeIndex}})):e.$message.error(t.message||"服务异常"),e.completeLoading=!1}),(function(){e.completeLoading=!1})).catch((function(t){e.completeLoading=!1}))}}},{key:"saveControlTask",value:function(){}},{key:"fetchEditControlTask",value:function(){var e=this;if(!this.completeLoading){this.completeLoading=!0;var t=this.cacheData;this.service.editControlTask(t).then((function(t){t.success?(e.$message.success("编辑区域布控成功!"),e.isDeviceOffline=!1,e.$router.push({path:"/alarmInformation",query:{type:e.cacheData.type||"BLACK_LIST",activeIndex:e.activeIndex}})):e.$message.error(t.message||"服务异常"),e.completeLoading=!1}),(function(){e.completeLoading=!1})).catch((function(t){e.completeLoading=!1}))}}},{key:"next",value:function(){this.stepNum+=1}},{key:"getStepNameList",value:function(){var e=this;this.stepNameList=[],Object.keys(this.controlStepList).map((function(t){var a=e.controlStepList[t];a.codes.indexOf(e.currentControlType)>-1&&e.stepNameList.push(t)}))}},{key:"showStepComponent",value:function(e,t){if(e&&t){var a=w[t]&&w[t].codes;return a.indexOf(e)>-1}return!0}},{key:"handleIdentifyChange",value:function(e){this.selectedDeviceList=[]}},{key:"handleTypeChange",value:function(e){this.currentControlType=e;var t=Object.keys(r);-1===t.indexOf(e)?this.stepNameList=I:(this.getStepNameList(),this.taskId||this.getControlTypeNum())}},{key:"fetchTaskInfo",value:function(){var e=l()(T.a.mark((function e(){var t,a=this;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.pageLoading=!1,e.next=3,this.service.queryControlTaskById({id:this.taskId}).catch((function(e){a.pageLoading=!1}));case 3:t=e.sent,t.success?this.initTaskInfo(t.data):this.$message.error(t.message),this.pageLoading=!1;case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"mounted",value:function(){this.getStepNameList(),this.taskId||this.getControlTypeNum()}},{key:"initTaskInfo",value:function(e){var t=this;this.cacheData=e;var a=Object.keys(ea);a&&a.length>0&&a.forEach((function(e){t.cacheData.hasOwnProperty(e)&&(t.formTask[e]=t.cacheData[e])})),this.selectedDeviceList=e.devices||[],this.selectedImageStore=e.imageStoreForm||[],this.selectedPersonLists=e.imageStoreForm&&e.imageStoreForm.length>0?e.imageStoreForm[0].includeLabels:[],this.selectedCarLists=e.vehicleImageStoreForm&&e.vehicleImageStoreForm.length>0?e.vehicleImageStoreForm[0].includeLabels:[],this.imagePersonStore=e.imageStoreForm&&e.imageStoreForm.length>0?e.imageStoreForm[0]:{},this.imageCarStore=e.imageStoreForm&&e.imageStoreForm.length>0?e.imageStoreForm[0]:{},this.personId=e.id,"FREQUENT_STRANGER"===this.cacheData.type?(this.$set(this.ruleForm,"recentDays",this.cacheData.recentDays),this.$set(this.ruleForm,"appearanceTimes",this.cacheData.appearanceTimes),this.$set(this.ruleForm,"appearanceMethod",this.cacheData.appearanceMethod)):"GATHER"===this.cacheData.type&&this.$set(this.ruleForm,"threshold",this.cacheData.threshold);Object(j["localDateStr"])();this.$set(e,"fe_weekTimes",[e.weekStartTime||"00:00:00",e.weekEndTime||"23:59:59"]),this.$set(this.formTask,"fe_weekTimes",e.fe_weekTimes),this.propertiesReceive="FACE_PROPERTIES"===e.type?e.faceProperties?e.faceProperties:[]:e.bodyProperties?e.bodyProperties:[]}},{key:"getControlTypeNum",value:function(){var e=l()(T.a.mark((function e(){var t,a;return T.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.service.getTypeNumByCode({code:this.currentControlType});case 3:t=e.sent,a=t.data,this.formTask.name="自定义任务".concat(a+1),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}()}]),a}(C["g"]);D["a"]([Object(C["f"])("controlStep")],Ga.prototype,"controlStep",void 0),D["a"]([Object(C["f"])("task")],Ga.prototype,"taskRef",void 0),D["a"]([Object(C["f"])("person")],Ga.prototype,"personRef",void 0),D["a"]([Object(C["f"])("car")],Ga.prototype,"carRef",void 0),D["a"]([Object(C["f"])("area")],Ga.prototype,"areaRef",void 0),D["a"]([Object(C["f"])("roi")],Ga.prototype,"roiRef",void 0),D["a"]([Object(C["f"])("property")],Ga.prototype,"propertyRef",void 0),D["a"]([Object(C["f"])("rule")],Ga.prototype,"ruleRef",void 0),Ga=D["a"]([Object(C["a"])({components:{ControlTask:Ce,ControlArea:Ft,QzSteps:Zt,ControlPersonPool:ba,AlarmRule:la,ControlTransfer:Ia,ControlProperty:$a}})],Ga);var Ka=Ga,Ua=Ka,za=(a("a08f"),Object(U["a"])(Ua,s,c,!1,null,null,null));t["default"]=za.exports},7068: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"}},7087:function(e,t,a){},"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"},7548:function(e,t,a){"use strict";a("7981")},7981:function(e,t,a){},"7a58":function(e,t,a){e.exports=a.p+"img/nvr-offline.937cb21e.svg"},"93f3":function(e,t,a){"use strict";a.d(t,"d",(function(){return i})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return s}));a("448a");var i=[{value:"0",label:"周一"},{value:"1",label:"周二"},{value:"2",label:"周三"},{value:"3",label:"周四"},{value:"4",label:"周五"},{value:"5",label:"周六"},{value:"6",label:"周日"}],r={1:"一",2:"二",3:"三",4:"四",5:"五"},n={1:"#E8684A",2:"#FF9D4D",3:"#F6BD16",4:"#5B8FF9",5:"#ABABAB"},s=[{type:"BLACK_LIST",title:"重点人员布控",iconName:"icon-BLACK_LIST"},{type:"STRANGER",title:"陌生人布控",iconName:"STRANGER"},{type:"FREQUENT_STRANGER",title:"频繁出没布控",iconName:"FREQUENT_STRANGER"},{type:"DEVICE_ROI",title:"人员入侵布控",iconName:"DEVICEROI"},{type:"GATHER",title:"人员聚集布控",iconName:"GATHER"},{type:"BODY_PROPERTIES",title:"行人属性布控",iconName:"BODYPROPERTIES"},{type:"PLATE",title:"重点车辆布控",iconName:"PLATE"},{type:"NON_VEHICLE",title:"非机动车布控",iconName:"NOVEHICLE"},{type:"FACE_PROPERTIES",title:"人脸属性布控",iconName:"FACEPROPERTIES"},{type:"HELMENT",title:"未戴安全帽布控",iconName:"SAFEHELMET"},{type:"BATTERY_VEHICLE",title:"电瓶车布控",iconName:"BATTERYVEHICLE"},{type:"THREE_LEVEL_CONTROL",title:"三级布控",iconName:"icon-THREE_LEVEL_CONTROL"},{type:"FIRE",title:"火点烟雾",iconName:"icon-FIRE"},{type:"SMOKING",title:"抽烟检测",iconName:"icon-SMOKING"},{type:"VEHICLE_BLOCKED",title:"车辆堵塞",iconName:"icon-VEHICLE_BLOCKED"},{type:"VEHICLE_ILLEGAL_PARK",title:"车辆违停",iconName:"icon-VEHICLE_ILLEGAL_PARK"},{type:"TAMPER_ALARM",title:"防拆报警",iconName:"icon-TAMPER_ALARM"}]},"97dc":function(e,t,a){"use strict";a("fce2")},"9c0b":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"}},a08f:function(e,t,a){"use strict";a("e489")},a53a:function(e,t,a){e.exports=a.p+"img/zhuapai-offline.47469e7e.svg"},ae97:function(e,t,a){},aeb8:function(e,t,a){"use strict";a("9c0b")},b928: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"}},bc4a:function(e,t,a){},c1e2:function(e,t,a){},cb38:function(e,t,a){"use strict";a("ae97")},cdee:function(e,t,a){"use strict";a("7068")},ceca:function(e,t,a){"use strict";a("b928")},d43e:function(e,t,a){"use strict";a("1958")},d6b4:function(e,t,a){"use strict";a("bc4a")},dbab:function(e,t,a){e.exports=a.p+"img/zhuapai-online.ec313ee6.svg"},e223:function(e,t,a){e.exports=a.p+"img/nvr-online.0d409b27.svg"},e2f1: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"}},e489: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"}},f2df:function(e,t,a){"use strict";a("f8dd")},f389:function(e,t,a){},f8dd: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"}},fcb9a:function(e,t,a){"use strict";a("e2f1")},fce2:function(e,t,a){}}]);