<template>
    <div>
        <el-tabs type="border-card" @tab-click="handleClick" v-model="componentName">
            <!--:orderType="orderType"-->
            <el-tab-pane   :label="$t('traceMgr.formalOrder')" name="FormalOrderList">
            </el-tab-pane> <!-- :orderType="orderType"-->
            <el-tab-pane name="PreDistributionOrderList" :label="$t('traceMgr.preDistributionOrder')">
            </el-tab-pane>
          <keep-alive>
            <component :is="componentName" :menuId="menuId"></component>
          </keep-alive>
        </el-tabs>
    </div>
</template>

<script>
import FormalOrderList from '@/components/tracemgr/coordinate/workbench/formalOrderList'
import PreDistributionOrderList from '@/components/tracemgr/coordinate/workbench/preDistributionOrderList'
import BasePage from '@/pages/basePage'
import mixin from '@/pages/mixin'
export default {
  extends: new BasePage(),
  mixins: [mixin],
  name: 'coordinateWorkbenchPage',
  components: {
    FormalOrderList,
    PreDistributionOrderList
  },
  data () {
    return {
      componentName: 'FormalOrderList',
      orderType: '' // 订单类型(1:正式分配订单 / 2:预分配订单)
    }
  },
  methods: {
    handleClick (tab, event) {
      // if (tab.name === 'fisrt') {
      //   this.orderType = '1'
      // }
      if (tab.name === 'second') {
        this.$refs.distribution.queryData()
      }
    }
  }
}
</script>
