Blame view

src/components/fee/deleteFeeRule.vue 1.66 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
24d3590f   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
46
47
    <el-dialog
      :title="$t('deleteFeeRule.confirmTitle')"
      :visible.sync="dialogVisible"
      width="30%"
    >
      <div class="text-center">
        <p>{{ $t('deleteFeeRule.confirmMessage') }}</p>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeDeleteFeeRuleModel">{{ $t('deleteFeeRule.cancel') }}</el-button>
        <el-button type="primary" @click="deleteFeeRule">{{ $t('deleteFeeRule.confirmDelete') }}</el-button>
      </span>
    </el-dialog>
  </template>
  
  <script>
  import { deletePayFeeRule } from '@/api/fee/deleteFeeRuleApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'DeleteFeeRule',
    data() {
      return {
        dialogVisible: false,
        deleteFeeRuleInfo: {},
        communityId: ''
      }
    },
    created() {
      this.communityId = getCommunityId()
    },
    methods: {
      open(params) {
        this.deleteFeeRuleInfo = params
        this.dialogVisible = true
      },
      deleteFeeRule() {
        const params = {
          ...this.deleteFeeRuleInfo,
          communityId: this.communityId
        }
  
        deletePayFeeRule(params).then(response => {
          if (response.code === 0) {
            this.dialogVisible = false
            this.$emit('delete-success')
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
48
            this.$message.success(this.$t('common.operationSuccess'))
24d3590f   wuxw   房屋收费页面开发完成
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
          } else {
            this.$message.error(response.msg)
          }
        }).catch(error => {
          console.error('请求失败:', error)
          this.$message.error(this.$t('deleteFeeRule.deleteFailed'))
        })
      },
      closeDeleteFeeRuleModel() {
        this.dialogVisible = false
      }
    }
  }
  </script>
  
  <style scoped>
  .text-center {
    text-align: center;
  }
  </style>