You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm/static/js/chunk-0053.a0bf3bd2.js

1 line
52 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0053"],{"1nm8":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdG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hBzVVaykzsHXbQ0+Pjymr8eiTqKAcS7SQFoG0ErSxuaquHkzSAr2li6348jkz+k+7Z1LL3GF3S5SxixOmiLgINPnNz7/dqp+277RXkkJDlRLcMrFIZuiZ+Vs0fMytpDcWaAjLPY4NVv07EaHZrDTspohtYulZMD/rzKzyGtKw1pisVWpKuyLJOyosG8F3u7Kww60ylWKrZ2ez1UKOLincXJ5BfMBrApcdqEkukVzAh6cgHYC3Cx9EUOZjsN8ACcC3MkCnFx7/2dX4nYMSSqBmts/AgwAKLn63c6TR7sAAAAASUVORK5CYII="},"5xLT":function(e,t,i){"use strict";var s=i("jlEs");i.n(s).a},CmUt:function(e,t,i){"use strict";var s=i("FS3G");i.n(s).a},"Cp9+":function(e,t,i){},EiQh:function(e,t,i){"use strict";var s=i("QD1S");i.n(s).a},FS3G:function(e,t,i){},OxiS:function(e,t,i){"use strict";var s=i("Cp9+");i.n(s).a},P6VX:function(e,t,i){},QD1S:function(e,t,i){},SZfA:function(e,t,i){"use strict";var s=i("P6VX");i.n(s).a},ZJ6w:function(e,t,i){"use strict";i.r(t);var s=i("FyfS"),a=i.n(s),n=i("QbLZ"),l=i.n(n),o=i("YSp2"),r=i("KTTK"),c=i("fe1z"),d=i("L2JU"),u=i("7Qib"),p={name:"BulkImportUser",components:{},props:{show:{type:Boolean,default:!1},crmType:{type:String,default:""}},data:function(){return{loading:!1,showDialog:!1,file:{name:""},stepsActive:1,stepList:[{icon:"wk wk-upload",title:"上传文件",status:"wait"},{icon:"wk wk-data-import",title:"导入数据",status:"wait"},{icon:"wk wk-success",title:"导入完成",status:"wait"}],resultData:null}},computed:l()({},Object(d.b)(["userInfo"]),{sureTitle:function(){return{1:"立即导入",2:"",3:"确定"}[this.stepsActive]},showCancel:function(){return 2!=this.stepsActive}}),watch:{show:function(e){this.showDialog=e,this.resetData()}},mounted:function(){},methods:{sureClick:function(){var e=this;1==this.stepsActive?"finish"==this.stepList[0].status?(this.stepList[1].status="process",this.stepsActive=2,this.updateFile(function(t){e.stepList[1].status="finish",e.stepsActive=3,t.data&&(e.resultData=t.data,t.data.error>0?e.stepList[2].status="error":e.stepList[2].status="finish")})):this.$message.error("请选择导入文件"):3==this.stepsActive&&this.closeView()},updateFile:function(e){var t=this;this.file.name?(this.loading=!0,Object(o.m)({import_queue_index:"",cover:0,config:1,owner_user_id:this.userInfo.id,file:this.file}).then(function(i){t.loading=!1,e&&e(i),t.$emit("success")}).catch(function(){e&&e(!1),t.loading=!1})):this.$message.error("请选择导入文件")},downloadErrData:function(){this.getImportError(this.resultData)},getImportError:function(e){var t=this;this.loading=!0,Object(o.l)({name:"导入错误数据",path:e.error_file_path}).then(function(e){Object(u.c)(e),t.loading=!1}).catch(function(){t.loading=!1})},download:function(){var e=this;this.loading=!0,Object(o.n)().then(function(t){Object(u.c)(t),e.loading=!1}).catch(function(){e.loading=!1})},selectFile:function(){document.getElementById("importInputFile").click()},uploadFile:function(e){var t=e.target.files[0];Object(u.A)(t.name)&&(this.file=t,this.stepList[0].status="finish"),e.target.value=""},closeView:function(){this.$emit("close")},resetData:function(){this.file={name:""},this.stepList=[{icon:"wk wk-upload",title:"上传文件",status:"wait"},{icon:"wk wk-data-import",title:"导入数据",status:"wait"},{icon:"wk wk-success",title:"导入完成",status:"wait"}],this.stepsActive=1,this.resultData=null}}},h=(i("SZfA"),i("KHd+")),m=Object(h.a)(p,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{visible:e.showDialog,"append-to-body":!0,"show-close":e.showCancel,"close-on-click-modal":!1,title:"批量导入",width:"750px"},on:{"update:visible":function(t){e.showDialog=t},close:e.closeView}},[i("div",{staticClass:"dialog-body"},[i("el-steps",{attrs:{active:e.stepsActive,simple:""}},e._l(e.stepList,function(e,t){return i("el-step",{key:t,attrs:{title:e.title,icon:e.icon,status:e.status}})})),e._v(" "),1==e.stepsActive?i("div",{staticClass:"sections"},[i("div",[e._v("请选择需要导入的文件")]),e._v(" "),i("div",{staticClass:"content"},[i("flexbox",{staticClass:"file-select"},[i("el-input",{attrs:{disabled:!0},model:{value:e.file.name,callback:function(t){e.$set(e.file,"name",t)},expression:"file.name"}}),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.selectFile}},[e._v("选择文件")])],1)],1),e._v(" "),i("div",{staticClass:"download",on:{click:e.download}},[e._v("\n 点击下载《员工导入模板》")]),e._v(" "),i("div",{staticClass:"content content-tips"},[i("div",[e._v("操作步骤:")]),e._v(" "),i("div",[e._v("1、下载《员工导入模板》")]),e._v(" "),i("div",[e._v("2、打开《员工导入模板》将对应字段信息输入或粘贴进本表。为保障粘贴信息被有效导入请使用纯文本或数字")]),e._v(" "),i("div",[e._v("3、信息输入完毕点击“选择文件”按钮选择excel文件上传")]),e._v(" "),i("div",[e._v("4、点击“确定”开始进行员工导入")])])]):2==e.stepsActive?i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"sections",attrs:{"element-loading-text":"数据导入中","element-loading-spinner":"el-icon-loading"}}):3==e.stepsActive?i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"sections"},[i("div",{staticClass:"result-info"},[i("i",{staticClass:"wk wk-success result-info__icon"}),e._v(" "),i("p",{staticClass:"result-info__des"},[e._v("数据导入完成")]),e._v(" "),i("p",{staticClass:"result-info__detail"},[e._v("导入总数据"),i("span",{staticClass:"result-info__detail--all"},[e._v(e._s(e.resultData.total))]),e._v("条,导入成功"),i("span",{staticClass:"result-info__detail--suc"},[e._v(e._s(e.resultData.total-(e.resultData.error||0)))]),e._v("条,导入失败"),i("span",{staticClass:"result-info__detail--err"},[e._v(e._s(e.resultData.error||0))]),e._v("条")]),e._v(" "),e.resultData&&e.resultData.error>0?i("el-button",{staticClass:"result-info__btn--err",attrs:{type:"text"},on:{click:e.downloadErrData}},[e._v("下载错误数据")]):e._e()],1)]):e._e(),e._v(" "),i("input",{attrs:{id:"importInputFile",type:"file"},on:{change:e.uploadFile}})],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{class:{"is-hidden":!e.showCancel},on:{click:e.closeView}},[e._v("取消")]),e._v(" "),e.sureTitle?i("el-button",{attrs:{type:"primary"},on:{click:e.sureClick}},[e._v(e._s(e.sureTitle))]):e._e()],1)])},[],!1,null,"5733d3ce",null);m.options.__file="BulkImportUser.vue";var f=m.exports,v={name:"EmployeeDetail",components:{SlideView:i("Ew9n").a},filters:{formatedInfo:function(e,t){return e[t]}},props:{data:Object},data:function(){return{detailList:[{field:"username",value:"手机号(登录名)"},{field:"realname",value:"姓名"},{field:"sex",value:"性别",type:"select"},{field:"email",value:"邮箱"},{field:"s_name",value:"部门",type:"select"},{field:"post",value:"岗位"},{field:"parent_name",value:"直属上级",type:"select"},{field:"groups",value:"角色",type:"selectCheckout"}]}},computed:l()({},Object(d.b)(["manage"]),{userUpdateAuth:function(){return this.manage&&this.manage.users&&this.manage.users.userUpdate},userEnablesAuth:function(){return this.manage&&this.manage.users&&this.manage.users.userEnables}}),watch:{},mounted:function(){},methods:{editBtn:function(){this.$emit("edit")},handleCommand:function(e){this.$emit("command",e)},hideView:function(){this.$emit("hide-view")}}},g=(i("CmUt"),Object(h.a)(v,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("slide-view",{staticClass:"d-view",attrs:{"listener-ids":["manager-main-container"],"no-listener-class":["el-table__body"],"body-style":{padding:"10px 30px",height:"100%"}},on:{close:e.hideView}},[i("flexbox",{staticClass:"main",attrs:{orient:"vertical"}},[i("div",{staticClass:"detail-body"},[i("flexbox",{staticClass:"dialog-top"},[i("xr-avatar",{key:e.data.realname,staticClass:"user-img",attrs:{name:e.data.realname,size:36,src:e.data.img}}),e._v(" "),i("div",{staticClass:"user-name"},[e._v(e._s(e.data.realname))]),e._v(" "),i("div",{staticClass:"dialog-btn-group"},[e.userUpdateAuth?i("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.editBtn}},[e._v(" 编 辑 ")]):e._e(),e._v(" "),e.userUpdateAuth||e.userEnablesAuth?i("el-dropdown",{attrs:{trigger:"click"},on:{command:e.handleCommand}},[i("el-button",{attrs:{size:"medium"}},[e._v("\n 更 多"),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e.userUpdateAuth?i("el-dropdown-item",{attrs:{command:"reset"}},[e._v("重置密码")]):e._e(),e._v(" "),e.userEnablesAuth?i("el-dropdown-item",{attrs:{command:"status"}},[e._v(e._s(0===e.data.status?"激 活":"禁 用"))]):e._e()],1)],1):e._e()],1)],1),e._v(" "),i("div",{staticClass:"dialog-remark"},[i("p",[e._v("账号状态:"+e._s({0:"禁用",1:"激活",2:"未激活"}[e.data.status]))]),e._v(" "),i("p",[e._v("创建时间:"+e._s(e.data.create_time))])]),e._v(" "),i("div",{staticClass:"dialog-content"},e._l(e.detailList,function(t,s){return i("flexbox",{key:s,staticClass:"content-items",attrs:{align:"stretch"}},[i("div",{staticClass:"content-items-name"},[e._v(e._s(t.value))]),e._v(" "),i("div",{staticClass:"content-items-value"},[e._v(e._s(e._f("formatedInfo")(e.data,t.field)))])])}))],1)])],1)},[],!1,null,"42961e4b",null));g.options.__file="EmployeeDetail.vue";var b=g.exports,w=i("9GgJ"),_=i("jzeO"),y={name:"SlideVerify",props:{phone:String,sliderText:{type:String,default:"Slide filled right"}},data:function(){return{w:300,containerActive:!1,containerSuccess:!1,containerFail:!1,verifyImg:this.getRandomImg(),originX:void 0,isMouseDown:!1,sliderLeft:0,rotate:0,sliderMaskWidth:0,showLoading:!1}},mounted:function(){this.init()},methods:{init:function(){this.bindEvents()},getRandomImg:function(){return"/api/captcha/"+this.getRandomNumberByRange(1,20)},getRandomNumberByRange:function(e,t){return Math.round(Math.random()*(t-e)+e)},refresh:function(){this.reset(),this.$emit("refresh")},sliderDown:function(e){this.originX=e.clientX,this.isMouseDown=!0},touchStartEvent:function(e){this.originX=e.changedTouches[0].pageX,this.isMouseDown=!0},bindEvents:function(){var e=this;document.addEventListener("mousemove",function(t){if(!e.isMouseDown)return!1;var i=t.clientX-e.originX;if(i<0||i+38>=e.w)return!1;if(e.sliderLeft=i+"px",i>0){var s=parseInt(i/260*360);e.rotate=s>360?360:s}else e.rotate=0;e.containerActive=!0,e.sliderMaskWidth=i+"px"}),document.addEventListener("mouseup",function(t){return!!e.isMouseDown&&(e.isMouseDown=!1,t.clientX!==e.originX&&(e.containerActive=!1,void e.verify()))})},touchMoveEvent:function(e){if(!this.isMouseDown)return!1;var t=e.pageX-this.originX;if(t<0||t+38>=this.w)return!1;if(this.sliderLeft=t+"px",t>0){var i=parseInt(t/260*360);this.rotate=i>360?360:i}else this.rotate=0;this.containerActive=!0,this.sliderMaskWidth=t+"px"},touchEndEvent:function(e){return!!this.isMouseDown&&(this.isMouseDown=!1,e.pageX!==this.originX&&(this.containerActive=!1,void this.verify()))},verify:function(){var e=this;this.showLoading=!0,Object(c.f)({tel:this.phone,angle:this.rotate}).then(function(t){e.showLoading=!1,1==t.data?(e.containerSuccess=!0,e.$emit("success")):(e.containerFail=!0,e.$emit("fail"),setTimeout(function(){e.reset()},1e3))}).catch(function(){e.showLoading=!1,e.reset()})},reset:function(){this.containerActive=!1,this.containerSuccess=!1,this.containerFail=!1,this.sliderLeft=0,this.sliderMaskWidth=0,this.rotate=0,this.verifyImg=this.getRandomImg()}}},D=(i("5xLT"),Object(h.a)(y,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.showLoading,expression:"showLoading"}],staticClass:"slide-verify",attrs:{id:"slideVerify",onselectstart:"return false;"},on:{click:function(e){e.stopPropagation()}}},[i("div",{staticClass:"close-box"},[i("span",{staticClass:"el-icon-close",on:{click:function(t){e.$emit("close")}}})]),e._v(" "),e._m(0),e._v(" "),i("div",{staticClass:"verify-info"},[i("div",{staticClass:"verify-img",style:{backgroundImage:"url("+e.verifyImg+")",transform:"rotate("+e.rotate+"deg)"}})]),e._v(" "),i("div",{staticClass:"slide-verify-slider",class:{"container-active":e.containerActive,"container-success":e.containerSuccess,"container-fail":e.containerFail}},[i("div",{staticClass:"slide-verify-slider-mask",style:{width:e.sliderMaskWidth}},[i("div",{staticClass:"slide-verify-slider-mask-item",style:{left:e.sliderLeft},on:{mousedown:e.sliderDown,touchstart:e.touchStartEvent,touchmove:e.touchMoveEvent,touchend:e.touchEndEvent}},[i("div",{staticClass:"slide-verify-slider-mask-item-icon"})])]),e._v(" "),i("span",{staticClass:"slide-verify-slider-text"},[e._v(e._s(e.sliderText))])])])},[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"verify-title"},[t("div",{staticClass:"title"},[this._v("\n 身份验证\n ")]),this._v(" "),t("div",{staticClass:"desc"},[this._v("\n 拖动滑块,使图片角度为正\n ")])])}],!1,null,"4cbfe8c9",null));D.options.__file="SlideVerify.vue";var C=D.exports,k=i("Tdi9"),A=i("XAon"),S=i("3pgX"),U=i("nboU"),L={name:"EditDepDialog",components:{WkDepSelect:S.a},mixins:[U.a],props:{selectionList:Array,visible:{type:Boolean,required:!0,default:!1}},data:function(){return{fieldFrom:{structure_id:""},rules:{structure_id:{required:!0,message:"请选择",trigger:"change"}}}},computed:{},watch:{},created:function(){},mounted:function(){},beforeDestroy:function(){},methods:{handleCancel:function(){this.$emit("update:visible",!1)},handleConfirm:function(){var e=this;this.$refs.form.validate(function(t){if(t){var i=e.selectionList.map(function(e){return e.id});e.loading=!0,Object(o.b)(l()({},e.fieldFrom,{id:i})).then(function(t){e.loading=!1,e.$message.success("操作成功"),e.$emit("change"),e.handleCancel()}).catch(function(){e.loading=!1})}})}}},x=(i("EiQh"),Object(h.a)(L,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{ref:"wkDialog",attrs:{visible:e.visible,"append-to-body":!0,"close-on-click-modal":!1,title:"重置部门",width:"500px"},on:{close:e.handleCancel}},[i("div",[i("el-form",{ref:"form",attrs:{model:e.fieldFrom,rules:e.rules,"label-position":"top"}},[i("el-form-item",{attrs:{label:"部门",prop:"structure_id"}},[i("wk-dep-select",{staticStyle:{width:"100%"},attrs:{radio:""},model:{value:e.fieldFrom.structure_id,callback:function(t){e.$set(e.fieldFrom,"structure_id",t)},expression:"fieldFrom.structure_id"}})],1)],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{nativeOn:{click:function(t){return e.handleCancel(t)}}},[e._v("取消")]),e._v(" "),i("el-button",{directives:[{name:"debounce",rawName:"v-debounce",value:e.handleConfirm,expression:"handleConfirm"}],attrs:{type:"primary"}},[e._v("保存")])],1)])},[],!1,null,"61c94b90",null));x.options.__file="EditDepDialog.vue";var M=x.exports,I={name:"EmployeeDep",components:{EmployeeDetail:b,BulkImportUser:f,XrHeader:w.a,Reminder:_.a,SlideVerify:C,EditRoleDialog:k.a,EditDepDialog:M,WkUserSelect:A.a},data:function(){return{employeeMenu:[{icon:"wk wk-employees",label:"所有员工",type:"all",field:"allUserCount",count:0,tips:"未添加部门和角色的员工无法正常登录系统"},{icon:"wk wk-new-employee",label:"新加入的员工",type:"new",field:"addNewlyCount",count:0,tips:"入职7天内的员工"},{icon:"wk wk-active-employee",label:"激活员工",type:"active",field:"activateCount",count:0,tips:"已经登录系统的员工"},{icon:"wk wk-inactive-employee",label:"未激活员工",type:"inactive",field:"inactiveCount",count:0,tips:"未登录过系统的员工"},{icon:"wk wk-disable-employees",label:"停用员工",type:"disable",field:"disableCount",count:0,tips:"已禁用的员工,无法登录系统"}],depCreateTitle:"新建",depCreateDialog:!1,depSelect:"",superDepList:[],depOwnerUserId:"",depCreateLabel:"",allDepData:[],showDepData:[],depLoading:!1,loading:!1,searchInput:"",statusOptions:[{value:"0",label:"禁用"},{value:"1",label:"激活"},{value:"2",label:"未激活"}],fieldList:[{field:"username",value:"手机号(登录名)",width:"150"},{field:"sex",value:"性别",type:"select",width:"50"},{field:"email",value:"邮箱",width:"150"},{field:"s_name",value:"部门",type:"select",width:"100"},{field:"post",value:"岗位",width:"150"},{field:"parent_name",value:"直属上级",type:"select",width:"150"},{field:"groups",value:"角色",type:"selectCheckout",width:"150"}],isNeedChild:1,selectionList:[],tableData:[],tableHeight:document.documentElement.clientHeight-240,currentMenuData:null,currentPage:1,pageSize:15,pageSizes:[15,30,45,60],total:0,employeeDetailDialog:!1,dialogData:{},employeeCreateDialog:!1,dialogTitle:"新建员工",formInline:{},depCreateLabelValue:"",treeEditId:"",optionsList:{structure_id:{field:"structure_id",list:[]},parent_id:{field:"parent_id",list:[{id:0,name:"请选择"}]},sex:{field:"sex",list:[{id:0,name:"请选择"},{id:"男",name:"男"},{id:"女",name:"女"}]}},groupsList:[],resetPasswordVisible:!1,rules:{password:[{required:!0,message:"请输入密码",trigger:"blur"},{pattern:/^(?=.*[a-zA-Z])(?=.*\d).{6,20}$/,message:"密码由6-20位字母、数字组成"}],username:[{required:!0,message:"手机号不能为空",trigger:"blur"}]},passForm:{},dialogRules:{realname:[{required:!0,message:"姓名不能为空",trigger:"blur"}],password:[{required:!0,message:"密码不能为空",trigger:"blur"},{pattern:/^(?=.*[a-zA-Z])(?=.*\d).{6,20}$/,message:"密码由6-20位字母、数字组成"}],username:[{required:!0,message:"手机号码不能为空",trigger:"blur"},{pattern:u.b,message:"目前只支持中国大陆的手机号码",trigger:"blur"}],email:[{pattern:/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/,message:"请输入正确的邮箱格式",trigger:"blur"}],structure_id:[{required:!0,message:"部门不能为空",trigger:"change"}],groupids:[{required:!0,message:"角色不能为空",trigger:"change"}]},resetUserNameVisible:!1,resetUserNameForm:{username:"",password:""},isManageReset:!1,slideVerifyShow:!1,slideVerifyPass:!1,codeTime:60,codeSecond:60,codeTimer:null,bulkImportShow:!1,editRoleType:"",editRoleDialogShow:!1,userTotal:0,editDepDialogShow:!1}},computed:l()({},Object(d.b)(["manage"]),{userSaveAuth:function(){return this.manage&&this.manage.users&&this.manage.users.userSave},userUpdateAuth:function(){return this.manage&&this.manage.users&&this.manage.users.userUpdate},userEnablesAuth:function(){return this.manage&&this.manage.users&&this.manage.users.userEnables},tableUpdateAuth:function(){return this.userEnablesAuth&&this.userUpdateAuth},strucSaveAuth:function(){return this.manage&&this.manage.users&&this.manage.users.deptSave},strucUpdateAuth:function(){return this.manage&&this.manage.users&&this.manage.users.deptUpdate},strucDeleteAuth:function(){return this.currentMenuData&&0!==this.currentMenuData.pid&&this.manage&&this.manage.users&&this.manage.users.deptDelete},userUpdateRoleAuth:function(){return this.manage&&this.manage.permission},strucMoreOptions:function(){var e=[];return this.strucUpdateAuth&&e.push({type:"edit",name:"编辑部门",icon:"edit"}),this.strucDeleteAuth&&e.push({type:"delete",name:"删除部门",icon:"delete"}),e},selectionInfo:function(){var e=[];return this.userEnablesAuth&&(e=[{name:"禁用",type:"lock",icon:"wk wk-remove"},{name:"激活",type:"unlock",icon:"wk wk-activation"}]),this.userUpdateAuth&&(e=1===this.selectionList.length?e.concat([{name:"编辑",type:"edit",icon:"wk wk-edit"},{name:"重置密码",type:"reset",icon:"wk wk-circle-password"},{name:"重置登录账号",type:"resetName",icon:"wk wk-reset"}]):e.concat([{name:"重置密码",type:"reset",icon:"wk wk-circle-password"}])),this.userUpdateRoleAuth&&(1===this.selectionList.length&&e.push({name:"复制角色",type:"copyRole",icon:"wk wk-icon-double-note"}),e.push({name:"编辑角色",type:"editRole",icon:"wk wk-edit"})),e.push({name:"重置部门",type:"editDep",icon:"wk wk-employees"}),e},tableList:function(){return"新建员工"===this.dialogTitle?[{field:"username",value:"手机号(登录名)"},{field:"password",value:"登录密码"},{field:"realname",value:"姓名"},{field:"sex",value:"性别",type:"select"},{field:"email",value:"邮箱"},{field:"structure_id",value:"部门",type:"select"},{field:"post",value:"岗位"},{field:"parent_id",value:"直属上级",type:"select"},{field:"groupids",value:"角色",type:"selectCheckout"}]:[{field:"username",value:"手机号(登录名)",tips:"如需修改登录名,请在列表勾选员工后进行操作"},{field:"realname",value:"姓名"},{field:"sex",value:"性别",type:"select"},{field:"email",value:"邮箱"},{field:"structure_id",value:"部门",type:"select"},{field:"post",value:"岗位"},{field:"parent_id",value:"直属上级",type:"select"},{field:"groupids",value:"角色",type:"selectCheckout"}]},canSlideVerify:function(){return u.b.test(this.resetUserNameForm.username)},isDepUserShow:function(){return this.currentMenuData&&this.currentMenuData.structure_id}}),mounted:function(){var e=this;window.onresize=function(){e.tableHeight=document.documentElement.clientHeight-240},this.currentMenuData=this.employeeMenu[0],this.getDepTreeList(),this.getUserList(),this.getUserCount()},methods:{addUserSelectChange:function(e){var t=this;if("structure_id"===e.field){var i=(this.optionsList.structure_id.list||[]).find(function(e){return e.id===t.formInline.structure_id});i&&this.$set(this.formInline,"parent_id",i.owner_user_id||"")}},getUserCount:function(){var e=this;this.depLoading=!0,Object(o.a)().then(function(t){e.depLoading=!1;var i=t.data[0]||{};e.employeeMenu.forEach(function(e){e.count=i[e.field]}),e.userTotal=e.currentMenuData.count}).catch(function(){e.depLoading=!1})},changeDepClick:function(e){this.currentMenuData=e,this.userTotal=e.count,this.refreshUserList()},changeUserClick:function(e){this.userTotal=e.count,this.currentMenuData=e,this.refreshUserList()},refreshUserList:function(){this.currentPage=1,this.getUserList()},getUserList:function(){var e=this;this.loading=!0;var t={page:this.currentPage,limit:this.pageSize,search:this.searchInput};this.isDepUserShow&&(t.isNeedChild=this.isNeedChild),this.currentMenuData&&(this.currentMenuData.type?"active"==this.currentMenuData.type?t.status=1:t.status={all:"all",new:3,inactive:2,disable:0}[this.currentMenuData.type]:this.currentMenuData.id&&(t.structure_id=this.currentMenuData.id,t.status="all")),Object(r.y)(t).then(function(t){e.tableData=t.data.list,e.total=t.data.dataCount,e.loading=!1}).catch(function(){e.loading=!1})},headerSearch:function(e){this.searchInput=e,this.refreshUserList()},bulkImportClick:function(){this.bulkImportShow=!0},handleClose:function(){this.employeeDetailDialog=!1},rowClick:function(e,t,i){this.dialogData=e,"realname"==t.property&&(this.employeeDetailDialog=!0)},newHandleClose:function(){this.employeeCreateDialog=!1},addEmployee:function(){this.getHandleEmployeeRelateData(),this.dialogTitle="新建员工",this.formInline={groupids:[],structure_id:this.currentMenuData&&this.currentMenuData.id?this.currentMenuData.id:"",parent_id:this.currentMenuData&&this.currentMenuData.owner_user_id?this.currentMenuData.owner_user_id:""},this.employeeCreateDialog=!0},getHandleEmployeeRelateData:function(){this.getSelectUserList(),this.getDepList(),this.getRoleList()},editBtn:function(){this.dialogTitle="编辑员工",this.getHandleEmployeeRelateData();for(var e={},t=0;t<this.tableList.length;t++){var i=this.tableList[t];"password"!==i.field&&("groupids"===i.field?e[i.field]=this.dialogData.groupids?this.dialogData.groupids.split(",").map(function(e,t,i){return parseInt(e)}):[]:"parent_id"===i.field?e.parent_id=this.dialogData.parent_id||"":"structure_id"===i.field?e.structure_id=this.dialogData.structure_id:e[i.field]=this.dialogData[i.field])}e.id=this.dialogData.id,this.formInline=e,this.employeeCreateDialog=!0},getDepList:function(){var e=this;Object(r.j)().then(function(t){e.optionsList.structure_id.list=t.data}).catch(function(){})},getRoleList:function(){var e=this;Object(o.i)({tree:1}).then(function(t){e.groupsList=t.data}).catch(function(){})},addStruc:function(){var e=this.allDepData&&this.allDepData.length?this.allDepData[0].id:"";e&&(this.depCreateLabelValue="",this.depCreateLabel="新增部门",this.depCreateTitle="新增部门",this.depOwnerUserId="",this.depSelect=e,this.getStructuresListBySuperior({id:e,type:"save"}),this.depCreateDialog=!0)},strucMoreHandleClick:function(e){"edit"==e?this.editStruc(this.currentMenuData):"delete"==e&&this.deleteStruc(this.currentMenuData)},appendStruc:function(e){this.depCreateLabelValue="",this.depCreateLabel="新增部门",this.depCreateTitle="新增部门",this.depSelect=e.id,this.getStructuresListBySuperior({id:e.id,type:"save"}),this.depCreateDialog=!0},getStructuresListBySuperior:function(e){var t=this;this.superDepList=[],Object(r.n)(e).then(function(e){t.superDepList=e.data}).catch(function(){})},editStruc:function(e){this.depCreateLabelValue=e.label,this.treeEditId=e.id,this.depSelect=e.pid,this.depOwnerUserId=e.owner_user_id,this.depCreateTitle="编辑部门",this.depCreateLabel="编辑部门",this.getStructuresListBySuperior({id:e.id,type:"update"}),this.depCreateDialog=!0},deleteStruc:function(e){var t=this;this.$confirm("此操作将删除"+e.name+"部门,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.loading=!0,Object(o.f)({id:e.id}).then(function(e){t.getDepTreeList(),t.currentMenuData=t.employeeMenu[0],t.$message.success("删除成功"),t.loading=!1}).catch(function(){t.loading=!1})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})},depCreateClose:function(){this.depCreateDialog=!1},submitDialog:function(){var e=this;"新增部门"==this.depCreateLabel?Object(o.h)({name:this.depCreateLabelValue,pid:this.depSelect,owner_user_id:this.depOwnerUserId}).then(function(t){e.getDepList(),e.getDepTreeList(),e.depCreateClose()}):Object(o.g)({name:this.depCreateLabelValue,id:this.treeEditId,pid:this.depSelect,owner_user_id:this.depOwnerUserId}).then(function(t){e.$message.success("操作成功"),e.getDepTreeList(),e.depCreateClose()})},getDepTreeList:function(){var e=this;this.depLoading=!0,Object(r.j)({type:"tree"}).then(function(t){e.allDepData=t.data,e.showDepData=t.data||[],e.depLoading=!1}).catch(function(){e.depLoading=!1})},newDialogSubmit:function(){var e=this;this.$refs.dialogRef.validate(function(t){if(!t){if(e.$refs.dialogRef.fields)for(var i=0;i<e.$refs.dialogRef.fields.length;i++){var s=e.$refs.dialogRef.fields[i];if("error"==s.validateState){e.$message.error(s.validateMessage);break}}return!1}if("新建员工"==e.dialogTitle){e.loading=!0;var a=Object(u.t)(e.formInline);a.group_id=a.groupids,a.structure_id=a.structure_id,a.parent_id=a.parent_id,Object(o.j)(a).then(function(t){e.$message.success("新增成功"),e.employeeCreateDialog=!1,e.refreshUserList(),e.getSelectUserList(),e.loading=!1}).catch(function(){e.loading=!1})}else{e.loading=!0;var n=Object(u.t)(e.formInline);n.group_id=n.groupids,n.structure_id=n.structure_id,n.parent_id=n.parent_id,Object(o.k)(n).then(function(t){e.employeeDetailDialog&&(e.employeeDetailDialog=!1),e.employeeCreateDialog=!1,e.$message.success("编辑成功"),e.getUserList(),e.getSelectUserList(),e.loading=!1}).catch(function(){e.loading=!1})}})},handleCommand:function(e){var t=this;switch(e){case"reset":this.passForm={password:""},this.resetPasswordVisible=!0;break;case"status":Object(o.o)({id:[this.dialogData.id],status:0===this.dialogData.status?1:0}).then(function(e){t.employeeDetailDialog=!1,t.$message.success("修改成功"),t.getUserList()})}},selectionBarClick:function(e){var t=this,i=this.selectionList.map(function(e,t,i){return e.id}).join(",");if("lock"===e||"unlock"===e){var s="lock"===e?"禁用":"激活";this.$confirm("这些员工账号将被"+s+", 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.loading=!0,Object(o.o)({id:i.split(","),status:"unlock"===e?1:0}).then(function(e){t.loading=!1,t.$message.success("修改成功"),t.getUserList()}).catch(function(){t.loading=!1})}).catch(function(){t.$message({type:"info",message:"已取消删除"})})}else if("reset"===e)this.resetPasswordVisible=!0;else if("resetName"===e)this.isManageReset=!1,this.slideVerifyPass=!1,this.slideVerifyShow=!1,this.resetUserNameForm={username:"",password:""},this.resetUserNameVisible=!0;else if("edit"===e){this.dialogData=this.selectionList[0],this.dialogTitle="编辑员工",this.getHandleEmployeeRelateData();for(var a={},n=0;n<this.tableList.length;n++){var l=this.tableList[n];"password"!==l.field&&("groupids"===l.field?a[l.field]=this.dialogData.groupids?this.dialogData.groupids.split(",").map(function(e,t,i){return parseInt(e)}):[]:"parent_id"===l.field?a.parent_id=this.dialogData.parent_id||"":"structure_id"===l.field?a.structure_id=this.dialogData.structure_id:a[l.field]=this.dialogData[l.field])}a.id=this.dialogData.id,this.formInline=a,this.employeeCreateDialog=!0}else"editRole"===e||"copyRole"===e?(this.editRoleType=e,this.editRoleDialogShow=!0):"editDep"===e&&(this.editDepDialogShow=!0)},resetPasswordClose:function(){this.resetPasswordVisible=!1},passSubmit:function(e){var t=this;this.$refs.passForm.validate(function(i){if(!i)return!1;var s=[];t.selectionList.length>0?s=t.selectionList.map(function(e,t,i){return e.id}):s.push(t.dialogData.id),e.id=s,t.loading=!0,Object(o.d)(e).then(function(e){t.$message.success("重置成功"),t.resetPasswordClose(),t.loading=!1}).catch(function(){t.loading=!1})})},passUserNameSubmit:function(e){var t=this;this.$refs.resetUserNameForm.validate(function(i){if(!i)return!1;if(t.selectionList.length>0)if(e.id=t.selectionList[0].id,t.isManageReset){if(!t.resetUserNameForm.smscode)return void t.$message.error("请输入验证码");t.loading=!0,Object(o.c)(e).then(function(e){t.$message.success("重置成功"),t.resetUserNameVisible=!1,t.loading=!1,t.refreshUserList()}).catch(function(){t.loading=!1})}else t.loading=!0,Object(o.e)(e).then(function(e){3===e.status?(t.$message.error("当前为系统注册账号(手机号),重置需要获取新手机号验证码"),t.isManageReset=!0):(t.$message.success("重置成功"),t.resetUserNameVisible=!1,t.refreshUserList()),t.loading=!1}).catch(function(){t.loading=!1})})},sliderSuccess:function(){var e=this;setTimeout(function(){e.slideVerifyPass=!0,e.slideVerifyShow=!1},500)},sliderFail:function(){},sliderRefresh:function(){},getSmsCode:function(){var e=this;this.canSlideVerify?this.slideVerifyPass?Object(c.e)({telephone:this.resetUserNameForm.username,type:1}).then(function(){e.startTimer()}).catch():this.$message.error("请先进行滑动验证"):this.$message.error("请输入正确的手机号")},startTimer:function(){var e=this;this.codeSecond===this.codeTime&&this.codeSecond--,this.codeTimer=setTimeout(function(){e.codeSecond--,e.codeSecond>=0?e.startTimer():(clearTimeout(e.codeTimer),e.codeTimer=null,e.codeSecond=e.codeTime)},1e3)},handleSizeChange:function(e){this.pageSize=e,this.refreshUserList()},handleCurrentChange:function(e){this.currentPage=e,this.getUserList()},handleSelectionChange:function(e){this.selectionList=e},getSelectUserList:function(){var e=this;this.loading=!0,Object(r.x)({status:"all"}).then(function(t){e.optionsList.parent_id.list=[{id:"",name:"请选择"}];var i=!0,s=!1,n=void 0;try{for(var l,o=a()(t.data);!(i=(l=o.next()).done);i=!0){var r=l.value;e.optionsList.parent_id.list.push({id:r.id,name:r.username})}}catch(e){s=!0,n=e}finally{try{!i&&o.return&&o.return()}finally{if(s)throw n}}e.loading=!1}).catch(function(){e.loading=!1})},getStatusColor:function(e){return 0==e?"#FF6767":1==e?"#46CDCF":2==e?"#CCCCCC":void 0},tableFormatter:function(e,t){return e[t.property]}}},R=(i("OxiS"),Object(h.a)(I,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"employee-dep-management"},[s("xr-header",{attrs:{content:e.searchInput,placeholder:"请输入员工名称/手机号","show-search":"","icon-class":"wk wk-s-seas","icon-color":"#26D4DA",label:"员工与部门管理"},on:{"update:content":function(t){e.searchInput=t},search:e.headerSearch}},[s("el-button",{staticClass:"xr-btn--orange",attrs:{slot:"ft",type:"primary"},on:{click:e.bulkImportClick},slot:"ft"},[e._v("批量导入")])],1),e._v(" "),s("div",{staticClass:"system-content"},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.depLoading,expression:"depLoading"}],staticClass:"system-nav"},[s("div",{staticClass:"system-nav__title"},[e._v("\n 企业组织架构\n ")]),e._v(" "),s("div",{staticClass:"system-nav__content"},[s("div",{staticClass:"section"},[s("div",{staticClass:"section__title"},[e._v("员工")]),e._v(" "),s("div",{staticClass:"section__content"},e._l(e.employeeMenu,function(t,i){return s("flexbox",{key:i,class:["menu-item",{"is-select":e.currentMenuData&&e.currentMenuData.type==t.type}],nativeOn:{click:function(i){e.changeUserClick(t)}}},[s("i",{staticClass:"menu-item__icon",class:t.icon}),e._v(" "),s("div",{staticClass:"menu-item__content"},[e._v(e._s(t.label)+" "),t.count>0?s("span",{staticStyle:{color:"#999"}},[e._v("("+e._s(t.count)+")")]):e._e()])])}))]),e._v(" "),s("div",{staticClass:"section"},[s("div",{staticClass:"section__title"},[e._v("部门\n "),e.strucSaveAuth?s("el-button",{staticClass:"add-btn",attrs:{type:"text",icon:"el-icon-circle-plus"},on:{click:e.addStruc}},[e._v("创建部门")]):e._e()],1),e._v(" "),s("div",{staticClass:"section__content"},[s("el-tree",{ref:"tree",attrs:{data:e.showDepData,"node-key":"structure_id","highlight-current":"","default-expand-all":""},on:{"node-click":e.changeDepClick},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.node;return s("flexbox",{staticClass:"node-data",class:{"is-current":i.isCurrent}},[1==i.level?s("i",{staticClass:"wk wk-department"}):s("span",{staticClass:"node-data__mark"}),e._v(" "),s("div",{staticClass:"node-data__label text-one-line "},[e._v(e._s(i.label))]),e._v(" "),i.childNodes&&i.childNodes.length?s("i",{staticClass:"wk wk-up-unfold",class:{"is-close":!i.expanded}}):e._e()])}}])})],1)])])]),e._v(" "),s("div",{staticClass:"system-view-table flex-index"},[0===e.selectionList.length?s("flexbox",{staticClass:"table-top",attrs:{justify:"space-between"}},[s("div",{staticClass:"table-top__title"},[s("span",[e._v(e._s(""+(e.currentMenuData?e.currentMenuData.label:""))),e.isDepUserShow?e._e():[e._v(e._s(""+(e.userTotal||0)))]],2),e._v(" "),e.currentMenuData&&e.currentMenuData.tips?s("el-tooltip",{attrs:{content:e.currentMenuData.tips,effect:"dark",placement:"top"}},[s("i",{staticClass:"wk wk-help wk-help-tips"})]):e._e(),e._v(" "),e.currentMenuData&&e.currentMenuData.type&&"all"==e.currentMenuData.type?s("reminder",{staticClass:"all-user-reminder",attrs:{content:"未添加部门和角色的员工无法正常登录系统"}}):e._e()],1),e._v(" "),s("div",[e.isDepUserShow?s("el-checkbox",{attrs:{"true-label":1,"false-label":0},on:{change:e.refreshUserList},model:{value:e.isNeedChild,callback:function(t){e.isNeedChild=t},expression:"isNeedChild"}},[e._v("包含子部门")]):e._e(),e._v(" "),e.userSaveAuth?s("el-button",{attrs:{type:"text",icon:"el-icon-circle-plus"},on:{click:e.addEmployee}},[e._v("添加员工")]):e._e(),e._v(" "),e.strucSaveAuth&&e.currentMenuData&&e.currentMenuData.id?s("el-button",{attrs:{type:"text",icon:"el-icon-circle-plus"},on:{click:function(t){e.appendStruc(e.currentMenuData)}}},[e._v("创建子部门")]):e._e(),e._v(" "),e.currentMenuData&&e.currentMenuData.id&&e.strucMoreOptions.length>0?s("el-dropdown",{attrs:{trigger:"click"},on:{command:e.strucMoreHandleClick}},[s("el-button",{attrs:{icon:"el-icon-more"}}),e._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.strucMoreOptions,function(t,i){return s("el-dropdown-item",{key:i,attrs:{icon:e._f("wkIconPre")(t.icon),command:t.type}},[e._v(e._s(t.name))])}))],1):e._e()],1)]):e._e(),e._v(" "),e.selectionList.length>0?s("flexbox",{staticClass:"selection-bar"},[s("div",{staticClass:"selected—title"},[e._v("已选中 "),s("span",{staticClass:"selected—count"},[e._v(e._s(e.selectionList.length))]),e._v(" 项")]),e._v(" "),s("flexbox",{staticClass:"selection-items-box"},e._l(e.selectionInfo,function(t,i){return s("el-button",{key:i,attrs:{icon:e._f("wkIconPre")(t.icon),type:"primary"},nativeOn:{click:function(i){e.selectionBarClick(t.type)}}},[e._v(e._s(t.name))])}))],1):e._e(),e._v(" "),s("div",{staticClass:"flex-box"},[s("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{id:"depTable",data:e.tableData,height:e.tableHeight},on:{"selection-change":e.handleSelectionChange,"row-click":e.rowClick}},[e.tableUpdateAuth?s("el-table-column",{attrs:{type:"selection",width:"55"}}):e._e(),e._v(" "),s("el-table-column",{attrs:{prop:"realname",width:"150","show-overflow-tooltip":"",label:"姓名"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return t.column,[s("span",{staticClass:"status-name"},[s("span",{staticClass:"status-mark",style:{"background-color":e.getStatusColor(i.status)}}),e._v(" "),0===i.userIdentity?s("span",{staticClass:"main-mark"},[e._v("主账号")]):e._e(),e._v(" "),1===i.userIdentity?s("span",{staticClass:"main-mark"},[e._v("负责人")]):e._e(),e._v(" "),s("span",[e._v(e._s(i.realname))])])]}}])}),e._v(" "),e._l(e.fieldList,function(t,i){return s("el-table-column",{key:i,attrs:{width:t.width,prop:t.field,label:t.value,formatter:e.tableFormatter,"show-overflow-tooltip":""}})}),e._v(" "),s("el-table-column")],2),e._v(" "),s("div",{staticClass:"p-contianer"},[s("div",{staticClass:"status-des"},e._l(e.statusOptions,function(t){return s("div",{key:t.value,staticClass:"status-des-item"},[s("div",{style:{"background-color":e.getStatusColor(t.value)}}),e._v("\n "+e._s(t.label)+"\n ")])})),e._v(" "),s("el-pagination",{staticClass:"p-bar",attrs:{"current-page":e.currentPage,"page-sizes":e.pageSizes,"page-size":e.pageSize,total:e.total,background:"",layout:"prev, pager, next, sizes, total, jumper"},on:{"update:pageSize":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)],1)]),e._v(" "),s("el-dialog",{attrs:{visible:e.depCreateDialog,"close-on-click-modal":!1,title:e.depCreateTitle,"before-close":e.depCreateClose,width:"30%"},on:{"update:visible":function(t){e.depCreateDialog=t}}},[s("div",{staticClass:"nav-dialog-div"},[s("label",[e._v(e._s(e.depCreateLabel)+"")]),e._v(" "),s("el-input",{attrs:{maxlength:20,placeholder:"请输入内容"},model:{value:e.depCreateLabelValue,callback:function(t){e.depCreateLabelValue=t},expression:"depCreateLabelValue"}})],1),e._v(" "),0!=e.depSelect?s("div",{staticClass:"nav-dialog-div"},[s("label",[e._v("上级部门:")]),e._v(" "),s("el-select",{attrs:{clearable:!1},model:{value:e.depSelect,callback:function(t){e.depSelect=t},expression:"depSelect"}},e._l(e.superDepList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e(),e._v(" "),s("flexbox",{staticClass:"nav-dialog-div"},[s("label",[e._v("部门负责人:")]),e._v(" "),s("wk-user-select",{attrs:{radio:""},model:{value:e.depOwnerUserId,callback:function(t){e.depOwnerUserId=t},expression:"depOwnerUserId"}})],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.depCreateDialog=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.submitDialog}},[e._v("确 定")])],1)],1),e._v(" "),e.employeeDetailDialog?s("employee-detail",{attrs:{data:e.dialogData},on:{edit:e.editBtn,command:e.handleCommand,"hide-view":function(t){e.employeeDetailDialog=!1}}}):e._e(),e._v(" "),s("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{visible:e.resetPasswordVisible,"close-on-click-modal":!1,"modal-append-to-body":!1,"before-close":e.resetPasswordClose,title:"重置密码",width:"30%"},on:{"update:visible":function(t){e.resetPasswordVisible=t}}},[s("div",{staticClass:"el-password"},[s("el-form",{ref:"passForm",attrs:{model:e.passForm,rules:e.rules}},[s("el-form-item",{attrs:{label:"密码",prop:"password"}},[s("el-input",{attrs:{type:"password"},model:{value:e.passForm.password,callback:function(t){e.$set(e.passForm,"password",t)},expression:"passForm.password"}})],1)],1)],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:e.resetPasswordClose}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.passSubmit(e.passForm)}}},[e._v("确 定")])],1)]),e._v(" "),s("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{visible:e.resetUserNameVisible,"close-on-click-modal":!1,"modal-append-to-body":!1,"before-close":function(){e.resetUserNameVisible=!1},title:"重置登录账号",width:"30%"},on:{"update:visible":function(t){e.resetUserNameVisible=t}}},[s("div",{staticClass:"el-password"},[s("el-form",{ref:"resetUserNameForm",attrs:{model:e.resetUserNameForm,rules:e.dialogRules}},[s("el-form-item",{attrs:{label:"新账号(手机号)",prop:"username"}},[s("el-input",{model:{value:e.resetUserNameForm.username,callback:function(t){e.$set(e.resetUserNameForm,"username",t)},expression:"resetUserNameForm.username"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"新密码",prop:"password"}},[s("el-input",{attrs:{type:"password"},model:{value:e.resetUserNameForm.password,callback:function(t){e.$set(e.resetUserNameForm,"password",t)},expression:"resetUserNameForm.password"}})],1),e._v(" "),e.isManageReset?[s("el-popover",{attrs:{disabled:e.slideVerifyPass||!e.canSlideVerify,placement:"top-start",width:"332","popper-class":"no-padding-popover",trigger:"click"},model:{value:e.slideVerifyShow,callback:function(t){e.slideVerifyShow=t},expression:"slideVerifyShow"}},[s("slide-verify",{attrs:{phone:e.resetUserNameForm.username,"slider-text":"向右滑动"},on:{success:e.sliderSuccess,fail:e.sliderFail,refresh:e.sliderRefresh,close:function(t){e.slideVerifyShow=!1}}}),e._v(" "),s("div",{staticClass:"verify-picture",class:{success:e.slideVerifyPass},attrs:{slot:"reference"},slot:"reference"},[e.slideVerifyPass?[s("img",{staticClass:"icon",attrs:{src:i("1nm8"),alt:""}}),e._v(" "),s("span",{staticClass:"text"},[e._v("验证成功")])]:[s("img",{staticClass:"icon",attrs:{src:i("tk0Z"),alt:""}}),e._v(" "),s("span",{staticClass:"text"},[e._v("点击完成验证")])]],2)],1),e._v(" "),s("el-form-item",[s("div",{staticClass:"sms-box"},[s("el-input",{ref:"smscode",attrs:{placeholder:"请输入短信验证码"},model:{value:e.resetUserNameForm.smscode,callback:function(t){e.$set(e.resetUserNameForm,"smscode","string"==typeof t?t.trim():t)},expression:"resetUserNameForm.smscode"}}),e._v(" "),s("el-button",{attrs:{disabled:e.codeTime!==e.codeSecond},on:{click:e.getSmsCode}},[s("div",{staticClass:"btn-content"},[e.codeTime===e.codeSecond?[s("span",[e._v("获取验证码")])]:[s("span",[e._v("重新发送("+e._s(e.codeSecond)+"s)")])]],2)])],1)])]:e._e()],2),e._v(" "),s("div",{staticClass:"tips",staticStyle:{"margin-top":"20px"}},[e._v("重置登录帐号后,员工需用新账号登录。请及时告知员工,确保正常使用")])],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(){e.resetUserNameVisible=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.passUserNameSubmit(e.resetUserNameForm)}}},[e._v("确 定")])],1)]),e._v(" "),e.employeeCreateDialog?s("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{title:e.dialogTitle,visible:e.employeeCreateDialog,"close-on-click-modal":!1,"modal-append-to-body":!0,"append-to-body":!0,"before-close":e.newHandleClose,width:"60%"},on:{"update:visible":function(t){e.employeeCreateDialog=t}}},[s("el-form",{ref:"dialogRef",staticClass:"new-dialog-form",attrs:{inline:!0,model:e.formInline,rules:e.dialogRules,"label-width":"80px","label-position":"top"}},e._l(e.tableList,function(t,i){return s("el-form-item",{key:i,attrs:{label:t.value,prop:t.field}},[s("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(t.value))]),e._v(" "),t.tips?s("el-tooltip",{attrs:{slot:"label",content:t.tips,effect:"dark",placement:"top"},slot:"label"},[s("i",{staticClass:"wukong wukong-help_tips"})]):e._e(),e._v(" "),"select"==t.type?[s("el-select",{attrs:{filterable:""},on:{change:function(i){e.addUserSelectChange(t)}},model:{value:e.formInline[t.field],callback:function(i){e.$set(e.formInline,t.field,i)},expression:"formInline[item.field]"}},e._l(e.optionsList[t.field].list,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))]:"selectCheckout"==t.type?[s("el-select",{attrs:{"popper-append-to-body":!1,"popper-class":"select-popper-class",filterable:"",multiple:""},model:{value:e.formInline[t.field],callback:function(i){e.$set(e.formInline,t.field,i)},expression:"formInline[item.field]"}},e._l(e.groupsList,function(t){return s("el-option-group",{key:t.pid,attrs:{label:t.name}},e._l(t.list,function(e){return s("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))}))]:s("el-input",{attrs:{maxlength:100,disabled:"编辑员工"==e.dialogTitle&&"username"==t.field},model:{value:e.formInline[t.field],callback:function(i){e.$set(e.formInline,t.field,i)},expression:"formInline[item.field]"}})],2)})),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:e.newDialogSubmit}},[e._v("保 存")]),e._v(" "),s("el-button",{on:{click:function(t){e.employeeCreateDialog=!1}}},[e._v("取 消")])],1)],1):e._e(),e._v(" "),s("bulk-import-user",{attrs:{show:e.bulkImportShow},on:{close:function(t){e.bulkImportShow=!1},success:e.refreshUserList}}),e._v(" "),e.editRoleDialogShow?s("edit-role-dialog",{attrs:{"user-show":"copyRole"===e.editRoleType,"selection-list":e.selectionList,visible:e.editRoleDialogShow},on:{"update:visible":function(t){e.editRoleDialogShow=t},change:e.getUserList}}):e._e(),e._v(" "),e.editDepDialogShow?s("edit-dep-dialog",{attrs:{"selection-list":e.selectionList,visible:e.editDepDialogShow},on:{"update:visible":function(t){e.editDepDialogShow=t},change:e.getUserList}}):e._e()],1)},[],!1,null,"7981ee9a",null));R.options.__file="index.vue";t.default=R.exports},jlEs:function(e,t,i){},tk0Z:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1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