webpackJsonp([9],{AdJp:function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=o("WSbm"),a=o("P9l9"),i={name:"employeeDetail",components:{employeeInfo:t.a},data:function(){return{info:{},managerMode:!1}},methods:{getEmployInfo:function(){var e=this,n={id:e.$route.query.employeeClerkId};Object(a.a)("/haoban-manage-web/emp/findOne",n).then(function(n){console.log(n,"employeeDetail"),e.info=n.data.result,e.info.managerMode=!!n.data.result.managerMode}).catch(function(e){console.log(e,"error")})},saveEmployeeInfo:function(){var e=this.info,n={name:e.name,phoneNumber:e.phoneNumber,positionName:e.positionName,employeeClerkId:e.employeeClerkId,managerMode:1*e.managerMode};console.log(e,n),Object(a.a)("/haoban-manage-web/emp/update",n).then(function(e){console.log(e,"update result")}).catch(function(e){console.log(e,"error")})}},beforeMount:function(){this.getEmployInfo()}},l={render:function(){var e=this,n=e.$createElement,o=e._self._c||n;return o("div",{staticClass:"employee-detail"},[o("employee-info",{attrs:{info:e.info}}),e._v(" "),o("div",{staticClass:"btn-box"},[o("el-button",{attrs:{type:"primary"},on:{click:e.saveEmployeeInfo}},[e._v("保存")]),e._v(" "),o("el-button",{attrs:{type:"primary"}},[e._v("保存并继续添加")]),e._v(" "),o("el-button",[e._v("取消")])],1)],1)},staticRenderFns:[]};var r=o("VU/8")(i,l,!1,function(e){o("VfAF")},null,null);n.default=r.exports},Mc6c:function(e,n){},VfAF:function(e,n){},WSbm:function(e,n,o){"use strict";var t={name:"employeeInfo",props:{info:{type:Object,required:!0}},data:function(){return{employeeInfo:{name:"",phoneNumber:"",departmentName:""}}},methods:{switchManagerMode:function(){console.log(this.info.managerMode)}}},a={render:function(){var e=this,n=e.$createElement,o=e._self._c||n;return o("div",{staticClass:"employee-info"},[o("div",{staticClass:"info-cell"},[o("p",{staticClass:"title"},[e._v("员工信息")]),e._v(" "),o("el-form",{staticClass:"employee-info-form",attrs:{"label-width":"70px"}},[o("el-form-item",{attrs:{label:"姓名",prop:"name"}},[o("el-input",{model:{value:e.info.name,callback:function(n){e.$set(e.info,"name",n)},expression:"info.name"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"手机号",prop:"phoneNumber"}},[o("el-input",{model:{value:e.info.phoneNumber,callback:function(n){e.$set(e.info,"phoneNumber",n)},expression:"info.phoneNumber"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"部门",prop:"departmentName"}},[o("el-input",{model:{value:e.info.departmentName,callback:function(n){e.$set(e.info,"departmentName",n)},expression:"info.departmentName"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"职位",prop:"positionName"}},[o("el-input",{model:{value:e.info.positionName,callback:function(n){e.$set(e.info,"positionName",n)},expression:"info.positionName"}})],1)],1)],1),e._v(" "),o("div",{staticClass:"info-cell"},[o("p",{staticClass:"title"},[e._v("隐私设置")]),e._v(" "),o("p",{staticClass:"tip"},[e._v("开启后所有员工不可见手机号码，不可发起电话、短信管理层之间不受影响")]),e._v(" "),o("div",{staticClass:"set-manager-mode"},[e._v("\n            管理层模式\n            "),o("el-switch",{attrs:{"active-color":"#409EFF","inactive-color":"#DCDFE6"},on:{change:e.switchManagerMode},model:{value:e.info.managerMode,callback:function(n){e.$set(e.info,"managerMode",n)},expression:"info.managerMode"}})],1)])])},staticRenderFns:[]};var i=o("VU/8")(t,a,!1,function(e){o("Mc6c")},null,null);n.a=i.exports}});
//# sourceMappingURL=9.3efbd52a6c939c0c8c95.js.map