batchDel.vue 1.4 KB
<!--
  功能:申请单元列表批量删除
  作者:calliope
-->
<template>
  <div class='batchDel'>
    <lb-table :column="columns" :data="formData.dataList" :maxHeight="460" :heightNumSetting="true" :pagination="false"
      @selection-change="handleSelectionChange">
    </lb-table>
  </div>
</template>
<script>
import { deleteBdcdy } from "@/api/ywbl.js"
export default {
  components: {},
  props: {
    formData: {
      type: Object,
      default: {}
    }
  },
  data () {
    return {
      columns: [
        {
          type: 'selection',
          label: '全选'
        },
        {
          label: '序号',
          type: 'index',
          width: '50',
        },
        {
          prop: "bdcdyh",
          label: "不动产单元号",
        },
        {
          prop: "zl",
          label: "坐落",
        },
      ],
      dataList: [],
      selectBdcdy: [],
    }
  },
  methods: {
    childFn () {
      deleteBdcdy({
        bsmSlsq: this.formData.bsmSlsq,
        bsmSldyList: this.selectBdcdy
      }).then(res => {
        if (res.code == 200) {
          this.$message.success("删除成功");
        } else {
          this.$message.error(res.message)
        }
      })
    },
    handleSelectionChange (e) {
      this.selectBdcdy = [];
      e.forEach((item, index) => {
        this.selectBdcdy.push(item.bsmSldy)
      })
    }
  }
}
</script>
<style scoped lang='scss'>

</style>