Blame view

src/views/workflow/components/batchDel.vue 1.4 KB
任超 committed
1 2 3 4 5 6
<!--
  功能:申请单元列表批量删除
  作者:calliope
-->
<template>
  <div class='batchDel'>
任超 committed
7 8
    <lb-table :column="columns" :data="formData.dataList" :maxHeight="460" :heightNumSetting="true" :pagination="false"
      @selection-change="handleSelectionChange">
任超 committed
9 10 11 12
    </lb-table>
  </div>
</template>
<script>
蔡俊立 committed
13
import { deleteBdcdy } from "@/api/ywbl.js"
任超 committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
export default {
  components: {},
  props: {
    formData: {
      type: Object,
      default: {}
    }
  },
  data () {
    return {
      columns: [
        {
          type: 'selection',
          label: '全选'
        },
        {
          label: '序号',
          type: 'index',
          width: '50',
        },
        {
蔡俊立 committed
35 36 37 38 39 40
          prop: "bdcdyh",
          label: "不动产单元号",
        },
        {
          prop: "zl",
          label: "坐落",
任超 committed
41 42
        },
      ],
蔡俊立 committed
43 44 45 46
      dataList: [],
      selectBdcdy: [],
    }
  },
任超 committed
47 48
  methods: {
    childFn () {
蔡俊立 committed
49 50 51 52
      deleteBdcdy({
        bsmSlsq: this.formData.bsmSlsq,
        bsmSldyList: this.selectBdcdy
      }).then(res => {
任超 committed
53
        if (res.code == 200) {
蔡俊立 committed
54
          this.$message.success("删除成功");
任超 committed
55
        } else {
蔡俊立 committed
56 57 58 59 60 61 62 63
          this.$message.error(res.message)
        }
      })
    },
    handleSelectionChange (e) {
      this.selectBdcdy = [];
      e.forEach((item, index) => {
        this.selectBdcdy.push(item.bsmSldy)
任超 committed
64
      })
任超 committed
65 66 67 68 69 70 71
    }
  }
}
</script>
<style scoped lang='scss'>

</style>