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
629a3b65
Commit
629a3b65
authored
Jun 10, 2021
by
李耀琨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出xml
parent
582d0eb8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
16 deletions
+91
-16
src/api/kettle/link.js
+21
-0
src/views/dashboard-kettle/components/appBulletFrame/conversionSettings.vue
+0
-0
src/views/dashboard-kettle/components/appBulletFrame/importXmlFile.vue
+0
-0
src/views/dashboard-kettle/components/appBulletFrame/mapping.vue
+18
-1
src/views/dashboard-kettle/components/appBulletFrame/tableInput.vue
+0
-1
src/views/dashboard-kettle/components/appBulletFrame/textFileInput.vue
+0
-0
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+52
-14
No files found.
src/api/kettle/link.js
View file @
629a3b65
...
@@ -409,3 +409,24 @@ export function locale(data){
...
@@ -409,3 +409,24 @@ export function locale(data){
method
:
'post'
method
:
'post'
})
})
}
}
// 从文件获取字段
export
function
mappingFields
(
data
){
return
request
({
url
:
'etlweb/trans/mappingFields'
,
data
,
method
:
'post'
})
}
// 获取日期格式
export
function
datetimeformat
(
data
){
return
request
({
url
:
'etlweb/system/datetimeformat'
,
data
,
method
:
'post'
})
}
src/views/dashboard-kettle/components/appBulletFrame/conversionSettings.vue
View file @
629a3b65
This diff is collapsed.
Click to expand it.
src/views/dashboard-kettle/components/appBulletFrame/importXmlFile.vue
View file @
629a3b65
This diff is collapsed.
Click to expand it.
src/views/dashboard-kettle/components/appBulletFrame/mapping.vue
View file @
629a3b65
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
输出时字段名再重新映射回原来输入时的名字?
输出时字段名再重新映射回原来输入时的名字?
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<el-button>
字段映射...
</el-button>
<el-button
@
click=
"fieldMapping"
>
字段映射...
</el-button>
</el-col>
</el-col>
...
@@ -465,6 +465,7 @@ import {
...
@@ -465,6 +465,7 @@ import {
availableCharsets
,
availableCharsets
,
previousSteps
,
previousSteps
,
inputOutputFields
,
inputOutputFields
,
mappingFields
}
from
"@/api/kettle/link"
;
}
from
"@/api/kettle/link"
;
export
default
{
export
default
{
props
:
[
"form"
,
"nodeData"
,
"saveOutputDialog"
,
"mappingDialog"
],
//从父组件传过来的值
props
:
[
"form"
,
"nodeData"
,
"saveOutputDialog"
,
"mappingDialog"
],
//从父组件传过来的值
...
@@ -574,6 +575,22 @@ export default {
...
@@ -574,6 +575,22 @@ export default {
}
}
},
},
fieldMapping
(){
var
enc
=
new
mxCodec
(
mxUtils
.
createXmlDocument
());
var
node
=
enc
.
encode
(
this
.
newGraph
.
getModel
());
this
.
graphXml
=
mxUtils
.
getPrettyXml
(
node
);
let
pamerFields
=
new
FormData
();
// 创建form对象
pamerFields
.
append
(
"stepName"
,
this
.
nodeData
.
value
.
attributes
.
label
.
value
);
pamerFields
.
append
(
"graphXml"
,
this
.
graphXml
);
pamerFields
.
append
(
"before"
,
true
);
mappingFields
(
pamerFields
).
then
(
res
=>
{
console
.
log
(
res
);
})
},
route
(
flowData
){
route
(
flowData
){
this
.
localPath
.
fileName
=
flowData
.
name
this
.
localPath
.
fileName
=
flowData
.
name
...
...
src/views/dashboard-kettle/components/appBulletFrame/tableInput.vue
View file @
629a3b65
...
@@ -303,7 +303,6 @@ export default {
...
@@ -303,7 +303,6 @@ export default {
getGraphDataBases
()
{
getGraphDataBases
()
{
// var graph = this.getGraph();
// var graph = this.getGraph();
var
root
=
this
.
newGraph
.
getDefaultParent
(),
var
root
=
this
.
newGraph
.
getDefaultParent
(),
data
=
[];
data
=
[];
if
(
root
.
getAttribute
(
"databases"
)
!=
null
)
if
(
root
.
getAttribute
(
"databases"
)
!=
null
)
...
...
src/views/dashboard-kettle/components/appBulletFrame/textFileInput.vue
View file @
629a3b65
This diff is collapsed.
Click to expand it.
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
629a3b65
...
@@ -934,8 +934,10 @@
...
@@ -934,8 +934,10 @@
<conversionSettings
<conversionSettings
ref=
"conversionSettings"
ref=
"conversionSettings"
:form=
"form"
:form=
"form"
:getXmlVal=
"getXmlVal"
:conversionSettingsDialog
.
sync=
"conversionSettingsDialog"
:conversionSettingsDialog
.
sync=
"conversionSettingsDialog"
:doubleClickCell=
"doubleClickCell"
:doubleClickCell=
"doubleClickCell"
:saveOutputDialog1=
"saveOutputDialog1"
></conversionSettings>
></conversionSettings>
<!-- 作业属性设置 -->
<!-- 作业属性设置 -->
<jobSettings
<jobSettings
...
@@ -949,7 +951,10 @@
...
@@ -949,7 +951,10 @@
<importXmlFile
<importXmlFile
ref=
"importXmlFile"
ref=
"importXmlFile"
:importXmlFileDialog
.
sync=
"importXmlFileDialog"
:importXmlFileDialog
.
sync=
"importXmlFileDialog"
:form=
"form"
:nodeData=
"nodeData"
:doubleClickCell=
"doubleClickCell"
:doubleClickCell=
"doubleClickCell"
:saveOutputDialog=
"saveOutputDialog"
></importXmlFile>
></importXmlFile>
<!-- 分组 -->
<!-- 分组 -->
...
@@ -2165,7 +2170,21 @@ export default {
...
@@ -2165,7 +2170,21 @@ export default {
valueFormat
(
pamer2
).
then
((
res
)
=>
{
valueFormat
(
pamer2
).
then
((
res
)
=>
{
this
.
fieldFormat
=
res
;
this
.
fieldFormat
=
res
;
});
});
// if (this.curFileType == "transformation" && cell.dis == "step98") ||
// cell.value.attributes.ctype.value == "Dummy" ) {
// }else
if
(
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"srep98"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Dummy"
)
{
this
.
nullOperationDialog
=
!
this
.
nullOperationDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
nullOperation
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step79"
)
||
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step79"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Mail"
cell
.
value
.
attributes
.
ctype
.
value
==
"Mail"
)
{
)
{
...
@@ -2174,8 +2193,7 @@ export default {
...
@@ -2174,8 +2193,7 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
sendMail
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
sendMail
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
},
500
);
}
}
else
if
(
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step126"
)
||
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step126"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"StreamLookup"
cell
.
value
.
attributes
.
ctype
.
value
==
"StreamLookup"
)
{
)
{
...
@@ -2184,8 +2202,7 @@ export default {
...
@@ -2184,8 +2202,7 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
streamQuery
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
streamQuery
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
},
500
);
}
}
else
if
(
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step143"
)
||
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step143"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"GroupBy"
cell
.
value
.
attributes
.
ctype
.
value
==
"GroupBy"
)
{
)
{
...
@@ -2261,8 +2278,7 @@ export default {
...
@@ -2261,8 +2278,7 @@ export default {
this
.
$refs
.
setVariable
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
setVariable
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
},
500
);
return
;
return
;
}
}
else
if
(
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step66"
)
||
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step66"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SortRows"
cell
.
value
.
attributes
.
ctype
.
value
==
"SortRows"
)
{
)
{
...
@@ -2548,7 +2564,8 @@ export default {
...
@@ -2548,7 +2564,8 @@ export default {
this
.
graph
.
popupMenuHandler
.
autoExpand
=
true
;
this
.
graph
.
popupMenuHandler
.
autoExpand
=
true
;
this
.
graph
.
popupMenuHandler
.
factoryMethod
=
(
menu
,
cell
,
evt
)
=>
{
this
.
graph
.
popupMenuHandler
.
factoryMethod
=
(
menu
,
cell
,
evt
)
=>
{
let
root
=
this
.
graph
.
getDefaultParent
();
let
root
=
this
.
graph
.
getDefaultParent
();
console
.
log
(
"root-"
,
root
);
// this.doubleClickCell = cell;
console
.
log
(
"root-"
,
root
,
"cell"
,
cell
);
let
channelLogTable
=
JSON
.
parse
(
root
.
getAttribute
(
"channelLogTable"
));
let
channelLogTable
=
JSON
.
parse
(
root
.
getAttribute
(
"channelLogTable"
));
console
.
log
(
"channelLogTable-"
,
channelLogTable
);
console
.
log
(
"channelLogTable-"
,
channelLogTable
);
...
@@ -2566,9 +2583,8 @@ export default {
...
@@ -2566,9 +2583,8 @@ export default {
this
.
conversionSettingsDialog
=
!
this
.
conversionSettingsDialog
;
this
.
conversionSettingsDialog
=
!
this
.
conversionSettingsDialog
;
this
.
form
=
q
;
this
.
form
=
q
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
conversionSettings
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
this
.
$refs
.
conversionSettings
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
},
500
);
},
500
);
});
});
menu
.
addItem
(
"映射输入规范"
,
null
,
()
=>
{
menu
.
addItem
(
"映射输入规范"
,
null
,
()
=>
{
console
.
log
(
cell
,
"当前节点"
);
console
.
log
(
cell
,
"当前节点"
);
...
@@ -2578,10 +2594,10 @@ export default {
...
@@ -2578,10 +2594,10 @@ export default {
console
.
log
(
cell
,
"当前节点"
);
console
.
log
(
cell
,
"当前节点"
);
this
.
mappingOutputDialog
=
!
this
.
mappingOutputDialog
;
this
.
mappingOutputDialog
=
!
this
.
mappingOutputDialog
;
});
});
menu
.
addItem
(
"空操作"
,
null
,
()
=>
{
//
menu.addItem("空操作", null, () => {
console
.
log
(
cell
,
"当前节点"
);
//
console.log(cell, "当前节点");
this
.
nullOperationDialog
=
!
this
.
nullOperationDialog
;
//
this.nullOperationDialog = !this.nullOperationDialog;
});
//
});
menu
.
addSeparator
();
menu
.
addSeparator
();
}
else
{
}
else
{
//画布右键
//画布右键
...
@@ -3114,7 +3130,28 @@ export default {
...
@@ -3114,7 +3130,28 @@ export default {
// .catch(() => {});
// .catch(() => {});
},
},
//输出组件保存************************
//画布属性保存*************
saveOutputDialog1
(
params
)
{
var
outPutForm
=
params
;
console
.
log
(
"子组件传回来的弹窗参数==="
,
outPutForm
);
this
.
graph
.
getModel
().
beginUpdate
();
try
{
let
root
=
this
.
graph
.
getDefaultParent
();
for
(
var
name
in
outPutForm
)
{
// var edit = new mxCellAttributeChange(
// this.doubleClickCell,
// name,
// outPutForm[name]
// );
// this.graph.getModel().execute(edit);
root
.
setAttribute
(
name
,
outPutForm
[
name
]);
}
}
finally
{
this
.
graph
.
getModel
().
endUpdate
();
}
},
// 组件数据保存***********
saveOutputDialog
(
params
)
{
saveOutputDialog
(
params
)
{
var
outPutForm
=
params
;
var
outPutForm
=
params
;
console
.
log
(
"子组件传回来的弹窗参数==="
,
outPutForm
);
console
.
log
(
"子组件传回来的弹窗参数==="
,
outPutForm
);
...
@@ -3127,6 +3164,7 @@ export default {
...
@@ -3127,6 +3164,7 @@ export default {
this
.
graph
.
getModel
().
execute
(
edit
);
this
.
graph
.
getModel
().
execute
(
edit
);
}
}
},
},
//输出组件保存******************/
//输出组件保存******************/
},
},
};
};
...
...
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