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