fdcq2.vue 2.04 KB
<!--
 * @Description:
 * @Autor: miaofang
 * @LastEditTime: 2023-09-18 15:01:13
-->
<template>
  <div class="djxxTable">
    <djbDetail :title="title" :shows="shows" :propsParam="propsParam"
      :columns="columns" :tableData="tableData" />
  </div>
</template>
<script>
  import { datas } from "./qlxxFormData.js";
  import { getSjlx } from "@/utils/dictionary.js";
  import { getFdcq2List } from "@/api/djbDetail.js";
  import djbDetail from "./components/djbDetail.vue"
  export default {
    components: {
      djbDetail
    },
    data () {
      return {
        shows: false,
        title: "房地产权登记信息(独幢、层、套、间房屋)",
        //传递参数
        propsParam: this.$attrs,
        //列表数据
        tableData: [],
        //列名称对象
        columns: datas.columns().FDCQ2,
        render: false,
      };
    },
    created () {
      this.loadData();
    },
    methods: {
      /**
       * @description: loadData
       * @author: miaofang
       */
      loadData () {
        if (this.$parent.addRepairRecord) {
          this.columns.unshift({ prop: "cz", label: "操作" });
        }
        getFdcq2List({
          bdcdyid: this.propsParam.bdcdyid,
          qllx: this.propsParam.qllx,
          qszt: this.checkList,
        }).then((res) => {
          if (res.code === 200) {
            this.tableData = res.result;
            this.shows = this.tableData.length > 0;
            this.tableData.forEach((item) => {
              item.sjlx = getSjlx(item.sjlx);
            });
            if (this.tableData.length < datas.columns().emptycolNum) {
              this.emptycolNum =
                datas.columns().emptycolNum - this.tableData.length;
            } else {
              this.emptycolNum = 0;
            }
          }
        })
      }
    }
  };
</script>

<style lang="scss" scoped>
  @import "./qlxxCommon.scss";
  .title {
    position: relative;
    .print {
      // background-color: #0079fe;
      z-index: 10;
      position: absolute;
      left: 11px;
      top: 5px;
    }
  }
</style>