(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-748c4c01"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function _(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function n(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,r){var o=n(),s=e-o,l=20,i=0;t="undefined"===typeof t?500:t;var c=function e(){i+=l;var n=Math.easeInOutQuad(i,o,s,t);_(n),i0?r("select-user",{key:a,attrs:{name:a,item:t,branchsyId:e.branchsyId,employeeByOrganId:e.employeeByOrganId,technicianByOrganId:e.technicianByOrganId}}):e._e()]}))],2),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.$listeners.close}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1)},_=[],n=(r("ac6a"),r("5df3"),r("5530")),o=r("c7eb"),s=(r("96cf"),r("1da1")),l=r("b85c"),i=r("a2b6"),c=r("99b4"),d=r("8985"),u=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-alert",{staticClass:"alert",attrs:{type:"info",closable:!1},scopedSlots:e._u([{key:"title",fn:function(){return[r("div",{staticClass:"title"},[r("span",[e._v(e._s(e.formatName))]),e._v(" "),r("el-button",{staticStyle:{padding:"5px"},attrs:{type:"text"},on:{click:e.clear}},[e._v("清空")])],1)]},proxy:!0}])}),e._v(" "),r("div",{staticClass:"content"},e._l(e.item,(function(t,a){return r("el-row",{key:t.organId},[r("el-col",{attrs:{span:8}},[r("el-form-item",{attrs:{label:e.branchsyId[t.organId]&&e.branchsyId[t.organId].name}})],1),e._v(" "),r("el-col",{attrs:{span:16}},[r("el-form-item",{attrs:{label:"交接人",prop:e.name+"."+a+".transferUserId",rules:[{required:!0,message:"请选择交接人"}]}},[r("el-select",{attrs:{value:t.transferUserId,clearable:"",filterable:""},on:{change:function(r){return e.change(r,t)}}},e._l(e.options[t.organId],(function(e){return r("el-option",{key:e.id||e.userId,attrs:{value:e.id||e.userId,label:e.realName}})})),1)],1)],1)],1)})),1)],1)},m=[],p=(r("7f7f"),{props:["item","name","branchsyId","employeeByOrganId","technicianByOrganId"],computed:{formatName:function(){var e={repair:"维修技师",director:"乐队指导",education:"乐团主管",teamTeacher:"运营主管"};return e[this.name]},options:function(){return"repair"===this.name?this.technicianByOrganId:this.employeeByOrganId}},methods:{quickSetting:function(e){this.item.forEach((function(t){t.transferUserId||(t.transferUserId=e)}))},change:function(e,t){t.transferUserId=e},clear:function(){this.item.forEach((function(e){e.transferUserId=""}))}}}),f=p,b=(r("4c48"),r("2877")),h=Object(b["a"])(f,u,m,!1,null,"5e45ed94",null),g=h.exports,E={props:["detail"],components:{"select-user":g},data:function(){return{list:[],form:{repair:[],director:[],education:[],teamTeacher:[]},employees:[],loading:!1}},computed:{isEmpty:function(){var e=!0;for(var t in this.form)if(Object.hasOwnProperty.call(this.form,t)){var r=this.form[t];r.length>0&&(e=!1)}return e},branchsyId:function(){return Object(i["a"])(this.selects.branchs,"id")},technicianByOrganId:function(){var e,t,r={},a=Object(l["a"])(null===(e=this.selects.roles)||void 0===e?void 0:e.REPAIR);try{for(a.s();!(t=a.n()).done;){var _=t.value;if(_.organIdList){var n,o=Object(l["a"])(_.organIdList);try{for(o.s();!(n=o.n()).done;){var s=n.value;r[s]||(r[s]=[]),r[s].push(_)}}catch(i){o.e(i)}finally{o.f()}}}}catch(i){a.e(i)}finally{a.f()}return r},employeeByOrganId:function(){var e,t={},r=Object(l["a"])(this.employees);try{for(r.s();!(e=r.n()).done;){var a=e.value;if(a.organIdList){var _,n=Object(l["a"])(a.organIdList);try{for(n.s();!(_=n.n()).done;){var o=_.value;t[o]||(t[o]=[]),t[o].push(a)}}catch(s){n.e(s)}finally{n.f()}}}}catch(s){r.e(s)}finally{r.f()}return console.log(t),t}},mounted:function(){var e=Object(s["a"])(Object(o["a"])().mark((function e(){return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$store.dispatch("setBranchs"),e.next=3,this.$store.dispatch("setOrganRole");case 3:this.FetchDetail();case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{submit:function(){var e=Object(s["a"])(Object(o["a"])().mark((function e(){var t=this;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.$refs.form){e.next=12;break}return e.prev=1,e.next=4,Object(c["k"])({employeeId:this.detail.id,operate:"DEMISSION"});case 4:this.$message.success("提交成功"),this.$listeners.close(),this.$listeners.submited(),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](1);case 11:return e.abrupt("return");case 12:this.$refs.form.validate(function(){var e=Object(s["a"])(Object(o["a"])().mark((function e(r){var a,_,s;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=14;break}for(s in a=[],_=function(e){if(Object.hasOwnProperty.call(t.form,e)){var r=t.form[e];a=a.concat(r.map((function(t){return Object(n["a"])(Object(n["a"])({},t),{},{roleName:e})})))}},t.form)_(s);return e.prev=4,e.next=7,Object(d["b"])(a);case 7:t.$message.success("提交成功"),t.$listeners.close(),t.$listeners.submited(),e.next=14;break;case 12:e.prev=12,e.t0=e["catch"](4);case 14:case"end":return e.stop()}}),e,null,[[4,12]])})));return function(t){return e.apply(this,arguments)}}());case 13:case"end":return e.stop()}}),e,this,[[1,9]])})));function t(){return e.apply(this,arguments)}return t}(),FetchDetail:function(){var e=Object(s["a"])(Object(o["a"])().mark((function e(){var t,r,a,_,n,s,i=this;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loading=!0,e.prev=1,e.next=4,Promise.all([Object(d["a"])({rows:99999,demissionflag:0}),Object(d["c"])({userId:this.detail.id})]).then((function(e){return i.employees=e[0].data.rows,e[1]}));case 4:for(r in t=e.sent,this.list=t.data,t.data)if(Object.hasOwnProperty.call(t.data,r)){a=t.data[r],_=Object(l["a"])(a);try{for(_.s();!(n=_.n()).done;)s=n.value,this.form[r].push({organId:s,transferUserId:"",levelUserId:this.detail.id})}catch(o){_.e(o)}finally{_.f()}}this.form=this.form,e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](1);case 12:this.loading=!1;case 13:case"end":return e.stop()}}),e,this,[[1,10]])})));function t(){return e.apply(this,arguments)}return t}()}},O=E,v=(r("8e03"),Object(b["a"])(O,a,_,!1,null,"4d6100e8",null));t["a"]=v.exports},"3b13":function(e,t,r){},"488e":function(module,__webpack_exports__,__webpack_require__){"use strict";var D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("b85c"),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("28a5"),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("c5f6"),core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("6762"),core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es7_array_includes__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("2fdb"),core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es6_string_includes__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es6_string_iterator__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("5df3"),core_js_modules_es6_string_iterator__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es6_string_iterator__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es6_set__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("4f7f"),core_js_modules_es6_set__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es6_set__WEBPACK_IMPORTED_MODULE_6__),D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("2909"),D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("c7eb"),regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("96cf"),regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_9__),D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("1da1"),core_js_modules_es6_regexp_search__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("386d"),core_js_modules_es6_regexp_search__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(core_js_modules_es6_regexp_search__WEBPACK_IMPORTED_MODULE_11__),D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("5530"),D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("15fd"),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("ac6a"),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_14__),_components_Pagination_index__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("333d"),_utils_directivePage__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("ec8a"),_api_systemManage__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("99b4"),_api__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("8985"),_helpers_deep_clone__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("be41"),_components_Tooltip_index__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("a5b0"),_utils_validate__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("61f7"),_modals_handover__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("33be"),_components_QrCode_index__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("641c"),_excluded=["organIdLists","postDeptIds","deptIds","deptId"],validPhone=function(e,t,r){t?Object(_utils_validate__WEBPACK_IMPORTED_MODULE_21__["b"])(t)?r():r(new Error("请输入正确的11位手机号码")):r(new Error("请输入电话号码"))};__webpack_exports__["a"]={name:"staffManager",components:{pagination:_components_Pagination_index__WEBPACK_IMPORTED_MODULE_15__["a"],Tooltip:_components_Tooltip_index__WEBPACK_IMPORTED_MODULE_20__["a"],handover:_modals_handover__WEBPACK_IMPORTED_MODULE_22__["a"],QrCode:_components_QrCode_index__WEBPACK_IMPORTED_MODULE_23__["a"]},data:function(){return{roleResetList:[],organList:[],tableList:[],deptList:[],deptSmallList:[],postList:[],qrCodeStatus:!1,codeUrl:null,educationForm:{targetUserId:""},educationViseble:!1,activeRow:null,pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},detail:null,handoverVisible:!1,roleStatus:!1,formActionTitle:"create",roleList:[],roleBaseList:[],formTitle:{create:"添加员工",update:"修改员工"},formLabelWidth:"120px",form:{realName:null,gender:null,phone:null,roleIds:[],deptId:null,organIdLists:[],positionIds:[],postDeptIds:[{postId:null,deptIds:[]}],deptIds:[],jobNature:null,entryDate:null,contactAddress:null,postalCode:null},rules:{realName:[{required:!0,message:"请输入姓名",trigger:"blur"}],gender:[{required:!0,message:"请选择性别",trigger:"change"}],phone:[{type:"number",required:!0,validator:validPhone,trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],roleIds:[{type:"array",required:!0,message:"请选择分类",trigger:"change"}],organIdLists:[{type:"array",required:!0,message:"请选择所属分部",trigger:"change"}],positionIds:[{type:"array",required:!0,message:"请选择员工职位",trigger:"change"}],jobNature:[{required:!0,message:"请选择工作类型",trigger:"change"}],entryDate:[{required:!0,message:"请选择入职时间",trigger:"blur"}]},searchForm:{search:null,jobNature:null,organId:null,roleId:null},positionList:[]}},mounted:function(){this.getList(),this.getRoleList()},methods:{permission:_utils_directivePage__WEBPACK_IMPORTED_MODULE_16__["a"],handover:function(e){this.detail=e,this.handoverVisible=!0},onCreateQRCode:function(){this.qrCodeStatus=!0,this.codeUrl=Object(_utils_validate__WEBPACK_IMPORTED_MODULE_21__["g"])()+"/#/manageDownload"},onBranchCheckAll:function(){var e=this;this.form.organIdLists=[],this.organList.forEach((function(t){e.form.organIdLists.push(t.id)}))},onRoleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(e){var r=t.form,a=r.organIdLists,_=r.postDeptIds,n=r.deptIds,o=r.deptId,s=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_13__["a"])(r,_excluded),l=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_12__["a"])({postDeptIds:JSON.stringify(_),organIdList:a.join(","),deptIds:n,deptId:o},s);"create"==t.formActionTitle?(t.form.id&&delete t.form.id,Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["j"])(l).then((function(e){t.messageTips("添加",e)}))):"update"==t.formActionTitle&&Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["l"])(l).then((function(e){t.messageTips("修改",e)}))}}))},messageTips:function(e,t){200==t.code?(this.$message.success(e+"成功"),this.roleStatus=!1,this.getList()):this.$message.error(t.msg)},search:function(){this.pageInfo.page=1,this.getList()},reset:function(){this.$refs.searchForm.resetFields(),this.search()},getList:function(){var e=this,t=this.searchForm,r={search:t.search?t.search:null,jobNature:t.jobNature?t.jobNature:null,organId:t.organId?t.organId:null,roleId:t.roleId?t.roleId:null,rows:this.pageInfo.limit,page:this.pageInfo.page};Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["F"])(r).then((function(t){200==t.code&&t.data&&(e.tableList=t.data.rows,e.pageInfo.total=t.data.total)}))},normalizer:function(e){var t=this,r=[];return e.children&&e.children.length>0&&e.children.forEach((function(e){var a=t.normalizer(e,status),_={value:e.deptId,label:e.deptName};a&&a.length>0&&(_.children=a),r.push(_)})),r},getRoleList:function(){var e=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__["a"])(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().mark((function e(){var t=this;return Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["u"])({delFlag:0,rows:9999}).then((function(e){var r=e.data;200==e.code&&r&&r.rows.length>0&&(t.roleList=[],r.rows.forEach((function(e){t.roleList.push({label:e.roleName,value:e.id,disabled:!1})})))})),this.$store.dispatch("setBranchs");case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onDeptChange:function(e){var t=this;this.form.deptId=null,this.deptSmallList=[];var r=e.flat(1/0);r=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_7__["a"])(new Set(r));var a=Object(_helpers_deep_clone__WEBPACK_IMPORTED_MODULE_19__["a"])(this.deptList),_=[];a.forEach((function(e){_.push({value:e.value,label:e.label,disabled:!r.includes(e.value),children:t.normalizer2(e,r)})})),this.deptSmallList=_},normalizer2:function(e,t){var r=this,a=[];return e.children&&e.children.length>0&&e.children.forEach((function(e){var _=r.normalizer2(e,t),n={value:e.value,label:e.label,disabled:!t.includes(e.value)};_&&_.length>0&&(n.children=_),a.push(n)})),a},roleOperation:function(){var _roleOperation=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__["a"])(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().mark((function _callee2(type,data){var _this8=this,res,roleIdList,postDeptArr,postDept,deptIds;return Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().wrap((function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:return _context2.next=2,Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["G"])().then((function(e){200==e.code&&(_this8.organList=e.data)}));case 2:return _context2.prev=2,_context2.next=5,Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["q"])();case 5:res=_context2.sent,this.positionList=res.data,_context2.next=12;break;case 9:_context2.prev=9,_context2.t0=_context2["catch"](2),console.log(_context2.t0);case 12:this.formActionTitle=type,this.roleStatus=!0,"update"==type?(roleIdList=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_7__["a"])(data.roleIds),postDeptArr=[],postDept=data.postDeptIds?JSON.parse(data.postDeptIds):[],postDeptArr=postDept.length>0?Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_7__["a"])(postDept):[{postId:null,deptIds:[]}],deptIds=data.deptIds?eval(data.deptIds):[],this.form={id:data.id,realName:data.realName,gender:data.gender,phone:Number(data.phone),roleIds:data.roleIds,deptId:data.deptId,positionIds:data.positionIds?data.positionIds.split(",").map((function(e){return Number(e)})):[],organIdLists:data.organIdList?data.organIdList:[],jobNature:data.jobNature,entryDate:data.entryDate,contactAddress:data.contactAddress,postalCode:data.postalCode,postDeptIds:postDeptArr,deptIds:deptIds}):this.roleResetList=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_7__["a"])(this.roleBaseList);case 15:case"end":return _context2.stop()}}),_callee2,this,[[2,9]])})));function roleOperation(e,t){return _roleOperation.apply(this,arguments)}return roleOperation}(),formatParentId:function(e,t){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],_=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__["a"])(t);try{for(_.s();!(r=_.n()).done;){var n=r.value;if(n.children){var o=this.formatParentId(e,n.children,[].concat(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_7__["a"])(a),[n.value]));if(o.includes(e))return o}if(n.value===e)return[].concat(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_7__["a"])(a),[e])}}catch(s){_.e(s)}finally{_.f()}return a},onFormClose:function(e){this.form={realName:null,gender:null,phone:null,roleName:null,roleIds:[],deptId:null,organIdLists:[],jobNature:null,entryDate:null,contactAddress:null,postalCode:null,deptIds:[],postDeptIds:[{postId:null,deptIds:[]}]},this.$refs[e].resetFields()},formatLockFlag:function(e){var t=["正常","冻结"];return e.demissionDate?"离职":t[e.lockFlag]},checkStatus:function(){var e=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__["a"])(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().mark((function e(t){var r,a=this;return Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["v"])({employeeId:t.id}).then(function(){var e=Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__["a"])(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().mark((function e(_){return Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(200!==_.code){e.next=15;break}if(!_.data.hasCourseSchedule){e.next=6;break}a.$message.error("请先交接指导老师课程"),r=!1,e.next=15;break;case 6:if(!_.data.hasCourseGroupRelation){e.next=14;break}return t.id,e.next=10,a.$store.dispatch("setOrganRole");case 10:a.educationViseble=!0,r=!1,e.next=15;break;case 14:r=!0;case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:return e.abrupt("return",r);case 3:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),onStaffOperation:function(e,t){var r=this,a="RESET_PASSWORD"==e;this.$confirm("您确定".concat(a?"重置密码":"修改员工状态","?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__["a"])(Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().mark((function _(){var n;return Object(D_daya_dy_admin_manager_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["a"])().wrap((function(_){while(1)switch(_.prev=_.next){case 0:if("DEMISSION"!==e||t.demissionDate){_.next=7;break}return r.activeRow=t,_.next=4,r.checkStatus(t);case 4:if(n=_.sent,n){_.next=7;break}return _.abrupt("return");case 7:if("RESET_PASSWORD"!=e){_.next=21;break}return _.prev=8,_.next=11,Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["J"])({userId:t.id});case 11:_.sent,r.$message.success("重置密码成功"),r.getList(),_.next=19;break;case 16:_.prev=16,_.t0=_["catch"](8),console.log(_.t0);case 19:_.next=22;break;case 21:Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["k"])({employeeId:t.id,operate:e}).then((function(e){200==e.code?(r.$message.success(a?"重置密码成功":"更改成功"),r.roleStatus=!1,r.getList()):r.$message.error(e.msg)}));case 22:case"end":return _.stop()}}),_,null,[[8,16]])})))).catch((function(e){}))},submitEducation:function(){var e=this;Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["R"])({currentUserId:this.activeRow.id,targetUserId:this.educationForm.targetUserId}).then((function(t){if(200===t.code){var r="DEMISSION",a=e.activeRow;Object(_api_systemManage__WEBPACK_IMPORTED_MODULE_17__["k"])({employeeId:a.id,operate:r}).then((function(t){200==t.code?(e.$message.success("更改成功"),e.roleStatus=!1,e.educationViseble=!1,e.getList()):e.$message.error(t.msg)}))}}))},removePostDept:function(e){var t=this.form.postDeptIds.indexOf(e);-1!==t&&this.form.postDeptIds.splice(t,1)},addPostDept:function(){this.form.postDeptIds.push({postId:null,deptIds:[]})}},watch:{educationViseble:function(e){e||(this.educationForm.targetUserId="",this.$refs["educationForm"].resetFields())}}}},"4c48":function(e,t,r){"use strict";r("3b13")},"64fa":function(e,t,r){},"861a":function(e,t,r){"use strict";r("64fa")},8985:function(e,t,r){"use strict";r.d(t,"b",(function(){return _})),r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return s}));var a=r("829b"),_=function(e){return Object(a["a"])({url:"/api-web/employee/level",method:"post",data:e})},n=function(e){return Object(a["a"])({url:"/api-web/employee/levelDetail",method:"get",params:e})},o=function(e){return Object(a["a"])({url:"/api-web/employee/queryEmployByOrganId",method:"get",params:e})},s=function(e){return Object(a["a"])({url:"/api-web/open/school/cooperation",method:"get",data:e,params:e})}},"8e03":function(e,t,r){"use strict";r("d88c")},"9d64":function(e,t,r){e.exports=r.p+"static/img/logo.ae7b11a3.png"},"9ebb":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[e._m(0),e._v(" "),r("div",{staticClass:"m-core"},[r("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.reset}},[r("el-form-item",{attrs:{prop:"search"}},[r("el-input",{attrs:{type:"text",clearable:"",placeholder:"姓名/编号/手机号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"jobNature"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择工作类型"},model:{value:e.searchForm.jobNature,callback:function(t){e.$set(e.searchForm,"jobNature","string"===typeof t?t.trim():t)},expression:"searchForm.jobNature"}},[r("el-option",{attrs:{label:"全职",value:"FULL_TIME"}}),e._v(" "),r("el-option",{attrs:{label:"兼职",value:"PART_TIME"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"organId"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId","string"===typeof t?t.trim():t)},expression:"searchForm.organId"}},e._l(e.selects.branchs,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"roleId"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择角色"},model:{value:e.searchForm.roleId,callback:function(t){e.$set(e.searchForm,"roleId","string"===typeof t?t.trim():t)},expression:"searchForm.roleId"}},e._l(e.roleList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")])],1)],1),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"employee/add",expression:"'employee/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(t){return e.roleOperation("create")}}},[e._v("添加")]),e._v(" "),r("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.onCreateQRCode}},[e._v("管理端APP下载")]),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{align:"center",prop:"id",label:"员工编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("copy-text",[e._v(e._s(t.row.id))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"realName",label:"姓名"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("copy-text",[e._v(e._s(t.row.realName))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("copy-text",[e._v(e._s(t.row.phone))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"角色分类"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("tooltip",{attrs:{content:e._f("joinArray")(t.row.roleNames,",")}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"职位"},scopedSlots:e._u([{key:"default",fn:function(e){return[r("tooltip",{attrs:{content:e.row.positionNames}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"jobNature",label:"工作类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("jobNature")(t.row.jobNature))+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"所属分部"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("tooltip",{attrs:{content:e._f("joinArray")(t.row.organNameList,",")}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"状态",formatter:e.formatLockFlag}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"入职时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimer")(t.row.entryDate))+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"离职时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("formatTimer")(t.row.demissionDate))+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",width:"250px",fixed:"right",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.permission("employee/update")?r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.roleOperation("update",t.row)}}},[e._v("修改")]):e._e(),e._v(" "),e.permission("employee/employeeOperate/RESET_PASSWORD")?r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.onStaffOperation("RESET_PASSWORD",t.row)}}},[e._v("重置密码")]):e._e(),e._v(" "),e.permission(1==t.row.lockFlag?"employee/employeeOperate/unlock":"employee/employeeOperate/lock")?r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.onStaffOperation("LOCK_UNLOCK",t.row)}}},[e._v(e._s(1==t.row.lockFlag?"解冻":"冻结"))]):e._e(),e._v(" "),t.row.demissionDate&&e.permission("employee/employeeOperate/REINSTATE")?r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.onStaffOperation("REINSTATE",t.row)}}},[e._v("复职")]):e._e(),e._v(" "),!t.row.demissionDate&&e.permission("employee/level")&&e.permission("employee/levelDetail")?r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.handover(t.row)}}},[e._v("离职")]):e._e()]}}])})],1),e._v(" "),r("pagination",{attrs:{sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1)],1),e._v(" "),r("el-dialog",{attrs:{title:e.formTitle[e.formActionTitle],visible:e.roleStatus,width:"650px"},on:{"update:visible":function(t){e.roleStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[r("el-form",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules}},[r("el-alert",{staticStyle:{margin:"10px 0"},attrs:{title:"基础信息",closable:!1,type:"info"}}),e._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"姓名",prop:"realName","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入姓名",autocomplete:"off"},model:{value:e.form.realName,callback:function(t){e.$set(e.form,"realName","string"===typeof t?t.trim():t)},expression:"form.realName"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"性别",prop:"gender","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择性别",clearable:"",filterable:""},model:{value:e.form.gender,callback:function(t){e.$set(e.form,"gender","string"===typeof t?t.trim():t)},expression:"form.gender"}},[r("el-option",{attrs:{label:"男",value:1}}),e._v(" "),r("el-option",{attrs:{label:"女",value:0}})],1)],1)],1)],1),e._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"手机号",prop:"phone","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入手机号",autocomplete:"off",maxlength:"11",max:11},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",e._n("string"===typeof t?t.trim():t))},expression:"form.phone"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"工作类型",prop:"jobNature","label-width":e.formLabelWidth}},[r("el-select",{attrs:{clearable:"",placeholder:"请选择工作类型",filterable:""},model:{value:e.form.jobNature,callback:function(t){e.$set(e.form,"jobNature","string"===typeof t?t.trim():t)},expression:"form.jobNature"}},[r("el-option",{attrs:{label:"全职",value:"FULL_TIME"}}),e._v(" "),r("el-option",{attrs:{label:"兼职",value:"PART_TIME"}})],1)],1)],1)],1),e._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"入职时间",prop:"entryDate","label-width":e.formLabelWidth}},[r("el-date-picker",{attrs:{type:"date","picker-options":{firstDayOfWeek:1},"value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"选择入职日期"},model:{value:e.form.entryDate,callback:function(t){e.$set(e.form,"entryDate","string"===typeof t?t.trim():t)},expression:"form.entryDate"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"邮政编码",prop:"postalCode","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入邮政编码",autocomplete:"off"},model:{value:e.form.postalCode,callback:function(t){e.$set(e.form,"postalCode","string"===typeof t?t.trim():t)},expression:"form.postalCode"}})],1)],1)],1),e._v(" "),r("el-row",[r("el-form-item",{attrs:{label:"通讯地址",prop:"contactAddress","label-width":e.formLabelWidth}},[r("el-input",{attrs:{placeholder:"请输入通讯地址",autocomplete:"off"},model:{value:e.form.contactAddress,callback:function(t){e.$set(e.form,"contactAddress","string"===typeof t?t.trim():t)},expression:"form.contactAddress"}})],1)],1),e._v(" "),r("el-alert",{staticStyle:{margin:"10px 0"},attrs:{title:"角色权限",closable:!1,type:"info"}}),e._v(" "),r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"所属分部",prop:"organIdLists","label-width":e.formLabelWidth}},[r("select-all",{attrs:{filterable:"",clearable:"",placeholder:"请选择所属分部","collapse-tags":"",multiple:""},model:{value:e.form.organIdLists,callback:function(t){e.$set(e.form,"organIdLists","string"===typeof t?t.trim():t)},expression:"form.organIdLists"}},e._l(e.organList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),e._v(" "),e.permission("setNormalRole")?r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"员工角色",prop:"roleIds","label-width":e.formLabelWidth}},[r("select-all",{attrs:{placeholder:"请选择员工角色",clearable:"",filterable:"","collapse-tags":"",multiple:""},model:{value:e.form.roleIds,callback:function(t){e.$set(e.form,"roleIds","string"===typeof t?t.trim():t)},expression:"form.roleIds"}},e._l(e.roleList,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1):e._e(),e._v(" "),r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{staticClass:"hiddenStart",attrs:{prop:"positionIds","label-width":e.formLabelWidth}},[r("template",{slot:"label"},[r("p",{staticStyle:{position:"relative"}},[r("span",{staticStyle:{color:"#f56c6c","margin-right":"4px"}},[e._v("*")]),e._v("\n 员工职位\n "),r("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[r("div",{attrs:{slot:"content"},slot:"content"},[r("p",[e._v("分部经理:分部事务审批,为乐团主管分配日程安排")]),e._v(" "),r("p",[e._v("乐团主管:具体乐团、VIP、网管课课程组负责人,管理日常教务")]),e._v(" "),r("p",[e._v("维修技师:管理端APP乐器维修人员")]),e._v(" "),r("p",[e._v("衔接老师:合作单位老师,可在管理端APP查看所关联乐团课程、练习")]),e._v(" "),r("p",[e._v("HRBP:人力资源表可选择HR归属")])]),e._v(" "),r("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c",position:"relative",top:"2px"}})])],1)]),e._v(" "),r("select-all",{attrs:{placeholder:"请选择员工职位",clearable:"",filterable:"","collapse-tags":"",multiple:""},model:{value:e.form.positionIds,callback:function(t){e.$set(e.form,"positionIds","string"===typeof t?t.trim():t)},expression:"form.positionIds"}},e._l(e.positionList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.roleName,value:e.id}})})),1)],2)],1)],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.roleStatus=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onRoleSubmit("ruleForm")}}},[e._v("确 定")])],1)],1),e._v(" "),r("el-dialog",{attrs:{title:"工作交接",visible:e.handoverVisible,width:"500px"},on:{"update:visible":function(t){e.handoverVisible=t}}},[e.handoverVisible?r("handover",{attrs:{detail:e.detail},on:{close:function(t){e.handoverVisible=!1},submited:e.getList}}):e._e()],1),e._v(" "),e.educationViseble?r("el-dialog",{attrs:{title:"教务交接",width:"400px","close-on-click-modal":"",visible:e.educationViseble},on:{"update:visible":function(t){e.educationViseble=t}}},[r("el-form",{ref:"educationForm",attrs:{model:e.educationForm,inline:!0}},[r("el-form-item",{attrs:{label:"乐团主管",rules:[{required:!0,message:"请选择乐团主管",trigger:"blur"}]}},[r("el-select",{attrs:{clearable:"",filterable:""},model:{value:e.educationForm.targetUserId,callback:function(t){e.$set(e.educationForm,"targetUserId","string"===typeof t?t.trim():t)},expression:"educationForm.targetUserId"}},e._l(e.selects.roles.EDUCATION,(function(e){return r("el-option",{key:e.userId,attrs:{label:e.userName,value:e.userId}})})),1)],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.educationViseble=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submitEducation}},[e._v("确 定")])],1)],1):e._e(),e._v(" "),r("qr-code",{attrs:{title:"管理端APP下载链接",codeUrl:e.codeUrl},model:{value:e.qrCodeStatus,callback:function(t){e.qrCodeStatus=t},expression:"qrCodeStatus"}})],1)},_=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[r("div",{staticClass:"squrt"}),e._v("\n 员工管理\n ")])}],n=r("488e"),o=n["a"],s=(r("861a"),r("2877")),l=Object(s["a"])(o,a,_,!1,null,"67de4184",null);t["default"]=l.exports},a2b6:function(e,t,r){"use strict";r.d(t,"a",(function(){return _})),r.d(t,"b",(function(){return n}));var a=r("b85c"),_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",r=arguments.length>2?arguments[2]:void 0,_={};if(e){var n,o=Object(a["a"])(e);try{for(o.s();!(n=o.n()).done;){var s=n.value;_[s[t]]=r?s[r]:s}}catch(l){o.e(l)}finally{o.f()}}return _},n=function(){return location.hostname.indexOf("dev")>-1?"https://dev.gym.lexiaoya.cn/mdaya":location.hostname.indexOf("test")>-1?"https://test.gym.lexiaoya.cn/mdaya":location.hostname.indexOf("localhost")>-1?"https://localhost:9001":"https://gym.lexiaoya.cn/mdaya"}},be41:function(e,t,r){"use strict";r("5df3"),r("1c4c");var a=r("53ca"),_=(r("456d"),r("ac6a"),function e(t){if(null===t)return null;var r=Object.assign({},t);return Object.keys(r).forEach((function(_){return r[_]="object"===Object(a["a"])(t[_])?e(t[_]):t[_]})),Array.isArray(t)?(r.length=t.length,Array.from(r)):r});t["a"]=_},d88c:function(e,t,r){}}]);