Blame view

src/views/registerBook/sllmsyq.vue 1.95 KB
yangwei committed
1 2
<!--
 * @Description:
xiaomiao committed
3
 * @Autor: miaofang
4
 * @LastEditTime: 2023-09-18 13:45:03
yangwei committed
5 6 7
-->
<template>
  <div class="djxxTable">
8
    <djbDetail :title="title" :shows="shows" :propsParam="propsParam"
“miaofang committed
9
      :columns="columns" :tableData="tableData" />
yangwei committed
10 11
  </div>
</template>
xiaomiao committed
12

yangwei committed
13
<script>
14 15 16 17 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
  import { datas } from "./qlxxFormData.js";
  import { getSjlx } from "@/utils/dictionary.js";
  import { getLqList } 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().LDSYQ,
        render: false,
      };
    },
    created () {
      this.loadData();
    },
    methods: {
      loadData () {
        if (this.$parent.addRepairRecord) {
          this.columns.unshift({
            prop: "cz",
            label: "操作",
yangwei committed
44 45
          });
        }
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
        getLqList({
          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;
            }
          }
        });
      }
xiaomiao committed
66
    },
67
  };
yangwei committed
68
</script>
xiaomiao committed
69

xiaomiao committed
70
<style lang="scss" scoped>
71 72 73 74 75 76 77 78 79 80
  @import "./qlxxCommon.scss";
  .title {
    position: relative;
    .print {
      // background-color: #0079fe;
      z-index: 10;
      position: absolute;
      left: 11px;
      top: 5px;
    }
xiaomiao committed
81
  }
yangwei committed
82
</style>