beehole-store-server
Version:
www.bee-hole.com
1 lines • 34.7 kB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b2e5e6a","chunk-4140e03e","chunk-3c3abb67","chunk-7a0ac240","chunk-46fdc5eb"],{"014f":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-drawer",{attrs:{width:"520px",title:e.formTitle,"label-col":4,"wrapper-col":14,visible:e.open,"body-style":{height:"calc(100vh - 100px)",overflow:"auto"}},on:{close:e.cancel}},[t("a-form-model",{ref:"form",attrs:{model:e.form,rules:e.rules}},[t("a-spin",{attrs:{spinning:e.spinning,delay:e.delayTime,tip:"Loading..."}},[t("a-row",{staticClass:"form-row",attrs:{gutter:32}},[t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"姓名",prop:"realname"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.realname,callback:function(t){e.$set(e.form,"realname",t)},expression:"form.realname"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"用户编号",prop:"id"}},[t("a-input",{attrs:{placeholder:"请输入",disabled:"disabled"},model:{value:e.form.id,callback:function(t){e.$set(e.form,"id",t)},expression:"form.id"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"角色",prop:"role"}},[t("a-select",{attrs:{placeholder:"请选择","option-filter-prop":"children"},model:{value:e.form.role,callback:function(t){e.$set(e.form,"role",t)},expression:"form.role"}},e._l(e.roleOptions,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.id}},[e._v(" "+e._s(a.name)+" ")])})),1)],1)],1)],1),t("a-collapse",{attrs:{bordered:!1,expandIconPosition:"left"},scopedSlots:e._u([{key:"expandIcon",fn:function(e){return[t("a-icon",{attrs:{type:"caret-right",rotate:e.isActive?90:0}})]}}])},[t("a-collapse-panel",{key:"1",style:e.customStyle,attrs:{header:"填写更多信息(可选)"}},[t("a-row",{attrs:{gutter:32}},[t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"手机号",prop:"mobile"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"邮箱地址",prop:"email"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"状态",prop:"status"}},[t("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.statusOptions,(function(a,r){return t("a-radio-button",{key:r,attrs:{value:a.value}},[e._v(e._s(a.label))])})),1)],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"性别",prop:"sex"}},[t("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},e._l(e.sexOptions,(function(a,r){return t("a-radio-button",{key:r,attrs:{value:a.value}},[e._v(e._s(a.label))])})),1)],1)],1),t("a-col",{attrs:{lg:24,md:24,sm:24,span:24}},[t("a-form-model-item",{attrs:{label:"备注",prop:"remark"}},[t("a-input",{attrs:{placeholder:"请输入",type:"textarea","allow-clear":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1)],1)],1),t("div",{staticClass:"bottom-control"},[t("a-space",[t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" 保存 ")]),t("a-button",{attrs:{type:"dashed"},on:{click:e.cancel}},[e._v(" 取消 ")])],1)],1)],1)],1)},s=[],o=a("5530"),n=a("1a2e"),i=Object(o["a"])({},n["default"]),l=i,d=(a("ec82"),a("2877")),c=Object(d["a"])(l,r,s,!1,null,null,null);t["default"]=c.exports},"1a2e":function(e,t,a){"use strict";a.r(t);a("d3b7");var r=a("c0c7"),s=a("fcb7"),o=a("6b01"),n=a("2dd7");t["default"]={name:"CreateFormShangHu",props:{deptCheckedValue:{type:Object},statusOptions:{type:Array,required:!0},sexOptions:{type:Array,required:!0},userTypeOptions:{type:Array,required:!0},defalutExpandedKeys:{type:Array}},components:{AntModal:n["a"],SelectDept:o["a"]},data:function(){return{expandedKeys:this.defalutExpandedKeys,spinning:!1,delayTime:100,replaceFields:{children:"children",title:"label",key:"id",value:"id"},customStyle:"background: #fff;ssborder-radius: 4px;margin-bottom: 24px;border: 0;overflow: hidden",postOptions:[],roleOptions:[],initPassword:void 0,formTitle:"",form:{id:void 0,dept_id:0,username:void 0,nickName:void 0,mobile:void 0,email:void 0,sex:"2",status:"1",userType:"2",remark:void 0,postIds:[],role:[]},open:!1,rules:{realname:[{required:!0,message:"用户名称不能为空",trigger:"blur"}],id:[{required:!0,message:"用户编号不能为空",trigger:"blur"}],username:[{required:!0,message:"登录名不能为空",trigger:"blur"},{validator:this.checkUserNameUnique,trigger:"change"}],secretLevel:[{required:!0,message:"密级不能为空",trigger:"blur"}],email:[{type:"email",message:"请正确填写邮箱地址",trigger:["blur","change"]},{validator:this.checkEmailUnique}],mobile:[{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请正确填写手机号",trigger:"blur"},{validator:this.checkPhoneUnique}]}}},filters:{},created:function(){var e=this;this.getConfigKey("sys.user.initPassword").then((function(t){e.initPassword=t.value}))},computed:{},watch:{},methods:{cancel:function(){this.open=!1,this.$emit("close")},reset:function(){void 0!==this.$refs.form&&this.$refs.form.resetFields()},handleAdd:function(){var e=this;this.open=!0,this.formTitle="新增用户",Object(r["h"])().then((function(t){e.postOptions=t.posts,e.roleOptions=t.roles}))},handleUpdate:function(e,t){var a=this;this.open=!0,this.formTitle="修改【"+e.realname+"】信息",this.spinning=!this.spinning;var s=e?e.id:t;Object(r["h"])(s).then((function(e){a.form=e,a.postOptions=e.posts,a.roleOptions=e.roles,a.form.role=null!==e.role?e.role:[],a.spinning=!a.spinning}))},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;var a=JSON.parse(JSON.stringify(e.form));void 0!==e.form.id?Object(r["o"])(a).then((function(t){e.$message.success("修改成功",3),e.open=!1,e.$emit("ok")})):Object(r["a"])(a).then((function(t){e.$message.success("新增成功",3),e.open=!1,e.$emit("ok")}))}))},onLoadData:function(e){return new Promise((function(t){e.dataRef.children?t():Object(s["h"])(e.dataRef.id,1).then((function(a){e.dataRef.children=a,t()}))}))},checkUserNameUnique:function(e,t,a){var s="登陆名称已存在";if(""===t)a();else{var o={username:t,id:void 0!==this.form.id?this.form.id:""};Object(r["d"])(o).then((function(e){e.is_unique?a():a(s)}))}},checkEmailUnique:function(e,t,a){var s="登陆名称已存在";if(""===t)a();else{var o={email:t,id:void 0!==this.form.id?this.form.id:""};Object(r["b"])(o).then((function(e){e.is_unique?a():a(s)}))}},checkPhoneUnique:function(e,t,a){var s="手机号已存在";if(""===t)a();else{var o={mobile:t,id:void 0!==this.form.id?this.form.id:""};Object(r["c"])(o).then((function(e){e.is_unique?a():a(s)}))}}}}},"1a80":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{ref:"content"},[t("a-card",{attrs:{bordered:!1}},[e.showEditModal?t("sys-user-edit-form",{ref:"sysUserEditForm",attrs:{statusOptions:e.statusOptions,sexOptions:e.sexOptions,userTypeOptions:e.userTypeOptions,defalutExpandedKeys:e.expandedKeys},on:{ok:e.getList,close:function(t){e.showEditModal=!1}}}):e._e(),t("a-page-header",{staticStyle:{"border-bottom":"1px solid rgb(235, 237, 240)",padding:"8px 16px"},attrs:{title:""}}),t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-row",{attrs:{gutter:48}},[t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"姓名"}},[t("a-input",{attrs:{placeholder:"请输入姓名","allow-clear":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParam.realname,callback:function(t){e.$set(e.queryParam,"realname",t)},expression:"queryParam.realname"}})],1)],1),t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"登录名"}},[t("a-input",{attrs:{placeholder:"请输入登录名","allow-clear":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParam.username,callback:function(t){e.$set(e.queryParam,"username",t)},expression:"queryParam.username"}})],1)],1),e.advanced?t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"手机号"}},[t("a-input",{attrs:{placeholder:"请输入手机号","allow-clear":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParam.mobile,callback:function(t){e.$set(e.queryParam,"mobile",t)},expression:"queryParam.mobile"}})],1)],1):e._e(),e.advanced?t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"状态"}},[t("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择状态","allow-clear":""},model:{value:e.queryParam.status,callback:function(t){e.$set(e.queryParam,"status",t)},expression:"queryParam.status"}},e._l(e.statusOptions,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.label))])})),1)],1)],1):e._e(),e.advanced?t("a-col",{attrs:{md:8,sm:24}},[t("a-form-item",{attrs:{label:"创建时间"}},[t("a-range-picker",{staticStyle:{width:"100%"},attrs:{valueFormat:"YYYY-MM-DD",format:"YYYY-MM-DD","allow-clear":""},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1)],1):e._e(),t("a-col",[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"right"}},[t("a-button",{attrs:{type:"primary"},on:{click:e.handleQuery}},[t("a-icon",{attrs:{type:"search"}}),e._v("查询")],1),t("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetQuery}},[t("a-icon",{attrs:{type:"redo"}}),e._v("重置")],1),t("a",{staticStyle:{"margin-left":"8px"},on:{click:e.toggleAdvanced}},[e._v(" "+e._s(e.advanced?"收起":"展开")+" "),t("a-icon",{attrs:{type:e.advanced?"up":"down"}})],1)],1)])],1)],1)],1),t("a-divider"),e.showAddModal?t("sys-user-add-form",{ref:"sysUserAddForm",attrs:{statusOptions:e.statusOptions,sexOptions:e.sexOptions,userTypeOptions:e.userTypeOptions,defalutExpandedKeys:e.expandedKeys,deptCheckedValue:e.deptCheckedValue},on:{ok:e.getList,close:function(t){e.showAddModal=!1}}}):e._e(),e.showResetPassword?t("reset-password",{ref:"resetPassword",on:{close:function(t){e.showResetPassword=!1}}}):e._e(),t("import-excel",{ref:"importExcel",attrs:{title:"导入用户","upload-msg":"是否更新已经存在的用户数据","upload-action":"/system/user/importData"},on:{ok:e.getList,importTemplate:e.importTemplate}}),t("advance-table",{attrs:{columns:e.columns,"data-source":e.list,title:e.tableTitle,loading:e.loading,rowKey:"id",size:"middle",tableKey:"system-user-SysUserIndex-table","format-conditions":!0,"row-selection":{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange},pagination:{current:e.queryParam.page,limit:e.queryParam.limit,total:e.total_count,showSizeChanger:!0,showLessItems:!1,showQuickJumper:!1,showTotal:function(t,a){return e.$t("view.item.list.table.total",{num:a[0]+"-"+a[1],total:t})},onChange:e.changeSize,onShowSizeChange:e.onShowSizeChange}},on:{change:e.handleTableChange,refresh:e.getList},scopedSlots:e._u([{key:"status",fn:function(a){var r=a.record;return t("span",{},[t("a-badge",{attrs:{status:"1"===r.status?"processing":"error",text:e.statusFormat(r)}})],1)}},{key:"userType",fn:function(a){var r=a.record;return t("span",{},[e._v(" "+e._s(e.userTypeFormat(r))+" ")])}},{key:"realname",fn:function(a){var r=a.text,s=a.record,o=a.index;return t("span",{},[t("a",{on:{click:function(t){return e.onClickRow(s,o)}}},[t("a-avatar",{staticStyle:{color:"#fff"},style:{backgroundColor:e.getRandomColor(o)}},[e._v(" "+e._s(e.getShowName(r))+" ")]),e._v(" "+e._s(r)+" ")],1)])}},{key:"created_at",fn:function(a,r){return t("span",{},[e._v(" "+e._s(e.parseTime(r.created_at))+" ")])}},{key:"operation",fn:function(a){var r=a.record;return t("span",{},[t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:edit"],expression:"['system:user:edit']"}],on:{click:function(t){return e.handleUpdate(r,void 0)}}},[e._v(" 修改 ")]),1!==r.id?t("a-divider",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:remove"],expression:"['system:user:remove']"}],attrs:{type:"vertical"}}):e._e(),1!==r.id?t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:remove"],expression:"['system:user:remove']"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v(" 删除 ")]):e._e(),t("a-divider",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:resetPwd"],expression:"['system:user:resetPwd']"}],attrs:{type:"vertical"}}),t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:resetPwd"],expression:"['system:user:resetPwd']"}],on:{click:function(t){return e.handleResetPwd(r)}}},[e._v(" 重置密码 ")])],1)}}])},[t("div",{staticClass:"table-operations",attrs:{slot:"button"},slot:"button"},[t("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:add"],expression:"['system:user:add']"}],attrs:{type:"primary"},on:{click:function(t){return e.handleAdd()}}},[t("a-icon",{attrs:{type:"plus"}}),e._v("新增 ")],1),e.multiple?e._e():t("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:remove"],expression:"['system:user:remove']"}],attrs:{type:"danger"},on:{click:e.handleDelete}},[t("a-icon",{attrs:{type:"delete"}}),e._v("删除 ")],1)],1)])],1)],1)},s=[],o=(a("d3b7"),a("159b"),a("d81d"),a("c0c7")),n=a("fcb7"),i=a("e1fd"),l=a("552a"),d=a("014f"),c=a("5457"),u=a("41af"),m=a("5d9e"),p=a("8b63"),f={name:"ShangHu",components:{ResetPassword:i["default"],SysUserEditForm:d["default"],ImportExcel:c["a"],AdvanceTable:m["a"],SysUserAddForm:l["default"],Split:p["a"],DeptTree:u["default"]},data:function(){return{showAddModal:!1,showEditModal:!1,showResetPassword:!1,list:[],colorList:["#F38709","#813AFD","#00C4AA","#4B7AEE"],tableTitle:"用户管理",selectedRowKeys:[],selectedRows:[],advanced:!1,single:!0,multiple:!0,ids:[],userNames:[],expandedKeys:[],loading:!1,total_count:0,statusOptions:[],sexOptions:[],userTypeOptions:[],deptCheckedValue:{},deptOptions:[],dateRange:[],labelCol:{span:6},wrapperCol:{span:18},queryParam:{page:1,limit:10,username:void 0,mobile:void 0,status:void 0,dept_id:void 0},columns:[{title:"姓名",dataIndex:"realname",width:120,scopedSlots:{customRender:"realname"}},{title:"登录名",dataIndex:"username"},{title:"用户状态",dataIndex:"status",scopedSlots:{customRender:"status"},align:"center"},{title:"用户角色",dataIndex:"role_name",scopedSlots:{customRender:"role_name"},align:"center"},{title:"创建时间",ellipsis:!0,sorter:!0,width:200,dataIndex:"created_at",align:"center"},{title:"操作",dataIndex:"operation",width:200,scopedSlots:{customRender:"operation"}}]}},filters:{},created:function(){var e=this;this.getList(),this.getTreeselect(),this.getDicts("sys_normal_disable").then((function(t){e.statusOptions=t})),this.getDicts("sys_user_sex").then((function(t){e.sexOptions=t})),this.getDicts("sys_user_type").then((function(t){e.userTypeOptions=t}))},computed:{},watch:{},methods:{importTemplate:function(e,t){var a=this;Object(o["k"])().then((function(e){a.download(e.msg)}))},getTreeselect:function(){var e=this;Object(n["h"])("0",3).then((function(t){e.deptOptions=t,e.getExpandedKeys(e.deptOptions,3)}))},getExpandedKeys:function(e,t){var a=this;t>1&&e.forEach((function(e){return a.expandedKeys.push(e.id),t-=1,a.getExpandedKeys(e.children,t)}))},statusFormat:function(e){return this.selectDictLabel(this.statusOptions,e.status)},userTypeFormat:function(e){return this.selectDictLabel(this.userTypeOptions,e.userType)},getList:function(){var e=this;this.showAddModal=!1,this.showEditModal=!1,this.loading=!0,Object(o["l"])(this.addDateRange(this.queryParam,this.dateRange)).then((function(t){e.list=t.list,e.total_count=t.total_count,e.loading=!1}))},handleQuery:function(){this.queryParam.page=1,this.getList()},resetQuery:function(){this.dateRange=[],this.queryParam={page:1,limit:10,username:void 0,mobile:void 0,status:void 0,dept_id:void 0},this.handleQuery()},onShowSizeChange:function(e,t){this.queryParam.limit=t,this.getList()},changeSize:function(e,t){this.queryParam.page=e,this.queryParam.limit=t,this.getList()},onSelectChange:function(e,t){this.selectedRowKeys=e,this.selectedRows=t,this.ids=this.selectedRows.map((function(e){return e.id})),this.userNames=this.selectedRows.map((function(e){return e.realname})),this.single=1!==e.length,this.multiple=!e.length},toggleAdvanced:function(){this.advanced=!this.advanced},clickDeptNode:function(e){this.queryParam.dept_id=e.$options.propsData.eventKey,this.deptCheckedValue.ids=e.$options.propsData.eventKey,this.tableTitle=e.$options.propsData.label,"dept"===e.$options.propsData.type?this.deptCheckedValue={ids:e.$options.propsData.eventKey,names:e.$options.propsData.label}:this.deptCheckedValue={},this.getList()},handleAdd:function(){var e=this;this.showAddModal=!0,this.$nextTick((function(){return e.$refs.sysUserAddForm.handleAdd()}))},handleUpdate:function(e,t){var a=this;this.showEditModal=!0,this.$nextTick((function(){return a.$refs.sysUserEditForm.handleUpdate(e,t)}))},handleResetPwd:function(e){var t=this;this.showResetPassword=!0,this.$nextTick((function(){return t.$refs.resetPassword.handleResetPwd(e)}))},handleDelete:function(e){var t=this,a=e.id||this.ids,r=e.realname||this.userNames;this.$confirm({title:"确认删除所选中数据?",content:"当前选中编号为"+r+"的数据",onOk:function(){return Object(o["e"])(a).then((function(){t.onSelectChange([],[]),t.getList(),t.$message.success("删除成功",3)}))},onCancel:function(){}})},handleExport:function(){var e=this;this.$confirm({title:"是否确认导出?",content:"此操作将导出当前条件下所有数据而非选中数据",onOk:function(){return Object(o["f"])(e.queryParam).then((function(t){e.download(t.msg),e.$message.success("导出成功",3)}))},onCancel:function(){}})},getRandomColor:function(e){return this.colorList[e%4]},getShowName:function(e){return e.length>2&&(e=e.substring(e.length-2)),e},onClickRow:function(e,t){this.handleUpdate(e,"")},setDataOptionInfo:function(e){this.deptOptions=e},handleTableChange:function(e,t,a){void 0!==a.field&&null!==a.field&&""!==a.field&&(this.queryParam.orderByColumn="t."+a.field,this.queryParam.isAsc=a.order),this.getList()}}},h=f,b=(a("2110"),a("2877")),y=Object(b["a"])(h,r,s,!1,null,"149b0e20",null);t["default"]=y.exports},2110:function(e,t,a){"use strict";a("9b76")},"41af":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("div",[t("a-input-search",{staticStyle:{"margin-bottom":"8px"},attrs:{placeholder:"输入名称回车查询"},on:{search:e.filterNode}}),e.deptOptions.length>0?t("a-tree",{attrs:{"tree-data":e.deptOptions,replaceFields:e.replaceFields,"default-expanded-keys":e.expandedKeys,"expanded-keys":e.expandedKeys,"auto-expand-parent":e.autoExpandParent,"load-data":e.onLoadData,showIcon:""},on:{select:e.handleNodeClick,expand:e.onExpand},scopedSlots:e._u([{key:"title",fn:function(a){var r=a.title,s=a.attributes;return[r.indexOf(e.searchValue)>-1?t("span",[e._v(" "+e._s(r.substr(0,r.indexOf(e.searchValue)))+" "),t("span",{staticStyle:{color:"#f50"}},[e._v(e._s(e.searchValue))]),e._v(" "+e._s(r.substr(r.indexOf(e.searchValue)+e.searchValue.length))+" ")]):s.deptPinyin.indexOf(e.searchValue)>-1?t("span",[t("span",{staticStyle:{color:"#f50"}},[e._v(e._s(r))])]):t("span",[e._v(e._s(r))])]}}],null,!1,2219245258)},[t("a-icon",{staticClass:"depIcon",attrs:{slot:"org",type:"",component:e.allIcon.companyFillIcon},slot:"org"}),t("a-icon",{staticClass:"depIcon",attrs:{slot:"company",type:"",component:e.allIcon.companyIcon},slot:"company"}),t("a-icon",{staticClass:"depIcon",attrs:{slot:"dept",type:"",component:e.allIcon.connectionsIcon},slot:"dept"})],1):e._e()],1)},s=[],o=(a("d3b7"),a("159b"),a("498a"),a("4de4"),a("d81d"),a("04b3")),n=a("fcb7"),i=function e(t,a){for(var r,s=0;s<a.length;s++){var o=a[s];o.children&&(o.children.some((function(e){return e.id===t}))?r=o.id:e(t,o.children)&&(r=e(t,o.children)))}return r},l={name:"DeptTreeShangHu",props:{deptOptions:{type:Array,required:!0},defalutExpandedKeys:{type:Array}},components:{allIcon:o["a"]},data:function(){return{expandedKeys:this.defalutExpandedKeys,oldDeptOptions:[],oldExpandedKeys:[],allIcon:o["a"],replaceFields:{children:"children",key:"id",value:"id"},deptNodes:[],searchValue:"",autoExpandParent:!0}},filters:{},created:function(){},computed:{},watch:{},methods:{getAllDeptNode:function(e){var t=this;if(!e||0===e.length)return[];e.forEach((function(e){return t.deptNodes.push({id:e.id,label:e.label}),t.getAllDeptNode(e.children)}))},getExpandedKeys:function(e){var t=this;if(!e||0===e.length)return[];e.forEach((function(e){return t.deptNodes.push(e.id),t.getExpandedKeys(e.children)}))},filterNode:function(e,t){var a=this;if(0===this.oldDeptOptions.length&&(this.oldDeptOptions=this.deptOptions,this.oldExpandedKeys=this.expandedKeys),""===e.trim())this.$emit("setDataOptionInfo",this.oldDeptOptions),Object.assign(this,{expandedKeys:this.oldExpandedKeys,searchValue:e,autoExpandParent:!0});else{var r={deptName:e};Object(n["j"])(r).then((function(t){a.$emit("setDataOptionInfo",t.data),a.getExpandedKeys(t.data),Object.assign(a,{expandedKeys:a.deptNodes,searchValue:e,autoExpandParent:!0}),a.deptNodes=[]}))}},handleNodeClick:function(e,t){this.$emit("select",t.node)},onExpand:function(e){this.expandedKeys=e,this.autoExpandParent=!1},onLoadData:function(e){return new Promise((function(t){e.dataRef.children?t():Object(n["h"])(e.dataRef.id,1).then((function(a){a&&(e.dataRef.children=a.data),t()}))}))},searchTree:function(e,t){this.getAllDeptNode(t);var a=t,r=this.deptNodes.map((function(t){return t.label.indexOf(e)>-1?i(t.id,a):null})).filter((function(e,t,a){return e&&a.indexOf(e)===t}));Object.assign(this,{expandedKeys:r,searchValue:e,autoExpandParent:!0}),this.deptNodes=[]}}},d=l,c=(a("f6e8"),a("2877")),u=Object(c["a"])(d,r,s,!1,null,null,null);t["default"]=u.exports},"4cba":function(e,t,a){"use strict";a("92c6")},5457:function(e,t,a){"use strict";var r=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,visible:e.upload.open},on:{cancel:e.importExcelHandleCancel}},[t("a-spin",{attrs:{tip:"上传中...",spinning:"uploading"==e.upload.uploadStatus}},[t("a-upload-dragger",{attrs:{name:"file",accept:".xlsx, .xls","file-list":e.upload.fileList,multiple:!1,headers:e.upload.headers,action:e.upload.url+"?updateSupport="+e.upload.updateSupport},on:{change:e.importExcelHandleChange}},[t("p",{staticClass:"ant-upload-drag-icon"},[t("a-icon",{attrs:{type:"inbox"}})],1),t("p",{staticClass:"ant-upload-text"},[e._v(" 请将文件拖拽到此处上传 ")]),t("p",{staticClass:"ant-upload-hint"},[e._v(" 支持单个上传,也可以点击后选择文件上传 ")])]),t("a-checkbox",{attrs:{checked:0!=e.upload.updateSupport},on:{change:e.handleCheckedUpdateSupport}},[e._v(" "+e._s(e.uploadMsg)+" ")]),t("a",{on:{click:e.importTemplate}},[e._v("下载模板")])],1)],1)},s=[],o=(a("99af"),a("b0c0"),a("8ded")),n=a.n(o),i=a("9fb0"),l={name:"ImportExcel",props:{title:{type:String,default:"Excel导入"},uploadMsg:{type:String,default:"是否更新已经存在的数据"},uploadAction:{type:String,required:!0}},components:{},data:function(){return{upload:{open:!1,uploadStatus:"",fileList:[],isUploading:!1,updateSupport:0,headers:{Authorization:"Bearer "+n.a.get(i["a"])},url:"/admin"+this.uploadAction}}},filters:{},created:function(){},computed:{},watch:{},methods:{importExcelHandleCancel:function(e){this.upload.open=!1,this.upload.fileList=[],this.$emit("ok")},importTemplate:function(){this.$emit("importTemplate")},importExcelHandleOpen:function(e){this.upload.open=!0},importExcelHandleChange:function(e){var t=e.file.status;this.upload.uploadStatus=t,"done"===t?this.$message.success("".concat(e.file.name,": ").concat(e.file.response.msg)):"error"===t&&this.$message.error("".concat(e.file.name,": ").concat(e.file.response.msg)),this.upload.open=!1,this.upload.fileList=[],this.$emit("ok")},handleCheckedUpdateSupport:function(){this.upload.updateSupport=0===this.upload.updateSupport?1:0}}},d=l,c=a("2877"),u=Object(c["a"])(d,r,s,!1,null,null,null);t["a"]=u.exports},"552a":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("ant-modal",{attrs:{visible:e.open,"modal-title":e.formTitle,"adjust-size":!0,modalHeight:"480",modalWidth:"640"},on:{cancel:e.cancel}},[t("a-form-model",{ref:"form",attrs:{slot:"content",model:e.form,rules:e.rules,layout:"vertical"},slot:"content"},[t("a-row",{staticClass:"form-row",attrs:{gutter:32}},[t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"姓名",prop:"realname"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.realname,callback:function(t){e.$set(e.form,"realname",t)},expression:"form.realname"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[void 0===e.form.id?t("a-form-model-item",{attrs:{label:"登录名",prop:"username"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1):e._e()],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"角色",prop:"role"}},[t("a-select",{attrs:{placeholder:"请选择","option-filter-prop":"children"},model:{value:e.form.role,callback:function(t){e.$set(e.form,"role",t)},expression:"form.role"}},e._l(e.roleOptions,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.id}},[e._v(" "+e._s(a.name)+" ")])})),1)],1)],1)],1),t("a-collapse",{attrs:{bordered:!1,expandIconPosition:"left"},scopedSlots:e._u([{key:"expandIcon",fn:function(e){return[t("a-icon",{attrs:{type:"caret-right",rotate:e.isActive?90:0}})]}}])},[t("a-collapse-panel",{key:"1",style:e.customStyle,attrs:{header:"填写更多信息(可选)"}},[t("a-row",{attrs:{gutter:"32"}},[t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"手机号",prop:"mobile"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"邮箱地址",prop:"email"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"状态",prop:"status"}},[t("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.statusOptions,(function(a,r){return t("a-radio-button",{key:r,attrs:{value:a.value}},[e._v(e._s(a.label))])})),1)],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"性别",prop:"sex"}},[t("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},e._l(e.sexOptions,(function(a,r){return t("a-radio-button",{key:r,attrs:{value:a.value}},[e._v(e._s(a.label))])})),1)],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"密码",prop:"password"}},[t("a-input-password",{attrs:{placeholder:"请输入"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1)],1),t("a-col",{attrs:{lg:24,md:24,sm:24,span:24}},[t("a-form-model-item",{attrs:{label:"备注",prop:"remark"}},[t("a-input",{attrs:{placeholder:"请输入",type:"textarea","allow-clear":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1)],1)],1),t("template",{slot:"footer"},[t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" 保存 ")]),t("a-button",{on:{click:e.cancel}},[e._v(" 取消 ")])],1)],2)},s=[],o=a("5530"),n=a("1a2e"),i=Object(o["a"])({},n["default"]),l=i,d=a("2877"),c=Object(d["a"])(l,r,s,!1,null,null,null);t["default"]=c.exports},5612:function(e,t,a){},"8b63":function(e,t,a){"use strict";var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"splitpanle",style:{height:e.splitHeight}},[t("a-layout",{attrs:{id:"components-layout-demo-custom-trigger"}},[t("a-layout-sider",e._g(e._b({attrs:{trigger:null,collapsedWidth:0,theme:"light",width:e.leftWidth,collapsible:""},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},"a-layout-sider",e.$attrs,!1),e.$listeners),[t("div",{staticStyle:{overflow:"auto"}},[e._t("paneL"),t("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"double-right":"double-left"},on:{click:e.clickSplitIcon}})],2)]),t("a-layout-content",{style:{background:"#fff",minHeight:"100%"}},[e._t("paneR")],2)],1)],1)},s=[],o={name:"Split",props:{leftWidth:{type:String,default:"200"},splitHeight:{type:String,default:"100vh"}},data:function(){return{collapsed:!1}},created:function(){},methods:{clickSplitIcon:function(){this.collapsed=!this.collapsed}}},n=o,i=(a("4cba"),a("2877")),l=Object(i["a"])(n,r,s,!1,null,null,null);t["a"]=l.exports},"92c6":function(e,t,a){},"9b76":function(e,t,a){},a3c3:function(e,t,a){},c0c7:function(e,t,a){"use strict";a.d(t,"l",(function(){return o})),a.d(t,"h",(function(){return n})),a.d(t,"a",(function(){return i})),a.d(t,"o",(function(){return l})),a.d(t,"e",(function(){return d})),a.d(t,"f",(function(){return c})),a.d(t,"m",(function(){return u})),a.d(t,"j",(function(){return m})),a.d(t,"p",(function(){return p})),a.d(t,"q",(function(){return f})),a.d(t,"r",(function(){return h})),a.d(t,"k",(function(){return b})),a.d(t,"d",(function(){return y})),a.d(t,"b",(function(){return v})),a.d(t,"c",(function(){return g})),a.d(t,"i",(function(){return w})),a.d(t,"g",(function(){return x})),a.d(t,"n",(function(){return k}));var r=a("b775"),s=a("028d");function o(e){return Object(r["b"])({url:"/member/list",method:"get",params:e})}function n(e){return Object(r["b"])({url:"/member/view",method:"get",params:{id:Object(s["j"])(e)}})}function i(e){return Object(r["b"])({url:"/member/edit",method:"post",data:e})}function l(e){return Object(r["b"])({url:"/member/edit",method:"post",data:e})}function d(e){return Object(r["b"])({url:"/member/delete",method:"post",params:{id:Object(s["j"])(e)}})}function c(e){return Object(r["b"])({url:"/member/export",method:"get",params:e})}function u(e,t){var a={id:e,password:t};return Object(r["b"])({url:"/member/reset_pwd",method:"post",data:a})}function m(){return Object(r["b"])({url:"/member/profile",method:"get"})}function p(e){return Object(r["b"])({url:"/member/update_profile",method:"post",data:e})}function f(e,t){var a={oldPassword:e,newPassword:t};return Object(r["b"])({url:"/member/update_pwd",method:"post",params:a})}function h(e){return Object(r["b"])({url:"/member/update_avatar",method:"post",data:e})}function b(){return Object(r["b"])({url:"/system/user/importTemplate",method:"get"})}function y(e){return Object(r["b"])({url:"/member/name_unique",method:"get",params:e})}function v(e){return Object(r["b"])({url:"/member/email_unique",method:"get",params:e})}function g(e){return Object(r["b"])({url:"/member/mobile_unique",method:"get",params:e})}function w(e){return Object(r["b"])({url:"/member/getUserInfoByIds",method:"post",data:e})}function x(e){return Object(r["b"])({url:"/role/member_list",method:"get",params:e})}function k(e){return Object(r["b"])({url:"/member/addRoleUser",method:"post",data:e})}},e1fd:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,visible:e.open},on:{ok:e.submitForm,cancel:e.cancel}},[t("a-form-model",{ref:"form",attrs:{model:e.form,rules:e.rules}},[t("a-form-model-item",{attrs:{label:"用户名",prop:"username"}},[t("a-input",{attrs:{disabled:!0},model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1),t("a-form-model-item",{attrs:{"has-feedback":"",label:"新密码",prop:"newPassword"}},[t("a-input-password",{attrs:{placeholder:"请输入新密码"},model:{value:e.form.newPassword,callback:function(t){e.$set(e.form,"newPassword",t)},expression:"form.newPassword"}})],1),t("a-form-model-item",{attrs:{"has-feedback":"",label:"确认密码",prop:"confirmPassword"}},[t("a-input-password",{attrs:{placeholder:"请确认密码"},model:{value:e.form.confirmPassword,callback:function(t){e.$set(e.form,"confirmPassword",t)},expression:"form.confirmPassword"}})],1)],1)],1)},s=[],o=(a("ac1f"),a("c0c7")),n={name:"ResetPasswordShangHu",props:{},data:function(){var e=this,t=function(t,a,r){""===a?r(new Error("请输入新密码")):/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$)([^\u4e00-\u9fa5\s]){6,20}$/.test(a)?(""!==e.form.confirmPassword&&e.$refs.form.validateField("confirmPassword"),r()):r(new Error("请输入6-20位英文字母、数字或者符号(除空格),且字母、数字和标点符号至少包含两种"))},a=function(t,a,r){""===a?r(new Error("请再次输入新密码确认")):a!==e.form.newPassword?r(new Error("两次输入的密码不一致")):r()};return{title:"重置密码",open:!1,childrenDrawer:!1,formLayout:"horizontal",form:{username:void 0,newPassword:void 0,confirmPassword:void 0},rules:{newPassword:[{required:!0,validator:t,trigger:"change"}],confirmPassword:[{required:!0,validator:a,trigger:"change"}]}}},methods:{cancel:function(){this.open=!1,this.$emit("close")},reset:function(){this.form={id:void 0,username:void 0,newPassword:void 0,confirmPassword:void 0}},handleResetPwd:function(e){this.form={id:e.id,username:e.username},this.open=!0},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;Object(o["m"])(e.form.id,e.form.newPassword).then((function(t){e.$message.success("重置成功",3),e.open=!1,e.$emit("close")}))}))}}},i=n,l=a("2877"),d=Object(l["a"])(i,r,s,!1,null,null,null);t["default"]=d.exports},ec82:function(e,t,a){"use strict";a("5612")},f6e8:function(e,t,a){"use strict";a("a3c3")}}]);