Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
datax-cloud
Commits
8da81b6a
Commit
8da81b6a
authored
Jun 27, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0项目初始化
parent
d13791ea
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
141 deletions
+39
-141
ApiMaskAdd.vue
datax-ui/src/views/market/apimask/ApiMaskAdd.vue
+2
-2
ApiMaskDetail.vue
datax-ui/src/views/market/apimask/ApiMaskDetail.vue
+1
-1
ApiMaskEdit.vue
datax-ui/src/views/market/apimask/ApiMaskEdit.vue
+2
-2
DataApiAdd.vue
datax-ui/src/views/market/dataapi/DataApiAdd.vue
+8
-8
DataApiDetail.vue
datax-ui/src/views/market/dataapi/DataApiDetail.vue
+13
-118
DataApiEdit.vue
datax-ui/src/views/market/dataapi/DataApiEdit.vue
+7
-7
JobDetail.vue
datax-ui/src/views/scheduler/job/JobDetail.vue
+1
-1
JobEdit.vue
datax-ui/src/views/scheduler/job/JobEdit.vue
+1
-1
JobList.vue
datax-ui/src/views/scheduler/job/JobList.vue
+3
-0
JobLogDetail.vue
datax-ui/src/views/scheduler/log/JobLogDetail.vue
+1
-1
No files found.
datax-ui/src/views/market/apimask/ApiMaskAdd.vue
View file @
8da81b6a
...
...
@@ -181,7 +181,7 @@ export default {
// 是否显示弹出层
open
:
false
,
// 弹出层标题
title
:
"脱敏规则配置"
title
:
'脱敏规则配置'
}
}
},
...
...
@@ -246,7 +246,7 @@ export default {
let
fieldRuleIndex
=
this
.
form
.
rules
.
findIndex
((
item
)
=>
{
return
item
.
fieldName
===
this
.
form2
.
fieldName
})
if
(
fieldRuleIndex
!=
-
1
)
{
if
(
fieldRuleIndex
!=
=
-
1
)
{
// 当返回-1时,则说明数组中没有
this
.
form
.
rules
.
splice
(
fieldRuleIndex
,
1
)
}
...
...
datax-ui/src/views/market/apimask/ApiMaskDetail.vue
View file @
8da81b6a
...
...
@@ -164,7 +164,7 @@ export default {
let
fieldParamIndex
=
this
.
resParamList
.
findIndex
((
param
)
=>
{
return
param
.
fieldName
===
rule
.
fieldName
})
if
(
fieldParamIndex
!=
-
1
)
{
if
(
fieldParamIndex
!=
=
-
1
)
{
let
cipher
=
this
.
cipherTypeOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cipherType
})
...
...
datax-ui/src/views/market/apimask/ApiMaskEdit.vue
View file @
8da81b6a
...
...
@@ -181,7 +181,7 @@ export default {
// 是否显示弹出层
open
:
false
,
// 弹出层标题
title
:
"脱敏规则配置"
title
:
'脱敏规则配置'
}
}
},
...
...
@@ -233,7 +233,7 @@ export default {
let
fieldParamIndex
=
this
.
resParamList
.
findIndex
((
param
)
=>
{
return
param
.
fieldName
===
rule
.
fieldName
})
if
(
fieldParamIndex
!=
-
1
)
{
if
(
fieldParamIndex
!=
=
-
1
)
{
let
cipher
=
this
.
cipherTypeOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cipherType
})
...
...
datax-ui/src/views/market/dataapi/DataApiAdd.vue
View file @
8da81b6a
...
...
@@ -177,18 +177,18 @@
</el-table-column>
<el-table-column
prop=
"paramName"
label=
"参数名称"
align=
"center"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"nullable"
label=
"是否
必传
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"nullable"
label=
"是否
允许为空
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.nullable"
true-label=
"1"
false-label=
"0"
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"remark"
label=
"描述"
align=
"center"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"
whereType"
label=
"操作符
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"
paramType"
label=
"参数类型
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.
whereType"
placeholder=
"请选择操作符
"
>
<el-select
v-model=
"scope.row.
paramType"
placeholder=
"请选择参数类型
"
>
<el-option
v-for=
"dict in
where
TypeOptions"
v-for=
"dict in
param
TypeOptions"
:key=
"dict.id"
:label=
"dict.itemValue"
:value=
"dict.itemText"
...
...
@@ -196,11 +196,11 @@
</el-select>
</
template
>
</el-table-column>
<el-table-column
prop=
"
paramType"
label=
"参数类型
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"
whereType"
label=
"操作符
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.
paramType"
placeholder=
"请选择参数类型
"
>
<el-select
v-model=
"scope.row.
whereType"
placeholder=
"请选择操作符
"
>
<el-option
v-for=
"dict in
param
TypeOptions"
v-for=
"dict in
where
TypeOptions"
:key=
"dict.id"
:label=
"dict.itemValue"
:value=
"dict.itemText"
...
...
@@ -433,7 +433,7 @@ export default {
let
json
=
{}
json
.
paramName
=
item
.
colName
json
.
nullable
=
item
.
nullable
||
'0'
json
.
remark
=
item
.
remark
||
undefined
json
.
remark
=
item
.
colComment
||
undefined
json
.
paramType
=
item
.
paramType
||
undefined
json
.
whereType
=
item
.
whereType
||
undefined
json
.
exampleValue
=
item
.
exampleValue
||
undefined
...
...
datax-ui/src/views/market/dataapi/DataApiDetail.vue
View file @
8da81b6a
...
...
@@ -76,7 +76,7 @@
</el-form>
<el-form
ref=
"form2"
:model=
"form2"
:rules=
"rules2"
label-width=
"80px"
v-if=
"active == 2"
disabled
>
<el-form-item
label=
"配置方式"
prop=
"configType"
>
<el-select
v-model=
"form2.configType"
placeholder=
"请选择配置方式"
@
change=
"configTypeSelectChanged"
>
<el-select
v-model=
"form2.configType"
placeholder=
"请选择配置方式"
>
<el-option
v-for=
"dict in configTypeOptions"
:key=
"dict.id"
...
...
@@ -86,7 +86,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"数据源"
prop=
"sourceId"
>
<el-select
v-model=
"form2.sourceId"
placeholder=
"请选择数据源"
@
change=
"sourceSelectChanged"
>
<el-select
v-model=
"form2.sourceId"
placeholder=
"请选择数据源"
>
<el-option
v-for=
"source in sourceOptions"
:key=
"source.id"
...
...
@@ -97,7 +97,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"数据库表"
prop=
"tableName"
v-if=
"form2.configType === '1'"
>
<el-select
v-model=
"form2.tableName"
placeholder=
"请选择数据库表"
@
change=
"tableNameSelectChanged"
>
<el-select
v-model=
"form2.tableName"
placeholder=
"请选择数据库表"
>
<el-option
v-for=
"item in tableNameOptions"
:key=
"item.tableName"
...
...
@@ -155,14 +155,11 @@
<sql-editor
ref=
"sqleditor"
:value=
"form2.sqlText"
@
changeTextarea=
"changeTextarea($event)
"
:readOnly=
"true
"
style=
"height: 300px;margin: 10px 10px;"
></sql-editor>
</el-col>
</el-row>
<el-form-item
v-if=
"form2.configType === '2'"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"sqlParse"
>
SQL解析
</el-button>
</el-form-item>
</el-form>
<el-form
ref=
"form3"
:model=
"form3"
:rules=
"rules3"
label-width=
"80px"
v-if=
"active == 3"
disabled
>
<el-form-item
label=
"请求参数"
>
...
...
@@ -176,18 +173,18 @@
</el-table-column>
<el-table-column
prop=
"paramName"
label=
"参数名称"
align=
"center"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"nullable"
label=
"是否
必传
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"nullable"
label=
"是否
允许为空
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.nullable"
true-label=
"1"
false-label=
"0"
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"remark"
label=
"描述"
align=
"center"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"
whereType"
label=
"操作符
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"
paramType"
label=
"参数类型
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.
whereType"
placeholder=
"请选择操作符
"
>
<el-select
v-model=
"scope.row.
paramType"
placeholder=
"请选择参数类型
"
>
<el-option
v-for=
"dict in
where
TypeOptions"
v-for=
"dict in
param
TypeOptions"
:key=
"dict.id"
:label=
"dict.itemValue"
:value=
"dict.itemText"
...
...
@@ -195,11 +192,11 @@
</el-select>
</
template
>
</el-table-column>
<el-table-column
prop=
"
paramType"
label=
"参数类型
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"
whereType"
label=
"操作符
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.
paramType"
placeholder=
"请选择参数类型
"
>
<el-select
v-model=
"scope.row.
whereType"
placeholder=
"请选择操作符
"
>
<el-option
v-for=
"dict in
param
TypeOptions"
v-for=
"dict in
where
TypeOptions"
:key=
"dict.id"
:label=
"dict.itemValue"
:value=
"dict.itemText"
...
...
@@ -250,7 +247,7 @@
</template>
<
script
>
import
{
getDataApi
,
sqlParse
}
from
'@/api/market/dataapi'
import
{
getDataApi
}
from
'@/api/market/dataapi'
import
{
listDataSource
,
getDbTables
,
getDbTableColumns
}
from
'@/api/factory/datasource'
import
SqlEditor
from
'@/components/SqlEditor'
...
...
@@ -414,114 +411,12 @@ export default {
},
/** 步骤条下一步 */
handleNextStep
()
{
if
(
this
.
active
===
1
)
{
this
.
$refs
[
'form1'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
active
++
}
})
}
else
if
(
this
.
active
===
2
)
{
this
.
$refs
[
'form2'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form2
.
configType
&&
this
.
form2
.
configType
===
'1'
)
{
this
.
form3
.
reqParams
=
this
.
fieldParamList
.
filter
(
item
=>
item
.
reqable
).
map
(
function
(
item
)
{
let
json
=
{}
json
.
paramName
=
item
.
colName
json
.
nullable
=
item
.
nullable
||
'0'
json
.
remark
=
item
.
remark
||
undefined
json
.
paramType
=
item
.
paramType
||
undefined
json
.
whereType
=
item
.
whereType
||
undefined
json
.
exampleValue
=
item
.
exampleValue
||
undefined
json
.
defaultValue
=
item
.
defaultValue
||
undefined
return
json
})
this
.
form3
.
resParams
=
this
.
fieldParamList
.
filter
(
item
=>
item
.
resable
).
map
(
function
(
item
)
{
let
json
=
{}
json
.
fieldName
=
item
.
colName
json
.
remark
=
item
.
colComment
||
undefined
json
.
dataType
=
item
.
dataType
||
undefined
json
.
exampleValue
=
item
.
exampleValue
||
undefined
return
json
})
}
this
.
active
++
}
})
}
this
.
active
++
},
/** 步骤条上一步 */
handleLastStep
()
{
this
.
active
--
},
changeTextarea
(
val
)
{
this
.
form2
.
sqlText
=
val
},
configTypeSelectChanged
(
val
)
{
if
(
this
.
form2
.
configType
===
'1'
&&
this
.
form2
.
sourceId
&&
this
.
tableNameOptions
.
length
<=
0
)
{
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
fieldParamList
=
[]
}
})
}
},
sourceSelectChanged
(
val
)
{
if
(
this
.
form2
.
configType
&&
this
.
form2
.
configType
===
'1'
)
{
getDbTables
(
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
fieldParamList
=
[]
}
})
}
},
tableNameSelectChanged
(
val
)
{
getDbTableColumns
(
this
.
form2
.
sourceId
,
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
fieldParamList
=
response
.
data
}
})
},
sqlParse
()
{
if
(
!
this
.
form2
.
sourceId
)
{
this
.
$message
.
error
(
'数据源不能为空'
)
return
}
if
(
!
this
.
form2
.
sqlText
)
{
this
.
$message
.
error
(
'解析SQL不能为空'
)
return
}
let
data
=
{}
data
.
sqlText
=
this
.
form2
.
sqlText
sqlParse
(
data
).
then
(
response
=>
{
if
(
response
.
success
)
{
const
{
data
}
=
response
let
reqParams
=
data
.
reqParams
let
resParams
=
data
.
resParams
this
.
form3
.
reqParams
=
reqParams
.
map
(
function
(
item
)
{
let
json
=
{}
json
.
paramName
=
item
.
paramName
json
.
nullable
=
item
.
nullable
||
'0'
json
.
remark
=
item
.
remark
||
undefined
json
.
paramType
=
item
.
paramType
||
undefined
json
.
whereType
=
item
.
whereType
||
undefined
json
.
exampleValue
=
item
.
exampleValue
||
undefined
json
.
defaultValue
=
item
.
defaultValue
||
undefined
return
json
})
this
.
form3
.
resParams
=
resParams
.
map
(
function
(
item
)
{
let
json
=
{}
json
.
fieldName
=
item
.
fieldName
json
.
remark
=
item
.
remark
||
undefined
json
.
dataType
=
item
.
dataType
||
undefined
json
.
exampleValue
=
item
.
exampleValue
||
undefined
return
json
})
this
.
$message
.
success
(
'解析成功,请进行下一步'
)
}
})
},
/** 获取详情 */
getDataApi
:
function
(
id
)
{
getDataApi
(
id
).
then
(
response
=>
{
...
...
datax-ui/src/views/market/dataapi/DataApiEdit.vue
View file @
8da81b6a
...
...
@@ -177,18 +177,18 @@
</el-table-column>
<el-table-column
prop=
"paramName"
label=
"参数名称"
align=
"center"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"nullable"
label=
"是否
必传
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"nullable"
label=
"是否
允许为空
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.nullable"
true-label=
"1"
false-label=
"0"
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"remark"
label=
"描述"
align=
"center"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"
whereType"
label=
"操作符
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"
paramType"
label=
"参数类型
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.
whereType"
placeholder=
"请选择操作符
"
>
<el-select
v-model=
"scope.row.
paramType"
placeholder=
"请选择参数类型
"
>
<el-option
v-for=
"dict in
where
TypeOptions"
v-for=
"dict in
param
TypeOptions"
:key=
"dict.id"
:label=
"dict.itemValue"
:value=
"dict.itemText"
...
...
@@ -196,11 +196,11 @@
</el-select>
</
template
>
</el-table-column>
<el-table-column
prop=
"
paramType"
label=
"参数类型
"
align=
"center"
show-overflow-tooltip
>
<el-table-column
prop=
"
whereType"
label=
"操作符
"
align=
"center"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.
paramType"
placeholder=
"请选择参数类型
"
>
<el-select
v-model=
"scope.row.
whereType"
placeholder=
"请选择操作符
"
>
<el-option
v-for=
"dict in
param
TypeOptions"
v-for=
"dict in
where
TypeOptions"
:key=
"dict.id"
:label=
"dict.itemValue"
:value=
"dict.itemText"
...
...
datax-ui/src/views/scheduler/job/JobDetail.vue
View file @
8da81b6a
...
...
@@ -78,7 +78,7 @@ export default {
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'sys_
common
_status'
).
then
(
response
=>
{
this
.
getDicts
(
'sys_
job
_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
...
...
datax-ui/src/views/scheduler/job/JobEdit.vue
View file @
8da81b6a
...
...
@@ -100,7 +100,7 @@ export default {
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'sys_
common
_status'
).
then
(
response
=>
{
this
.
getDicts
(
'sys_
job
_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
...
...
datax-ui/src/views/scheduler/job/JobList.vue
View file @
8da81b6a
...
...
@@ -316,6 +316,7 @@ export default {
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
true
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 修改按钮操作 */
...
...
@@ -324,6 +325,7 @@ export default {
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
true
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 详情按钮操作 */
...
...
@@ -332,6 +334,7 @@ export default {
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
true
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 暂停任务按钮操作 */
...
...
datax-ui/src/views/scheduler/log/JobLogDetail.vue
View file @
8da81b6a
...
...
@@ -64,7 +64,7 @@ export default {
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'sys_
common
_status'
).
then
(
response
=>
{
this
.
getDicts
(
'sys_
normal
_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
...
...
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