jsydsyq.vue 1.97 KB
<!--
 * @Description:
 * @Autor: miaofang
 * @LastEditTime: 2023-10-09 10:46:58
-->
<template>
  <div class="djxxTable">
    <djbDetail :title="title" ref="djbDetail" :shows="shows" :propsParam="propsParam"
      :columns="columns" :tableData="tableData" />
  </div>
</template>

<script>
  import { datas } from "./qlxxFormData.js";
  import { getSjlx } from "@/utils/dictionary.js";
  import { getJsydsyqList } from "@/api/djbDetail.js";
  import djbDetail from "./components/djbDetail.vue"
  export default {
    components: {
      djbDetail,
    },
    data () {
      return {
        printObj: {
          id: "box",
          //其他配置项,
        },
        shows: false,
        title: "建设用地使用权、宅基地使用权登记信息",
        //传递参数
        propsParam: this.$attrs,
        //列表数据
        tableData: [],
        //列名称对象
        columns: datas.columns().JSYDSYQ,
        render: false,
      };
    },
    created () {
      this.loadData();
    },
    methods: {
      loadData (checkList = []) {
        getJsydsyqList({
          bdcdyid: this.propsParam.bdcdyid,
          qllx: this.propsParam.qllx,
          qszt: 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.$refs.djbDetail.emptycolNum = datas.columns().emptycolNum - this.tableData.length;
            } else {
              this.$refs.djbDetail.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>