(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a87093c6"],{"47fd":function(e,t,s){"use strict";s("71dd")},"71dd":function(e,t,s){},c63e:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("a-modal",{attrs:{width:e.modalWidth,visible:e.visible,title:"部门搜索",confirmLoading:e.confirmLoading,cancelText:"关闭",wrapClassName:"ant-modal-cust-warp"},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[[s("a-form",{attrs:{form:e.form}},[s("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"上级部门"}},[s("a-tree",{attrs:{multiple:"",treeCheckable:"tree",checkable:"",expandedKeys:e.expandedKeysss,checkedKeys:e.checkedKeys,allowClear:"true",checkStrictly:!0,dropdownStyle:{maxHeight:"200px",overflow:"auto"},treeData:e.departTree,placeholder:"请选择上级部门"},on:{expand:e.onExpand,check:e.onCheck}})],1)],1)]],2)},a=[],r=s("88bc"),n=s.n(r),d=s("0fea"),c=s("4ec3"),o={name:"DepartWindow",components:{},data:function(){return{checkedKeys:[],expandedKeysss:[],userId:"",model:{},userDepartModel:{userId:"",departIdList:[]},departList:[],modalWidth:400,departTree:[],title:"操作",visible:!1,labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},confirmLoading:!1,headers:{},form:this.$form.createForm(this),url:{userId:"/sys/user/generateUserId"}}},methods:{add:function(e,t){this.checkedKeys=e,this.userId=t,this.edit({})},edit:function(e){var t=this;this.departList=[],this.queryDepartTree(),this.form.resetFields(),this.visible=!0,this.model=Object.assign({},e);var s=n()(this.model,"id","userId","departIdList");this.$nextTick((function(){t.form.setFieldsValue(s)}))},close:function(){this.$emit("close"),this.visible=!1,this.departList=[],this.checkedKeys=[]},handleSubmit:function(){var e=this,t=this;this.form.validateFields((function(s){if(!s)if(t.confirmLoading=!0,null==e.userId)Object(d["c"])(e.url.userId).then((function(s){if(s.success){var i={userId:s.result,departIdList:e.departList};t.$emit("ok",i)}})).finally((function(){t.departList=[],t.confirmLoading=!1,t.close()}));else{var i={userId:e.userId,departIdList:e.departList};t.departList=[],t.$emit("ok",i),t.confirmLoading=!1,t.close()}}))},handleCancel:function(){this.close()},onCheck:function(e,t){this.departList=[],this.checkedKeys=e.checked;for(var s=t.checkedNodes,i=0;i<s.length;i++){var a=s[i].data.props,r={key:"",value:"",title:""};r.key=a.value,r.value=a.value,r.title=a.title,this.departList.push(r)}},queryDepartTree:function(){var e=this;Object(c["G"])().then((function(t){if(t.success&&(e.departTree=t.result,e.checkedKeys&&e.checkedKeys.length>0)){var s=[],i=t.result;i&&i.length>0&&(i.forEach((function(e){s.push(e.key)})),e.expandedKeysss=s)}}))},onExpand:function(e){this.expandedKeysss=e},modalFormOk:function(){}}},l=o,h=(s("47fd"),s("2877")),u=Object(h["a"])(l,i,a,!1,null,"56367c89",null);t["default"]=u.exports}}]);