<template>
  <div>
    <basicLayout ref="list" formPath="accountclass" tableName="accountclassTable" idName="sa_accountclassid" :apiId="{query:20221008134803,del:20221008134903}" :options="options"
      @listData="list"
    >
      <div slot="custom"></div>
      <template v-slot:tbList="scope">
        <div v-if="scope.data.column.columnname === 'isorder'">
          <span v-if="scope.data.column.data[scope.data.column.columnname] === 1">是</span>
          <span v-else>否</span>
        </div>
        <div v-else-if="scope.data.column.columnname === 'accountname'">
          <span style="margin-right:10px">{{scope.data.column.data.accountname}}</span>
          <el-tag v-if="scope.data.column.data.isrebate" size="mini">返利金账户</el-tag>
        </div>
        <div v-else-if="scope.data.column.columnname === 'isused'">
          <span v-if="scope.data.column.data[scope.data.column.columnname] === 1">是</span>
          <span v-else>否</span>
        </div>
        <div v-else>
          {{scope.data.column.data[[scope.data.column.columnname]]}}
        </div>
      </template>
      <template v-slot:tbOpreation="scope">
        <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data.data" @onSuccess="onSuccess"></edit>
      </template>
    </basicLayout>
  </div>
</template>

<script>
import edit from '@/Form/accountclass/edit.vue'
export default {
  name: "index",
  data() {
    return {
      options:[]
    }
  },
  components:{
    edit
  },
  methods:{
    onSuccess () {
      this.$refs['list'].listData()
    },
    list (data) {
      console.log(data);
      
    }
  }
}
</script>

<style scoped>

</style>