<template>
  <!-- 基本信息 -->
  <div class="baseinfo-container" style="padding: 0">
    <div class="basic-details-title border-none">
      <span class="border-span">其他信息</span>
    </div>
    <el-descriptions
      :label-style="labelStyle"
      :contentStyle="contentStyle"
      title=""
      :column="2"
      size="medium"
      border
    >
      <el-descriptions-item>
        <template slot="label">附件信息</template>
        {{ idata.fileName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">备注</template>
        {{ idata.remark }}
      </el-descriptions-item>
    </el-descriptions>

    <div class="basic-details-title border-none">
      <span class="border-span">关联信息</span>
    </div>
    <linkMsg
      ref="linkMsgRef"
      :id="idata.id"
      :categoryLevelId="idata.categoryLevelId"
      :categoryLevelGroupId="idata.categoryLevelGroupId"
    />
  </div>
</template>
<script>
  import linkMsg from './link-msg.vue';
  export default {
    components: { linkMsg },
    data() {
      return {
        labelStyle: {
          width: '200px'
        },
        contentStyle: {
          width: '400px'
        },
        depInfo: {},
        idata: {}
      };
    },
    methods: {
      async getDetailInfoAugr(data) {
        this.idata = {
          ...data,
          fileName: data.remarkAttach
            ? data.remarkAttach.map((item) => item.name).join(', ')
            : null
        };
      }
    }
  };
</script>

<style lang="scss" scoped>
  .baseinfo-container {
    background-color: #fff;
    padding: 0px 20px 20px;
    .content {
      padding: 0 20px;
    }
    .basic-details-title {
      font-size: 16px;
      margin: 15px 0;
    }
    .upload-container {
      display: flex;
      .img-box {
        width: 280px;
        height: 342px;
        border: 1px solid rgba(215, 215, 215, 1);
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          max-width: 100%;
        }
      }
      .file-list {
        margin-left: 50px;
        flex: 1;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        justify-items: baseline;
        align-content: flex-start;
        .file-box {
          width: 30%;
          margin-bottom: 20px;
          height: 57px;
          text-align: center;
          line-height: 55px;
          border: 1px solid #1890ff;
          color: #1890ff;
          cursor: pointer;
          &.disabled {
            cursor: not-allowed;
            border-color: rgba(215, 215, 215, 1);
            color: rgba(215, 215, 215, 1);
          }
        }
      }
    }
  }
</style>
