Files
starRiverProperty/frontend/canoe-person/js/chunk-63466b96.8c2d3080.js
反编译工作区 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
12 KiB
JavaScript

(window["webpackJsonp_park-unit-web"]=window["webpackJsonp_park-unit-web"]||[]).push([["chunk-63466b96"],{"258a":function(e,t,i){"use strict";var a=i("669d"),r=i.n(a);r.a},"2b0f":function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("qz-drawer",{attrs:{title:"添加人员注册设备",visible:e.show,size:698},on:{"update:visible":function(t){e.show=t}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"device-transfer"},[i("el-form",{attrs:{"label-width":"80px"}},[i("el-form-item",{attrs:{label:"设备区域"}},[i("ChooseDeviceArea",{attrs:{areaIds:e.areaIds},on:{"update:areaIds":function(t){e.areaIds=t},"update:area-ids":function(t){e.areaIds=t},change:e.fetchDeviceList}})],1),i("el-form-item",{attrs:{label:"设备名称"}},[i("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入设备名称",clearable:""},on:{change:e.fetchDeviceList},model:{value:e.deviceName,callback:function(t){e.deviceName=t},expression:"deviceName"}}),i("span",{staticClass:"form-btns"},[i("el-button",{attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")]),i("el-button",{on:{click:e.onReset}},[e._v("重置")])],1)],1)],1),i("div",{staticClass:"panel-box"},[i("div",{staticClass:"panel"},[e.deviceList.length>0?e._l(e.deviceList,(function(t,a){return i("div",{key:a,staticClass:"source-item"},[i("span",{class:{active:t.active},on:{click:function(i){return e.onToggleSelect(a,t.active)}}},[e._v(e._s(t.deviceName))])])})):i("qz-no-data")],2),i("div",{staticClass:"panel"},[e.selectedDeviceList.length>0?e._l(e.selectedDeviceList,(function(t,a){return i("div",{key:a,staticClass:"target-item"},[i("span",[e._v(e._s(t.deviceName))]),i("el-button",{attrs:{type:"text"},on:{click:function(i){return e.onRemove(t.deviceCode)}}},[e._v("删除")])],1)})):i("qz-no-data")],2)])],1),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.show=!1}}},[e._v("取消")]),i("el-button",{attrs:{type:"primary"},on:{click:e.onConfirm}},[e._v("确认")])],1)])},r=[],s=(i("c740"),i("4160"),i("caad"),i("d81d"),i("a434"),i("2532"),i("159b"),i("96cf"),i("1da1")),n=i("d4ec"),o=i("bee2"),c=i("99de"),l=i("7e84"),d=i("262e"),u=i("9ab4"),v=i("60a3"),f=i("ab3c"),p=function(e){function t(){var e;return Object(n["a"])(this,t),e=Object(c["a"])(this,Object(l["a"])(t).apply(this,arguments)),e.show=!1,e.areaIds=[],e.deviceName="",e.deviceList=[],e.tempDeviceList=[],e.selectedDeviceList=[],e.loading=!1,e}return Object(d["a"])(t,e),Object(o["a"])(t,[{key:"fetchDeviceList",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,i,a,r,s=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,t={deviceName:this.deviceName},this.areaIds&&this.areaIds.length>0&&(t.areaIds=this.areaIds.map((function(e){return e[e.length-1]}))),e.next=6,this.service.deviceList(t);case 6:i=e.sent,a=i.data,this.loading=!1,this.deviceList=a,this.tempDeviceList=a,this.selectedDeviceList=this.selected||[],r=this.selected.map((function(e){return e.deviceCode})),this.deviceList.forEach((function(e,t){e.active=r.includes(e.deviceCode),s.$set(s.deviceList,t,e)})),e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](0),this.loading=!1;case 19:case"end":return e.stop()}}),e,this,[[0,16]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"onShow",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:try{this.fetchDeviceList(),this.show=!0}catch(t){this.loading=!1}case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"onToggleSelect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t){var i=this.deviceList[e];i.active=!i.active,this.$set(this.deviceList,e,i),i.active&&this.selectedDeviceList.push(i)}}},{key:"onRemove",value:function(e){var t=this.deviceList.findIndex((function(t){return t.deviceCode===e}));if(-1!==t){this.onToggleSelect(t);var i=this.selectedDeviceList.findIndex((function(t){return t.deviceCode===e}));this.selectedDeviceList.splice(i,1)}}},{key:"onConfirm",value:function(){this.$emit("change",this.selectedDeviceList),this.show=!1}},{key:"onSearch",value:function(){this.fetchDeviceList()}},{key:"onReset",value:function(){this.areaIds=[],this.deviceName="",this.fetchDeviceList()}}]),t}(v["e"]);u["a"]([Object(v["c"])({type:Array,default:function(){return[]}})],p.prototype,"selected",void 0),p=u["a"]([Object(v["a"])({name:"DeviceTransfer",components:{ChooseDeviceArea:f["a"]}})],p);var h=p,m=h,b=(i("9bc5"),i("2877")),g=Object(b["a"])(m,a,r,!1,null,"102b0a68",null);t["a"]=g.exports},"669d":function(e,t,i){e.exports={elInputWidth:"200px",elInputNumberWidth:"200px",elTextareaWidth:"300px",elSelectWidth:"200px",primaryColor:"#0075da",primaryHoverColor:"#3391e1",primaryActiveColor:"#0069c4"}},"9bc5":function(e,t,i){"use strict";var a=i("d69ab"),r=i.n(a);r.a},d69ab:function(e,t,i){},df33:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("qz-wrap",{staticClass:"person-setting-wrp",attrs:{loading:e.loading},scopedSlots:e._u([{key:"footer",fn:function(){return[i("el-button",{on:{click:function(t){return e.$router.go(-1)}}},[e._v("取消")]),i("el-button",{attrs:{type:"primary",loading:e.isSaving},on:{click:e.onSave}},[e._v("保存")])]},proxy:!0}])},[i("el-form",{ref:"formRef",staticClass:"person-setting-form qz-form",attrs:{"label-width":"98px",model:e.form}},[i("CwPanel",[i("el-form-item",{attrs:{label:"开启人证注册",prop:"status"}},[i("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}})],1),i("el-form-item",{attrs:{label:"人证注册审核",prop:"deviceStatus"}},[i("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.deviceStatus,callback:function(t){e.$set(e.form,"deviceStatus",t)},expression:"form.deviceStatus"}})],1)],1),1===e.form.status?[i("CwPanel",{attrs:{title:"身份证属性设置"}},e._l(e.form.propertyList,(function(t,a){return i("el-form-item",{key:a,attrs:{label:t.bindPropName,prop:"propertyList."+a+".id",rules:e.requiredCodes.includes(t.bindProp)?e.rules:[]}},[i("el-select",{attrs:{placeholder:"请选择关联属性",clearable:"",filterable:""},model:{value:t.id,callback:function(i){e.$set(t,"id",i)},expression:"item.id"}},[e._l(e.propertyOptions,(function(a){return i("el-option",{key:a.id,attrs:{label:a.name,value:a.id,disabled:a.id!==t.id&&e.hasBindPropertyIds.includes(a.id)||t.type!==a.type}})})),e.requiredCodes.includes(t.bindProp)?e._e():i("el-option",{attrs:{label:"不存储",value:null}})],2)],1)})),1),i("CwPanel",{attrs:{title:"默认属性设置"}},[i("el-form-item",{attrs:{label:"注册默认机构"}},[i("CwOrgChoose",{attrs:{collapse:""},model:{value:e.form.organizationIds,callback:function(t){e.$set(e.form,"organizationIds",t)},expression:"form.organizationIds"}})],1),i("el-form-item",{attrs:{label:"注册默认标签"}},[i("CwLabelChoose",{attrs:{collapse:""},model:{value:e.form.labelIds,callback:function(t){e.$set(e.form,"labelIds",t)},expression:"form.labelIds"}})],1)],1),i("CwPanel",{attrs:{title:"人证注册设备"}},[i("el-button",{attrs:{type:"text"},on:{click:e.onAdd}},[e._v("添加")]),i("CwDivider"),e.form.deviceList&&e.form.deviceList.length>0?i("div",{staticClass:"device-box"},e._l(e.form.deviceList,(function(t){return i("div",{key:t.deviceCode,staticClass:"device-item"},[i("span",[e._v(e._s(t.deviceName))]),i("span",{staticClass:"delete",on:{click:function(i){return i.stopPropagation(),e.onDeviceDelete(t)}}},[e._v("删除")])])})),0):i("qz-no-data",{attrs:{text:"暂无设备"}})],1)]:e._e()],2),i("device-transfer",{ref:"deviceTransferRef",attrs:{selected:e.form.deviceList},on:{change:e.onDeviceChange}})],1)},r=[],s=(i("4de4"),i("c740"),i("4160"),i("a15b"),i("d81d"),i("a434"),i("159b"),i("96cf"),i("1da1")),n=i("d4ec"),o=i("bee2"),c=i("99de"),l=i("7e84"),d=i("262e"),u=i("9ab4"),v=i("60a3"),f=i("2b0f"),p=function(e){function t(){var e;return Object(n["a"])(this,t),e=Object(c["a"])(this,Object(l["a"])(t).apply(this,arguments)),e.form={status:1,deviceStatus:0,codeStatus:1,organizationIds:[],labelIds:[],propertyIdList:[],deviceCodeList:[],organizationList:[],labelList:[],propertyList:[],deviceList:[]},e.propertyOptions=[],e.requiredCodes=["cardId","name"],e.rules=[{required:!0,message:"不能为空",trigger:"change"}],e.isSaving=!1,e.loading=!1,e}return Object(d["a"])(t,e),Object(o["a"])(t,[{key:"created",value:function(){this.fetchSettingDetail(),this.fetchPropertyList()}},{key:"fetchSettingDetail",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,i,a,r,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,this.service.registerSettingDetail({type:1});case 4:t=e.sent,i=t.data,a=[],i.propertyList.forEach((function(e){1===e.hasChecked&&a.push(e.id),"cardImagePath"===e.bindProp?e.type=4:"sex"===e.bindProp?e.type=2:"birthday"===e.bindProp?e.type=3:e.type=1})),this.form=i,this.$set(this.form,"propertyIdList",a),r=i.organizationList?i.organizationList.map((function(e){return e.id})):[],this.$set(this.form,"organizationIds",r),s=i.labelList?i.labelList.map((function(e){return e.id})):[],this.$set(this.form,"labelIds",s),this.$set(this.form,"deviceCodeList",[]),this.loading=!1,e.next=21;break;case 18:e.prev=18,e.t0=e["catch"](0),this.loading=!1;case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"onAdd",value:function(){this.deviceTransferRef.onShow(this.form.deviceList)}},{key:"onDeviceChange",value:function(e){this.form.deviceList=e}},{key:"onDeviceDelete",value:function(e){var t=this.form.deviceList.findIndex((function(t){return t.deviceCode===e.deviceCode}));-1!==t&&this.form.deviceList.splice(t,1)}},{key:"onSave",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.isSaving=!0,e.next=4,this.formRef.validate();case 4:if(0!==this.form.deviceStatus){e.next=9;break}if(this.form.organizationIds&&0!==this.form.organizationIds.length||this.form.labelIds&&0!==this.form.labelIds.length){e.next=9;break}return this.$message.error("未开启注册审核,请设置默认机构/标签"),this.isSaving=!1,e.abrupt("return");case 9:return t=[],this.form.propertyList.forEach((function(e){e.id&&e.bindProp&&t.push({property:e.bindProp,bindPropertyId:e.id})})),i={type:1,status:this.form.status,deviceStatus:this.form.deviceStatus,codeStatus:this.form.codeStatus,organizationIds:this.form.organizationIds?this.form.organizationIds.join(","):"",labelIds:this.form.labelIds?this.form.labelIds.join(","):"",deviceCodeList:this.form.deviceList?this.form.deviceList.map((function(e){return e.deviceCode})):[],propertyList:t},e.next=14,this.service.saveRegisterSetting(i);case 14:this.$message.success("保存成功"),this.isSaving=!1,e.next=21;break;case 18:e.prev=18,e.t0=e["catch"](0),this.isSaving=!1;case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"fetchPropertyList",value:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.service.propertyList({});case 3:t=e.sent,i=t.data,this.propertyOptions=i.properties||[],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:"hasBindPropertyIds",get:function(){var e=this.form.propertyList.filter((function(e){return e.id}));return e.map((function(e){return e.id}))}}]),t}(v["e"]);u["a"]([Object(v["d"])()],p.prototype,"deviceTransferRef",void 0),u["a"]([Object(v["d"])()],p.prototype,"formRef",void 0),p=u["a"]([Object(v["a"])({name:"CardRegister",components:{DeviceTransfer:f["a"]}})],p);var h=p,m=h,b=(i("258a"),i("2877")),g=Object(b["a"])(m,a,r,!1,null,null,null);t["default"]=g.exports}}]);