<template>
  <div>
    <basicLayout
        ref="list"
        :oldFormPath="{add:'HManagement/submit/list/modules'}"
        tableName="tableSubmitlist"
        idName="sat_submiteditmodelid"
        :apiId="{query:20221102093602,del:20221102094102}"
    >
      <template v-slot:tbList="scope">
        <div v-if="scope.data.column.columnname === 'status'">
            <span :style="scope.data.column.data.status === '发布' ? 'color:#52C41A' : ''">{{ scope.data.column.data.status
              }}</span>
        </div>
        <div v-else-if="scope.data.column.columnname === 'onceonly'">
          <span>{{ scope.data.column.data.onceonly === 1 ? '一事一报' : '一事多报' }}</span>
        </div>
        <div v-else>
          {{scope.data.column.data[[scope.data.column.columnname]]}}
        </div>
      </template>
      <template v-slot:tbOpreation="scope">
        <edit :id="scope.data.data.sat_submiteditmodelid" @updateSuccess="onSuccess"></edit>
        <el-button class="inline-16"  type="text" size="small" @click="$router.push({path:'/submit_statistics',query:{id:scope.data.data.sat_submiteditmodelid}})">数据分析</el-button>

        <!--        <el-button v-if="tool.checkAuth($route.name,'data_analysis')" type="text" size="small" @click="$router.push({path:'/notice_edit',query:{id:scope.data.data.sat_noticeid}})">详情</el-button>-->
      </template>
    </basicLayout>
<!--    <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,'read')" v-slot:detail="scope">
        <el-button class="inline-16" type="text" size="mini" @click="$router.push({path:'/submit_detail',query:{id:scope.data.data.sat_submiteditmodelid}})">明 细</el-button>
      </template>
      <template v-if="tool.checkAuth($route.name,'update')" v-slot:edit="scope">
        <el-button class="inline-16" style="margin-left:0 !important;" type="text" size="mini" @click="$router.push({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,'update')" v-slot:data_statistics="scope">
        <el-button type="text" size="mini" class="inline-16" @click="$router.push({path:'/submit_statistics',query:{id:scope.data.data.sat_submiteditmodelid}})">数据分析</el-button>
      </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 './list/list.vue'
import onDel from './list/modules/delete.vue'
import release from './list/modules/release.vue'
import edit from './list/modules/submit_edit'

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

</script>
<style>
</style>