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
d4bfce02
Commit
d4bfce02
authored
Apr 06, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
输出组件保存
parent
d1a7cdc9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
429 additions
and
241 deletions
+429
-241
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+4
-4
src/views/output-dialog/delete.vue
+41
-23
src/views/output-dialog/insertOrUpdate.vue
+252
-96
src/views/output-dialog/sqlFileOutput.vue
+73
-70
src/views/output-dialog/table-out.vue
+59
-48
No files found.
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
d4bfce02
...
...
@@ -820,7 +820,7 @@
<insertOrUpdate
ref=
"insertOrdate"
:InsertOrUpdateVisible
.
sync=
"InsertOrUpdateVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
></insertOrUpdate>
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:getXmlVal=
"getXmlVal"
></insertOrUpdate>
<excelOutPutDialog
ref=
"excelOut"
:excelOutPutVisible
.
sync=
"excelOutPutVisible"
...
...
@@ -1442,7 +1442,7 @@ export default {
}
this
.
form
=
q
return
;
}
else
if
(
cell
.
ids
==
"step17"
)
{
}
else
if
(
cell
.
ids
==
"step17"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TableOutput"
)
{
//表输出
this
.
tableOutPutVisible
=
!
this
.
tableOutPutVisible
;
return
;
...
...
@@ -1450,7 +1450,7 @@ export default {
//更新
this
.
updateVisible
=
!
this
.
updateVisible
;
return
;
}
else
if
(
cell
.
ids
==
"step1
4
"
)
{
}
else
if
(
cell
.
ids
==
"step1
5
"
)
{
//文本文件输出
this
.
fileVisible
=
!
this
.
fileVisible
;
return
;
...
...
@@ -1466,7 +1466,7 @@ export default {
//删除
this
.
deleteVisible
=
!
this
.
deleteVisible
;
return
;
}
else
if
(
cell
.
ids
==
"step1
0
"
)
{
}
else
if
(
cell
.
ids
==
"step1
1
"
)
{
//SQL文件输出
this
.
sqlVisible
=
!
this
.
sqlVisible
;
return
;
...
...
src/views/output-dialog/delete.vue
View file @
d4bfce02
...
...
@@ -9,10 +9,13 @@
>
<!--
<div
id=
"ExcelInputDialog"
></div>
-->
<el-form
ref=
"stepName"
:model=
"
deleteForm
"
label-width=
"120px"
>
<el-form
ref=
"stepName"
:model=
"
stepName
"
label-width=
"120px"
>
<el-form-item
label=
"步骤名称:"
>
<el-input
v-model=
"
deleteForm
.name"
></el-input>
<el-input
v-model=
"
stepName
.name"
></el-input>
</el-form-item>
</el-form>
<el-form
ref=
"delForm"
:model=
"deleteForm"
label-width=
"200px"
>
<div
style=
"border:1px solid #99BBE8;padding:15px 15px;margin-bottom:15px;"
>
<database-choose
ref=
"databaseChoose"
:form=
"deleteForm"
></database-choose>
<el-form-item
label=
"提交记录数量:"
>
...
...
@@ -50,15 +53,27 @@
export
default
({
data
(){
return
{
stepName
:{
name
:
'删除'
},
activeName
:
'content'
,
// deleteForm:{
// commit: "100",
// connection: "",
// schema: "test",
// table: "",
// searchFields: "[]",
// updateFields: "[]",
// },
deleteForm
:{
commit
:
"100"
,
connection
:
""
,
schema
:
"test"
,
key
:
"[]"
,
label
:
"删除"
,
schema
:
""
,
table
:
""
,
searchFields
:
"[]"
,
updateFields
:
"[]"
,
// update_bypassed: "N"
//
searchFields: "[]",
//
updateFields: "[]",
},
// 表头数据
tableHead
:[
...
...
@@ -98,23 +113,22 @@ export default ({
}
},
props
:[
"title"
,
"nodePath"
,
"deleteVisible"
,
"doubleClickCell"
,
"saveOutputDialog"
],
// props:{
// title:{
// type:String,
// default:''
// },
// nodePath:{
// type:String,
// default:''
// },
// deleteVisible:{
// type: Boolean,
// default:false
// },
props
:{
title
:{
type
:
String
,
default
:
''
},
nodePath
:{
type
:
String
,
default
:
''
},
deleteVisible
:{
type
:
Boolean
,
default
:
false
},
// explorer:Function
},
// },
mounted
(){
},
...
...
@@ -123,7 +137,11 @@ export default ({
this
.
$emit
(
"update:deleteVisible"
,
false
);
},
confirm
(){
console
.
log
(
'弹窗数据:==='
,
this
.
deleteForm
);
this
.
deleteForm
.
label
=
this
.
doubleClickCell
.
title
;
this
.
deleteForm
.
key
=
JSON
.
stringify
(
this
.
tableData
);
//字段复值
console
.
log
(
'弹窗数据:==='
,
this
.
deleteForm
);
this
.
saveOutputDialog
(
this
.
deleteForm
);
this
.
handleClose
();
//关闭弹窗
},
...
...
src/views/output-dialog/insertOrUpdate.vue
View file @
d4bfce02
...
...
@@ -8,10 +8,13 @@
top=
"10%"
>
<div
id=
"ExcelInputDialog"
></div>
<el-form
ref=
"stepName"
:model=
"
insertOrUdateForm
"
label-width=
"120px"
>
<el-form
ref=
"stepName"
:model=
"
stepName
"
label-width=
"120px"
>
<el-form-item
label=
"步骤名称:"
>
<el-input
v-model=
"
insertOrUdateForm
.name"
></el-input>
<el-input
v-model=
"
stepName
.name"
></el-input>
</el-form-item>
</el-form>
<el-form
:model=
"insertOrUdateForm"
label-width=
"200px"
>
<el-tabs
v-model=
"activeName"
type=
"border-card"
>
<el-tab-pane
label=
"基本配置"
name=
"content"
>
<database-choose
ref=
"databaseChoose"
:form=
"insertOrUdateForm"
></database-choose>
...
...
@@ -36,15 +39,56 @@
<el-tab-pane
label=
"查询字段"
name=
"handling"
>
<el-card
class=
"box-card"
style=
"margin-top:15px;"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
新增字段
</el-button>
<
el-button
style=
"padding: 3px 0"
type=
"text"
>
删除字段
</el-button
>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
获取字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"fieldClick(true)"
>
新增字段
</el-button>
<
!--
<el-button
style=
"padding: 3px 0"
type=
"text"
>
删除字段
</el-button>
--
>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"getFields(0)"
>
获取字段
</el-button>
</div>
<el-table
style=
"width: 100%"
border
:data=
"tableData"
>
<
!--
<
el-table
style=
"width: 100%"
border
:data=
"tableData"
>
<template
v-for=
"(item,index) in tableHead"
>
<el-table-column
:prop=
"item.column_name"
:label=
"item.column_comment"
:key=
"index"
v-if=
"item.column_name != 'id'"
></el-table-column>
</
template
>
</el-table>
</el-table>
-->
<table-list
ref=
"tableDia"
:tableHead=
"tableHead"
:tableData=
"tableData"
:field
.
sync=
"editDia"
:fieldClick=
"fieldClick"
></table-list>
<!-- 编辑弹窗开始=========== -->
<el-dialog
title=
"编辑"
:visible
.
sync=
"field"
width=
"500px"
:before-close=
"handleCloseEdit"
append-to-body
>
<el-form
ref=
"form"
:model=
"fieldForm"
label-width=
"80px"
>
<el-form-item
label=
"表字段:"
>
<el-select
v-model=
"fieldForm.keyLookup"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"比较符:"
>
<el-select
v-model=
"fieldForm.keyCondition"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in keyConditionList"
:key=
"index"
:label=
"item.text"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"流里的字段1:"
>
<el-select
v-model=
"fieldForm.keyStream1"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"流里的字段2:"
>
<el-select
v-model=
"fieldForm.keyStream2"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"field = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addField"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 编辑弹窗结束============ -->
</el-card>
</el-tab-pane>
...
...
@@ -52,36 +96,47 @@
<el-tab-pane
label=
"更新字段"
name=
"oher "
>
<el-card
class=
"box-card"
style=
"margin-top:15px;"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
新增字段
</el-button>
<
el-button
style=
"padding: 3px 0"
type=
"text"
>
删除字段
</el-button
>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
获取和更新字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"fieldClickUpdate"
>
新增字段
</el-button>
<
!-- <el-button style="padding: 3px 0" type="text">删除字段</el-button> --
>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"getFields(1)"
>
获取和更新字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
编辑映射
</el-button>
</div>
<!-- <el-table style="width: 100%" border >
<template v-for="(item,index) in updateTableHead">
<el-table-column :prop="item.column_name" :label="item.column_comment" :key="index" >
</el-table-column>
</template>
<el-table-column
v-for="(item, key) in updateTableData"
:key="key"
align="center"
:prop="item.column_name"
:label="item.column_comment"
>
<template scope="scope">
<el-input
v-model="scope.row[scope.column.property]"
size="mini"
type="number"
:min="0.0"
/>
</template>
</el-table-column>
<table-list
:tableHead=
"tableHeadUpdate"
:tableData=
"tableDataUpdate"
:field
.
sync=
"editDiaUpdate"
:fieldClick=
"fieldClickUpdate"
></table-list>
<!-- 编辑弹窗开始=========== -->
<el-dialog
title=
"编辑"
:visible
.
sync=
"fieldUpdate"
width=
"500px"
:before-close=
"handleCloseEditUpdate"
append-to-body
>
<el-form
ref=
"form"
:model=
"fieldFormUpdate"
label-width=
"80px"
>
<el-form-item
label=
"表字段:"
>
<el-select
v-model=
"fieldFormUpdate.updateLookup"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"流字段:"
>
<el-select
v-model=
"fieldFormUpdate.updateStream"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</el-form-item>
</el-table> -->
<el-form-item
label=
"更新:"
>
<el-select
v-model=
"fieldFormUpdate.update"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in yesOrNoList"
:key=
"index"
:label=
"item.text"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"Update = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addFieldUpdate"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 编辑弹窗结束============ -->
</el-card>
</el-tab-pane>
</el-tabs>
...
...
@@ -95,9 +150,17 @@
</template>
<
script
>
import
{
inputOutputFields
}
from
"@/api/kettle/file"
;
//获取表输出
export
default
({
data
(){
return
{
field
:
false
,
//编辑弹窗
editDia
:
false
,
//编辑表字段
fieldForm
:{},
//编辑弹窗
fieldUpdate
:
false
,
//更新弹窗
editDiaUpdate
:
false
,
//更新字段
fieldFormUpdate
:{},
//更新弹窗
stepName
:{
name
:
'删除'
},
insertOrUdateForm
:{
commit
:
"100"
,
connection
:
""
,
...
...
@@ -108,107 +171,101 @@ export default ({
update_bypassed
:
"N"
},
activeName
:
'content'
,
// 查询字段--start------------
fieldsList
:[],
//字段获取
keyConditionList
:[{
value
:
'='
,
text
:
'='
},
{
value
:
'<>'
,
text
:
'<>'
},
{
value
:
'<'
,
text
:
'<'
},
{
value
:
'<='
,
text
:
'<='
},
{
value
:
'>'
,
text
:
'>'
},
{
value
:
'>='
,
text
:
'>='
},
{
value
:
'LIKE'
,
text
:
'LIKE'
},
{
value
:
'BETWEEN'
,
text
:
'BETWEEN'
},
{
value
:
'IS NULL'
,
text
:
'IS NULL'
},
{
value
:
'IS NOT NULL'
,
text
:
'IS NOT NULL'
}],
// 表头数据
tableHead
:[
{
column_name
:
"
column_name
"
,
column_comment
:
"表字段"
column_name
:
"
keyLookup
"
,
column_comment
:
"表字段"
},
{
column_name
:
"
column_age
"
,
column_comment
:
"比较符"
column_name
:
"
keyCondition
"
,
column_comment
:
"比较符"
},
{
column_name
:
"
column_sex
"
,
column_comment
:
"流里的字段1"
column_name
:
"
keyStream1
"
,
column_comment
:
"流里的字段1"
},
{
column_name
:
"
column_col
"
,
column_comment
:
"流里的字段2"
column_name
:
"
keyStream2
"
,
column_comment
:
"流里的字段2"
}
],
// 表格数据
tableData
:
[{
column_age
:
'3'
,
column_name
:
'鞠婧祎'
,
column_sex
:
'女'
,
column_col
:
'1'
,
column_col1
:
'2'
,
column_col2
:
'2'
keyLookup
:
'3'
,
keyCondition
:
'鞠婧祎'
,
keyStream1
:
'女'
,
keyStream2
:
'1'
,
},
{
column_age
:
'25'
,
column_name
:
'魏大勋'
,
column_sex
:
'男'
,
column_col
:
'1'
,
column_col1
:
'2'
,
column_col2
:
'2'
keyLookup
:
'3'
,
keyCondition
:
'鞠婧祎'
,
keyStream1
:
'女'
,
keyStream2
:
'1'
,
},
{
column_age
:
'18'
,
column_name
:
'关晓彤'
,
column_sex
:
'女'
,
column_col
:
'1'
,
column_col1
:
'2'
,
column_col2
:
'2'
}],
keyLookup
:
'3'
,
keyCondition
:
'鞠婧祎'
,
keyStream1
:
'女'
,
keyStream2
:
'1'
,
},
],
// 查询字段--end------------
// 更新字段start------------
// 表头数据
updateTableHead
:[
tableHeadUpdate
:[
{
column_name
:
"
column_name
"
,
column_comment
:
"表字段"
column_name
:
"
updateLookup
"
,
column_comment
:
"表字段"
},
{
column_name
:
"
column_age
"
,
column_comment
:
"流字段"
column_name
:
"
updateStream
"
,
column_comment
:
"流字段"
},
{
column_name
:
"
column_sex
"
,
column_comment
:
"更新"
column_name
:
"
update
"
,
column_comment
:
"更新"
},
],
// 表格数据
updateTableData
:
[{
column_age
:
'3'
,
column_name
:
'鞠婧祎'
,
column_sex
:
'女'
,
column_col
:
'1'
,
column_col1
:
'2'
,
column_col2
:
'2'
tableDataUpdate
:
[{
updateLookup
:
'1'
,
updateStream
:
'鞠婧祎1'
,
update
:
'女'
,
},
{
column_age
:
'25'
,
column_name
:
'魏大勋'
,
column_sex
:
'男'
,
column_col
:
'1'
,
column_col1
:
'2'
,
column_col2
:
'2'
updateLookup
:
'2'
,
updateStream
:
'鞠婧祎2'
,
update
:
'女'
,
},
{
column_age
:
'18
'
,
column_name
:
'关晓彤
'
,
column_sex
:
'女'
,
column_col
:
'1'
,
column_col1
:
'2'
,
column_col2
:
'2'
}],
updateLookup
:
'3
'
,
updateStream
:
'鞠婧祎3
'
,
update
:
'女'
,
},]
,
yesOrNoList
:[{
value
:
'Y'
,
text
:
'是'
}
,
{
value
:
'N'
,
text
:
'否'
}]
// 更新字段end-------------------
}
},
props
:{
// title:{
// type:String,
// default:''
// },
// nodePath:{
// type:String,
// default:''
// },
InsertOrUpdateVisible
:{
type
:
Boolean
,
default
:
false
},
// explorer:Function
props
:[
"InsertOrUpdateVisible"
,
"doubleClickCell"
,
"getXmlVal"
,
"saveOutputDialog"
],
},
// props:{
// InsertOrUpdateVisible:{
// type: Boolean,
// default:false
// },
// },
mounted
(){
},
...
...
@@ -218,9 +275,108 @@ export default ({
},
confirm
(){
this
.
insertOrUdateForm
.
searchFields
=
JSON
.
stringify
(
this
.
tableData
);
//查询字段
this
.
insertOrUdateForm
.
updateFields
=
JSON
.
stringify
(
this
.
tableDataUpdate
);
//更新字段
console
.
log
(
'弹窗数据:==='
,
this
.
insertOrUdateForm
);
this
.
saveOutputDialog
(
this
.
insertOrUdateForm
);
this
.
handleClose
();
//关闭弹窗
},
//新增或者编辑弹窗
fieldClick
(
state
,
val
)
{
this
.
field
=
!
this
.
field
;
this
.
dataState
=
state
;
if
(
state
)
{
this
.
fieldForm
=
{};
}
else
{
this
.
fieldForm
=
val
;
}
},
//关闭编辑的弹窗
handleCloseEdit
(){
this
.
field
=
!
this
.
field
;
},
// 字段
addField
()
{
this
.
field
=
!
this
.
field
;
console
.
log
(
'添加的字段==='
,
this
.
fieldForm
);
if
(
this
.
dataState
)
{
this
.
tableData
.
push
(
this
.
fieldForm
);
}
},
//新增或者编辑弹窗-----更新start------------------
fieldClickUpdate
(
state
,
val
)
{
this
.
fieldUpdate
=
!
this
.
fieldUpdate
;
this
.
dataState
=
state
;
if
(
state
)
{
this
.
fieldFormUpdate
=
{};
}
else
{
this
.
fieldFormUpdate
=
val
;
}
},
//关闭编辑的弹窗
handleCloseEditUpdate
(){
this
.
fieldUpdate
=
!
this
.
fieldUpdate
;
},
// 字段
addFieldUpdate
()
{
this
.
fieldUpdate
=
!
this
.
fieldUpdate
;
console
.
log
(
'添加的字段==='
,
this
.
fieldFormUpdate
);
if
(
this
.
dataState
)
{
this
.
tableDataUpdate
.
push
(
this
.
fieldFormUpdate
);
}
},
// -----更新end------------------
//获取字段
getFields
(
num
){
if
(
this
.
doubleClickCell
){
var
title
=
this
.
doubleClickCell
.
title
}
console
.
log
(
'获取cell888888==='
,
this
.
doubleClickCell
);
let
pamer
=
new
FormData
();
// 创建form对象
pamer
.
append
(
"stepName"
,
encodeURIComponent
(
title
));
pamer
.
append
(
"graphXml"
,
this
.
getXmlVal
);
pamer
.
append
(
"before"
,
true
);
pamer
.
append
(
"query"
,
''
);
inputOutputFields
(
pamer
).
then
(
res
=>
{
console
.
log
(
'字段'
,
res
);
// this.blankCanvas = res
this
.
fieldsList
=
res
;
if
(
num
==
0
){
var
myarray
=
[]
this
.
fieldsList
.
forEach
(
e
=>
{
var
obj
=
{};
obj
.
keyLookup
=
e
.
name
;
obj
.
keyCondition
=
"="
;
obj
.
keyStream1
=
e
.
name
;
obj
.
keyStream2
=
''
;
myarray
.
push
(
obj
);
});
this
.
tableData
=
myarray
;
}
else
if
(
num
==
1
){
var
myarray
=
[]
this
.
fieldsList
.
forEach
(
e
=>
{
var
obj
=
{};
obj
.
updateLookup
=
e
.
name
;
obj
.
updateStream
=
e
.
name
;
obj
.
update
=
'Y'
;
myarray
.
push
(
obj
);
});
this
.
tableDataUpdate
=
myarray
;
}
})
}
...
...
src/views/output-dialog/sqlFileOutput.vue
View file @
d4bfce02
...
...
@@ -202,83 +202,85 @@ export default ({
},
activeName
:
'content'
,
// 表头数据
tableHead
:[
{
column_name
:
"column_name"
,
column_comment
:
"表字段"
},
{
column_name
:
"column_age"
,
column_comment
:
"比较符"
},
{
column_name
:
"column_sex"
,
column_comment
:
"流里的字段1"
},
{
column_name
:
"column_col"
,
column_comment
:
"流里的字段2"
}
],
//
tableHead:[
//
{
//
column_name: "column_name",column_comment:"表字段"
//
},
//
{
//
column_name: "column_age",column_comment:"比较符"
//
},
//
{
//
column_name: "column_sex",column_comment:"流里的字段1"
//
},
//
{
//
column_name: "column_col",column_comment:"流里的字段2"
//
}
//
],
// 表格数据
tableData
:
[{
column_age
:
'3'
,
column_name
:
'鞠婧祎'
,
column_sex
:
'女'
,
column_col
:
'1'
},
{
column_age
:
'25'
,
column_name
:
'魏大勋'
,
column_sex
:
'男'
,
column_col
:
'2'
},
{
column_age
:
'18'
,
column_name
:
'关晓彤'
,
column_sex
:
'女'
,
column_col
:
'3'
}],
//
tableData: [{
//
column_age: '3',
//
column_name: '鞠婧祎',
//
column_sex: '女',
//
column_col:'1'
//
},
//
{
//
column_age: '25',
//
column_name: '魏大勋',
//
column_sex: '男',
//
column_col:'2'
//
},
//
{
//
column_age: '18',
//
column_name: '关晓彤',
//
column_sex: '女',
//
column_col:'3'
//
}],
// 表头数据
tableHead1
:[
{
column_name
:
"column_name"
,
column_comment
:
"表字段"
},
{
column_name
:
"column_age"
,
column_comment
:
"流字段"
},
{
column_name
:
"column_sex"
,
column_comment
:
"更新"
}
],
//
tableHead1:[
//
{
//
column_name: "column_name",column_comment:"表字段"
//
},
//
{
//
column_name: "column_age",column_comment:"流字段"
//
},
//
{
//
column_name: "column_sex",column_comment:"更新"
//
}
//
],
// 表格数据
tableData1
:
[{
column_age
:
'3'
,
column_name
:
'鞠婧祎'
,
column_sex
:
'女'
,
},
{
column_age
:
'25'
,
column_name
:
'魏大勋'
,
column_sex
:
'男'
,
},
{
column_age
:
'18'
,
column_name
:
'关晓彤'
,
column_sex
:
'女'
,
}],
//
tableData1: [{
//
column_age: '3',
//
column_name: '鞠婧祎',
//
column_sex: '女',
//
},
//
{
//
column_age: '25',
//
column_name: '魏大勋',
//
column_sex: '男',
//
},
//
{
//
column_age: '18',
//
column_name: '关晓彤',
//
column_sex: '女',
//
}],
}
},
props
:{
title
:{
type
:
String
,
default
:
''
},
sqlVisible
:{
type
:
Boolean
,
default
:
false
},
props
:[
"title"
,
"sqlVisible"
,
"saveOutputDialog"
,
"doubleClickCell"
],
},
// props:{
// title:{
// type:String,
// default:''
// },
// sqlVisible:{
// type: Boolean,
// default:false
// },
// },
created
(){
this
.
formatFunc
();
//获取时间日期格式
this
.
getAvailableCharsets
();
//获取编码
...
...
@@ -316,8 +318,9 @@ export default ({
confirm
(){
console
.
log
(
'弹窗数据=='
,
this
.
sqlForm
);
console
.
log
(
'步骤名称=='
,
this
.
stepName
);
console
.
log
(
'步骤名称=='
,
this
.
stepName
);
this
.
saveOutputDialog
(
this
.
sqlForm
);
this
.
handleClose
();
//关闭弹窗
},
...
...
src/views/output-dialog/table-out.vue
View file @
d4bfce02
...
...
@@ -60,8 +60,9 @@
<el-row
:gutter=
"10"
>
<el-col
:span=
"23"
>
<el-select
v-model=
"tableOutForm.partitioning_field"
style=
"width: 100%"
:disabled=
"tableOutForm.partitioning_enabled=='Y'? false :true"
>
<el-option
label=
"区域一"
value=
"shanghai"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
<!--
<el-option
label=
"区域一"
value=
"shanghai"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
-->
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</el-col>
</el-row>
...
...
@@ -99,9 +100,11 @@
<el-form-item
label=
"包含表名的字段:"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"23"
>
<el-select
v-model=
"tableOutForm.tablename_field"
:disabled=
"tableOutForm.partitioning_enabled=='Y'? false :true"
style=
"width: 100%"
>
<el-option
label=
"区域一"
value=
"shanghai"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
<el-select
v-model=
"tableOutForm.tablename_field"
:disabled=
"tableOutForm.tablename_in_field=='Y'? false :true"
style=
"width: 100%"
>
<!--
<el-option
label=
"区域一"
value=
"shanghai"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
-->
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</el-col>
</el-row>
...
...
@@ -130,13 +133,13 @@
</el-tab-pane>
<el-tab-pane
label=
"数据库字段"
name=
"oher "
>
<el-tab-pane
:disabled=
"tableOutForm.specify_fields=='Y'? false :true"
label=
"数据库字段"
name=
"oher "
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"fieldClick(true)"
>
新增字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
删除字段
</el-button>
<
!--
<
el-button
style=
"padding: 3px 0"
type=
"text"
>
删除字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
获取字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
输入字段映射
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
输入字段映射
</el-button>
-->
</div>
<!--
<el-table
style=
"width: 100%"
border
:data=
"tableData2"
>
<template
v-for=
"(item,index) in tableHead2"
>
...
...
@@ -157,10 +160,11 @@
<el-checkbox > -->
<el-form-item
label=
"表字段:"
>
<el-select
v-model=
"fieldForm.column_name"
style=
"width: 100%"
>
<el-option
label=
"不去掉空格"
value=
"none"
></el-option>
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
<!-- <el-option label="不去掉空格" value="none"></el-option>
<el-option label="去掉左空格" value="left"></el-option>
<el-option label="去掉右空格" value="right"></el-option>
<el-option
label=
"去掉左右两端空格"
value=
"both"
></el-option>
<el-option label="去掉左右两端空格" value="both"></el-option>
-->
</el-select>
</el-form-item>
<!-- </el-checkbox> -->
...
...
@@ -168,10 +172,12 @@
<!-- <el-checkbox > -->
<el-form-item
label=
"流字段:"
>
<el-select
v-model=
"fieldForm.stream_name"
style=
"width: 100%"
>
<el-option
label=
"不去掉空格"
value=
"none"
></el-option>
<el-option
v-for=
"(item,index) in fieldsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
<!-- <el-option label="不去掉空格" value="none"></el-option>
<el-option label="去掉左空格" value="left"></el-option>
<el-option label="去掉右空格" value="right"></el-option>
<el-option
label=
"去掉左右两端空格"
value=
"both"
></el-option>
<el-option label="去掉左右两端空格" value="both"></el-option>
-->
</el-select>
</el-form-item>
<!-- </el-checkbox>
...
...
@@ -247,16 +253,18 @@ export default ({
},
stepName
:{},
activeName
:
'content'
,
engine
:[],
tableData
:
[
{
filemask
:
""
,
name
:
"王小虎"
,
exclude_filemask
:
""
,
file_required
:
"0"
,
include_subfolders
:
"1"
,
},
],
fieldsList
:[],
//字段获取
// engine:[],
// tableData: [
// {
// filemask: "",
// name: "王小虎",
// exclude_filemask: "",
// file_required: "0",
// include_subfolders: "1",
// },
// ],
// 表头数据
...
...
@@ -283,27 +291,27 @@ export default ({
}],
// 表头数据
tableHead2
:[
{
column_name
:
"column_name"
,
column_comment
:
"表字段"
},
{
column_name
:
"column_age"
,
column_comment
:
"流字段"
},
],
//
tableHead2:[
//
{
//
column_name: "column_name",column_comment:"表字段"
//
},
//
{
//
column_name: "column_age",column_comment:"流字段"
//
},
//
],
// 表格数据
tableData2
:
[{
column_age
:
'3'
,
column_name
:
'鞠婧祎'
,
},
{
column_age
:
'25'
,
column_name
:
'魏大勋'
,
},
{
column_age
:
'18'
,
column_name
:
'关晓彤'
,
}],
//
tableData2: [{
//
column_age: '3',
//
column_name: '鞠婧祎',
//
},
//
{
//
column_age: '25',
//
column_name: '魏大勋',
//
},
//
{
//
column_age: '18',
//
column_name: '关晓彤',
//
}],
}
},
...
...
@@ -333,7 +341,7 @@ export default ({
},
created
(){
this
.
dialogOpen
();
//
this.dialogOpen();
},
watch
:{
tableOutForm
(
n
,
o
){
...
...
@@ -343,8 +351,10 @@ export default ({
methods
:{
confirm
(){
this
.
tableOutForm
.
label
=
this
.
doubleClickCell
.
title
;
this
.
tableOutForm
.
fields
=
JSON
.
stringify
(
this
.
tableData
);
//字段复值
console
.
log
(
'表输出表单数据====='
,
this
.
tableOutForm
)
this
.
saveOutputDialog
(
this
.
tableOutForm
);
this
.
handleClose
();
//关闭弹窗
},
radioChoose
(
val
){
let
that
=
this
...
...
@@ -360,11 +370,11 @@ export default ({
// var node = enc.encode(graph.getModel());
// console.log('获取===',node);
// var changeXml = mxUtils.getPrettyXml(node);
if
(
this
.
doubleClickCell
){
var
title
=
this
.
doubleClickCell
.
title
}
console
.
log
(
'获取cell
88==='
,
this
.
doubleClickCell
);
let
pamer
=
new
FormData
();
// 创建form对象
if
(
this
.
doubleClickCell
){
var
title
=
this
.
doubleClickCell
.
title
}
console
.
log
(
'获取cell8888
88==='
,
this
.
doubleClickCell
);
let
pamer
=
new
FormData
();
// 创建form对象
pamer
.
append
(
"stepName"
,
encodeURIComponent
(
title
));
pamer
.
append
(
"graphXml"
,
this
.
getXmlVal
);
pamer
.
append
(
"before"
,
true
);
...
...
@@ -372,6 +382,7 @@ var title=this.doubleClickCell.title
inputOutputFields
(
pamer
).
then
(
res
=>
{
console
.
log
(
'字段'
,
res
);
// this.blankCanvas = res
this
.
fieldsList
=
res
;
})
},
...
...
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