(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-39648408"],{"04f9":function(e,t,r){"use strict";var n=r("0960"),i=r.n(n);i.a},"0960":function(e,t,r){},"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("fff0"),r("0e8d"),r("fdc1"),r("5475"),r("4303"),r("1528"),r("28a9"),r("b287"),r("fd4b")),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("5511")),d=Object(l["a"])(o,n,i,!1,null,"ad255ff0",null);t["default"]=d.exports}}]);