<!--
  @description: 项目经理查看异议tab页
  @Modifier: haofengxian
  @routerPath:
  @date: 2020-5-9-15:52
-->
<template>
  <div>
    <div class="title p0-16 clearfix">
      <div class="title-back pointer" @click="back">
        <i class="iconfont icon-fanhui mr10" />异议列表
      </div>
    </div>
    <tabs v-if="showTbsStatus === '01'" ref="tabs" :list="list" class="p0-16" />
    <router-view />
  </div>
</template>

<script>
// 组件
import tabs from '@comp/common/tabs'// 非主流程tabs
export default {
  name: 'ObjectionTabs',
  components: {
    tabs
  },
  data() {
    return {
      showTbsStatus: this.$route.params.showTbsStatus, // 页面显示tab 01显示回复函/审批信息
      tabName: this.$route.meta.name, // tab显示name
      // 传给组件
      list: [{
        name: '异议回复函',
        path: '/objection/objectionTabs/sendReply'
      }]
    }
  },
  created() {
    this.handleTab()
  },
  methods: {
    // 处理tab显示name
    handleTab() {
      if (this.showTbsStatus === '01') {
        this.list[0].name = this.tabName
        this.list[0].path = this.$route.path
      }
    },
    // 返回
    back() {
      this.$router.push({
        path: '/objection/objectionList'
      })
    }
  }
}
</script>
