Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ETL-admin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
莫晓莉
ETL-admin
Commits
f78ed2db
Commit
f78ed2db
authored
Apr 10, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库回显
parent
f25b3caa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
27 deletions
+21
-27
src/views/dialogs-components/global/database-choose/main.vue
+21
-27
No files found.
src/views/dialogs-components/global/database-choose/main.vue
View file @
f78ed2db
...
...
@@ -4,17 +4,11 @@
<el-row
:gutter=
"10"
>
<el-col
:span=
"14"
>
<!--
<el-select
style=
"width: 100%"
v-model=
"selectName"
placeholder=
"请选择选择数据库连接"
@
focus=
"clickFunc"
@
change=
"selectNameFunc"
>
<el-option
v-for=
"(item,index) in namesList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
-->
<el-select
style=
"width: 100%"
v-model=
"selectName"
placeholder=
"请选择选择数据库连接"
@
focus=
"getGraphDataBases"
>
<el-select
style=
"width: 100%"
v-model=
"form.connection"
placeholder=
"请选择选择数据库连接"
@
focus=
"getGraphDataBases"
>
<el-option
v-for=
"(item,index) in namesList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
<!--
<el-select
style=
"width: 100%"
v-model=
"selectName"
placeholder=
"请选择选择数据库连接"
@
focus=
"getGraphDataBases"
@
change=
"selectNameFunc"
>
<el-option
v-for=
"(item,index) in namesList"
:key=
"index"
:label=
"item.name"
:value=
"item"
></el-option>
</el-select>
-->
</el-col>
<el-col
class=
"line"
:span=
"3"
>
<el-button
size=
"mini"
@
click
.
native=
"editDataBaseModal()"
>
编辑
</el-button></el-col
...
...
@@ -30,7 +24,7 @@
<el-form-item
label=
"目的模式:"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"20"
>
<el-input
v-model=
"
newF
orm.schema"
></el-input>
<el-input
v-model=
"
f
orm.schema"
></el-input>
</el-col>
<el-col
class=
"line"
:span=
"3"
>
...
...
@@ -41,7 +35,7 @@
<el-form-item
label=
"目标表:"
prop=
"text"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"20"
>
<el-input
ref=
"goal"
v-model=
"
newF
orm.table"
></el-input>
<el-input
ref=
"goal"
v-model=
"
f
orm.table"
></el-input>
</el-col>
<el-col
class=
"line"
:span=
"3"
>
...
...
@@ -50,7 +44,7 @@
</el-row>
</el-form-item>
<estab-dialog
ref=
"establishDia"
:noneRespository=
"noneRespository"
:graph
.
sync=
"newGraph"
:getXmlVal=
"getXmlVal"
:form=
"
newF
orm"
:dialogVisibleFourth
.
sync=
'dialogVisibleFourth'
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
:chooseFlag
.
sync=
"chooseFlag"
:chooseType=
"chooseType"
></estab-dialog>
<estab-dialog
ref=
"establishDia"
:noneRespository=
"noneRespository"
:graph
.
sync=
"newGraph"
:getXmlVal=
"getXmlVal"
:form=
"
f
orm"
:dialogVisibleFourth
.
sync=
'dialogVisibleFourth'
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
:chooseFlag
.
sync=
"chooseFlag"
:chooseType=
"chooseType"
></estab-dialog>
</div>
</
template
>
...
...
@@ -83,11 +77,11 @@ export default {
noneRespository
:
1
,
//判断是保存画布还是传后台
dialogVisibleFourth
:
false
,
namesList
:[],
selectName
:
''
,
//当前选中的下拉框的数据
//
selectName:'',//当前选中的下拉框的数据
connectionName
:
''
,
curNode
:[],
chooseFlag
:
false
,
//选择模式
newForm
:{},
//
newForm:{},
chooseType
:
''
,
newGraph
:{}
}
...
...
@@ -102,7 +96,7 @@ export default {
props
:[
"form"
,
"getXmlVal"
,
"graph"
],
created
()
{
this
.
listNames
();
this
.
newForm
=
this
.
form
//
this.newForm = this.form
},
methods
:
{
clickFun
(
graph
){
...
...
@@ -120,21 +114,21 @@ export default {
// this.$refs.goal.refreshData(this.from)
if
(
this
.
chooseType
==
'表'
){
console
.
log
(
'进入表----'
,
res
);
this
.
$set
(
this
.
newF
orm
,
'table'
,
this
.
curNode
.
data
.
text
);
this
.
$set
(
this
.
f
orm
,
'table'
,
this
.
curNode
.
data
.
text
);
this
.
$forceUpdate
()
}
console
.
log
(
'this.curNode.data.leaf=====:'
,
this
.
curNode
.
data
.
leaf
);
if
(
this
.
chooseType
==
'模式'
&&
this
.
curNode
.
data
.
leaf
&&
this
.
curNode
.
parent
.
data
.
text
==
this
.
chooseType
){
console
.
log
(
'进入模式----'
,
res
);
this
.
$set
(
this
.
newF
orm
,
'schema'
,
this
.
curNode
.
data
.
text
);
this
.
$set
(
this
.
f
orm
,
'schema'
,
this
.
curNode
.
data
.
text
);
this
.
$forceUpdate
()
}
// this.$forceUpdate()
console
.
log
(
'chuanhuo====='
,
this
.
newF
orm
);
console
.
log
(
'chuanhuo====='
,
this
.
f
orm
);
// 发射回父组件
this
.
newForm
.
connection
=
this
.
selectName
;
this
.
$emit
(
"update:form"
,
this
.
newF
orm
);
this
.
form
.
connection
=
this
.
form
.
connection
;
this
.
$emit
(
"update:form"
,
this
.
f
orm
);
}
else
if
(
typeof
(
res
)
==
'boolean'
){
this
.
dialogVisibleFourth
=
res
;
...
...
@@ -168,9 +162,9 @@ export default {
//选择数据库编辑
selectNameFunc
(
e
){
console
.
log
(
'当前选中的数'
,
e
);
console
.
log
(
'当前选中的数-==='
,
this
.
selectName
);
this
.
selectName
=
this
.
se
this
.
newForm
.
connection
=
this
.
selectName
;
console
.
log
(
'当前选中的数-==='
,
this
.
form
.
connection
);
//
this.selectName=this.se
// this.form.connection=this.form.connection
;
},
//点击选择获取已经创建的数据库列表
clickFunc
(){
...
...
@@ -180,20 +174,20 @@ export default {
editDataBaseModal
(){
// this.$refs.establishDia.clickFun(this.newGraph);//先传画布
this
.
$refs
.
establishDia
.
clickFun
(
this
.
graph
);
//先把画布传过去
if
(
this
.
selectName
){
if
(
this
.
form
.
connection
){
this
.
dialogVisibleFourth
=
true
;
}
// this.$refs.establishDia.database(this.selectName);
this
.
$refs
.
establishDia
.
getTransDatabase
(
this
.
selectName
);
this
.
$refs
.
establishDia
.
getTransDatabase
(
this
.
form
.
connection
);
this
.
$refs
.
establishDia
.
accessMethod
();
//获取连接方式
},
//浏览
scanTree
(
type
){
console
.
log
(
'当前选中链接***************'
,
this
.
selectName
);
console
.
log
(
'当前选中链接***************'
,
this
.
form
.
selectName
);
this
.
chooseType
=
type
;
if
(
this
.
selectName
){
if
(
this
.
form
.
connection
){
// this.$refs.establishDia.database(this.selectName);
this
.
$refs
.
establishDia
.
getTransDatabase
(
this
.
selectName
);
this
.
$refs
.
establishDia
.
getTransDatabase
(
this
.
form
.
connection
);
console
.
log
(
'当前选中数据库***************'
,
this
.
connectionName
);
if
(
this
.
connectionName
){
//判断后台有数据发射回来后再调用弹窗不然不显示树数据或者加载数据延迟
this
.
$refs
.
establishDia
.
scanDialogOpen
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment