(window["webpackJsonp_ninca-crk-access-control"]=window["webpackJsonp_ninca-crk-access-control"]||[]).push([["chunk-09e8f0b0"],{"1d5e":function(e,t,a){"use strict";var n=a("c7eb"),r=a("5530"),i=a("1da1"),c=a("d4ec"),s=a("bee2"),o=a("262e"),d=a("2caf"),u=a("2ff6"),l={defaultEdit:"/api/terminal/default/edit",defaultQuery:"/api/terminal/default/query",count:"/api/terminal/count",personDel:"/api/terminal/persons/delete"},p=function(e){Object(o["a"])(a,e);var t=Object(d["a"])(a);function a(){return Object(c["a"])(this,a),t.apply(this,arguments)}return Object(s["a"])(a,[{key:"defaultEdit",value:function(){var e=Object(i["a"])(Object(n["a"])().mark((function e(){var t,a,i,c,s=arguments;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=s.length>1&&void 0!==s[1]?s[1]:{},i=Object.assign(t),e.next=5,this.$ajax(l.defaultEdit,i,Object(r["a"])({tip:"配置成功"},a));case 5:return c=e.sent,e.abrupt("return",c);case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"defaultQuery",value:function(){var e=Object(i["a"])(Object(n["a"])().mark((function e(){var t,a,r,i,c=arguments;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1&&void 0!==c[1]?c[1]:{},r=Object.assign(t),e.next=5,this.$ajax(l.defaultQuery,r,a);case 5:return i=e.sent,e.abrupt("return",{deviceInfo:i.data||[]});case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"count",value:function(){var e=Object(i["a"])(Object(n["a"])().mark((function e(){var t,a,i,c,s=arguments;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=s.length>1&&void 0!==s[1]?s[1]:{},i=Object.assign(t),e.next=5,this.$ajax(l.count,i,Object(r["a"])({},a));case 5:return c=e.sent,e.abrupt("return",c.data);case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"personDel",value:function(){var e=Object(i["a"])(Object(n["a"])().mark((function e(){var t,a,i,c,s=arguments;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=s.length>1&&void 0!==s[1]?s[1]:{},i=Object.assign(t),e.next=5,this.$ajax(l.personDel,i,Object(r["a"])({},a));case 5:return c=e.sent,e.abrupt("return",c);case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),a}(u["a"]);t["a"]=new p},"1fbb":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("CwMainLayout",{staticClass:"common-idf",attrs:{loading:e.loading},scopedSlots:e._u([{key:"op-header",fn:function(){return[t("CwHeaderLayout",{attrs:{showBottomLine:""},scopedSlots:e._u([{key:"op",fn:function(){return[t("CwOp",{attrs:{items:e.opItems}})]},proxy:!0}])},[t("CwSearchForm",{attrs:{formItems:e.formItems,options:e.options,ruleForm:e.searchList}})],1)]},proxy:!0}])},[t("InCardWrap",{ref:"cardwrap",attrs:{data:e.tableData,query:e.searchList,paginationAttrs:e.paginationAttrs},on:{"pagination-change":function(t){return e.getList(!1)}},scopedSlots:e._u([{key:"default",fn:function(a){return[t("Card",e._b({},"Card",a,!1))]}}])}),t("Detail",{ref:"refDetail"})],1)},r=[],i=a("5530"),c=a("c7eb"),s=a("1da1"),o=a("2909"),d=a("d4ec"),u=a("bee2"),l=a("262e"),p=a("2caf"),h=(a("99af"),a("9ab4")),v=a("4d8e"),b=a("7650"),f=a("f29f"),y=a("60a3"),j=a("2453"),m=a("6733"),O=a("a705"),I=function(e){Object(l["a"])(a,e);var t=Object(p["a"])(a);function a(){var e;return Object(d["a"])(this,a),e=t.apply(this,arguments),e.tableData=[],e.searchList={timeRange:e.GFinitDay(7),personName:"",recordResult:"",openDoorTypeCode:""},e.options={recordResult:e.GFgetTypeConfig("RECOGNITION_RESULT",{type:"select"}),openDoorTypeCode:e.GFgetTypeConfig("OPEN_DOOR_TYPE",{type:"select"})},e}return Object(u["a"])(a,[{key:"created",value:function(){this.getList()}},{key:"opItems",get:function(){return[{type:"button",command:"export",label:"导出",btnAttrs:{type:"primary"}}]}},{key:"formItems",get:function(){return[{type:"input",name:"displayUrl",showHidden:!0},{type:"selectday",name:"timeRange",itemAttrs:{label:"抓拍时间"},colAttrs:{style:"width:auto"},contentAttrs:{disabledDateStart:365}},{type:"input",name:"personName",itemAttrs:{label:"人员姓名"},contentAttrs:{clearable:!0,placeholder:"请输入人员姓名"}}].concat(Object(o["a"])(this.deviceFormItems),[{type:"select",name:"openDoorTypeCode",itemAttrs:{label:"开门方式"},contentAttrs:{clearable:!0,placeholder:"开门方式"}},{type:"select",name:"recordResult",itemAttrs:{label:"开门结果"},contentAttrs:{clearable:!0,placeholder:"开门结果"}}])}},{key:"getData",value:function(){var e=Object(s["a"])(Object(c["a"])().mark((function e(t){var a,n,r;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,j["a"].openpage(t,{_this:this,loading:"loading"});case 2:a=e.sent,n=a.total,r=a.datas,this.paginationAttrs.total=n,this.tableData=r;case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"exportClick",value:function(){var e=Object(s["a"])(Object(c["a"])().mark((function e(){var t;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=Object(i["a"])({},this.searchList),e.next=3,j["a"].openExport(t);case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"cardClick",value:function(e){var t=e.row;this.refDetail.showModal({type:"view",title:"开门记录详情"},t)}}]),a}(Object(y["c"])(Object(v["tableMixin"])(),Object(b["a"])({name:"searchList"})));Object(h["a"])([Object(y["e"])({type:String,default:""})],I.prototype,"name",void 0),Object(h["a"])([Object(y["g"])()],I.prototype,"refDetail",void 0),I=Object(h["a"])([Object(y["a"])({components:{Card:f["a"],Detail:m["a"],ImgUploader:O["a"]}})],I);var g=I,w=g,k=(a("71b8"),a("2877")),D=Object(k["a"])(w,n,r,!1,null,"84804246",null);t["default"]=D.exports},"71b8":function(e,t,a){"use strict";a("9b71")},7650:function(e,t,a){"use strict";var n=a("ade3"),r=a("c7eb"),i=a("1da1"),c=a("2909"),s=a("5530"),o=a("d4ec"),d=a("bee2"),u=a("262e"),l=a("2caf"),p=(a("b0c0"),a("d3b7"),a("6062"),a("3ca3"),a("ddb0"),a("159b"),a("4de4"),a("d81d"),a("caad"),a("2532"),a("9ab4")),h=a("b412"),v=a("1d5e"),b=a("60a3");t["a"]=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.name,f=void 0===a?"searchList":a,y=t.span,j=void 0===y?[]:y,m=t.userFn,O=void 0!==m&&m,I=function(e){Object(u["a"])(a,e);var t=Object(l["a"])(a);function a(){var e;return Object(o["a"])(this,a),e=t.apply(this,arguments),e.options={},e.deviceFormItems=[{type:"select",name:"districtIds",contentAttrs:{multiple:!0},showHidden:!0},{type:"cascader",name:"areaIds",itemAttrs:{label:"安装区域"},colAttrs:{span:j[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:j[1]},contentAttrs:{filterable:!0,multiple:!0,clearable:!0,"collapse-tags":!0,placeholder:"请选择安装设备"}}],e}return Object(d["a"])(a,[{key:"created",value:function(){O||(this[f]=Object(s["a"])({districtId:[],districtIds:[],deviceIds:[],areaIds:[]},this[f]),this.options=Object(s["a"])({deviceIds:[],areaIds:[]},this.options)),this.getAreaIds()}},{key:"_devicechangeData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.deviceKey,n=void 0===a?"deviceInfo":a,r=this.GFdeepclone(e),i=r[n]||[],o=new Set,d=new Set;return i.forEach((function(e){o.add(e.deviceId),d.add(e.areaId)})),Object(s["a"])(Object(s["a"])({},r),{},{deviceIds:Object(c["a"])(o),areaIds:Object(c["a"])(d)})}},{key:"_getDefaultDevice",value:function(){var e=Object(i["a"])(Object(r["a"])().mark((function e(t){var a,n,i,c,s,o;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,v["a"].defaultQuery({userType:t});case 2:return a=e.sent,n=this._devicechangeData(a||[]),i=n.deviceIds,c=void 0===i?[]:i,s=n.areaIds,o=void 0===s?[]:s,this[f].areaIds=o,this[f].deviceIds=c,e.abrupt("return",{deviceIds:c,areaIds:o});case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getAreaIds",value:function(){var e=this;this.$ajax("/sysetting/deviceArea/tree",{}).then((function(t){e[f].areaIds=[],e.options.areaIds=[],e.options.areaIds=t.data}))}},{key:"getDistrictId",value:function(e){return this.$ajax("/component/device/district/get/sub",{id:e})}},{key:"getDistrictId1",value:function(e){var t=this;this.$ajax("/component/device/district/list",{}).then((function(e){var a=t.GFmapping(e.data,{label:"districtName",value:"id"});t.options.districtId=Object(h["a"])(a,{parentKey:"parentId",childrenKey:"children"})}))}},{key:"getDeviceIds",value:function(e){var t=this;e&&e.length>0?this.$ajax("/component/device/list",{areaIds:e,districtId:this[f].districtId[this[f].districtId.length-1]}).then((function(e){t.options.deviceIds=t.GFmapping(e.data,{label:"deviceName",value:"id"}),t.setSelectDeviceIds(t.options.deviceIds)})):(this[f].deviceIds=[],this.options.deviceIds=[])}},{key:"setSelectDeviceIds",value:function(e){this[f].deviceIds=this[f].deviceIds.filter((function(t){return e.some((function(e){return e.value===t}))}))}},{key:"_getDeviceCode",value:function(){var e=this;return this.options.deviceIds.filter((function(t){return e[f].deviceIds.includes(t.deviceId)})).map((function(e){return e.deviceCode}))}},{key:"_addDeviceCode",value:function(){this[f].deviceCodes=this._getDeviceCode()}}]),a}(b["h"]);return I=Object(p["a"])([Object(b["a"])({watch:(e={},Object(n["a"])(e,"".concat(f,".districtId"),(function(e){e.length>0?this[f].districtIds=[e[e.length-1]]:this[f].districtIds=[]})),Object(n["a"])(e,"".concat(f,".areaIds"),(function(e){this.getDeviceIds(e)})),e)})],I),I}},"9b71":function(e,t,a){}}]);