(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2acddab8","chunk-55f22a1a","chunk-3558aeba","chunk-28466fc8","chunk-47148619"],{"00f8":function(e,t,a){"use strict";a("212b")},"0312":function(e,t,a){"use strict";a("3bf9")},1224:function(e,t,a){"use strict";a.r(t);a("4e82"),a("b0c0");var s=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:"name"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"用户编号",prop:"no"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.no,callback:function(t){e.$set(e.form,"no",t)},expression:"form.no"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"部门",prop:"deptId"}},[t("select-dept",{attrs:{"select-model":"single"},model:{value:e.form.deptId,callback:function(t){e.$set(e.form,"deptId",t)},expression:"form.deptId"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"角色",prop:"roleIds"}},[t("a-select",{attrs:{mode:"multiple",placeholder:"请选择","option-filter-prop":"children"},model:{value:e.form.roleIds,callback:function(t){e.$set(e.form,"roleIds",t)},expression:"form.roleIds"}},e._l(e.roleOptions,(function(a,s){return t("a-select-option",{key:s,attrs:{value:a.id}},[e._v(" "+e._s(a.roleName)+" ")])})),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:"phonenumber"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.phonenumber,callback:function(t){e.$set(e.form,"phonenumber",t)},expression:"form.phonenumber"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"排序号",prop:"sort"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.sort,callback:function(t){e.$set(e.form,"sort",t)},expression:"form.sort"}})],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,s){return t("a-radio-button",{key:s,attrs:{value:a.dictValue}},[e._v(e._s(a.dictLabel))])})),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,s){return t("a-radio-button",{key:s,attrs:{value:a.dictValue}},[e._v(e._s(a.dictLabel))])})),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)},r=[],o=a("5530"),n=a("cab5"),i=Object(o["a"])({},n["default"]),l=i,d=(a("cd77"),a("2877")),c=Object(d["a"])(l,s,r,!1,null,null,null);t["default"]=c.exports},1263:function(e,t,a){},"212b":function(e,t,a){},"3bf9":function(e,t,a){},5457:function(e,t,a){"use strict";var s=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,visible:e.upload.open},on:{ok:e.importExcelHandleOk,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.handleAction},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(" 支持单个上传，也可以点击后选择文件上传 ")])]),e.uploadMsgVisible?t("a-checkbox",{attrs:{checked:0!=e.upload.updateSupport},on:{change:e.handleCheckedUpdateSupport}},[e._v(" "+e._s(e.uploadMsg)+" ")]):e._e(),t("a",{on:{click:e.importTemplate}},[e._v("下载模板")])],1)],1)},r=[],o=(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},uploadMsgVisible:{type:Boolean,required:!1,default:!0}},components:{},data:function(){return{upload:{open:!1,uploadStatus:"",fileList:[],isUploading:!1,updateSupport:0,headers:{Authorization:"Bearer "+n.a.get(i["a"])},url:""+this.uploadAction}}},filters:{},created:function(){},computed:{handleAction:function(){var e=this.upload.url;return e&&(-1===e.indexOf("?")?e+="?":e+="&",e+="updateSupport="+this.upload.updateSupport),e}},watch:{},methods:{importExcelHandleCancel:function(e){this.upload.open=!1,this.upload.fileList=[],this.$emit("close")},importExcelHandleOk:function(e){this.upload.open=!1,this.upload.fileList=[],this.$emit("ok")},importTemplate:function(){this.$emit("importTemplate")},importExcelHandleOpen:function(e){this.upload.uploadStatus="",this.upload.fileList=[],this.upload.open=!0},importExcelHandleChange:function(e){var t=e.file.status;if(this.upload.fileList=e.fileList,this.upload.uploadStatus=t,"done"===t){var a=e.file.response||{},s=a.code,r=a.msg;if(200===s){var o=r||"导入成功";this.$notification.success({message:"".concat(e.file.name),duration:5,description:function(e){return e("div",{domProps:{innerHTML:o}})}}),this.upload.open=!1,this.upload.fileList=[],this.$emit("ok")}else{var n=r||"导入失败";this.$notification.error({message:"".concat(e.file.name),duration:5,description:function(e){return e("div",{domProps:{innerHTML:n}})}})}}else if("error"===t){var i="导入异常";this.$notification.error({message:"".concat(e.file.name),duration:5,description:function(e){return e("div",{domProps:{innerHTML:i}})}})}},handleCheckedUpdateSupport:function(){this.upload.updateSupport=0===this.upload.updateSupport?1:0}}},d=l,c=a("2877"),u=Object(c["a"])(d,s,r,!1,null,null,null);t["a"]=u.exports},"56b8":function(e,t,a){"use strict";a.r(t);var s=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 s=a.title,r=a.attributes;return[s.indexOf(e.searchValue)>-1?t("span",[e._v(" "+e._s(s.substr(0,s.indexOf(e.searchValue)))+" "),t("span",{staticStyle:{color:"#f50"}},[e._v(e._s(e.searchValue))]),e._v(" "+e._s(s.substr(s.indexOf(e.searchValue)+e.searchValue.length))+" ")]):r.deptPinyin.indexOf(e.searchValue)>-1?t("span",[t("span",{staticStyle:{color:"#f50"}},[e._v(e._s(s))])]):t("span",[e._v(e._s(s))])]}}],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)},r=[],o=(a("4de4"),a("d81d"),a("d3b7"),a("498a"),a("159b"),a("04b3")),n=a("fcb7"),i=function e(t,a){for(var s,r=0;r<a.length;r++){var o=a[r];o.children&&(o.children.some((function(e){return e.id===t}))?s=o.id:e(t,o.children)&&(s=e(t,o.children)))}return s},l={name:"DeptTree",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 s={deptName:e};Object(n["k"])(s).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["i"])(e.dataRef.id,1).then((function(a){e.dataRef.children=a.data,t()}))}))},searchTree:function(e,t){this.getAllDeptNode(t);var a=t,s=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:s,searchValue:e,autoExpandParent:!0}),this.deptNodes=[]}}},d=l,c=(a("929d"),a("2877")),u=Object(c["a"])(d,s,r,!1,null,null,null);t["default"]=u.exports},"8b63":function(e,t,a){"use strict";var s=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)},r=[],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("00f8"),a("2877")),l=Object(i["a"])(n,s,r,!1,null,null,null);t["a"]=l.exports},"929d":function(e,t,a){"use strict";a("f61d")},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,"p",(function(){return l})),a.d(t,"e",(function(){return d})),a.d(t,"n",(function(){return c})),a.d(t,"f",(function(){return u})),a.d(t,"m",(function(){return p})),a.d(t,"j",(function(){return m})),a.d(t,"q",(function(){return f})),a.d(t,"r",(function(){return h})),a.d(t,"s",(function(){return b})),a.d(t,"k",(function(){return y})),a.d(t,"d",(function(){return v})),a.d(t,"b",(function(){return g})),a.d(t,"c",(function(){return x})),a.d(t,"i",(function(){return k})),a.d(t,"g",(function(){return w})),a.d(t,"o",(function(){return O}));var s=a("b775"),r=a("028d");function o(e){return Object(s["b"])({url:"/system/user/list",method:"get",params:e})}function n(e){return Object(s["b"])({url:"/system/user/"+Object(r["i"])(e),method:"get"})}function i(e){return Object(s["b"])({url:"/system/user",method:"post",data:e})}function l(e){return Object(s["b"])({url:"/system/user/edit",method:"post",data:e})}function d(e){return Object(s["b"])({url:"/system/user/"+e,method:"post"})}function c(e){return Object(s["b"])({url:"/system/user/restart/"+e,method:"post"})}function u(e){return Object(s["b"])({url:"/system/user/export",method:"get",params:e})}function p(e,t){var a={id:e,password:t};return Object(s["b"])({url:"/system/user/resetPwd/edit",method:"post",data:a})}function m(){return Object(s["b"])({url:"/system/user/profile",method:"get"})}function f(e){return Object(s["b"])({url:"/system/user/profile",method:"post",data:e})}function h(e,t){var a={oldPassword:e,newPassword:t};return Object(s["b"])({url:"/system/user/profile/updatePwd/edit",method:"post",params:a})}function b(e){return Object(s["b"])({url:"/system/user/profile/avatar",method:"post",data:e})}function y(){return Object(s["b"])({url:"/system/user/importTemplate",method:"get"})}function v(e){return Object(s["b"])({url:"/system/user/checkUserNameUnique",method:"get",params:e})}function g(e){return Object(s["b"])({url:"/system/user/checkEmailUnique",method:"get",params:e})}function x(e){return Object(s["b"])({url:"/system/user/checkPhoneUnique",method:"get",params:e})}function k(e){return Object(s["b"])({url:"/system/user/getUserInfoByIds",method:"post",data:e})}function w(e){return Object(s["b"])({url:"/system/user/roleUserList",method:"get",params:e})}function O(e){return Object(s["b"])({url:"/system/user/addRoleUser",method:"post",data:e})}},cab5:function(e,t,a){"use strict";a.r(t);a("b0c0"),a("b64b"),a("d3b7");var s=a("c0c7"),r=a("fcb7"),o=a("6b01"),n=a("2dd7");t["default"]={name:"CreateForm",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(){var e=function(e,t,a){""===t?a(new Error("密码不能为空")):a()},t=function(e,t,a){""===t.ids||void 0===t.ids||null===t.ids?a(new Error("部门不允许为空")):a()};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,deptId:0,userName:void 0,nickName:void 0,phonenumber:void 0,email:void 0,sex:"2",status:"0",userType:"2",remark:void 0,password:"",postIds:[],roleIds:[]},open:!1,rules:{name:[{required:!0,message:"姓名不能为空",trigger:"blur"}],no:[{required:!0,message:"用户编号不能为空",trigger:"blur"}],userName:[{required:!0,message:"登录名不能为空",trigger:"blur"},{validator:this.checkUserNameUnique,trigger:"change"}],deptId:[{required:!0,message:"所属部门不能为空",trigger:"blur",validator:t}],password:[{required:!0,trigger:"blur",validator:e}],email:[{type:"email",message:"请正确填写邮箱地址",trigger:["blur","change"]},{validator:this.checkEmailUnique}],phonenumber:[{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.msg}))},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(s["h"])().then((function(t){e.postOptions=t.posts,e.roleOptions=t.roles,e.form.deptId=e.deptCheckedValue}))},handleUpdate:function(e,t){var a=this;this.open=!0,this.formTitle="修改【"+e.name+"】信息",this.spinning=!this.spinning;var r=e?e.id:t;Object(s["h"])(r).then((function(e){a.form=e.data,a.form.deptId={ids:e.data.deptId,names:e.data.sysDept.deptName},a.postOptions=e.posts,a.roleOptions=e.roles,a.form.postIds=e.postIds,a.form.roleIds=e.roleIds,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.deptId&&(a.deptId=e.form.deptId.ids),void 0!==e.form.id?Object(s["p"])(a).then((function(t){e.$message.success("修改成功",3),e.open=!1,e.$emit("ok")})):Object(s["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(r["i"])(e.dataRef.id,1).then((function(a){e.dataRef.children=a.data,t()}))}))},checkUserNameUnique:function(e,t,a){var r="登陆名称已存在";if(""===t)a();else{var o={userName:t,id:void 0!==this.form.id?this.form.id:""};Object(s["d"])(o).then((function(e){"1"===e.data.code?a():a(r)}))}},checkEmailUnique:function(e,t,a){var r="登陆名称已存在";if(""===t)a();else{var o={email:t,id:void 0!==this.form.id?this.form.id:""};Object(s["b"])(o).then((function(e){"1"===e.data.code?a():a(r)}))}},checkPhoneUnique:function(e,t,a){var r="手机号已存在";if(""===t)a();else{var o={phonenumber:t,id:void 0!==this.form.id?this.form.id:""};Object(s["c"])(o).then((function(e){"1"===e.data.code?a():a(r)}))}}}}},cd77:function(e,t,a){"use strict";a("1263")},d840:function(e,t,a){"use strict";a.r(t);a("99af"),a("b0c0");var s=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("split",{attrs:{splitHeight:"100%",leftWidth:"220"}},[t("template",{slot:"paneL"},[t("div",{staticClass:"container"},[t("dept-tree",{ref:"deptTree",attrs:{deptOptions:e.deptOptions,defalutExpandedKeys:e.expandedKeys},on:{setDataOptionInfo:e.setDataOptionInfo,select:e.clickDeptNode}})],1)]),t("template",{slot:"paneR"},[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.name,callback:function(t){e.$set(e.queryParam,"name",t)},expression:"queryParam.name"}})],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.phonenumber,callback:function(t){e.$set(e.queryParam,"phonenumber",t)},expression:"queryParam.phonenumber"}})],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,s){return t("a-select-option",{key:s,attrs:{value:a.dictValue}},[e._v(e._s(a.dictLabel))])})),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.pageNum,pageSize:e.queryParam.pageSize,total:e.total,showSizeChanger:!0,showLessItems:!0,showQuickJumper:!0,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条，总计 ").concat(e," 条")},onChange:e.changeSize,onShowSizeChange:e.onShowSizeChange}},on:{change:e.handleTableChange,refresh:e.getList},scopedSlots:e._u([{key:"status",fn:function(a){var s=a.record;return t("span",{},[t("a-badge",{attrs:{status:"0"==s.status?"processing":"error",text:e.statusFormat(s)}})],1)}},{key:"userType",fn:function(a){var s=a.record;return t("span",{},[e._v(" "+e._s(e.userTypeFormat(s))+" ")])}},{key:"name",fn:function(a){var s=a.text,r=a.record,o=a.index;return t("span",{},[t("a",{on:{click:function(t){return e.onClickRow(r,o)}}},[t("a-avatar",{staticStyle:{color:"#fff"},style:{backgroundColor:e.getRandomColor(o)}},[e._v(" "+e._s(e.getShowName(s))+" ")]),e._v(" "+e._s(s)+" ")],1)])}},{key:"createTime",fn:function(a,s){return t("span",{},[e._v(" "+e._s(e.parseTime(s.createTime))+" ")])}},{key:"operation",fn:function(a){a.text;var s=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(s,void 0)}}},[e._v(" 修改 ")]),1!==s.id?t("a-divider",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:remove"],expression:"['system:user:remove']"}],attrs:{type:"vertical"}}):e._e(),1!==s.id?t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:remove"],expression:"['system:user:remove']"}],on:{click:function(t){return e.handleDelete(s)}}},[e._v(" 删除 ")]):e._e(),t("a-divider",{attrs:{type:"vertical"}}),t("a",{on:{click:function(t){return e.handleResetPwd(s)}}},[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),t("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:import"],expression:"['system:user:import']"}],attrs:{type:""},on:{click:function(t){return e.$refs.importExcel.importExcelHandleOpen()}}},[t("a-icon",{attrs:{type:"import"}}),e._v("导入 ")],1),t("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:user:export"],expression:"['system:user:export']"}],attrs:{type:""},on:{click:e.handleExport}},[t("a-icon",{attrs:{type:"download"}}),e._v("导出 ")],1)],1)])],1)],2)],1)],1)},r=[],o=(a("d81d"),a("d3b7"),a("159b"),a("c0c7")),n=a("fcb7"),i=a("e344"),l=a("ee85"),d=a("1224"),c=a("5457"),u=a("56b8"),p=a("5d9e"),m=a("8b63"),f={name:"User",components:{ResetPassword:i["default"],SysUserEditForm:d["default"],ImportExcel:c["a"],AdvanceTable:p["a"],SysUserAddForm:l["default"],Split:m["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:0,statusOptions:[],sexOptions:[],userTypeOptions:[],deptCheckedValue:{},deptOptions:[],dateRange:[],labelCol:{span:6},wrapperCol:{span:18},queryParam:{pageNum:1,pageSize:10,userName:void 0,phonenumber:void 0,status:void 0,deptId:void 0},columns:[{title:"姓名",dataIndex:"name",width:200,scopedSlots:{customRender:"name"}},{title:"登录名",dataIndex:"userName"},{title:"用户状态",dataIndex:"status",scopedSlots:{customRender:"status"},align:"center"},{title:"用户类型",dataIndex:"userType",scopedSlots:{customRender:"userType"},align:"center"},{title:"部门",dataIndex:"sysDept.deptName"},{title:"创建时间",ellipsis:!0,sorter:!0,width:200,dataIndex:"createTime",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.data})),this.getDicts("sys_user_sex").then((function(t){e.sexOptions=t.data})),this.getDicts("sys_user_type").then((function(t){e.userTypeOptions=t.data}))},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["i"])("0",3).then((function(t){e.deptOptions=t.data,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.data.list,e.total=t.data.total,e.loading=!1}))},handleQuery:function(){this.queryParam.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.queryParam={pageNum:1,pageSize:10,userName:void 0,phonenumber:void 0,status:void 0,deptId:void 0},this.handleQuery()},onShowSizeChange:function(e,t){this.queryParam.pageSize=t,this.getList()},changeSize:function(e,t){this.queryParam.pageNum=e,this.queryParam.pageSize=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.name})),this.single=1!==e.length,this.multiple=!e.length},toggleAdvanced:function(){this.advanced=!this.advanced},clickDeptNode:function(e){this.queryParam.deptId=e.$options.propsData.eventKey,this.deptCheckedValue.ids=e.$options.propsData.eventKey,this.tableTitle=e.$options.propsData.label,"dept"===e.$options.propsData.dataRef.attributes.deptType?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,a=e.id||this.ids,s=e.name||this.userNames;this.$confirm({title:"确认重置所选中数据的密码?",content:"当前选中编号为"+s+"的数据",onOk:function(){return Object(o["n"])(a).then((function(){t.onSelectChange([],[]),t.getList(),t.$message.success("重置成功",3)}))},onCancel:function(){}})},handleDelete:function(e){var t=this,a=e.id||this.ids,s=e.name||this.userNames;this.$confirm({title:"确认删除所选中数据?",content:"当前选中编号为"+s+"的数据",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("0312"),a("2877")),y=Object(b["a"])(h,s,r,!1,null,"71c26709",null);t["default"]=y.exports},e344:function(e,t,a){"use strict";a.r(t);var s=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:{"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)},r=[],o=(a("ac1f"),a("c0c7")),n={name:"ResetPassword",props:{},data:function(){var e=this,t=function(t,a,s){""===a?s(new Error("请输入新密码")):/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$)([^\u4e00-\u9fa5\s]){6,20}$/.test(a)?(""!==e.form.confirmPassword&&e.$refs.form.validateField("confirmPassword"),s()):s(new Error("请输入6-20位英文字母、数字或者符号（除空格），且字母、数字和标点符号至少包含两种"))},a=function(t,a,s){""===a?s(new Error("请再次输入新密码确认")):a!==e.form.newPassword?s(new Error("两次输入的密码不一致")):s()};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"),localStorage.clear()}))}))}}},i=n,l=a("2877"),d=Object(l["a"])(i,s,r,!1,null,null,null);t["default"]=d.exports},ee85:function(e,t,a){"use strict";a.r(t);a("4e82"),a("b0c0");var s=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:"name"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"用户编号",prop:"no"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.no,callback:function(t){e.$set(e.form,"no",t)},expression:"form.no"}})],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:"deptId"}},[t("select-dept",{attrs:{"select-model":"single"},model:{value:e.form.deptId,callback:function(t){e.$set(e.form,"deptId",t)},expression:"form.deptId"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"角色",prop:"roleIds"}},[t("a-select",{attrs:{mode:"multiple",placeholder:"请选择","option-filter-prop":"children"},model:{value:e.form.roleIds,callback:function(t){e.$set(e.form,"roleIds",t)},expression:"form.roleIds"}},e._l(e.roleOptions,(function(a,s){return t("a-select-option",{key:s,attrs:{value:a.id}},[e._v(" "+e._s(a.roleName)+" ")])})),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:"phonenumber"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.phonenumber,callback:function(t){e.$set(e.form,"phonenumber",t)},expression:"form.phonenumber"}})],1)],1),t("a-col",{attrs:{lg:12,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:"排序号",prop:"sort"}},[t("a-input",{attrs:{placeholder:"请输入"},model:{value:e.form.sort,callback:function(t){e.$set(e.form,"sort",t)},expression:"form.sort"}})],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,s){return t("a-radio-button",{key:s,attrs:{value:a.dictValue}},[e._v(e._s(a.dictLabel))])})),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,s){return t("a-radio-button",{key:s,attrs:{value:a.dictValue}},[e._v(e._s(a.dictLabel))])})),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)},r=[],o=a("5530"),n=a("cab5"),i=Object(o["a"])({},n["default"]),l=i,d=a("2877"),c=Object(d["a"])(l,s,r,!1,null,null,null);t["default"]=c.exports},f61d:function(e,t,a){}}]);