Blame view

src/views/registerBook/cfdj.vue 3.41 KB
田浩浩 committed
1 2 3 4 5 6 7
<template>
  <div class="djxxTable">
    <div class="tableBox">
      <div class="title">
        {{ title }}
        <div class="checkbox">
          <el-checkbox-group v-model="checkList" @change="checkChange">
8 9 10
            <el-checkbox
              v-for="item in qsztList"
              :key="item.value"
11
              :label="item.value">{{ item.label }}</el-checkbox>
田浩浩 committed
12 13 14
          </el-checkbox-group>
        </div>
      </div>
任超 committed
15
      <div class="xxTableBox rollTable">
田浩浩 committed
16
        <table class="xxTable">
任超 committed
17
          <tr v-for="(item, colindex) in columns" :key="colindex">
18 19 20 21 22
            <td>{{ item.label }}</td>
            <td
              v-for="(row, index) in tableData"
              :key="index"
              :class="[
任超 committed
23 24
              row.qszt == '2' ? 'lishi' : '',
              row.qszt == '0' ? 'linshi' : '',
25
              item.prop == 'qszt' && (row.qszt == '0' ||(row.qszt == '1' &&row.qlblzt == '1'&&row.zxywh != null))? 'linshiIcon' : '',
26
            ]">
27 28
              <div class="icon" v-if="item.prop == 'qszt' && (row.qszt == '0' ||(row.qszt == '1' &&row.qlblzt == '1'&&row.zxywh != null))">正在办理</div>
              <span v-if="item.prop == 'qszt'">{{ getQsztName(row[item.prop]) }}</span>
田浩浩 committed
29

30
              <span v-else>{{ row[item.prop] }}</span>
田浩浩 committed
31 32 33 34 35 36 37 38 39 40
            </td>
            <td v-for="count in emptycolNum" :key="~count"></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</template>

<script>
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
  import { datas } from "./qlxxFormData.js";
  import { getSjlx } from "@/utils/dictionary.js";
  import { getCfdjList } from "@/api/registerBook.js";
  export default {
    data () {
      return {
        title: "查封登记信息",
        qsztList: datas.columns().qsztList,
        checkList: datas.columns().checkList,
        //传递参数
        propsParam: this.$attrs,
        //列表数据
        tableData: [],
        //空列值个数
        emptycolNum: datas.columns().emptycolNum,
        //列名称对象
        columns: datas.columns().CFDJ,
      };
    },
    created () {
      this.loadData();
    },
    methods: {
      loadData () {
        getCfdjList({
          bdcdyid: this.propsParam.bdcdyid,
          qllx: this.propsParam.qllx,
          qszt: this.checkList,
        }).then((res) => {
          if (res.code === 200) {
            this.tableData = res.result;
            this.tableData.forEach(item => {
              item.sjlx = getSjlx(item.sjlx)
            })
            this.tableData.forEach((item, index) => {
              if (item.sfbxf == "1") {
                item.zxywh = "";
                item.zxdbr = "";
                item.zxsj = "";
              }
            });
            if (this.tableData.length < datas.columns().emptycolNum) {
              this.emptycolNum =
                datas.columns().emptycolNum - this.tableData.length;
            } else {
              this.emptycolNum = 0;
蔡俊立 committed
87
            }
田浩浩 committed
88
          }
89 90 91 92 93 94 95 96
        });
      },
      checkChange () {
        if (this.checkList.length === 0) {
          this.tableData = [];
          this.emptycolNum = datas.columns().emptycolNum;
        } else {
          this.loadData();
田浩浩 committed
97
        }
98 99 100 101 102 103 104 105
      },
      getQsztName (code) {
        let name = "";
        for (let item of this.qsztList) {
          if (item.value == code) {
            name = item.label;
            break;
          }
田浩浩 committed
106
        }
107 108
        return name;
      },
田浩浩 committed
109
    },
110
  };
田浩浩 committed
111 112 113
</script>

<style lang="scss" scoped>
114
  @import "./qlxxCommon.scss";
田浩浩 committed
115
</style>