Blame view

src/components/resource/deleteResourceStoreSpecification.vue 1.35 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
66eb78ed   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
    <el-dialog
      :title="$t('resourceStoreSpecificationManage.confirmDeleteTitle')"
      :visible.sync="visible"
      width="30%">
      <div style="text-align: center; margin-bottom: 20px;">
        <p>{{ $t('resourceStoreSpecificationManage.confirmDeleteMsg') }}</p>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="visible = false">
          {{ $t('resourceStoreSpecificationManage.cancelDelete') }}
        </el-button>
        <el-button type="danger" @click="confirmDelete">
          {{ $t('resourceStoreSpecificationManage.confirmDelete') }}
        </el-button>
      </div>
    </el-dialog>
  </template>
  
  <script>
  import { deleteResourceStoreSpecification } from '@/api/resource/resourceStoreSpecificationManageApi'
  
  export default {
    name: 'DeleteResourceStoreSpecification',
    data() {
      return {
        visible: false,
        rssId: ''
      }
    },
    methods: {
      open(row) {
        this.rssId = row.rssId
        this.visible = true
      },
      
      async confirmDelete() {
        try {
          await deleteResourceStoreSpecification(this.rssId)
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
40
          this.$message.success(this.$t('common.operationSuccess'))
66eb78ed   wuxw   开发采购功能
41
42
43
44
45
46
47
48
49
50
          this.visible = false
          this.$emit('success')
        } catch (error) {
          console.error('Failed to delete specification:', error)
          this.$message.error(this.$t('common.deleteFailed'))
        }
      }
    }
  }
  </script>