Blame view

src/views/registerBook/nydsyq.vue 2.3 KB
1
<!--
yuanbo committed
2
 * @Description:
xiaomiao committed
3
 * @Autor: miaofang
4
 * @LastEditTime: 2023-10-09 10:52:16
5
-->
蔡俊立 committed
6 7
<template>
  <div class="djxxTable">
8
    <djbDetail :title="title" ref="djbDetail" :shows="shows" :propsParam="propsParam"
“miaofang committed
9
      :columns="columns" :tableData="tableData" />
蔡俊立 committed
10 11 12 13
  </div>
</template>

<script>
14 15 16
  import { datas } from "./qlxxFormData.js";
  import { getSjlx } from "@/utils/dictionary.js";
  import { getNydsyqList } from "@/api/djbDetail.js";
“miaofang committed
17
  import djbDetail from "./components/djbDetail.vue"
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
  export default {
    components: {
      djbDetail,
    },
    data () {
      return {
        printObj: {
          id: "box",
          //其他配置项,
        },
        shows: false,
        title: "农用地使用权登记信息",
        //传递参数
        propsParam: this.$attrs,
        //列表数据
        tableData: [],
        //列名称对象
        columns: datas.columns().NYDSYQ,
        render: false,
      };
    },
    created () {
      var qllx = this.$route.query.sqywbm.substr(0, 3);
      if (qllx == "A09") {
        this.title = "土地经营权登记信息";
      } else {
        this.title = "农用地使用权登记信息";
xiaomiao committed
45
      }
46 47 48
      this.loadData();
    },
    methods: {
49
      loadData (checkList = []) {
50 51 52 53
        if (this.$parent.addRepairRecord) {
          this.columns.unshift({
            prop: "cz",
            label: "操作",
xiaomiao committed
54 55
          });
        }
56 57 58
        getNydsyqList({
          bdcdyid: this.propsParam.bdcdyid,
          qllx: this.propsParam.qllx,
59
          qszt: checkList
60 61 62 63 64 65 66 67
        }).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) {
68
              this.$refs.djbDetail.emptycolNum = datas.columns().emptycolNum - this.tableData.length
69
            } else {
70
              this.$refs.djbDetail.emptycolNum = 0
71 72
            }
          }
73
        })
74 75
      }
    }
76
  }
蔡俊立 committed
77 78 79
</script>

<style lang="scss" scoped>
80 81 82 83 84 85 86 87 88 89
  @import "./qlxxCommon.scss";
  .title {
    position: relative;
    .print {
      // background-color: #0079fe;
      z-index: 10;
      position: absolute;
      left: 11px;
      top: 5px;
    }
xiaomiao committed
90
  }
蔡俊立 committed
91
</style>