
<template>
  <div>
    <basicLayout 
      ref="basicLayout" 
      :oldFormPath="{
        add:'HManagement/accountManage/modules'
      }"
      tableName="reportcenterTable" 
      idName="userid" 
      :apiId="{query:20221213094401,del:20221031141202}"
      :options="options"
      :hideSearch="true"
      @listCreate="listCreate"
      @listData="listData">
      <div slot="custom"></div>
      <template v-slot:tbList="scope">
        <div>
          {{scope.data.column.data[[scope.data.column.columnname]]}}
        </div>
      </template>
      <template v-slot:tbOpreation="scope">
        <el-button v-if="tool.checkAuth($route.name,'read')" type="text" size="mini" @click="goDetail(scope.data.data)">数 据</el-button>
      </template>
    </basicLayout>
  </div>
</template>

<script>
export default {
  data () {
    return {
      options:[]
      
    }
  },
  methods:{
    listCreate (params) {
      params.content.systemappid = JSON.parse(sessionStorage.getItem('activeApp')).systemappid
      console.log(params);
      
    },
    listData (data) {
      console.log(data);
      
    },
    async goDetail (data) {
      
      let res = await this.$api.requested({
        "id":20221213094501,
        "content": {
          sys_reportid:data.sys_reportid,
          dataid:0
        }
      })
      console.log(res);
      this.tool.showMessage(res,() => {
        console.log(this.tool.getBaseUrl(),res.data);
        
        window.open(this.tool.getBaseUrl() + res.data)  
      })
      
    }
  },
  // created () {
  //   setTimeout(() => {
      
  //   },2000)
  // }
}

</script>
<style scoped>
</style>