<template>
  <div>
    <!-- <add v-if="tool.checkAuth($route.name,'agent_update') && !detail" class="normal-margin" @onSuccess="onSuccess"></add> -->
    <tableLayout :layout="tablecols" :data="list" :custom="true" height="calc(100vh - 405px)">
      <template v-slot:customcol="scope">
        <p>{{scope.column.data[scope.column.columnname]}}</p>
      </template>
    </tableLayout>
  </div>
</template>

<script>

export default {
  props:['mainData'],
  data () {
    return {
      list:[],
      param:{}
    }
  },
  components:{
  },
  methods:{
    async query_areascope () {
      const res = await this.$api.requested({
        "id": "20221009160003",
        "version":1,
        "content": {
          "sys_enterpriseid":this.param.sys_enterpriseid
        }
      })
      this.list = res.data
    },
  },
  mounted () {
   
  },
  watch:{
    mainData (val) {
      this.param = val
      this.query_areascope()
    }
  },
  created () {
    // 获取角色表结构
    this.tablecols = this.tool.tabelCol(this.$route.name)['accountMoneyTable'].tablecols
  }
}

</script>
<style>
</style>