(window["webpackJsonp_security-control"]=window["webpackJsonp_security-control"]||[]).push([["chunk-635a1ab0"],{"0676":function(e,t){function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}e.exports=a,e.exports["default"]=e.exports,e.exports.__esModule=!0},"0b75":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"}},"11b0":function(e,t){function a(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}e.exports=a,e.exports["default"]=e.exports,e.exports.__esModule=!0},"1a7d":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"}},2236:function(e,t,a){var o=a("5a43");function i(e){if(Array.isArray(e))return o(e)}e.exports=i,e.exports["default"]=e.exports,e.exports.__esModule=!0},"448a":function(e,t,a){var o=a("2236"),i=a("11b0"),s=a("6613"),n=a("0676");function r(e){return o(e)||i(e)||s(e)||n()}e.exports=r,e.exports["default"]=e.exports,e.exports.__esModule=!0},"53d2":function(e,t,a){"use strict";a("1a7d")},"5a43":function(e,t){function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,o=new Array(t);a1||e.alarmConfigData.length>=10?"":"noPagination"},[o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],staticStyle:{width:"100%"},attrs:{data:e.alarmConfigData,stripe:"",height:"100%"}},[o("el-table-column",{attrs:{prop:"name",label:"报警等级",align:"left","min-width":"70px","class-name":"level-column"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",[e._v(e._s(t.row.name))])]}}])}),o("el-table-column",{attrs:{prop:"hasTips",label:"实时报警",align:"left","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",[e._v(e._s(t.row.hasTips?"有":"无"))])]}}])}),o("el-table-column",{attrs:{prop:"color",label:"报警颜色",align:"left","show-overflow-tooltip":"","min-width":"125px"},scopedSlots:e._u([{key:"default",fn:function(e){return[o("div",{staticClass:"color-box",style:{background:e.row.color}})]}}])}),o("el-table-column",{attrs:{prop:"hasSound",label:"报警声音",align:"left","min-width":"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[t.row.hasSound?e._e():o("span",[e._v("无")]),t.row.hasSound?o("div",{staticClass:"voice-box-button",class:t.row.isPlay?"pauseBtn":"playBtn",on:{click:function(a){return e.playVoice(t.row,t.$index)}}},[o("div",{staticClass:"voice-icon"},[e._v("点击试听")])]):e._e()])]}}])}),o("el-table-column",{attrs:{label:"操作",width:"150",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",[o("el-button",{staticClass:"edit-text-color",attrs:{type:"text"},on:{click:function(a){return e.editRow(t.row)}}},[e._v("编辑")])],1)]}}])})],1)],1),o("el-pagination",{directives:[{name:"show",rawName:"v-show",value:e.alarmConfigEntity.pageIndex>1||e.alarmConfigData.length>=10,expression:"alarmConfigEntity.pageIndex > 1 || alarmConfigData.length >= 10"}],staticClass:"security-control-pagination",attrs:{background:"","current-page":e.alarmConfigEntity.pageIndex,"page-size":e.alarmConfigEntity.pageSize,"page-sizes":[10,20,50,100,200],layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),e.voiceConfigVisible?o("div",[o("el-dialog",{attrs:{"custom-class":"voice-config-dialog",title:"编辑报警等级","close-on-click-modal":!1,visible:e.voiceConfigVisible,top:"0"},on:{"update:visible":function(t){e.voiceConfigVisible=t},close:e.cancelVoiceConfig}},[o("voice-cofig-detail",{ref:"cofig",attrs:{dataSource:e.currentAlarmConfig}}),o("span",{staticClass:"dialog-footer",staticStyle:{position:"relative",bottom:"0"},attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:e.cancelVoiceConfig}},[e._v("取 消")]),o("el-button",{attrs:{type:"primary",loading:e.isLoadingHandle},on:{click:e.confirmVoiceConfig}},[e._v("确定")])],1)],1)],1):e._e(),o("audio",{ref:"voice",attrs:{preload:"auto",id:"voiceId"}}),o("audio",{staticClass:"audio-default",attrs:{id:"voiceDefault",src:a("a093"),preload:"auto"}})],1)},i=[],s=a("970b"),n=a.n(s),r=a("5bc3"),l=a.n(r),c=a("ed6d"),u=a.n(c),d=a("6b58"),p=a.n(d),f=a("36c6"),h=a.n(f),m=a("9ab4"),y=a("60a3"),v=a("93f3"),g=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"voice-config-detail-page"},[o("el-form",{ref:"form",staticClass:"form-container",attrs:{rules:e.rules,model:e.form,"label-width":"128px","label-position":"right"}},[o("div",{staticClass:"alarm-block",staticStyle:{height:"378px"}},[o("h3",{staticClass:"alarm-title"},[e._v("报警声音")]),o("el-form-item",{staticStyle:{"margin-top":"0px","text-align":"center"},attrs:{prop:"hasSound","label-width":"0"}},[o("div",{staticClass:"radio-box",class:{"radio-box-selected":!e.form.hasSound}},[o("el-radio",{staticClass:"radio-label",attrs:{label:!1},model:{value:e.form.hasSound,callback:function(t){e.$set(e.form,"hasSound",t)},expression:"form.hasSound"}},[e._v("无报警声音")])],1),o("div",{staticClass:"radio-box",class:{"radio-box-selected":e.form.hasSound}},[o("el-radio",{staticClass:"radio-label",attrs:{label:!0},model:{value:e.form.hasSound,callback:function(t){e.$set(e.form,"hasSound",t)},expression:"form.hasSound"}},[e._v("有报警声音")]),o("el-form-item",{attrs:{prop:"soundType","label-width":"0px"}},[o("el-radio-group",{staticClass:"alarm-radio-group",attrs:{disabled:!e.form.hasSound},on:{change:e.soundTypeChange},model:{value:e.form.soundType,callback:function(t){e.$set(e.form,"soundType",t)},expression:"form.soundType"}},[o("div",{staticClass:"alarm-radio-item",class:{selected:"0"===e.form.soundType}},[o("el-radio",{attrs:{label:"0"}},[o("span",{staticClass:"defalut-voice"},[e._v("默认提示音")]),o("br"),o("div",{staticClass:"playVideo",class:"0"===e.form.soundType&&e.form.hasSound?"curentSelected":"",on:{click:e.playAudio}},[o("i",{staticClass:"el-icon-video-play"}),e._v(" 点击试听 ")])])],1),o("div",{staticClass:"alarm-radio-item",class:{selected:"1"===e.form.soundType}},[o("el-radio",{attrs:{label:"1"}},[o("span",{staticClass:"define-voice"},[e._v("自定义提示音")]),o("br"),o("div",{staticClass:"uploadVideo",class:"1"===e.form.soundType&&e.form.hasSound?"curentSelected":"",on:{click:e.uploadAudio}},[o("i",{staticClass:"el-icon-upload"}),e._v(" 点击上传 ")])])],1)]),o("input",{ref:"fileUpload",attrs:{type:"file",id:"uploadImg",name:"image",accept:"audio/*"},on:{change:e.audioChange}}),o("audio",{ref:"voice",staticClass:"audio-default",attrs:{id:"voiceId",src:a("a093"),preload:"auto"}}),e.isShowCustomError?o("div",{staticClass:"custom-error-message"},[e._v(" 请上传音频文件 ")]):e._e()],1)],1)])],1),o("div",{staticClass:"alarm-block"},[o("h3",{staticClass:"alarm-title"},[e._v("报警提示")]),o("el-form-item",{staticStyle:{"margin-top":"0px","text-align":"center"},attrs:{prop:"hasTips","label-width":"0"}},[o("div",{staticClass:"radio-box",class:{"radio-box-selected":!e.form.hasTips}},[o("el-radio",{staticClass:"radio-label",attrs:{label:!1},model:{value:e.form.hasTips,callback:function(t){e.$set(e.form,"hasTips",t)},expression:"form.hasTips"}},[e._v("无实时报警")])],1),o("div",{staticClass:"radio-box",class:{"radio-box-selected":e.form.hasTips}},[o("el-radio",{staticClass:"radio-label",attrs:{label:!0},model:{value:e.form.hasTips,callback:function(t){e.$set(e.form,"hasTips",t)},expression:"form.hasTips"}},[e._v("有实时报警")]),o("el-form-item",{attrs:{prop:"uploadMessageCenter","label-width":"0px"}},[o("el-radio-group",{staticClass:"alarm-radio-group",attrs:{disabled:!e.form.hasTips},model:{value:e.form.uploadMessageCenter,callback:function(t){e.$set(e.form,"uploadMessageCenter",t)},expression:"form.uploadMessageCenter"}},[o("div",{staticClass:"alarm-radio-item larger",class:{selected:0===e.form.uploadMessageCenter}},[o("el-radio",{attrs:{label:0}},[o("span",{staticClass:"message-abandon"},[e._v("不同步消息中心")])])],1),o("br"),o("div",{staticClass:"alarm-radio-item",class:{selected:1===e.form.uploadMessageCenter}},[o("el-radio",{staticClass:"message-title",attrs:{label:1}},[o("span",{staticClass:"message-accept"},[e._v("同步消息中心")])]),o("el-checkbox-group",{staticClass:"message-selectors",attrs:{disabled:0===e.form.uploadMessageCenter||!e.form.hasTips},model:{value:e.form.notifyMethods,callback:function(t){e.$set(e.form,"notifyMethods",t)},expression:"form.notifyMethods"}},[o("el-checkbox",{staticClass:"alert-box",attrs:{label:"2"}},[e._v("弹窗提醒")]),o("el-checkbox",{staticClass:"mail-box",attrs:{label:"3"}},[e._v("邮件提醒")])],1)],1)])],1)],1)])],1)]),o("el-row",{staticClass:"note-set",staticStyle:{"margin-top":"-15px","font-size":"12px","max-width":"350px"}},[e._v(" 备注:“实时报警”关闭后,不显示报警信息,仅在报警历史留档。 选择“同步消息中心”,报警信息同步至轻舟消息中心 ")])],1)},C=[];function b(e){var t=E();return function(){var a,o=h()(e);if(t){var i=h()(this).constructor;a=Reflect.construct(o,arguments,i)}else a=o.apply(this,arguments);return p()(this,a)}}function E(){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 x=function(e){u()(a,e);var t=b(a);function a(){var e;return n()(this,a),e=t.apply(this,arguments),e.form={name:"",hasTips:!1,hasSound:!0,soundType:"0",color:"red",soundFile:void 0,uploadMessageCenter:0,notifyMethods:[]},e.playMp3El=void 0,e.isShowCustomError=!1,e.alarmLevelToColor=v["c"],e.rules={name:[{required:!0,message:"请输入报警级别名称",trigger:"blur"}],soundType:[]},e}return l()(a,[{key:"dataSourceChange",value:function(e){this.initData(e)}},{key:"created",value:function(){this.initData(this.dataSource)}},{key:"soundChange",value:function(e){var t=this;e?(this.form.soundType="0",this.$nextTick((function(){t.rules.soundType.push({required:!0,message:"请上传音频文件",trigger:"change"})}))):(this.form.soundType="",this.$nextTick((function(){t.rules.soundType=[]})))}},{key:"soundTypeChange",value:function(e){this.isShowCustomError=!1}},{key:"validateFormFiled",value:function(){var e=this;return new Promise((function(t,a){e.$refs["form"].validate((function(a,o){a&&e.checkSoundType()?t(!0):t(!1)}))}))}},{key:"checkSoundType",value:function(){return this.isShowCustomError=!1,!("1"===this.form.soundType&&!this.form.soundFile&&!this.form.sound)||(this.isShowCustomError=!0,!1)}},{key:"initData",value:function(e){this.isShowCustomError=!1,this.form=Object.assign(this.form,e),this.form.notifyMethods||(this.form.notifyMethods=[]),null===this.form.uploadMessageCenter&&(this.form.uploadMessageCenter=0),e.useDefaultSound?this.form.soundType="0":this.form.soundType="1",this.$refs["form"]&&this.$refs["form"].resetFields()}},{key:"uploadAudio",value:function(){if("1"===this.form.soundType){var e=document.getElementById("uploadImg");e.click()}}},{key:"realUpdateData",value:function(){var e=new FormData,t="0"===this.form.soundType;return this.form.soundFile&&e.append("soundFile",this.form.soundFile),e.append("name",this.form.name),e.append("level",this.form.level),e.append("hasTips",this.form.hasTips),e.append("color",this.alarmLevelToColor[this.form.level]),e.append("hasSound",this.form.hasSound),e.append("useDefaultSound",t),e.append("notifyMethods",this.form.notifyMethods),e.append("uploadMessageCenter",this.form.uploadMessageCenter),e}},{key:"playAudio",value:function(){this.form.hasSound&&(this.playMp3El&&this.playMp3El.pause(),this.playMp3El=document.getElementById("voiceId"),this.playMp3El.play().catch((function(e){})))}},{key:"audioChange",value:function(e){var t=this,a=e.target&&e.target.files&&e.target.files["0"],o=a.type,i=a.size,s=(o.substring(o.lastIndexOf(".")).toLowerCase(),i/1024/1024<10);if(!/audio\/\w+/.test(a.type))return this.$message.error("只能选择音频文件"),!1;if(!s)return this.$message.error("上传音频大小不能超过 10MB!"),!1;var n=new FileReader;n.readAsDataURL(a),n.onloadend=function(e){n.result;t.form.soundFile=a,t.isShowCustomError=!1},e.target.value=""}},{key:"convertBase64UrlToBlob",value:function(e,t){for(var a=window.atob(e.split(",")[1]),o=new ArrayBuffer(a.length),i=new Uint8Array(o),s=0;s