(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f104a6e4"],{6064:function(e,t,a){"use strict";a("8283")},8283:function(e,t,a){},9771:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"editDeptDialog"},[a("el-dialog",{attrs:{center:"",width:"636px",title:"新增部门",visible:e.addDeptData.dialogVisible},on:{close:function(t){return e.cancel()},"update:visible":function(t){return e.$set(e.addDeptData,"dialogVisible",t)}}},[a("el-form",{ref:"ruleForm",attrs:{"label-width":"80px",rules:e.rules,model:e.addDeptForm}},[a("el-form-item",{attrs:{label:"上级部门",prop:"parentName"}},[a("el-input",{attrs:{maxLength:30,disabled:!0,placeholder:"请输入部门名称"},model:{value:e.addDeptData.data.deptName,callback:function(t){e.$set(e.addDeptData.data,"deptName",t)},expression:"addDeptData.data.deptName"}})],1),a("el-form-item",{attrs:{label:"部门名称",prop:"deptName"}},[a("el-input",{attrs:{maxLength:30,placeholder:"请输入部门名称"},model:{value:e.addDeptForm.deptName,callback:function(t){e.$set(e.addDeptForm,"deptName",t)},expression:"addDeptForm.deptName"}})],1),a("el-form-item",{attrs:{label:"部门编码",prop:"deptCode"}},[a("el-input",{attrs:{maxLength:30,placeholder:"请输入部门编码"},model:{value:e.addDeptForm.deptCode,callback:function(t){e.$set(e.addDeptForm,"deptCode",t)},expression:"addDeptForm.deptCode"}})],1),a("el-form-item",{attrs:{label:"显示排序",prop:"orderNum"}},[a("el-input",{attrs:{maxLength:10,placeholder:"请输入部门排序",onkeyup:"this.value=this.value.replace(/\\D/g,'')",onafterpaste:"this.value=this.value.replace(/\\D/g,'')"},model:{value:e.addDeptForm.orderNum,callback:function(t){e.$set(e.addDeptForm,"orderNum",t)},expression:"addDeptForm.orderNum"}})],1),a("el-form-item",{attrs:{label:"联系电话",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入联系电话",maxLength:11},model:{value:e.addDeptForm.phone,callback:function(t){e.$set(e.addDeptForm,"phone",t)},expression:"addDeptForm.phone"}})],1),a("el-form-item",{attrs:{label:"联系邮箱"}},[a("el-input",{attrs:{maxLength:30,placeholder:"请输入联系邮箱"},model:{value:e.addDeptForm.email,callback:function(t){e.$set(e.addDeptForm,"email",t)},expression:"addDeptForm.email"}})],1),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-switch",{staticClass:"switchStyle",attrs:{"active-text":"启用","inactive-text":"停用","active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.addDeptForm.status,callback:function(t){e.$set(e.addDeptForm,"status",t)},expression:"addDeptForm.status"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("div",{staticClass:"search",on:{click:function(t){return e.addDept()}}},[e._v("保 存")]),a("div",{staticClass:"reset",on:{click:function(t){return e.cancel()}}},[e._v("取 消")])])],1)],1)},d=[],o=(a("d9e2"),a("e9c4"),a("b64b"),a("ac1f"),a("00b4"),a("f9ac")),l={name:"addDeptDialog",props:{addDeptData:{type:Object,default:{}}},data:function(){var e=function(e,t,a){if(t){var r=/^((0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/,d=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/;d.test(t)||r.test(t)||!t?a():a(new Error("请输入正确的手机号"))}else a()};return{addDeptForm:{parentName:"",parentId:"",deptName:"",deptCode:"",orderNum:"",phone:"",email:"",status:!0},treeData:[],rules:{parentName:[{required:!0,message:"请选择上级部门",trigger:"blur"}],deptName:[{required:!0,message:"请输入部门名称",trigger:"blur"}],deptCode:[{required:!0,message:"请输入部门编码",trigger:"blur"}],orderNum:[{required:!0,message:"请输入部门排序",trigger:"blur"}],phone:[{validator:e}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},created:function(){this.addDeptForm.parentId=this.addDeptData.data.deptId,this.addDeptForm.parentName=this.addDeptData.data.deptName},methods:{getDeptTree:function(){var e=this;Object(o["t"])().then((function(t){e.treeData=t.data}))},handleNodeClick:function(e){var t=JSON.parse(JSON.stringify(e));this.addDeptForm.parentId=t.id,this.addDeptForm.parentName=t.label},cancel:function(){this.addDeptData.dialogVisible=!1,this.addDeptForm={parentName:"",parentId:"",deptName:"",orderNum:"",phone:"",email:"",status:!0}},addDept:function(){var e=this;this.$refs.ruleForm.validate((function(t){t&&e.$emit("addDeptBtn",e.addDeptForm)}))}}},s=l,i=(a("6064"),a("2877")),p=Object(i["a"])(s,r,d,!1,null,"07ad784b",null);t["default"]=p.exports}}]);