(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4627ffe3"],{"0e86":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"org"},[a("page-header",[e._v(" 机构配置 ")]),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-tree",{staticClass:"org-tree",attrs:{data:e.groupList,props:e.defaultProps,"node-key":"id","default-expand-all":"","expand-on-click-node":!1,accordion:""},on:{"node-click":e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.node,n=t.data;return a("span",{staticClass:"custom-tree-node"},[a("span",[e._v(e._s(o.label))]),a("span",[a("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-plus"},on:{click:function(t){return e.doGroupAppend(n,t)}}}),"org"!=n.type?a("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-delete"},on:{click:function(t){return e.doGroupRemove(o,n,t)}}}):e._e()],1)])}}])})],1),a("el-col",{attrs:{span:18}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.userData,"row-key":"name",size:"mini",border:""}},[a("el-table-column",{attrs:{type:"index"}}),a("el-table-column",{attrs:{label:"姓名",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-avatar",{staticClass:"user-avatar",attrs:{icon:"el-icon-user-solid"}}),e._v(" "+e._s(t.row.name)+" ")]}}])}),a("el-table-column",{attrs:{label:"性别",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("userSex")(t.row.sex)))])]}}])}),a("el-table-column",{attrs:{prop:"militaryRank",label:"密级",width:"150"}}),a("el-table-column",{attrs:{prop:"phoneNumber",label:"手机号",width:"250"}}),a("el-table-column",{attrs:{prop:"emailAddress",label:"电子邮件",width:"250"}}),a("el-table-column",{attrs:{prop:"militaryRank",label:"角色"}})],1)],1)],1),a("AddGroupDialog",{ref:"addGroupDialog"})],1)},n=[],r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"新建部门",visible:e.visible,width:"30%"},on:{"update:visible":function(t){e.visible=t}}},[a("el-form",{ref:"addForm",attrs:{model:e.newGroupData,rules:e.formRules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"上级部门"}},[a("el-input",{attrs:{readonly:!0},model:{value:e.parentName,callback:function(t){e.parentName=t},expression:"parentName"}})],1),a("el-form-item",{attrs:{label:"部门名称",prop:"name"}},[a("el-input",{model:{value:e.newGroupData.name,callback:function(t){e.$set(e.newGroupData,"name",t)},expression:"newGroupData.name"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary",loading:e.submitLoading},on:{click:e.doAddGroup}},[e._v("确 定")])],1)],1)},s=[],i=(a("b0c0"),{components:{},data:function(){return{visible:!1,submitLoading:!1,parentName:null,newGroupData:{organizationId:1},formRules:{name:[{required:!0,message:"请填写部门名称"}]}}},computed:{},watch:{},methods:{showDialog:function(e){this.visible=!0,this.parentName=e.name,"org"===e.type?this.newGroupData.parentId=null:this.newGroupData.parentId=e.id},doAddGroup:function(){var e=this;this.$refs["addForm"].validate((function(t){t&&(e.submitLoading=!0,e.$store.dispatch("org/createGroup",e.newGroupData).then((function(t){t&&(e.visible=!1,e.submitLoading=!1,e.$refs["addForm"].resetFields())}))["catch"]((function(t){e.$message.error(t.message||"添加操作错误，请稍后重试!"),e.submitLoading=!1})))}))}},created:function(){},mounted:function(){}}),l=i,u=a("2877"),c=Object(u["a"])(l,r,s,!1,null,"3e4ce230",null),d=c.exports,p={components:{AddGroupDialog:d},data:function(){return{loading:!1,defaultProps:{children:"children",label:"name"},addGroupData:null,showUserGroup:{}}},computed:{groupList:function(){return[this.$store.state.org.org]},userData:function(){return this.$store.state.org.userviewer.data}},watch:{},methods:{doGroupAppend:function(e,t){t.stopPropagation(),this.addGroupData=e,this.$refs["addGroupDialog"].showDialog(e)},doGroupRemove:function(e,t,a){var o=this;a.stopPropagation(),this.$store.dispatch("org/deleteGroup",t).then((function(e){o.$message.success("移除部门成功!")}))["catch"]((function(e){console.log(e),o.$message.error(e.messsage||"移除组织失败，请重试!")}))},handleNodeClick:function(e){this.showUserGroup=e,this.$store.dispatch("org/userList",e).then((function(e){}))},handleUserEdit:function(){},handleUserDelete:function(){}},created:function(){},mounted:function(){}},m=p,f=(a("b239"),a("b4cf"),Object(u["a"])(m,o,n,!1,null,"56799991",null));t["default"]=f.exports},"0e8c":function(e,t,a){},9873:function(e,t,a){},b239:function(e,t,a){"use strict";a("0e8c")},b4cf:function(e,t,a){"use strict";a("9873")}}]);
//# sourceMappingURL=chunk-4627ffe3.e7cc42a5.js.map