<template>
  <div>
    <div class="routerWapper HC_AccountInfo" v-if="$route.name == 'rizhiInfo'">
        <div class="portalDetailTitle">
            <span class="title">
                日志详情
            </span>
            <div class="detailOperations">
                <a-button @click="$router.back()"> 返回 </a-button> 
            </div>
        </div>
        <div class="layoutMargin layoutPadding">
            <a-row>
                <a-col>
                    <h3>操作前信息</h3>
                    <div class="gayLine"/>
                </a-col>
            </a-row>
            <a-row>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.companyName}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                           
                        </a-col>
                        <a-col :span="14">
                            {{content.parentCompanyName}}
                        </a-col>
                    </a-row>
                </a-col>
                
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                           
                        </a-col>
                        <a-col :span="14">
                            {{content.phone?content.phone.slice(0,11):''}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.phone?content.phone.slice(12,23):''}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.phone?content.phone.slice(24,35):''}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.certificationContactName}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.certificationContactEmail}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                           
                        </a-col>
                        <a-col :span="14">
                            {{content.companyLegalPerson}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                           
                        </a-col>
                        <a-col :span="14">
                            {{content.telephone}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.address}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.personNum}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.companyNo}}
                        </a-col>
                    </a-row>
                </a-col>
            </a-row>
        </div>
        <div class="layoutMargin layoutPadding">
            <a-row>
                <a-col>
                    <h3>操作后信息</h3>
                    <div class="gayLine"/>
                </a-col>
            </a-row>
            <a-row>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.companyName}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.parentCompanyName}}
                        </a-col>
                    </a-row>
                </a-col>
                
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.phone?content.phone.slice(0,11):''}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.phone?content.phone.slice(12,23):''}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.phone?content.phone.slice(24,35):''}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.certificationContactName}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                           
                        </a-col>
                        <a-col :span="14">
                            {{content.certificationContactEmail}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.companyLegalPerson}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.telephone}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                          
                        </a-col>
                        <a-col :span="14">
                            {{content.address}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.personNum}}
                        </a-col>
                    </a-row>
                </a-col>
                <a-col :span="8">
                    <a-row>
                        <a-col :span="10" style="text-align:right">
                            
                        </a-col>
                        <a-col :span="14">
                            {{content.companyNo}}
                        </a-col>
                    </a-row>
                </a-col>
            </a-row>
        </div>
    </div>
    <RouterWapper v-else></RouterWapper>
  </div>
</template>

<script>
export default {
  data(){
    return {
      content: {},
    }
  },
  mounted(){
    this.$ajax.get({
      url: this.$api.GET_RIZHI_INFO.replace('{id}', this.$route.query.id),
    }).then(res => {  
      if (res.code == '200') {
        this.content = this.$com.confirm(res, 'data.content', [])
      } else {
        this.$message.info(res.msg, 10)
      }
    })
  },
  methods: {
    /**
     * 返回对应的企业类型
     */
    returnType(type){
      for(let i=0;i<this.companyTypeList.length;i++){
        if(this.companyTypeList[i].key==type){
          return this.companyTypeList[i].value
        }
      }
    },
  },
}
</script>

<style>
.HC_AccountInfo .ant-row{
    padding: 8px 0px;
}
</style>