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
864e81b4
Commit
864e81b4
authored
Apr 12, 2021
by
李耀锟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://139.159.239.83:9093/mxl/ETL-admin
into master
parents
dc68a2b0
476a1f38
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
184 additions
and
93 deletions
+184
-93
src/views/dialogs-components/global/database-choose/main.vue
+26
-9
src/views/dialogs-components/global/trans-graph/main.vue
+1
-0
src/views/output-dialog/micro-excel.vue
+3
-2
src/views/output-dialog/table-out.vue
+81
-21
src/views/output-dialog/update.vue
+73
-61
No files found.
src/views/dialogs-components/global/database-choose/main.vue
View file @
864e81b4
...
...
@@ -87,11 +87,15 @@ export default {
}
},
watch
:{
graph
(
n
,
o
){
console
.
log
(
"表输出拿到的画布2222==="
,
n
);
}
},
// watch:{
// graph(n,o){
// console.log("表输出拿到的画布2222===",n);
// },
// },
props
:[
"form"
,
"getXmlVal"
,
"graph"
],
created
()
{
...
...
@@ -183,7 +187,7 @@ export default {
},
//浏览
scanTree
(
type
){
console
.
log
(
'当前选中链接***************'
,
this
.
form
.
selectName
);
console
.
log
(
'当前选中链接***************'
,
this
.
form
.
connection
);
this
.
chooseType
=
type
;
if
(
this
.
form
.
connection
){
// this.$refs.establishDia.database(this.selectName);
...
...
@@ -226,10 +230,23 @@ export default {
},
deep
:
true
},
'form.connection'
:
{
handler
:
function
()
{
this
.
form
.
schema
=
""
,
this
.
form
.
table
=
""
},
}
},
// 监听如果改变数据库链接把目标表和模式初始化为空,之前设置好字段为空,该字段不是对应数据库链接下面表对应的字段--start---
// watch: {
// 'form.connection': {
// handler: function() {
// this.form.schema="",
// this.form.table=""
// },
// }
// },
// 监听如果改变数据库链接把目标表和模式初始化为空,之前设置好字段为空,该字段不是对应数据库链接下面表对应的字段--end---
};
</
script
>
<
style
>
...
...
src/views/dialogs-components/global/trans-graph/main.vue
View file @
864e81b4
...
...
@@ -216,6 +216,7 @@ export default ({
},
handleClose
(){
this
.
$emit
(
"update:transGraphVisible"
,
false
);
this
.
activeName
=
'first'
;
},
//打开弹窗执行方法
openFunc
(){
...
...
src/views/output-dialog/micro-excel.vue
View file @
864e81b4
...
...
@@ -8,9 +8,10 @@
top=
"5%"
>
<div
id=
"ExcelInputDialog"
></div>
<el-form
ref=
"stepName"
:model=
"stepName"
label-width=
"120px"
>
<!--
<el-form
ref=
"stepName"
:model=
"stepName"
label-width=
"120px"
>
-->
<el-form
ref=
"form"
:model=
"microForm"
label-width=
"250px"
>
<el-form-item
label=
"步骤名称:"
>
<el-input
v-model=
"
stepName.name
"
></el-input>
<el-input
v-model=
"
microForm.label
"
></el-input>
</el-form-item>
</el-form>
...
...
src/views/output-dialog/table-out.vue
View file @
864e81b4
...
...
@@ -136,9 +136,9 @@
<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"
@
click=
"deleteFields
"
>
删除字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"inputOutputFields('get')"
>
获取字段
</el-button>
<
!--
<el-button
style=
"padding: 3px 0"
type=
"text"
>
输入字段映射
</el-button><
-->
</div>
<table-list
ref=
"tableDia"
:tableHead=
"tableHead"
:tableData=
"tableData"
:field
.
sync=
"editDia"
:fieldClick=
"fieldClick"
></table-list>
<!--
<table-list
ref=
"tableDia"
:tableHead=
"tableHead"
:tableData=
"tableData"
:field
.
sync=
"editDia"
:fieldClick=
"fieldClick"
></table-list>
-->
...
...
@@ -205,6 +205,7 @@ import { mapGetters,mapMutations } from "vuex";
export
default
({
data
(){
return
{
newTableOutForm
:{},
field
:
false
,
//编辑弹窗
checkedCities
:
[
'上海'
,
'北京'
],
editDia
:
false
,
//编辑表字段
...
...
@@ -258,18 +259,18 @@ export default ({
],
// 表格数据
tableData
:
[
{
stream_name
:
'3'
,
column_name
:
'鞠婧祎'
,
},
{
stream_name
:
'25'
,
column_name
:
'魏大勋'
,
},
{
stream_name
:
'18'
,
column_name
:
'关晓彤'
,
}
//
{
//
stream_name: '3',
//
column_name: '鞠婧祎',
//
},
//
{
//
stream_name: '25',
//
column_name: '魏大勋',
//
},
//
{
//
stream_name: '18',
//
column_name: '关晓彤',
//
}
],
newGraph
:{}
//获取的画布对象
...
...
@@ -303,6 +304,22 @@ export default ({
},
created
(){
// if(this.tableOutForm.connection!=''){
// this.tableData=JSON.parse(this.tableOutForm.fields);
// this.newTableOutForm=this.tableOutForm;
// }
// console.log("回显的表单数据===",n);
// if(n){
// var ny=JSON.parse(n.fields);
// this.tableData=ny;
// }
// },
// this.dialogOpen();
console
.
log
(
this
.
graph
,
'========='
);
...
...
@@ -329,10 +346,34 @@ export default ({
this
.
tableData
=
ny
;
}
},
//如果修改了数据库链接或者另选表字段为空需要重置start================
// 'tableOutForm.connection':{
// handler: function(a,b) {
// if(this.newTableOutForm){
// if(a!=this.newTableOutForm.conection){
// this.tableData=[];
// }
// }
// },
// },
// 'tableOutForm.table': {
// handler: function(a,b) {
// if(this.newTableOutForm){
// if(a!=this.newTableOutForm.table){
// this.tableData=[];
// }
// }
// },
// },
//如果修改了数据库链接或者另选表字段为空需要重置end================
// graph(n,o){
// console.log("表输出拿到的画布1111===",n);
// }
graph
(
n
,
o
){
console
.
log
(
"表输出拿到的画布1111==="
,
n
);
}
},
methods
:{
clickFun
(
graph
){
...
...
@@ -343,9 +384,8 @@ export default ({
},
500
);
},
confirm
(){
// 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
.
handleClose
();
//关闭弹窗
},
...
...
@@ -392,7 +432,7 @@ export default ({
})
},
//获取表输出
inputOutputFields
(){
inputOutputFields
(
par
){
if
(
this
.
doubleClickCell
){
// var title=this.doubleClickCell.title
var
title
=
this
.
doubleClickCell
.
value
.
attributes
.
label
.
value
...
...
@@ -415,11 +455,27 @@ export default ({
pamer
.
append
(
"query"
,
''
);
inputOutputFields
(
pamer
).
then
(
res
=>
{
console
.
log
(
'字段'
,
res
);
// 获取全部字段===
if
(
par
==
"get"
){
var
newArray
=
[];
res
.
forEach
(
item
=>
{
var
newObj
=
{};
newObj
.
column_name
=
item
.
name
;
newObj
.
stream_name
=
item
.
name
;
newArray
.
push
(
newObj
);
});
this
.
tableData
=
newArray
;
}
else
{
this
.
fieldsList2
=
res
;
}
// 获取全部字段===
})
},
//新增或者编辑弹窗
fieldClick
(
state
,
val
)
{
this
.
field
=
!
this
.
field
;
...
...
@@ -442,6 +498,10 @@ export default ({
this
.
tableData
.
push
(
this
.
fieldForm
);
}
},
//删除字段
deleteFields
(){
this
.
tableData
=
[];
}
...
...
src/views/output-dialog/update.vue
View file @
864e81b4
...
...
@@ -57,14 +57,11 @@
</el-tab-pane>
<el-tab-pane
label=
"查询字段"
name=
"handling"
>
<!--
<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-card
class=
"box-card"
style=
"margin-top:15px;"
>
<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=
"deleteFields"
>
删除字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"inputOutputFields('get')"
>
获取字段
</el-button>
</div>
<table-list
ref=
"tableDia"
:tableHead=
"tableHead"
:tableData=
"tableData"
:field
.
sync=
"editDia"
:fieldClick=
"fieldClick"
></table-list>
...
...
@@ -77,10 +74,6 @@
append-to-body
>
<el-form
ref=
"form1"
:model=
"fieldForm"
label-width=
"80px"
>
<el-form-item
label=
"表字段:"
>
<!-- <el-select v-model="fieldForm.field" style="width: 100%">
<el-option v-for="(item,index) in fieldsList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> -->
<!-- <el-input v-model="fieldForm.field"></el-input> -->
<el-select
v-model=
"fieldForm.field"
style=
"width: 100%"
@
focus=
"tableFields"
>
<el-option
v-for=
"(item,index) in fieldsList1"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
...
...
@@ -93,10 +86,6 @@
</el-form-item>
<el-form-item
label=
"流里的字段1:"
>
<!-- <el-select v-model="fieldForm.name" style="width: 100%">
<el-option v-for="(item,index) in fieldsList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> -->
<!-- <el-input v-model="fieldForm.name"></el-input> -->
<el-select
v-model=
"fieldForm.name"
style=
"width: 100%"
@
focus=
"inputOutputFields"
>
<el-option
v-for=
"(item,index) in fieldsList2"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
...
...
@@ -104,10 +93,6 @@
<el-form-item
label=
"流里的字段2:"
>
<!-- <el-select v-model="fieldForm.name2" style="width: 100%">
<el-option v-for="(item,index) in fieldsList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> -->
<!-- <el-input v-model="fieldForm.name2"></el-input> -->
<el-select
v-model=
"fieldForm.name2"
style=
"width: 100%"
@
focus=
"inputOutputFields"
>
<el-option
v-for=
"(item,index) in fieldsList2"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
...
...
@@ -125,14 +110,12 @@
<el-tab-pane
label=
"更新字段"
name=
"oher "
>
<!-- <el-table style="width: 100%" border :data="tableData2">
<template v-for="(item,index) in tableHead2">
<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-card
class=
"box-card"
style=
"margin-top:15px;"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"fieldClickUpdate"
>
新增字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"deleteFieldsUpdate"
>
删除字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"inputOutputFields('update')"
>
获取字段
</el-button>
</div>
<table-list
:tableHead=
"tableHeadUpdate"
:tableData=
"tableDataUpdate"
:field
.
sync=
"editDiaUpdate"
:fieldClick=
"fieldClickUpdate"
></table-list>
...
...
@@ -145,20 +128,12 @@
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-input v-model="fieldFormUpdate.name"></el-input> -->
<el-select
v-model=
"fieldFormUpdate.name"
style=
"width: 100%"
@
focus=
"tableFields"
>
<el-option
v-for=
"(item,index) in fieldsList1"
: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-input v-model="fieldFormUpdate.rename"></el-input> -->
<el-select
v-model=
"fieldFormUpdate.rename"
style=
"width: 100%"
@
focus=
"inputOutputFields"
>
<el-option
v-for=
"(item,index) in fieldsList2"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
...
...
@@ -261,24 +236,25 @@ export default ({
],
// 表格数据
tableData
:
[{
field
:
'3'
,
condition
:
'鞠婧祎'
,
name
:
'女'
,
name2
:
'1'
,
},
{
field
:
'31'
,
condition
:
'鞠婧祎'
,
name
:
'女'
,
name2
:
'1'
,
},
{
field
:
'32'
,
condition
:
'鞠婧祎'
,
name
:
'女'
,
name2
:
'1'
,
},
tableData
:
[
// {
// field: '3',
// condition: '鞠婧祎',
// name: '女',
// name2:'1',
// },
// {
// field: '31',
// condition: '鞠婧祎',
// name: '女',
// name2:'1',
// },
// {
// field: '32',
// condition: '鞠婧祎',
// name: '女',
// name2:'1',
// },
],
// 查询字段--end------------
// 更新字段start------------
...
...
@@ -293,19 +269,21 @@ export default ({
],
// 表格数据
tableDataUpdate
:
[{
name
:
'1'
,
rename
:
'鞠婧祎1'
,
},
{
name
:
'2'
,
rename
:
'鞠婧祎2'
,
},
{
name
:
'3'
,
rename
:
'鞠婧祎3'
,
tableDataUpdate
:
[
// {
// name: '1',
// rename: '鞠婧祎1',
// },
// {
// name: '2',
// rename: '鞠婧祎2',
// },
// {
// name: '3',
// rename: '鞠婧祎3',
},],
// },
],
// 更新字段end-------------------
}
...
...
@@ -458,7 +436,7 @@ export default ({
})
},
//获取表输出
inputOutputFields
(){
inputOutputFields
(
par
){
if
(
this
.
doubleClickCell
){
// var title=this.doubleClickCell.title;
var
title
=
this
.
doubleClickCell
.
value
.
attributes
.
label
.
value
;
...
...
@@ -480,9 +458,43 @@ export default ({
pamer
.
append
(
"query"
,
''
);
inputOutputFields
(
pamer
).
then
(
res
=>
{
console
.
log
(
'字段'
,
res
);
// this.fieldsList2=res;
// 获取全部字段===
if
(
par
==
"get"
){
var
newArray
=
[];
res
.
forEach
(
item
=>
{
var
newObj
=
{};
newObj
.
field
=
""
;
newObj
.
condition
=
"="
;
newObj
.
name
=
item
.
name
;
newObj
.
name2
=
""
;
newArray
.
push
(
newObj
);
});
this
.
tableData
=
newArray
;
}
else
if
(
par
==
"update"
){
var
newArray
=
[];
res
.
forEach
(
item
=>
{
var
newObj
=
{};
newObj
.
name
=
""
;
newObj
.
rename
=
item
.
name
;
newArray
.
push
(
newObj
);
});
this
.
tableDataUpdate
=
newArray
;
}
else
{
this
.
fieldsList2
=
res
;
}
// 获取全部字段===
})
},
//删除字段
deleteFields
(){
this
.
tableData
=
[];
},
//删除字段
deleteFieldsUpdate
(){
this
.
tableDataUpdate
=
[];
}
...
...
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