<template>
  <div>
    <div id="reportContent">
      <table style="margin: 0px auto" v-html="model"> </table>
    </div>
  </div>
</template>

<script>
import { post } from '@vue2-client/services/api/restTools'

export default {
  name: 'ReportView',
  data () {
    return {
      model: ''
    }
  },
  props: ['data'],
  methods: {
    // 查询report
    searchReport (source) {
      return post('/rs/report/saleMonthReport', {
        // data: this.data.data
        data: this.data.data
      }).then(res => {
        this.model = res
      }).catch(err => {
        console.error(err)
      })
    }
  }
}
</script>
<style lang="less" scoped>
#reportContent {
  margin-top: 5px;
}
</style>
<style>
#reportContent .report-primary{
  background-color: #dfedfb;
  border: 1px solid #d8d7d7;
  border-collapse: collapse;
}
#reportContent .report-success{
  border: 1px solid #d8d7d7;
  border-collapse: collapse;
}
</style>
