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
7b0efbf0
Commit
7b0efbf0
authored
Mar 24, 2021
by
李耀琨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
a6f2ba8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
32 deletions
+100
-32
src/views/dashboard-kettle/components/appBulletFrame/tableInput.vue
+99
-31
src/views/dialogs-components/global/establish/main.vue
+1
-1
No files found.
src/views/dashboard-kettle/components/appBulletFrame/tableInput.vue
View file @
7b0efbf0
...
...
@@ -43,7 +43,7 @@
<el-button
size=
"mini"
>
向导
</el-button></el-col
>
<el-col
class=
"line"
:span=
"5"
>
<el-button
size=
"mini"
@
click=
"
SQLPopup(
)"
<el-button
size=
"mini"
@
click=
"
scanTree(''
)"
>
获取SQL查询语句
</el-button
></el-col
>
...
...
@@ -83,7 +83,7 @@
</el-form-item>
</el-form>
<!--
<el-dialog
title=
"数据库浏览"
:visible
.
sync=
"browsing"
...
...
@@ -101,12 +101,14 @@
<el-button
@
click=
"browsing = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"browsing = false"
>
确 定
</el-button>
</span>
</el-dialog>
</el-dialog>
-->
<estab-dialog
ref=
"establishDia"
:dialogVisibleFourth
.
sync=
'dialogVisibleFourth'
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
></estab-dialog>
<estab-dialog
ref=
"establishDia"
:dialogVisibleFourth
.
sync=
'dialogVisibleFourth'
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
:scanDialogVisible
.
sync=
'scanDialogVisible'
:form=
"newForm"
:chooseType=
"chooseType"
:chooseFlag
.
sync=
"chooseFlag"
></estab-dialog>
</div>
</
template
>
...
...
@@ -124,7 +126,8 @@ export default {
return
{
browsing
:
false
,
dialogVisibleFourth
:
false
,
scanDialogVisible
:
false
,
newForm
:{},
form
:
{
wLazyConversion
:
false
,
wVariables
:
false
,
...
...
@@ -138,23 +141,88 @@ export default {
children
:
"children"
,
label
:
"text"
,
},
dataBaseName
:
""
,
curNode
:{},
chooseType
:
""
,
chooseFlag
:
false
,
};
},
created
()
{
this
.
listDatabasesFun
();
},
// 监听编号好后获取选择的数据库的树形里列表
watch
:
{
dataBaseName
:{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
'obj changed'
);
if
(
newValue
){
this
.
$refs
.
establishDia
.
scanDialogOpen
();
this
.
chooseFlag
=
true
;
}
},
deep
:
true
},
// form(newValue, oldValue){
// this.form=newValue;
// }
},
methods
:
{
//获取新建弹窗返回来的值
getSonValue
(
res
){
if
(
typeof
(
res
)
==
'string'
){
this
.
dataBaseName
=
res
console
.
log
(
'接收子组件的值1111111----'
,
this
.
dataBaseName
);
}
else
if
(
typeof
(
res
)
==
'object'
){
console
.
log
(
'接收子组件的值55555----'
,
res
);
this
.
curNode
=
res
;
// DOM 更新后
// this.$nextTick(() => {
// this.form.text=this.curNode.data.text;
// // this.$refs.goal.values=this.curNode.data.text;
// // this.$refs.goal.refreshData(this.from)
// })
// this.$set(this.newForm,'text',this.curNode.data.text)
// this.$forceUpdate()
// this.form.text=this.curNode.data.text;
console
.
log
(
'chuanhuo====='
,
this
.
newForm
);
}
else
if
(
typeof
(
res
)
==
'boolean'
){
this
.
dialogVisibleFourth
=
res
;
console
.
log
(
'接收子组件的值2222222----'
,
this
.
dialogVisibleFourth
);
}
},
//浏览
scanTree
(
type
){
if
(
this
.
form
.
connection
){
this
.
$refs
.
establishDia
.
database
(
this
.
form
.
connection
);
console
.
log
(
'当前选中数据库***************'
,
this
.
form
.
connection
);
if
(
this
.
form
.
connection
){
this
.
$refs
.
establishDia
.
scanDialogOpen
();
this
.
chooseFlag
=
true
;
this
.
chooseType
=
type
;
}
}
else
{
this
.
$message
.
error
(
'请选择数据库'
)
}
},
//获取新建弹窗返回来的值
getSonValue
(
res
){
this
.
dialogVisibleFourth
=
res
;
this
.
linkCheckedIdx
=
this
.
initlinkTypeIdx
;
//关闭弹窗后初始化选择oracle数据
this
.
methodHoverIdx
=
0
;
//关闭弹窗后初始化选择oracle数据对应第一条
this
.
methodCheckedIdx
=
0
;
//关闭弹窗后初始化选择oracle数据对应第一条
// this.addFlag=true;//增减变量改为编辑变量
},
// getSonValue(res){
// this.dialogVisibleFourth=res;
// this.linkCheckedIdx=this.initlinkTypeIdx;//关闭弹窗后初始化选择oracle数据
// this.methodHoverIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// this.methodCheckedIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// // this.addFlag=true;//增减变量改为编辑变量
// },
//获取新建弹窗返回来的值
//查询已经建立的所有数据库列表
listNames
(){
...
...
@@ -223,28 +291,28 @@ let pam = new FormData(); // 创建form对象
},
loadNode
(
node
,
resolve
)
{
if
(
node
.
level
===
0
)
{
return
resolve
([{
name
:
'region'
}]);
}
if
(
node
.
level
>
this
.
PopupFrom
.
length
)
return
resolve
([]);
//
loadNode(node, resolve) {
//
if (node.level === 0) {
//
return resolve([{ name: 'region' }]);
//
}
//
if (node.level > this.PopupFrom.length) return resolve([]);
setTimeout
(()
=>
{
//
setTimeout(() => {
const
data
=
[{
//
const data = [{
name
:
'leaf'
,
leaf
:
true
},
{
name
:
'zone'
}];
resolve
(
data
);
},
500
);
},
//
name: 'leaf',
//
leaf: true
//
}, {
//
name: 'zone'
//
}];
//
resolve(data);
//
}, 500);
//
},
handleNodeClick
(
data
)
{
//
handleNodeClick(data) {
// console.log(data);
// let pam = new FormData(); // 创建form对象
// pam.append("databaseInfo", JSON.stringify(this.library));
...
...
@@ -256,7 +324,7 @@ let pam = new FormData(); // 创建form对象
// })
},
//
},
...
...
src/views/dialogs-components/global/establish/main.vue
View file @
7b0efbf0
...
...
@@ -456,7 +456,7 @@ export default {
}
console
.
log
(
"新的对象===="
,
newObject
);
this
.
createModel
=
newObject
;
this
.
$emit
(
"getSonValue"
,
this
.
createModel
);
//组件要传回父组件的值
this
.
$emit
(
"getSonValue"
,
this
.
createModel
.
name
);
//组件要传回父组件的值
console
.
log
(
"编辑赋值当前对象===="
,
this
.
createModel
);
this
.
accessData
();
//获取连接类型
},
...
...
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