This commit is contained in:
parent
a64760e72d
commit
98f955a74e
|
@ -125,13 +125,13 @@
|
||||||
},
|
},
|
||||||
testConnection(formInline) {
|
testConnection(formInline) {
|
||||||
let param = {
|
let param = {
|
||||||
"meter.host": this.formInline.host,
|
"smtp.server": this.formInline.host,
|
||||||
"meter.port": this.formInline.port,
|
"smtp.port": this.formInline.port,
|
||||||
"meter.account": this.formInline.account,
|
"smtp.account": this.formInline.account,
|
||||||
"meter.password": this.formInline.password,
|
"smtp.password": this.formInline.password,
|
||||||
"meter.ssl": this.SSL,
|
"smtp.ssl": this.SSL,
|
||||||
"meter.tls": this.TLS,
|
"smtp.tls": this.TLS,
|
||||||
"meter.smtp": this.SMTP,
|
"smtp.smtp": this.SMTP,
|
||||||
};
|
};
|
||||||
this.$refs[formInline].validate((valid) => {
|
this.$refs[formInline].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -140,8 +140,10 @@
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.$success(this.$t('commons.connection_successful'));
|
this.$success(this.$t('commons.connection_successful'));
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(this.$t('commons.connection_failed'));
|
this.$error(this.$t('commons.connection_failed'));
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$info(this.$t('commons.connection_failed'));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -160,13 +162,13 @@
|
||||||
this.showSave = false;
|
this.showSave = false;
|
||||||
this.show = true;
|
this.show = true;
|
||||||
let param = [
|
let param = [
|
||||||
{paramKey: "meter.host", paramValue: this.formInline.host, type: "text", sort: 1},
|
{paramKey: "smtp.host", paramValue: this.formInline.host, type: "text", sort: 1},
|
||||||
{paramKey: "meter.port", paramValue: this.formInline.port, type: "text", sort: 2},
|
{paramKey: "smtp.port", paramValue: this.formInline.port, type: "text", sort: 2},
|
||||||
{paramKey: "meter.account", paramValue: this.formInline.account, type: "text", sort: 3},
|
{paramKey: "smtp.account", paramValue: this.formInline.account, type: "text", sort: 3},
|
||||||
{paramKey: "meter.password", paramValue: this.formInline.password, type: "password", sort: 4},
|
{paramKey: "smtp.password", paramValue: this.formInline.password, type: "password", sort: 4},
|
||||||
{paramKey: "meter.ssl", paramValue: this.SSL, type: "text", sort: 5},
|
{paramKey: "smtp.ssl", paramValue: this.SSL, type: "text", sort: 5},
|
||||||
{paramKey: "meter.tls", paramValue: this.TLS, type: "text", sort: 6},
|
{paramKey: "smtp.tls", paramValue: this.TLS, type: "text", sort: 6},
|
||||||
{paramKey: "meter.smtp", paramValue: this.SMTP, type: "text", sort: 7}
|
{paramKey: "smtp.smtp", paramValue: this.SMTP, type: "text", sort: 7}
|
||||||
]
|
]
|
||||||
|
|
||||||
this.$refs[formInline].validate(valid => {
|
this.$refs[formInline].validate(valid => {
|
||||||
|
|
Loading…
Reference in New Issue