Blame view

src/components/market/DeleteMarketRuleCommunity.vue 1.12 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
31330681   wuxw   开发完成admin 营销规则
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
    <el-dialog :title="$t('marketRule.confirmDelete')" :visible.sync="visible" width="30%">
      <p>{{ $t('marketRule.deleteConfirmMessage') }}</p>
      <span slot="footer" class="dialog-footer">
        <el-button @click="visible = false">{{ $t('marketRule.cancel') }}</el-button>
        <el-button type="danger" @click="handleConfirm">{{ $t('marketRule.confirmDelete') }}</el-button>
      </span>
    </el-dialog>
  </template>
  
  <script>
  import { deleteMarketRuleCommunity } from '@/api/market/marketRuleApi'
  
  export default {
    name: 'DeleteMarketRuleCommunity',
    data() {
      return {
        visible: false,
        communityId: '',
        rcId:''
      }
    },
    methods: {
      open(data) {
        this.communityId = data.communityId
        this.rcId = data.rcId
        this.visible = true
      },
      async handleConfirm() {
        try {
          await deleteMarketRuleCommunity({ communityId: this.communityId , rcId: this.rcId})
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
32
          this.$message.success(this.$t('common.operationSuccess'))
31330681   wuxw   开发完成admin 营销规则
33
34
35
36
37
38
39
40
41
          this.visible = false
          this.$emit('success')
        } catch (error) {
          this.$message.error(error.message)
        }
      }
    }
  }
  </script>