<template>
  <div class="bg-F5">
    <div class="container ">
      <div class="info">
        <div class="left">
          <div>
            <el-carousel class="marquee" arrow="never">
              <el-carousel-item
                v-for="item in (this.shopInfo.propagandaImgUrl + ``).split(`,`)"
                :key="item"
              >
                <img :src="`${$basePath}${item}`" alt="" />
              </el-carousel-item>
            </el-carousel>
          </div>
          <div class="details">
            <span>{{ shopInfo.companyName }}</span>
            <p>企业类型：{{ companyType }}</p>
            <p>统一社会信用代码：{{ shopInfo.unifiedSocialCreditCode }}</p>
            <p>法人代表：{{ shopInfo.legalPerson }}</p>
            <p>注册地址：{{ shopInfo.detailAddress }}</p>
            <p>主营产品：{{ shopInfo.primaryBusiness }}</p>
          </div>
        </div>
        <div class="right">
          <div class="title">
            企业介绍
          </div>
          <p>
            {{ shopInfo.companyIntroduce }}
          </p>
        </div>
      </div>
      <div class="x-title">
        营业执照
      </div>
      <img :src="`${$basePath}${shopInfo.businessLicenseUrl}`" alt="" />
    </div>
  </div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator";
import dict from "@/store/modules/dict";
@Component
export default class extends Vue {
  @Prop() private shopInfo!: IAny;

  get companyType() {
    const x = dict.companyType.find(
      ({ value }) => value === this.shopInfo.companyType
    );
    return x && x.key;
  }
}
</script>
<style lang="scss" scoped>
.container {
  padding: 20px 0;
  .info {
    height: 255px;
    background: #fff;
    border-radius: 4px;
    padding: 15px 20px;
    box-sizing: border-box;
    > div {
      width: 50%;
      box-sizing: border-box;
      display: inline-block;
      height: 100%;
      vertical-align: top;
    }
    .left {
      border-right: 1px dashed #e3e3e3;
      > div {
        width: 50%;
        box-sizing: border-box;
        // display: inline-block;
        height: 100%;
        float: left;
        img {
          width: 100%;
          height: 100%;
          border-radius: 4px;
        }
        &.details {
          padding: 10px 20px;
          span {
            margin-bottom: 20px;
            display: inline-block;
            font-size: 16px;
            color: rgb(51, 51, 51);
          }
          p {
            font-size: 12px;
            color: rgb(102, 102, 102);
            margin-bottom: 5px;
            word-break: break-all;
          }
        }
      }
    }
    .right {
      padding: 20px 40px;
      .title {
        color: rgb(253, 85, 34);
        margin-bottom: 20px;
        font-size: 16px;
      }
      p {
        font-size: 12px;
        color: rgb(102, 102, 102);
      }
    }
  }
  .x-title {
    margin-top: 30px;
    margin-bottom: 20px;
  }
  > img {
    max-width: 80%;
  }
}
</style>
