Blame view

src/components/fee/deleteFloorShare.vue 1.55 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
a0f584aa   wuxw   费用公摊开发完成
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
    <el-dialog
      :title="$t('floorShare.deleteConfirm')"
      :visible.sync="dialogVisible"
      width="30%"
      center
    >
      <div class="text-center">
        <p>{{ $t('floorShare.deleteMessage') }}</p>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button>
        <el-button type="primary" @click="handleConfirm" :loading="loading">{{ $t('common.confirm') }}</el-button>
      </div>
    </el-dialog>
  </template>
  
  <script>
  import { deleteFloorShareMeter } from '@/api/fee/floorShareApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'DeleteFloorShare',
    data() {
      return {
        dialogVisible: false,
        loading: false,
        form: {
          fsmId: '',
          communityId: ''
        }
      }
    },
    methods: {
      open(data) {
        this.form = {
          fsmId: data.fsmId,
          communityId: getCommunityId()
        }
        this.dialogVisible = true
      },
      async handleConfirm() {
        this.loading = true
        try {
          await deleteFloorShareMeter(this.form)
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
46
          this.$message.success(this.$t('common.operationSuccess'))
a0f584aa   wuxw   费用公摊开发完成
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
          this.dialogVisible = false
          this.$emit('success')
        } catch (error) {
          this.$message.error(error.message || this.$t('floorShare.deleteFailed'))
        } finally {
          this.loading = false
        }
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .text-center {
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .dialog-footer {
    text-align: center;
  }
  </style>