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
aa5a59d4
Commit
aa5a59d4
authored
Apr 06, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Plain Diff
mxl
parents
3315d5dc
85d62a15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
27 deletions
+64
-27
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+64
-27
No files found.
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
aa5a59d4
...
...
@@ -1083,6 +1083,13 @@ export default {
this
.
$refs
.
container
.
style
.
background
=
'url("./mxgraph/images/grid.gif")'
;
},
filters
:
{
interceptionDate
:
function
(
value
)
{
if
(
!
value
)
return
;
return
value
.
split
(
"imgage="
);
},
},
methods
:
{
setXml
()
{
this
.
graph
.
getModel
().
beginUpdate
();
...
...
@@ -1098,6 +1105,11 @@ export default {
excelLnputDetermine
()
{
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
fathertrans
(
res
)
{
...
...
@@ -1236,6 +1248,7 @@ export default {
}
this
.
graph
.
setConnectable
(
true
);
// 允许连线
this
.
graph
.
setCellsEditable
(
false
);
// 不可修改
this
.
graph
.
setTooltips
(
true
);
this
.
graph
.
setPanning
(
true
);
...
...
@@ -1243,21 +1256,38 @@ export default {
this
.
graph
.
setAllowDanglingEdges
(
false
);
this
.
graph
.
setDisconnectOnMove
(
false
);
this
.
graph
.
setMultigraph
(
false
);
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);
// if (cell.title) {
// cell.title = cell.value.attributes.label.value;
// }else{
// if (!cell.title && cell.value) {
// console.log("======11=",cell.value);
// 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;
// let height = cell.geometry.height;
// let width = cell.geometry.width;
// let x = cell.geometry.x;
// let y = cell.geometry.y;
// let imgs = img.split("=");
// // let d = imgs[1]
// console.log(imgs);
// const styleObj = {
// title: cell.title,
...
...
@@ -1269,26 +1299,20 @@ export default {
// verticalAlign: mxConstants.ALIGN_BOTTOM,
// imageAlign: mxConstants.ALIGN_CENTER,
// imageVerticalAlign: mxConstants.ALIGN_TOP,
// image: '192.168.0.44:9888/ETLWEB-SERVER/etlweb/ui/images/GEN.svg?scale=32',
// };
// const style = Object.keys(styleObj)
// .map((attr) => `${attr}=${styleObj[attr]}`)
// .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);
return
this
.
R
.
prop
(
"title"
,
cell
);
//
return this.R.prop("title", cell);
};
this
.
graph
.
addListener
(
mxEvent
.
DOUBLE_CLICK
,
(
graph
,
evt
)
=>
{
...
...
@@ -1426,7 +1450,7 @@ export default {
//更新
this
.
updateVisible
=
!
this
.
updateVisible
;
return
;
}
else
if
(
cell
.
ids
==
"step1
5
"
)
{
}
else
if
(
cell
.
ids
==
"step1
4
"
)
{
//文本文件输出
this
.
fileVisible
=
!
this
.
fileVisible
;
return
;
...
...
@@ -1438,15 +1462,19 @@ export default {
//插入、更新
this
.
InsertOrUpdateVisible
=
!
this
.
InsertOrUpdateVisible
;
return
;
<<<<<<<
HEAD
}
else
if
(
cell
.
ids
==
"step12"
)
{
=======
}
else
if
(
cell
.
ids
==
"step11"
)
{
>>>>>>>
85
d62a150cdd3fb59b3a9d06d747f1bd21d9ab57
//删除
this
.
deleteVisible
=
!
this
.
deleteVisible
;
return
;
}
else
if
(
cell
.
ids
==
"step1
1
"
)
{
}
else
if
(
cell
.
ids
==
"step1
0
"
)
{
//SQL文件输出
this
.
sqlVisible
=
!
this
.
sqlVisible
;
return
;
}
else
if
(
cell
.
ids
==
"step9"
||
cell
.
ctype
==
"TextFileInput"
)
{
}
else
if
(
cell
.
ids
==
"step9"
)
{
//Excel输出
this
.
excelOutPutVisible
=
!
this
.
excelOutPutVisible
;
return
;
...
...
@@ -1481,6 +1509,7 @@ export default {
.
map
((
attr
)
=>
`
${
attr
}
=
${
styleObj
[
attr
]}
`
)
.
join
(
";"
);
this
.
toolItemData
=
toolItem
try
{
let
pameStep
=
new
FormData
();
// 创建form对象
pameStep
.
append
(
"graphXml"
,
this
.
getXmlVal
);
...
...
@@ -1501,7 +1530,9 @@ export default {
height
,
style
);
console
.
log
(
res
,
111111111111111111
);
console
.
log
(
cell
,
4564564564
);
console
.
log
(
toolItem
,
111111111111111111
);
cell
.
title
=
toolItem
[
"title"
];
cell
.
ids
=
toolItem
[
"id"
];
// cell.pluginId = toolItem["pluginId"];
...
...
@@ -1772,10 +1803,10 @@ export default {
save
(
pamers
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
success
)
{
th
is
.
$message
.
success
(
"保存流程成功!暂时请查先看控制台。"
);
//
this.createGraph();
th
at
.
$message
.
success
(
"保存流程成功!暂时请查先看控制台。"
);
this
.
createGraph
();
}
else
{
th
is
.
$message
.
error
(
res
.
errMsg
);
th
at
.
$message
.
error
(
res
.
errMsg
);
}
});
},
...
...
@@ -1870,7 +1901,6 @@ export default {
//输出组件保存************************
saveOutputDialog
(
params
){
// var graph = getActiveGraph().getGraph();
var
outPutForm
=
params
;
console
.
log
(
"子组件传回来的弹窗参数==="
,
outPutForm
);
// this.graph.getModel().beginUpdate();
...
...
@@ -1881,6 +1911,7 @@ export default {
var
edit
=
new
mxCellAttributeChange
(
this
.
doubleClickCell
,
name
,
outPutForm
[
name
]);
this
.
graph
.
getModel
().
execute
(
edit
);
}
<<<<<<<
HEAD
// } finally
// {
// this.graph.getModel().endUpdate();
...
...
@@ -1893,6 +1924,12 @@ export default {
// this.graph.getModel().execute(edit);
// }
// console.log(edit, 4564564564654);
=======
}
finally
{
this
.
graph
.
getModel
().
endUpdate
();
}
>>>>>>>
85
d62a150cdd3fb59b3a9d06d747f1bd21d9ab57
}
//输出组件保存******************/
},
...
...
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