6ec243d6
wuxw
v1.9 点击提交后,成功提示没有...
|
1
|
<template>
|
1d73dc48
wuxw
继续晚上巡检功能
|
2
3
|
<el-dialog
:title="$t('deleteInspectionPoint.title')"
|
48ea9c43
wuxw
巡检开发完成
|
4
|
:visible.sync="dialogVisible"
|
1d73dc48
wuxw
继续晚上巡检功能
|
5
|
width="30%"
|
48ea9c43
wuxw
巡检开发完成
|
6
|
center
|
1d73dc48
wuxw
继续晚上巡检功能
|
7
|
>
|
48ea9c43
wuxw
巡检开发完成
|
8
9
10
11
12
13
14
15
16
17
|
<div class="text-center">
<i class="el-icon-warning" style="font-size: 80px; color: #e6a23c;"></i>
<p style="font-size: 18px; margin: 20px 0;">
{{ $t('deleteInspectionPoint.confirmText') }}
</p>
<p style="font-size: 16px; color: #409EFF; font-weight: bold;">
{{ deleteInspectionPointInfo.inspectionName }}
</p>
</div>
|
1d73dc48
wuxw
继续晚上巡检功能
|
18
|
<span slot="footer" class="dialog-footer">
|
48ea9c43
wuxw
巡检开发完成
|
19
20
|
<el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button>
<el-button type="danger" @click="deleteInspectionPoint">{{ $t('common.confirm') }}</el-button>
|
1d73dc48
wuxw
继续晚上巡检功能
|
21
22
23
24
25
|
</span>
</el-dialog>
</template>
<script>
|
48ea9c43
wuxw
巡检开发完成
|
26
|
import { deleteInspectionPoint } from '@/api/inspection/inspectionPointApi'
|
1d73dc48
wuxw
继续晚上巡检功能
|
27
28
29
30
31
32
|
import { getCommunityId } from '@/api/community/communityApi'
export default {
name: 'DeleteInspectionPoint',
data() {
return {
|
48ea9c43
wuxw
巡检开发完成
|
33
34
35
36
37
38
39
|
dialogVisible: false,
deleteInspectionPointInfo: {
inspectionId: '',
inspectionName: '',
communityId: ''
},
communityId: ''
|
1d73dc48
wuxw
继续晚上巡检功能
|
40
41
|
}
},
|
48ea9c43
wuxw
巡检开发完成
|
42
43
44
|
created() {
this.communityId = getCommunityId()
},
|
1d73dc48
wuxw
继续晚上巡检功能
|
45
|
methods: {
|
48ea9c43
wuxw
巡检开发完成
|
46
47
48
49
50
51
52
|
open(inspectionPoint) {
this.dialogVisible = true
this.deleteInspectionPointInfo = {
inspectionId: inspectionPoint.inspectionId,
inspectionName: inspectionPoint.inspectionName,
communityId: this.communityId
}
|
1d73dc48
wuxw
继续晚上巡检功能
|
53
54
|
},
|
48ea9c43
wuxw
巡检开发完成
|
55
|
async deleteInspectionPoint() {
|
1d73dc48
wuxw
继续晚上巡检功能
|
56
|
try {
|
48ea9c43
wuxw
巡检开发完成
|
57
58
59
|
const response = await deleteInspectionPoint(this.deleteInspectionPointInfo)
if (response.code === 0) {
|
6ec243d6
wuxw
v1.9 点击提交后,成功提示没有...
|
60
|
this.$message.success(this.$t('common.operationSuccess'))
|
48ea9c43
wuxw
巡检开发完成
|
61
62
63
64
65
|
this.dialogVisible = false
this.$emit('success')
} else {
this.$message.error(response.msg || this.$t('deleteInspectionPoint.deleteFailed'))
}
|
1d73dc48
wuxw
继续晚上巡检功能
|
66
67
|
} catch (error) {
console.error('删除巡检点失败:', error)
|
48ea9c43
wuxw
巡检开发完成
|
68
|
this.$message.error(this.$t('deleteInspectionPoint.deleteFailed'))
|
1d73dc48
wuxw
继续晚上巡检功能
|
69
70
71
72
|
}
}
}
}
|
48ea9c43
wuxw
巡检开发完成
|
73
74
75
76
77
78
79
|
</script>
<style scoped>
.text-center {
text-align: center;
}
</style>
|