(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-07b3e5f4"],{"689c":function(t,e,a){"use strict";a("fb39")},b02d7:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"editDeptDialog"},[a("el-dialog",{attrs:{center:"",width:"636px",title:"修改部门",visible:t.editDeptData.dialogVisible},on:{"update:visible":function(e){return t.$set(t.editDeptData,"dialogVisible",e)}}},[a("el-form",{ref:"ruleForm",attrs:{"label-width":"80px",rules:t.rules,model:t.editDeptData.data}},[t.editDeptData.data.parentName?a("el-form-item",{attrs:{label:"上级部门",prop:"parentName"}},[a("el-select",{ref:"selectTree",staticStyle:{width:"265px"},attrs:{clearable:"",placeholder:"上级部门名称"},model:{value:t.editDeptData.data.parentName,callback:function(e){t.$set(t.editDeptData.data,"parentName",e)},expression:"editDeptData.data.parentName"}},[a("el-option",{attrs:{value:t.treeData.id,label:t.treeData.label,hidden:""}}),a("el-tree",{attrs:{data:t.treeData,props:t.defaultProps,"node-key":t.treeData.id,accordion:"","highlight-current":""},on:{"node-click":t.handleNodeClick}})],1)],1):t._e(),a("el-form-item",{attrs:{label:"部门名称",prop:"deptName"}},[a("el-input",{attrs:{maxLength:30},model:{value:t.editDeptData.data.deptName,callback:function(e){t.$set(t.editDeptData.data,"deptName",e)},expression:"editDeptData.data.deptName"}})],1),a("el-form-item",{attrs:{label:"部门编码",prop:"deptCode"}},[a("el-input",{attrs:{maxLength:30},model:{value:t.editDeptData.data.deptCode,callback:function(e){t.$set(t.editDeptData.data,"deptCode",e)},expression:"editDeptData.data.deptCode"}})],1),a("el-form-item",{attrs:{label:"显示排序",prop:"orderNum"}},[a("el-input",{attrs:{maxLength:10,onkeyup:"this.value=this.value.replace(/\\D/g,'')",onafterpaste:"this.value=this.value.replace(/\\D/g,'')"},model:{value:t.editDeptData.data.orderNum,callback:function(e){t.$set(t.editDeptData.data,"orderNum",e)},expression:"editDeptData.data.orderNum"}})],1),a("el-form-item",{attrs:{label:"联系电话",prop:"phone"}},[a("el-input",{attrs:{maxLength:11},model:{value:t.editDeptData.data.phone,callback:function(e){t.$set(t.editDeptData.data,"phone",e)},expression:"editDeptData.data.phone"}})],1),a("el-form-item",{attrs:{label:"联系邮箱"}},[a("el-input",{attrs:{maxLength:30},model:{value:t.editDeptData.data.email,callback:function(e){t.$set(t.editDeptData.data,"email",e)},expression:"editDeptData.data.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:t.editDeptData.data.status,callback:function(e){t.$set(t.editDeptData.data,"status",e)},expression:"editDeptData.data.status"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("div",{staticClass:"search",on:{click:function(e){return t.updateDept()}}},[t._v("保 存")]),a("div",{staticClass:"reset",on:{click:function(e){t.editDeptData.dialogVisible=!1}}},[t._v("取 消")])])],1)],1)},d=[],r=(a("d9e2"),a("ac1f"),a("00b4"),a("f9ac")),l={name:"",props:{editDeptData:{type:Object,default:{}}},data:function(){var t=function(t,e,a){if(e){var i=/^((0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/,d=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/;d.test(e)||i.test(e)||!e?a():a(new Error("请输入正确的手机号"))}else a()};return{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:t}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},created:function(){this.getDeptTree()},methods:{getDeptTree:function(){var t=this;Object(r["t"])().then((function(e){t.treeData=e.data}))},handleNodeClick:function(t){this.editDeptData.data.parentId=t.id,this.editDeptData.data.parentName=t.label},updateDept:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(e){var a={deptId:t.editDeptData.data.deptId,parentId:t.editDeptData.data.parentId,deptName:t.editDeptData.data.deptName,deptCode:t.editDeptData.data.deptCode,orderNum:t.editDeptData.data.orderNum,phone:t.editDeptData.data.phone,email:t.editDeptData.data.email,status:1==t.editDeptData.data.status?"1":"2"};t.$emit("updateDept",a)}}))}}},s=l,p=(a("689c"),a("2877")),o=Object(p["a"])(s,i,d,!1,null,"f337fe22",null);e["default"]=o.exports},fb39:function(t,e,a){}}]);