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
7ab8c5db
Commit
7ab8c5db
authored
Jun 11, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Plain Diff
解决提交javascript冲突
parents
cb101400
629a3b65
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
229 additions
and
202 deletions
+229
-202
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+229
-202
No files found.
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
7ab8c5db
...
...
@@ -742,11 +742,8 @@
>
</getSystemInformation>
<!-- 自定义常量数据-->
<customConstant
ref=
"Constant"
:disabled=
"true"
...
...
@@ -757,7 +754,6 @@
>
</customConstant>
<!-- 生成随机数-->
<!-- <el-dialog
title="生成随机数"
...
...
@@ -765,11 +761,13 @@
width="800px"
:before-close="handleClose"
> -->
<randomNumber
ref=
"RandomValue"
<randomNumber
ref=
"RandomValue"
:disabled=
"true"
:form=
"form"
:RandomValueDialog
.
sync=
"RandomValueDialog"
:saveOutputDialog=
"saveOutputDialog"
>
:saveOutputDialog=
"saveOutputDialog"
>
</randomNumber>
<!-- <span slot="footer" class="dialog-footer">
...
...
@@ -791,8 +789,6 @@
:saveOutputDialog=
"saveOutputDialog"
></generatingRecords>
<!-- 文本文件输入-->
<textFileInput
...
...
@@ -805,8 +801,6 @@
:saveOutputDialog=
"saveOutputDialog"
></textFileInput>
<!-- 排序记录-->
<sortRecord
...
...
@@ -818,7 +812,6 @@
:saveOutputDialog=
"saveOutputDialog"
></sortRecord>
<!-- 设置变量-->
<setVariable
...
...
@@ -830,7 +823,6 @@
:saveOutputDialog=
"saveOutputDialog"
></setVariable>
<!-- 获取变量-->
<getVariable
...
...
@@ -842,8 +834,6 @@
:saveOutputDialog=
"saveOutputDialog"
></getVariable>
<!-- 合并记录-->
<mergeRecords
...
...
@@ -855,18 +845,14 @@
:saveOutputDialog=
"saveOutputDialog"
></mergeRecords>
<!-- 改变开始复制的数量 -->
<!-- 改变开始复制的数量 -->
<el-dialog
title=
"改变开始复制的数量"
:visible
.
sync=
"copyNumber"
width=
"300px"
:before-close=
"handleClose"
>
<el-form
ref=
"form"
:model=
"form"
>
<el-form
ref=
"form"
:model=
"form"
>
<el-form-item
label=
"复制的数量(1或跟多):"
>
<el-input
v-model=
"form.copies"
></el-input>
</el-form-item>
...
...
@@ -888,7 +874,7 @@
:saveOutputDialog=
"saveOutputDialog"
></selectField>
<!-- 去除重复 -->
<!-- 去除重复 -->
<toRepeat
ref=
"toRepeat"
:disabed=
"true"
...
...
@@ -898,10 +884,8 @@
:saveOutputDialog=
"saveOutputDialog"
></toRepeat>
<!-- 映射(子转换) -->
<mapping
<!-- 映射(子转换) -->
<mapping
ref=
"mapping"
:disabed=
"true"
:form=
"form"
...
...
@@ -909,7 +893,7 @@
:mappingDialog
.
sync=
"mappingDialog"
:saveOutputDialog=
"saveOutputDialog"
></mapping>
<!-- 映射输入 -->
<!-- 映射输入 -->
<mappingInput
ref=
"mappingInput"
:disabed=
"true"
...
...
@@ -918,7 +902,7 @@
:mappingInputDialog
.
sync=
"mappingInputDialog"
:saveOutputDialog=
"saveOutputDialog"
></mappingInput>
<!-- 映射输出 -->
<!-- 映射输出 -->
<mappingOutput
ref=
"mappingOutput"
:disabed=
"true"
...
...
@@ -937,7 +921,6 @@
:saveOutputDialog=
"saveOutputDialog"
></nullOperation>
<!-- Get data from XML -->
<xmlFileInput
ref=
"xmlFileInput"
...
...
@@ -950,12 +933,16 @@
<!-- 转换属性设置 -->
<conversionSettings
ref=
"conversionSettings"
:form=
"form"
:getXmlVal=
"getXmlVal"
:conversionSettingsDialog
.
sync=
"conversionSettingsDialog"
:doubleClickCell=
"doubleClickCell"
:saveOutputDialog1=
"saveOutputDialog1"
></conversionSettings>
<!-- 作业属性设置 -->
<jobSettings
ref=
"jobSettings"
:form=
"form"
:jobSettingsDialog
.
sync=
"jobSettingsDialog"
:doubleClickCell=
"doubleClickCell"
></jobSettings>
...
...
@@ -964,7 +951,10 @@
<importXmlFile
ref=
"importXmlFile"
:importXmlFileDialog
.
sync=
"importXmlFileDialog"
:form=
"form"
:nodeData=
"nodeData"
:doubleClickCell=
"doubleClickCell"
:saveOutputDialog=
"saveOutputDialog"
></importXmlFile>
<!-- 分组 -->
...
...
@@ -974,7 +964,7 @@
:groupingDialog
.
sync=
"groupingDialog"
:doubleClickCell=
"doubleClickCell"
></grouping>
<!-- 流查询 -->
<!-- 流查询 -->
<streamQuery
ref=
"streamQuery"
:form=
"form"
...
...
@@ -990,8 +980,6 @@
:doubleClickCell=
"doubleClickCell"
></sendMail>
<!-- 文件浏览器-->
<el-dialog
title=
"文件浏览器"
...
...
@@ -1147,8 +1135,6 @@
></columnChoose> -->
<!-- 转换弹窗组件end -->
<!-- 执行转换开始 -->
<trans-graph
ref=
"transRef"
...
...
@@ -1173,11 +1159,6 @@
></job-run>
<!-- 执行作业结束 -->
<!-- 数据浏览-->
<el-dialog
title=
"数据浏览"
...
...
@@ -1242,22 +1223,20 @@ import setVariable from "../appBulletFrame/setVariable"; //设置变量
import
getVariable
from
"../appBulletFrame/getVariable"
;
//获取变量
import
mergeRecords
from
"../appBulletFrame/mergeRecords"
;
//合并记录
import
selectField
from
"../appBulletFrame/selectField"
;
//选择字段
import
toRepeat
from
"../appBulletFrame/toRepeat"
//去除重复
import
mapping
from
"../appBulletFrame/mapping"
//映射(子转换)
import
mappingInput
from
"../appBulletFrame/mappingInput"
//映射输入
import
mappingOutput
from
"../appBulletFrame/mappingOutput"
//映射输出
import
xmlFileInput
from
"../appBulletFrame/xmlFileInput"
//xml文件输入
import
nullOperation
from
"../appBulletFrame/nullOperation"
//空操作
import
toRepeat
from
"../appBulletFrame/toRepeat"
;
//去除重复
import
mapping
from
"../appBulletFrame/mapping"
;
//映射(子转换)
import
mappingInput
from
"../appBulletFrame/mappingInput"
;
//映射输入
import
mappingOutput
from
"../appBulletFrame/mappingOutput"
;
//映射输出
import
xmlFileInput
from
"../appBulletFrame/xmlFileInput"
;
//xml文件输入
import
nullOperation
from
"../appBulletFrame/nullOperation"
;
//空操作
import
conversionSettings
from
"../appBulletFrame/conversionSettings"
;
//转换设置
import
jobSettings
from
"../appBulletFrame/jobSettings"
;
//作业设置
import
conversionSettings
from
"../appBulletFrame/conversionSettings"
//转换设置
import
jobSettings
from
"../appBulletFrame/jobSettings"
//作业设置
import
importXmlFile
from
"../appBulletFrame/importXmlFile"
//导出资源库到XML文件
import
grouping
from
"../appBulletFrame/grouping"
//分组
import
streamQuery
from
"../appBulletFrame/streamQuery"
//流查询
import
sendMail
from
"../appBulletFrame/sendMail"
//发送邮件
import
importXmlFile
from
"../appBulletFrame/importXmlFile"
;
//导出资源库到XML文件
import
grouping
from
"../appBulletFrame/grouping"
;
//分组
import
streamQuery
from
"../appBulletFrame/streamQuery"
;
//流查询
import
sendMail
from
"../appBulletFrame/sendMail"
;
//发送邮件
// 作业弹窗组件开始---------------------------------------
import
trans
from
"../../../job-dialog/trans"
;
...
...
@@ -1307,7 +1286,7 @@ export default {
props
:
[
"blankCanvas"
],
//从父组件传过来的值
data
()
{
return
{
copyNumber
:
false
,
//复制数量
copyNumber
:
false
,
//复制数量
jobRunVisible
:
false
,
//作业转换弹窗
serverDialogVisible
:
false
,
//子服务器弹窗
curFileType
:
"transformation"
,
//当前点击的文件的类型,默认是转换文件--mxl
...
...
@@ -1333,10 +1312,10 @@ export default {
outPutFormData
:
{},
//输出弹窗组件的表单值
// 转换33start---------
// 转换3end------------
outPutFormData16
:
{},
//脚本--执行sql脚本
doubleClickCell
:{},
getField
:[],
transGraphVisible
:
false
,
//执行转换弹窗
outPutFormData16
:
{},
//脚本--执行sql脚本
doubleClickCell
:
{},
getField
:
[],
transGraphVisible
:
false
,
//执行转换弹窗
monitorCanvas
:
""
,
//监听画布
getXmlVal
:
""
,
//获取上一个xml
keyHandler
:
null
,
...
...
@@ -1345,7 +1324,7 @@ export default {
xmlDocuments
:
""
,
//获取解码的xml
boxInformation
:
""
,
//弹框信息
toolItemData
:
{},
//新增节点时的值
doubleClickCell
:{},
//双击节点
doubleClickCell
:
{},
//双击节点
filter
:
{},
// mxl=================================
...
...
@@ -1373,24 +1352,24 @@ export default {
setVariableDialog
:
false
,
//设置变量
getVariableDialog
:
false
,
//获取变量
mergeRecordsDialog
:
false
,
//合并记录
selectFieldDialog
:
false
,
//选择字段
conversionSettingsDialog
:
false
,
//转换设置
jobSettingsDialog
:
false
,
//作业设置
toRepeatDialog
:
false
,
//去除重复
mappingDialog
:
false
,
//映射(子转换)
mappingInputDialog
:
false
,
//映射输入
mappingOutputDialog
:
false
,
//映射输出
nullOperationDialog
:
false
,
//空操作
xmlFileInputDialog
:
false
,
//xml文件输入
importXmlFileDialog
:
false
,
//导出资源库到XML文件
groupingDialog
:
false
,
//分组
streamQueryDialog
:
false
,
//流查询
sendMailDialog
:
false
,
//发送邮件
selectFieldDialog
:
false
,
//选择字段
conversionSettingsDialog
:
false
,
//转换设置
jobSettingsDialog
:
false
,
//作业设置
toRepeatDialog
:
false
,
//去除重复
mappingDialog
:
false
,
//映射(子转换)
mappingInputDialog
:
false
,
//映射输入
mappingOutputDialog
:
false
,
//映射输出
nullOperationDialog
:
false
,
//空操作
xmlFileInputDialog
:
false
,
//xml文件输入
importXmlFileDialog
:
false
,
//导出资源库到XML文件
groupingDialog
:
false
,
//分组
streamQueryDialog
:
false
,
//流查询
sendMailDialog
:
false
,
//发送邮件
// 流程弹窗组件start----------
// 流程弹窗组件end------------
// 脚本组件start-----
scriptVisible
:
false
,
javaScriptVisible
:
false
,
scriptVisible
:
false
,
// 脚本组件end-----
// 输入模块
...
...
@@ -1483,19 +1462,19 @@ export default {
setVariable
,
//设置变量
getVariable
,
//获取变量
mergeRecords
,
//合并记录
selectField
,
//选择字段
conversionSettings
,
//转换设置
jobSettings
,
//作业设置
toRepeat
,
//去除重复
mapping
,
//映射 (子转换)
mappingInput
,
//映射输入
mappingOutput
,
//映射输出
nullOperation
,
//空操作
xmlFileInput
,
//xml 文件输入
importXmlFile
,
//导出资源库到XML文件
grouping
,
//分组
streamQuery
,
//流查询
sendMail
,
//发送邮件
selectField
,
//选择字段
conversionSettings
,
//转换设置
jobSettings
,
//作业设置
toRepeat
,
//去除重复
mapping
,
//映射 (子转换)
mappingInput
,
//映射输入
mappingOutput
,
//映射输出
nullOperation
,
//空操作
xmlFileInput
,
//xml 文件输入
importXmlFile
,
//导出资源库到XML文件
grouping
,
//分组
streamQuery
,
//流查询
sendMail
,
//发送邮件
// 作业弹簧组件end----------------------
// 流程弹窗组件start---------
switchDialog
,
...
...
@@ -1757,7 +1736,6 @@ export default {
// }
// },
mergeRecordsDialogFun
()
{
this
.
mergeRecordsDialog
=
!
this
.
mergeRecordsDialog
;
this
.
form
.
keys
=
JSON
.
stringify
(
this
.
$refs
.
mergeRecordsDialog
.
keys
);
...
...
@@ -1772,11 +1750,9 @@ export default {
}
},
copyNumberFun
(){
console
.
log
(
this
.
form
,
"数据"
);
this
.
copyNumber
=
!
this
.
copyNumber
copyNumberFun
()
{
console
.
log
(
this
.
form
,
"数据"
);
this
.
copyNumber
=
!
this
.
copyNumber
;
for
(
let
name
in
this
.
form
)
{
var
edit
=
new
mxCellAttributeChange
(
...
...
@@ -1787,8 +1763,8 @@ export default {
this
.
graph
.
getModel
().
execute
(
edit
);
}
this
.
form
=
{}
console
.
log
(
this
.
form
,
"7798798798"
);
this
.
form
=
{}
;
console
.
log
(
this
.
form
,
"7798798798"
);
},
// getVariableDialogFun() {
...
...
@@ -2073,13 +2049,11 @@ export default {
this
.
graph
.
setMultigraph
(
false
);
this
.
graph
.
convertValueToString
=
(
cell
)
=>
{
console
.
log
(
cell
,
"888888888888888888888888888888888"
);
console
.
log
(
cell
,
"888888888888888888888888888888888"
);
var
label
=
cell
.
getAttribute
(
"label"
);
;
if
(
label
)
{
if
(
cell
.
isEdge
()
&&
cell
.
value
.
nodeName
==
"TransHop"
)
{
return
'<img src="'
+
label
+
'" width="16" height="16" />'
;
}
else
if
(
cell
.
isEdge
()
&&
cell
.
value
.
nodeName
==
"JobHop"
)
{
console
.
log
(
label
,
"label"
);
// var jsonArray = JSON.parse(label), label = '';
...
...
@@ -2095,15 +2069,19 @@ export default {
return
label
;
}
else
{
if
(
this
.
curFileType
==
"transformation"
)
{
return
decodeURIComponent
(
label
)
+
" "
+
"X"
+
cell
.
value
.
attributes
.
copies
.
value
;
}
else
{
return
decodeURIComponent
(
label
)
return
(
decodeURIComponent
(
label
)
+
" "
+
"X"
+
cell
.
value
.
attributes
.
copies
.
value
);
}
else
{
return
decodeURIComponent
(
label
);
}
}
}
return
label
;
return
label
;
// console.log(cell.value.attributes,99999999999999);
// if (!cell.title && cell.value) {
...
...
@@ -2168,20 +2146,15 @@ export default {
this
.
graph
.
addListener
(
mxEvent
.
DOUBLE_CLICK
,
(
graph
,
evt
)
=>
{
console
.
log
(
evt
);
console
.
log
(
"当前点击的文件类型****************"
,
this
.
curFileType
);
// this.xmlDocuments = mxUtils.parseXml(decodeURIComponent(this.blankCanvas));
this
.
graphXml
=
this
.
encode
(
this
.
graph
);
console
.
log
(
this
.
graphXml
,
11111111111111111111111
);
// 监听双击事件
const
cell
=
this
.
R
.
pathOr
([],
[
"properties"
,
"cell"
],
evt
);
console
.
info
(
cell
);
// 在控制台输出双击的cell
this
.
nodeData
=
cell
;
// this.setXml();
this
.
doubleClickCell
=
cell
;
// 获取接口数据
availableCharsets
(
pamer
).
then
((
res
)
=>
{
this
.
codingType
=
res
;
...
...
@@ -2202,98 +2175,122 @@ export default {
valueFormat
(
pamer2
).
then
((
res
)
=>
{
this
.
fieldFormat
=
res
;
});
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step79"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Mail"
)
{
this
.
sendMailDialog
=
!
this
.
sendMailDialog
this
.
form
=
this
.
showDataFunc
()
// if (this.curFileType == "transformation" && cell.dis == "step98") ||
// cell.value.attributes.ctype.value == "Dummy" ) {
// }else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"srep98"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Dummy"
)
{
this
.
nullOperationDialog
=
!
this
.
nullOperationDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
sendMail
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
nullOperation
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step126"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"StreamLookup"
)
{
this
.
streamQueryDialog
=
!
this
.
streamQueryDialog
this
.
form
=
this
.
showDataFunc
()
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step79"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Mail"
)
{
this
.
sendMailDialog
=
!
this
.
sendMailDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
s
treamQuery
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
s
endMail
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step143"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"GroupBy"
)
{
this
.
groupingDialog
=
!
this
.
groupingDialog
this
.
form
=
this
.
showDataFunc
()
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step126"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"StreamLookup"
)
{
this
.
streamQueryDialog
=
!
this
.
streamQueryDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
streamQuery
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step143"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"GroupBy"
)
{
this
.
groupingDialog
=
!
this
.
groupingDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
grouping
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
grouping
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step6"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"getXMLData"
)
{
this
.
xmlFileInputDialog
=
!
this
.
xmlFileInputDialog
this
.
form
=
this
.
showDataFunc
()
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step6"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"getXMLData"
)
{
this
.
xmlFileInputDialog
=
!
this
.
xmlFileInputDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
xmlFileInput
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
xmlFileInput
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step166"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Mapping"
)
{
this
.
mappingDialog
=
!
this
.
mappingDialog
this
.
form
=
this
.
showDataFunc
()
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step166"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Mapping"
)
{
this
.
mappingDialog
=
!
this
.
mappingDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
mapping
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
mapping
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step56"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Unique"
)
{
this
.
toRepeatDialog
=
!
this
.
toRepeatDialog
this
.
form
=
this
.
showDataFunc
()
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step56"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Unique"
)
{
this
.
toRepeatDialog
=
!
this
.
toRepeatDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
toRepeat
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
toRepeat
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step61"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SelectValues"
)
{
this
.
selectFieldDialog
=
!
this
.
selectFieldDialog
this
.
form
=
this
.
showDataFunc
()
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step61"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SelectValues"
)
{
this
.
selectFieldDialog
=
!
this
.
selectFieldDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
selectField
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
selectField
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step130"
||
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step130"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"MergeRows"
)
{
this
.
mergeRecordsDialog
=
!
this
.
mergeRecordsDialog
;
this
.
form
=
this
.
showDataFunc
()
this
.
form
=
this
.
showDataFunc
()
;
setTimeout
(()
=>
{
this
.
$refs
.
mergeRecords
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
mergeRecords
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
return
;
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step162"
||
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step162"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"GetVariable"
)
{
this
.
getVariableDialog
=
!
this
.
getVariableDialog
;
this
.
form
=
this
.
showDataFunc
()
this
.
form
=
this
.
showDataFunc
()
;
setTimeout
(()
=>
{
this
.
$refs
.
getVariable
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
getVariable
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
return
;
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step163"
||
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step163"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SetVariable"
)
{
this
.
setVariableDialog
=
!
this
.
setVariableDialog
;
this
.
form
=
this
.
showDataFunc
()
this
.
form
=
this
.
showDataFunc
()
;
setTimeout
(()
=>
{
this
.
$refs
.
setVariable
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
setVariable
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
return
;
}
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step66"
||
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step66"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SortRows"
)
{
this
.
sortRecordDialog
=
!
this
.
sortRecordDialog
;
this
.
form
=
this
.
showDataFunc
()
this
.
form
=
this
.
showDataFunc
()
;
setTimeout
(()
=>
{
this
.
$refs
.
sortRecord
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
sortRecord
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
return
;
}
else
if
(
...
...
@@ -2317,8 +2314,8 @@ export default {
this
.
fields
=
q
.
fields
;
this
.
file
=
q
.
file
;
return
;
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
ids
==
"step28"
||
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
ids
==
"step28"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TableInput"
)
{
this
.
TableInputDialog
=
!
this
.
TableInputDialog
;
...
...
@@ -2329,14 +2326,14 @@ export default {
},
500
);
return
;
}
else
if
(
this
.
curFileType
==
"transformation"
&&
cell
.
ids
==
"step25"
||
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
ids
==
"step25"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SystemInfo"
)
{
this
.
SystemInfoDialog
=
!
this
.
SystemInfoDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
SystemInfo
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
this
.
$refs
.
SystemInfo
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
},
500
);
return
;
}
else
if
(
...
...
@@ -2347,7 +2344,7 @@ export default {
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
Constant
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
this
.
$refs
.
Constant
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
},
500
);
return
;
}
else
if
(
...
...
@@ -2357,7 +2354,7 @@ export default {
this
.
RandomValueDialog
=
!
this
.
RandomValueDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
RandomValue
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
this
.
$refs
.
RandomValue
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
},
500
);
return
;
}
else
if
(
...
...
@@ -2367,7 +2364,7 @@ export default {
this
.
RowGeneratorDialog
=
!
this
.
RowGeneratorDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
RowGenerator
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
RowGenerator
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
return
;
}
else
if
(
...
...
@@ -2378,7 +2375,7 @@ export default {
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
TextFileInput
.
clickFun
(
this
.
graph
,
this
.
form
);
this
.
$refs
.
TextFileInput
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
return
;
}
else
if
(
...
...
@@ -2537,20 +2534,26 @@ export default {
this
.
$refs
.
mytrans
.
clickFun
(
this
.
graph
);
//向子组件传递画布
},
500
);
return
;
}
else
if
((
this
.
curFileType
==
"transformation"
&&
cell
.
ids
==
"step45"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"ExecSQL"
){
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
ids
==
"step45"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"ExecSQL"
)
{
//流程--Switch / Case
this
.
scriptVisible
=
!
this
.
scriptVisible
;
this
.
outPutFormData16
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
script
.
clickFun
(
this
.
graph
);
//向子组件传递画布
this
.
$refs
.
script
.
clickFun
(
this
.
graph
);
//向子组件传递画布
},
500
);
return
;
}
else
if
((
this
.
curFileType
==
"job"
&&
cell
.
ids
==
"step63"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"EXPORT_REPOSITORY"
){
}
else
if
(
(
this
.
curFileType
==
"job"
&&
cell
.
ids
==
"step63"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"EXPORT_REPOSITORY"
)
{
//资源库 --导出资源库XML文件
this
.
importXmlFileDialog
=
!
this
.
importXmlFileDialog
;
this
.
form
=
this
.
showDataFunc
()
this
.
form
=
this
.
showDataFunc
()
;
setTimeout
(()
=>
{
this
.
$refs
.
importXmlFile
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
this
.
$refs
.
importXmlFile
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
},
500
);
return
;
}
else
if
((
this
.
curFileType
==
"transformation"
&&
cell
.
ids
==
"step106"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"ScriptValueMod"
){
...
...
@@ -2568,60 +2571,65 @@ export default {
// console.log(evt);
// 监听单击事件
const
cell
=
this
.
R
.
pathOr
([],
[
"properties"
,
"cell"
],
evt
);
});
mxEvent
.
disableContextMenu
(
document
.
body
);
this
.
graph
.
popupMenuHandler
.
autoExpand
=
true
;
this
.
graph
.
popupMenuHandler
.
factoryMethod
=
(
menu
,
cell
,
evt
)
=>
{
let
root
=
this
.
graph
.
getDefaultParent
();
// this.doubleClickCell = cell;
console
.
log
(
"root-"
,
root
,
"cell"
,
cell
);
let
channelLogTable
=
JSON
.
parse
(
root
.
getAttribute
(
"channelLogTable"
));
console
.
log
(
"channelLogTable-"
,
channelLogTable
);
let
q
=
{};
let
obj
=
root
.
value
.
attributes
;
for
(
let
vel
in
obj
)
{
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
if
(
!
cell
)
{
if
(
this
.
curFileType
==
"transformation"
)
{
//画布右键
menu
.
addItem
(
"转换属性设置"
,
null
,
()
=>
{
console
.
log
(
cell
,
"当前节点"
);
this
.
conversionSettingsDialog
=
!
this
.
conversionSettingsDialog
this
.
conversionSettingsDialog
=
!
this
.
conversionSettingsDialog
;
this
.
form
=
q
;
setTimeout
(()
=>
{
this
.
$refs
.
conversionSettings
.
clickFun
(
this
.
graph
,
this
.
form
);
//向子组件传递画布
},
500
);
});
menu
.
addItem
(
"映射输入规范"
,
null
,
()
=>
{
console
.
log
(
cell
,
"当前节点"
);
this
.
mappingInputDialog
=
!
this
.
mappingInputDialog
this
.
mappingInputDialog
=
!
this
.
mappingInputDialog
;
});
menu
.
addItem
(
"映射输出规范"
,
null
,
()
=>
{
console
.
log
(
cell
,
"当前节点"
);
this
.
mappingOutputDialog
=
!
this
.
mappingOutputDialog
this
.
mappingOutputDialog
=
!
this
.
mappingOutputDialog
;
});
menu
.
addItem
(
"空操作"
,
null
,
()
=>
{
console
.
log
(
cell
,
"当前节点"
);
this
.
nullOperationDialog
=
!
this
.
nullOperationDialog
});
// menu.addItem("空操作", null, () => {
// console.log(cell, "当前节点");
// this.nullOperationDialog = !this.nullOperationDialog;
// });
menu
.
addSeparator
();
}
else
{
//画布右键
menu
.
addItem
(
"作业属性设置"
,
null
,
()
=>
{
console
.
log
(
cell
,
"当前节点"
);
this
.
jobSettingsDialog
=
!
this
.
jobSettingsDialog
this
.
jobSettingsDialog
=
!
this
.
jobSettingsDialog
;
});
menu
.
addSeparator
();
}
}
else
{
//节点右键
menu
.
addItem
(
"改变开始复制的数量"
,
null
,
()
=>
{
console
.
log
(
cell
,
"当前节点"
);
console
.
log
(
this
.
form
,
"当前数据"
);
console
.
log
(
this
.
form
,
"当前数据"
);
if
(
this
.
form
.
label
)
{
this
.
copyNumber
=
!
this
.
copyNumber
}
else
{
this
.
$message
.
error
(
"请先双击打开节点"
)
this
.
copyNumber
=
!
this
.
copyNumber
;
}
else
{
this
.
$message
.
error
(
"请先双击打开节点"
)
;
}
});
menu
.
addSeparator
();
}
...
...
@@ -2632,7 +2640,6 @@ export default {
newHop
(
cell
)
{
var
doc
=
mxUtils
.
createXmlDocument
();
var
hop
=
doc
.
createElement
(
"JobHop"
);
hop
.
setAttribute
(
"from"
,
cell
.
source
.
getAttribute
(
"label"
));
hop
.
setAttribute
(
"to"
,
cell
.
target
.
getAttribute
(
"label"
));
hop
.
setAttribute
(
"from_nr"
,
cell
.
source
.
getAttribute
(
"nr"
));
...
...
@@ -2666,13 +2673,11 @@ export default {
// 回显数据封装的方法
showDataFunc
()
{
let
q
=
{};
let
obj
=
this
.
doubleClickCell
.
value
.
attributes
;
for
(
let
vel
in
obj
)
{
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
return
q
;
},
...
...
@@ -3138,7 +3143,28 @@ export default {
// .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
)
{
var
outPutForm
=
params
;
console
.
log
(
"子组件传回来的弹窗参数==="
,
outPutForm
);
...
...
@@ -3151,6 +3177,7 @@ export default {
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