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
07e3e7b3
Commit
07e3e7b3
authored
Jul 02, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0项目初始化
parent
161c5ad1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
871 additions
and
742 deletions
+871
-742
ApiCallServiceImpl.java
...data/market/api/call/service/impl/ApiCallServiceImpl.java
+2
-2
FieldParam.java
...java/cn/datax/service/data/market/api/dto/FieldParam.java
+59
-16
index.vue
datax-ui/src/components/SqlEditor/index.vue
+0
-1
main.js
datax-ui/src/main.js
+2
-0
data-process.js
datax-ui/src/utils/data-process.js
+11
-0
request.js
datax-ui/src/utils/request.js
+2
-0
DataSetList.vue
datax-ui/src/views/factory/dataset/DataSetList.vue
+37
-26
DataSourceDetail.vue
datax-ui/src/views/factory/datasource/DataSourceDetail.vue
+1
-1
DataSourceList.vue
datax-ui/src/views/factory/datasource/DataSourceList.vue
+37
-26
ApiMaskDetail.vue
datax-ui/src/views/market/apimask/ApiMaskDetail.vue
+37
-34
ApiMaskEdit.vue
datax-ui/src/views/market/apimask/ApiMaskEdit.vue
+38
-35
ApiMaskList.vue
datax-ui/src/views/market/apimask/ApiMaskList.vue
+37
-26
DataApiAdd.vue
datax-ui/src/views/market/dataapi/DataApiAdd.vue
+31
-38
DataApiCall.vue
datax-ui/src/views/market/dataapi/DataApiCall.vue
+85
-96
DataApiDetail.vue
datax-ui/src/views/market/dataapi/DataApiDetail.vue
+16
-46
DataApiEdit.vue
datax-ui/src/views/market/dataapi/DataApiEdit.vue
+46
-59
DataApiList.vue
datax-ui/src/views/market/dataapi/DataApiList.vue
+37
-26
LogList.vue
datax-ui/src/views/monitor/loginlog/LogList.vue
+19
-14
LogList.vue
datax-ui/src/views/monitor/operlog/LogList.vue
+19
-14
JobList.vue
datax-ui/src/views/scheduler/job/JobList.vue
+58
-47
JobLogList.vue
datax-ui/src/views/scheduler/log/JobLogList.vue
+30
-18
ConfigList.vue
datax-ui/src/views/system/config/ConfigList.vue
+30
-26
DeptList.vue
datax-ui/src/views/system/dept/DeptList.vue
+45
-33
DictList.vue
datax-ui/src/views/system/dict/DictList.vue
+36
-32
DictItemList.vue
datax-ui/src/views/system/dict/item/DictItemList.vue
+5
-6
MenuList.vue
datax-ui/src/views/system/menu/MenuList.vue
+61
-42
PostList.vue
datax-ui/src/views/system/post/PostList.vue
+30
-26
RoleList.vue
datax-ui/src/views/system/role/RoleList.vue
+30
-26
UserList.vue
datax-ui/src/views/system/user/UserList.vue
+30
-26
No files found.
datax-modules/data-market-service-parent/data-market-service-api-call/src/main/java/cn/datax/service/data/market/api/call/service/impl/ApiCallServiceImpl.java
View file @
07e3e7b3
...
...
@@ -89,8 +89,8 @@ public class ApiCallServiceImpl implements ApiCallService {
}
catch
(
JsonProcessingException
e
)
{
}
// 分页参数
Integer
pageNum
=
(
Integer
)
Optional
.
ofNullable
(
params
.
get
(
"pageNum"
)).
orElse
(
1
);
Integer
pageSize
=
(
Integer
)
Optional
.
ofNullable
(
params
.
get
(
"pageSize"
)).
orElse
(
20
);
Integer
pageNum
=
Optional
.
ofNullable
(
params
).
map
(
map
->
Integer
.
parseInt
(
String
.
valueOf
(
map
.
get
(
"pageNum"
))
)).
orElse
(
1
);
Integer
pageSize
=
Optional
.
ofNullable
(
params
).
map
(
map
->
Integer
.
parseInt
(
String
.
valueOf
(
map
.
get
(
"pageSize"
))
)).
orElse
(
20
);
PageUtil
pageUtil
=
new
PageUtil
(
pageNum
,
pageSize
);
Integer
offset
=
pageUtil
.
getOffset
();
SqlBuilderUtil
.
SqlFilterResult
sqlFilterResult
;
...
...
datax-modules/data-market-service-parent/data-market-service-api/src/main/java/cn/datax/service/data/market/api/dto/FieldParam.java
View file @
07e3e7b3
package
cn
.
datax
.
service
.
data
.
market
.
api
.
dto
;
import
cn.datax.common.validate.ValidationGroups
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
@ApiModel
(
value
=
"字段信息Model"
)
...
...
@@ -15,16 +11,63 @@ public class FieldParam implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"字段名称"
)
@NotBlank
(
message
=
"字段名称不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
private
String
fieldName
;
@ApiModelProperty
(
value
=
"作为请求参数"
)
@NotNull
(
message
=
"作为请求参数不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
private
String
reqable
;
@ApiModelProperty
(
value
=
"作为返回参数"
)
@NotNull
(
message
=
"作为返回参数不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
private
String
resable
;
@ApiModelProperty
(
value
=
"字段类型"
)
@NotBlank
(
message
=
"字段类型不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
private
String
fieldType
;
/**
* 列名
*/
private
String
colName
;
/**
* 数据类型
*/
private
String
dataType
;
/**
* 数据长度
*/
private
Integer
dataLength
;
/**
* 数据精度
*/
private
Integer
dataPrecision
;
/**
* 数据小数位
*/
private
Integer
dataScale
;
/**
* 是否主键
*/
private
Boolean
colKey
;
/**
* 是否允许为空
*/
private
Boolean
nullable
;
/**
* 列的序号
*/
private
Integer
colPosition
;
/**
* 列默认值
*/
private
String
dataDefault
;
/**
* 列注释
*/
private
String
colComment
;
/**
* 作为请求参数
*/
private
Boolean
reqable
;
/**
* 作为返回参数
*/
private
Boolean
resable
;
}
datax-ui/src/components/SqlEditor/index.vue
View file @
07e3e7b3
...
...
@@ -54,7 +54,6 @@ export default {
}
}
},
mounted
()
{
let
mime
=
'text/x-mariadb'
let
theme
=
'blackboard'
// 设置主题,不设置的会使用默认主题
...
...
datax-ui/src/main.js
View file @
07e3e7b3
...
...
@@ -18,10 +18,12 @@ import perms from '@/directive/permission'
import
{
getDicts
}
from
'@/api/system/dict'
import
{
getConfigKey
}
from
'@/api/system/config'
import
{
selectDictLabel
}
from
'@/utils/data-process'
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getConfigKey
=
getConfigKey
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
Vue
.
use
(
ElementUI
)
...
...
datax-ui/src/utils/data-process.js
0 → 100644
View file @
07e3e7b3
// 回显数据字典
export
function
selectDictLabel
(
datas
,
value
)
{
var
actions
=
[]
Object
.
keys
(
datas
).
map
((
key
)
=>
{
if
(
datas
[
key
].
itemText
===
(
''
+
value
))
{
actions
.
push
(
datas
[
key
].
itemValue
)
return
false
}
})
return
actions
.
join
(
''
)
}
datax-ui/src/utils/request.js
View file @
07e3e7b3
...
...
@@ -46,12 +46,14 @@ instance.interceptors.response.use(
},
error
=>
{
loadingInstance
.
close
()
console
.
log
(
error
.
response
)
if
(
error
.
response
.
status
)
{
switch
(
error
.
response
.
status
)
{
// 401: 未登录
// 未登录则跳转登录页面,并携带当前页面的路径
// 在登录成功后返回当前页面,这一步需要在登录页操作。
case
401
:
store
.
dispatch
(
'user/resetToken'
)
router
.
replace
({
path
:
'/login'
,
query
:
{
redirect
:
router
.
currentRoute
.
fullPath
}
...
...
datax-ui/src/views/factory/dataset/DataSetList.vue
View file @
07e3e7b3
...
...
@@ -121,27 +121,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['factory:dataset:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['factory:dataset:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['factory:dataset:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['factory:dataset:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['factory:dataset:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['factory:dataset:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -197,6 +202,8 @@ export default {
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据集表格数据
dataSetList
:
[],
// 总数据条数
...
...
@@ -210,6 +217,11 @@ export default {
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
},
mounted
()
{
...
...
@@ -326,12 +338,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictLabel
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/factory/datasource/DataSourceDetail.vue
View file @
07e3e7b3
...
...
@@ -4,6 +4,7 @@
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-coin"
type=
"primary"
round
@
click=
"handleCheckConnection"
v-if=
"active == 2"
>
连通性检测
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -59,7 +60,6 @@
<el-input
v-model=
"form2.password"
placeholder=
"请输入密码"
/>
</el-form-item>
</el-form>
<el-button
size=
"mini"
type=
"primary"
@
click=
"handleCheckConnection"
v-if=
"active == 2"
>
连通性检测
</el-button>
<el-button
style=
"margin-top: 12px;"
@
click=
"handleNextStep"
v-if=
"active == 1"
>
下一步
</el-button>
<el-button
style=
"margin-top: 12px;"
@
click=
"handleLastStep"
v-if=
"active == 2"
>
上一步
</el-button>
</div>
...
...
datax-ui/src/views/factory/datasource/DataSourceList.vue
View file @
07e3e7b3
...
...
@@ -121,27 +121,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['factory:datasource:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['factory:datasource:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['factory:datasource:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['factory:datasource:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['factory:datasource:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['factory:datasource:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -197,6 +202,8 @@ export default {
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据源表格数据
dataSourceList
:
[],
// 总数据条数
...
...
@@ -210,6 +217,11 @@ export default {
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
},
mounted
()
{
...
...
@@ -326,12 +338,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictLabel
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/market/apimask/ApiMaskDetail.vue
View file @
07e3e7b3
...
...
@@ -66,7 +66,7 @@
<
script
>
import
{
getApiMask
}
from
'@/api/market/apimask'
import
{
listDataApi
}
from
'@/api/market/dataapi'
import
{
listDataApi
,
getDataApi
}
from
'@/api/market/dataapi'
export
default
{
name
:
'ApiMaskDetail'
,
...
...
@@ -138,9 +138,10 @@ export default {
this
.
algorithmCryptoOptions
=
response
.
data
}
})
this
.
getDataApiList
()
},
mounted
()
{
this
.
init
(
)
this
.
getApiMask
(
this
.
data
.
id
)
},
methods
:
{
showCard
()
{
...
...
@@ -154,42 +155,44 @@ export default {
})
},
/** 获取详情 */
getApiMask
:
function
(
id
)
{
getApiMask
(
id
).
then
(
response
=>
{
async
getApiMask
(
)
{
this
.
form
=
await
getApiMask
(
this
.
data
.
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
return
response
.
data
}
})
},
/** 解决异步问题 */
async
init
()
{
await
this
.
getDataApiList
()
await
this
.
getApiMask
(
this
.
data
.
id
)
this
.
resParamList
=
this
.
apiOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
this
.
form
.
apiId
}).
resParams
this
.
form
.
rules
.
forEach
(
rule
=>
{
let
fieldParamIndex
=
this
.
resParamList
.
findIndex
((
param
)
=>
{
return
param
.
fieldName
===
rule
.
fieldName
})
if
(
fieldParamIndex
!==
-
1
)
{
let
cipher
=
this
.
cipherTypeOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cipherType
})
let
crypt
=
{}
if
(
rule
.
cipherType
===
'1'
)
{
crypt
=
this
.
regexCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
}
else
if
(
rule
.
cipherType
===
'2'
)
{
crypt
=
this
.
algorithmCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
})
||
{}
if
(
this
.
form
&&
this
.
form
.
apiId
)
{
let
dataApi
=
await
getDataApi
(
this
.
form
.
apiId
).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
let
resParam
=
Object
.
assign
({},
this
.
resParamList
[
fieldParamIndex
],
{
cipherType
:
(
cipher
&&
cipher
.
itemValue
)
||
undefined
,
cryptType
:
(
crypt
&&
crypt
.
itemValue
)
||
undefined
})
this
.
$set
(
this
.
resParamList
,
fieldParamIndex
,
resParam
)
})
||
{}
if
(
dataApi
&&
dataApi
.
resParams
.
length
>
0
)
{
this
.
resParamList
=
dataApi
.
resParams
this
.
form
.
rules
.
forEach
(
rule
=>
{
let
fieldParamIndex
=
this
.
resParamList
.
findIndex
((
param
)
=>
{
return
param
.
fieldName
===
rule
.
fieldName
})
if
(
fieldParamIndex
!==
-
1
)
{
let
cipher
=
this
.
cipherTypeOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cipherType
})
let
crypt
=
{}
if
(
rule
.
cipherType
===
'1'
)
{
crypt
=
this
.
regexCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
}
else
if
(
rule
.
cipherType
===
'2'
)
{
crypt
=
this
.
algorithmCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
}
let
resParam
=
Object
.
assign
({},
this
.
resParamList
[
fieldParamIndex
],
{
cipherType
:
(
cipher
&&
cipher
.
itemValue
)
||
undefined
,
cryptType
:
(
crypt
&&
crypt
.
itemValue
)
||
undefined
})
this
.
$set
(
this
.
resParamList
,
fieldParamIndex
,
resParam
)
}
})
}
}
)
}
}
}
}
...
...
datax-ui/src/views/market/apimask/ApiMaskEdit.vue
View file @
07e3e7b3
...
...
@@ -103,7 +103,7 @@
<
script
>
import
{
getApiMask
,
updateApiMask
}
from
'@/api/market/apimask'
import
{
listDataApi
}
from
'@/api/market/dataapi'
import
{
listDataApi
,
getDataApi
}
from
'@/api/market/dataapi'
export
default
{
name
:
'ApiMaskEdit'
,
...
...
@@ -207,9 +207,10 @@ export default {
this
.
algorithmCryptoOptions
=
response
.
data
}
})
this
.
getDataApiList
()
},
mounted
()
{
this
.
init
()
this
.
getApiMask
()
},
methods
:
{
showCard
()
{
...
...
@@ -223,42 +224,44 @@ export default {
})
},
/** 获取详情 */
getApiMask
:
function
(
id
)
{
getApiMask
(
id
).
then
(
response
=>
{
async
getApiMask
(
)
{
this
.
form
=
await
getApiMask
(
this
.
data
.
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
return
response
.
data
}
})
},
/** 解决异步问题 */
async
init
()
{
await
this
.
getDataApiList
()
await
this
.
getApiMask
(
this
.
data
.
id
)
this
.
resParamList
=
this
.
apiOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
this
.
form
.
apiId
}).
resParams
this
.
form
.
rules
.
forEach
(
rule
=>
{
let
fieldParamIndex
=
this
.
resParamList
.
findIndex
((
param
)
=>
{
return
param
.
fieldName
===
rule
.
fieldName
})
if
(
fieldParamIndex
!==
-
1
)
{
let
cipher
=
this
.
cipherTypeOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cipherType
})
let
crypt
=
{}
if
(
rule
.
cipherType
===
'1'
)
{
crypt
=
this
.
regexCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
}
else
if
(
rule
.
cipherType
===
'2'
)
{
crypt
=
this
.
algorithmCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
})
||
{}
if
(
this
.
form
&&
this
.
form
.
apiId
)
{
let
dataApi
=
await
getDataApi
(
this
.
form
.
apiId
).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
let
resParam
=
Object
.
assign
({},
this
.
resParamList
[
fieldParamIndex
],
{
cipherType
:
(
cipher
&&
cipher
.
itemValue
)
||
undefined
,
cryptType
:
(
crypt
&&
crypt
.
itemValue
)
||
undefined
})
this
.
$set
(
this
.
resParamList
,
fieldParamIndex
,
resParam
)
})
||
{}
if
(
dataApi
&&
dataApi
.
resParams
.
length
>
0
)
{
this
.
resParamList
=
dataApi
.
resParams
this
.
form
.
rules
.
forEach
(
rule
=>
{
let
fieldParamIndex
=
this
.
resParamList
.
findIndex
((
param
)
=>
{
return
param
.
fieldName
===
rule
.
fieldName
})
if
(
fieldParamIndex
!==
-
1
)
{
let
cipher
=
this
.
cipherTypeOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cipherType
})
let
crypt
=
{}
if
(
rule
.
cipherType
===
'1'
)
{
crypt
=
this
.
regexCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
}
else
if
(
rule
.
cipherType
===
'2'
)
{
crypt
=
this
.
algorithmCryptoOptions
.
find
((
item
)
=>
{
return
item
.
itemText
===
rule
.
cryptType
})
}
let
resParam
=
Object
.
assign
({},
this
.
resParamList
[
fieldParamIndex
],
{
cipherType
:
(
cipher
&&
cipher
.
itemValue
)
||
undefined
,
cryptType
:
(
crypt
&&
crypt
.
itemValue
)
||
undefined
})
this
.
$set
(
this
.
resParamList
,
fieldParamIndex
,
resParam
)
}
})
}
}
)
}
},
fieldRule
(
fieldName
)
{
this
.
cipher
.
open
=
true
...
...
@@ -282,7 +285,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/ApiMaskList.vue
View file @
07e3e7b3
...
...
@@ -121,27 +121,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['market:apimask:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['market:apimask:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['market:apimask:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['market:apimask:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['market:apimask:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['market:apimask:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -197,6 +202,8 @@ export default {
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据集表格数据
apiMaskList
:
[],
// 总数据条数
...
...
@@ -210,6 +217,11 @@ export default {
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
},
mounted
()
{
...
...
@@ -326,12 +338,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictLabel
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/market/dataapi/DataApiAdd.vue
View file @
07e3e7b3
...
...
@@ -108,7 +108,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"字段列表"
v-if=
"form2.configType === '1'"
>
<el-table
:data=
"f
ieldParamList
"
stripe
border
<el-table
:data=
"f
orm2.fieldParams
"
stripe
border
:max-height=
"300"
style=
"width: 100%; margin: 15px 0;"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
...
...
@@ -141,12 +141,12 @@
</el-table-column>
<el-table-column
prop=
"reqable"
label=
"是否作为请求参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.reqable"
></el-checkbox>
<el-checkbox
v-model=
"scope.row.reqable"
@
change=
"checked=>reqCheckChange(scope.row, checked)"
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"resable"
label=
"是否作为返回参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.resable"
></el-checkbox>
<el-checkbox
v-model=
"scope.row.resable"
@
change=
"checked=>resCheckChange(scope.row, checked)"
></el-checkbox>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -356,8 +356,6 @@ export default {
sourceOptions
:
[],
// 数据库表数据字典
tableNameOptions
:
[],
// 数据库表字段列表
fieldParamList
:
[],
// 配置方式数据字典
configTypeOptions
:
[],
// 操作符数据字典
...
...
@@ -426,27 +424,6 @@ export default {
}
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
.
colComment
||
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
++
}
})
...
...
@@ -464,7 +441,7 @@ export default {
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
})
}
...
...
@@ -474,7 +451,7 @@ export default {
getDbTables
(
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
})
}
...
...
@@ -482,7 +459,9 @@ export default {
tableNameSelectChanged
(
val
)
{
getDbTableColumns
(
this
.
form2
.
sourceId
,
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
fieldParamList
=
response
.
data
this
.
form2
.
fieldParams
=
response
.
data
this
.
form3
.
reqParams
=
[]
this
.
form3
.
resParams
=
[]
}
})
},
...
...
@@ -505,26 +484,40 @@ export default {
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
json
.
nullable
=
'0'
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
(
'解析成功,请进行下一步'
)
}
})
},
reqCheckChange
(
row
,
checked
)
{
if
(
checked
)
{
let
json
=
{}
json
.
paramName
=
row
.
colName
json
.
remark
=
row
.
colComment
||
undefined
json
.
nullable
=
'0'
this
.
form3
.
reqParams
.
push
(
json
)
}
else
{
this
.
form3
.
reqParams
.
splice
(
this
.
form3
.
reqParams
.
findIndex
(
item
=>
item
.
paramName
===
row
.
colName
),
1
)
}
},
resCheckChange
(
row
,
checked
)
{
if
(
checked
)
{
let
json
=
{}
json
.
fieldName
=
row
.
colName
json
.
remark
=
row
.
colComment
||
undefined
json
.
dataType
=
row
.
dataType
||
undefined
this
.
form3
.
resParams
.
push
(
json
)
}
else
{
this
.
form3
.
resParams
.
splice
(
this
.
form3
.
resParams
.
findIndex
(
item
=>
item
.
fieldName
===
row
.
colName
),
1
)
}
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form3'
].
validate
(
valid
=>
{
...
...
datax-ui/src/views/market/dataapi/DataApiCall.vue
View file @
07e3e7b3
This diff is collapsed.
Click to expand it.
datax-ui/src/views/market/dataapi/DataApiDetail.vue
View file @
07e3e7b3
...
...
@@ -4,7 +4,7 @@
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-s-data"
round
@
click=
"apiCall"
>
数据
调用
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-s-data"
round
@
click=
"apiCall"
>
接口
调用
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -108,7 +108,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"字段列表"
v-if=
"form2.configType === '1'"
>
<el-table
:data=
"f
ieldParamList
"
stripe
border
<el-table
:data=
"f
orm2.fieldParams
"
stripe
border
:max-height=
"300"
style=
"width: 100%; margin: 15px 0;"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
...
...
@@ -338,8 +338,6 @@ export default {
sourceOptions
:
[],
// 数据库表数据字典
tableNameOptions
:
[],
// 数据库表字段列表
fieldParamList
:
[],
// 配置方式数据字典
configTypeOptions
:
[],
// 操作符数据字典
...
...
@@ -410,50 +408,22 @@ export default {
this
.
active
--
},
/** 获取详情 */
getDataApi
:
function
(
id
)
{
getDataApi
(
id
).
then
(
response
=>
{
async
getDataApi
(
id
)
{
this
.
form1
=
await
getDataApi
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form1
=
response
.
data
this
.
form2
=
this
.
form1
.
executeConfig
this
.
form3
.
reqParams
=
this
.
form1
.
reqParams
this
.
form3
.
resParams
=
this
.
form1
.
resParams
if
(
this
.
form2
.
configType
===
'1'
)
{
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
getDbTableColumns
(
this
.
form2
.
sourceId
,
this
.
form2
.
tableName
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
fieldParamList
=
response
.
data
this
.
form1
.
reqParams
.
forEach
(
param
=>
{
let
paramIndex
=
this
.
fieldParamList
.
findIndex
((
item
)
=>
{
return
item
.
colName
===
param
.
paramName
})
if
(
paramIndex
!==
-
1
)
{
let
reqParam
=
this
.
fieldParamList
[
paramIndex
]
reqParam
.
reqable
=
true
this
.
$set
(
this
.
fieldParamList
,
paramIndex
,
reqParam
)
}
})
this
.
form1
.
resParams
.
forEach
(
field
=>
{
let
fieldIndex
=
this
.
fieldParamList
.
findIndex
((
item
)
=>
{
return
item
.
colName
===
field
.
fieldName
})
if
(
fieldIndex
!==
-
1
)
{
let
resParam
=
this
.
fieldParamList
[
fieldIndex
]
resParam
.
resable
=
true
this
.
$set
(
this
.
fieldParamList
,
fieldIndex
,
resParam
)
}
})
}
})
}
})
}
if
(
this
.
form2
.
configType
===
'2'
)
{
this
.
$refs
.
sqleditor
.
editor
.
setValue
(
this
.
form2
.
sqlText
)
}
return
response
.
data
}
})
})
||
{}
this
.
form2
=
this
.
form1
.
executeConfig
this
.
form3
.
reqParams
=
this
.
form1
.
reqParams
this
.
form3
.
resParams
=
this
.
form1
.
resParams
if
(
this
.
form2
.
configType
===
'1'
)
{
this
.
tableNameOptions
=
await
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
||
[]
}
},
apiCall
()
{
this
.
showOptions
.
data
.
id
=
this
.
data
.
id
...
...
datax-ui/src/views/market/dataapi/DataApiEdit.vue
View file @
07e3e7b3
...
...
@@ -108,7 +108,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"字段列表"
v-if=
"form2.configType === '1'"
>
<el-table
:data=
"f
ieldParamList
"
stripe
border
<el-table
:data=
"f
orm2.fieldParams
"
stripe
border
:max-height=
"300"
style=
"width: 100%; margin: 15px 0;"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
...
...
@@ -141,12 +141,12 @@
</el-table-column>
<el-table-column
prop=
"reqable"
label=
"是否作为请求参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.reqable"
></el-checkbox>
<el-checkbox
v-model=
"scope.row.reqable"
@
change=
"checked=>reqCheckChange(scope.row, checked)"
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"resable"
label=
"是否作为返回参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-model=
"scope.row.resable"
></el-checkbox>
<el-checkbox
v-model=
"scope.row.resable"
@
change=
"checked=>resCheckChange(scope.row, checked)"
></el-checkbox>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -356,8 +356,6 @@ export default {
sourceOptions
:
[],
// 数据库表数据字典
tableNameOptions
:
[],
// 数据库表字段列表
fieldParamList
:
[],
// 配置方式数据字典
configTypeOptions
:
[],
// 操作符数据字典
...
...
@@ -424,6 +422,7 @@ export default {
if
(
this
.
active
===
1
)
{
this
.
$refs
[
'form1'
].
validate
(
valid
=>
{
if
(
valid
)
{
// 计算参数
this
.
active
++
}
})
...
...
@@ -447,7 +446,7 @@ export default {
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
})
}
...
...
@@ -457,7 +456,7 @@ export default {
getDbTables
(
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
})
}
...
...
@@ -465,7 +464,9 @@ export default {
tableNameSelectChanged
(
val
)
{
getDbTableColumns
(
this
.
form2
.
sourceId
,
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
fieldParamList
=
response
.
data
this
.
form2
.
fieldParams
=
response
.
data
this
.
form3
.
reqParams
=
[]
this
.
form3
.
resParams
=
[]
}
})
},
...
...
@@ -488,20 +489,12 @@ export default {
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
json
.
nullable
=
'0'
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
(
'解析成功,请进行下一步'
)
...
...
@@ -509,50 +502,44 @@ export default {
})
},
/** 获取详情 */
getDataApi
:
function
(
id
)
{
getDataApi
(
id
).
then
(
response
=>
{
async
getDataApi
(
id
)
{
this
.
form1
=
await
getDataApi
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form1
=
response
.
data
this
.
form2
=
this
.
form1
.
executeConfig
this
.
form3
.
reqParams
=
this
.
form1
.
reqParams
this
.
form3
.
resParams
=
this
.
form1
.
resParams
if
(
this
.
form2
.
configType
===
'1'
)
{
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
getDbTableColumns
(
this
.
form2
.
sourceId
,
this
.
form2
.
tableName
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
fieldParamList
=
response
.
data
this
.
form1
.
reqParams
.
forEach
(
param
=>
{
let
paramIndex
=
this
.
fieldParamList
.
findIndex
((
item
)
=>
{
return
item
.
colName
===
param
.
paramName
})
if
(
paramIndex
!==
-
1
)
{
let
reqParam
=
this
.
fieldParamList
[
paramIndex
]
reqParam
.
reqable
=
true
this
.
$set
(
this
.
fieldParamList
,
paramIndex
,
reqParam
)
}
})
this
.
form1
.
resParams
.
forEach
(
field
=>
{
let
fieldIndex
=
this
.
fieldParamList
.
findIndex
((
item
)
=>
{
return
item
.
colName
===
field
.
fieldName
})
if
(
fieldIndex
!==
-
1
)
{
let
resParam
=
this
.
fieldParamList
[
fieldIndex
]
resParam
.
resable
=
true
this
.
$set
(
this
.
fieldParamList
,
fieldIndex
,
resParam
)
}
})
}
})
}
})
}
if
(
this
.
form2
.
configType
===
'2'
)
{
this
.
$refs
.
sqleditor
.
editor
.
setValue
(
this
.
form2
.
sqlText
)
}
return
response
.
data
}
})
})
||
{}
this
.
form2
=
this
.
form1
.
executeConfig
this
.
form3
.
reqParams
=
this
.
form1
.
reqParams
this
.
form3
.
resParams
=
this
.
form1
.
resParams
if
(
this
.
form2
.
configType
===
'1'
)
{
this
.
tableNameOptions
=
await
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
||
[]
}
},
reqCheckChange
(
row
,
checked
)
{
if
(
checked
)
{
let
json
=
{}
json
.
paramName
=
row
.
colName
json
.
remark
=
row
.
colComment
||
undefined
json
.
nullable
=
'0'
this
.
form3
.
reqParams
.
push
(
json
)
}
else
{
this
.
form3
.
reqParams
.
splice
(
this
.
form3
.
reqParams
.
findIndex
(
item
=>
item
.
paramName
===
row
.
colName
),
1
)
}
},
resCheckChange
(
row
,
checked
)
{
if
(
checked
)
{
let
json
=
{}
json
.
fieldName
=
row
.
colName
json
.
remark
=
row
.
colComment
||
undefined
json
.
dataType
=
row
.
dataType
||
undefined
this
.
form3
.
resParams
.
push
(
json
)
}
else
{
this
.
form3
.
resParams
.
splice
(
this
.
form3
.
resParams
.
findIndex
(
item
=>
item
.
fieldName
===
row
.
colName
),
1
)
}
},
/** 提交按钮 */
submitForm
:
function
()
{
...
...
datax-ui/src/views/market/dataapi/DataApiList.vue
View file @
07e3e7b3
...
...
@@ -121,27 +121,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['market:dataapi:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['market:dataapi:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['market:dataapi:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['market:dataapi:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['market:dataapi:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['market:dataapi:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -202,6 +207,8 @@ export default {
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据集表格数据
dataApiList
:
[],
// 总数据条数
...
...
@@ -215,6 +222,11 @@ export default {
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
},
mounted
()
{
...
...
@@ -334,12 +346,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictLabel
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/monitor/loginlog/LogList.vue
View file @
07e3e7b3
...
...
@@ -106,20 +106,25 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['monitor:loginlog:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['monitor:loginlog:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['monitor:loginlog:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['monitor:loginlog:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
datax-ui/src/views/monitor/operlog/LogList.vue
View file @
07e3e7b3
...
...
@@ -121,20 +121,25 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['monitor:operlog:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['monitor:operlog:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['monitor:operlog:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['monitor:operlog:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
datax-ui/src/views/scheduler/job/JobList.vue
View file @
07e3e7b3
...
...
@@ -145,48 +145,53 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['scheduler:job:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['scheduler:job:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handlePause(scope.row)"
v-hasPerm=
"['scheduler:job:pause']"
>
暂停任务
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleResume(scope.row)"
v-hasPerm=
"['scheduler:job:resume']"
>
恢复任务
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleRun(scope.row)"
v-hasPerm=
"['scheduler:job:run']"
>
立即执行任务
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['scheduler:job:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['scheduler:job:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['scheduler:job:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handlePause(scope.row)"
v-hasPerm=
"['scheduler:job:pause']"
>
暂停任务
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleResume(scope.row)"
v-hasPerm=
"['scheduler:job:resume']"
>
恢复任务
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleRun(scope.row)"
v-hasPerm=
"['scheduler:job:run']"
>
立即执行任务
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['scheduler:job:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -246,6 +251,8 @@ export default {
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 参数表格数据
jobList
:
[],
// 总数据条数
...
...
@@ -259,6 +266,11 @@ export default {
}
},
created
()
{
this
.
getDicts
(
'sys_job_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
},
mounted
()
{
...
...
@@ -417,12 +429,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictLabel
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/scheduler/log/JobLogList.vue
View file @
07e3e7b3
...
...
@@ -113,20 +113,25 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['scheduler:log:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['scheduler:log:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['scheduler:log:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['scheduler:log:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -181,6 +186,8 @@ export default {
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 日志表格数据
logList
:
[],
// 总数据条数
...
...
@@ -196,6 +203,11 @@ export default {
}
},
created
()
{
this
.
getDicts
(
'sys_normal_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getJobList
()
this
.
getList
()
},
...
...
@@ -300,11 +312,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
if
(
status
===
'0
'
)
{
return
<
el
-
tag
type
=
"
warning"
>
失败
<
/el-tag
>
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1
'
)
{
return
<
el
-
tag
type
=
"
success"
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
成功
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictLabel
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/config/ConfigList.vue
View file @
07e3e7b3
...
...
@@ -128,27 +128,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:config:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:config:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:config:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:config:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:config:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:config:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -345,12 +350,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/dept/DeptList.vue
View file @
07e3e7b3
...
...
@@ -77,34 +77,39 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-plus"
@
click=
"handleAdd(scope.row)"
v-hasPerm=
"['system:dept:add']"
>
新增
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:dept:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:dept:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:dept:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-plus"
@
click=
"handleAdd(scope.row)"
v-hasPerm=
"['system:dept:add']"
>
新增
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:dept:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:dept:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:dept:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -147,10 +152,17 @@ export default {
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 部门表格数据
deptTree
:
[]
deptTree
:
[],
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
},
mounted
()
{
...
...
@@ -236,11 +248,11 @@ export default {
})
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
status
=
row
.
status
if
(
status
===
'0
'
)
{
return
<
el
-
tag
type
=
"
warning"
>
禁用
<
/el-tag
>
let
dictText
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1
'
)
{
return
<
el
-
tag
type
=
"
success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
启用
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/dict/DictList.vue
View file @
07e3e7b3
...
...
@@ -135,33 +135,38 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleItem(scope.row)"
>
字典项
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:dict:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:dict:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:dict:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleItem(scope.row)"
>
字典项
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:dict:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:dict:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:dict:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -388,12 +393,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/dict/item/DictItemList.vue
View file @
07e3e7b3
...
...
@@ -175,7 +175,7 @@ export default {
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
default
:
function
()
{
return
{}
}
}
...
...
@@ -367,12 +367,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/menu/MenuList.vue
View file @
07e3e7b3
...
...
@@ -76,34 +76,39 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-plus"
@
click=
"handleAdd(scope.row)"
v-hasPerm=
"['system:menu:add']"
>
新增
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:menu:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:menu:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:menu:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-plus"
@
click=
"handleAdd(scope.row)"
v-hasPerm=
"['system:menu:add']"
>
新增
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:menu:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:menu:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:menu:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -161,10 +166,24 @@ export default {
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 资源表格数据
menuTree
:
[]
menuTree
:
[],
// 类型数据字典
menuTypeOptions
:
[],
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
this
.
getDicts
(
'sys_menu_type'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
menuTypeOptions
=
response
.
data
}
})
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
},
mounted
()
{
...
...
@@ -250,27 +269,27 @@ export default {
})
},
menuIconFormatter
(
row
,
column
,
cellValue
,
index
)
{
cons
t
menuIcon
=
row
.
menuIcon
le
t
menuIcon
=
row
.
menuIcon
if
(
menuIcon
)
{
return
<
svg
-
icon
class
-
name
=
"size-icon"
icon
-
class
=
{
menuIcon
}
/
>
return
<
svg
-
icon
icon
-
class
=
{
menuIcon
}
/
>
}
},
menuTypeFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
menuType
=
row
.
menuType
if
(
menuTyp
e
===
'0'
)
{
return
<
el
-
tag
type
=
"primary"
>
目录
<
/el-tag
>
}
else
if
(
menuTyp
e
===
'1'
)
{
return
<
el
-
tag
type
=
"warning"
>
菜单
<
/el-tag
>
}
else
if
(
menuTyp
e
===
'2'
)
{
return
<
el
-
tag
type
=
"info"
>
按钮
<
/el-tag
>
let
dictText
=
this
.
selectDictLabel
(
this
.
menuTypeOptions
,
cellValue
)
if
(
cellValu
e
===
'0'
)
{
return
<
el
-
tag
type
=
"primary"
>
{
dictText
}
<
/el-tag
>
}
else
if
(
cellValu
e
===
'1'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
dictText
}
<
/el-tag
>
}
else
if
(
cellValu
e
===
'2'
)
{
return
<
el
-
tag
type
=
"info"
>
{
dictText
}
<
/el-tag
>
}
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
status
=
row
.
status
if
(
status
===
'0
'
)
{
return
<
el
-
tag
type
=
"
warning"
>
禁用
<
/el-tag
>
let
dictText
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1
'
)
{
return
<
el
-
tag
type
=
"
success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
正常
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/post/PostList.vue
View file @
07e3e7b3
...
...
@@ -121,27 +121,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:post:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:post:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:post:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:post:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:post:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:post:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -326,12 +331,11 @@ export default {
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/role/RoleList.vue
View file @
07e3e7b3
...
...
@@ -121,27 +121,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:role:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:role:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:role:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:role:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:role:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:role:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -338,12 +343,11 @@ export default {
return
dataScope_dictText
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
datax-ui/src/views/system/user/UserList.vue
View file @
07e3e7b3
...
...
@@ -155,27 +155,32 @@
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:user:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:user:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:user:remove']"
>
删除
</el-button>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
v-hasPerm=
"['system:user:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
v-hasPerm=
"['system:user:detail']"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:user:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -426,12 +431,11 @@ export default {
return
row
.
posts
.
map
(
item
=>
item
.
postName
).
join
(
','
)
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
status_dictText
=
row
.
status_dictText
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
let
dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
"
success"
>
{
status_
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"
warning"
>
{
dictText
}
<
/el-tag
>
}
}
}
...
...
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