mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
86fc4eb695
Former-commit-id: 227ec9664fa803a11a731cf5336437c497f17066
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window["webpackJsonp_ninca-crk-access-control"]=window["webpackJsonp_ninca-crk-access-control"]||[]).push([["chunk-4f868891"],{"0e92":function(t,e,a){},"1d5e":function(t,e,a){"use strict";var n=a("c7eb"),i=a("5530"),r=a("1da1"),s=a("d4ec"),c=a("bee2"),o=a("262e"),u=a("2caf"),d=a("2ff6"),l={defaultEdit:"/api/terminal/default/edit",defaultQuery:"/api/terminal/default/query",count:"/api/terminal/count",personDel:"/api/terminal/persons/delete"},p=function(t){Object(o["a"])(a,t);var e=Object(u["a"])(a);function a(){return Object(s["a"])(this,a),e.apply(this,arguments)}return Object(c["a"])(a,[{key:"defaultEdit",value:function(){var t=Object(r["a"])(Object(n["a"])().mark((function t(){var e,a,r,s,c=arguments;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1&&void 0!==c[1]?c[1]:{},r=Object.assign(e),t.next=5,this.$ajax(l.defaultEdit,r,Object(i["a"])({tip:"配置成功"},a));case 5:return s=t.sent,t.abrupt("return",s);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(r["a"])(Object(n["a"])().mark((function t(){var e,a,i,r,s=arguments;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=s.length>0&&void 0!==s[0]?s[0]:{},a=s.length>1&&void 0!==s[1]?s[1]:{},i=Object.assign(e),t.next=5,this.$ajax(l.defaultQuery,i,a);case 5:return r=t.sent,t.abrupt("return",{deviceInfo:r.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(r["a"])(Object(n["a"])().mark((function t(){var e,a,r,s,c=arguments;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1&&void 0!==c[1]?c[1]:{},r=Object.assign(e),t.next=5,this.$ajax(l.count,r,Object(i["a"])({},a));case 5:return s=t.sent,t.abrupt("return",s.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(r["a"])(Object(n["a"])().mark((function t(){var e,a,r,s,c=arguments;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1&&void 0!==c[1]?c[1]:{},r=Object.assign(e),t.next=5,this.$ajax(l.personDel,r,Object(i["a"])({},a));case 5:return s=t.sent,t.abrupt("return",s);case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}]),a}(d["a"]);e["a"]=new p},6268:function(t,e,a){"use strict";a("798e")},"6ed6":function(t,e,a){"use strict";a("0e92")},"763c":function(t,e,a){},7650:function(t,e,a){"use strict";var n=a("ade3"),i=a("c7eb"),r=a("1da1"),s=a("2909"),c=a("5530"),o=a("d4ec"),u=a("bee2"),d=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")),f=a("b412"),v=a("1d5e"),h=a("60a3");e["a"]=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.name,b=void 0===a?"searchList":a,m=e.span,y=void 0===m?[]:m,g=e.userFn,O=void 0!==g&&g,j=function(t){Object(d["a"])(a,t);var e=Object(l["a"])(a);function a(){var t;return Object(o["a"])(this,a),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:y[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:y[1]},contentAttrs:{filterable:!0,multiple:!0,clearable:!0,"collapse-tags":!0,placeholder:"请选择安装设备"}}],t}return Object(u["a"])(a,[{key:"created",value:function(){O||(this[b]=Object(c["a"])({districtId:[],districtIds:[],deviceIds:[],areaIds:[]},this[b]),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]:{},a=e.deviceKey,n=void 0===a?"deviceInfo":a,i=this.GFdeepclone(t),r=i[n]||[],o=new Set,u=new Set;return r.forEach((function(t){o.add(t.deviceId),u.add(t.areaId)})),Object(c["a"])(Object(c["a"])({},i),{},{deviceIds:Object(s["a"])(o),areaIds:Object(s["a"])(u)})}},{key:"_getDefaultDevice",value:function(){var t=Object(r["a"])(Object(i["a"])().mark((function t(e){var a,n,r,s,c,o;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,v["a"].defaultQuery({userType:e});case 2:return a=t.sent,n=this._devicechangeData(a||[]),r=n.deviceIds,s=void 0===r?[]:r,c=n.areaIds,o=void 0===c?[]:c,this[b].areaIds=o,this[b].deviceIds=s,t.abrupt("return",{deviceIds:s,areaIds:o});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[b].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 a=e.GFmapping(t.data,{label:"districtName",value:"id"});e.options.districtId=Object(f["a"])(a,{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[b].districtId[this[b].districtId.length-1]}).then((function(t){e.options.deviceIds=e.GFmapping(t.data,{label:"deviceName",value:"id"}),e.setSelectDeviceIds(e.options.deviceIds)})):(this[b].deviceIds=[],this.options.deviceIds=[])}},{key:"setSelectDeviceIds",value:function(t){this[b].deviceIds=this[b].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[b].deviceIds.includes(e.deviceId)})).map((function(t){return t.deviceCode}))}},{key:"_addDeviceCode",value:function(){this[b].deviceCodes=this._getDeviceCode()}}]),a}(h["h"]);return j=Object(p["a"])([Object(h["a"])({watch:(t={},Object(n["a"])(t,"".concat(b,".districtId"),(function(t){t.length>0?this[b].districtIds=[t[t.length-1]]:this[b].districtIds=[]})),Object(n["a"])(t,"".concat(b,".areaIds"),(function(t){this.getDeviceIds(t)})),t)})],j),j}},"798e":function(t,e,a){},"7d38":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("CwMainLayout",{staticClass:"common-idf",attrs:{loading:t.loading},scopedSlots:t._u([{key:"op-header",fn:function(){return[e("CwHeaderLayout",{attrs:{showBottomLine:""},scopedSlots:t._u([{key:"op",fn:function(){return[e("CwOp",{attrs:{items:t.opItems}})]},proxy:!0}])},[e("CwSearchForm",{attrs:{formItems:t.formItems,options:t.options,ruleForm:t.searchList}})],1)]},proxy:!0}])},[e("InCardWrap",{ref:"cardwrap",attrs:{data:t.tableData,query:t.searchList,paginationAttrs:t.paginationAttrs},on:{"pagination-change":function(e){return t.getList(!1)}},scopedSlots:t._u([{key:"default",fn:function(a){return[e("Card",t._b({on:{add:t.addDevice,open:t.openDevice,reset:t.resetDevice}},"Card",a,!1))]}}])}),e("CwAsyncWrap",{ref:"refAdd"},[e("AddEdit",{on:{getList:t.getList}})],1)],1)},i=[],r=a("c7eb"),s=a("1da1"),c=a("2909"),o=a("d4ec"),u=a("bee2"),d=a("262e"),l=a("2caf"),p=(a("14d9"),a("9ab4")),f=a("4d8e"),v=a("7650"),h=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("in-card-qz",{staticClass:"in-qz-card",attrs:{"disabled-card-click":"",row:t.row,cardAttrs:t.cardAttrs,tops:t.tops,contents:[],pics:[]},scopedSlots:t._u([{key:"contents",fn:function(){return[e("div",{staticClass:"card-content"},[e("div",{staticClass:"content-top common-padding"},[e("div",{staticClass:"text-left"},[e("div",{staticClass:"text"},[t._v("门禁设备:")]),t.row.deviceCount<1e3?e("div",{staticClass:"num"},[t._v(" "+t._s(t.row.deviceCount)+" "),e("span",{staticClass:"unit"},[t._v("台")])]):e("div",{staticClass:"num"},[t._v(" 999+ "),e("span",{staticClass:"unit"},[t._v("台")])])]),e("div",{staticClass:"text-right",on:{click:function(e){return t.emitDevice("add")}}},[t.row.deviceCount>0?e("span",{staticClass:"text"},[t._v("查看")]):e("span",{staticClass:"text"},[t._v("添加设备")]),e("i",{staticClass:"el-icon-arrow-right icon"})])]),e("div",{staticClass:"common-padding"},[e("div",{staticClass:"line-wrap"},[1===t.row.isDefaultGroup?e("div",{staticClass:"tag"},[t._v(" 快速执行组 ")]):t._e()])]),e("ul",{staticClass:"content-list common-padding"},[e("li",{staticClass:"list-item"},[e("InCell",{attrs:{label:"创建人",text:t.row.createUserName}})],1),e("li",{staticClass:"list-item"},[e("InCell",{attrs:{label:"创建时间",text:t._f("GLdateFormat")(t.row.createTime)}})],1),e("li",{staticClass:"list-item"},[e("InCell",{attrs:{label:"更新时间",text:t._f("GLdateFormat")(t.row.lastUpdateTime)}})],1)]),e("div",{staticClass:"footer-button"},[e("div",{staticClass:"button-left button-text"},[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.emitDevice("open")}}},[t._v("打开门禁组")])],1),e("div",{staticClass:"button-right button-text"},[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.emitDevice("reset")}}},[t._v("恢复该门禁组")])],1)])])]},proxy:!0}])})},b=[],m=a("60a3"),y=function(t){Object(d["a"])(a,t);var e=Object(l["a"])(a);function a(){var t;return Object(o["a"])(this,a),t=e.apply(this,arguments),t.cardAttrs={style:{}},t}return Object(u["a"])(a,[{key:"tops",get:function(){return{attrs:{},left:{attrs:{style:{width:"90%"}},text:this.row.groupName},action:{dropitems:[{command:"edit",label:"编辑"},{command:"del",label:"删除"}]}}}},{key:"emitDevice",value:function(t){this.$emit(t,this.row)}}]),a}(m["h"]);Object(p["a"])([Object(m["e"])({type:Object})],y.prototype,"row",void 0),y=Object(p["a"])([Object(m["a"])({inheritAttrs:!1,components:{}})],y);var g=y,O=g,j=(a("85f7"),a("2877")),w=Object(j["a"])(O,h,b,!1,null,"24e5f7b2",null),I=w.exports,k=a("12c1"),C=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("CwModal",{ref:"infoModal",staticClass:"addedit-modal",class:{add_modal:t.typeObj.add},attrs:{width:"400px",title:t.ops.title,submitLoading:t.loading,showFooter:!0},on:{confirm:t.submitFrom,closes:t.close}},[e("CwForm",{ref:"cwform",attrs:{formAttrs:t.formAttrs,formItems:t.formItems,options:t.options,rules:t.rules,ruleForm:t.addList}})],1)},x=[],_=a("48b1"),D=function(t){Object(d["a"])(a,t);var e=Object(l["a"])(a);function a(){var t;return Object(o["a"])(this,a),t=e.apply(this,arguments),t.addList={groupName:"",isDefaultGroup:0},t.options={},t.rules={groupName:[{required:!0,message:"请输入紧急疏散组名称",trigger:"blur"}]},t}return Object(u["a"])(a,[{key:"formItems",get:function(){return[{type:"input",name:"groupName",itemAttrs:{label:"紧急疏散组名称","label-width":"9em"},contentAttrs:{placeholder:"请输入紧急疏散组名称"}},{type:"checkbox",name:"isDefaultGroup",itemAttrs:{label:"","label-width":"9em"},contentAttrs:{text:"设为快速执行组","true-label":1,"false-label":0}}]}},{key:"getDetail",value:function(){var t=Object(s["a"])(Object(r["a"])().mark((function t(e,a){return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));function e(e,a){return t.apply(this,arguments)}return e}()},{key:"submitFrom",value:function(){var t=Object(s["a"])(Object(r["a"])().mark((function t(){var e=this;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.formRef.validate().then((function(t){var a=e.typeObj.add?"/acs/urgentGroup/add":"acs/urgentGroup/edit";e.$ajax(a,e.addList,{loading:"loading"}).then((function(){e.closeModal()}))}));case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}]),a}(Object(m["c"])(Object(_["a"])()));D=Object(p["a"])([m["a"]],D);var A=D,L=A,F=(a("6ed6"),Object(j["a"])(L,C,x,!1,null,"0287597f",null)),G=F.exports,N=function(t){Object(d["a"])(a,t);var e=Object(l["a"])(a);function a(){var t;return Object(o["a"])(this,a),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(u["a"])(a,[{key:"created",value:function(){this.getList()}},{key:"activated",value:function(){this.getList()}},{key:"opItems",get:function(){return[{type:"button",command:"add",label:"添加疏散组",btnAttrs:{type:"primary"}},{type:"button",command:"open",label:"打开全部门禁"},{type:"button",command:"close",label:"关闭全部门禁"}]}},{key:"formItems",get:function(){return Object(c["a"])(this.deviceFormItems)}},{key:"getData",value:function(){var t=Object(s["a"])(Object(r["a"])().mark((function t(e){var a,n,i;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,k["a"].urgentGroupPage(e,{_this:this,loading:"loading"});case 2:a=t.sent,n=a.total,i=a.datas,this.paginationAttrs.total=n,this.tableData=i;case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"addClick",value:function(){var t=Object(s["a"])(Object(r["a"])().mark((function t(){return Object(r["a"])().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(s["a"])(Object(r["a"])().mark((function t(e){var a;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=e.row,this.refAdd.showModal({type:"edit",title:"编辑疏散组"},{id:a.id,isDefaultGroup:a.isDefaultGroup,groupName:a.groupName});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:"openClick",value:function(){var t=this;this.GFdc({type:"warning",content:"你确定打开所有门禁吗?"}).then((function(){k["a"].groupOn({},{tip:"打开所有门禁成功"}).then((function(e){t.getList()}))}))}},{key:"closeClick",value:function(){var t=this;k["a"].groupOff({},{tip:"关闭所有门禁成功"}).then((function(e){t.getList()}))}},{key:"openDevice",value:function(t){var e=this;k["a"].groupOn({groupId:t.id},{tip:"打开成功"}).then((function(t){e.getList()}))}},{key:"resetDevice",value:function(t){var e=this;k["a"].groupOff({groupId:t.id},{tip:"恢复成功"}).then((function(t){e.getList()}))}},{key:"delClick",value:function(t){var e=this,a=t.row;this.GFdc({content:"确定删除吗?"}).then((function(){k["a"].delete({ids:[a.id]}).then((function(t){e.delPage()}))}))}}]),a}(Object(m["c"])(Object(f["tableMixin"])(),Object(v["a"])({name:"searchList",getDeviceIdsUrl:"/acs/urgentGroup/deviceListByArea"})));Object(p["a"])([Object(m["e"])({type:String,default:""})],N.prototype,"name",void 0),Object(p["a"])([Object(m["g"])()],N.prototype,"refAdd",void 0),N=Object(p["a"])([Object(m["a"])({name:"UrgentIndex",components:{Card:I,AddEdit:G}})],N);var S=N,$=S,E=(a("6268"),Object(j["a"])($,n,i,!1,null,"49419330",null));e["default"]=E.exports},"85f7":function(t,e,a){"use strict";a("763c")}}]); |