Blame view

src/views/lpb/lpbContent/zdys.vue 1.38 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 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 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
<!--
 * @Author: yangwei
 * @Date: 2023-02-28 16:29:04
 * @LastEditors: yangwei
 * @LastEditTime: 2023-03-02 14:45:19
 * @FilePath: \bdcdj-web\src\views\lpb\lpbContent\zdys.vue
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
-->
<template>
  <div class="zdys-wrap">
    <div v-for="zdy in realZdys" :key="zdy.bsm">
      <!-- 幢单元名称 -->
      <p class="lpb-xmmc">
        <el-checkbox @change="zdySelectAll($event,zdy.bsm)">{{
          zdy.zdymc
        }}</el-checkbox>
      </p>
      <!-- 每个幢单元下的层户 -->
      <ch-cpn :ref="zdy.bsm" :ch="zdy.cs" />
    </div>
  </div>
</template>

<script>
import chCpn from "./ch.vue";
export default {
  name: "BdcdjWebZdys",
  components: { chCpn },
  props: {
    zdys: {
      type: Array,
      default: function () {
        return [];
      },
    },
  },
  data() {
    return {};
  },

  mounted() {},

  methods: {
    //幢单元全选
    zdySelectAll(val,r) {
      this.$refs[r][0].zdySelectAll(val)
    },
  },
  computed: {
    realZdys() {
      return this.zdys.sort((a, b) => {
        return a.zdysxh > b.zdysxh ? 1 : -1;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.zdys-wrap {
  display: flex;
  flex-direction: row;
  > div {
    margin-right: 20px;
    display: flex;
    flex-direction: column-reverse;
    .lpb-xmmc {
      border-top: 0;
    }
  }
}
</style>