<template>
  <div>
    <headerTitle title="文档信息" style="margin-top: 15px"></headerTitle>

    <div class="upload-container">
      <WithView v-model="imageUrl" :limit="1" :assetName="type" />
      <div class="file-list">
        <div>
          <el-form-item prop="image" label="使用说明书">
            <fileUpload
              v-model="attUrl.operatingManual.value"
              module="main"
              :showLib="true"
            />
          </el-form-item>
        </div>
        <div>
          <el-form-item prop="image" label="生产许可证书">
            <fileUpload
              v-model="attUrl.productionLicence.value"
              module="main"
              :showLib="true"
            />
          </el-form-item>
        </div>
        <div>
          <el-form-item prop="image" label="防爆合格证书">
            <fileUpload
              v-model="attUrl.explosionProofCertificate.value"
              module="main"
              :showLib="true"
            />
          </el-form-item>
        </div>
        <div>
          <el-form-item prop="image" label="检验报告">
            <fileUpload
              v-model="attUrl.surveyReport.value"
              module="main"
              :showLib="true"
            />
          </el-form-item>
        </div>
        <div>
          <el-form-item prop="image" label="检验周期说明">
            <fileUpload
              v-model="attUrl.inspectionCycleManual.value"
              module="main"
              :showLib="true"
            />
          </el-form-item>
        </div>
        <div>
          <el-form-item prop="image" label="图纸资料">
            <fileUpload
              v-model="attUrl.informationDrawing.value"
              module="main"
              :showLib="true"
            />
          </el-form-item>
        </div>
        <div>
          <el-form-item prop="image" label="产品合格证">
            <fileUpload
              v-model="attUrl.productCertificate.value"
              module="main"
              :showLib="true"
            />
          </el-form-item>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import fileUpload from '@/components/upload/fileUpload';
import WithView from '@/components/upload/WithView';
export default {
  components: {
    WithView,
    fileUpload
  },
  props: ['type'],
  data() {
    return {
      // 图片
      imageUrl: null,
      // 文档信息
      attUrl: {
        operatingManual: {
          value: [],
          sort: 1
        },
        productionLicence: {
          value: [],
          sort: 2
        },
        explosionProofCertificate: {
          value: [],
          sort: 3
        },
        surveyReport: {
          value: [],
          sort: 4
        },
        inspectionCycleManual: {
          value: [],
          sort: 5
        },
        informationDrawing: {
          value: [],
          sort: 6
        },
        productCertificate: {
          value: [],
          sort: 7
        }
      }
    };
  },
  methods: {
    async getDetailInfoAugr(data) {
      this.attUrl = data;
    }
  }
};
</script>

<style lang="scss" scoped>
.upload-container {
  display: flex;
  justify-content: flex-start;
  .file-list {
    margin-left: 50px;
    flex: 1;
  }
}
.basic-details-title {
  font-size: 16px;
  margin: 15px 0;
}
</style>
