<template>
  <div class="brand normal-panel">
    <!-- <dep-list @onClick="onClick" ref="list">
      <template v-slot:add="scope">
        <Edit type="add" @addSuccess="addSuccess" :rowData="scope.data" v-if="tool.checkAuth($route.name,'insert')"/>
      </template>
      <template v-slot:edit="scope">
        <Edit type="edit" @addSuccess="addSuccess" v-if="scope.data.itemclassid && tool.checkAuth($route.name,'update')" :rowData="scope.data"/>
      </template>
      <template v-slot:del="scope">
        <Del :id="scope.data.itemclassid" @deleteSuccess="deleteSuccess" v-if="scope.data.itemclassid && tool.checkAuth($route.name,'delete')"/>
      </template>
    </dep-list> -->
    <dep-list></dep-list>
  </div>
</template>

<script>
import DepList from './components/treeTable'
import Edit from './components/edit'
import Del from './components/delete'
export default {
  name: '',
  data() {
    return {
      tablecols1:'',
      list:''
    };
  },
  components: {DepList,Edit,Del},
  computed:{
  },
  watch:{
  },
  created() {
    this.tablecols1 = this.tool.tabelCol(this.$route.name).salesTable.tablecols
  },
  methods: {
    onClick(node) {
      console.log(node);
      this.list = [node.data]
      // this.list = node
    },
    addSuccess() {
      this.$refs.list.department()
    },
    deleteSuccess() {
      this.$refs.list.department()
    }
  },
};
</script>

<style scoped>

</style>
