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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
177 additions
and
145 deletions
+177
-145
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+4
-4
src/views/output-dialog/delete.vue
+41
-23
src/views/output-dialog/insertOrUpdate.vue
+0
-0
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 @@
...
@@ -820,7 +820,7 @@
<insertOrUpdate
<insertOrUpdate
ref=
"insertOrdate"
ref=
"insertOrdate"
:InsertOrUpdateVisible
.
sync=
"InsertOrUpdateVisible"
:InsertOrUpdateVisible
.
sync=
"InsertOrUpdateVisible"
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
></insertOrUpdate>
:saveOutputDialog=
"saveOutputDialog"
:doubleClickCell=
"doubleClickCell"
:getXmlVal=
"getXmlVal"
></insertOrUpdate>
<excelOutPutDialog
<excelOutPutDialog
ref=
"excelOut"
ref=
"excelOut"
:excelOutPutVisible
.
sync=
"excelOutPutVisible"
:excelOutPutVisible
.
sync=
"excelOutPutVisible"
...
@@ -1442,7 +1442,7 @@ export default {
...
@@ -1442,7 +1442,7 @@ export default {
}
}
this
.
form
=
q
this
.
form
=
q
return
;
return
;
}
else
if
(
cell
.
ids
==
"step17"
)
{
}
else
if
(
cell
.
ids
==
"step17"
||
cell
.
value
.
attributes
.
ctype
.
value
==
"TableOutput"
)
{
//表输出
//表输出
this
.
tableOutPutVisible
=
!
this
.
tableOutPutVisible
;
this
.
tableOutPutVisible
=
!
this
.
tableOutPutVisible
;
return
;
return
;
...
@@ -1450,7 +1450,7 @@ export default {
...
@@ -1450,7 +1450,7 @@ export default {
//更新
//更新
this
.
updateVisible
=
!
this
.
updateVisible
;
this
.
updateVisible
=
!
this
.
updateVisible
;
return
;
return
;
}
else
if
(
cell
.
ids
==
"step1
4
"
)
{
}
else
if
(
cell
.
ids
==
"step1
5
"
)
{
//文本文件输出
//文本文件输出
this
.
fileVisible
=
!
this
.
fileVisible
;
this
.
fileVisible
=
!
this
.
fileVisible
;
return
;
return
;
...
@@ -1466,7 +1466,7 @@ export default {
...
@@ -1466,7 +1466,7 @@ export default {
//删除
//删除
this
.
deleteVisible
=
!
this
.
deleteVisible
;
this
.
deleteVisible
=
!
this
.
deleteVisible
;
return
;
return
;
}
else
if
(
cell
.
ids
==
"step1
0
"
)
{
}
else
if
(
cell
.
ids
==
"step1
1
"
)
{
//SQL文件输出
//SQL文件输出
this
.
sqlVisible
=
!
this
.
sqlVisible
;
this
.
sqlVisible
=
!
this
.
sqlVisible
;
return
;
return
;
...
...
src/views/output-dialog/delete.vue
View file @
d4bfce02
...
@@ -9,10 +9,13 @@
...
@@ -9,10 +9,13 @@
>
>
<!--
<div
id=
"ExcelInputDialog"
></div>
-->
<!--
<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-form-item
label=
"步骤名称:"
>
<el-input
v-model=
"
deleteForm
.name"
></el-input>
<el-input
v-model=
"
stepName
.name"
></el-input>
</el-form-item>
</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;"
>
<div
style=
"border:1px solid #99BBE8;padding:15px 15px;margin-bottom:15px;"
>
<database-choose
ref=
"databaseChoose"
:form=
"deleteForm"
></database-choose>
<database-choose
ref=
"databaseChoose"
:form=
"deleteForm"
></database-choose>
<el-form-item
label=
"提交记录数量:"
>
<el-form-item
label=
"提交记录数量:"
>
...
@@ -50,15 +53,27 @@
...
@@ -50,15 +53,27 @@
export
default
({
export
default
({
data
(){
data
(){
return
{
return
{
stepName
:{
name
:
'删除'
},
activeName
:
'content'
,
activeName
:
'content'
,
// deleteForm:{
// commit: "100",
// connection: "",
// schema: "test",
// table: "",
// searchFields: "[]",
// updateFields: "[]",
// },
deleteForm
:{
deleteForm
:{
commit
:
"100"
,
commit
:
"100"
,
connection
:
""
,
connection
:
""
,
schema
:
"test"
,
key
:
"[]"
,
label
:
"删除"
,
schema
:
""
,
table
:
""
,
table
:
""
,
searchFields
:
"[]"
,
//
searchFields: "[]",
updateFields
:
"[]"
,
//
updateFields: "[]",
// update_bypassed: "N"
},
},
// 表头数据
// 表头数据
tableHead
:[
tableHead
:[
...
@@ -98,23 +113,22 @@ export default ({
...
@@ -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
(){
mounted
(){
},
},
...
@@ -123,7 +137,11 @@ export default ({
...
@@ -123,7 +137,11 @@ export default ({
this
.
$emit
(
"update:deleteVisible"
,
false
);
this
.
$emit
(
"update:deleteVisible"
,
false
);
},
},
confirm
(){
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
This diff is collapsed.
Click to expand it.
src/views/output-dialog/sqlFileOutput.vue
View file @
d4bfce02
...
@@ -202,83 +202,85 @@ export default ({
...
@@ -202,83 +202,85 @@ export default ({
},
},
activeName
:
'content'
,
activeName
:
'content'
,
// 表头数据
// 表头数据
tableHead
:[
//
tableHead:[
{
//
{
column_name
:
"column_name"
,
column_comment
:
"表字段"
//
column_name: "column_name",column_comment:"表字段"
},
//
},
{
//
{
column_name
:
"column_age"
,
column_comment
:
"比较符"
//
column_name: "column_age",column_comment:"比较符"
},
//
},
{
//
{
column_name
:
"column_sex"
,
column_comment
:
"流里的字段1"
//
column_name: "column_sex",column_comment:"流里的字段1"
},
//
},
{
//
{
column_name
:
"column_col"
,
column_comment
:
"流里的字段2"
//
column_name: "column_col",column_comment:"流里的字段2"
}
//
}
],
//
],
// 表格数据
// 表格数据
tableData
:
[{
//
tableData: [{
column_age
:
'3'
,
//
column_age: '3',
column_name
:
'鞠婧祎'
,
//
column_name: '鞠婧祎',
column_sex
:
'女'
,
//
column_sex: '女',
column_col
:
'1'
//
column_col:'1'
},
//
},
{
//
{
column_age
:
'25'
,
//
column_age: '25',
column_name
:
'魏大勋'
,
//
column_name: '魏大勋',
column_sex
:
'男'
,
//
column_sex: '男',
column_col
:
'2'
//
column_col:'2'
},
//
},
{
//
{
column_age
:
'18'
,
//
column_age: '18',
column_name
:
'关晓彤'
,
//
column_name: '关晓彤',
column_sex
:
'女'
,
//
column_sex: '女',
column_col
:
'3'
//
column_col:'3'
}],
//
}],
// 表头数据
// 表头数据
tableHead1
:[
//
tableHead1:[
{
//
{
column_name
:
"column_name"
,
column_comment
:
"表字段"
//
column_name: "column_name",column_comment:"表字段"
},
//
},
{
//
{
column_name
:
"column_age"
,
column_comment
:
"流字段"
//
column_name: "column_age",column_comment:"流字段"
},
//
},
{
//
{
column_name
:
"column_sex"
,
column_comment
:
"更新"
//
column_name: "column_sex",column_comment:"更新"
}
//
}
],
//
],
// 表格数据
// 表格数据
tableData1
:
[{
//
tableData1: [{
column_age
:
'3'
,
//
column_age: '3',
column_name
:
'鞠婧祎'
,
//
column_name: '鞠婧祎',
column_sex
:
'女'
,
//
column_sex: '女',
},
//
},
{
//
{
column_age
:
'25'
,
//
column_age: '25',
column_name
:
'魏大勋'
,
//
column_name: '魏大勋',
column_sex
:
'男'
,
//
column_sex: '男',
},
//
},
{
//
{
column_age
:
'18'
,
//
column_age: '18',
column_name
:
'关晓彤'
,
//
column_name: '关晓彤',
column_sex
:
'女'
,
//
column_sex: '女',
}],
//
}],
}
}
},
},
props
:{
props
:[
"title"
,
"sqlVisible"
,
"saveOutputDialog"
,
"doubleClickCell"
],
title
:{
type
:
String
,
default
:
''
},
sqlVisible
:{
type
:
Boolean
,
default
:
false
},
},
// props:{
// title:{
// type:String,
// default:''
// },
// sqlVisible:{
// type: Boolean,
// default:false
// },
// },
created
(){
created
(){
this
.
formatFunc
();
//获取时间日期格式
this
.
formatFunc
();
//获取时间日期格式
this
.
getAvailableCharsets
();
//获取编码
this
.
getAvailableCharsets
();
//获取编码
...
@@ -316,8 +318,9 @@ export default ({
...
@@ -316,8 +318,9 @@ export default ({
confirm
(){
confirm
(){
console
.
log
(
'弹窗数据=='
,
this
.
sqlForm
);
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 @@
...
@@ -60,8 +60,9 @@
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"23"
>
<el-col
:span=
"23"
>
<el-select
v-model=
"tableOutForm.partitioning_field"
style=
"width: 100%"
:disabled=
"tableOutForm.partitioning_enabled=='Y'? false :true"
>
<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=
"shanghai"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></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-select>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -99,9 +100,11 @@
...
@@ -99,9 +100,11 @@
<el-form-item
label=
"包含表名的字段:"
>
<el-form-item
label=
"包含表名的字段:"
>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"23"
>
<el-col
:span=
"23"
>
<el-select
v-model=
"tableOutForm.tablename_field"
:disabled=
"tableOutForm.partitioning_enabled=='Y'? false :true"
style=
"width: 100%"
>
<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=
"shanghai"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></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-select>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -130,13 +133,13 @@
...
@@ -130,13 +133,13 @@
</el-tab-pane>
</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"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<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"
@
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>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
输入字段映射
</el-button>
-->
</div>
</div>
<!--
<el-table
style=
"width: 100%"
border
:data=
"tableData2"
>
<!--
<el-table
style=
"width: 100%"
border
:data=
"tableData2"
>
<template
v-for=
"(item,index) in tableHead2"
>
<template
v-for=
"(item,index) in tableHead2"
>
...
@@ -157,10 +160,11 @@
...
@@ -157,10 +160,11 @@
<el-checkbox > -->
<el-checkbox > -->
<el-form-item
label=
"表字段:"
>
<el-form-item
label=
"表字段:"
>
<el-select
v-model=
"fieldForm.column_name"
style=
"width: 100%"
>
<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="left"></el-option>
<el-option label="去掉右空格" value="right"></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-select>
</el-form-item>
</el-form-item>
<!-- </el-checkbox> -->
<!-- </el-checkbox> -->
...
@@ -168,10 +172,12 @@
...
@@ -168,10 +172,12 @@
<!-- <el-checkbox > -->
<!-- <el-checkbox > -->
<el-form-item
label=
"流字段:"
>
<el-form-item
label=
"流字段:"
>
<el-select
v-model=
"fieldForm.stream_name"
style=
"width: 100%"
>
<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="left"></el-option>
<el-option label="去掉右空格" value="right"></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-select>
</el-form-item>
</el-form-item>
<!-- </el-checkbox>
<!-- </el-checkbox>
...
@@ -247,16 +253,18 @@ export default ({
...
@@ -247,16 +253,18 @@ export default ({
},
},
stepName
:{},
stepName
:{},
activeName
:
'content'
,
activeName
:
'content'
,
engine
:[],
fieldsList
:[],
//字段获取
tableData
:
[
// engine:[],
{
// tableData: [
filemask
:
""
,
// {
name
:
"王小虎"
,
// filemask: "",
exclude_filemask
:
""
,
// name: "王小虎",
file_required
:
"0"
,
// exclude_filemask: "",
include_subfolders
:
"1"
,
// file_required: "0",
},
// include_subfolders: "1",
],
// },
// ],
// 表头数据
// 表头数据
...
@@ -283,27 +291,27 @@ export default ({
...
@@ -283,27 +291,27 @@ export default ({
}],
}],
// 表头数据
// 表头数据
tableHead2
:[
//
tableHead2:[
{
//
{
column_name
:
"column_name"
,
column_comment
:
"表字段"
//
column_name: "column_name",column_comment:"表字段"
},
//
},
{
//
{
column_name
:
"column_age"
,
column_comment
:
"流字段"
//
column_name: "column_age",column_comment:"流字段"
},
//
},
],
//
],
// 表格数据
// 表格数据
tableData2
:
[{
//
tableData2: [{
column_age
:
'3'
,
//
column_age: '3',
column_name
:
'鞠婧祎'
,
//
column_name: '鞠婧祎',
},
//
},
{
//
{
column_age
:
'25'
,
//
column_age: '25',
column_name
:
'魏大勋'
,
//
column_name: '魏大勋',
},
//
},
{
//
{
column_age
:
'18'
,
//
column_age: '18',
column_name
:
'关晓彤'
,
//
column_name: '关晓彤',
}],
//
}],
}
}
},
},
...
@@ -333,7 +341,7 @@ export default ({
...
@@ -333,7 +341,7 @@ export default ({
},
},
created
(){
created
(){
this
.
dialogOpen
();
//
this.dialogOpen();
},
},
watch
:{
watch
:{
tableOutForm
(
n
,
o
){
tableOutForm
(
n
,
o
){
...
@@ -343,8 +351,10 @@ export default ({
...
@@ -343,8 +351,10 @@ export default ({
methods
:{
methods
:{
confirm
(){
confirm
(){
this
.
tableOutForm
.
label
=
this
.
doubleClickCell
.
title
;
this
.
tableOutForm
.
label
=
this
.
doubleClickCell
.
title
;
this
.
tableOutForm
.
fields
=
JSON
.
stringify
(
this
.
tableData
);
//字段复值
console
.
log
(
'表输出表单数据====='
,
this
.
tableOutForm
)
console
.
log
(
'表输出表单数据====='
,
this
.
tableOutForm
)
this
.
saveOutputDialog
(
this
.
tableOutForm
);
this
.
saveOutputDialog
(
this
.
tableOutForm
);
this
.
handleClose
();
//关闭弹窗
},
},
radioChoose
(
val
){
radioChoose
(
val
){
let
that
=
this
let
that
=
this
...
@@ -360,11 +370,11 @@ export default ({
...
@@ -360,11 +370,11 @@ export default ({
// var node = enc.encode(graph.getModel());
// var node = enc.encode(graph.getModel());
// console.log('获取===',node);
// console.log('获取===',node);
// var changeXml = mxUtils.getPrettyXml(node);
// var changeXml = mxUtils.getPrettyXml(node);
if
(
this
.
doubleClickCell
){
if
(
this
.
doubleClickCell
){
var
title
=
this
.
doubleClickCell
.
title
var
title
=
this
.
doubleClickCell
.
title
}
}
console
.
log
(
'获取cell
88==='
,
this
.
doubleClickCell
);
console
.
log
(
'获取cell8888
88==='
,
this
.
doubleClickCell
);
let
pamer
=
new
FormData
();
// 创建form对象
let
pamer
=
new
FormData
();
// 创建form对象
pamer
.
append
(
"stepName"
,
encodeURIComponent
(
title
));
pamer
.
append
(
"stepName"
,
encodeURIComponent
(
title
));
pamer
.
append
(
"graphXml"
,
this
.
getXmlVal
);
pamer
.
append
(
"graphXml"
,
this
.
getXmlVal
);
pamer
.
append
(
"before"
,
true
);
pamer
.
append
(
"before"
,
true
);
...
@@ -372,6 +382,7 @@ var title=this.doubleClickCell.title
...
@@ -372,6 +382,7 @@ var title=this.doubleClickCell.title
inputOutputFields
(
pamer
).
then
(
res
=>
{
inputOutputFields
(
pamer
).
then
(
res
=>
{
console
.
log
(
'字段'
,
res
);
console
.
log
(
'字段'
,
res
);
// this.blankCanvas = 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