<!--
  @description:项目信息详情
  @Modifier: haofengxian
  @routerPath: /informationbase/projectInfoBaseDetail
  @date: 2020-6-1-16:06
-->
<template>
  <div class="mb16">
    <div class="title p0-16 clearfix">
      <div class="title-back pointer" @click="back">
        <i class="iconfont icon-fanhui mr10" />查看项目信息
      </div>
    </div>
    <div class="p0-16">
      <!--项目基本信息-->
      <dl class="projectInfoDetail">
        <dt>
          <p class="projectInfoDetail_icon">
            <i class="iconfont icon-xiangmujibenxinxi" />
          </p>
          项目基本信息
        </dt>
        <dd>
          <previewProjectInfoDetail />
        </dd>
      </dl>

      <!--相关机构信息-->
      <dl class="projectInfoDetail">
        <dt>
          <p class="projectInfoDetail_icon">
            <i class="iconfont icon-xiangguanjigouxinxi" />
          </p>
          相关机构信息
        </dt>
        <dd>
          <projectDepartInfoDetail />
        </dd>
      </dl>

      <dl class="projectInfoDetail">
        <dt>
          <p class="projectInfoDetail_icon">
            <i class="iconfont icon-xiangguanjigouxinxi" />
          </p>
          流程控制
        </dt>
        <dd>
          <processControlDetail />
        </dd>
      </dl>
      <!--标的清单-->
      <dl class="projectInfoDetail">
        <dt>
          <p class="projectInfoDetail_icon">
            <i class="iconfont icon-biaodeqingdan" />
          </p>
          标的清单
        </dt>
        <dd>
          <bidProjectMateriel />
        </dd>
      </dl>

      <!--标段（包）信息-->
      <dl class="projectInfoDetail">
        <dt>
          <p class="projectInfoDetail_icon">
            <i class="iconfont icon-biaoduanbaoxinxi" />
          </p>
          标段（包）信息
        </dt>
        <dd>
          <!--不分包-->
          <packageDetail v-if="isPack==='00'" :is-procurement-plan="isProcurementPlan" />
          <!--分包-->
          <noPackageDetail v-if="isPack==='01'" :is-procurement-plan="isProcurementPlan" />
        </dd>
      </dl>
      <!--附件信息-->
      <dl class="projectInfoDetail">
        <dt>
          <p class="projectInfoDetail_icon">
            <i class="iconfont icon-fujianxinxi" />
          </p>
          附件信息
        </dt>
        <dd>
          <bidProjectOtherDetail />
        </dd>
      </dl>
    </div>
  </div>
</template>

<script>
/* 接口*/
import { queryTenderProjectIsPack } from '@/api/bidding/biddingProject'
/* 组件*/
import previewProjectInfoDetail from '@views/bidding/bidProject/bidProjectBase/bidProjectBase-detail' // 招标项目信息
import packageDetail from '@views/bidding/bidProject/bidProjectPackage/package-detail' // 标段（包）信息 分包
import noPackageDetail from '@views/bidding/bidProject/bidProjectPackage/noPackage-detail' // 标段（包）信息 不分包
import projectDepartInfoDetail from '@views/bidding/bidProject/bidProjectDepart/bidProjectDepart-detail' // 相关机构信息
import bidProjectOtherDetail from '@views/bidding/bidProject/bidProjectOther/bidProjectOther-detail'// 附件信息
import bidProjectMateriel from '@views/bidding/bidProject/bidProjectMateriel/bidProjectMateriel-detail' // 标的清单
import processControlDetail from './processControl-detail' // 流程控制详情

// 标段（包）信息 不分包
export default {
  name: 'ProjectInfoBaseDetail',
  components: {
    previewProjectInfoDetail, // 项目信息
    projectDepartInfoDetail, // 相关机构信息
    bidProjectOtherDetail, // 附件信息
    bidProjectMateriel, // 标的清单
    packageDetail, // 标段（包）信息 分包
    noPackageDetail, // 标段（包）信息 不分包
    processControlDetail // 流程控制详情
  },
  data() {
    return {
      tenderId: this.$route.query.id, // 项目id
      isProcurementPlan: '', // 是否有采购计划 00 否 01是
      isPack: '', // 是否分包状态 00 不分包 01 分包
      formData: {} // 项目信息
    }
  },
  mounted() {
    this.getPack()
  },
  methods: {
    // 获取分标段不分标段状态
    getPack() {
      queryTenderProjectIsPack(this.tenderId).then(res => {
        this.isPack = res.data.isPack
        this.isProcurementPlan = sessionStorage.getItem('isProcurementPlan')
      })
    },
    // 返回
    back() {
      this.$router.push({
        path: '/informationbase/projectInfoBaseList'
      })
    },
    // 查看标段信息
    viewPackInfo() {
      this.$router.push({
        path: '/informationbase/packInfoDetail'
      })
    }
  }
}
</script>

<style scoped>

</style>
