变量初始化
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
-- ==导出注意==
|
-- 每次发版时注意事项 ---
|
||||||
-- 1. datetime(0) 低版本不支持此语法,改为datetime
|
-- 1. datetime(0) 低版本不支持此语法,改为datetime
|
||||||
-- 2. utf8mb4 低版本不支持此字符集,改为utf8
|
-- 2. utf8mb4 低版本不支持此字符集,改为utf8
|
||||||
-- 3. 加字段后记得排查是否有insert语句,需要同步修改
|
-- 3. 加字段后记得排查是否有insert语句,需要同步修改
|
||||||
|
|||||||
@@ -191,11 +191,13 @@
|
|||||||
},
|
},
|
||||||
addDatasource() {
|
addDatasource() {
|
||||||
this.datasourceDialogVisible = true;
|
this.datasourceDialogVisible = true;
|
||||||
|
this.testDatasourceErrLoading = false;
|
||||||
this.newDatasource = {name: "", driverClassName: "", sourceUrl: "", sourceName: "", sourcePassword: "", groupName: ""};
|
this.newDatasource = {name: "", driverClassName: "", sourceUrl: "", sourceName: "", sourcePassword: "", groupName: ""};
|
||||||
},
|
},
|
||||||
editDatasource(row) {
|
editDatasource(row) {
|
||||||
this.newDatasource = JSON.parse(JSON.stringify(row));
|
this.newDatasource = JSON.parse(JSON.stringify(row));
|
||||||
this.datasourceDialogVisible = true;
|
this.datasourceDialogVisible = true;
|
||||||
|
this.testDatasourceErrLoading = false;
|
||||||
},
|
},
|
||||||
deleteDatasource(row) {
|
deleteDatasource(row) {
|
||||||
this.$confirm('确定要删除此数据源吗?', '提示', {
|
this.$confirm('确定要删除此数据源吗?', '提示', {
|
||||||
@@ -220,16 +222,20 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
testDatasource() {
|
testDatasource() {
|
||||||
this.testDatasourceErrLoading = true;
|
this.testDatasourceErrLoading = true;
|
||||||
datasourceApi.queryTestDatasource(this.newDatasource).then(res => {
|
datasourceApi.queryTestDatasource(this.newDatasource).then(res => {
|
||||||
this.testDatasourceErrLoading = false;
|
this.testDatasourceErrLoading = false;
|
||||||
if (res.errCode == 200) {
|
if (res.errCode == 200) {
|
||||||
this.$message.success("连接成功!");
|
this.$message.success("连接成功!");
|
||||||
} else {
|
} else {
|
||||||
this.testDatasourceErrVisible = true;
|
this.testDatasourceErrVisible = true;
|
||||||
this.testDatasourceErrInfo = res.errMsg || '';
|
this.testDatasourceErrInfo = res.errMsg || '';
|
||||||
}
|
}
|
||||||
});
|
}).catch(err => {
|
||||||
|
this.testDatasourceErrLoading = false;
|
||||||
|
this.testDatasourceErrVisible = true;
|
||||||
|
this.testDatasourceErrInfo = err.message || '请求出错';
|
||||||
|
});
|
||||||
},
|
},
|
||||||
driverClassNameChange() {
|
driverClassNameChange() {
|
||||||
if (this.newDatasource.driverClassName == 'com.mysql.jdbc.Driver') {
|
if (this.newDatasource.driverClassName == 'com.mysql.jdbc.Driver') {
|
||||||
|
|||||||
Reference in New Issue
Block a user