4444 <el-form-item label =" Database" >
4545 <el-input v-model =" config.database" />
4646 </el-form-item >
47+ <el-form-item label =" Extra JDBC String" >
48+ <el-input v-model =" config.extraJdbc" />
49+ </el-form-item >
4750 </el-form >
4851 </div >
4952 <div v-show =" active === 2" class =" container" >
@@ -106,6 +109,7 @@ const config = ref<any>({
106109 username:' ' ,
107110 password:' ' ,
108111 database:' ' ,
112+ extraJdbc:' '
109113})
110114
111115const close = () => {
@@ -133,6 +137,7 @@ const open = (item: any, editTable: boolean = false) => {
133137 config .value .username = configuration .username
134138 config .value .password = configuration .password
135139 config .value .database = configuration .database
140+ config .value .extraJdbc = configuration .extraJdbc
136141 }
137142
138143 if (editTable ) {
@@ -165,6 +170,7 @@ const open = (item: any, editTable: boolean = false) => {
165170 username:' ' ,
166171 password:' ' ,
167172 database:' ' ,
173+ extraJdbc:' ' ,
168174 }
169175 }
170176 dialogVisible .value = true
@@ -178,13 +184,7 @@ const save = async(formEl: FormInstance | undefined) => {
178184 .filter ((ele : any ) => {return checkList .value .includes (ele .tableName )})
179185 .map ((ele : any ) => {return {" table_name" : ele .tableName , " table_comment" : ele .tableComment }})
180186
181- form .value .configuration = encrypted (JSON .stringify ({
182- host:config .value .host ,
183- port:config .value .port ,
184- username:config .value .username ,
185- password:config .value .password ,
186- database:config .value .database
187- }))
187+ buildConf ()
188188 if (form .value .id ) {
189189 if (! isEditTable .value ) {
190190 // only update datasource config info
@@ -217,7 +217,8 @@ const buildConf = () => {
217217 port:config .value .port ,
218218 username:config .value .username ,
219219 password:config .value .password ,
220- database:config .value .database
220+ database:config .value .database ,
221+ extraJdbc:config .value .extraJdbc
221222 }))
222223}
223224
0 commit comments