<template>
  <div>
    <list ref="list">
      <el-button slot="add" icon="el-icon-plus" type="primary" size="small" @click="$router.push({path:'/submit_add'})">新 增</el-button>
      <template v-if="tool.checkAuth($route.name,'update')" v-slot:edit="scope">
        <el-button class="inline-16" slot="add" type="text" size="mini" @click="$router.replace({path:'/submit_edit',query:{id:scope.data.data.sat_submiteditmodelid}})">编 辑</el-button>
      </template>
      <template v-if="tool.checkAuth($route.name,'update')" v-slot:release="scope">
        <release :data="scope.data.data" @onSuccess="onSuccess"></release>
      </template>
      <template v-if="tool.checkAuth($route.name,'delete')" v-slot:del="scope">
        <on-del class="inline-16" :data="scope.data.data" @onSuccess="onSuccess"></on-del>
      </template>
    </list>
  </div>
</template>

<script>
import list from './modules/list.vue'
import onDel from './modules/delete.vue'
import release from './modules/release.vue'

export default {
  components:{
    list,
    onDel,
    release
  },
  methods:{
    onSuccess () {
      this.$refs.list.listData()
    }
  }
}

</script>
<style>
</style>