(window["webpackJsonp_ninca-crk-access-control"]=window["webpackJsonp_ninca-crk-access-control"]||[]).push([["chunk-0a54a2b8"],{"0ded":function(t,e,n){"use strict";var r=n("63c6"),a=n.n(r);a.a},"1d5e":function(t,e,n){"use strict";n("d3b7"),n("4ae1"),n("25f0");var r=n("f3f3"),a=(n("96cf"),n("c964")),i=n("276c"),c=n("e954"),s=n("920b"),o=n("e1a7"),u=n("f20d"),l=n("2ff6");function d(t){function e(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}return function(){var n,r=Object(u["a"])(t);if(e()){var a=Object(u["a"])(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(o["a"])(this,n)}}var f={defaultEdit:"/api/terminal/default/edit",defaultQuery:"/api/terminal/default/query",count:"/api/terminal/count",personDel:"/api/terminal/persons/delete"},p=function(t){Object(s["a"])(n,t);var e=d(n);function n(){return Object(i["a"])(this,n),e.apply(this,arguments)}return Object(c["a"])(n,[{key:"defaultEdit",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,n,a,i,c=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:{},n=c.length>1&&void 0!==c[1]?c[1]:{},a=Object.assign(e),t.next=5,this.$ajax(f.defaultEdit,a,Object(r["a"])({tip:"配置成功"},n));case 5:return i=t.sent,t.abrupt("return",i);case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"defaultQuery",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,n,r,a,i=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},n=i.length>1&&void 0!==i[1]?i[1]:{},r=Object.assign(e),t.next=5,this.$ajax(f.defaultQuery,r,n);case 5:return a=t.sent,t.abrupt("return",{deviceInfo:a.data||[]});case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"count",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,n,a,i,c=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:{},n=c.length>1&&void 0!==c[1]?c[1]:{},a=Object.assign(e),t.next=5,this.$ajax(f.count,a,Object(r["a"])({},n));case 5:return i=t.sent,t.abrupt("return",i.data);case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"personDel",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,n,a,i,c=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:{},n=c.length>1&&void 0!==c[1]?c[1]:{},a=Object.assign(e),t.next=5,this.$ajax(f.personDel,a,Object(r["a"])({},n));case 5:return i=t.sent,t.abrupt("return",i);case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}]),n}(l["a"]);e["a"]=new p},"2af9":function(t,e,n){},"45fc":function(t,e,n){"use strict";var r=n("23e7"),a=n("b727").some,i=n("a640"),c=n("ae40"),s=i("some"),o=c("some");r({target:"Array",proto:!0,forced:!s||!o},{some:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},"4da4":function(t,e,n){},"63c6":function(t,e,n){},7650:function(t,e,n){"use strict";n("4de4"),n("4160"),n("caad"),n("d81d"),n("45fc"),n("b0c0"),n("d3b7"),n("4ae1"),n("25f0"),n("6062"),n("2532"),n("3ca3"),n("159b"),n("ddb0");var r=n("fc11"),a=(n("96cf"),n("c964")),i=n("d0ff"),c=n("f3f3"),s=n("276c"),o=n("e954"),u=n("920b"),l=n("e1a7"),d=n("f20d"),f=n("9ab4"),p=n("b412"),h=n("1d5e"),m=n("60a3");function v(t){function e(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}return function(){var n,r=Object(d["a"])(t);if(e()){var a=Object(d["a"])(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(l["a"])(this,n)}}e["a"]=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.name,l=void 0===n?"searchList":n,d=e.span,b=void 0===d?[]:d,y=e.userFn,g=void 0!==y&&y,O=function(t){Object(u["a"])(n,t);var e=v(n);function n(){var t;return Object(s["a"])(this,n),t=e.apply(this,arguments),t.options={},t.deviceFormItems=[{type:"select",name:"districtIds",contentAttrs:{multiple:!0},showHidden:!0},{type:"cascader",name:"areaIds",itemAttrs:{label:"安装区域"},colAttrs:{span:b[0]},contentAttrs:{props:{multiple:!0,label:"name",value:"id",emitPath:!1,checkStrictly:!0},"collapse-tags":!0,"show-all-levels":!1,placeholder:"请选择安装区域"}},{type:"select",name:"deviceIds",itemAttrs:{label:"安装设备"},colAttrs:{span:b[1]},contentAttrs:{filterable:!0,multiple:!0,clearable:!0,"collapse-tags":!0,placeholder:"请选择安装设备"}}],t}return Object(o["a"])(n,[{key:"created",value:function(){g||(this[l]=Object(c["a"])({districtId:[],districtIds:[],deviceIds:[],areaIds:[]},this[l]),this.options=Object(c["a"])({deviceIds:[],areaIds:[]},this.options)),this.getAreaIds()}},{key:"_devicechangeData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.deviceKey,r=void 0===n?"deviceInfo":n,a=this.GFdeepclone(t),s=a[r]||[],o=new Set,u=new Set;return s.forEach((function(t){o.add(t.deviceId),u.add(t.areaId)})),Object(c["a"])({},a,{deviceIds:Object(i["a"])(o),areaIds:Object(i["a"])(u)})}},{key:"_getDefaultDevice",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var n,r,a,i,c,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,h["a"].defaultQuery({userType:e});case 2:return n=t.sent,r=this._devicechangeData(n||[]),a=r.deviceIds,i=void 0===a?[]:a,c=r.areaIds,s=void 0===c?[]:c,this[l].areaIds=s,this[l].deviceIds=i,t.abrupt("return",{deviceIds:i,areaIds:s});case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getAreaIds",value:function(){var t=this;this.$ajax("/sysetting/deviceArea/tree",{}).then((function(e){t[l].areaIds=[],t.options.areaIds=[],t.options.areaIds=e.data}))}},{key:"getDistrictId",value:function(t){return this.$ajax("/component/device/district/get/sub",{id:t})}},{key:"getDistrictId1",value:function(t){var e=this;this.$ajax("/component/device/district/list",{}).then((function(t){var n=e.GFmapping(t.data,{label:"districtName",value:"id"});e.options.districtId=Object(p["a"])(n,{parentKey:"parentId",childrenKey:"children"})}))}},{key:"getDeviceIds",value:function(t){var e=this;t&&t.length>0?this.$ajax("/component/device/list",{areaIds:t,districtId:this[l].districtId[this[l].districtId.length-1]}).then((function(t){e.options.deviceIds=e.GFmapping(t.data,{label:"deviceName",value:"id"}),e.setSelectDeviceIds(e.options.deviceIds)})):(this[l].deviceIds=[],this.options.deviceIds=[])}},{key:"setSelectDeviceIds",value:function(t){this[l].deviceIds=this[l].deviceIds.filter((function(e){return t.some((function(t){return t.value===e}))}))}},{key:"_getDeviceCode",value:function(){var t=this;return this.options.deviceIds.filter((function(e){return t[l].deviceIds.includes(e.deviceId)})).map((function(t){return t.deviceCode}))}},{key:"_addDeviceCode",value:function(){this[l].deviceCodes=this._getDeviceCode()}}]),n}(m["h"]);return O=Object(f["a"])([Object(m["a"])({watch:(t={},Object(r["a"])(t,"".concat(l,".districtId"),(function(t){t.length>0?this[l].districtIds=[t[t.length-1]]:this[l].districtIds=[]})),Object(r["a"])(t,"".concat(l,".areaIds"),(function(t){this.getDeviceIds(t)})),t)})],O),O}},a434:function(t,e,n){"use strict";var r=n("23e7"),a=n("23cb"),i=n("a691"),c=n("50c4"),s=n("7b0b"),o=n("65f0"),u=n("8418"),l=n("1dde"),d=n("ae40"),f=l("splice"),p=d("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,m=Math.min,v=9007199254740991,b="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!f||!p},{splice:function(t,e){var n,r,l,d,f,p,y=s(this),g=c(y.length),O=a(t,g),j=arguments.length;if(0===j?n=r=0:1===j?(n=0,r=g-O):(n=j-2,r=m(h(i(e),0),g-O)),g+n-r>v)throw TypeError(b);for(l=o(y,r),d=0;dg-r+n;d--)delete y[d-1]}else if(n>r)for(d=g-r;d>O;d--)f=d+r-1,p=d+n-1,f in y?y[p]=y[f]:delete y[p];for(d=0;d0&&(this.checked=!0),this.timeRanges=t.map((function(t){return{key:Math.random(),timeRange:[t.beginTime,t.endTime]}}))}},{key:"addClick",value:function(){if(this.timeRanges.length<5){var t=this.timeRanges[this.timeRanges.length-1]||{},e=t.timeRange&&t.timeRange[1]||"";this.timeRanges.push({key:Math.random(),timeRange:[e,e]})}}},{key:"delClick",value:function(t){this.timeRanges.splice(t,1)}},{key:"timeRangerSetting",value:function(){this.showSetting=!this.showSetting}},{key:"checkTime",value:function(){var t=this,e=!0;return 0!==this.timeRanges.length&&(this.timeRanges.forEach((function(n,r){if(e){var a=n.timeRange,i=0===r?[0,0]:t.timeRanges[r-1].timeRange;a[0]>=a[1]&&(e=!1),t.stringToNum(a[0])0})),timeRange:[e.addList.timeRange[0],_()(e.addList.timeRange[1]).endOf("day").valueOf()]});console.warn(r),e.typeObj.add?v["a"].add(r,{_this:e,loading:"loading"}).then((function(t){e.closeModal()})):v["a"].edit(r,{_this:e,loading:"loading"}).then((function(t){e.closeModal()}))}));case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"formItems",get:function(){return[{type:"input",name:"passableTimeName",formItemAttrs:{label:"规则名称"},colAttrs:{span:24},rules:[{required:!0,message:"请输入规则名称",trigger:"blur"}],contentAttrs:{placeholder:"请输入规则名称"}},{type:"datePicker",name:"timeRange",formItemAttrs:{label:"通行日期"},colAttrs:{span:24},rules:[{required:!0,message:"请输入通行日期",trigger:"blur"}],contentAttrs:{placeholder:"请输入通行日期",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"}},{type:"input",name:"cycle",isSlot:!0,formItemAttrs:{label:"循环周期"},colAttrs:{span:24}}]}}]),n}(Object(m["c"])(Object(D["a"])()));Object(f["a"])([Object(m["g"])()],J.prototype,"c1",void 0),Object(f["a"])([Object(m["g"])()],J.prototype,"cwform",void 0),Object(f["a"])([Object(m["g"])()],J.prototype,"c2",void 0),Object(f["a"])([Object(m["g"])()],J.prototype,"c3",void 0),Object(f["a"])([Object(m["g"])()],J.prototype,"c4",void 0),Object(f["a"])([Object(m["g"])()],J.prototype,"c5",void 0),Object(f["a"])([Object(m["g"])()],J.prototype,"c6",void 0),Object(f["a"])([Object(m["g"])()],J.prototype,"c7",void 0),J=Object(f["a"])([Object(m["a"])({components:{CycleTime:P,CycleTimeItem:z}})],J);var W=J,Y=W,X=(n("0ded"),Object(w["a"])(Y,C,T,!1,null,"3ea750c3",null)),Z=X.exports;function tt(t){function e(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}return function(){var n,r=Object(d["a"])(t);if(e()){var a=Object(d["a"])(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(l["a"])(this,n)}}var et=function(t){Object(u["a"])(n,t);var e=tt(n);function n(){var t;return Object(s["a"])(this,n),t=e.apply(this,arguments),t.tableData=[],t.searchList={},t.options={recordResult:t.GFgetTypeConfig("RECOGNITION_RESULT",{type:"select"}),openDoorTypeCode:t.GFgetTypeConfig("OPEN_DOOR_TYPE",{type:"select"})},t}return Object(o["a"])(n,[{key:"created",value:function(){this.getList()}},{key:"activated",value:function(){this.getList()}},{key:"getData",value:function(){var t=Object(c["a"])(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,v["a"].query(e,{_this:this,loading:"loading"});case 2:n=t.sent,this.paginationAttrs.total=0,this.tableData=n;case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"addClick",value:function(){var t=Object(c["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.refAdd.showModal({type:"add",title:"新增通行时间"},{});case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"editClick",value:function(){var t=Object(c["a"])(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=e.row,this.refAdd.showModal({type:"edit",title:"编辑通行时间"},Object(i["a"])({},n));case 2:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"addDevice",value:function(t){this.$router.push({path:"/acs/urgent/index/add",query:{id:t.id}})}},{key:"delClick",value:function(t){var e=this,n=t.row;this.GFdc({content:"确定删除吗?"}).then((function(){v["a"].delete({ids:[n.id]}).then((function(t){e.delPage()}))}))}},{key:"opItems",get:function(){return[{type:"button",command:"add",label:"添加通行时间规则",btnAttrs:{type:"primary"}}]}},{key:"formItems",get:function(){return[]}}]),n}(Object(m["c"])(Object(p["tableMixin"])(),Object(h["a"])({name:"searchList",getDeviceIdsUrl:"/acs/urgentGroup/deviceListByArea"})));Object(f["a"])([Object(m["e"])({type:String,default:""})],et.prototype,"name",void 0),Object(f["a"])([Object(m["g"])()],et.prototype,"refAdd",void 0),et=Object(f["a"])([Object(m["a"])({name:"UrgentIndex",components:{Card:x,AddEdit:Z}})],et);var nt=et,rt=nt,at=(n("bc1f"),Object(w["a"])(rt,r,a,!1,null,"00d672ea",null));e["default"]=at.exports},e654:function(t,e,n){"use strict";var r=n("ce89"),a=n.n(r);a.a}}]);