<!-- 供应信息详情 -->
<template>
  <div class="bg-F5">
    <div class="container">
      <el-row class="xqDiv" :gutter="20">
        <el-col :span="10">
          <div class="bigImgDiv">
            <img src="@assets/productDetails.jpg" alt="" />
          </div>
          <div class="imgDetailDiv">
            <el-carousel height="80px" :autoplay="false">
              <el-carousel-item v-for="item in 3" :key="item">
                <div class="imgDetail">
                  <div class="imgDiv">
                    <img src="@assets/productDetails.jpg" alt="" />
                  </div>
                  <div class="imgDiv">
                    <img src="@assets/productDetails.jpg" alt="" />
                  </div>
                  <div class="imgDiv">
                    <img src="@assets/productDetails.jpg" alt="" />
                  </div>
                  <div class="imgDiv">
                    <img src="@assets/productDetails.jpg" alt="" />
                  </div>
                </div>
              </el-carousel-item>
            </el-carousel>
          </div>
        </el-col>
        <el-col :span="14">
          <div class="title">
            <span class="type">供应</span>
            <span class="name">{{ noticeSupply.supplyTitle }}</span>
          </div>
          <div class="info">生产厂家：{{ noticeSupply.manufacturer }}</div>
          <div class="info">
            联&nbsp;系&nbsp;人：{{ noticeSupply.contacts }}
          </div>
          <div class="info">发布时间：{{ noticeSupply.releaseTime }}</div>
          <div class="info">联系电话：{{ noticeSupply.telephone }}</div>
        </el-col>
      </el-row>
      <div class="infoDiv">
        <!--<div class="info">-->
        <!--<div class="tit">供应概要:</div>-->
        <!--<div class="con">{{noticeSupply.telephone}}</div>-->
        <!--</div>-->
        <div class="info">
          <div class="tit">供应详情:</div>
          <div class="con">
            {{ noticeSupply.supplyDetails }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { Component, Vue, Watch } from "vue-property-decorator";
export default {
  name: "app",
  components: {},
  data() {
    return {
      id: null,
      noticeSupply: {}
    };
  },
  methods: {
    // 需求信息详情数据请求 liuqiwen
    detailData() {
      var that = this;
      that
        .$post("/supply/info/getSupplyInfo", {
          id: that.id
        })
        .then(function(res) {
          console.log(res);
          if (!res[0]) {
            that.noticeSupply = res[1].noticeSupply;
          }
        });
    }
  },
  activated() {
    this.id = parseInt(this.$route.query.id);
    this.detailData();
  },
  mounted() {
    this.id = parseInt(this.$route.query.id);
    this.detailData();
  }
};
</script>
<style lang="scss" scoped>
.container {
  background: #fff;
  margin-top: 2rem;
  margin-bottom: 4rem;
  border-radius: 0.4rem;
  .xqDiv {
    border-bottom: 0.1rem solid #e5e5e5;
    padding: 3rem 3rem 2rem 2rem;
    box-sizing: border-box;
    .bigImgDiv {
      img {
        width: 100%;
        border-radius: 0.5rem;
      }
    }
    .imgDetailDiv {
      margin-top: 2rem;
      .imgDetail {
        width: 100%;
        overflow: hidden;
        .imgDiv {
          width: 22.7%;
          float: left;
          margin-right: 3%;
          &:last-child {
            margin-right: 0;
          }
          img {
            width: 100%;
          }
        }
      }
    }
    .title {
      height: 4rem;
      line-height: 4rem;
      .type {
        display: inline-block;
        height: 2.2rem;
        line-height: 2.2rem;
        font-size: 1.4rem;
        color: #fff;
        border-radius: 0.4rem;
        padding: 0 0.6rem;
        background: #fd5522;
      }
      .name {
        font-size: 1.8rem;
        color: #333;
        margin-left: 1.6rem;
      }
    }
    .info {
      height: 4rem;
      line-height: 4rem;
      font-size: 1.4rem;
      color: #666;
    }
  }
  .infoDiv {
    padding: 3rem 3rem 4rem 3rem;
    box-sizing: border-box;
    .info {
      font-size: 1.4rem;
      overflow: hidden;
      .tit {
        width: 7%;
        float: left;
        line-height: 2.4rem;
        color: #333;
      }
      .con {
        width: 93%;
        float: left;
        line-height: 2.4rem;
        color: #666;
      }
    }
  }
}
</style>
