Blame view

src/views/printdjb/components/fdcq1.vue 7.57 KB
xiaomiao committed
1
<template>
2 3
  <div class="all">
    <div class="tbalede">
xiaomiao committed
4 5 6
      <div class="title">
        {{ title }}
      </div>
7 8 9 10 11 12 13 14 15 16 17 18
      <table class="xxTable">
        <tr v-for="(item, colindex) in columns" :key="colindex">
          <td>
            {{ item.label }}
          </td>
          <td v-for="(row, index) in tableData" :key="index">
            <span>
              {{ getQsztName(row[item.prop]) }}
            </span>
            <span v-if="['djyy','fj'].includes(item.prop)">
              {{ row[item.prop] }}
            </span>
xiaomiao committed
19

20 21 22 23 24 25
            <span v-if="(item.prop !== 'qszt' && item.prop !== 'djyy'&& item.prop !== 'fj') && !judge(item.label)">
              {{ row[item.prop] }}
            </span>
            <div v-if="judge(item.label)">
              <div v-for="(label, index) in row.djQlxxFdcqxmDoList" :key="index">
                {{ label[item.prop] }}
xiaomiao committed
26
              </div>
27 28 29 30
            </div>
          </td>
          <td v-for="count in emptycolNum" :key="~count"></td>
        </tr>
xiaomiao committed
31
      </table>
32 33 34
    </div>
    <div class="tbalede">
      <div class="title">
xiaomiao committed
35 36 37
        {{ title }}
      </div>
      <table class="xxTable">
38 39 40 41 42 43 44 45
        <tr v-for="(item, colindex) in columns" :key="colindex">
          <td>
            {{ item.label }}
          </td>
          <td v-for="(row, index) in tableData" :key="index">
            <span class="ooo" v-if="item.prop == 'qszt'">
              {{ getQsztName(row[item.prop]) }}
            </span>
xiaomiao committed
46

47 48
            <el-tooltip v-if="['djyy','fj'].includes(item.prop)">
              <span>
xiaomiao committed
49 50
                {{ row[item.prop] }}
              </span>
51 52 53 54 55 56 57 58
            </el-tooltip>

            <span v-if="(item.prop !== 'qszt' && item.prop !== 'djyy'&& item.prop !== 'fj') && !judge(item.label)">
              {{ row[item.prop] }}
            </span>
            <div v-if="judge(item.label)">
              <div v-for="(label, index) in row.djQlxxFdcqxmDoList" :key="index">
                {{ label[item.prop] }}
xiaomiao committed
59
              </div>
60 61 62 63 64 65
            </div>
          </td>
          <td v-for="count in emptycolNum" :key="~count"></td>
        </tr>
      </table>
    </div>
xiaomiao committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79
  </div>
</template>

