<template>
  <div class="app-warp">
    <div class="detail-structure">
      <el-page-header content="详情页面" @back="goBack"/>
      <div class="detail-container">
        <div class="level-title">
          <h1>基本信息</h1>
        </div>
        <div>
          <table class="table-ui">
            <tr>
              <td class="tbg">机构（企业）名称</td>
              <td>{{ pd.CORP_NAME }}</td>
              <td class="tbg">统一社会信用代码</td>
              <td>{{ pd.CODE }}</td>
            </tr>
            <tr>
              <td class="tbg">属地</td>
              <td >{{ pd.COMPANY_AREA }}</td>
              <td class="tbg">企事业单位经营地址</td>
              <td>{{ pd.ADDRESS_BUSINESS }}</td>
            </tr>

            <tr>
              <td class="tbg">经度</td>
              <td>{{ pd.LONGITUDE }}</td>
              <td class="tbg">纬度</td>
              <td>{{ pd.LATITUDE }}</td>
            </tr>
            <tr>
              <td class="tbg">主要负责人</td>
              <td>{{ pd.CONTACTS }}</td>
              <td class="tbg">主要负责人电话</td>
              <td>{{ pd.CONTACTS_PHONE }}</td>
            </tr>
            <tr>
              <td class="tbg">法定代表人</td>
              <td>{{ pd.LR_NAME }}</td>
              <td class="tbg">法人手机号</td>
              <td>{{ pd.LR_MOBILE }}</td>
            </tr>
            <tr>
              <td class="tbg">职工人数(人)</td>
              <td>{{ pd.EMPLOYEES }}</td>
              <td class="tbg">成立时间</td>
              <td>{{ pd.CREATE_DATE }}</td>
            </tr>
            <tr>
              <td class="tbg">注册资金（万元）</td>
              <td>{{ pd.REGCAPITAL }}</td>
              <td class="tbg">资产总额（万元）</td>
              <td>{{ pd.TOTALASSETS }}</td>
            </tr>
            <tr>
              <td class="tbg">类型</td>
              <td>{{ pd.TYPE_NAME }}</td>
            </tr>

            <tr>
              <td class="tbg">营业执照</td>
              <td colspan="3">
                <div class="img-flex">
                  <viewer :images="bus_images">
                    <img v-for="item in bus_images" :src="config.fileUrl + item.FILEPATH" :key="item.IMGFILES_ID" width="100" height="100">
                  </viewer>

                </div>
              </td>
            </tr>
          </table>
        </div>

      </div>
    </div>

  </div>
</template>

<script>
import { requestFN } from '@/utils/request'
export default {
  data() {
    return {
      config: config,
      pd: [],
      bus_images: [],
      imgUrl: require('@/assets/images/map.png')
    }
  },
  created() {
    this.getData()
  },
  methods: {
    getData() {
      requestFN(
        '/corpinfo/goEdit',
        { CORPINFO_ID: this.$parent.CORPINFO_ID }
      ).then((data) => {
        this.pd = data.pd
        this.bus_images = data.busImgs
      }).catch((e) => {
        this.listLoading = false
      })
    },
    goBack() {
      this.$parent.activeName = 'CorpList'
    }
  }
}
</script>

<style lang="sass" scoped>
.table-ui
  td
    line-height: 34px
  .tbg
    width: 200px
.img-flex
  display: flex
  .img-ui
    width: 110px
    height: 110px
    margin-right: 20px
    & img
      width: 100%
      height: 100%
</style>
