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
844e6e00
Commit
844e6e00
authored
Apr 08, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
bb5c77fa
1fa2926e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
267 additions
and
180 deletions
+267
-180
src/views/dashboard-kettle/components/appBulletFrame/tableInput.vue
+90
-106
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+172
-70
src/views/kettle/home2.vue
+2
-3
src/views/mykettle/main.vue
+3
-1
No files found.
src/views/dashboard-kettle/components/appBulletFrame/tableInput.vue
View file @
844e6e00
...
...
@@ -2,7 +2,7 @@
<div
class=
"tableInput"
>
<el-form
ref=
"stepName"
:model=
"form"
label-width=
"120px"
>
<el-form-item
label=
"步骤名称:"
>
<el-input
v-model=
"form.
name
"
@
change=
"tableInputName"
></el-input>
<el-input
v-model=
"form.
label
"
@
change=
"tableInputName"
></el-input>
</el-form-item>
</el-form>
...
...
@@ -32,12 +32,12 @@
</el-select>
-->
</el-col>
<el-col
class=
"line"
:span=
"2"
>
<el-button
size=
"mini"
@
click=
"dialogVisibleFourth
= true
"
<el-button
size=
"mini"
@
click=
"dialogVisibleFourth
Fun
"
>
编辑
</el-button
></el-col
>
<el-col
class=
"line"
:span=
"2"
>
<el-button
size=
"mini"
@
click=
"dialogVisibleFourth
= true
"
<el-button
size=
"mini"
@
click=
"dialogVisibleFourth
New
"
>
新建
</el-button
></el-col
>
...
...
@@ -52,17 +52,25 @@
</el-row>
</el-form-item>
<el-form-item>
<el-input
type=
"textarea"
v-model=
"form.
desc
"
:rows=
"8"
></el-input>
<el-input
type=
"textarea"
v-model=
"form.
sql
"
:rows=
"8"
></el-input>
</el-form-item>
</el-form>
<el-form
ref=
"form"
:model=
"form"
label-width=
"160px"
>
<el-form-item
label=
"允许简易转换:"
>
<el-checkbox
v-model=
"form.lazy_conversion_active"
></el-checkbox>
<el-checkbox
v-model=
"form.lazy_conversion_active"
true-label=
"Y"
false-label=
"N"
></el-checkbox>
</el-form-item>
<el-form-item
label=
"替换SQL语句里的变量:"
>
<el-checkbox
v-model=
"form.variables_active"
></el-checkbox>
<el-checkbox
v-model=
"form.variables_active"
true-label=
"Y"
false-label=
"N"
></el-checkbox>
</el-form-item>
<el-form-item
label=
"从步骤插入数据:"
>
...
...
@@ -77,7 +85,11 @@
</el-form-item>
<el-form-item
label=
"执行每一行:"
>
<el-checkbox
v-model=
"form.execute_each_row"
></el-checkbox>
<el-checkbox
v-model=
"form.execute_each_row"
true-label=
"Y"
false-label=
"N"
></el-checkbox>
</el-form-item>
<el-form-item
label=
"记录数量限制:"
>
...
...
@@ -125,7 +137,15 @@
</span>
</el-dialog>
<estab-dialog
ref=
"establishDia"
:dialogVisibleFourth
.
sync=
'dialogVisibleFourth'
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
:scanDialogVisible
.
sync=
'scanDialogVisible'
:form=
"newForm"
:chooseType=
"chooseType"
:chooseFlag
.
sync=
"chooseFlag"
></estab-dialog>
<estab-dialog
ref=
"establishDia2"
:dialogVisibleFourth
.
sync=
"dialogVisibleFourth"
@
getSonValue=
"getSonValue"
:listNames=
"listNames"
:scanDialogVisible
.
sync=
"scanDialogVisible"
:chooseType=
"chooseType"
:chooseFlag
.
sync=
"chooseFlag"
></estab-dialog>
</div>
</
template
>
...
...
@@ -139,21 +159,19 @@ import {
}
from
"@/api/kettle/link"
;
export
default
{
props
:
[
"connectionNode"
,
"stepName"
],
//从父组件传过来的值
props
:
[
"connectionNode"
,
"stepName"
,
"form"
,
"graphXml"
],
//从父组件传过来的值
components
:
{
main
,
},
data
()
{
return
{
tableDetails
:{},
connectionName
:
""
,
browsing
:
false
,
dialogVisibleFourth
:
false
,
scanDialogVisible
:
false
,
newForm
:
{},
form
:
{
wLazyConversion
:
false
,
wVariables
:
false
,
wEachRow
:
false
,
},
ComboBox
:
[],
library
:
[],
PopupFrom
:
{},
...
...
@@ -187,51 +205,42 @@ export default {
},
// form(newValue, oldValue){ // this.form=newValue; // }
},
methods
:
{
tableInputName
(){
this
.
stepName
tableInputName
()
{
this
.
stepName
;
},
// //获取新建弹窗返回来的值
getSonValue
(
res
){
if
(
typeof
(
res
)
==
'string'
){
this
.
dataBaseName
=
res
console
.
log
(
'接收子组件的值1111111----'
,
this
.
dataBaseName
);
}
else
if
(
typeof
(
res
)
==
'object'
){
console
.
log
(
'接收子组件的值55555----'
,
res
);
this
.
curNode
=
res
;
// DOM 更新后
// this.$nextTick(() => {
// this.form.text=this.curNode.data.text;
// // this.$refs.goal.values=this.curNode.data.text;
// // this.$refs.goal.refreshData(this.from)
// })
getSonValue
(
res
)
{
if
(
typeof
res
==
"string"
)
{
this
.
dataBaseName
=
res
;
console
.
log
(
"接收子组件的值1111111----"
,
this
.
dataBaseName
);
}
else
if
(
typeof
res
==
"object"
)
{
console
.
log
(
"接收子组件的值55555----"
,
res
);
this
.
curNode
=
res
;
// DOM 更新后 // this.$nextTick(() => { // this.form.text=this.curNode.data.text; // // this.$refs.goal.values=this.curNode.data.text; // // this.$refs.goal.refreshData(this.from) // }) // this.form.text=this.curNode.data.text;
// this.$set(this.newForm,'text',this.curNode.data.text)
// this.$forceUpdate()
// this.form.text=this.curNode.data.text;
console
.
log
(
'chuanhuo====='
,
this
.
newForm
);
}
else
if
(
typeof
(
res
)
==
'boolean'
){
this
.
dialogVisibleFourth
=
res
;
console
.
log
(
'接收子组件的值2222222----'
,
this
.
dialogVisibleFourth
);
}
},
console
.
log
(
"chuanhuo====="
,
this
.
newForm
);
}
else
if
(
typeof
res
==
"boolean"
)
{
this
.
dialogVisibleFourth
=
res
;
console
.
log
(
"接收子组件的值2222222----"
,
this
.
dialogVisibleFourth
);
}
},
// //浏览
scanTree
(
type
){
if
(
this
.
form
.
connection
){
this
.
$refs
.
establishDia
.
database
(
this
.
form
.
connection
);
console
.
log
(
'当前选中数据库***************'
,
this
.
form
.
connection
);
if
(
this
.
form
.
connection
){
this
.
$refs
.
establishDia
.
scanDialogOpen
();
this
.
chooseFlag
=
true
;
this
.
chooseType
=
type
;
}
}
else
{
this
.
$message
.
error
(
'请选择数据库'
)
}
},
//
scanTree(type){
//
if(this.form.connection){
//
this.$refs.establishDia.database(this.form.connection);
//
console.log('当前选中数据库***************',this.form.connection);
//
if(this.form.connection){
//
this.$refs.establishDia.scanDialogOpen();
//
this.chooseFlag=true;
//
this.chooseType=type;
//
}
//
}else{
//
this.$message.error('请选择数据库')
//
}
//
},
//获取新建弹窗返回来的值
// getSonValue(res){
...
...
@@ -245,72 +254,45 @@ export default {
//获取新建弹窗返回来的值
// 查询已经建立的所有数据库列表
listNames
(){
listNames
().
then
(
res
=>
{
listNames
()
{
listNames
().
then
((
res
)
=>
{
if
(
res
)
{
console
.
log
(
'获取所有已经创建的数据库列表:'
,
res
);
this
.
namesList
=
res
;
}
else
{
this
.
$message
.
error
(
res
.
errMsg
)
console
.
log
(
"获取所有已经创建的数据库列表:"
,
res
);
this
.
namesList
=
res
;
}
else
{
this
.
$message
.
error
(
res
.
errMsg
);
}
})
});
},
dialogVisibleFourthNew
()
{
this
.
dialogVisibleFourth
=
true
;
this
.
$refs
.
establishDia2
.
database
();
this
.
$refs
.
establishDia2
.
accessMethod
();
//获取连接方式
},
dialogVisibleFourthFun
()
{
this
.
dialogVisibleFourth
=
true
;
this
.
$refs
.
establishDia2
.
database
(
this
.
connectionName
);
},
getField
(
val
)
{
this
.
library
=
this
.
ComboBox
.
find
((
e
)
=>
{
return
e
.
name
==
val
;
});
console
.
log
(
this
.
library
);
this
.
connectionName
=
val
;
},
addBrowsing
(){
this
.
browsing
=
false
const
that
=
this
;
let
flowObj
=
Object
.
assign
({},
that
.
flowData
);
var
xml2js
=
require
(
'xml2js'
);
//xml->json
//xml2js默认会把子子节点的值变为一个数组, explicitArray设置为false
var
xmlParser
=
new
xml2js
.
Parser
({
explicitArray
:
false
,
ignoreAttrs
:
true
})
//json->xml
var
jsonBuilder
=
new
xml2js
.
Builder
();
//测试用例
var
xml
=
"<root>flowObj xml2js!</root>"
;
var
obj
=
flowObj
console
.
log
(
'----------'
);
// xml -> json
xmlParser
.
parseString
(
xml
,
function
(
err
,
result
)
{
//将返回的结果再次格式化
console
.
log
(
JSON
.
stringify
(
result
));
});
console
.
log
(
'----------'
);
//json --> xml
var
builder
=
new
xml2js
.
Builder
();
var
jsonxml
=
builder
.
buildObject
(
obj
);
console
.
log
(
jsonxml
);
console
.
log
(
'----------'
);
addBrowsing
()
{
this
.
browsing
=
false
;
let
mps
=
new
FormData
();
// 创建form对象
mps
.
append
(
"graphXml"
,
flowObj
);
mps
.
append
(
"databaseName"
,
"127"
);
mps
.
append
(
"graphXml"
,
this
.
graphXml
);
mps
.
append
(
"databaseName"
,
this
.
library
.
name
);
mps
.
append
(
"schema"
,
"test"
);
mps
.
append
(
"table"
,
"R_CLUSTER"
);
mps
.
append
(
"table"
,
this
.
tableDetails
.
text
);
tableFields
(
mps
).
then
(
res
=>
{
tableFields
(
mps
).
then
(
(
res
)
=>
{
console
.
log
(
res
);
})
});
},
SQLPopup
()
{
...
...
@@ -392,9 +374,11 @@ export default {
// if (node.level > this.PopupFrom.length) return resolve([]);
},
handleNodeClick
(
data
,
node
)
{
console
.
log
(
'点击当前节点node==='
,
node
);
console
.
log
(
'点击当前节点data==='
,
data
);
handleNodeClick
(
data
,
node
)
{
console
.
log
(
"点击当前节点node==="
,
node
);
console
.
log
(
"点击当前节点data==="
,
data
);
this
.
tableDetails
=
data
},
...
...
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
844e6e00
...
...
@@ -214,9 +214,9 @@
<el-table
:data=
"sheets"
style=
"width: 100%"
>
<el-table-column
prop=
"name"
label=
"工作表名称"
width=
"120"
>
</el-table-column>
<el-table-column
prop=
"start
row
"
label=
"起始行"
>
<el-table-column
prop=
"start
col
"
label=
"起始行"
>
</el-table-column>
<el-table-column
prop=
"start
col
"
label=
"起始列"
>
<el-table-column
prop=
"start
row
"
label=
"起始列"
>
</el-table-column>
<el-table-column
label=
"操作"
>
...
...
@@ -598,11 +598,11 @@
</el-form-item>
<el-form-item
label=
"起始行:"
>
<el-input
v-model=
"workForm.start
Line
"
></el-input>
<el-input
v-model=
"workForm.start
col
"
></el-input>
</el-form-item>
<el-form-item
label=
"起始列:"
>
<el-input
v-model=
"workForm.start
Column
"
></el-input>
<el-input
v-model=
"workForm.start
row
"
></el-input>
</el-form-item>
</el-form>
...
...
@@ -692,7 +692,12 @@
width=
"800px"
:before-close=
"handleClose"
>
<tableInput
:disabled=
"true"
:connectionNode=
"connectionNode"
>
<tableInput
:disabled=
"true"
:connectionNode=
"connectionNode"
:form=
"form"
:graphXml=
"graphXml"
>
</tableInput>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -819,30 +824,81 @@
:doubleClickCell=
"doubleClickCell"
:getXmlVal=
"getXmlVal"
@
fathertrans=
"fathertrans"
:saveOutputDialog=
"saveOutputDialog"
:tableOutForm=
"outPutFormData1"
></outDialog>
:saveOutputDialog=
"saveOutputDialog"
:tableOutForm=
"outPutFormData"
></outDialog>
<insertOrUpdate
ref=
"insertOrdate"
:InsertOrUpdateVisible
.
sync=
"InsertOrUpdateVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:getXmlVal=
"getXmlVal"
:insertOrUpdateForm=
"outPutFormData2"
></insertOrUpdate>
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:getXmlVal=
"getXmlVal"
:insertOrUpdateForm=
"outPutFormData"
></insertOrUpdate>
<excelOutPutDialog
ref=
"excelOut"
:excelOutPutVisible
.
sync=
"excelOutPutVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:excelForm=
"outPutFormData3"
></excelOutPutDialog>
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:excelForm=
"outPutFormData"
></excelOutPutDialog>
<updateDialog
ref=
"update"
:updateVisible
.
sync=
"updateVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:updateForm=
"outPutFormData4"
></updateDialog>
<synDialog
ref=
"syn"
:synVisible
.
sync=
"synVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:synForm=
"outPutFormData5"
></synDialog>
<delDialog
ref=
"del"
:deleteVisible
.
sync=
"deleteVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:deleteForm=
"outPutFormData6"
></delDialog>
<sqlDialog
ref=
"sql"
:sqlVisible
.
sync=
"sqlVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:sqlForm=
"outPutFormData7"
></sqlDialog>
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:updateForm=
"outPutFormData"
></updateDialog>
<synDialog
ref=
"syn"
:synVisible
.
sync=
"synVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:synForm=
"outPutFormData"
></synDialog>
<delDialog
ref=
"del"
:deleteVisible
.
sync=
"deleteVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:deleteForm=
"outPutFormData"
></delDialog>
<sqlDialog
ref=
"sql"
:sqlVisible
.
sync=
"sqlVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:sqlForm=
"outPutFormData"
></sqlDialog>
<textFileDialog
ref=
"textFile"
:fileVisible
.
sync=
"fileVisible"
<<<<<<<
HEAD
:saveOutputDialog=
"saveOutputDialog"
:textFileForm=
"outPutFormData8"
></textFileDialog>
<microDialog
ref=
"mic"
:microVisible
.
sync=
"microVisible"
:saveOutputDialog=
"saveOutputDialog"
:microForm=
"outPutFormData9"
:doubleClickCell=
"doubleClickCell"
></microDialog>
=======
:saveOutputDialog="saveOutputDialog"
:textFileForm="outPutFormData"
>
</textFileDialog>
<microDialog
ref=
"mic"
:microVisible
.
sync=
"microVisible"
:saveOutputDialog=
"saveOutputDialog"
:tableOutForm=
"outPutFormData"
></microDialog>
>>>>>>> 1fa2926e2a1381ccd4e65928c6d2a0eb28fd4f78
<!-- 输出弹窗end================== -->
<trans-graph
:transGraphVisible
.
sync=
"transGraphVisible"
:getXmlVal=
"getXmlVal"
></trans-graph>
<trans-graph
:transGraphVisible
.
sync=
"transGraphVisible"
:getXmlVal=
"getXmlVal"
></trans-graph>
</div>
</template>
...
...
@@ -898,7 +954,6 @@ const {
mxGeometry
,
}
=
mxgraph
;
export
default
{
// props: {
// dialogVisibleFourth: {
...
...
@@ -912,7 +967,11 @@ export default {
data
()
{
return
{
<<<<<<<
HEAD
myoutPutFormData
:{},
=======
>>>>>>>
1
fa2926e2a1381ccd4e65928c6d2a0eb28fd4f78
outPutFormData1
:{},
outPutFormData2
:{},
outPutFormData3
:{},
...
...
@@ -932,8 +991,9 @@ export default {
graphXml
:
""
,
xmlDocuments
:
""
,
//获取解码的xml
boxInformation
:
""
,
//弹框信息
toolItemData
:{},
//新增节点时的值
doubleClickCell
:{},
//双击节点
toolItemData
:
{},
//新增节点时的值
doubleClickCell
:
{},
//双击节点
// mxl=================================
InsertOrUpdateVisible
:
false
,
...
...
@@ -971,9 +1031,14 @@ export default {
activeName
:
"file"
,
fieldType
:
[],
fieldFormat
:
[],
<<<<<<<
HEAD
fields
:
[
],
=======
fields
:
[],
>>>>>>>
1
fa2926e2a1381ccd4e65928c6d2a0eb28fd4f78
engine
:
[],
// 画布模块
...
...
@@ -1088,6 +1153,8 @@ export default {
this
.
createGraph
();
this
.
initToolbar
();
this
.
initGraph
();
console
.
log
(
this
.
blankCanvas
,
7987987987
);
this
.
$refs
.
container
.
style
.
background
=
'url("./mxgraph/images/grid.gif")'
;
},
...
...
@@ -1113,8 +1180,18 @@ export default {
excelLnputDetermine
()
{
this
.
excelLnput
=
!
this
.
excelLnput
;
console
.
log
(
this
.
fieldForm
);
this
.
form
.
file
=
JSON
.
stringify
(
this
.
file
);
this
.
form
.
sheets
=
JSON
.
stringify
(
this
.
sheets
);
this
.
form
.
fields
=
JSON
.
stringify
(
this
.
fields
);
console
.
log
(
this
.
form
,
456
);
// this.fields()
for
(
let
name
in
this
.
form
)
{
var
edit
=
new
mxCellAttributeChange
(
this
.
nodeData
,
name
,
this
.
form
[
name
]);
var
edit
=
new
mxCellAttributeChange
(
this
.
nodeData
,
name
,
this
.
form
[
name
]
);
this
.
graph
.
getModel
().
execute
(
edit
);
}
console
.
log
(
edit
,
4564564564654
);
...
...
@@ -1264,14 +1341,14 @@ export default {
this
.
graph
.
setAllowDanglingEdges
(
false
);
this
.
graph
.
setDisconnectOnMove
(
false
);
this
.
graph
.
setMultigraph
(
false
);
this
.
graph
.
convertValueToString
=
(
cell
)
=>
{
var
label
=
cell
.
getAttribute
(
'label'
);
var
label
=
cell
.
getAttribute
(
"label"
);
// var icon = cell.getAttribute(cell.style.split("image="))
return
label
;
return
label
;
// console.log(cell.value.attributes,99999999999999);
// if (!cell.title && cell.value) {
...
...
@@ -1280,21 +1357,15 @@ export default {
// 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 imgs = img.split("=");
// // let d = imgs[1]
// console.log(imgs);
// const styleObj = {
...
...
@@ -1314,11 +1385,8 @@ export default {
// .map((attr) => `${attr}=${styleObj[attr]}`)
// .join(";");
// cell.style = style
// console.log(this.R.prop("title", cell),132132);
// return this.R.prop("title", cell);
};
...
...
@@ -1372,32 +1440,58 @@ export default {
inputOutputFields
().
then
((
res
)
=>
{});
if
(
cell
.
ids
==
"step1"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"ExcelInput"
)
{
if
(
cell
.
ids
==
"step1"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"ExcelInput"
)
{
this
.
excelLnput
=
!
this
.
excelLnput
;
this
.
form
=
{};
this
.
form
=
{};
let
q
=
{};
let
obj
=
cell
.
value
.
attributes
;
for
(
let
vel
in
obj
)
{
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
this
.
form
=
q
q
.
file
=
JSON
.
parse
(
q
.
file
)
q
.
sheets
=
JSON
.
parse
(
q
.
sheets
)
q
.
fields
=
JSON
.
parse
(
q
.
fields
)
console
.
log
(
q
,
45646546464
);
this
.
form
=
q
;
this
.
sheets
=
q
.
sheets
this
.
fields
=
q
.
fields
this
.
file
=
q
.
file
return
;
}
else
if
(
cell
.
ids
==
"step7"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TableInput"
)
{
}
else
if
(
cell
.
ids
==
"step7"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TableInput"
)
{
this
.
TableInputDialog
=
!
this
.
TableInputDialog
;
var
enc
=
new
mxCodec
(
mxUtils
.
createXmlDocument
());
var
node
=
enc
.
encode
(
this
.
graph
.
getModel
());
this
.
graphXml
=
mxUtils
.
getPrettyXml
(
node
);
this
.
form
=
{};
let
q
=
{};
let
obj
=
cell
.
value
.
attributes
;
for
(
let
vel
in
obj
)
{
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
this
.
form
=
q
return
;
}
else
if
(
cell
.
ids
==
"step6"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SystemInfo"
)
{
this
.
form
=
q
;
this
.
form
.
sql
=
decodeURIComponent
(
this
.
form
.
sql
)
console
.
log
(
this
.
form
,
456465465
);
return
;
}
else
if
(
cell
.
ids
==
"step6"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"SystemInfo"
)
{
this
.
SystemInfoDialog
=
!
this
.
SystemInfoDialog
;
this
.
form
=
{};
let
q
=
{};
...
...
@@ -1406,10 +1500,13 @@ this.form = {};
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
this
.
form
=
q
return
;
this
.
form
=
q
;
}
else
if
(
cell
.
ids
==
"step5"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"DataGrid"
)
{
return
;
}
else
if
(
cell
.
ids
==
"step5"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"DataGrid"
)
{
this
.
ConstantDialog
=
!
this
.
ConstantDialog
;
this
.
form
=
{};
let
q
=
{};
...
...
@@ -1418,10 +1515,12 @@ this.form = {};
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
this
.
form
=
q
this
.
form
=
q
;
return
;
}
else
if
(
cell
.
ids
==
"step4"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"RandomValue"
)
{
}
else
if
(
cell
.
ids
==
"step4"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"RandomValue"
)
{
this
.
RandomValueDialog
=
!
this
.
RandomValueDialog
;
this
.
form
=
{};
let
q
=
{};
...
...
@@ -1430,10 +1529,12 @@ this.form = {};
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
this
.
form
=
q
this
.
form
=
q
;
return
;
}
else
if
(
cell
.
ids
==
"step3"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"RowGenerator"
)
{
}
else
if
(
cell
.
ids
==
"step3"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"RowGenerator"
)
{
this
.
RowGeneratorDialog
=
!
this
.
RowGeneratorDialog
;
this
.
form
=
{};
let
q
=
{};
...
...
@@ -1442,10 +1543,12 @@ this.form = {};
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
this
.
form
=
q
this
.
form
=
q
;
return
;
}
else
if
(
cell
.
ids
==
"step2"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TextFileInput"
)
{
}
else
if
(
cell
.
ids
==
"step2"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TextFileInput"
)
{
this
.
TextFileInputDialog
=
!
this
.
TextFileInputDialog
;
this
.
form
=
{};
let
q
=
{};
...
...
@@ -1454,9 +1557,12 @@ this.form = {};
let
key
=
obj
[
vel
];
q
[
key
.
name
]
=
key
.
value
;
}
this
.
form
=
q
this
.
form
=
q
;
return
;
}
else
if
(
cell
.
ids
==
"step17"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TableOutput"
)
{
}
else
if
(
cell
.
ids
==
"step17"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TableOutput"
)
{
//表输出
this
.
tableOutPutVisible
=
!
this
.
tableOutPutVisible
;
// let q = {};
...
...
@@ -1471,7 +1577,7 @@ this.form = {};
}
else
if
(
cell
.
ids
==
"step16"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Update"
)
{
//更新
this
.
updateVisible
=
!
this
.
updateVisible
;
this
.
outPutFormData2
=
this
.
showDataFunc
();
this
.
outPutFormData
=
this
.
showDataFunc
();
return
;
}
else
if
(
cell
.
ids
==
"step15"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TextFileOutput"
)
{
//文本文件输出
...
...
@@ -1519,9 +1625,8 @@ this.form = {};
});
},
// 回显数据封装的方法
showDataFunc
(){
showDataFunc
()
{
let
q
=
{};
let
obj
=
this
.
doubleClickCell
.
value
.
attributes
;
for
(
let
vel
in
obj
)
{
...
...
@@ -1550,7 +1655,7 @@ this.form = {};
const
style
=
Object
.
keys
(
styleObj
)
.
map
((
attr
)
=>
`
${
attr
}
=
${
styleObj
[
attr
]}
`
)
.
join
(
";"
);
this
.
toolItemData
=
toolItem
this
.
toolItemData
=
toolItem
;
try
{
let
pameStep
=
new
FormData
();
// 创建form对象
...
...
@@ -1573,7 +1678,7 @@ this.form = {};
style
);
console
.
log
(
cell
,
4564564564
);
console
.
log
(
cell
,
4564564564
);
console
.
log
(
toolItem
,
111111111111111111
);
cell
.
title
=
toolItem
[
"title"
];
cell
.
ids
=
toolItem
[
"id"
];
...
...
@@ -1852,10 +1957,6 @@ this.form = {};
}
});
},
// 转xml
createGraph
()
{
this
.
graph
=
new
mxGraph
(
this
.
$refs
.
container
);
},
// 执行转换
doTrans
()
{
...
...
@@ -1938,18 +2039,19 @@ this.form = {};
// .catch(() => {});
},
//输出组件保存************************
saveOutputDialog
(
params
){
var
outPutForm
=
params
;
console
.
log
(
"子组件传回来的弹窗参数==="
,
outPutForm
);
for
(
var
name
in
outPutForm
)
{
var
edit
=
new
mxCellAttributeChange
(
this
.
doubleClickCell
,
name
,
outPutForm
[
name
]);
saveOutputDialog
(
params
)
{
var
outPutForm
=
params
;
console
.
log
(
"子组件传回来的弹窗参数==="
,
outPutForm
);
for
(
var
name
in
outPutForm
)
{
var
edit
=
new
mxCellAttributeChange
(
this
.
doubleClickCell
,
name
,
outPutForm
[
name
]
);
this
.
graph
.
getModel
().
execute
(
edit
);
}
}
},
//输出组件保存******************/
},
};
...
...
src/views/kettle/home2.vue
View file @
844e6e00
...
...
@@ -1246,8 +1246,7 @@ props: ["dragItem"],
console
.
log
(
'点击当前节点==='
,
node
);
this
.
curNode
=
node
;
//当前选中节点
this
.
nodePath
=
data
.
path
;
//当前选择数
this
.
curNodeIconCls
=
data
.
iconCls
;
//当前选中节点
this
.
nodePath
=
data
.
path
;
console
.
log
(
'当前节点的文件夹路径:'
,
this
.
nodePath
);
if
(
node
.
data
.
leaf
){
this
.
curNodeText
=
node
.
data
.
text
;
//当前节点
...
...
@@ -1255,7 +1254,7 @@ props: ["dragItem"],
pamer
.
append
(
"path"
,
this
.
nodePath
);
pamer
.
append
(
"type"
,
"transformation"
);
open
(
pamer
).
then
(
res
=>
{
console
.
log
(
res
,
'返回空白画布xml'
);
//
console.log(res,'返回空白画布xml');
this
.
blankCanvas
=
res
;
// this.tabShowFlag=true;//核心对象显项卡显示
this
.
activeName
=
"second"
;
...
...
src/views/mykettle/main.vue
View file @
844e6e00
...
...
@@ -461,7 +461,8 @@ export default {
linkCheckedIdx
:
-
2
,
//当前选择连接类型列表
methodHoverIdx
:
0
,
//鼠标移动到连接方式
methodCheckedIdx
:
0
,
//当前选择连接方式列表
createModel
:{},
//创建数据库
createModel
:{
},
//创建数据库
rulesOne
:{
name
:[
{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'blur'
}
...
...
@@ -745,6 +746,7 @@ export default {
this
.
methodCheckedIdx
=-
2
;
this
.
createModel
.
type
=
item
.
value
;
},
// 获取连接方式
chooseAccess
(
item
,
idx
){
...
...
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