|
|
@@ -98,20 +98,23 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
deleteRule(index) {
|
|
|
- //取数据item.id
|
|
|
- const id = this.rules[index].id;
|
|
|
- if(id) {
|
|
|
- this.deleteHbRule({id: id}).then(res => {
|
|
|
- if(res.code == 1) {
|
|
|
- this.$msg('删除成功');
|
|
|
- this.rules.splice(index, 1);
|
|
|
- } else {
|
|
|
- this.$msg(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.rules.splice(index, 1);
|
|
|
- }
|
|
|
+ //确认提示
|
|
|
+ this.$util.confirmModal({title: '提示', content: '确定删除该规则吗?'},() => {
|
|
|
+ //取数据item.id
|
|
|
+ const id = this.rules[index].id;
|
|
|
+ if(id) {
|
|
|
+ deleteHbRule({id: id}).then(res => {
|
|
|
+ if(res.code == 1) {
|
|
|
+ this.$msg('删除成功');
|
|
|
+ this.rules.splice(index, 1);
|
|
|
+ } else {
|
|
|
+ this.$msg(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.rules.splice(index, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
cancel() {
|
|
|
uni.navigateBack();
|