<template>
  <div class="eibs-tab">
    <el-row>
      <div>
        <c-col :span="24" style="margin-bottom:18px;">
          <c-col style="text-align: left">
            <el-button type="primary" size="small" :loading="searchLoading" @click="syncBdb()">修复被担保人信息</el-button>
          </c-col>
        </c-col>
      </div>
      <div>
        <c-col :span="24" style="margin-bottom:18px;">
          <span>如需要请点击上面按钮,响应结果如下表,共 {{ result.length }} 条</span>
        </c-col>
        <c-col :span="24">
          <el-table :data="result" style="width: 100%" height="550">
            <el-table-column label="序号" prop="id" width="120px">
              <template slot-scope="scope">{{scope.row.id}}</template>
            </el-table-column>
            <el-table-column label="NID主键" prop="nidInr" width="120px">
              <template slot-scope="scope">{{scope.row.nidInr}}</template>
            </el-table-column>
            <el-table-column label="业务参考号" prop="nidOwnref" width="150px">
              <template slot-scope="scope">{{scope.row.nidOwnref}}</template>
            </el-table-column>
            <el-table-column label="业务所属机构" prop="nidBranchInr" width="150px">
              <template slot-scope="scope">{{scope.row.nidBranchInr}}</template>
            </el-table-column>
            <el-table-column label="业务经办机构" prop="nidBchkeyInr" width="150px">
              <template slot-scope="scope">{{scope.row.nidBchkeyInr}}</template>
            </el-table-column>
            <el-table-column label="GIDCXM主键" prop="gidcxmInr" width="150px">
              <template slot-scope="scope">{{scope.row.gidcxmInr}}</template>
            </el-table-column>
            <el-table-column label="ADR主键" prop="adrInr" width="150px">
              <template slot-scope="scope">{{scope.row.adrInr}}</template>
            </el-table-column>
            <el-table-column label="PTA主键" prop="ptaInr" width="150px">
              <template slot-scope="scope">{{scope.row.ptaInr}}</template>
            </el-table-column>
            <el-table-column label="PTS主键" prop="ptsInr" width="150px">
              <template slot-scope="scope">{{scope.row.ptsInr}}</template>
            </el-table-column>
            <el-table-column label="名称" prop="gidcxmWarran" width="300px">
              <template slot-scope="scope">{{scope.row.gidcxmWarran}}</template>
            </el-table-column>
          </el-table>
        </c-col>
      </div>
    </el-row>
  </div>
</template>

<script>
  import codes from "~/config/CodeTable";
  import {bdbsync} from "~/service/manage/sql.js";
  import commonFunctions from "~/mixin/commonFunctions.js";
  import moment from 'moment';

  import Utils from "~/utils";

  export default {
    mixins: [commonFunctions],
    name: "",
    props: ["model"],
    inject: ["root"],
    data() {
      return {
        result: [],
        searchLoading: false,
        pageSize : 10,
        pageNum : 1
      };
    },
    methods: {

      // 获取分页组件数据,为请求数据赋值
      queryFunc(pageNumber, pageSize) {
        this.pageNum = pageNumber;
        this.pageSize = pageSize;
      },

      syncBdb(){
        this.searchLoading = true;
        bdbsync().then((res) =>{
          if (res.respCode == SUCCESS){
            this.result = res.data;
            this.searchLoading = false;
          }
          this.searchLoading = false;
        })
      }
    },
  };
</script>

<style scoped>
  .table-button-item-list {
    padding: 0;
    margin: 0;
  }

  .table-button-item-list li {
    list-style: none;
    padding: 5px 0;
    text-align: center;
    color: #606266;
    cursor: pointer;
  }
  .eContainer-table-block .paginationLable {
  font-size: 12px;
  color: #808080;
  height: 26px;
  line-height: 26px;
  float: right;
  /* margin-top: 20px; */
}
  .eContainer-table-block .el-table__body-wrapper {
    overflow: auto;
  }
</style>