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
85d62a15
Commit
85d62a15
authored
Apr 06, 2021
by
李耀琨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
0c1107b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
55 deletions
+55
-55
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+53
-28
src/views/kettle/home2.vue
+2
-27
No files found.
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
85d62a15
...
@@ -1068,6 +1068,13 @@ export default {
...
@@ -1068,6 +1068,13 @@ export default {
this
.
$refs
.
container
.
style
.
background
=
'url("./mxgraph/images/grid.gif")'
;
this
.
$refs
.
container
.
style
.
background
=
'url("./mxgraph/images/grid.gif")'
;
},
},
filters
:
{
interceptionDate
:
function
(
value
)
{
if
(
!
value
)
return
;
return
value
.
split
(
"imgage="
);
},
},
methods
:
{
methods
:
{
setXml
()
{
setXml
()
{
this
.
graph
.
getModel
().
beginUpdate
();
this
.
graph
.
getModel
().
beginUpdate
();
...
@@ -1083,6 +1090,11 @@ export default {
...
@@ -1083,6 +1090,11 @@ export default {
excelLnputDetermine
()
{
excelLnputDetermine
()
{
this
.
excelLnput
=
!
this
.
excelLnput
;
this
.
excelLnput
=
!
this
.
excelLnput
;
for
(
let
name
in
this
.
form
)
{
var
edit
=
new
mxCellAttributeChange
(
this
.
nodeData
,
name
,
this
.
form
[
name
]);
this
.
graph
.
getModel
().
execute
(
edit
);
}
console
.
log
(
edit
,
4564564564654
);
},
},
// 子组件发射回来的弹窗变量变为true
// 子组件发射回来的弹窗变量变为true
fathertrans
(
res
)
{
fathertrans
(
res
)
{
...
@@ -1221,6 +1233,7 @@ export default {
...
@@ -1221,6 +1233,7 @@ export default {
}
}
this
.
graph
.
setConnectable
(
true
);
// 允许连线
this
.
graph
.
setConnectable
(
true
);
// 允许连线
this
.
graph
.
setCellsEditable
(
false
);
// 不可修改
this
.
graph
.
setCellsEditable
(
false
);
// 不可修改
this
.
graph
.
setTooltips
(
true
);
this
.
graph
.
setTooltips
(
true
);
this
.
graph
.
setPanning
(
true
);
this
.
graph
.
setPanning
(
true
);
...
@@ -1228,21 +1241,38 @@ export default {
...
@@ -1228,21 +1241,38 @@ export default {
this
.
graph
.
setAllowDanglingEdges
(
false
);
this
.
graph
.
setAllowDanglingEdges
(
false
);
this
.
graph
.
setDisconnectOnMove
(
false
);
this
.
graph
.
setDisconnectOnMove
(
false
);
this
.
graph
.
setMultigraph
(
false
);
this
.
graph
.
convertValueToString
=
(
cell
)
=>
{
this
.
graph
.
convertValueToString
=
(
cell
)
=>
{
var
label
=
cell
.
getAttribute
(
'label'
);
var
icon
=
cell
.
getAttribute
(
cell
.
style
.
split
(
"image="
))
return
label
,
icon
;
// console.log(cell.value.attributes,99999999999999);
// console.log(cell.value.attributes,99999999999999);
// if (cell.title) {
// if (!cell.title && cell.value) {
// cell.title = cell.value.attributes.label.value;
// console.log("======11=",cell.value);
// }else{
// console.log("======22=",cell);
// if(cell.value.attributes["ctype"]){
// cell.title = cell.value.attributes["ctype"]["value"];
// }
// // cell.title = cell.value.attribllutes.label.value;
// }
// }
// cell.ctype = cell.value.attributes.ctype.value;
// cell.ctype = cell.value.attributes.ctype.value;
// let height = cell.geometry.height;
// let width = cell.geometry.width;
// let x = cell.geometry.x;
// let imgs = img.split("=");
// let y = cell.geometry.y;
// // let d = imgs[1]
// console.log(imgs);
// const styleObj = {
// const styleObj = {
// title: cell.title,
// title: cell.title,
...
@@ -1254,26 +1284,20 @@ export default {
...
@@ -1254,26 +1284,20 @@ export default {
// verticalAlign: mxConstants.ALIGN_BOTTOM,
// verticalAlign: mxConstants.ALIGN_BOTTOM,
// imageAlign: mxConstants.ALIGN_CENTER,
// imageAlign: mxConstants.ALIGN_CENTER,
// imageVerticalAlign: mxConstants.ALIGN_TOP,
// imageVerticalAlign: mxConstants.ALIGN_TOP,
// image: '192.168.0.44:9888/ETLWEB-SERVER/etlweb/ui/images/GEN.svg?scale=32',
// };
// };
// const style = Object.keys(styleObj)
// const style = Object.keys(styleObj)
// .map((attr) => `${attr}=${styleObj[attr]}`)
// .map((attr) => `${attr}=${styleObj[attr]}`)
// .join(";");
// .join(";");
//
var doc = mxUtils.parseXml(this.blankCanvas);
//
cell.style = style
// cell = this.graph.insertVertex(
// this.graph.getDefaultParent(),
// null,
// doc.documentElement,
// x,
// y,
// width,
// height,
// style
// );
// console.log(this.R.prop("title", cell),132132);
// console.log(this.R.prop("title", cell),132132);
return
this
.
R
.
prop
(
"title"
,
cell
);
//
return this.R.prop("title", cell);
};
};
this
.
graph
.
addListener
(
mxEvent
.
DOUBLE_CLICK
,
(
graph
,
evt
)
=>
{
this
.
graph
.
addListener
(
mxEvent
.
DOUBLE_CLICK
,
(
graph
,
evt
)
=>
{
...
@@ -1411,7 +1435,7 @@ export default {
...
@@ -1411,7 +1435,7 @@ export default {
//更新
//更新
this
.
updateVisible
=
!
this
.
updateVisible
;
this
.
updateVisible
=
!
this
.
updateVisible
;
return
;
return
;
}
else
if
(
cell
.
ids
==
"step1
5
"
)
{
}
else
if
(
cell
.
ids
==
"step1
4
"
)
{
//文本文件输出
//文本文件输出
this
.
fileVisible
=
!
this
.
fileVisible
;
this
.
fileVisible
=
!
this
.
fileVisible
;
return
;
return
;
...
@@ -1423,15 +1447,15 @@ export default {
...
@@ -1423,15 +1447,15 @@ export default {
//插入、更新
//插入、更新
this
.
InsertOrUpdateVisible
=
!
this
.
InsertOrUpdateVisible
;
this
.
InsertOrUpdateVisible
=
!
this
.
InsertOrUpdateVisible
;
return
;
return
;
}
else
if
(
cell
.
ids
==
"step1
0
"
)
{
}
else
if
(
cell
.
ids
==
"step1
1
"
)
{
//删除
//删除
this
.
deleteVisible
=
!
this
.
deleteVisible
;
this
.
deleteVisible
=
!
this
.
deleteVisible
;
return
;
return
;
}
else
if
(
cell
.
ids
==
"step1
1
"
)
{
}
else
if
(
cell
.
ids
==
"step1
0
"
)
{
//SQL文件输出
//SQL文件输出
this
.
sqlVisible
=
!
this
.
sqlVisible
;
this
.
sqlVisible
=
!
this
.
sqlVisible
;
return
;
return
;
}
else
if
(
cell
.
ids
==
"step9"
||
cell
.
ctype
==
"TextFileInput"
)
{
}
else
if
(
cell
.
ids
==
"step9"
)
{
//Excel输出
//Excel输出
this
.
excelOutPutVisible
=
!
this
.
excelOutPutVisible
;
this
.
excelOutPutVisible
=
!
this
.
excelOutPutVisible
;
return
;
return
;
...
@@ -1466,6 +1490,7 @@ export default {
...
@@ -1466,6 +1490,7 @@ export default {
.
map
((
attr
)
=>
`
${
attr
}
=
${
styleObj
[
attr
]}
`
)
.
map
((
attr
)
=>
`
${
attr
}
=
${
styleObj
[
attr
]}
`
)
.
join
(
";"
);
.
join
(
";"
);
this
.
toolItemData
=
toolItem
this
.
toolItemData
=
toolItem
try
{
try
{
let
pameStep
=
new
FormData
();
// 创建form对象
let
pameStep
=
new
FormData
();
// 创建form对象
pameStep
.
append
(
"graphXml"
,
this
.
getXmlVal
);
pameStep
.
append
(
"graphXml"
,
this
.
getXmlVal
);
...
@@ -1486,7 +1511,9 @@ export default {
...
@@ -1486,7 +1511,9 @@ export default {
height
,
height
,
style
style
);
);
console
.
log
(
res
,
111111111111111111
);
console
.
log
(
cell
,
4564564564
);
console
.
log
(
toolItem
,
111111111111111111
);
cell
.
title
=
toolItem
[
"title"
];
cell
.
title
=
toolItem
[
"title"
];
cell
.
ids
=
toolItem
[
"id"
];
cell
.
ids
=
toolItem
[
"id"
];
// cell.pluginId = toolItem["pluginId"];
// cell.pluginId = toolItem["pluginId"];
...
@@ -1757,10 +1784,10 @@ export default {
...
@@ -1757,10 +1784,10 @@ export default {
save
(
pamers
).
then
((
res
)
=>
{
save
(
pamers
).
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
success
)
{
if
(
res
.
success
)
{
th
is
.
$message
.
success
(
"保存流程成功!暂时请查先看控制台。"
);
th
at
.
$message
.
success
(
"保存流程成功!暂时请查先看控制台。"
);
this
.
createGraph
();
this
.
createGraph
();
}
else
{
}
else
{
th
is
.
$message
.
error
(
res
.
errMsg
);
th
at
.
$message
.
error
(
res
.
errMsg
);
}
}
});
});
},
},
...
@@ -1855,7 +1882,6 @@ export default {
...
@@ -1855,7 +1882,6 @@ export default {
//输出组件保存************************
//输出组件保存************************
saveOutputDialog
(
params
){
saveOutputDialog
(
params
){
// var graph = getActiveGraph().getGraph();
// var graph = getActiveGraph().getGraph();
var
outPutForm
=
params
;
var
outPutForm
=
params
;
this
.
graph
.
getModel
().
beginUpdate
();
this
.
graph
.
getModel
().
beginUpdate
();
try
try
...
@@ -1869,7 +1895,6 @@ export default {
...
@@ -1869,7 +1895,6 @@ export default {
{
{
this
.
graph
.
getModel
().
endUpdate
();
this
.
graph
.
getModel
().
endUpdate
();
}
}
console
.
log
(
'保存组件到画布==='
,
this
.
graph
);
}
}
//输出组件保存******************/
//输出组件保存******************/
},
},
...
...
src/views/kettle/home2.vue
View file @
85d62a15
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
</
template
>
</
template
>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
style=
"text-align:right"
@
click
.
native=
"createFile()"
>
新建目录
</el-dropdown-item>
<el-dropdown-item
style=
"text-align:right"
@
click
.
native=
"createFile()"
>
新建目录
</el-dropdown-item>
<el-dropdown-item
style=
"text-align:right"
@
click
.
native=
"deleteFile()"
>
删除
</el-dropdown-item>
<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>
...
@@ -345,7 +344,7 @@ import dialogRemind from '../dialogs-components/dialog-remind'//删除提示弹
...
@@ -345,7 +344,7 @@ import dialogRemind from '../dialogs-components/dialog-remind'//删除提示弹
import
{
explorer
,
features
,
remove
,
checkInit
,
drop
}
from
"@/api/kettle/file"
;
import
{
explorer
,
features
,
remove
,
checkInit
}
from
"@/api/kettle/file"
;
import
{
import
{
types
,
types
,
getLinkList
,
getLinkList
,
...
@@ -382,7 +381,6 @@ export default {
...
@@ -382,7 +381,6 @@ export default {
props
:
[
"dragItem"
],
props
:
[
"dragItem"
],
data
()
{
data
()
{
return
{
return
{
curNode
:{},
//删除资源库文件当前点击的节点
curNodeText
:
'数据库名称'
,
//当前点击选中的资源库节点
curNodeText
:
'数据库名称'
,
//当前点击选中的资源库节点
blankCanvas
:
""
,
//空白画布xml
blankCanvas
:
""
,
//空白画布xml
graph
:
null
,
graph
:
null
,
...
@@ -1220,32 +1218,9 @@ props: ["dragItem"],
...
@@ -1220,32 +1218,9 @@ props: ["dragItem"],
}
}
},
},
// 删除资源库文件
deleteFile
(){
console
.
log
(
"删除当前节点=========="
,
this
.
curNode
);
var
path
=
this
.
curNode
.
data
.
path
;
var
type
=
this
.
curNode
.
data
.
type
;
if
(
type
==
null
){
type
=
''
}
let
pamer
=
new
FormData
();
// 创建form对象
pamer
.
append
(
"path"
,
path
);
pamer
.
append
(
"type"
,
type
);
drop
(
pamer
).
then
(
res
=>
{
if
(
res
){
console
.
log
(
'删除资源库文件=='
,
res
)
this
.
$message
.
success
(
'删除成功'
);
// 刷新
this
.
explorer
(
''
);
}
})
},
handleNodeClick
(
data
,
node
){
handleNodeClick
(
data
,
node
){
console
.
log
(
'点击当前节点==='
,
node
);
console
.
log
(
'点击当前节点==='
,
node
);
this
.
curNode
=
node
;
//当前选中节点
this
.
nodePath
=
data
.
path
;
//当前选择数
this
.
nodePath
=
data
.
path
;
//当前选择数
this
.
curNodeIconCls
=
data
.
iconCls
;
//当前选中节点
this
.
curNodeIconCls
=
data
.
iconCls
;
//当前选中节点
this
.
nodePath
=
data
.
path
;
this
.
nodePath
=
data
.
path
;
console
.
log
(
'当前节点的文件夹路径:'
,
this
.
nodePath
);
console
.
log
(
'当前节点的文件夹路径:'
,
this
.
nodePath
);
...
...
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