<template>
  <basic-container>
    <el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange">
      <el-tab-pane label="热表" name="hotList"></el-tab-pane>
      <el-tab-pane label="烧结" name="sintering"></el-tab-pane>
      <el-tab-pane label="外协" name="outsource"></el-tab-pane>
    </el-tabs>
    <el-tabs v-model="newTabs">
        <el-tab-pane v-for="item in tabsList" :key="item" :label="item.label" :name="item.value"></el-tab-pane>
    </el-tabs>
    <avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
      @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>

<script>
import productionQualityAnalysis from './productionQualityAnalysis';
export default {
    data(){
        return{
            tabPosition:'hotList',
            newTabs:'',
            tabsList:[],
            option:{
                columnSort: true,
                tip: false,
                height: 'auto',
                align: 'center',
                calcHeight: 32,
                simplePage: false,
                searchShow: true,
                searchMenuSpan: 6,
                searchIcon: true,
                searchIndex: 3,
                tree: false,
                border: true,
                index: true,
                selection: true,
                viewBtn: false,
                delBtn: false,
                editBtn: false,
                delBtnIcon: ' ',
                addBtn: false,
                labelWidth: 120,
                searchLabelWidth: 120,
                menu: false,
                menuWidth: 200,
                dialogWidth: 600,
                dialogClickModal: false,
                searchEnter: true,
                excelBtn: true,
                gridBtn: false,
                searchShowBtn: false,
                showOverflowTooltip: true,
                column: []
            },
            loading:false,
            data:[],
            form:{},
            page:{
                pageSize: 10,
                currentPage: 1,
                total: 0,
            }
        }
    },
    mounted(){
        this.tabPosition = 'hotList'
        this.tabsList = [
            {label:'订单准时完成率',value:'orderOnTimeRate'},
            {label:'会议急件准时完成率',value:'urgentMeetingOnTimeRate'},
            {label:'平均加工周期',value:'averageProcessingCycle'},
        ]
        this.newTabs = this.tabsList[0].value
        this.option.column = productionQualityAnalysis[this.newTabs]
    },
    methods:{

    }
}
</script>

<style>

</style>