没有选择行内数据时,增家提示消息
This commit is contained in:
parent
5365c497e6
commit
d8cf8b6eb7
|
@ -293,41 +293,50 @@ export default {
|
|||
this.visible = true
|
||||
},
|
||||
onEdit() {
|
||||
this.isAdd = false
|
||||
this.visible = true
|
||||
getAction("/sysDatabase/findInfo", {id:this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
this.form.setFieldsValue({
|
||||
username: res.result.username,
|
||||
password: res.result.password,
|
||||
name: res.result.name,
|
||||
type: res.result.type,
|
||||
port: res.result.port,
|
||||
ipAddress: res.result.ipAddress
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
if (this.currentId) {
|
||||
this.isAdd = false
|
||||
this.visible = true
|
||||
getAction("/sysDatabase/findInfo", {id:this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
this.form.setFieldsValue({
|
||||
username: res.result.username,
|
||||
password: res.result.password,
|
||||
name: res.result.name,
|
||||
type: res.result.type,
|
||||
port: res.result.port,
|
||||
ipAddress: res.result.ipAddress
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.info("Please select a piece of data")
|
||||
}
|
||||
},
|
||||
onDelete() {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Are you sure to delete this item?',
|
||||
onOk() {
|
||||
deleteAction("/sysDatabase/deleteById", {id:_this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
_this.$message.success("success")
|
||||
_this.getSysDatabase()
|
||||
} else {
|
||||
_this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
console.log('Cancel');
|
||||
},
|
||||
});
|
||||
if (this.currentId) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Are you sure to delete this item?',
|
||||
onOk() {
|
||||
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")
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
console.log('Cancel');
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.info("Please select a piece of data")
|
||||
}
|
||||
},
|
||||
onRowClick(record) {
|
||||
this.currentId = record.id
|
||||
|
|
|
@ -314,42 +314,51 @@ export default {
|
|||
this.visible = true
|
||||
},
|
||||
onEdit() {
|
||||
this.isAdd = false
|
||||
this.visible = true
|
||||
getAction("/sysEmail/findInfo", {id:this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
this.form.setFieldsValue({
|
||||
name: res.result.username,
|
||||
emailServerAddress: res.result.emailServerAddress,
|
||||
username: res.result.username,
|
||||
password: res.result.password,
|
||||
emilType: res.result.emilType,
|
||||
enabled: res.result.enabled,
|
||||
port: res.result.port
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
if (this.currentId) {
|
||||
this.isAdd = false
|
||||
this.visible = true
|
||||
getAction("/sysEmail/findInfo", {id:this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
this.form.setFieldsValue({
|
||||
name: res.result.username,
|
||||
emailServerAddress: res.result.emailServerAddress,
|
||||
username: res.result.username,
|
||||
password: res.result.password,
|
||||
emilType: res.result.emilType,
|
||||
enabled: res.result.enabled,
|
||||
port: res.result.port
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.info("Please select a piece of data")
|
||||
}
|
||||
},
|
||||
onDelete() {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Are you sure to delete this item?',
|
||||
onOk() {
|
||||
deleteAction("/sysEmail/deleteById", {id:_this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
_this.$message.success("success")
|
||||
_this.getSysEmail()
|
||||
} else {
|
||||
_this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
console.log('Cancel');
|
||||
},
|
||||
});
|
||||
if (this.currentId) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Are you sure to delete this item?',
|
||||
onOk() {
|
||||
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")
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
console.log('Cancel');
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.info("Please select a piece of data")
|
||||
}
|
||||
},
|
||||
onRowClick(record) {
|
||||
console.log(record);
|
||||
|
|
|
@ -235,37 +235,46 @@ export default {
|
|||
this.visible = true
|
||||
},
|
||||
onEdit() {
|
||||
this.isAdd = false
|
||||
this.visible = true
|
||||
getAction("/sysServer/findInfo", {id:this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
this.form.setFieldsValue({
|
||||
name: res.result.name,
|
||||
ipAddress: res.result.ipAddress
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
if (this.currentId) {
|
||||
this.isAdd = false
|
||||
this.visible = true
|
||||
getAction("/sysServer/findInfo", {id:this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
this.form.setFieldsValue({
|
||||
name: res.result.name,
|
||||
ipAddress: res.result.ipAddress
|
||||
});
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.info("Please select a piece of data")
|
||||
}
|
||||
},
|
||||
onDelete() {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Are you sure to delete this item?',
|
||||
onOk() {
|
||||
deleteAction("/sysServer/deleteById", {id:_this.currentId}).then(res => {
|
||||
if (res.success) {
|
||||
_this.$message.success("success")
|
||||
_this.getSysServer()
|
||||
} else {
|
||||
_this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
console.log('Cancel');
|
||||
},
|
||||
});
|
||||
if (this.currentId) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
title: 'Are you sure to delete this item?',
|
||||
onOk() {
|
||||
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")
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
console.log('Cancel');
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.info("Please select a piece of data")
|
||||
}
|
||||
},
|
||||
onRowClick(record) {
|
||||
this.currentId = record.id
|
||||
|
|
Loading…
Reference in New Issue
Block a user