<!--
  @description:投标人驱动模板
  @Modifier:haoFx
  @routerPath:bidding/bidderDrive
  @date:2019/11/22-10:48
-->
<template>
  <div class="drive-bid-content clearfix">
    <!--头部-->
    <div class="content-header">
      <!--左侧箭头-->
      <div class="title-back fl pointer">
        <i class="iconfont icon-fanhui" @click="back" />
        <el-tooltip :content="word" placement="top">
          <h1 class="titleH1">
            {{ word }}
          </h1>
        </el-tooltip>
      </div>
      <!--展示标包-->
      <div class="tenders">
        <el-dropdown v-if="isPack==='01'" trigger="click" @command="handleCommand">
          <span class="el-dropdown-link">
            {{ commanded }}
            <i class="el-icon-arrow-down el-icon--right" />
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item
              v-for="(item,index) in packList"
              :key="index"
              :command="item"
            >
              {{ item.packName }}
            </el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
        <!--右边刷新-->
        <div class="title-right fr">
          <span v-if="bidsSate!=''" class="stateButton">{{ bidsSate }}</span>
          <a v-if="beginTime!=''" class="time-word">{{ timeWord }}：</a>
          <a v-if="beginTime!=''" class="time-size">{{ beginTime }}</a>
          <span class="renewButton" @click="is_ReloadCllick"><i class="el-icon-refresh" /></span>
        </div>
      </div>
    </div>
    <!--左侧驱动-->
    <div v-if="isshow==='1'?true:false" class="content-left fl">
      <el-scrollbar class="scrollbar processHeight">
        <driveStep :list="processList" />
      </el-scrollbar>
      <div class="clarify_abnormal">
        <!--评标澄清-->
        <el-button
          icon="iconfont icon-yichangliucheng"
          class="btn"
          @click="evaluationClarify"
        >
          评标澄清
        </el-button>
        <!--澄清质疑-->
        <el-button
          icon="iconfont icon-chengqingchuli"
          class="btn"
          @click="clarifyQuestion"
        >
          文件澄清
        </el-button>
        <!--招标异议-->
        <el-button
          icon="iconfont icon-yichangliucheng"
          class="btn"
          @click="exceptionHand"
        >
          招标异议
        </el-button>
      </div>
    </div>
    <!--右侧内容-->
    <div class="content-right">
      <div v-if="is_Reload">
        <el-scrollbar class="scrollbar contentScrollbar">
          <router-view />
        </el-scrollbar>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ContentNavSupplier',
  components: {
  },
  data() {
    return {
      is_Reload: true, // 刷新
      isshow: '1',
      word: '', // 标题
      commanded: '', // 标包
      isPack: '', // 是否分包 00 不分包 01 分包
      packList: [], // 标包列表
      bidsSate: '投标中', // 投标状态
      timeWord: '开标时间', // 开标时间
      beginTime: '2018-01-02',
      // 获取左侧节点
      seachForm: {
        id: '',
        mainId: '',
        packid: '',
        tenderId: ''
      },
      processList: []
    }
  },
  created() {
    this.$store.dispatch('setSidebarIsCollapse', true)
    const setTenderPackInfo = JSON.parse(sessionStorage.getItem('setTenderPackInfo'))
    this.seachForm.packid = setTenderPackInfo.packId
  },
  mounted() {
    const id = this.$route.query.id
    this.seachForm.tenderId = id
  },
  methods: {
    // 刷新
    is_ReloadCllick() {
      this.is_Reload = false
      setTimeout(() => {
        this.is_Reload = true
      })
    },
    back() {
      // // 已完成的
      this.$router.push('/biddingSupplier/participatingProject')
      // if (this.$route.query.type === '00') {
      //   this.$router.push('/biddingSupplier/completedProject')
      // } else {
      //   this.$router.push('/biddingSupplier/participatingProject')
      // }
      this.$store.dispatch('setSidebarIsCollapse', false)
    },
    handleCommand(command) {
      this.commanded = command.packName
    },
    // 评标澄清
    evaluationClarify() {
      this.$router.push({
        path: '/biddingSupplier/contentNavSupplier/evaluationClarify/list',
        query: {
          id: this.$route.query.id
        }
      })
    },
    // 澄清质疑
    clarifyQuestion() {
      this.$router.push({
        path: '/biddingSupplier/contentNavSupplier/clarifyQuestion/clarify/list',
        query: {
          id: this.$route.query.id
        }
      })
    },
    // 异常处理
    exceptionHand() {
      this.$router.push({
        path: '/biddingSupplier/contentNavSupplier/objection/list',
        query: {
          id: this.$route.query.id
        }
      })
    }
  }
}
</script>

<style lang="less" scoped>

</style>
