companyInfo3.vue 6.84 KB
<template>
  <div>
  <div v-loading="loading" style="border: 1px solid black;">
        <el-row  >
          <el-col :span="6" class="bd">企业名称</el-col>
          <el-col :span="6" class="bd">{{infoData.name}}</el-col>
          <el-col :span="6" class="bd bd_left">企业简称</el-col>
          <el-col :span="6" class="bd">{{infoData.abbreviation}}</el-col>
        </el-row>
        <el-row  >
          <el-col :span="6" class="bd">注册地所属区域</el-col>
          <el-col :span="6" class="bd">{{infoData.areaName}}</el-col>
          <el-col :span="6" class="bd bd_left">企业道路运输经营许可证有效期</el-col>
          <el-col :span="6" class="bd">{{infoData.registrationValidTime}}</el-col>
        </el-row>
        <el-row >
          <el-col :span="6" class="bd bd_left">企业入市时间</el-col>
          <el-col :span="6" class="bd">{{infoData.entryTime}}</el-col>
          <el-col :span="6" class="bd">企业营业执照有效期</el-col>
          <el-col :span="6" class="bd">{{infoData.businessLicenseValidTime}}</el-col>
        </el-row>
        <el-row >
            <el-col :span="6" class="bd">办公地址</el-col>
            <el-col :span="6" class="bd">{{infoData.officeAddress}}</el-col>
            <el-col :span="6" class="bd bd_left">停车场位置</el-col>
            <el-col :span="6" class="bd">{{infoData.parkingAddress}}</el-col>
        </el-row>
        <el-row >
          <el-col :span="6" class="bd">停车场面积</el-col>
          <el-col :span="6" class="bd">{{infoData.parkingArea}}</el-col>
            <el-col :span="6" class="bd bd_left">运输车辆总数</el-col>
            <el-col :span="6" class="bd">{{infoData.vehicleCount}}</el-col>
        </el-row>
        <el-row >
          <el-col :span="6" class="bd">企业安全负责人姓名及联系方式</el-col>
          <el-col :span="6" class="bd">{{infoData.principal}}:{{infoData.principalPhoneNo}}</el-col>
          <el-col :span="6" class="bd">社会统一信用代码编号</el-col>
          <el-col :span="6" class="bd">{{infoData.creditCode}}</el-col>
        </el-row>
        <el-row >
          <el-col :span="6" class="bd bd_left">法人代表姓名及联系方式</el-col>
          <el-col :span="6" class="bd">{{infoData.corporation}}:{{infoData.corporationPhoneNo}}</el-col>
          <el-col :span="6" class="bd bd_left">安全管理人员</el-col>
          <el-col :span="6" class="bd">{{infoData.safetyOfficer}}</el-col>
        </el-row>
        <el-row >
          <el-col :span="6" class="bd bd_left">备注</el-col>
          <el-col :span="18" class="bd">{{infoData.comment}}</el-col>
        </el-row>

        <div v-for="dict in dicts">
          <p >{{dict.name}}</p>
          <el-image v-for="item in infoData.attachmentList"
                    style="width: 40px; height: 40px; margin: 5px;"
                    :src="'/remotedown/' + item.attachmentPath"
                    :z-index="2000"
                    :preview-src-list="[slides1('/remotedown/' + item.attachmentPath)]"
                    v-if="item.typeCode == dict.code && (item.attachmentPath.toLowerCase().indexOf('.jpg') > -1 || item.attachmentPath.toLowerCase().indexOf('.png') > -1)">
          </el-image>
          <a v-for="item in infoData.attachmentList"
            @click="downloadFile(item.attachmentPath);"
            style="color:blue;"
            v-if="item.typeCode == dict.code
            && item.attachmentPath.toLowerCase().indexOf('.jpg') == -1
            && item.attachmentPath.toLowerCase().indexOf('.png') == -1"><p>{{item.name}}</p></a>
        </div>
      <!-- <el-dialog title="" :visible.sync="showPic" append-to-body width="400px">
        <el-image
                  style="width: 350px; height: 350px; margin: 5px;"
                  :src="'/remotedown/' + picImage"
                  :preview-src-list="[picImage]"
                  :z-index="2000">
        </el-image>
      </el-dialog> -->
    </div>
  </div>
</template>

<script>


import store from "@/store";
  import {
    getToken
  } from "@/utils/auth";


  import {
    getCompanyInfo,
    getArea,
    getDict
  } from "@/api/dict";


  export default {
    name: "ThreestepInfo",
    props: {
      businessKey: {
        type: String
      },
    },
    data() {
      return {
        sign: store.getters.avatar, //裁剪图片的地址
        areas: [],
        loading: null,
        objectDict: {
            constructionSiteID:"工地ID",
            constructionSiteName:"工地名称",
            earthSiteID:"处理场所ID",
            earthSiteName:"处理场所名称",
            absorbCapacity:"消纳容量",
            startTime:"有效期开始时间 yyyy-mM-dd",
            endTime:"有效期结束时间 yyyy-mM-dd",
            type:"建筑垃圾类型ID",
            typeName:"垃圾类型名称",
            contractNo:"消纳合同编号",
            routeName:"线路名称",
            routeWidth:"线路宽度",
            auditStatus:"审核状态 0-审核中 1-审核通过 2-审核驳回",
            auditStatusName:"审核状态名称",
            contractStatus:"合同状态",
            contractStatusName:"合同状态名称",
            routePoints:"线路信息"},

        infoData: {},

        dicts:null,
        showPic:false,
        picImage:null,
      }
    },
    created() {

      getDict({type:"CSCompanyAttachmentType"}).then(res=>{
          this.dicts = res.result;
      });

      this.loading = true;
      this.getInfo();

    },
    methods: {
      slides1(img){
        return img;
      },
      getInfo() {
        let id;
        if (this.businessKey.split(":").length == 2) {
          id = this.businessKey.split(":")[1];
        } else {
          id = this.businessKey;
        }

        getCompanyInfo(id).then(response => {

           this.infoData = response.result;
          // getArea().then(res => {
          //   this.areas = res.result;
          //   this.loading = false;
          //   for (let i = 0; i < this.areas.length; i++) {
          //     if (Number(this.infoData.place) == this.areas[i].code) {
          //       this.infoData.place = this.areas[i].name;
          //     }
          //   }
          // });

          // for(let i in obj){
          //   if(this.objectDict[i]){
          //       this.infoData.push({label:this.objectDict[i] ,value:obj[i]})
          //   }
          // }
          this.loading = false;
        });
      },
      downloadFile(path){
        let file =  "/remotedown/" + path;

        if(path.indexOf(".jpg") != -1){
            this.showPic = true;

            this.picImage = file;
            return;
        }

          window.open(file,"new window");
      }
    }

  }
</script>
<style>
  .bd{
    padding:5px;
  }



</style>