<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-axis__caRental}">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
        <!-- <el-form-item>
          <el-input v-model="dataForm.rentalId" placeholder="rentalId" clearable></el-input>
        </el-form-item>
        <el-form-item>
          <el-button @click="getDataList()">{{ $t('query') }}</el-button>
        </el-form-item>
        <el-form-item>
          <el-button v-if="$hasPermission('axis:caRental:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
        </el-form-item>
        <el-form-item>
          <el-button v-if="$hasPermission('axis:caRental:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
        </el-form-item> -->
      </el-form>
      <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%">
        <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
        <el-table-column prop="rentalId" label="出租房ID" header-align="center" align="center"></el-table-column>
        <el-table-column prop="gridId" label="网格ID" header-align="center" align="center"></el-table-column>
        <el-table-column prop="houseId" label="房屋ID" header-align="center" align="center"></el-table-column>
        <el-table-column prop="houseName" label="房屋编号" header-align="center" align="center"></el-table-column>
        <el-table-column prop="houseAddress" label="房屋地址" header-align="center" align="center"></el-table-column>
        <el-table-column prop="houseUse" label="建筑用途" header-align="center" align="center"></el-table-column>
        <el-table-column prop="houseArea" label="建筑面积（平方米）" header-align="center" align="center"></el-table-column>
        <el-table-column prop="idType" label="证件代码" header-align="center" align="center"></el-table-column>
        <el-table-column prop="idCard" label="证件号码" header-align="center" align="center"></el-table-column>
        <el-table-column prop="residentName" label="房主姓名" header-align="center" align="center"></el-table-column>
        <el-table-column prop="telephone" label="房主联系方式" header-align="center" align="center"></el-table-column>
        <el-table-column prop="curliveAddress" label="房主现居详址" header-align="center" align="center"></el-table-column>
        <el-table-column prop="rentUse" label="出租用途" header-align="center" align="center"></el-table-column>
        <el-table-column prop="troubleType" label="隐患类型" header-align="center" align="center"></el-table-column>
        <el-table-column prop="renterId" label="承租人ID" header-align="center" align="center"></el-table-column>
        <el-table-column prop="renterCardNumber" label="承租人公民身份证号码" header-align="center" align="center"></el-table-column>
        <el-table-column prop="renterCardType" label="承租人证件类型" header-align="center" align="center"></el-table-column>
        <el-table-column prop="renterName" label="承租人姓名" header-align="center" align="center"></el-table-column>
        <el-table-column prop="renterPhone" label="承租人联系方式" header-align="center" align="center"></el-table-column>
        <el-table-column prop="longitude" label="经度" header-align="center" align="center"></el-table-column>
        <el-table-column prop="latitude" label="纬度" header-align="center" align="center"></el-table-column>
        <el-table-column prop="pointStatus" label="标绘状态" header-align="center" align="center"></el-table-column>
        <el-table-column prop="platCode" label="数据来源" header-align="center" align="center"></el-table-column>
        <el-table-column prop="createBy" label="创建人" header-align="center" align="center"></el-table-column>
        <el-table-column prop="createDate" label="创建时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="updateBy" label="最后修改人" header-align="center" align="center"></el-table-column>
        <el-table-column prop="updateDate" label="最后修改时间" header-align="center" align="center"></el-table-column>
        <el-table-column prop="deleteFlag" label="删除状态" header-align="center" align="center"></el-table-column>
        <el-table-column prop="versions" label="乐观锁" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute1" label="承租单位" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute2" label="承租日期" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute3" label="承租期限" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute4" label="扩展字段4" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute5" label="扩展字段5" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute6" label="扩展字段6" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute7" label="扩展字段7" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute8" label="扩展字段8" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute9" label="扩展字段9" header-align="center" align="center"></el-table-column>
        <el-table-column prop="attribute10" label="扩展字段10" header-align="center" align="center"></el-table-column>
        <!-- <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
          <template slot-scope="scope">
            <el-button v-if="$hasPermission('axis:caRental:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
            <el-button v-if="$hasPermission('axis:caRental:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
          </template>
        </el-table-column> -->
      </el-table>
      <el-pagination
        :current-page="page"
        :page-sizes="[10, 20, 50, 100]"
        :page-size="limit"
        :total="total"
        layout="total, sizes, prev, pager, next, jumper"
        @size-change="pageSizeChangeHandle"
        @current-change="pageCurrentChangeHandle">
      </el-pagination>
      <!-- 弹窗, 新增 / 修改 -->
      <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
    </div>
  </el-card>
</template>

<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './carental-add-or-update'
export default {
  mixins: [mixinViewModule],
  data () {
    return {
      mixinViewModuleOptions: {
        getDataListURL: '/opendata/caRental/getPage',
        getDataListIsPage: true,
        deleteURL: '',
        deleteIsBatch: true
      },
      dataForm: {
        rentalId: ''
      }
    }
  },
  components: {
    AddOrUpdate
  }
}
</script>
