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
be023217
Commit
be023217
authored
Mar 15, 2021
by
李耀锟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决冲突
parent
41c2c8c5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
66 deletions
+85
-66
src/api/kettle/link.js
+17
-0
src/views/dashboard-kettle/components/designer/FlowDesigner.vue
+68
-39
src/views/kettle/home.vue
+0
-27
No files found.
src/api/kettle/link.js
View file @
be023217
...
@@ -137,7 +137,24 @@ export function excelSheetType(data){
...
@@ -137,7 +137,24 @@ export function excelSheetType(data){
}
}
//从哪个步骤读文件名
export
function
previousSteps
(
data
){
return
request
({
url
:
'etlweb/trans/previousSteps'
,
data
,
method
:
'post'
})
}
//保存文件名的字段
export
function
inputOutputFields
(
data
){
return
request
({
url
:
'etlweb/trans/inputOutputFields'
,
data
,
method
:
'post'
})
}
...
...
src/views/dashboard-kettle/components/designer/FlowDesigner.vue
View file @
be023217
...
@@ -165,7 +165,6 @@
...
@@ -165,7 +165,6 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"选中的文件:"
>
<el-form-item
label=
"选中的文件:"
>
<!-- <input type="file" placeholder="上传" @change="fileChnageInput" /> -->
<!-- <input type="file" placeholder="上传" @change="fileChnageInput" /> -->
<el-upload
<el-upload
class=
"upload-demo"
class=
"upload-demo"
...
@@ -175,10 +174,8 @@
...
@@ -175,10 +174,8 @@
:auto-upload=
"false"
:auto-upload=
"false"
>
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
</el-upload>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
prop=
"name"
label=
"文件/目录"
width=
"120"
>
<el-table-column
prop=
"name"
label=
"文件/目录"
width=
"120"
>
...
@@ -203,7 +200,12 @@
...
@@ -203,7 +200,12 @@
size=
"small"
size=
"small"
>
编辑
</el-button
>
编辑
</el-button
>
>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteRow(scope.$index, tableData)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteRow(scope.$index, tableData)"
>
删除
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -242,9 +244,40 @@
...
@@ -242,9 +244,40 @@
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"工作表"
name=
"worksheet"
>
<el-tab-pane
label=
"工作表"
name=
"worksheet"
>
<el-button
type=
"primary"
@
click=
"addSheet"
>
添加工作表
</el-button>
<el-form
ref=
"form"
:model=
"form"
label-width=
"160px"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"160px"
>
<el-form-item
label=
"要读取的工作表列表:"
>
<el-form-item
label=
"要读取的工作表列表:"
>
<el-card
class=
"box-card"
>
</el-card>
<el-card
class=
"box-card"
>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
prop=
"name"
label=
"工作表名称"
width=
"120"
>
</el-table-column>
<el-table-column
prop=
"filemask"
label=
"起始行"
>
</el-table-column>
<el-table-column
prop=
"exclude_filemask"
label=
"起始列"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"handleClick(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button
>
<el-button
type=
"text"
size=
"small"
@
click=
"deleteRow(scope.$index, tableData)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
</el-card>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-tab-pane>
</el-tab-pane>
...
@@ -413,10 +446,10 @@
...
@@ -413,10 +446,10 @@
title=
"编辑"
title=
"编辑"
:visible
.
sync=
"edit"
:visible
.
sync=
"edit"
width=
"500px"
width=
"500px"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"150px"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"150px"
>
<el-form-item
label=
"文件/目录:"
>
<el-form-item
label=
"文件/目录:"
>
<el-input
v-model=
"form.name"
:disabled=
"true"
></el-input>
<el-input
v-model=
"form.name"
:disabled=
"true"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -429,35 +462,25 @@
...
@@ -429,35 +462,25 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"要求:"
>
<el-form-item
label=
"要求:"
>
<el-select
<el-select
v-model=
"form.file_required"
style=
"width: 100%"
>
v-model=
"form.file_required"
style=
"width: 100%"
>
<el-option
label=
"是"
value=
"1"
></el-option>
<el-option
label=
"是"
value=
"1"
></el-option>
<el-option
label=
"否"
value=
"0"
></el-option>
<el-option
label=
"否"
value=
"0"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"包含子目录:"
>
<el-form-item
label=
"包含子目录:"
>
<el-select
<el-select
v-model=
"form.include_subfolders"
style=
"width: 100%"
>
v-model=
"form.include_subfolders"
style=
"width: 100%"
>
<el-option
label=
"是"
value=
"1"
></el-option>
<el-option
label=
"是"
value=
"1"
></el-option>
<el-option
label=
"否"
value=
"0"
></el-option>
<el-option
label=
"否"
value=
"0"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"edit = false"
>
取 消
</el-button>
<el-button
@
click=
"edit = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"edit = false"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"edit = false"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -471,7 +494,11 @@ import flowNode from "./modules/node"; //流程图内节点框的编辑
...
@@ -471,7 +494,11 @@ import flowNode from "./modules/node"; //流程图内节点框的编辑
import
nodeMenu
from
"./modules/node_menu"
;
//左边tab
import
nodeMenu
from
"./modules/node_menu"
;
//左边tab
// import FlowNodeForm from './modules/node_form'//右边tab
// import FlowNodeForm from './modules/node_form'//右边tab
import
lodash
from
"lodash"
;
//JavaScript 实用工具库
import
lodash
from
"lodash"
;
//JavaScript 实用工具库
import
{
excelSheetType
}
from
"@/api/kettle/link"
;
import
{
excelSheetType
,
previousSteps
,
inputOutputFields
,
}
from
"@/api/kettle/link"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -509,7 +536,7 @@ export default {
...
@@ -509,7 +536,7 @@ export default {
zoom
:
0.5
,
zoom
:
0.5
,
excelLnput
:
false
,
excelLnput
:
false
,
edit
:
false
,
edit
:
false
,
form
:
{
form
:
{
checked
:
true
,
checked
:
true
,
},
},
...
@@ -630,43 +657,38 @@ export default {
...
@@ -630,43 +657,38 @@ export default {
});
});
},
},
methods
:
{
methods
:
{
fileChnageInput
(
e
)
{
console
.
log
(
e
);
fileChnageInput
(
e
){
console
.
log
(
e
)
},
},
// 上传
// 上传
handleChange
(
file
,
fileList
)
{
handleChange
(
file
,
fileList
)
{
// console.log(file);
// console.log(file);
this
.
fileList
=
fileList
.
slice
(
-
3
);
this
.
fileList
=
fileList
.
slice
(
-
3
);
this
.
tableData
.
push
({
name
:
file
.
name
})
this
.
tableData
.
push
({
name
:
file
.
name
});
// console.log(this.tableData);
// console.log(this.tableData);
// this.getObjectURL(file.raw)
// this.getObjectURL(file.raw)
// console.log(this.getObjectURL(file.raw));
// console.log(this.getObjectURL(file.raw));
},
},
getObjectURL
(
file
)
{
getObjectURL
(
file
)
{
let
url
=
null
;
let
url
=
null
;
if
(
window
.
createObjcectURL
!=
undefined
)
{
if
(
window
.
createObjcectURL
!=
undefined
)
{
url
=
window
.
createOjcectURL
(
file
);
url
=
window
.
createOjcectURL
(
file
);
}
else
if
(
window
.
URL
!=
undefined
)
{
}
else
if
(
window
.
URL
!=
undefined
)
{
url
=
window
.
URL
.
createObjectURL
(
file
);
url
=
window
.
URL
.
createObjectURL
(
file
);
}
else
if
(
window
.
webkitURL
!=
undefined
)
{
}
else
if
(
window
.
webkitURL
!=
undefined
)
{
url
=
window
.
webkitURL
.
createObjectURL
(
file
);
url
=
window
.
webkitURL
.
createObjectURL
(
file
);
}
}
return
url
;
return
url
;
},
},
deleteRow
(
index
,
rows
)
{
deleteRow
(
index
,
rows
)
{
rows
.
splice
(
index
,
1
);
rows
.
splice
(
index
,
1
);
},
},
tapClick
(){},
tapClick
()
{},
handleClick
(
val
)
{
handleClick
(
val
)
{
this
.
edit
=
!
this
.
edit
this
.
edit
=
!
this
.
edit
;
this
.
form
=
val
this
.
form
=
val
;
},
},
// 关闭弹框
// 关闭弹框
handleClose
(
done
)
{
handleClose
(
done
)
{
...
@@ -1065,8 +1087,15 @@ tapClick(){},
...
@@ -1065,8 +1087,15 @@ tapClick(){},
pamer
.
append
(
"query"
,
""
);
pamer
.
append
(
"query"
,
""
);
excelSheetType
(
pamer
).
then
((
res
)
=>
{
excelSheetType
(
pamer
).
then
((
res
)
=>
{
this
.
engine
=
res
;
this
.
engine
=
res
;
console
.
log
(
res
,
"+++++++++++++"
);
});
});
previousSteps
().
then
(
res
=>
{
})
inputOutputFields
().
then
(
res
=>
{
})
},
},
// 是否具有该线
// 是否具有该线
hasLine
(
from
,
to
)
{
hasLine
(
from
,
to
)
{
...
...
src/views/kettle/home.vue
View file @
be023217
...
@@ -559,15 +559,11 @@ export default {
...
@@ -559,15 +559,11 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
<<<<<<<
HEAD
prefix
:
'http://192.168.0.44:9700/etlweb/'
,
=======
inputValue
:
''
,
// 密码
inputValue
:
''
,
// 密码
dropFunction
,
//删除数据库表
dropFunction
,
//删除数据库表
deleteLink
,
//删除资源库模块的方法
deleteLink
,
//删除资源库模块的方法
dialogVisibleRemind
:
false
,
//资源库信息删除提示弹窗
dialogVisibleRemind
:
false
,
//资源库信息删除提示弹窗
testDialogueFlag
:
false
,
//测试弹弹窗
testDialogueFlag
:
false
,
//测试弹弹窗
>>>>>>>
2
bf9da3cc4c394dfd74392d098aa9b3619082cd2
tabShowFlag
:
true
,
//控制选项卡的显示和隐藏
tabShowFlag
:
true
,
//控制选项卡的显示和隐藏
picName
:
''
,
//画板的标签明名称
picName
:
''
,
//画板的标签明名称
accessDataList
:[],
//连接类型
accessDataList
:[],
//连接类型
...
@@ -1216,30 +1212,7 @@ export default {
...
@@ -1216,30 +1212,7 @@ export default {
// var origName = nodeMenu.name
// var origName = nodeMenu.name
var
origName
=
nodeMenu
.
path
var
origName
=
nodeMenu
.
path
var
nodeName
=
origName
var
nodeName
=
origName
<<<<<<<
HEAD
// var index = 1
// while (index
<
10000
)
{
// var repeat = false
// // for (var i = 0; i
<
this
.
flowData
.
nodeList
.
length
;
i
++
)
{
// // let node = this.flowData.nodeList[i]
// for (var i = 0; i
<
this
.
$refs
[
'pic'
].
flowData
.
nodeList
.
length
;
i
++
)
{
// let node =this.$refs['pic'].flowData.nodeList[i]
// if (node.name === nodeName) {
// nodeName = origName + index
// repeat = true
// }
// }
// if (repeat) {
// index++
// continue
// }
// break
// }
console
.
log
(
'-------003'
,
nodeMenu
);
=======
console
.
log
(
'-------003'
,
nodeMenu
.
type
);
console
.
log
(
'-------003'
,
nodeMenu
.
type
);
>>>>>>>
2
bf9da3cc4c394dfd74392d098aa9b3619082cd2
var
node
=
{
var
node
=
{
id
:
nodeId
,
//节点id--前端唯一的
id
:
nodeId
,
//节点id--前端唯一的
name
:
nodeMenu
.
text
,
//节点名称
name
:
nodeMenu
.
text
,
//节点名称
...
...
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