(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5b2210b2","chunk-5b2210b2","chunk-2d0df437"],{"1d54":function(e,t,r){"use strict";r("60c5")},"418f":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("a-drawer",{staticStyle:{height:"calc(100% - 55px)",overflow:"auto","padding-bottom":"53px"},attrs:{title:e.title,maskClosable:!0,width:e.drawerWidth,placement:"right",closable:!0,visible:e.visible},on:{close:e.handleCancel}},[t("template",{slot:"title"},[t("div",{staticStyle:{width:"100%"}},[t("span",[e._v(e._s(e.title))]),t("span",{staticStyle:{display:"inline-block",width:"calc(100% - 51px)","padding-right":"10px","text-align":"right"}},[t("a-button",{staticStyle:{height:"20px",width:"20px",border:"0px"},attrs:{icon:"appstore"},on:{click:e.toggleScreen}})],1)])]),t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"用户账号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator.trim",value:["name",e.validatorRules.name],expression:"[ 'name', validatorRules.name]",modifiers:{trim:!0}}],attrs:{placeholder:"请输入用户账号",readOnly:!!e.model.id}})],1),e.model.id?e._e():[t("a-form-item",{attrs:{label:"登陆密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",e.validatorRules.password],expression:"[ 'password', validatorRules.password]"}],attrs:{type:"password",placeholder:"请输入登陆密码"}})],1),t("a-form-item",{attrs:{label:"确认密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirmpassword",e.validatorRules.confirmpassword],expression:"[ 'confirmpassword', validatorRules.confirmpassword]"}],attrs:{type:"password",placeholder:"请重新输入登陆密码"},on:{blur:e.handleConfirmBlur}})],1)],t("a-form-item",{attrs:{label:"用户姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator.trim",value:["realname",e.validatorRules.realname],expression:"[ 'realname', validatorRules.realname]",modifiers:{trim:!0}}],attrs:{placeholder:"请输入用户姓名"}})],1),t("a-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.roleDisabled,expression:"!roleDisabled"}],attrs:{label:"角色分配",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{staticStyle:{width:"100%"},attrs:{mode:"multiple",placeholder:"请选择用户角色",optionFilterProp:"children",getPopupContainer:function(e){return e.parentNode}},model:{value:e.selectedRole,callback:function(t){e.selectedRole=t},expression:"selectedRole"}},e._l(e.roleList,(function(r,a){return t("a-select-option",{key:a.toString(),attrs:{value:r.id}},[e._v("\n "+e._s(r.roleName)+"\n ")])})),1)],1),t("a-form-item",{attrs:{label:"头像",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("j-image-upload",{staticClass:"avatar-uploader",attrs:{text:"上传"},model:{value:e.fileList,callback:function(t){e.fileList=t},expression:"fileList"}})],1),t("a-form-item",{attrs:{label:"手机号码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",e.validatorRules.phone],expression:"[ 'phone', validatorRules.phone]"}],attrs:{placeholder:"请输入手机号码",disabled:e.isDisabledAuth("user:form:phone")}})],1)],2)],1),t("depart-window",{ref:"departWindow",on:{ok:e.modalFormOk}}),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.disableSubmit,expression:"!disableSubmit"}],staticClass:"drawer-bootom-button"},[t("a-popconfirm",{attrs:{title:"确定放弃编辑?",okText:"确定",cancelText:"取消"},on:{confirm:e.handleCancel}},[t("a-button",{staticStyle:{"margin-right":".8rem"}},[e._v("取消")])],1),t("a-button",{attrs:{type:"primary",loading:e.confirmLoading},on:{click:e.handleSubmit}},[e._v("提交")])],1)],2)},s=[],i=r("88bc"),n=r.n(i),l=r("c1df"),o=r.n(l),d=r("2b0e"),c=r("c63ec"),u=r("61fc"),h=r("9fb0"),p=r("0fea"),f=r("4ec3");function m(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,s=function(){};return{s:s,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,n=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return n=e.done,e},e:function(e){l=!0,i=e},f:function(){try{n||null==r.return||r.return()}finally{if(l)throw i}}}}function v(e,t){if(e){if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r0){var f,v=m(r);try{for(v.s();!(f=v.n()).done;){var b=f.value;if(e===b.action){if("0"==b.status){p=!0;break}u=!0;break}}}catch(S){v.e(S)}finally{v.f()}}if(p)return!1;if(null===t||""===t||void 0===t||t.length<=0)return u;for(var y=[],g=0,w=t;g?,./]).{8,}$/,message:"密码由8位数字、大小写字母和特殊符号组成!"},{validator:this.validateToNextPassword}]},confirmpassword:{rules:[{required:!0,message:"请重新输入登陆密码!"},{validator:this.compareToFirstPassword}]},realname:{rules:[{required:!0,message:"请输入用户名称!"}]},phone:{rules:[{validator:this.validatePhone}]},email:{rules:[{validator:this.validateEmail}]},roles:{},workNo:{rules:[{required:!0,message:"请输入工号"},{validator:this.validateWorkNo}]},telephone:{rules:[{pattern:/^0\d{2,3}-[1-9]\d{6,7}$/,message:"请输入正确的座机号码"}]}},departIdShow:!1,departIds:[],title:"操作",visible:!1,model:{},roleList:[],selectedRole:[],labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},uploadLoading:!1,confirmLoading:!1,headers:{},form:this.$form.createForm(this),picUrl:"",url:{fileUpload:window._CONFIG["domianURL"]+"/sys/common/upload",userWithDepart:"/sys/user/userDepartList",userId:"/sys/user/generateUserId",syncUserByUserName:"/process/extActProcess/doSyncUserByUserName"},identity:"1",fileList:[]}},created:function(){var e=d["default"].ls.get(h["a"]);this.headers={"X-Access-Token":e}},computed:{uploadAction:function(){return this.url.fileUpload}},methods:{isDisabledAuth:function(e){return y(e)},toggleScreen:function(){this.modaltoggleFlag?this.modalWidth=window.innerWidth:this.modalWidth=800,this.modaltoggleFlag=!this.modaltoggleFlag},initialRoleList:function(){var e=this;Object(f["P"])().then((function(t){t.success&&(e.roleList=t.result)}))},loadUserRoles:function(e){var t=this;Object(f["O"])({userid:e}).then((function(e){e.success&&(t.selectedRole=e.result)}))},refresh:function(){this.selectedDepartKeys=[],this.checkedDepartKeys=[],this.checkedDepartNames=[],this.checkedDepartNameString="",this.userId="",this.resultDepartOptions=[],this.departId=[],this.departIdShow=!1},add:function(){this.picUrl="",this.refresh(),this.edit({})},edit:function(e){var t=this;this.resetScreenSize();var r=this;r.initialRoleList(),r.checkedDepartNameString="",r.form.resetFields(),e.hasOwnProperty("id")&&(r.loadUserRoles(e.id),setTimeout((function(){t.fileList=e.avatar}),5)),r.userId=e.id,r.visible=!0,r.model=Object.assign({},e),r.$nextTick((function(){r.form.setFieldsValue(n()(t.model,"name","realname","phone","avatar"))})),"2"==this.model.userIdentity?(this.identity="2",this.departIdShow=!0):(this.identity="1",this.departIdShow=!1),r.checkedDepartKeys=[]},loadCheckedDeparts:function(){var e=this,t=this;t.userId&&Object(p["c"])(t.url.userWithDepart,{userId:t.userId}).then((function(r){if(t.checkedDepartNames=[],r.success){for(var a=[],s=[],i=0;i0?e.selectedRole.join(","):"",e.model.id?s=Object(f["r"])(i):(i.id=e.userId,s=Object(f["e"])(i)),s.then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.checkedDepartNames=[],t.userDepartModel.departIdList={userId:"",departIdList:[]},t.close()}))}}))},handleCancel:function(){this.close()},validateToNextPassword:function(e,t,r){var a=this.form,s=a.getFieldValue("confirmpassword");t&&s&&t!==s&&r("两次输入的密码不一样!"),t&&this.confirmDirty&&a.validateFields(["confirm"],{force:!0}),r()},compareToFirstPassword:function(e,t,r){var a=this.form;t&&t!==a.getFieldValue("password")?r("两次输入的密码不一样!"):r()},validatePhone:function(e,t,r){if(t)if(new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(t)){var a={tableName:"admin_user",fieldName:"phone",fieldVal:t,dataId:this.userId};Object(f["m"])(a).then((function(e){e.success?r():r("手机号已存在!")}))}else r("请输入正确格式的手机号码!");else r()},validateEmail:function(e,t,r){if(t)if(new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(t)){var a={tableName:"admin_user",fieldName:"email",fieldVal:t,dataId:this.userId};Object(f["m"])(a).then((function(e){e.success?r():r("邮箱已存在!")}))}else r("请输入正确格式的邮箱!");else r()},validateUsername:function(e,t,r){var a={tableName:"admin_user",fieldName:"name",fieldVal:t,dataId:this.userId};Object(f["m"])(a).then((function(e){e.success?r():r("用户名已存在!")}))},validateWorkNo:function(e,t,r){var a={tableName:"sys_user",fieldName:"work_no",fieldVal:t,dataId:this.userId};Object(f["m"])(a).then((function(e){e.success?r():r("工号已存在!")}))},handleConfirmBlur:function(e){var t=e.target.value;this.confirmDirty=this.confirmDirty||!!t},normFile:function(e){return Array.isArray(e)?e:e&&e.fileList},beforeUpload:function(e){var t=e.type;if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),!1},handleChange:function(e){if(this.picUrl="","uploading"!==e.file.status){if("done"===e.file.status){var t=e.file.response;this.uploadLoading=!1,t.success?(this.model.avatar=t.message,this.picUrl="Has no pic url yet"):this.$message.warning(t.message)}}else this.uploadLoading=!0},onSearch:function(){this.$refs.departWindow.add(this.checkedDepartKeys,this.userId)},modalFormOk:function(e){this.checkedDepartNames=[],this.selectedDepartKeys=[],this.checkedDepartNameString="",this.userId=e.userId,this.userDepartModel.userId=e.userId,this.departIds=[],this.resultDepartOptions=[];for(var t=[],r=0;r0&&r(l)?t>1?k(l,t-1,r,a,s):p(s,l):a||(s[s.length]=l)}return s}function I(e,t){return e=Object(e),D(e,t,(function(t,r){return r in e}))}function D(e,t,r){var a=-1,s=t.length,i={};while(++a-1&&e%1==0&&e<=a}function R(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function A(e){return!!e&&"object"==typeof e}function U(e){return"symbol"==typeof e||A(e)&&v.call(e)==l}var $=C((function(e,t){return null==e?{}:I(e,h(k(t,1),S))}));e.exports=$}).call(this,r("c8ba"))},c63ec:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{width:e.modalWidth,visible:e.visible,title:"部门搜索",confirmLoading:e.confirmLoading,cancelText:"关闭",wrapClassName:"ant-modal-cust-warp"},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"上级部门"}},[t("a-tree",{attrs:{multiple:"",treeCheckable:"tree",checkable:"",expandedKeys:e.expandedKeysss,checkedKeys:e.checkedKeys,allowClear:"true",checkStrictly:!0,dropdownStyle:{maxHeight:"200px",overflow:"auto"},treeData:e.departTree,placeholder:"请选择上级部门"},on:{expand:e.onExpand,check:e.onCheck}})],1)],1)]],2)},s=[],i=r("88bc"),n=r.n(i),l=r("0fea"),o=r("4ec3"),d=r("418f"),c={name:"DepartWindow",components:{userModal:d["default"]},data:function(){return{checkedKeys:[],expandedKeysss:[],userId:"",model:{},userDepartModel:{userId:"",departIdList:[]},departList:[],modalWidth:400,departTree:[],title:"操作",visible:!1,labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,headers:{},form:this.$form.createForm(this),url:{userId:"/sys/user/generateUserId"}}},methods:{add:function(e,t){this.checkedKeys=e,this.userId=t,this.edit({})},edit:function(e){var t=this;this.departList=[],this.queryDepartTree(),this.form.resetFields(),this.visible=!0,this.model=Object.assign({},e);var r=n()(this.model,"id","userId","departIdList");this.$nextTick((function(){t.form.setFieldsValue(r)}))},close:function(){this.$emit("close"),this.visible=!1,this.departList=[],this.checkedKeys=[]},handleSubmit:function(){var e=this,t=this;this.form.validateFields((function(r){if(!r)if(t.confirmLoading=!0,null==e.userId)Object(l["c"])(e.url.userId).then((function(r){if(r.success){var a={userId:r.result,departIdList:e.departList};t.$emit("ok",a)}})).finally((function(){t.departList=[],t.confirmLoading=!1,t.close()}));else{var a={userId:e.userId,departIdList:e.departList};t.departList=[],t.$emit("ok",a),t.confirmLoading=!1,t.close()}}))},handleCancel:function(){this.close()},onCheck:function(e,t){this.departList=[],this.checkedKeys=e.checked;for(var r=t.checkedNodes,a=0;a0)){var r=[],a=t.result;a&&a.length>0&&(a.forEach((function(e){r.push(e.key)})),e.expandedKeysss=r)}}))},onExpand:function(e){this.expandedKeysss=e},modalFormOk:function(){}}},u=c,h=(r("1d54"),r("2877")),p=Object(h["a"])(u,a,s,!1,null,"3a18028b",null);t["default"]=p.exports},f511:function(e,t,r){"use strict";r("5cb7")}}]);