<!--
  @description:采购立项-采购人-竞价大厅已开启
  @Modifier:gmy
  @routerPath:/biddingLobby/offerLobbyAgentBidding
  @date:2020/6/16-13:28
-->
<template>
  <el-scrollbar class="open-info-scrollbar">
    <div class="open-info">
      <OfferHeader @closeHall="closeHall" />
      <section class="offer-content">
        <div class="offer-bidding-left">
          <!-- 实时聊天-->
          <!-- <offerScoket /> -->
        </div>
        <div class="offer-bidding-centre">
          <!-- 最低报价趋势 -->
          <div class="offer-echarts">
            <p>最低报价趋势</p>
            <offerApxecharts :hall-type="hallType" :bidding-status="biddingStatus" />
          </div>
          <!-- 最低报价排名 -->
          <offerAgentGoods :project-rules-data="projectRulesData" :bidding-status="biddingStatus" />
        </div>
        <!-- 当前竞价状态 -->
        <div class="offer-bidding-right">
          <OfferRules :project-rules-data="projectRulesData" :hall-type="hallType" :bidding-status="biddingStatus" @closeHall="closeHall" />
        </div>
      </section>
    </div>
  </el-scrollbar>
</template>

<script>
/** 公共方法*/
import { procurementBiddingGroupMixin } from '../mixins/procurementBiddingGrounpMixins'
import { procurementBiddingMixins } from '../mixins/procurementBiddingMixins'
/* 公共组件*/
import offerMy from '../components/proBiddingLobbyMy-add' // 我的报价
import OfferHeader from '../components/proBiddingLobbyHeader' // 公共头部
import offerLowset from '../components/proBiddingLowest-detail' // 最低报价趋势
import OfferRules from '../components/proBiddingLobbyRules-detail' // 当前竞价状态与竞价规则
import offerAgentGoods from '../components/proBiddingAgentGoods-list' // 报价排名
import offerScoket from '../components/proBiddingAgentScoket-add' // 实时聊天组件
import offerApxecharts from '../components/proBiddingApxecharts-detail' // 折线图
export default {
  name: 'OfferlobbyBiddingAddVue',
  components: {
    offerAgentGoods, // 报价排名
    offerScoket, // 实时聊天组件
    OfferHeader, // 公共头部
    OfferRules, // 当前竞价状态与竞价规则
    offerLowset, // 我的报价/全部报价
    offerMy, // 我的报价
    offerApxecharts // 折线图
  },
  mixins: [procurementBiddingMixins, procurementBiddingGroupMixin],
  props: {
    // 竞价状态 00竞价未开始 01竞价结束
    biddingStatus: {
      type: String,
      default: '00'
    },
    // 竞价规则
    projectRulesData: {
      type: Object,
      default: () => {
        return {}
      }
    },
    // 大厅类型 00采购 01供应商
    hallType: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      num: 10,
      formData: {},
      activeName: 'first'
    }
  },
  created() {
    const packId = this.$route.query.packId // 获取标段id
    const tenderId = this.$route.query.tenderId // 获取项目id
    if (packId && tenderId) {
      // 调用获取竞价规则的方法
      this.getOfferRulesData(packId)
    }
  },
  methods: {
    // 关闭大厅
    closeHall() {
      this.$emit('closeHall')
    }
  }
}
</script>

<style lang="less" scoped>
  @import "~@assets/style/procurement/procurement.bidding.less";
  /deep/.el-input-number--medium {
    line-height: 28px;
  }
  /deep/.el-input-number__increase{
    height:28px;
  }
  /deep/.el-input__inner{
    height:30px;
    line-height: 30px;
  }

</style>
