<!-- 求购信息详情 -->
<template>
  <div class="bg-F5">
    <div class="container">
      <el-row class="xqDiv" :gutter="20">
        <el-col :span="10">
          <product-imgs :img="noticeSupply.picture" />
        </el-col>
        <el-col :span="14">
          <div class="title">
            <span class="type">{{
              $t("page.views.info.sell.supplyTitle")
            }}</span>
            <span class="name">{{ noticeSupply.supplyTitle }}</span>
          </div>
          <div class="info">
            {{ $t("page.views.info.sell.manufacturer") }}：{{
              noticeSupply.manufacturer
            }}
          </div>
          <div class="info">
            {{ $t("page.views.info.sell.contacts") }}：{{
              noticeSupply.contacts
            }}
          </div>
          <div class="info">
            {{ $t("page.views.info.sell.releaseTime") }}：{{
              noticeSupply.releaseTime
            }}
          </div>
          <div class="info">
            {{ $t("page.views.info.sell.telephone") }}：{{
              noticeSupply.telephone
            }}
          </div>
        </el-col>
      </el-row>
      <div class="infoDiv">
        <div class="info">
          <div class="tit">{{ $t("page.views.info.sell.supplyDetails") }}:</div>
          <div class="con" v-html="noticeSupply.supplyDetails"></div>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { Component, Vue, Watch, Prop } from "vue-property-decorator";
@Component
export default class extends Vue {
  private noticeSupply: IAny = {};
  @Prop(String) private id!: number;
  @Watch("id", { immediate: true })
  async load(id: string) {
    const [err, { noticeSupply }] = await this.$post<{ noticeSupply: IAny }>(
      "/supply/info/getSupplyInfo",
      { id }
    );
    this.noticeSupply = noticeSupply;
  }
}
</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;

    .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;
        display: inline-block;
        line-height: 2.4rem;
        color: #333;
      }
      .con {
        // width: 93%;
        // float: left;
        display: inline-block;
        line-height: 2.4rem;
        color: #666;
      }
    }
  }
}
</style>
