<template>
  <div>
    <distribution v-if="tool.checkAuth($route.name,'distribution')" @onSuccess="onSuccess"></distribution>
    <list ref="list">
      <template v-slot:detail="scope">
        <el-button class="inline-16" size="small" type="text" @click="$router.push({path:'/clueDetail',query:{id:scope.data.data.sat_orderclueid}})">详 情</el-button>
      </template>
      <template v-slot:edit="scope">
        <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data.data" type="text" @onSuccess="onSuccess"></edit>
      </template>
      <template v-slot:recall="scope">
        <recall v-if="tool.checkAuth($route.name,'recall')" :data="scope.data.data" @onSuccess="onSuccess"></recall>
      </template>
      <template v-slot:del="scope">
        <on-del v-if="tool.checkAuth($route.name,'delete')" :data="scope.data.data" @onSuccess="onSuccess"></on-del>
      </template>
    </list>
  </div>
</template>

<script>
import distribution from './modules/distribution.vue'
import list from './modules/list.vue'
import recall from './modules/recall.vue'
import onDel from './modules/del.vue'

import edit from './modules/edit.vue'

export default {
  components:{
    distribution,
    list,
    edit,
    recall,
    onDel
  },
  methods:{
    onSuccess () {
      this.$refs['list'].listData()
    }
  }
}

</script>
<style>
</style>