<template>
  <div id="scroll-board-bottom">
    <p style="width: 100%;text-align: center;font-size: 0.25rem;font-weight: bold;height: 0.4rem;line-height: 0.4rem;margin: 0;"> {{listName}}</p>
    <dv-scroll-board :config="config" />
  </div>
</template>

<script>
export default {
  name: 'ScrollBoard',
  props: ['ScrollList','listName'],
  data () {
    return {
      config: {
        header: ['业务订单号', '产品名', '总布产数','合格数','合格率','不良数','不良率','废品数','废品率','最迟货期'],
        data: [
        ],
        index: true,
        columnWidth: [100],
        align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center','center'],
        rowNum: 5,
        headerBGC: '#1981f6',
        headerHeight: 50,
        oddRowBGC: 'rgba(0, 44, 81, 0.8)',
        evenRowBGC: 'rgba(10, 29, 50, 0.8)',
        carousel:'page',
        waitTime:'4000',
      }
    }
  },
  created () {
    this.config.headerHeight = this.$fontSize(0.50);
    this.config.columnWidth = [this.$fontSize(1),this.$fontSize(2.5),this.$fontSize(5),this.$fontSize(2),this.$fontSize(1.5),this.$fontSize(1.5),this.$fontSize(1.5),this.$fontSize(1.5),this.$fontSize(1.5),this.$fontSize(1.5),this.$fontSize(2)];
    this.config.data = JSON.parse(JSON.stringify(this.ScrollList))
  }
}
</script>

<style lang="less">
#scroll-board-bottom {
  width:100%;
  box-sizing: border-box;
  padding:0.2rem;
  height: calc(35% - 0.3rem);
  overflow: hidden;
}

</style>
<style>
#scroll-board-bottom .dv-scroll-board{
  height: calc(100% - 0.3rem);
}
.dv-scroll-board .header{
  font-size: 0.2rem !important;
  font-weight: bold !important;
}
.dv-scroll-board .rows .row-item{
  font-size: 0.2rem !important;
}
</style>
