<template>
  <el-dialog title="配置信息"
  	:visible.sync="authData.visible">
    <el-tabs v-model="activeName">
      <el-tab-pane label="有效期" name="period">
        <periodPane v-if="activeName === 'period'"
        	:authOrgData="authData" @retRefersh="refershTable"/>
      </el-tab-pane>
      <el-tab-pane label="联系方式" name="contact">
        <contactPane v-if="activeName === 'contact'"
        	:authOrgData="authData" @retRefersh="refershTable"/>
      </el-tab-pane>
      <el-tab-pane label="渠道授权" name="channel">
      	<authChannelPane v-if="activeName === 'channel'"
      		:authOrgData="authData" @retRefersh="refershTable"/>
    	</el-tab-pane>
    	<el-tab-pane label="目录授权" name="category">
      	<authCategoryPane v-if="activeName === 'category'"
      		:authOrgData="authData" @retRefersh="refershTable"/>
    	</el-tab-pane>

    </el-tabs>
  </el-dialog>
</template>


<script>
  import waves from '@/directive/waves' // 水波纹指令
 	import periodPane from './periodPane' //租赁时效
 	import contactPane from './contactPane' //联系人
 	import authChannelPane from './authChannelPane' //渠道授权
 	import authCategoryPane from './authCategoryPane' //目录授权




	export default {
	  name: 'authOrgDialog', //组织授权
	  components: {
	  	periodPane,
	  	contactPane,
	  	authChannelPane,
	  	authCategoryPane
	  },
	  directives: {
	    waves
	  },
	  props:["authData"],
	  data() {
	    return {
	      activeName:'period',
	      distributionChannelOption:[], //渠道选项
	      checkedDistributionChannel:[],//选中的渠道
	      distributionChannelOptionList:[],
	      checkedCategorys:[], //选中的分类
	      topCategoryList:[],//顶级目录
	      topCategoryIdsList:[],//顶级分类
	      isCategoryAll:false,
	      categoryCheckAll:false,
	    }
	  },
	  created() {
    	this.initData();
  	},
	  methods: {
	  	initData(){
	  		 //加载销售渠道

	  	},
	  	refershTable(){
	  		this.authData.visible = false;
	  		this.$emit("refreshTable");
	  	}
    }
	}
</script>

<style scoped>

</style>

