Blame view

src/views/ywbl/slsqxx/fdcq2/slxxCompareDetai.vue 4.58 KB
1
<!--
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-08-24 16:15:50
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
              <p v-if="!['djyy','fj'].includes(item.prop)">
                <span v-if="item.prop == 'qszt'">
                  {{ getQsztName(row[item.prop]) }}
                </span>
                <span v-else>{{ row[item.prop] }}</span>
              </p>

57
              <el-tooltip v-else effect="dark" :content="row[item.prop]" placement="top" popper-class="tooltip-width">
58 59 60 61
                <span class="ellipsis-line">
                  {{ row[item.prop] }}
                </span>
              </el-tooltip>
62 63 64 65 66 67 68 69 70
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</template>

<script>
71
  import { getFdcqLSInfo } from "@/api/djbDetail.js";
72
  import { datas } from "@/views/registerBook/qlxxFormData.js";
73

74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
  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
89

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

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