(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-086a0f36"],{"04f9":function(e,t,r){"use strict";var n=r("dd63"),i=r.n(n);i.a},"4f07":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"cl-dept-tree"},[r("p",[e._v(e._s(e.title))]),r("el-input",{attrs:{placeholder:"输入关键字进行过滤",size:"small"},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}}),r("div",{staticClass:"scroller"},[r("el-tree",{ref:"tree",attrs:{data:e.list,props:e.props,"default-checked-keys":e.checked,"filter-node-method":e.filterNode,"highlight-current":"","node-key":"id","show-checkbox":""},on:{"check-change":e.save}})],1)],1)},i=[],c=(r("7ae7"),r("86dd"),r("af82"),r("a677"),r("c354"),r("f4a0"),r("3547"),r("9a14"),r("0bbb")),s=r("8bc2"),a={props:{value:Array,title:String},data:function(){return{list:[],checked:[],keyword:"",props:{label:"name",children:"children"},loading:!1}},watch:{keyword:function(e){this.$refs["tree"].filter(e)},value:function(e){this.refreshTree(e)}},mounted:function(){this.refresh()},methods:{refreshTree:function(e){e||(this.checked=[]);var t=[],r=function e(r){r.forEach((function(r){r.children?e(r.children):t.push(Number(r.id))}))};r(this.list),this.checked=t.filter((function(t){return(e||[]).includes(t)}))},refresh:function(){var e=this;this.$service.system.dept.list().then((function(t){e.list=Object(s["deepTree"])(t),e.refreshTree(e.value)})).catch((function(t){e.$message.error(t)}))},filterNode:function(e,t){return!e||t.name.includes(e)},save:function(){var e=this.$refs["tree"],t=e.getCheckedKeys(),r=e.getHalfCheckedKeys();this.$emit("input",[].concat(Object(c["a"])(t),Object(c["a"])(r)))}}},o=a,l=(r("04f9"),r("623f")),d=Object(l["a"])(o,n,i,!1,null,"ad255ff0",null);t["default"]=d.exports},dd63:function(e,t,r){}}]);