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
327ec109
Commit
327ec109
authored
Sep 03, 2021
by
李耀琨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数值范围 解决分组bug 数据检验
parent
f0dcfd5d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
14 deletions
+82
-14
src/api/kettle/link.js
+9
-0
src/views/dashboard-kettle/components/appBulletFrame/dataInspection.vue
+0
-0
src/views/dashboard-kettle/components/appBulletFrame/grouping.vue
+50
-9
src/views/dashboard-kettle/components/appBulletFrame/numericalRange.vue
+1
-5
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+22
-0
No files found.
src/api/kettle/link.js
View file @
327ec109
...
...
@@ -12,6 +12,15 @@ export function types(data) {
}
//获取连接类型
export
function
typeGroup
(
data
)
{
return
request
({
url
:
'etlweb/system/typeGroup'
,
data
,
method
:
'post'
})
}
//记录集连接 连接类型
export
function
typesss
(
data
)
{
return
request
({
...
...
src/views/dashboard-kettle/components/appBulletFrame/dataInspection.vue
0 → 100644
View file @
327ec109
This diff is collapsed.
Click to expand it.
src/views/dashboard-kettle/components/appBulletFrame/grouping.vue
View file @
327ec109
...
...
@@ -135,8 +135,17 @@
:modal=
"false"
>
<el-form
ref=
"form"
:model=
"fiel"
label-width=
"160px"
>
<el-form-item
label=
"名称:"
>
<el-input
v-model=
"fiel.name"
></el-input>
<el-select
v-model=
"fiel.name"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in getFiel"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
...
...
@@ -161,10 +170,10 @@
<el-form-item
label=
"subject:"
>
<el-select
v-model=
"gatherLite.subject"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in
fields
"
v-for=
"(item,index) in
getFiel
"
:key=
"index"
:label=
"item.
aggregat
e"
:value=
"item.
aggregat
e"
:label=
"item.
nam
e"
:value=
"item.
nam
e"
>
</el-option>
</el-select>
...
...
@@ -173,7 +182,7 @@
<el-form-item
label=
"类型:"
>
<el-select
v-model=
"gatherLite.type"
placeholder=
"请选择"
>
<el-option
v-for=
"item in
fields
"
v-for=
"item in
typeGroup
"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
...
...
@@ -192,7 +201,7 @@
</template>
<
script
>
import
{
systemDataTypes
,
inputOutputFields
}
from
"@/api/kettle/link"
;
import
{
systemDataTypes
,
inputOutputFields
,
typeGroup
}
from
"@/api/kettle/link"
;
import
mxgraph
from
"@/utils/mxgraph"
;
const
{
mxGraph
,
...
...
@@ -220,16 +229,30 @@ export default {
fiel
:
{},
gatherLite
:
{},
gather
:
false
,
typeGroup
:[],
getFiel
:[],
};
},
created
()
{
this
.
systemDataTypesFun
();
},
methods
:
{
gatherDetermine
(){},
gatherDetermine
(){
this
.
fields
.
push
()
this
.
gather
=
!
this
.
gather
;
if
(
this
.
dataStatus
)
{
this
.
fields
.
push
(
this
.
gatherLite
);
}
},
typeGroupFun
(){
typeGroup
().
then
(
res
=>
{
this
.
typeGroup
=
res
})
},
structure
(
state
,
val
)
{
// this.addField = !this.addField
this
.
dataStatus
=
state
;
...
...
@@ -242,6 +265,7 @@ export default {
},
polymerization
(
state
,
val
)
{
this
.
dataStatus
=
state
;
this
.
typeGroupFun
()
if
(
state
)
{
this
.
gatherLite
=
{};
}
else
{
...
...
@@ -250,7 +274,22 @@ export default {
}
this
.
gather
=
!
this
.
gather
;
},
inputOutputFieldsFun
(){
var
enc
=
new
mxCodec
(
mxUtils
.
createXmlDocument
());
var
node
=
enc
.
encode
(
this
.
newGraph
.
getModel
());
this
.
graphXml
=
mxUtils
.
getPrettyXml
(
node
);
let
pamerFields
=
new
FormData
();
// 创建form对象
pamerFields
.
append
(
"stepName"
,
this
.
nodeData
.
value
.
attributes
.
label
.
value
);
pamerFields
.
append
(
"graphXml"
,
this
.
graphXml
);
pamerFields
.
append
(
"before"
,
true
);
inputOutputFields
(
pamerFields
).
then
((
res
)
=>
{
this
.
getFiel
=
res
;
console
.
log
(
res
);
});
},
getTheGroup
()
{
var
enc
=
new
mxCodec
(
mxUtils
.
createXmlDocument
());
...
...
@@ -304,8 +343,10 @@ export default {
},
clickFun
(
graph
,
val
)
{
console
.
log
(
graph
,
"双击获取值"
);
this
.
newGraph
=
graph
;
this
.
inputOutputFieldsFun
()
console
.
log
(
val
,
"拿到form"
);
this
.
fields
=
JSON
.
parse
(
val
.
fields
)
this
.
groupFile
=
JSON
.
parse
(
val
.
groupFile
)
...
...
@@ -325,7 +366,7 @@ export default {
addFieldDetermine
()
{
this
.
addField
=
!
this
.
addField
;
if
(
this
.
dataStatus
)
{
this
.
fields
.
push
(
this
.
fiel
);
this
.
groupFile
.
push
(
this
.
fiel
);
}
else
{
}
},
...
...
src/views/dashboard-kettle/components/appBulletFrame/numericalRange.vue
View file @
327ec109
...
...
@@ -32,17 +32,13 @@
{{
'范围(最小<= x<最大):'
}}
<br>
<el-button
type=
"text"
@
click=
"addSheet(true)"
style=
"margin: 10px"
>
添加
</el-button
>
>
添加
</el-button>
<el-form-item>
<el-table
:data=
"rules"
style=
"width: 100%"
>
<el-table-column
prop=
"lower_bound"
label=
"下界"
>
</el-table-column>
<el-table-column
prop=
"upper_bound"
label=
"上界"
>
</el-table-column>
<el-table-column
prop=
"value"
label=
"值"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
...
...
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
327ec109
...
...
@@ -1010,6 +1010,16 @@
:saveOutputDialog=
"saveOutputDialog"
></addConstants>
<!-- 数据校验 -->
<dataInspection
ref=
"dataInspection"
:form=
"form"
:nodeData=
"nodeData"
:dataInspectionDialog
.
sync=
"dataInspectionDialog"
:doubleClickCell=
"doubleClickCell"
:saveOutputDialog=
"saveOutputDialog"
></dataInspection>
<!-- 拆分字符串 -->
<splitFields
ref=
"splitFields"
...
...
@@ -1383,6 +1393,7 @@ import addSequence from "../appBulletFrame/addSequence"; //增加序列
import
importXmlFile
from
"../appBulletFrame/importXmlFile"
;
//导出资源库到XML文件
import
grouping
from
"../appBulletFrame/grouping"
;
//分组
import
addConstants
from
"../appBulletFrame/addConstants"
;
//增加常量
import
dataInspection
from
"../appBulletFrame/dataInspection"
//数据校验
import
splitFields
from
"../appBulletFrame/splitFields"
;
//拆分字符串
import
numericalRange
from
"../appBulletFrame/numericalRange"
;
//数值范围
import
stringOperation
from
"../appBulletFrame/stringOperation"
//字符串操作
...
...
@@ -1526,6 +1537,7 @@ export default {
groupingDialog
:
false
,
//分组
stringSubstitutionDialog
:
false
,
//字符串替换
addConstantsDialog
:
false
,
//增加常量
dataInspectionDialog
:
false
,
//数据校验
splitFieldsDialog
:
false
,
//拆分字符串
numericalRangeDialog
:
false
,
//数值范围
stringOperationDialog
:
false
,
//字符串操作
...
...
@@ -1649,6 +1661,7 @@ export default {
importXmlFile
,
//导出资源库到XML文件
grouping
,
//分组
addConstants
,
//增加常量
dataInspection
,
//数据校验
splitFields
,
//拆分字符串
numericalRange
,
//数值范围
stringOperation
,
//字符串操作
...
...
@@ -2347,6 +2360,15 @@ export default {
this
.
fieldFormat
=
res
;
});
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step138"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"Validator"
)
{
this
.
dataInspectionDialog
=
!
this
.
dataInspectionDialog
;
this
.
form
=
this
.
showDataFunc
();
setTimeout
(()
=>
{
this
.
$refs
.
dataInspection
.
clickFun
(
this
.
graph
,
this
.
form
);
},
500
);
}
else
if
(
(
this
.
curFileType
==
"transformation"
&&
cell
.
dis
==
"step67"
)
||
cell
.
value
.
attributes
.
ctype
.
value
==
"NumberRange"
)
{
...
...
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