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
f84b3786
Commit
f84b3786
authored
Apr 10, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
执行转换修改成功
parent
f78ed2db
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
21 deletions
+57
-21
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+3
-0
src/views/dialogs-components/global/trans-graph/main.vue
+28
-3
src/views/output-dialog/Excel-output.vue
+9
-9
src/views/output-dialog/table-out.vue
+17
-9
No files found.
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
f84b3786
...
@@ -891,6 +891,7 @@
...
@@ -891,6 +891,7 @@
<!-- 输出弹窗end================== -->
<!-- 输出弹窗end================== -->
<trans-graph
<trans-graph
ref=
"transRef"
:transGraphVisible
.
sync=
"transGraphVisible"
:transGraphVisible
.
sync=
"transGraphVisible"
:getXmlVal=
"getXmlVal"
:getXmlVal=
"getXmlVal"
></trans-graph>
></trans-graph>
...
@@ -2068,6 +2069,8 @@ previousField(){
...
@@ -2068,6 +2069,8 @@ previousField(){
// 执行转换
// 执行转换
doTrans
()
{
doTrans
()
{
this
.
transGraphVisible
=
!
this
.
transGraphVisible
;
this
.
transGraphVisible
=
!
this
.
transGraphVisible
;
this
.
$refs
.
transRef
.
clickFun
(
this
.
graph
);
},
},
// //重绘流程图
// //重绘流程图
...
...
src/views/dialogs-components/global/trans-graph/main.vue
View file @
f84b3786
...
@@ -48,6 +48,20 @@
...
@@ -48,6 +48,20 @@
</template>
</template>
<
script
>
<
script
>
import
mxgraph
from
"@/utils/mxgraph"
;
const
{
mxGraph
,
mxUtils
,
mxEvent
,
mxKeyHandler
,
mxRubberband
,
mxConstants
,
mxStencilRegistry
,
mxStencil
,
mxCodec
,
mxGraphModel
,
mxGeometry
,
}
=
mxgraph
import
{
import
{
doTrans
,
//获取表输出
doTrans
,
//获取表输出
doRun
,
//启动
doRun
,
//启动
...
@@ -56,6 +70,7 @@ export default ({
...
@@ -56,6 +70,7 @@ export default ({
name
:
"trans-graph"
,
name
:
"trans-graph"
,
data
(){
data
(){
return
{
return
{
newGraph
:{},
finished
:
false
,
//只有执行成功才显示日志
finished
:
false
,
//只有执行成功才显示日志
executionId
:
null
,
//执行转换返回id
executionId
:
null
,
//执行转换返回id
mylog
:
''
,
//日志
mylog
:
''
,
//日志
...
@@ -152,8 +167,8 @@ export default ({
...
@@ -152,8 +167,8 @@ export default ({
],
],
tableData
:
[{
tableData
:
[{
name
:
'
3
'
,
name
:
''
,
num
:
'
鞠婧祎
'
,
num
:
''
,
r
:
''
,
r
:
''
,
x
:
''
,
x
:
''
,
i
:
''
,
i
:
''
,
...
@@ -195,6 +210,10 @@ export default ({
...
@@ -195,6 +210,10 @@ export default ({
},
},
methods
:{
methods
:{
clickFun
(
graph
){
console
.
log
(
graph
,
1
)
this
.
newGraph
=
graph
},
handleClose
(){
handleClose
(){
this
.
$emit
(
"update:transGraphVisible"
,
false
);
this
.
$emit
(
"update:transGraphVisible"
,
false
);
},
},
...
@@ -249,8 +268,14 @@ export default ({
...
@@ -249,8 +268,14 @@ export default ({
// 启动
// 启动
doRun
(){
doRun
(){
// 画布xml转码
const
codec
=
new
mxCodec
();
const
encodedModel
=
codec
.
encode
(
this
.
newGraph
.
getModel
());
console
.
log
(
encodedModel
,
46546465456
);
var
myXmlVal
=
mxUtils
.
getXml
(
encodedModel
);
let
pamer
=
new
FormData
();
// 创建form对象
let
pamer
=
new
FormData
();
// 创建form对象
pamer
.
append
(
"graphXml"
,
this
.
get
XmlVal
);
pamer
.
append
(
"graphXml"
,
my
XmlVal
);
var
executParam
=
{
var
executParam
=
{
"exec_local"
:
"Y"
,
"exec_local"
:
"Y"
,
...
...
src/views/output-dialog/Excel-output.vue
View file @
f84b3786
...
@@ -7,13 +7,14 @@
...
@@ -7,13 +7,14 @@
:before-close=
"handleClose"
:before-close=
"handleClose"
top=
"10%"
top=
"10%"
>
>
<el-form
ref=
"stepName"
:model=
"stepName"
label-width=
"120px"
>
<!--
<el-form
ref=
"stepName"
:model=
"stepName"
label-width=
"120px"
>
-->
<el-form
ref=
"excelForm"
:model=
"excelForm"
label-width=
"200px"
>
<el-form-item
label=
"步骤名称:"
>
<el-form-item
label=
"步骤名称:"
>
<el-input
v-model=
"
stepName.name
"
></el-input>
<el-input
v-model=
"
excelForm.label
"
></el-input>
</el-form-item>
</el-form-item>
<
/el-form
>
<
!--
</el-form>
--
>
<
el-form
ref=
"excelForm"
:model=
"excelForm"
label-width=
"200px"
>
<
!--
<el-form
ref=
"excelForm"
:model=
"excelForm"
label-width=
"200px"
>
--
>
<el-tabs
v-model=
"activeName"
type=
"border-card"
>
<el-tabs
v-model=
"activeName"
type=
"border-card"
>
<el-tab-pane
label=
"文件"
name=
"content"
>
<el-tab-pane
label=
"文件"
name=
"content"
>
<el-form-item
label=
"文件名:"
>
<el-form-item
label=
"文件名:"
>
...
@@ -602,6 +603,7 @@ export default ({
...
@@ -602,6 +603,7 @@ export default ({
default
:
false
default
:
false
},
},
saveOutputDialog
:
Function
,
saveOutputDialog
:
Function
,
doubleClickCell
:
Object
},
},
// mounted(){
// mounted(){
...
@@ -621,9 +623,6 @@ export default ({
...
@@ -621,9 +623,6 @@ export default ({
clickFun
(
graph
){
clickFun
(
graph
){
console
.
log
(
graph
,
1
)
console
.
log
(
graph
,
1
)
this
.
newGraph
=
graph
this
.
newGraph
=
graph
// setTimeout(() => {
// this.$refs.databaseChoose.clickFun(graph,121331);
// }, 500);
},
},
handleClose
(){
handleClose
(){
this
.
$emit
(
"update:excelOutPutVisible"
,
false
);
this
.
$emit
(
"update:excelOutPutVisible"
,
false
);
...
@@ -730,8 +729,8 @@ export default ({
...
@@ -730,8 +729,8 @@ export default ({
confirm
(){
confirm
(){
console
.
log
(
'步骤名称==:'
,
this
.
stepName
);
//
console.log('步骤名称==:',this.stepName);
this
.
excelForm
.
label
=
this
.
stepName
.
name
;
//
this.excelForm.label=this.stepName.name;
this
.
excelForm
.
fields
=
JSON
.
stringify
(
this
.
tableData
);
//更新字段
this
.
excelForm
.
fields
=
JSON
.
stringify
(
this
.
tableData
);
//更新字段
console
.
log
(
'弹窗数据:'
,
this
.
excelForm
);
console
.
log
(
'弹窗数据:'
,
this
.
excelForm
);
this
.
saveOutputDialog
(
this
.
excelForm
);
this
.
saveOutputDialog
(
this
.
excelForm
);
...
@@ -808,6 +807,7 @@ export default ({
...
@@ -808,6 +807,7 @@ export default ({
inputOutputFields
(
pamer
).
then
(
res
=>
{
inputOutputFields
(
pamer
).
then
(
res
=>
{
console
.
log
(
'字段'
,
res
);
console
.
log
(
'字段'
,
res
);
// this.fieldsList2=res;
// this.fieldsList2=res;
this
.
tableData
=
res
;
})
})
},
},
...
...
src/views/output-dialog/table-out.vue
View file @
f84b3786
...
@@ -309,19 +309,27 @@ export default ({
...
@@ -309,19 +309,27 @@ export default ({
},
},
watch
:{
watch
:{
tableOutForm
:{
// tableOutForm:{
// deep:true,
// // deep:true,
// immediate:true,
// // immediate:true,
handler
:
function
(
n
,
o
){
// handler:function(n,o){
console
.
log
(
"回显的表单数据==="
,
n
);
// console.log("回显的表单数据===",n);
// if(n){
// var ny=JSON.parse(n.fields);
// this.tableData=ny;
// }
// }
// },
tableOutForm
(
n
,
o
){
console
.
log
(
"回显的表单数据==="
,
n
);
if
(
n
){
if
(
n
){
var
ny
=
JSON
.
parse
(
n
.
fields
);
var
ny
=
JSON
.
parse
(
n
.
fields
);
this
.
tableData
=
ny
;
this
.
tableData
=
ny
;
}
}
},
}
},
graph
(
n
,
o
){
graph
(
n
,
o
){
console
.
log
(
"表输出拿到的画布1111==="
,
n
);
console
.
log
(
"表输出拿到的画布1111==="
,
n
);
}
}
...
...
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