Blame view

src/views/ywbl/slsqxx/fdcq2/slxxCompareDetai.vue 4.25 KB
1
<!--
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-06-30 17:09:35
5
-->
6 7
<template>
  <div class="djxxTable" :style="{'max-height': this.timeLineHeight + 'px' }"
8 9
    style="overflow-y:scroll;">
    <div class="tableBox">
10
      <div class="title">
11
        <span>{{ title }}</span>
12 13 14 15 16 17 18 19
      </div>
      <div class="xxTableBox">
        <table class="xxTable">
          <tr>
            <td></td>
            <td>变更前</td>
            <td>变更后</td>
          </tr>
20
          <tr v-for="(item, colindex) in columns" :key="colindex">
21 22 23 24 25 26 27 28 29
            <td>
              {{ item.label }}
            </td>
            <td
              v-for="(row, index) in tableData"
              :key="index"
              :class="[
                row.qszt == '2' ? 'lishi' : '',
                row.qszt == '0' ? 'linshi' : '',
30 31 32 33 34 35
                row.qlzt == '4' ? 'linshi' : '',

                item.prop == 'qszt' && row.qlzt == '3' ? 'linshiIcon' : '',
                item.prop == 'qszt' && row.qlzt == '2' ? 'linshiIcon' : '',
                item.prop == 'qszt' && row.qlzt == '1' ? 'xianshiIcon' : '',
                item.prop == 'qszt' && row.qlzt == '4' ? 'zhuxiaoIcon' : ''
36
              ]">
37
              <div class="icon" v-if="item.prop == 'qszt' &&row.qlzt == '1'">
38 39
                有效
              </div>
40 41 42 43 44 45 46 47 48
              <div class="icon" v-if="item.prop == 'qszt' && row.qlzt == '2'">
                正在补录
              </div>
              <div class="icon" v-if="item.prop == 'qszt' && row.qlzt == '3'">
                正在申请
              </div>
              <div class="icon" v-if="item.prop == 'qszt' && row.qlzt == '4'">
                正在注销
              </div>
49 50 51 52 53 54 55 56 57 58 59 60 61 62
              <span v-if="item.prop == 'qszt'">
                {{ getQsztName(row[item.prop]) }}
              </span>

              <span v-else> {{ row[item.prop] }}</span>
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</template>

<script>
63
  import { getFdcqLSInfo } from "@/api/djbDetail.js";
64
  import { datas } from "@/views/registerBook/qlxxFormData.js";
65

66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
  export default {
    data () {
      return {
        title: "房地产权登记信息(独幢、层、套、间房屋)",
        qsztList: datas.columns().qsztList,
        checkList: datas.columns().checkList,
        //传递参数
        propsParam: this.$attrs,
        //列表数据
        tableData: [],
        //空列值个数
        emptycolNum: 1,
        //列名称对象
        columns: datas.columns().FDCQ2,
        tdColumns: datas.columns().JSYDSYQ
81

82 83 84 85 86 87
      };
    },
    created () {
      this.loadData();
    },
    mounted () {
88
      this.timeLineHeight = document.documentElement.clientHeight - 210;
89 90 91 92 93
      window.onresize = () => {
        this.timeLineHeight = document.documentElement.clientHeight - 210;
      };
    },
    methods: {
yuanbo committed
94 95 96 97
      /**
       * @description: loadData
       * @author: renchao
       */
98 99 100 101
      loadData () {
        var formdata = new FormData();
        formdata.append("bsmSldy", this.propsParam.formData.bsmSldy);
        formdata.append("qllx", this.propsParam.formData.qllx);
102
        formdata.append("isEdit", this.ableOperation);
103 104 105 106 107 108 109 110 111
        getFdcqLSInfo(formdata).then((res) => {
          if (res.code === 200) {
            this.tableData = res.result;
            if (this.tableData.length < datas.columns().emptycolNum) {
              this.emptycolNum =
                datas.columns().emptycolNum - this.tableData.length;
            } else {
              this.emptycolNum = 0;
            }
112
          }
113 114
        });
      },
yuanbo committed
115 116 117 118
      /**
       * @description: checkChange
       * @author: renchao
       */
119 120 121 122 123 124
      checkChange () {
        if (this.checkList.length === 0) {
          this.tableData = [];
          this.emptycolNum = datas.columns().emptycolNum;
        } else {
          this.loadData();
125
        }
126
      },
yuanbo committed
127 128 129 130 131
      /**
       * @description: getQsztName
       * @param {*} code
       * @author: renchao
       */
132 133 134 135 136 137 138
      getQsztName (code) {
        let name = "";
        for (let item of this.qsztList) {
          if (item.value == code) {
            name = item.label;
            break;
          }
139
        }
140 141
        return name;
      },
142
    },
143
  };
144 145 146 147 148
</script>

<style lang="scss" scoped>
  @import "~@/views/registerBook/qlxxCommon.scss";
</style>