<template>
<div class="routerWapper">
    <div v-if="urls.name == 'memberView' ||'cmDivisionView' || 'propertyInfoView' || 'indCouView' || 'nonResidentsView' || 'managerView' || 'buildingView'" class="portalDetailWapper">
      <div class="portalDetailContentWapper">
          <div class="portalDetailTitle">
            <span class="title">详情</span>
            <div class="detailOperations">
            <a-button v-if="urls.name == 'propertyInfoView'" @click="$router.push({path: `/houseData/basicInfo`,query:{id:$route.query.id,name:$route.query.name}})"> 查看管理小区列表 </a-button>
            <a-button @click="handleReturn"> 返回 </a-button>
          </div>
        </div>
        <div class="portalDetailContentBody" ref='portalDetailContentBody'>
          <template >
                <!-- 小区基础信息 -->
            <div class="layoutMargin detailsPartSection">
              <p v-if="urls.name == 'cmDivisionView'"  class="detailsPartTitle">小区管理处信息</p>
              <p v-if="urls.name == 'propertyInfoView'" class="detailsPartTitle">物业企业信息</p>
              <p v-if="urls.name == 'indCouView'" class="detailsPartTitle">业委会信息</p>
              <p v-if="urls.name == 'nonResidentsView'" class="detailsPartTitle">非居信息</p>
              <p v-if="urls.name == 'managerView'" class="detailsPartTitle">小区经理信息</p>
              <p v-if="urls.name == 'buildingView'" class="detailsPartTitle">小区楼栋信息</p>
              <p v-if="urls.name == 'memberView'" class="detailsPartTitle">成员信息</p>
              <div style="margin:0 16px;">
                  <!-- 物业 -->
                <div v-if="urls.name == 'propertyInfoView' ">
                  <a-row type="flex" justify="start">
                    <a-col span="8">
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业企业名称"' :text='detail.cspName'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"组织机构代码"' :text='detail.orgCode'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"代码证有效期"' :text='detail.codeValidDate'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业企业注册地址"' :text='detail.registerAddress'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业企业办公地址"' :text='detail.cspAddr'/>
                        </a-col>
                      </a-row>
                    </a-col>
                    <a-col span="8">
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"企业法人代表"' :text='detail.legalRepName '/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"企业联系人"' :text='detail.cspContacter'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"企业联系电话"' :text='detail.cspTel'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"企业传真"' :text='detail.cspFax'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"营业执照号"' :text='detail.bizLicenseCode'/>
                        </a-col>
                      </a-row>
                    </a-col>
                    <a-col span="8">
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"营业执照有效期"' :text='detail.bizLicenseValidDate'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业公司原资质等级"' :text='detail.cspEntQualification'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业公司在管小区数"' :text='detail.managedNum'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan="12" :label='"注册区县"' :text='detail.hpbName'/>
                        </a-col>
                      </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                        <a-col span="24">
                          <DetailsItem :labelSpan='12' :textSpan='12' label='' :text='""'/>
                        </a-col>
                      </a-row>
                    </a-col>
                  </a-row>
                  <div>
                    <p style=" text-align: left; font-weight: bold; color: #232323; font-size: 16px; text-indent: 0.5rem;
                    line-height: 60px; border-bottom: 1px solid #e0e0e0; margin-top: 20px;">管理小区列表</p>

                    <a-table class="elevator-table portalTable propertyInfoViewTable" :dataSource="tableData" :columns="columns" size="small" :pagination="pagination"
                      rowKey="id" bordered> 
                    </a-table> 

                  </div>
                </div>
                    <!-- 小区管理处 -->
                <a-row v-if="urls.name == 'cmDivisionView'" type="flex" justify="start">
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区管理处名称"' :text='detail.csName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区管理处办公地址"' :text='detail.csAddress'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区管理处联系人"' :text='detail.csContacter'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"联系人联系电话"' :text='detail.csTel'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区日间报修电话"' :text='detail.csDayTel'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区夜间报修电话"' :text='detail.nightTel'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业投诉电话"' :text='detail.complaintTel'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区管理处传真"' :text='detail.csFax'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区管理处邮编"' :text='detail.csPostCode'/>
                      </a-col>
                    </a-row>

                  </a-col>
                </a-row>
                    <!-- 小区经理 -->
                <a-row v-if="urls.name == 'managerView'" type="flex" justify="start">
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区经理姓名"' :text='detail.csmName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业服务企业名称"' :text='detail.cspInfo && detail.cspInfo.cspName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"证件类型"' :text='detail.certTypeName'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区经理上岗证号"' :text='detail.csmJobCode'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"资格证书名称"' :text='detail.csmJobQualification'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区经理证件号码"' :text='detail.credentialsNo'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"资格证书编号"' :text='detail.csmJobLog'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区经理固定电话"' :text='detail.csmTel'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"小区经理手机号码"' :text='detail.csmPhone'/>
                      </a-col>
                    </a-row>
                  </a-col>
                </a-row>
                    <!-- 非居信息 -->
                <a-row v-if="urls.name == 'nonResidentsView'" type="flex" justify="start">
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目名称"' :text='detail.stName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"区县"' :text='detail.hpbToiName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"房管办"' :text='detail.hoName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目地址"' :text='detail.stAddr'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"路"' :text='detail.stLoad'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"弄"' :text='detail.stLong'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"支弄"' :text='detail.stSublong'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"号"' :text='detail.stNo'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目别名"' :text='detail.stAlias'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目其他地址"' :text='detail.stAlternateAddr'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目经理姓名"' :text='detail.csmName'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目类型"' :text='detail.stUseType'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目总建筑面积"' :text='detail.stCnstArea'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目总建筑面积类型"' :text='detail.stCnstAreaTypeName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目产权单位/人 "' :text='detail.stPropertyName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目产权单位/人联系方式"' :text='detail.stPropertyLinknum'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目承租单位/人"' :text='detail.stLesseeName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目承租单位/人联系方式 "' :text='detail.stLesseeLinknum'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"是否有物业管理"' :text='detail.stIsManaged == "0" ? "否":"是"'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目竣工日期"' :text='detail.stFinishDate'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目总自然幢数"' :text='detail.stTotBuilds'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目经理手机号"' :text='detail.csmPhone'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目地上机动车位数"' :text='detail.stTotOngParks'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目地下机动车位数"' :text='detail.stTotUngParks'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业管理单位名称"' :text='detail.cspName'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业企业统一社会信用代码"' :text='detail.cspOrgCode'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业服务合同开始日期"' :text='detail.stCspContractStartDate'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业服务合同结束日期"' :text='detail.stCspContractEndDate'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业管理处名称"' :text='detail.csName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业管理处电话"' :text='detail.csTel'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"物业管理处地址"' :text='detail.csAddr'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目经理身份证"' :text='detail.csmCertCode'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan='12' label='' :text='""'/>
                      </a-col>
                    </a-row>
                  </a-col>
                </a-row>
                    <!-- 业委会 -->
                <a-row v-if="urls.name == 'indCouView'" type="flex" justify="start">
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"业主大会代码"' :text='detail.hocCode'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"名称"' :text='detail.hocName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"地址"' :text='detail.hocAddr'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"选举时间"' :text='detail.electionDate'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"任期"' :text='detail.commValidDate'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"第几届"' :text='detail.hocTerm'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"业主大会备案日期"' :text='detail.recordDate'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"业主大会运作情况类别"' :text='detail.onwersTypeoperName'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"换届情况类别"' :text='!detail.onwersTransitionName? "暂无":detail.onwersTransitionName'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"业委会任期起始时间"' :text='detail.conStartDate'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"业委会任期结束时间"' :text='detail.conEndDate'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan='12' label='' :text='""'/>
                      </a-col>
                    </a-row>
                  </a-col>
                </a-row>
                    <!-- 小区楼栋 -->
                <a-row v-if="urls.name == 'buildingView'" type="flex" justify="start">
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"门牌地址"' :text='detail.unitAddr'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"属性"' :text='detail.unitKindName'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"电梯标志"' :text='detail.unitFlag'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"总面积"' :text='detail.cnstArea'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"总户数"' :text='detail.totUnit'/>
                      </a-col>
                    </a-row>
                  </a-col>

                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"路"' :text='detail.uLoad'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"弄"' :text='detail.uLong'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"支弄"' :text='detail.uSublong'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"单元号"' :text='detail.unitNo'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"使用类型"' :text='detail.useType'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"项目立项类型"' :text='detail.projType'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"状态"' :text='detail.status'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"总层数"' :text='detail.unitTotFloor'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"电梯数"' :text='detail.unitTotElevator'/>
                      </a-col>
                    </a-row>
                  </a-col>
                </a-row>
                    <!-- 成员信息 -->
                <a-row v-if="urls.name == 'memberView'" type="flex" justify="start">
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"职位"' :text='detail.dirDuty'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"姓名"' :text='detail.dirName'/>
                      </a-col>
                    </a-row>
                      <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"性别"' :text=' detail.dirSex == "f" ? "女":"男"'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"出生年月"' :text='detail.dirBirthDate'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"政治面貌"' :text='detail.dirPoliticsStatus'/>
                      </a-col>
                    </a-row>
                  </a-col>
                  <a-col span="8">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"联系方式"' :text='detail.phone'/>
                      </a-col>
                    </a-row>
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="24">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='"身份证号码"' :text='detail.IDNum'/>
                      </a-col>
                    </a-row>
                  </a-col>
                </a-row>
              </div>
            </div>
            <!-- 自定义字段 -->
            <div class="layoutMargin detailsPartSection"  v-if="customKeyEnable == 'true' && extList.length>0">
              <p id="extList" class="detailsPartTitle">拓展信息</p>
              <div style="margin:0 16px;">
                <a-row type="flex" justify="start">
                  <a-col span="24">
                    <a-row type="flex" justify="start" class="detailsPartLine">
                      <a-col span="8" v-for="i in extList" :key="i.id">
                        <DetailsItem :labelSpan='12' :textSpan="12" :label='i.keyName' :text='detail[i.keyCode]'/>
                      </a-col>
                    </a-row>
                  </a-col>
                </a-row>
              </div>
            </div>
          </template>
        </div>
      </div>
    </div>
    <RouterWapper v-else />
