<template>
  <div>
    <basicLayout ref="list" formPath="competitor" tableName="competitorTable" idName="sa_competitorid" :apiId="{query:20221018164302,del:''}" :options="options" :autoQuery="false">
      <div slot="custom">
        <el-date-picker
            v-model="date"
            size="mini"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :default-time="['00:00:00', '23:59:59']"
            @change="datechange">
        </el-date-picker>
      </div>
      <template v-slot:tbList="scope">
        <div>
          {{scope.data.column.data[[scope.data.column.columnname]]}}
        </div>
      </template>
      <template v-slot:tbOpreation="scope">
        <el-button size="mini" type="text" @click="$router.push({path:'/competitorDetail',query:{id:scope.data.data.sa_competitorid,data:scope.data.data,rowindex:scope.data.data.rowindex}})">详情</el-button>
      </template>
    </basicLayout>
  </div>
</template>

<script>
export default {
  name: "index",
  data(){
    return {
      options:[],
      date:''

    }
  },
  methods:{
    datechange(){
      this.$refs['list'].param.content.isExport = false
      this.$refs['list'].param.content.where.startdate = this.date[0]
      this.$refs['list'].param.content.where.enddate = this.date[1]
      this.$refs['list'].listData()
    },
  },
  mounted() {
    this.$refs['list'].param.content.isExport = false
    this.$refs['list'].listData()
  }
}
</script>

<style scoped>

</style>