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
4febc18a
Commit
4febc18a
authored
Mar 31, 2021
by
zlr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改etlweb路径配置,显示图标
parent
d9f1394f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
180 additions
and
170 deletions
+180
-170
src/assets/styles/index.scss
+1
-1
src/main.js
+3
-1
src/views/dashboard-kettle/components/designer/modules/node.vue
+1
-1
src/views/dashboard-kettle/components/designer/modules/node_menu.vue
+12
-13
src/views/dashboard-kettle/components/designer/modules/node_menu2.vue
+5
-3
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+27
-17
src/views/dialogs-components/global/export-tree/main.vue
+8
-9
src/views/dialogs-components/global/in-repository/main.vue
+16
-17
src/views/kettle/home2.vue
+106
-107
src/views/kettle/toolbar.js
+1
-1
No files found.
src/assets/styles/index.scss
View file @
4febc18a
...
@@ -581,7 +581,7 @@ aside {
...
@@ -581,7 +581,7 @@ aside {
//
//
$svgUrl
:
'http://192.168.0.
2
:9888/ETLWEB-SERVER/etlweb'
;
$svgUrl
:
'http://192.168.0.
44
:9888/ETLWEB-SERVER/etlweb'
;
// $svgUrl:'http://192.168.0.44:9888/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.44:9888/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.44:9882/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.44:9882/ETLWEB-SERVER/etlweb';
// .schema { background-image: url($svgUrl/ui/images/schema.svg?scale=16) !important;}
// .schema { background-image: url($svgUrl/ui/images/schema.svg?scale=16) !important;}
...
...
src/main.js
View file @
4febc18a
...
@@ -65,7 +65,7 @@ new Vue({
...
@@ -65,7 +65,7 @@ new Vue({
router
,
router
,
store
,
store
,
render
:
h
=>
h
(
App
)
render
:
h
=>
h
(
App
)
})
})
...
@@ -75,6 +75,8 @@ import * as R from 'ramda'
...
@@ -75,6 +75,8 @@ import * as R from 'ramda'
Vue
.
prototype
.
R
=
R
Vue
.
prototype
.
R
=
R
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
const
baseUrl
=
process
.
env
.
VUE_APP_BASE_API
===
'/'
?
''
:
process
.
env
.
VUE_APP_BASE_API
Vue
.
prototype
.
etlWeb
=
baseUrl
+
"ETLWEB-SERVER/etlweb/"
new
Vue
({
new
Vue
({
router
,
router
,
...
...
src/views/dashboard-kettle/components/designer/modules/node.vue
View file @
4febc18a
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
prefix
:
'http://192.168.0.44:9882/etlweb/'
,
prefix
:
this
.
etlWeb
,
}
}
},
},
computed
:
{
computed
:
{
...
...
src/views/dashboard-kettle/components/designer/modules/node_menu.vue
View file @
4febc18a
<
template
>
<
template
>
<div
class=
"flow-menu"
ref=
"tool"
>
<div
class=
"flow-menu"
ref=
"tool"
>
<!--
<div
v-for=
"menu in menuList"
:key=
"menu.id"
>
-->
<!--
<div
v-for=
"menu in menuList"
:key=
"menu.id"
>
-->
<!--
<span
class=
"ef-node-pmenu"
@
click=
"menu.open = !menu.open"
>
<!--
<span
class=
"ef-node-pmenu"
@
click=
"menu.open = !menu.open"
>
<i
:class=
"
{'el-icon-caret-bottom': menu.open,'el-icon-caret-right': !menu.open}">
</i>
<i
:class=
"
{'el-icon-caret-bottom': menu.open,'el-icon-caret-right': !menu.open}">
</i>
{{
menu
.
name
}}
{{
menu
.
name
}}
</span>
-->
</span>
-->
<!--
<!--
<ul
v-show=
"menu.open"
class=
"ef-node-menu-ul"
>
<ul
v-show=
"menu.open"
class=
"ef-node-menu-ul"
>
<draggable
<draggable
@
end=
"end"
@
end=
"end"
...
@@ -59,12 +59,11 @@
...
@@ -59,12 +59,11 @@
<!--
<span
class=
"custom-tree-node"
slot-scope=
"
{node,data}">
<!--
<span
class=
"custom-tree-node"
slot-scope=
"
{node,data}">
<span>
<span>
<i
:class=
"data.icon"
></i>
{{
node
.
label
}}
<i
:class=
"data.icon"
></i>
{{
node
.
label
}}
</span>
</span>
</span>
-->
</span>
-->
<span
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span>
<span>
<img
:src=
"prefix+data.icon"
style=
"width:20px"
width=
""
alt=
""
>
<img
:src=
"prefix+data.icon"
style=
"width:20px"
width=
""
alt=
""
>
{{
node
.
label
}}
{{
node
.
label
}}
</span>
</span>
...
@@ -88,7 +87,7 @@ export default {
...
@@ -88,7 +87,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
// prefix:'http://192.168.0.2:9700/etlweb/',
// prefix:'http://192.168.0.2:9700/etlweb/',
prefix
:
'http://192.168.0.44:9882/etlweb/'
,
prefix
:
this
.
etlWeb
,
// 测试数据开始=====
// 测试数据开始=====
jobTreeList
:
[
jobTreeList
:
[
{
{
...
@@ -172,12 +171,12 @@ export default {
...
@@ -172,12 +171,12 @@ export default {
type
:
"group"
,
type
:
"group"
,
name
:
"基础节点"
,
name
:
"基础节点"
,
ico
:
"el-icon-video-play"
,
ico
:
"el-icon-video-play"
,
open
:
true
,
open
:
true
,
children
:
[
children
:
[
{
{
id
:
"01"
,
id
:
"01"
,
type
:
"start"
,
type
:
"start"
,
name
:
"没了"
,
name
:
"没了"
,
ico
:
"el-icon-caret-right"
,
ico
:
"el-icon-caret-right"
,
// 自定义覆盖样式
// 自定义覆盖样式
style
:
{},
style
:
{},
...
@@ -301,15 +300,15 @@ export default {
...
@@ -301,15 +300,15 @@ export default {
},
},
stepsFun
()
{
stepsFun
()
{
let
pamer
=
new
FormData
();
// 创建form对象
let
pamer
=
new
FormData
();
// 创建form对象
pamer
.
append
(
"node"
,
"xnode-12"
);
pamer
.
append
(
"node"
,
"xnode-12"
);
this
.
$forceUpdate
();
this
.
$forceUpdate
();
steps
(
pamer
).
then
((
res
)
=>
{
steps
(
pamer
).
then
((
res
)
=>
{
this
.
jobTreeList
=
res
this
.
jobTreeList
=
res
console
.
log
(
this
.
menuList
,
res
[
0
]);
console
.
log
(
this
.
menuList
,
res
[
0
]);
});
});
},
},
...
@@ -400,7 +399,7 @@ export default {
...
@@ -400,7 +399,7 @@ export default {
console
.
log
(
"树形拖拽开始2:==="
,
event
);
console
.
log
(
"树形拖拽开始2:==="
,
event
);
var
type
=
Node
.
data
.
type
;
var
type
=
Node
.
data
.
type
;
this
.
nodeMenu
=
this
.
getMenuByType
(
type
);
this
.
nodeMenu
=
this
.
getMenuByType
(
type
);
},
},
handleDragend
(
draggingNode
,
endNode
,
position
,
event
)
{
handleDragend
(
draggingNode
,
endNode
,
position
,
event
)
{
...
...
src/views/dashboard-kettle/components/designer/modules/node_menu2.vue
View file @
4febc18a
...
@@ -11,10 +11,11 @@
...
@@ -11,10 +11,11 @@
class=
"custom-tree-node"
class=
"custom-tree-node"
:key-id=
"data.children ? '' : 123"
:key-id=
"data.children ? '' : 123"
:id=
"data.id"
:id=
"data.id"
:icon=
"data.icon"
:icon=
"
prefix+
data.icon"
:pluginId=
"data.pluginId"
:pluginId=
"data.pluginId"
>
>
{{
data
.
text
}}
<img
:src=
"prefix+data.icon"
style=
"width:20px"
width=
""
alt=
""
>
{{
data
.
text
}}
</div>
</div>
</div>
</div>
</el-tree>
</el-tree>
...
@@ -34,6 +35,7 @@ export default {
...
@@ -34,6 +35,7 @@ export default {
pluginId
:
"pluginId"
,
pluginId
:
"pluginId"
,
},
},
data
:
[],
data
:
[],
prefix
:
this
.
etlWeb
};
};
},
},
components
:
{},
components
:
{},
...
@@ -41,7 +43,7 @@ export default {
...
@@ -41,7 +43,7 @@ export default {
this
.
stepsFun
()
this
.
stepsFun
()
},
},
mounted
()
{
mounted
()
{
},
},
beforeUpdate
(){
beforeUpdate
(){
this
.
$emit
(
'shooStatus'
,
true
)
this
.
$emit
(
'shooStatus'
,
true
)
...
...
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
4febc18a
...
@@ -883,7 +883,7 @@ export default {
...
@@ -883,7 +883,7 @@ export default {
// type: Boolean,
// type: Boolean,
// default: false,
// default: false,
// },
// },
// },
// },
props
:
[
"blankCanvas"
],
//从父组件传过来的值
props
:
[
"blankCanvas"
],
//从父组件传过来的值
...
@@ -1158,7 +1158,7 @@ export default {
...
@@ -1158,7 +1158,7 @@ export default {
decode
(
graphXml
,
graph
)
{
decode
(
graphXml
,
graph
)
{
window
[
"mxGraphModel"
]
=
mxGraphModel
;
window
[
"mxGraphModel"
]
=
mxGraphModel
;
window
[
"mxGeometry"
]
=
mxGeometry
;
window
[
"mxGeometry"
]
=
mxGeometry
;
// const xmlDocument = mxUtils.parseXml(graphXml);
// const xmlDocument = mxUtils.parseXml(graphXml);
// const decoder = new mxCodec(xmlDocument);
// const decoder = new mxCodec(xmlDocument);
// const node = xmlDocument.documentElement;
// const node = xmlDocument.documentElement;
...
@@ -1168,7 +1168,7 @@ export default {
...
@@ -1168,7 +1168,7 @@ export default {
var
node
=
enc
.
encode
(
graph
.
getModel
());
var
node
=
enc
.
encode
(
graph
.
getModel
());
console
.
log
(
mxUtils
.
getPrettyXml
(
node
));
console
.
log
(
mxUtils
.
getPrettyXml
(
node
));
return
mxUtils
.
getPrettyXml
(
node
);
return
mxUtils
.
getPrettyXml
(
node
);
},
},
//初始化画布
//初始化画布
...
@@ -1267,6 +1267,18 @@ export default {
...
@@ -1267,6 +1267,18 @@ export default {
const
{
width
,
height
}
=
toolItem
;
const
{
width
,
height
}
=
toolItem
;
const
parent
=
this
.
graph
.
getDefaultParent
();
const
parent
=
this
.
graph
.
getDefaultParent
();
this
.
graph
.
getModel
().
beginUpdate
();
this
.
graph
.
getModel
().
beginUpdate
();
const
styleObj
=
{
fillColor
:
'transparent'
,
strokeColor
:
'#000000'
,
strokeWidth
:
'1'
,
shape
:
mxConstants
.
SHAPE_LABEL
,
align
:
mxConstants
.
ALIGN_CENTER
,
verticalAlign
:
mxConstants
.
ALIGN_BOTTOM
,
imageAlign
:
mxConstants
.
ALIGN_CENTER
,
imageVerticalAlign
:
mxConstants
.
ALIGN_TOP
,
image
:
toolItem
[
'icon'
]
}
const
style
=
Object
.
keys
(
styleObj
).
map
((
attr
)
=>
`
${
attr
}
=
${
styleObj
[
attr
]}
`
).
join
(
';'
)
try
{
try
{
let
vertex
=
this
.
graph
.
insertVertex
(
let
vertex
=
this
.
graph
.
insertVertex
(
parent
,
parent
,
...
@@ -1275,21 +1287,23 @@ export default {
...
@@ -1275,21 +1287,23 @@ export default {
x
,
x
,
y
,
y
,
width
,
width
,
height
height
,
style
);
);
vertex
.
title
=
toolItem
[
"title"
];
vertex
.
title
=
toolItem
[
"title"
];
vertex
.
ids
=
toolItem
[
"id"
];
vertex
.
ids
=
toolItem
[
"id"
];
vertex
.
pluginId
=
toolItem
[
"pluginId"
];
vertex
.
pluginId
=
toolItem
[
"pluginId"
];
this
.
xmlDocuments
=
mxUtils
.
parseXml
(
decodeURIComponent
(
this
.
blankCanvas
));
this
.
xmlDocuments
=
mxUtils
.
parseXml
(
decodeURIComponent
(
this
.
blankCanvas
));
console
.
log
(
this
.
xmlDocuments
,
'拖拽'
);
console
.
log
(
this
.
xmlDocuments
,
'拖拽'
);
var
oSerializer
=
new
XMLSerializer
();
var
oSerializer
=
new
XMLSerializer
();
console
.
log
(
oSerializer
.
serializeToString
(
this
.
xmlDocuments
));
console
.
log
(
oSerializer
.
serializeToString
(
this
.
xmlDocuments
));
...
@@ -1319,20 +1333,16 @@ export default {
...
@@ -1319,20 +1333,16 @@ export default {
//选择
//选择
initToolbar
()
{
initToolbar
()
{
let
domArr
=
document
.
querySelectorAll
(
'[key-id="123"]'
);
let
domArr
=
document
.
querySelectorAll
(
'[key-id="123"]'
);
console
.
log
(
domArr
);
domArr
.
forEach
((
dom
,
index
)
=>
{
domArr
.
forEach
((
dom
,
index
)
=>
{
// console.log(dom.pluginId);
// console.log(dom);
let
toolItemObj
=
{
let
toolItemObj
=
{
title
:
dom
.
inner
HTML
,
title
:
dom
.
inner
Text
,
id
:
dom
.
id
,
id
:
dom
.
id
,
width
:
60
,
width
:
50
,
height
:
60
,
height
:
50
,
icon
:
dom
.
attributes
[
"icon"
].
nodeValue
,
// value: dom.pluginId,
// value: dom.pluginId,
pluginId
:
dom
.
getAttribute
(
"pluginId"
),
pluginId
:
dom
.
getAttribute
(
"pluginId"
),
};
};
const
{
width
,
height
}
=
toolItemObj
;
const
{
width
,
height
}
=
toolItemObj
;
...
...
src/views/dialogs-components/global/export-tree/main.vue
View file @
4febc18a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<!-- 浏览 -->
<!-- 浏览 -->
<el-dialog
<el-dialog
title=
"资源库导出"
title=
"资源库导出"
:visible
.
sync=
"exportDialogVisible"
:visible
.
sync=
"exportDialogVisible"
width=
"650px"
width=
"650px"
top=
"15%"
top=
"15%"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<el-button
type=
"primary"
@
click=
"expRespository()"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"expRespository()"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
},
},
checkedArr
:[]
checkedArr
:[]
}
}
},
},
props
:
{
props
:
{
exportDialogVisible
:
Boolean
,
exportDialogVisible
:
Boolean
,
...
@@ -102,7 +102,7 @@ export default {
...
@@ -102,7 +102,7 @@ export default {
});
});
this
.
checkedArr
=
checkArr
;
this
.
checkedArr
=
checkArr
;
console
.
log
(
'当前选择文件===='
,
this
.
checkedArr
);
console
.
log
(
'当前选择文件===='
,
this
.
checkedArr
);
},
},
//导出资源库
//导出资源库
expRespository
()
{
expRespository
()
{
...
@@ -110,7 +110,7 @@ export default {
...
@@ -110,7 +110,7 @@ export default {
this
.
$message
.
error
(
'请先选择要导出文件'
);
this
.
$message
.
error
(
'请先选择要导出文件'
);
}
}
let
data
=
new
FormData
();
let
data
=
new
FormData
();
data
.
append
(
"data"
,
JSON
.
stringify
(
this
.
checkedArr
)
);
data
.
append
(
"data"
,
JSON
.
stringify
(
this
.
checkedArr
)
);
expRespository
(
data
).
then
((
res
)
=>
{
expRespository
(
data
).
then
((
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
...
@@ -123,7 +123,7 @@ export default {
...
@@ -123,7 +123,7 @@ export default {
// document.body.appendChild(link);
// document.body.appendChild(link);
// link.click();
// link.click();
var
url
=
`http://192.168.0.2:9888/ETLWEB-SERVER/etlweb/
attachment/download?filePath=
${
res
.
message
}
&remove=true`
var
url
=
this
.
etlWeb
+
`
attachment/download?filePath=
${
res
.
message
}
&remove=true`
window
.
open
(
url
);
window
.
open
(
url
);
}
else
{
}
else
{
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
}
}
});
});
},
},
handleCloseScan
()
{
handleCloseScan
()
{
this
.
$emit
(
"update:exportDialogVisible"
,
false
);
this
.
$emit
(
"update:exportDialogVisible"
,
false
);
},
},
...
@@ -143,4 +143,4 @@ export default {
...
@@ -143,4 +143,4 @@ export default {
background-color
:
#8888ff
;
background-color
:
#8888ff
;
color
:
#fff
;
color
:
#fff
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/dialogs-components/global/in-repository/main.vue
View file @
4febc18a
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
action=
"https://jsonplaceholder.typicode.com/posts/"
action=
"https://jsonplaceholder.typicode.com/posts/"
:file-list=
"fileList"
:file-list=
"fileList"
:auto-upload=
"false"
:auto-upload=
"false"
:on-change=
"handleChange"
>
:on-change=
"handleChange"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
</el-upload>
<!-- 文件夹存放区域start-->
<!-- 文件夹存放区域start-->
<el-tree
<el-tree
...
@@ -74,7 +74,7 @@ export default {
...
@@ -74,7 +74,7 @@ export default {
checkedArr
:[],
checkedArr
:[],
uploadPath
:
''
uploadPath
:
''
}
}
},
},
props
:
{
props
:
{
inputVisibility
:
Boolean
,
inputVisibility
:
Boolean
,
...
@@ -114,8 +114,8 @@ export default {
...
@@ -114,8 +114,8 @@ export default {
});
});
this
.
checkedArr
=
checkArr
;
this
.
checkedArr
=
checkArr
;
console
.
log
(
'当前选择文件===='
,
this
.
checkedArr
);
console
.
log
(
'当前选择文件===='
,
this
.
checkedArr
);
},
},
// 导入资源库
// 导入资源库
imp
(
data
){
imp
(
data
){
...
@@ -124,7 +124,7 @@ export default {
...
@@ -124,7 +124,7 @@ export default {
formData
.
append
(
'data'
,
JSON
.
stringify
(
data
));
formData
.
append
(
'data'
,
JSON
.
stringify
(
data
));
console
.
log
(
'参数=='
,
formData
);
console
.
log
(
'参数=='
,
formData
);
imp
(
formData
).
then
(
res
=>
{
imp
(
formData
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
$message
.
success
(
'导入成功!'
);
this
.
$message
.
success
(
'导入成功!'
);
this
.
explorer
(
''
);
//刷新列表
this
.
explorer
(
''
);
//刷新列表
this
.
$emit
(
"update:inputVisibility"
,
false
);
//关闭弹窗
this
.
$emit
(
"update:inputVisibility"
,
false
);
//关闭弹窗
...
@@ -146,7 +146,7 @@ export default {
...
@@ -146,7 +146,7 @@ export default {
this
.
$message
.
error
(
'请先选择要导出文件'
);
this
.
$message
.
error
(
'请先选择要导出文件'
);
}
}
let
data
=
new
FormData
();
let
data
=
new
FormData
();
data
.
append
(
"data"
,
JSON
.
stringify
(
this
.
checkedArr
)
);
data
.
append
(
"data"
,
JSON
.
stringify
(
this
.
checkedArr
)
);
expRespository
(
data
).
then
((
res
)
=>
{
expRespository
(
data
).
then
((
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
...
@@ -159,7 +159,7 @@ export default {
...
@@ -159,7 +159,7 @@ export default {
// document.body.appendChild(link);
// document.body.appendChild(link);
// link.click();
// link.click();
var
url
=
`http://192.168.0.2:9888/ETLWEB-SERVER/etlweb/
attachment/download?filePath=
${
res
.
message
}
&remove=true`
var
url
=
this
.
etlWeb
+
`
attachment/download?filePath=
${
res
.
message
}
&remove=true`
window
.
open
(
url
);
window
.
open
(
url
);
}
else
{
}
else
{
...
@@ -167,7 +167,7 @@ export default {
...
@@ -167,7 +167,7 @@ export default {
}
}
});
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
"update:inputVisibility"
,
false
);
this
.
$emit
(
"update:inputVisibility"
,
false
);
},
},
...
@@ -177,9 +177,9 @@ export default {
...
@@ -177,9 +177,9 @@ export default {
// path='H:\\小曾发来的新项目\\kettle\\kettle-webapp\\file_trans1.zip';
// path='H:\\小曾发来的新项目\\kettle\\kettle-webapp\\file_trans1.zip';
path
=
"D:
\\
file
\\
111.zip"
;
path
=
"D:
\\
file
\\
111.zip"
;
this
.
uploadPath
=
path
;
this
.
uploadPath
=
path
;
this
.
Imptree
(
path
);
this
.
Imptree
(
path
);
},
},
// 导入资源库
// 导入资源库
Imptree
(
path
){
Imptree
(
path
){
...
@@ -189,18 +189,18 @@ export default {
...
@@ -189,18 +189,18 @@ export default {
formData
.
append
(
'node'
,
'root'
);
formData
.
append
(
'node'
,
'root'
);
console
.
log
(
'参数=='
,
formData
);
console
.
log
(
'参数=='
,
formData
);
Imptree
(
formData
).
then
(
res
=>
{
Imptree
(
formData
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
// this.$message.success('成功!');
// this.$message.success('成功!');
this
.
impFileList
=
res
;
this
.
impFileList
=
res
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
errMsg
)
this
.
$message
.
error
(
res
.
errMsg
)
}
}
})
})
},
},
},
},
};
};
...
@@ -210,4 +210,4 @@ export default {
...
@@ -210,4 +210,4 @@ export default {
background-color
:
#8888ff
;
background-color
:
#8888ff
;
color
:
#fff
;
color
:
#fff
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/kettle/home2.vue
View file @
4febc18a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<el-tab-pane
label=
"资源库"
name=
"first"
>
<el-tab-pane
label=
"资源库"
name=
"first"
>
<div
class=
"sel-content"
>
<div
class=
"sel-content"
>
<div
class=
"sel-menu-bar"
>
<div
class=
"sel-menu-bar"
>
<el-dropdown
<el-dropdown
size=
"small"
size=
"small"
placement=
"bottom"
placement=
"bottom"
>
>
...
@@ -14,15 +14,15 @@
...
@@ -14,15 +14,15 @@
新建
新建
<i
class=
"el-icon-caret-bottom el-icon--right"
></i>
<i
class=
"el-icon-caret-bottom el-icon--right"
></i>
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"password"
@
click
.
native=
"createTrans()"
>
<el-dropdown-item
command=
"password"
@
click
.
native=
"createTrans()"
>
<template>
<template>
<i
style=
"color:red;font-weight:bold;font-size:15px;"
class=
"el-icon-refresh"
></i>
<i
style=
"color:red;font-weight:bold;font-size:15px;"
class=
"el-icon-refresh"
></i>
新建转换
新建转换
</
template
>
</
template
>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
command=
"logout"
@
click
.
native=
"createJob()"
>
<el-dropdown-item
command=
"logout"
@
click
.
native=
"createJob()"
>
<
template
>
<
template
>
<i
style=
"color:#F99C1C;font-weight:bold;font-size:15px;"
class=
"el-icon-refresh-left"
></i>
<i
style=
"color:#F99C1C;font-weight:bold;font-size:15px;"
class=
"el-icon-refresh-left"
></i>
新建任务
新建任务
</
template
>
</
template
>
...
@@ -31,14 +31,14 @@
...
@@ -31,14 +31,14 @@
<el-dropdown-item
class=
"text-center"
>
打开
</el-dropdown-item>
<el-dropdown-item
class=
"text-center"
>
打开
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
<el-dropdown
<el-dropdown
size=
"small"
size=
"small"
placement=
"bottom"
>
placement=
"bottom"
>
<span
class=
"sel-btn"
>
<span
class=
"sel-btn"
>
资源库管理
资源库管理
<i
class=
"el-icon-caret-bottom el-icon--right"
></i>
<i
class=
"el-icon-caret-bottom el-icon--right"
></i>
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"showModalOne()"
>
连接资源库
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"showModalOne()"
>
连接资源库
</el-dropdown-item>
<el-dropdown-item
>
管理资源库
</el-dropdown-item>
<el-dropdown-item
>
管理资源库
</el-dropdown-item>
<el-dropdown-item
>
断开资源库
</el-dropdown-item>
<el-dropdown-item
>
断开资源库
</el-dropdown-item>
...
@@ -46,14 +46,14 @@
...
@@ -46,14 +46,14 @@
<el-dropdown-item>
导入资源库
</el-dropdown-item>
<el-dropdown-item>
导入资源库
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
<el-dropdown
<el-dropdown
size=
"small"
size=
"small"
placement=
"bottom"
>
placement=
"bottom"
>
<span
class=
"sel-btn"
>
<span
class=
"sel-btn"
>
帮组
帮组
<i
class=
"el-icon-caret-bottom el-icon--right"
></i>
<i
class=
"el-icon-caret-bottom el-icon--right"
></i>
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item>
语言切换
</el-dropdown-item>
<el-dropdown-item>
语言切换
</el-dropdown-item>
<el-dropdown-item
>
关于
</el-dropdown-item>
<el-dropdown-item
>
关于
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
...
@@ -71,16 +71,16 @@
...
@@ -71,16 +71,16 @@
:highlight-current=
"true"
:highlight-current=
"true"
@
node-click=
"handleNodeClick"
@
node-click=
"handleNodeClick"
>
>
<span
class=
"custom-tree-node"
slot-scope=
"{ node, data }"
>
<span
class=
"custom-tree-node"
slot-scope=
"{ node, data }"
>
<span
style=
"display:flex;align:center;"
>
<span
style=
"display:flex;align:center;"
>
<div
v-if=
"data.iconCls"
:class=
"data.iconCls"
style=
"display:inline-block;width:20px;height:20px;background-repeat:no-repeat;background-position:center;"
width=
""
alt=
""
></div>
<div
v-if=
"data.iconCls"
:class=
"data.iconCls"
style=
"display:inline-block;width:20px;height:20px;background-repeat:no-repeat;background-position:center;"
width=
""
alt=
""
></div>
{{ node.label }}
{{ node.label }}
</span>
</span>
</span>
</span>
</el-tree>
</el-tree>
<!-- 文件夹存放区域end -->
<!-- 文件夹存放区域end -->
</div>
</div>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"核心对象"
name=
"second"
v-if=
"tabShowFlag"
>
<el-tab-pane
label=
"核心对象"
name=
"second"
v-if=
"tabShowFlag"
>
<div
class=
"sel-content"
>
<div
class=
"sel-content"
>
...
@@ -88,21 +88,21 @@
...
@@ -88,21 +88,21 @@
<nodeMenu2
@
shooStatus=
"shooStatus"
></nodeMenu2>
<nodeMenu2
@
shooStatus=
"shooStatus"
></nodeMenu2>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
<div
class=
"resize"
title=
"收缩侧边栏"
>
...
</div>
<div
class=
"resize"
title=
"收缩侧边栏"
>
...
</div>
<div
class=
"mid"
>
<div
class=
"mid"
>
<el-tabs
v-if=
"tabShowFlag"
style=
"margin-top:-5vh;margin-bottom:0;"
v-model=
"picName"
type=
"card"
closable
@
tab-remove=
"removeTab"
>
<el-tabs
v-if=
"tabShowFlag"
style=
"margin-top:-5vh;margin-bottom:0;"
v-model=
"picName"
type=
"card"
closable
@
tab-remove=
"removeTab"
>
<el-tab-pane
label=
"数据库名称"
>
<el-tab-pane
label=
"数据库名称"
>
<mxgraph-designer
ref=
"pic"
v-if=
"mxGraphShow"
:blankCanvas=
"blankCanvas"
></mxgraph-designer>
<mxgraph-designer
ref=
"pic"
v-if=
"mxGraphShow"
:blankCanvas=
"blankCanvas"
></mxgraph-designer>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
<!-- 弹窗1start -->
<!-- 弹窗1start -->
<el-dialog
<el-dialog
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
<li
class=
"btn"
@
mouseenter=
"typeHoverIdx = idx"
@
mouseleave=
"typeHoverIdx = -1"
@
click=
"typeCheckedIdx=idx"
:class=
"{'hover': typeHoverIdx == idx,'checked': typeCheckedIdx == idx}"
v-for=
"(item,idx) in typesList"
:key=
"idx"
>
<li
class=
"btn"
@
mouseenter=
"typeHoverIdx = idx"
@
mouseleave=
"typeHoverIdx = -1"
@
click=
"typeCheckedIdx=idx"
:class=
"{'hover': typeHoverIdx == idx,'checked': typeCheckedIdx == idx}"
v-for=
"(item,idx) in typesList"
:key=
"idx"
>
{{ item.type }}:{{ item.name }}
{{ item.type }}:{{ item.name }}
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -205,16 +205,16 @@
...
@@ -205,16 +205,16 @@
<el-button
type=
"primary"
@
click=
"repositoryInfoConfirm('repositoryInfoForm')"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"repositoryInfoConfirm('repositoryInfoForm')"
>
确 定
</el-button>
<el-button
@
click=
"createOrUpdate"
>
创建或更新
</el-button>
<el-button
@
click=
"createOrUpdate"
>
创建或更新
</el-button>
<el-button
@
click=
"dialogVisibleRemind = true"
>
删 除
</el-button>
<el-button
@
click=
"dialogVisibleRemind = true"
>
删 除
</el-button>
<el-button
@
click=
"dialogVisibleThree = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisibleThree = false"
>
取 消
</el-button>
<!-- <el-button type="primary" @click="dialogVisibleTwo = false">确 定</el-button> -->
<!-- <el-button type="primary" @click="dialogVisibleTwo = false">确 定</el-button> -->
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 弹窗3end -->
<!-- 弹窗3end -->
<!-- 弹窗4start -->
<!-- 弹窗4start -->
<estab-dialog
ref=
"establishDia"
:dialogVisibleFourth
.
sync=
'dialogVisibleFourth'
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
></estab-dialog>
<estab-dialog
ref=
"establishDia"
:dialogVisibleFourth
.
sync=
'dialogVisibleFourth'
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
></estab-dialog>
<!-- 弹窗5start -->
<!-- 弹窗5start -->
...
@@ -233,10 +233,10 @@
...
@@ -233,10 +233,10 @@
</span>
</span>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"只读资源库?:"
prop=
"checkPass"
>
<el-form-item
label=
"只读资源库?:"
prop=
"checkPass"
>
<el-checkbox
></el-checkbox>
<el-checkbox
></el-checkbox>
</el-form-item>
</el-form-item>
<el-form-item
label=
"不显示隐藏文件:"
prop=
"checkPass"
>
<el-form-item
label=
"不显示隐藏文件:"
prop=
"checkPass"
>
<el-checkbox
></el-checkbox>
<el-checkbox
></el-checkbox>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeFileModal()"
>
取 消
</el-button>
<el-button
@
click=
"closeFileModal()"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"FileModal = false"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"FileModal = false"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 弹窗5end -->
<!-- 弹窗5end -->
...
@@ -277,28 +277,28 @@
...
@@ -277,28 +277,28 @@
ref="tree"
ref="tree"
:props="defaultProps"
:props="defaultProps"
:highlight-current="true"> -->
:highlight-current="true"> -->
<!-- el-icon-folder -->
<!-- el-icon-folder -->
<!-- <span class="custom-tree-node" slot-scope="{node,data}">
<!-- <span class="custom-tree-node" slot-scope="{node,data}">
<span>
<span>
<i :class="data.icon"></i>{{ node.label }}
<i :class="data.icon"></i>{{ node.label }}
</span>
</span>
</span> -->
</span> -->
<!-- <span class="custom-tree-node" slot-scope="{node,data}">
<!-- <span class="custom-tree-node" slot-scope="{node,data}">
<span>
<span>
<i class="el-icon-folder"></i>{{ node.label }}
<i class="el-icon-folder"></i>{{ node.label }}
</span>
</span>
</span>
</span>
</el-tree> -->
</el-tree> -->
<!-- 文件夹存放区域end -->
<!-- 文件夹存放区域end -->
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
style=
"display:flex;"
>
<span
slot=
"footer"
class=
"dialog-footer"
style=
"display:flex;"
>
<el-select
style=
"flex:1;margin-right:25px;"
v-model=
"ruleForm.region"
placeholder=
"请选择选择数据库连接"
>
<el-select
style=
"flex:1;margin-right:25px;"
v-model=
"ruleForm.region"
placeholder=
"请选择选择数据库连接"
>
...
@@ -306,7 +306,7 @@
...
@@ -306,7 +306,7 @@
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
</el-select>
</el-select>
<el-button
@
click=
"FileModalScan = false"
>
取 消
</el-button>
<el-button
@
click=
"FileModalScan = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"FileModalScan = false"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"FileModalScan = false"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 弹窗6end -->
<!-- 弹窗6end -->
...
@@ -373,7 +373,7 @@ export default {
...
@@ -373,7 +373,7 @@ export default {
feature
,
//特征列表
feature
,
//特征列表
establishDialog
,
establishDialog
,
// Establish,//新建转换,新建作业,新建目录弹窗
// Establish,//新建转换,新建作业,新建目录弹窗
},
},
props
:
[
"dragItem"
],
props
:
[
"dragItem"
],
...
@@ -381,7 +381,7 @@ props: ["dragItem"],
...
@@ -381,7 +381,7 @@ props: ["dragItem"],
return
{
return
{
blankCanvas
:
""
,
//空白画布xml
blankCanvas
:
""
,
//空白画布xml
graph
:
null
,
graph
:
null
,
flowData
:[],
flowData
:[],
exportDialogVisible
:
false
,
//导出资源库弹窗
exportDialogVisible
:
false
,
//导出资源库弹窗
curDataBase
:
null
,
//当前选择的资源库
curDataBase
:
null
,
//当前选择的资源库
...
@@ -391,7 +391,7 @@ props: ["dragItem"],
...
@@ -391,7 +391,7 @@ props: ["dragItem"],
estabTitle
:
'转换'
,
//新建转换弹窗提示
estabTitle
:
'转换'
,
//新建转换弹窗提示
featureDialogVisible
:
false
,
//特征列表弹窗
featureDialogVisible
:
false
,
//特征列表弹窗
scanDialogVisible
:
false
,
//浏览弹窗
scanDialogVisible
:
false
,
//浏览弹窗
prefix
:
'http://192.168.0.2:9700/etlweb/'
,
prefix
:
this
.
etlWeb
,
inputValue
:
''
,
// 密码
inputValue
:
''
,
// 密码
// dropFunction,//删除数据库表
// dropFunction,//删除数据库表
deleteLink
,
//删除资源库模块的方法
deleteLink
,
//删除资源库模块的方法
...
@@ -473,7 +473,7 @@ props: ["dragItem"],
...
@@ -473,7 +473,7 @@ props: ["dragItem"],
// logLevel:[
// logLevel:[
// {required:true,message:'请选择日志级别',trigger:'change'}
// {required:true,message:'请选择日志级别',trigger:'change'}
// ],
// ],
},
},
checkModel
:[],
checkModel
:[],
visible
:
true
,
visible
:
true
,
...
@@ -532,7 +532,7 @@ props: ["dragItem"],
...
@@ -532,7 +532,7 @@ props: ["dragItem"],
fileTreeList
:[
fileTreeList
:[
{
iconCls
:
"imageFolder"
,
{
iconCls
:
"imageFolder"
,
path
:
"/"
,
path
:
"/"
,
childen
:[]},
childen
:[]},
// {
// {
// "id":"f1e1928d205b49a8b4ceda97d51074c1",
// "id":"f1e1928d205b49a8b4ceda97d51074c1",
// "text":"45",
// "text":"45",
...
@@ -610,7 +610,7 @@ props: ["dragItem"],
...
@@ -610,7 +610,7 @@ props: ["dragItem"],
childenTreeList
:[],
childenTreeList
:[],
// defaultProps: {
// defaultProps: {
// label: 'path',
// label: 'path',
// children: 'children',
// children: 'children',
// },
// },
defaultProps
:
{
defaultProps
:
{
label
:
"text"
,
label
:
"text"
,
...
@@ -630,8 +630,8 @@ props: ["dragItem"],
...
@@ -630,8 +630,8 @@ props: ["dragItem"],
dialogVisibleThree
:
false
,
//资源库信息弹窗
dialogVisibleThree
:
false
,
//资源库信息弹窗
dialogVisibleFourth
:
false
,
dialogVisibleFourth
:
false
,
// linkType:[
// linkType:[
// {value: 0, text: '一般'},
// {value: 0, text: '一般'},
// {value: 1, text: '高级'},
// {value: 1, text: '高级'},
// {value: 2, text: '选项'},
// {value: 2, text: '选项'},
// {value: 3, text: '连接池'},
// {value: 3, text: '连接池'},
// {value: 4, text: '集群'}
// {value: 4, text: '集群'}
...
@@ -647,30 +647,30 @@ props: ["dragItem"],
...
@@ -647,30 +647,30 @@ props: ["dragItem"],
mounted
()
{
mounted
()
{
this
.
dragControllerDiv
();
//左右窗体调整宽度
this
.
dragControllerDiv
();
//左右窗体调整宽度
// this.treeRevert(this.jobTreeList);
// this.treeRevert(this.jobTreeList);
// this.accessData();//页面一加载就获取连接类型
// this.accessData();//页面一加载就获取连接类型
this
.
explorer
(
''
);
//获取文件夹列表
this
.
explorer
(
''
);
//获取文件夹列表
// console.log(this.$refs.establishDia.linkType,'55555555555555555')
// console.log(this.$refs.establishDia.linkType,'55555555555555555')
// this.$nextTick(function () {
// this.$nextTick(function () {
// console.log(this.$refs.establishDia,'========')
// console.log(this.$refs.establishDia,'========')
// // this.$refs.establishDia.accessData();//页面一加载就获取连接类型
// // this.$refs.establishDia.accessData();//页面一加载就获取连接类型
// this.$refs.establishDia.accessData();//页面一加载就获取连接类型
// this.$refs.establishDia.accessData();//页面一加载就获取连接类型
// })
// })
// this.dialogVisibleFourth=true
// this.dialogVisibleFourth=true
// this.$refs.scanDialog.dataBaseScan(formData);
// this.$refs.scanDialog.dataBaseScan(formData);
},
},
methods
:
{
methods
:
{
...
@@ -679,15 +679,15 @@ props: ["dragItem"],
...
@@ -679,15 +679,15 @@ props: ["dragItem"],
//接收子组件显示画布
//接收子组件显示画布
shooStatus
(
e
){
shooStatus
(
e
){
console
.
log
(
e
,
'接收子组件显示画布'
)
console
.
log
(
e
,
'接收子组件显示画布'
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
mxGraphShow
=
e
this
.
mxGraphShow
=
e
})
})
},
},
...
@@ -699,11 +699,11 @@ props: ["dragItem"],
...
@@ -699,11 +699,11 @@ props: ["dragItem"],
formData
.
append
(
'path'
,
path
);
formData
.
append
(
'path'
,
path
);
formData
.
append
(
'node'
,
'xnode-14'
);
formData
.
append
(
'node'
,
'xnode-14'
);
this
.
$forceUpdate
();
this
.
$forceUpdate
();
explorer
(
formData
).
then
(
res
=>
{
explorer
(
formData
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
if
(
path
==
''
){
if
(
path
==
''
){
console
.
log
(
'点击当前path=='
,
path
);
console
.
log
(
'点击当前path=='
,
path
);
this
.
fileTreeList
=
res
;
this
.
fileTreeList
=
res
;
// this.fileTreeList=JSON.stringify(this.fileTreeList);
// this.fileTreeList=JSON.stringify(this.fileTreeList);
}
else
{
}
else
{
...
@@ -711,17 +711,17 @@ props: ["dragItem"],
...
@@ -711,17 +711,17 @@ props: ["dragItem"],
this
.
childenTreeList
=
res
;
this
.
childenTreeList
=
res
;
console
.
log
(
'子节点2path=='
,
this
.
childenTreeList
);
console
.
log
(
'子节点2path=='
,
this
.
childenTreeList
);
}
}
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
errMsg
)
this
.
$message
.
error
(
res
.
errMsg
)
}
}
})
})
},
},
// 左边文件夹和右边画布的宽度可以拖拽调整
// 左边文件夹和右边画布的宽度可以拖拽调整
dragControllerDiv
:
function
()
{
dragControllerDiv
:
function
()
{
var
resize
=
document
.
getElementsByClassName
(
'resize'
);
var
resize
=
document
.
getElementsByClassName
(
'resize'
);
...
@@ -772,7 +772,7 @@ props: ["dragItem"],
...
@@ -772,7 +772,7 @@ props: ["dragItem"],
return
{...
pre
,
[
cur
[
'id'
]]:
cur
}
return
{...
pre
,
[
cur
[
'id'
]]:
cur
}
},
{});
},
{});
console
.
log
(
formatObj
);
console
.
log
(
formatObj
);
let
formatArray
=
arrayList
.
reduce
((
arr
,
cur
)
=>
{
let
formatArray
=
arrayList
.
reduce
((
arr
,
cur
)
=>
{
// let pid = cur.pid ? cur.pid : 0;
// let pid = cur.pid ? cur.pid : 0;
let
pid
=
cur
.
parent
?
cur
.
parent
:
0
;
let
pid
=
cur
.
parent
?
cur
.
parent
:
0
;
...
@@ -786,11 +786,11 @@ props: ["dragItem"],
...
@@ -786,11 +786,11 @@ props: ["dragItem"],
return
arr
;
return
arr
;
},
[]);
},
[]);
console
.
log
(
'树形数据============='
,
formatArray
);
console
.
log
(
'树形数据============='
,
formatArray
);
// this.jobTreeList=formatArray;
// this.jobTreeList=formatArray;
},
},
// 打开关闭弹窗
// 打开关闭弹窗
showModalOne
(){
showModalOne
(){
console
.
log
(
'打卡资源库连接:'
);
console
.
log
(
'打卡资源库连接:'
);
...
@@ -802,7 +802,7 @@ props: ["dragItem"],
...
@@ -802,7 +802,7 @@ props: ["dragItem"],
this
.
listHoverIdx
=-
1
;
//清空当前鼠标移动到的数据
this
.
listHoverIdx
=-
1
;
//清空当前鼠标移动到的数据
this
.
listCheckedIdx
=-
2
;
//清空当前鼠标选中的数据
this
.
listCheckedIdx
=-
2
;
//清空当前鼠标选中的数据
},
},
showModalTwo
(){
showModalTwo
(){
this
.
dialogVisibleTwo
=
true
;
this
.
dialogVisibleTwo
=
true
;
this
.
types
();
this
.
types
();
...
@@ -810,7 +810,7 @@ props: ["dragItem"],
...
@@ -810,7 +810,7 @@ props: ["dragItem"],
handleCloseTwo
(){
handleCloseTwo
(){
this
.
dialogVisibleTwo
=
false
;
this
.
dialogVisibleTwo
=
false
;
},
},
showModalThree
(
typeCheckedIdx
){
showModalThree
(
typeCheckedIdx
){
console
.
log
(
'当前点击---'
,
typeCheckedIdx
);
console
.
log
(
'当前点击---'
,
typeCheckedIdx
);
if
(
typeCheckedIdx
==
0
){
if
(
typeCheckedIdx
==
0
){
...
@@ -819,7 +819,7 @@ props: ["dragItem"],
...
@@ -819,7 +819,7 @@ props: ["dragItem"],
if
(
typeCheckedIdx
==
1
){
if
(
typeCheckedIdx
==
1
){
this
.
FileModal
=
true
;
this
.
FileModal
=
true
;
}
}
},
},
handleCloseThree
(){
handleCloseThree
(){
this
.
dialogVisibleThree
=
false
;
this
.
dialogVisibleThree
=
false
;
...
@@ -829,11 +829,11 @@ props: ["dragItem"],
...
@@ -829,11 +829,11 @@ props: ["dragItem"],
this
.
dialogVisibleFourth
=
true
;
this
.
dialogVisibleFourth
=
true
;
this
.
$refs
.
establishDia
.
database
();
this
.
$refs
.
establishDia
.
database
();
// this.accessData();//获取连接类型
// this.accessData();//获取连接类型
this
.
$refs
.
establishDia
.
accessMethod
();
//获取连接方式
this
.
$refs
.
establishDia
.
accessMethod
();
//获取连接方式
// console.log('this.methodHoverIdx==',this.methodHoverIdx);
// console.log('this.methodHoverIdx==',this.methodHoverIdx);
// console.log('this.methodCheckedIdx==',this.methodCheckedIdx);
// console.log('this.methodCheckedIdx==',this.methodCheckedIdx);
},
},
//获取新建弹窗返回来的值
//获取新建弹窗返回来的值
getSonValue
(
res
){
getSonValue
(
res
){
...
@@ -852,7 +852,7 @@ props: ["dragItem"],
...
@@ -852,7 +852,7 @@ props: ["dragItem"],
// this.methodCheckedIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// this.methodCheckedIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// this.addFlag=true;//增减变量改为编辑变量
// this.addFlag=true;//增减变量改为编辑变量
// },
// },
closeFileModal
(){
closeFileModal
(){
this
.
FileModal
=
false
;
this
.
FileModal
=
false
;
},
},
...
@@ -868,7 +868,7 @@ props: ["dragItem"],
...
@@ -868,7 +868,7 @@ props: ["dragItem"],
// 获取资源库连接类型
// 获取资源库连接类型
types
(){
types
(){
types
().
then
(
res
=>
{
types
().
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'获取类型成功!'
);
console
.
log
(
'获取类型成功!'
);
this
.
typesList
=
res
;
this
.
typesList
=
res
;
}
else
{
}
else
{
...
@@ -879,7 +879,7 @@ props: ["dragItem"],
...
@@ -879,7 +879,7 @@ props: ["dragItem"],
// 获取历史建立的连接资源库列表
// 获取历史建立的连接资源库列表
getLinkList
(){
getLinkList
(){
getLinkList
().
then
(
res
=>
{
getLinkList
().
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'获取历史连接资源库列表:'
);
console
.
log
(
'获取历史连接资源库列表:'
);
this
.
linkList
=
res
;
this
.
linkList
=
res
;
}
else
{
}
else
{
...
@@ -892,7 +892,7 @@ props: ["dragItem"],
...
@@ -892,7 +892,7 @@ props: ["dragItem"],
comfirmCreate
(
formName
){
comfirmCreate
(
formName
){
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// JSON对象转成formData对象
// JSON对象转成formData对象
var
params
=
this
.
createModel
;
var
params
=
this
.
createModel
;
// 由于高级选项连接池集群页面没有画完,保存默认参数
// 由于高级选项连接池集群页面没有画完,保存默认参数
...
@@ -921,24 +921,24 @@ props: ["dragItem"],
...
@@ -921,24 +921,24 @@ props: ["dragItem"],
this
.
dialogVisibleFourth
=
false
;
//关闭弹窗
this
.
dialogVisibleFourth
=
false
;
//关闭弹窗
this
.
linkCheckedIdx
=
this
.
initlinkTypeIdx
;
//关闭弹窗后初始化选择的数据
this
.
linkCheckedIdx
=
this
.
initlinkTypeIdx
;
//关闭弹窗后初始化选择的数据
this
.
listNames
();
//刷新已经创建的数据库列表
this
.
listNames
();
//刷新已经创建的数据库列表
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
message
)
this
.
$message
.
error
(
res
.
message
)
}
}
})
})
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
message
)
this
.
$message
.
error
(
res
.
message
)
}
}
})
})
}
}
});
});
},
},
//查询已经建立的所有数据库列表
//查询已经建立的所有数据库列表
listNames
(){
listNames
(){
listNames
().
then
(
res
=>
{
listNames
().
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'获取所有已经创建的数据库列表:'
,
res
);
console
.
log
(
'获取所有已经创建的数据库列表:'
,
res
);
this
.
namesList
=
res
;
this
.
namesList
=
res
;
}
else
{
}
else
{
...
@@ -947,7 +947,7 @@ props: ["dragItem"],
...
@@ -947,7 +947,7 @@ props: ["dragItem"],
})
})
},
},
//选择数据库编辑
//选择数据库编辑
selectNameFunc
(
e
){
selectNameFunc
(
e
){
console
.
log
(
'当前选中的数'
,
e
);
console
.
log
(
'当前选中的数'
,
e
);
console
.
log
(
'当前选中的数-==='
,
this
.
selectName
);
console
.
log
(
'当前选中的数-==='
,
this
.
selectName
);
},
},
...
@@ -957,30 +957,30 @@ props: ["dragItem"],
...
@@ -957,30 +957,30 @@ props: ["dragItem"],
},
},
editDataBaseModal
(){
editDataBaseModal
(){
if
(
this
.
selectName
){
if
(
this
.
selectName
){
this
.
dialogVisibleFourth
=
true
;
this
.
dialogVisibleFourth
=
true
;
// this.addFlag=false;//增减变量改为编辑变量
// this.addFlag=false;//增减变量改为编辑变量
}
}
this
.
$refs
.
establishDia
.
database
(
this
.
selectName
);
this
.
$refs
.
establishDia
.
database
(
this
.
selectName
);
this
.
$refs
.
establishDia
.
accessMethod
();
//获取连接方式
this
.
$refs
.
establishDia
.
accessMethod
();
//获取连接方式
// console.log('this.methodHoverIdx==',this.methodHoverIdx);
// console.log('this.methodHoverIdx==',this.methodHoverIdx);
// console.log('this.methodCheckedIdx==',this.methodCheckedIdx);
// console.log('this.methodCheckedIdx==',this.methodCheckedIdx);
},
},
// 资源库连接
// 资源库连接
loginRepository
(
formName
){
loginRepository
(
formName
){
console
.
log
(
'进入登录=========='
);
console
.
log
(
'进入登录=========='
);
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// JSON对象转成formData对象
// JSON对象转成formData对象
var
params
=
this
.
loginModel
;
var
params
=
this
.
loginModel
;
params
.
atStartupShown
=
false
;
//在启动时显示此对话框默认为 false
params
.
atStartupShown
=
false
;
//在启动时显示此对话框默认为 false
console
.
log
(
'登录提交参数=='
,
params
);
console
.
log
(
'登录提交参数=='
,
params
);
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
formData
.
append
(
'loginInfo'
,
JSON
.
stringify
(
params
));
formData
.
append
(
'loginInfo'
,
JSON
.
stringify
(
params
));
console
.
log
(
'提交转换数据:'
,
formData
);
console
.
log
(
'提交转换数据:'
,
formData
);
loginRepository
(
formData
).
then
(
res
=>
{
loginRepository
(
formData
).
then
(
res
=>
{
console
.
log
(
'返回数据:'
,
res
);
console
.
log
(
'返回数据:'
,
res
);
...
@@ -988,13 +988,13 @@ props: ["dragItem"],
...
@@ -988,13 +988,13 @@ props: ["dragItem"],
this
.
$message
.
success
(
'连接成功!'
);
this
.
$message
.
success
(
'连接成功!'
);
this
.
explorer
(
''
);
this
.
explorer
(
''
);
this
.
handleCloseOne
();
//关闭弹窗
this
.
handleCloseOne
();
//关闭弹窗
// this.linkCheckedIdx=this.initlinkTypeIdx;//关闭弹窗后初始化选择的数据
// this.linkCheckedIdx=this.initlinkTypeIdx;//关闭弹窗后初始化选择的数据
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
errMsg
)
this
.
$message
.
error
(
res
.
errMsg
)
}
}
})
})
}
else
{
}
else
{
console
.
log
(
'error submit!!'
);
console
.
log
(
'error submit!!'
);
return
false
;
return
false
;
...
@@ -1037,7 +1037,7 @@ props: ["dragItem"],
...
@@ -1037,7 +1037,7 @@ props: ["dragItem"],
// 资源库信息确定新建
// 资源库信息确定新建
repositoryInfoConfirm
(
formName
){
repositoryInfoConfirm
(
formName
){
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// JSON对象转成formData对象
// JSON对象转成formData对象
var
params
=
this
.
repositoryInfoModel
;
var
params
=
this
.
repositoryInfoModel
;
params
.
type
=
'KettleDatabaseRepository'
;
//写死
params
.
type
=
'KettleDatabaseRepository'
;
//写死
...
@@ -1051,7 +1051,7 @@ props: ["dragItem"],
...
@@ -1051,7 +1051,7 @@ props: ["dragItem"],
console
.
log
(
'提交数据:'
,
res
);
console
.
log
(
'提交数据:'
,
res
);
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
'成功!'
);
this
.
$message
.
success
(
'成功!'
);
this
.
handleCloseThree
();
// 关闭弹窗1
this
.
handleCloseThree
();
// 关闭弹窗1
this
.
handleCloseTwo
();
//关闭弹窗2
this
.
handleCloseTwo
();
//关闭弹窗2
this
.
getLinkList
();
//刷新列表
this
.
getLinkList
();
//刷新列表
...
@@ -1062,7 +1062,7 @@ props: ["dragItem"],
...
@@ -1062,7 +1062,7 @@ props: ["dragItem"],
this
.
$message
.
error
(
res
.
errMsg
)
this
.
$message
.
error
(
res
.
errMsg
)
}
}
})
})
}
else
{
}
else
{
console
.
log
(
'error submit!!'
);
console
.
log
(
'error submit!!'
);
return
false
;
return
false
;
...
@@ -1111,7 +1111,7 @@ props: ["dragItem"],
...
@@ -1111,7 +1111,7 @@ props: ["dragItem"],
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
formData
.
append
(
'databaseInfo'
,
JSON
.
stringify
(
params
));
formData
.
append
(
'databaseInfo'
,
JSON
.
stringify
(
params
));
console
.
log
(
'表单提交参数=='
,
params
);
console
.
log
(
'表单提交参数=='
,
params
);
this
.
$refs
.
feature
.
feature
(
formData
);
this
.
$refs
.
feature
.
feature
(
formData
);
this
.
featureDialogVisible
=
true
;
this
.
featureDialogVisible
=
true
;
},
},
...
@@ -1150,7 +1150,7 @@ props: ["dragItem"],
...
@@ -1150,7 +1150,7 @@ props: ["dragItem"],
// formData.append('nodeId', '');
// formData.append('nodeId', '');
// formData.append('text', 'root');
// formData.append('text', 'root');
// formData.append('node', 'xnode-2984');
// formData.append('node', 'xnode-2984');
this
.
$refs
.
scanDialog
.
dataBaseScan
(
formData
);
this
.
$refs
.
scanDialog
.
dataBaseScan
(
formData
);
this
.
scanDialogVisible
=
true
;
this
.
scanDialogVisible
=
true
;
},
},
...
@@ -1160,7 +1160,7 @@ props: ["dragItem"],
...
@@ -1160,7 +1160,7 @@ props: ["dragItem"],
formData
.
append
(
'repositoryName'
,
this
.
loginModel
.
reposityId
);
formData
.
append
(
'repositoryName'
,
this
.
loginModel
.
reposityId
);
console
.
log
(
'参数=='
,
formData
);
console
.
log
(
'参数=='
,
formData
);
remove
(
formData
).
then
(
res
=>
{
remove
(
formData
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
$message
.
success
(
'成功!'
);
this
.
$message
.
success
(
'成功!'
);
this
.
getLinkList
();
//打开资源库连接弹窗同时获取历史连接记录
this
.
getLinkList
();
//打开资源库连接弹窗同时获取历史连接记录
...
@@ -1176,7 +1176,7 @@ props: ["dragItem"],
...
@@ -1176,7 +1176,7 @@ props: ["dragItem"],
this
.
estabTitle
=
'转换'
;
this
.
estabTitle
=
'转换'
;
}
else
{
}
else
{
this
.
$message
.
error
(
'请选择资源库中的一个目录'
);
this
.
$message
.
error
(
'请选择资源库中的一个目录'
);
}
}
},
},
// 新建任务
// 新建任务
createJob
(){
createJob
(){
...
@@ -1185,8 +1185,8 @@ props: ["dragItem"],
...
@@ -1185,8 +1185,8 @@ props: ["dragItem"],
this
.
estabTitle
=
'任务'
;
this
.
estabTitle
=
'任务'
;
}
else
{
}
else
{
this
.
$message
.
error
(
'请选择资源库中的一个目录'
);
this
.
$message
.
error
(
'请选择资源库中的一个目录'
);
}
}
},
},
// 新建目录
// 新建目录
createFile
(){
createFile
(){
...
@@ -1195,8 +1195,8 @@ props: ["dragItem"],
...
@@ -1195,8 +1195,8 @@ props: ["dragItem"],
this
.
estabTitle
=
'目录'
;
this
.
estabTitle
=
'目录'
;
}
else
{
}
else
{
this
.
$message
.
error
(
'请选择资源库中的一个目录'
);
this
.
$message
.
error
(
'请选择资源库中的一个目录'
);
}
}
},
},
handleNodeClick
(
data
,
node
){
handleNodeClick
(
data
,
node
){
console
.
log
(
'点击当前节点==='
,
node
);
console
.
log
(
'点击当前节点==='
,
node
);
...
@@ -1219,20 +1219,20 @@ props: ["dragItem"],
...
@@ -1219,20 +1219,20 @@ props: ["dragItem"],
// decoder.decode(node, graph.getModel());
// decoder.decode(node, graph.getModel());
// console.log(esponse.responseText);
// console.log(esponse.responseText);
})
})
},
},
//修改资源库
//修改资源库
editDataBase
(){
editDataBase
(){
if
(
this
.
curDataBase
){
if
(
this
.
curDataBase
){
this
.
repositoryInfoModel
.
name
=
this
.
curDataBase
.
name
;
this
.
repositoryInfoModel
.
name
=
this
.
curDataBase
.
name
;
this
.
repositoryInfoModel
.
description
=
this
.
curDataBase
.
description
;
this
.
repositoryInfoModel
.
description
=
this
.
curDataBase
.
description
;
this
.
selectName
=
this
.
curDataBase
.
extraOptions
.
database
;
this
.
selectName
=
this
.
curDataBase
.
extraOptions
.
database
;
this
.
dialogVisibleThree
=
true
;
this
.
dialogVisibleThree
=
true
;
}
else
{
}
else
{
this
.
$message
.
error
(
'请选择一个资源库'
);
this
.
$message
.
error
(
'请选择一个资源库'
);
}
}
...
@@ -1243,7 +1243,7 @@ props: ["dragItem"],
...
@@ -1243,7 +1243,7 @@ props: ["dragItem"],
formData
.
append
(
'connection'
,
this
.
selectName
);
formData
.
append
(
'connection'
,
this
.
selectName
);
console
.
log
(
'参数=='
,
formData
);
console
.
log
(
'参数=='
,
formData
);
checkInit
(
formData
).
then
(
res
=>
{
checkInit
(
formData
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
$message
.
success
(
'成功!'
);
this
.
$message
.
success
(
'成功!'
);
// this.getLinkList();//打开资源库连接弹窗同时获取历史连接记录
// this.getLinkList();//打开资源库连接弹窗同时获取历史连接记录
...
@@ -1259,12 +1259,12 @@ props: ["dragItem"],
...
@@ -1259,12 +1259,12 @@ props: ["dragItem"],
}
}
}
}
};
};
</
script
>
</
script
>
...
@@ -1272,4 +1272,4 @@ props: ["dragItem"],
...
@@ -1272,4 +1272,4 @@ props: ["dragItem"],
<
style
>
<
style
>
@import
url(./kettle.css)
;
@import
url(./kettle.css)
;
</
style
>
</
style
>
\ No newline at end of file
src/views/kettle/toolbar.js
View file @
4febc18a
...
@@ -2,7 +2,7 @@ import mxgraph from './mx.js'
...
@@ -2,7 +2,7 @@ import mxgraph from './mx.js'
import
{
steps
}
from
'@/api/kettle/link'
import
{
steps
}
from
'@/api/kettle/link'
const
MxConstants
=
mxgraph
.
mxConstants
const
MxConstants
=
mxgraph
.
mxConstants
const
prefix
=
'192.168.0.2:9700/etlweb/'
const
prefix
=
this
.
etlWeb
const
bar
=
[]
const
bar
=
[]
const
pamer
=
new
FormData
()
// 创建form对象
const
pamer
=
new
FormData
()
// 创建form对象
...
...
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