<template>
  <div class="report_setting p20">
    <Tabs type="line" v-model="tab" @on-click="changeTab($event)">
      <TabPane :label="$t('900809')">
        <Row type="flex" :gutter="5" justify="space-between" class="code-row-bg">
          <Col span="13">
          <FlowConfig :reportConfig="reportConfig"></FlowConfig>
          </Col>
          <Col span="11">
          <ReportPermission :reportConfig="reportConfig"></ReportPermission>
          </Col>
        </Row>

      </TabPane>
      <TabPane :label="$t('900808')">
        <Row type="flex" :gutter="5" justify="space-between" class="code-row-bg">
          <Col span="13">
          <FlowConfig :reportConfig="reportConfig"></FlowConfig>
          </Col>
          <Col span="11">
          <ReportPermission :reportConfig="reportConfig"></ReportPermission>
          </Col>
        </Row>
      </TabPane>
      <TabPane :label="$t('900807')">
        <Row type="flex" :gutter="5" justify="space-between" class="code-row-bg">
          <Col span="13">
          <FlowConfig :reportConfig="reportConfig"></FlowConfig>
          </Col>
          <Col span="11">
          <ReportPermission :reportConfig="reportConfig"></ReportPermission>
          </Col>
        </Row>
      </TabPane>
      <TabPane :label="$t('900806')">
        <Row type="flex" :gutter="5" justify="space-between" class="code-row-bg">
          <Col span="13">
          <FlowConfig :reportConfig="reportConfig"></FlowConfig>
          </Col>
          <Col span="11">
          <ReportPermission :reportConfig="reportConfig"></ReportPermission>
          </Col>
        </Row>
      </TabPane>
    </Tabs>
  </div>
</template>
<script>
import axios from '@/libs/api.request'
import FlowConfig from '_c/report/report-config.vue'
import ReportPermission from '_c/report/report-permission.vue'
export default {
    name: 'tpm-report-setting',
    components: {
        FlowConfig,
        ReportPermission
    },
    data () {
        return {
            tab: 0, // 0-普通设备,1-重点设备,2-瓶颈设备,3-非生产设备
            reportConfig: {
                machineLevel: 1, // 1-普通设备,2-重点设备,3-瓶颈设备,4-非生产设备
                title: this.$t('200016') // 暂时没用，后续可能会用上
            }
        }
    },
    methods: {
        changeTab () {
            this.reportConfig.machineLevel = this.tab + 1
        }
    }
}
</script>
<style lang="less" scoped>
  .report_setting {
    border-radius: 5px;
    border: 1px solid #ddd;
  }
</style>