<script>
  import { datas } from "./qlxxFormData.js";
  import { getSjlx } from "@/utils/dictionary.js";
  import { getFdcq1List } from "@/api/djbDetail.js";
  export default {
    data () {
      return {
        title: "房地产权登记信息(多幢)",
        qsztList: datas.columns().qsztList,
        checkList: datas.columns().checkList,
        //传递参数
80
        bdcdyid: this.$route.query.bdcdyid,
xiaomiao committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
        qllx: this.$route.query.qllx,
        //列表数据
        tableData: [],
        //空列值个数
        emptycolNum: datas.columns().emptycolNum,
        //列名称对象
        columns: datas.columns().FDCQ1,
      };
    },
    created () {
      this.loadData();
    },
    methods: {
      /**
       * @description: loadData
       * @author: renchao
       */
      loadData () {
        if (this.$parent.addRepairRecord) {
          this.columns.unshift({
            prop: "cz",
            label: "操作"
          })
        }
        getFdcq1List({
          bdcdyid: this.bdcdyid,
          qllx: this.qllx,
          qszt: this.checkList,
        }).then((res) => {
          if (res.code === 200) {
            this.tableData = res.result;
            this.tableData.forEach(item => {
113
              this.tableData.push(item)
xiaomiao committed
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
              item.sjlx = getSjlx(item.sjlx)

            })
            if (this.tableData.length < datas.columns().emptycolNum) {
              this.emptycolNum =
                datas.columns().emptycolNum - this.tableData.length;
            } else {
              this.emptycolNum = 0;
            }
          }
        });
      },
      /**
       * @description: checkChange
       * @author: renchao
       */
      checkChange () {
        if (this.checkList.length === 0) {
          this.tableData = [];
          this.emptycolNum = datas.columns().emptycolNum;
        } else {
          this.loadData();
        }
      },
      /**
       * @description: getQsztName
       * @param {*} code
       * @author: renchao
       */
      getQsztName (code) {
        let name = "";
        for (let item of this.qsztList) {
          if (item.value == code) {
            name = item.label;
            break;
          }
        }
        return name;
      },
      /**
       * @description: judge
       * @param {*} lable
       * @author: renchao
       */
      judge (label) {
        if ('项目名称幢号总层数规划用途用途名称批准用途实际用途房屋结构房屋结构名称建筑面积竣工时间总套数'.indexOf(label) > -1) {
          return true
        } else {
          return false
        }
      },
      // 新增一条补录信息
      /**
       * @description: 新增一条补录信息
       * @param {*} row
       * @param {*} del
       * @author: renchao
       */
      editDialog (row, del) {
        this.$confirm('此操作将新增一条补录信息, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$parent.addRepairRecord(row, del)

180 181 182 183
          // this.$message({
          //   type: 'success',
          //   message: '补录成功!'
          // });
xiaomiao committed
184 185 186 187 188 189 190 191 192 193 194 195 196 197
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '取消编辑'
          });
        });

      },
    },
  };
</script>

<style lang="scss" scoped>
  .all {
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
    width: 794px;
    height: 100%;
    margin: auto;
    background-color: rgb(255, 255, 255);
    overflow: hidden;
  }
  .tbalede {
    width: 794px;
    height: 1123px;
    margin: auto;
    .title {
      width: 100%;
      font-weight: 700;
      font-size: 16px;
      text-align: center;
      height: 62px;
      line-height: 62px;
      position: relative;
      margin: 0 3px;
    }
  }
  .top {
    width: 80%;
    height: 100px;
    margin: auto;
    display: flex;
    position: relative;
  }
  p {
    position: absolute;
    bottom: 10px;
    right: 10px;
  }
  table {
    width: 80%;
    border: 1px solid black;
    margin: 0 auto;
    border-collapse: collapse;
  }
  .head {
    font-size: 20px;
    width: 100%;
    height: 40px;
    margin: auto;
  }
  .dyh {
    padding: 10px;
    font-size: 12px;
    text-align: left;
  }
xiaomiao committed
248

249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
  .content {
    height: 40px;
  }
  .slash-wrap {
    position: relative;
    box-sizing: border-box;
    width: 150px;
    height: 40px;
  }
  /* 斜线 */
  .slash1 {
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    width: 133px;
    height: 1px;
    background-color: #949393;
    transform: rotate(17.93010235415598deg);
    transform-origin: top left;
  }
  /* 左下角文字 */
  .left {
    position: absolute;
    left: 30px;
    bottom: 5px;
  }
xiaomiao committed
276

277 278 279 280 281 282 283 284 285 286
  /* 右上角文字 */
  .mid {
    position: absolute;
    /* 右上角 right:0; top: 0; */
    right: 29px;
    top: 4px;
  }
  .xxTable {
    width: 100%;
    border-collapse: collapse;
xiaomiao committed
287

288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
    tr td {
      border: 2px solid rgb(227, 226, 226);
      text-align: center;
      height: 40px;
      font-size: 13px;
      // flex: 1;
      // display: flex;
      // align-items: center;
      // justify-content: center;
      min-width: 80px;
      z-index: 1;
      .ooo {
        width: 190px !important;
      }
    }
    td:first-child {
      flex: inherit !important;
      // min-width: 180px !important;
    }
  }
  .ellipsis-line {
    display: inline-block;
    width: 300px;
    height: 100px !important;
    line-height: 20px !important;
    word-break: break-all;
    text-overflow: ellipsis;
    overflow: hidden;
  }
xiaomiao committed
317
</style>