</div>
</template>
<script>
export default {
  name: 'propertyInfoView',
  data() {
    return {
      detail: {},
      urls: '',
      newUrl: '',
      extList: [], //ext所有列表
      customKeyEnable: 'false',
      tbl: '',
      tableData: [],
      columns: [
        {
          title: '小区名称',
          dataIndex: 'stNameFrst',
          key: 'stNameFrst'
        },
        {
          title: '小区地址',
          dataIndex: 'addrFrst',
          key: 'addrFrst'
        }, {
          title: '房管办',
          dataIndex: 'hoName',
          key: 'hoName'
        },
        {
          title: '街道',
          dataIndex: 'streetName',
          key: 'streetName'
        },
        {
          title: '小区性质',
          dataIndex: 'stKindName',
          key: 'stKindName'
        }, {
          title: '小区类型',
          dataIndex: 'sectTypeName',
          key: 'sectTypeName'
        }
      ],
      pagination: {//分页
        pageNo: 1,
        pageSize: 10,
        total: 10,
        current: 1,
        defaultCurrent: 1,
        showQuickJumper: true,
        onChange: this.pageChange
      },
    }
  },
  mounted() {
  },
  methods: {
    getStList(){
      this.$ajax.get({
        url: this.$api.GET_BASIC_LIST,
        params: {
          cspId: this.$route.query.id,
          pageSize: 10,
          pageNo: this.pagination.pageNo
        }
      }).then(res => {
        if (res.code == 200 ) {
          this.tableData = res.data.content
          this.pagination.pageNo = res.data.totalPages
          this.pagination.current = res.data.page
          this.pagination.pageSize = res.data.pageSize
          this.pagination.total = res.data.totalRows
        }
      })
    },
    pageChange(page, pageSize){ //分页切换
      this.pagination.pageNo = page
      this.pagination.current = page
      this.getStList()
    },
    handleReturn() {
      this.$router.back()
    },
    //获取详情
    getList(){
      // 根据不同的路由切换不同的api
      this.$ajax.get({
        url: this.newUrl
      }).then(res => { 
        let data = this.$com.confirm(res, 'data.content', [])
        for (let i in data) {
          if (!data[i]) {
            data[i] = ''
          } else if (typeof(data[i]) === 'number') {
            data[i] = data[i].toString()
          }
        }
        // 物业原资质
        if(this.$route.name == 'propertyInfoView'){
          this.getStList()
          for (const text in data) {
            if (text == 'cspEntQualification') {
              if (data[text] == '1') {
                data[text] = '一级资质'
              } else if(data[text] == '2') {
                data[text] = '二级资质'
              } else if(data[text] == '3') {
                data[text] = '三级资质'
              } else if(data[text] == '4') {
                data[text] = '三级资质'
              } else if(data[text] == '5') {
                data[text] = '无资质'
              } else if(data[text] == '6') {
                data[text] = '其他'
              } else if(data[text] == '7') {
                data[text] = '其他'
              } else if(data[text] == '9') {
                data[text] = '未录入'
              }
            }
          }
        }
        // 非居的项目类型
        if(this.$route.name == 'nonResidentsView'){
          for (const text in data) {
            if (text == 'stUseType') {
              if (data[text] == '01') {
                data[text] = '旅馆'
              } else if(data[text] == '02') {
                data[text] = '办公楼'
              } else if(data[text] == '03') {
                data[text] = '工厂'
              } else if(data[text] == '04') {
                data[text] = '站场码头'
              } else if(data[text] == '05') {
                data[text] = '仓库堆栈'
              } else if(data[text] == '06') {
                data[text] = '商场'
              } else if(data[text] == '07') {
                data[text] = '店铺'
              } else if(data[text] == '08') {
                data[text] = '学校'
              } else if(data[text] == '09') {
                data[text] = '文化馆'
              } else if(data[text] == '10') {
                data[text] = '体育馆'
              } else if(data[text] == '11') {
                data[text] = '影剧院'
              } else if(data[text] == '12') {
                data[text] = '福利院'
              } else if(data[text] == '13') {
                data[text] = '医院'
              } else if(data[text] == '14') {
                data[text] = '农业建筑'
              } else if(data[text] == '15') {
                data[text] = '公共设施用房'
              } else if(data[text] == '16') {
                data[text] = '寺庙教堂'
              } else if(data[text] == '17') {
                data[text] = '宗祠山庄'
              } else if(data[text] == '18') {
                data[text] = '商业综合体'
              } else if(data[text] == '19') {
                data[text] = '产业园区'
              } else if(data[text] == '20') {
                data[text] = '其他'
              }
            }
          }
        }
        // 业委会成员的政治面貌文字显示
        if(this.$route.name == 'memberView'){
          for (const text in data) {
            if (text == 'dirPoliticsStatus') {
              if (data[text] == '01') {
                data[text] = '中共党员'
              } else if(data[text] == '02') {
                data[text] = '中共预备党员'
              } else if(data[text] == '03') {
                data[text] = '共青团员'
              } else if(data[text] == '04') {
                data[text] = '明革党员'
              } else if(data[text] == '05') {
                data[text] = '民盟盟员'
              } else if(data[text] == '06') {
                data[text] = '民建会员'
              } else if(data[text] == '07') {
                data[text] = '民进会员'
              } else if(data[text] == '08') {
                data[text] = '农工党党员'
              } else if(data[text] == '10') {
                data[text] = '九三学社社员'
              } else if(data[text] == '11') {
                data[text] = '台盟盟员'
              } else if(data[text] == '09') {
                data[text] = '致公党党员'
              } else if(data[text] == '13') {
                data[text] = '群众'
              } else if(data[text] == '14') {
                data[text] = '港澳同胞'
              }
            }
            if(text =='dirBirthDate' && data[text].length>2){
              data[text] = data[text].slice(0, 4)+ '年'+ data[text].slice(4)+'月'
            }
          }
        }
        // 职位
        if(this.$route.name == 'memberView'){
          for (const text in data) {
            if (text == 'dirDuty') {
              if (data[text] == '1') {
                data[text] = '主任'
              } else if(data[text] == '2') {
                data[text] = '预留印鉴副主任'
              } else if(data[text] == '3') {
                data[text] = '副主任'
              } else if(data[text] == '04') {
                data[text] = '业委会成员'
              }
            }
          }
        }
        this.detail = data 
      })
    },

    getUrl(){
      switch (this.urls.name) {
      case 'propertyInfoView':
        this.newUrl = this.$api.GET_PROPCOMPANY_ID.replace('{id}', this.$route.params.id)
        this.tbl = 'tbl_prop_company'
        break
      case 'cmDivisionView':
        this.newUrl = this.$api.GET_CS_ID.replace('{id}', this.$route.params.id)
        this.tbl = 'tbl_community_amst_office'
        break
      case 'indCouView':
        this.newUrl = this.$api.GET_INDCOU_ID.replace('{id}', this.$route.params.id)
        this.tbl = 'tbl_industry_council'
        break
      case 'nonResidentsView':
        this.newUrl = this.$api.GET_NONRESIDENT_ID.replace('{id}', this.$route.params.id)
        this.tbl = 'tbl_non_resident'
        break
      case 'managerView':
        this.newUrl = this.$api.GET_MANAGER_ID.replace('{id}', this.$route.params.id)
        this.tbl = 'tbl_community_manager'
        break
      case 'buildingView':
        this.newUrl = this.$api.GET_BUILDING_ID.replace('{id}', this.$route.params.id)
        this.tbl = 'tbl_building'
        break
      case 'memberView':
        this.newUrl = this.$api.GET_MEMBER_ID.replace('{id}', this.$route.params.id)
        this.tbl = 'tbl_ic_member'
        break
      default:
        break
      }
    },
    //查看某条数据的自定义信息
    getExt(){
      this.$ajax.get({
        url: this.$api.GET_TBLS_KEYS,
        params: { tbl: this.tbl }
      }).then(res => {
        if (res.code == 200) {
          //先获取全部的自定义字段列表 
          this.extList = this.$com.confirm(res, 'data.content', [])
          this.getList()
        }
      })
    },
  },
  created () {
    this.urls= this.$route
    this.getUrl()
    this.customKeyEnable=this.$cookie.get('customKeyEnable')
    if(this.customKeyEnable && this.customKeyEnable == 'true'){
      this.getExt()
    }else {
      this.getList()
    }
  },
}
</script>

<style>
.propertyInfoViewTable .ant-table-tbody > tr > td:nth-last-child(1){
  text-align: left;
}
</style>
