没有选择行内数据时,增家提示消息

This commit is contained in:
renpy 2023-07-28 17:18:28 +08:00
parent 5365c497e6
commit d8cf8b6eb7
3 changed files with 123 additions and 96 deletions

View File

@ -293,6 +293,7 @@ export default {
this.visible = true
},
onEdit() {
if (this.currentId) {
this.isAdd = false
this.visible = true
getAction("/sysDatabase/findInfo", {id:this.currentId}).then(res => {
@ -309,8 +310,12 @@ export default {
this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
this.$message.info("Please select a piece of data")
}
},
onDelete() {
if (this.currentId) {
let _this = this
this.$confirm({
title: 'Are you sure to delete this item?',
@ -318,6 +323,7 @@ export default {
deleteAction("/sysDatabase/deleteById", {id:_this.currentId}).then(res => {
if (res.success) {
_this.$message.success("success")
this.currentId=""
_this.getSysDatabase()
} else {
_this.$message.warning("This operation fails. Contact your system administrator")
@ -328,6 +334,9 @@ export default {
console.log('Cancel');
},
});
} else {
this.$message.info("Please select a piece of data")
}
},
onRowClick(record) {
this.currentId = record.id

View File

@ -314,6 +314,7 @@ export default {
this.visible = true
},
onEdit() {
if (this.currentId) {
this.isAdd = false
this.visible = true
getAction("/sysEmail/findInfo", {id:this.currentId}).then(res => {
@ -331,8 +332,12 @@ export default {
this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
this.$message.info("Please select a piece of data")
}
},
onDelete() {
if (this.currentId) {
let _this = this
this.$confirm({
title: 'Are you sure to delete this item?',
@ -340,6 +345,7 @@ export default {
deleteAction("/sysEmail/deleteById", {id:_this.currentId}).then(res => {
if (res.success) {
_this.$message.success("success")
this.currentId=""
_this.getSysEmail()
} else {
_this.$message.warning("This operation fails. Contact your system administrator")
@ -350,6 +356,9 @@ export default {
console.log('Cancel');
},
});
} else {
this.$message.info("Please select a piece of data")
}
},
onRowClick(record) {
console.log(record);

View File

@ -235,6 +235,7 @@ export default {
this.visible = true
},
onEdit() {
if (this.currentId) {
this.isAdd = false
this.visible = true
getAction("/sysServer/findInfo", {id:this.currentId}).then(res => {
@ -247,8 +248,12 @@ export default {
this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
this.$message.info("Please select a piece of data")
}
},
onDelete() {
if (this.currentId) {
let _this = this
this.$confirm({
title: 'Are you sure to delete this item?',
@ -256,6 +261,7 @@ export default {
deleteAction("/sysServer/deleteById", {id:_this.currentId}).then(res => {
if (res.success) {
_this.$message.success("success")
_this.currentId = ""
_this.getSysServer()
} else {
_this.$message.warning("This operation fails. Contact your system administrator")
@ -266,6 +272,9 @@ export default {
console.log('Cancel');
},
});
} else {
this.$message.info("Please select a piece of data")
}
},
onRowClick(record) {
this.currentId = record.id