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 {
...
@@ -89,8 +89,8 @@ public class ApiCallServiceImpl implements ApiCallService {
}
catch
(
JsonProcessingException
e
)
{
}
catch
(
JsonProcessingException
e
)
{
}
}
// 分页参数
// 分页参数
Integer
pageNum
=
(
Integer
)
Optional
.
ofNullable
(
params
.
get
(
"pageNum"
)).
orElse
(
1
);
Integer
pageNum
=
Optional
.
ofNullable
(
params
).
map
(
map
->
Integer
.
parseInt
(
String
.
valueOf
(
map
.
get
(
"pageNum"
))
)).
orElse
(
1
);
Integer
pageSize
=
(
Integer
)
Optional
.
ofNullable
(
params
.
get
(
"pageSize"
)).
orElse
(
20
);
Integer
pageSize
=
Optional
.
ofNullable
(
params
).
map
(
map
->
Integer
.
parseInt
(
String
.
valueOf
(
map
.
get
(
"pageSize"
))
)).
orElse
(
20
);
PageUtil
pageUtil
=
new
PageUtil
(
pageNum
,
pageSize
);
PageUtil
pageUtil
=
new
PageUtil
(
pageNum
,
pageSize
);
Integer
offset
=
pageUtil
.
getOffset
();
Integer
offset
=
pageUtil
.
getOffset
();
SqlBuilderUtil
.
SqlFilterResult
sqlFilterResult
;
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
;
package
cn
.
datax
.
service
.
data
.
market
.
api
.
dto
;
import
cn.datax.common.validate.ValidationGroups
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
@ApiModel
(
value
=
"字段信息Model"
)
@ApiModel
(
value
=
"字段信息Model"
)
...
@@ -15,16 +11,63 @@ public class FieldParam implements Serializable {
...
@@ -15,16 +11,63 @@ public class FieldParam implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"字段名称"
)
/**
@NotBlank
(
message
=
"字段名称不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
* 列名
private
String
fieldName
;
*/
@ApiModelProperty
(
value
=
"作为请求参数"
)
private
String
colName
;
@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
;
private
String
dataType
;
@ApiModelProperty
(
value
=
"字段类型"
)
@NotBlank
(
message
=
"字段类型不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
/**
private
String
fieldType
;
* 数据长度
*/
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 {
...
@@ -54,7 +54,6 @@ export default {
}
}
}
}
},
},
mounted
()
{
mounted
()
{
let
mime
=
'text/x-mariadb'
let
mime
=
'text/x-mariadb'
let
theme
=
'blackboard'
// 设置主题,不设置的会使用默认主题
let
theme
=
'blackboard'
// 设置主题,不设置的会使用默认主题
...
...
datax-ui/src/main.js
View file @
07e3e7b3
...
@@ -18,10 +18,12 @@ import perms from '@/directive/permission'
...
@@ -18,10 +18,12 @@ import perms from '@/directive/permission'
import
{
getDicts
}
from
'@/api/system/dict'
import
{
getDicts
}
from
'@/api/system/dict'
import
{
getConfigKey
}
from
'@/api/system/config'
import
{
getConfigKey
}
from
'@/api/system/config'
import
{
selectDictLabel
}
from
'@/utils/data-process'
// 全局方法挂载
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getConfigKey
=
getConfigKey
Vue
.
prototype
.
getConfigKey
=
getConfigKey
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
Vue
.
use
(
ElementUI
)
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(
...
@@ -46,12 +46,14 @@ instance.interceptors.response.use(
},
},
error
=>
{
error
=>
{
loadingInstance
.
close
()
loadingInstance
.
close
()
console
.
log
(
error
.
response
)
if
(
error
.
response
.
status
)
{
if
(
error
.
response
.
status
)
{
switch
(
error
.
response
.
status
)
{
switch
(
error
.
response
.
status
)
{
// 401: 未登录
// 401: 未登录
// 未登录则跳转登录页面,并携带当前页面的路径
// 未登录则跳转登录页面,并携带当前页面的路径
// 在登录成功后返回当前页面,这一步需要在登录页操作。
// 在登录成功后返回当前页面,这一步需要在登录页操作。
case
401
:
case
401
:
store
.
dispatch
(
'user/resetToken'
)
router
.
replace
({
router
.
replace
({
path
:
'/login'
,
path
:
'/login'
,
query
:
{
redirect
:
router
.
currentRoute
.
fullPath
}
query
:
{
redirect
:
router
.
currentRoute
.
fullPath
}
...
...
datax-ui/src/views/factory/dataset/DataSetList.vue
View file @
07e3e7b3
...
@@ -121,27 +121,32 @@
...
@@ -121,27 +121,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:dataset:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:dataset:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:dataset:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:dataset:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:dataset:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['factory:dataset:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -197,6 +202,8 @@ export default {
...
@@ -197,6 +202,8 @@ export default {
// 默认选择中表格头
// 默认选择中表格头
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据集表格数据
// 数据集表格数据
dataSetList
:
[],
dataSetList
:
[],
// 总数据条数
// 总数据条数
...
@@ -210,6 +217,11 @@ export default {
...
@@ -210,6 +217,11 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -326,12 +338,11 @@ export default {
...
@@ -326,12 +338,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -4,6 +4,7 @@
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<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
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</el-button-group>
</div>
</div>
...
@@ -59,7 +60,6 @@
...
@@ -59,7 +60,6 @@
<el-input
v-model=
"form2.password"
placeholder=
"请输入密码"
/>
<el-input
v-model=
"form2.password"
placeholder=
"请输入密码"
/>
</el-form-item>
</el-form-item>
</el-form>
</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=
"handleNextStep"
v-if=
"active == 1"
>
下一步
</el-button>
<el-button
style=
"margin-top: 12px;"
@
click=
"handleLastStep"
v-if=
"active == 2"
>
上一步
</el-button>
<el-button
style=
"margin-top: 12px;"
@
click=
"handleLastStep"
v-if=
"active == 2"
>
上一步
</el-button>
</div>
</div>
...
...
datax-ui/src/views/factory/datasource/DataSourceList.vue
View file @
07e3e7b3
...
@@ -121,27 +121,32 @@
...
@@ -121,27 +121,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:datasource:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:datasource:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:datasource:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:datasource:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['factory:datasource:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['factory:datasource:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -197,6 +202,8 @@ export default {
...
@@ -197,6 +202,8 @@ export default {
// 默认选择中表格头
// 默认选择中表格头
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据源表格数据
// 数据源表格数据
dataSourceList
:
[],
dataSourceList
:
[],
// 总数据条数
// 总数据条数
...
@@ -210,6 +217,11 @@ export default {
...
@@ -210,6 +217,11 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -326,12 +338,11 @@ export default {
...
@@ -326,12 +338,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -66,7 +66,7 @@
<
script
>
<
script
>
import
{
getApiMask
}
from
'@/api/market/apimask'
import
{
getApiMask
}
from
'@/api/market/apimask'
import
{
listDataApi
}
from
'@/api/market/dataapi'
import
{
listDataApi
,
getDataApi
}
from
'@/api/market/dataapi'
export
default
{
export
default
{
name
:
'ApiMaskDetail'
,
name
:
'ApiMaskDetail'
,
...
@@ -138,9 +138,10 @@ export default {
...
@@ -138,9 +138,10 @@ export default {
this
.
algorithmCryptoOptions
=
response
.
data
this
.
algorithmCryptoOptions
=
response
.
data
}
}
})
})
this
.
getDataApiList
()
},
},
mounted
()
{
mounted
()
{
this
.
init
(
)
this
.
getApiMask
(
this
.
data
.
id
)
},
},
methods
:
{
methods
:
{
showCard
()
{
showCard
()
{
...
@@ -154,42 +155,44 @@ export default {
...
@@ -154,42 +155,44 @@ export default {
})
})
},
},
/** 获取详情 */
/** 获取详情 */
getApiMask
:
function
(
id
)
{
async
getApiMask
(
)
{
getApiMask
(
id
).
then
(
response
=>
{
this
.
form
=
await
getApiMask
(
this
.
data
.
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
return
response
.
data
}
}
})
})
||
{}
},
if
(
this
.
form
&&
this
.
form
.
apiId
)
{
/** 解决异步问题 */
let
dataApi
=
await
getDataApi
(
this
.
form
.
apiId
).
then
(
response
=>
{
async
init
()
{
if
(
response
.
success
)
{
await
this
.
getDataApiList
()
return
response
.
data
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
})
}
}
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 @@
...
@@ -103,7 +103,7 @@
<
script
>
<
script
>
import
{
getApiMask
,
updateApiMask
}
from
'@/api/market/apimask'
import
{
getApiMask
,
updateApiMask
}
from
'@/api/market/apimask'
import
{
listDataApi
}
from
'@/api/market/dataapi'
import
{
listDataApi
,
getDataApi
}
from
'@/api/market/dataapi'
export
default
{
export
default
{
name
:
'ApiMaskEdit'
,
name
:
'ApiMaskEdit'
,
...
@@ -207,9 +207,10 @@ export default {
...
@@ -207,9 +207,10 @@ export default {
this
.
algorithmCryptoOptions
=
response
.
data
this
.
algorithmCryptoOptions
=
response
.
data
}
}
})
})
this
.
getDataApiList
()
},
},
mounted
()
{
mounted
()
{
this
.
init
()
this
.
getApiMask
()
},
},
methods
:
{
methods
:
{
showCard
()
{
showCard
()
{
...
@@ -223,42 +224,44 @@ export default {
...
@@ -223,42 +224,44 @@ export default {
})
})
},
},
/** 获取详情 */
/** 获取详情 */
getApiMask
:
function
(
id
)
{
async
getApiMask
(
)
{
getApiMask
(
id
).
then
(
response
=>
{
this
.
form
=
await
getApiMask
(
this
.
data
.
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
return
response
.
data
}
}
})
})
||
{}
},
if
(
this
.
form
&&
this
.
form
.
apiId
)
{
/** 解决异步问题 */
let
dataApi
=
await
getDataApi
(
this
.
form
.
apiId
).
then
(
response
=>
{
async
init
()
{
if
(
response
.
success
)
{
await
this
.
getDataApiList
()
return
response
.
data
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
})
}
}
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
)
{
fieldRule
(
fieldName
)
{
this
.
cipher
.
open
=
true
this
.
cipher
.
open
=
true
...
@@ -282,7 +285,7 @@ export default {
...
@@ -282,7 +285,7 @@ export default {
let
fieldRuleIndex
=
this
.
form
.
rules
.
findIndex
((
item
)
=>
{
let
fieldRuleIndex
=
this
.
form
.
rules
.
findIndex
((
item
)
=>
{
return
item
.
fieldName
===
this
.
form2
.
fieldName
return
item
.
fieldName
===
this
.
form2
.
fieldName
})
})
if
(
fieldRuleIndex
!=
-
1
)
{
if
(
fieldRuleIndex
!=
=
-
1
)
{
// 当返回-1时,则说明数组中没有
// 当返回-1时,则说明数组中没有
this
.
form
.
rules
.
splice
(
fieldRuleIndex
,
1
)
this
.
form
.
rules
.
splice
(
fieldRuleIndex
,
1
)
}
}
...
...
datax-ui/src/views/market/apimask/ApiMaskList.vue
View file @
07e3e7b3
...
@@ -121,27 +121,32 @@
...
@@ -121,27 +121,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['market:apimask:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['market:apimask:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['market:apimask:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['market:apimask:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['market:apimask:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['market:apimask:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -197,6 +202,8 @@ export default {
...
@@ -197,6 +202,8 @@ export default {
// 默认选择中表格头
// 默认选择中表格头
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据集表格数据
// 数据集表格数据
apiMaskList
:
[],
apiMaskList
:
[],
// 总数据条数
// 总数据条数
...
@@ -210,6 +217,11 @@ export default {
...
@@ -210,6 +217,11 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -326,12 +338,11 @@ export default {
...
@@ -326,12 +338,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -108,7 +108,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"字段列表"
v-if=
"form2.configType === '1'"
>
<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"
:max-height=
"300"
style=
"width: 100%; margin: 15px 0;"
>
style=
"width: 100%; margin: 15px 0;"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
...
@@ -141,12 +141,12 @@
...
@@ -141,12 +141,12 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"reqable"
label=
"是否作为请求参数"
align=
"center"
width=
"50"
>
<el-table-column
prop=
"reqable"
label=
"是否作为请求参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<
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
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"resable"
label=
"是否作为返回参数"
align=
"center"
width=
"50"
>
<el-table-column
prop=
"resable"
label=
"是否作为返回参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<
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
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -356,8 +356,6 @@ export default {
...
@@ -356,8 +356,6 @@ export default {
sourceOptions
:
[],
sourceOptions
:
[],
// 数据库表数据字典
// 数据库表数据字典
tableNameOptions
:
[],
tableNameOptions
:
[],
// 数据库表字段列表
fieldParamList
:
[],
// 配置方式数据字典
// 配置方式数据字典
configTypeOptions
:
[],
configTypeOptions
:
[],
// 操作符数据字典
// 操作符数据字典
...
@@ -426,27 +424,6 @@ export default {
...
@@ -426,27 +424,6 @@ export default {
}
else
if
(
this
.
active
===
2
)
{
}
else
if
(
this
.
active
===
2
)
{
this
.
$refs
[
'form2'
].
validate
(
valid
=>
{
this
.
$refs
[
'form2'
].
validate
(
valid
=>
{
if
(
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
++
this
.
active
++
}
}
})
})
...
@@ -464,7 +441,7 @@ export default {
...
@@ -464,7 +441,7 @@ export default {
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
}
})
})
}
}
...
@@ -474,7 +451,7 @@ export default {
...
@@ -474,7 +451,7 @@ export default {
getDbTables
(
val
).
then
(
response
=>
{
getDbTables
(
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
}
})
})
}
}
...
@@ -482,7 +459,9 @@ export default {
...
@@ -482,7 +459,9 @@ export default {
tableNameSelectChanged
(
val
)
{
tableNameSelectChanged
(
val
)
{
getDbTableColumns
(
this
.
form2
.
sourceId
,
val
).
then
(
response
=>
{
getDbTableColumns
(
this
.
form2
.
sourceId
,
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
fieldParamList
=
response
.
data
this
.
form2
.
fieldParams
=
response
.
data
this
.
form3
.
reqParams
=
[]
this
.
form3
.
resParams
=
[]
}
}
})
})
},
},
...
@@ -505,26 +484,40 @@ export default {
...
@@ -505,26 +484,40 @@ export default {
this
.
form3
.
reqParams
=
reqParams
.
map
(
function
(
item
)
{
this
.
form3
.
reqParams
=
reqParams
.
map
(
function
(
item
)
{
let
json
=
{}
let
json
=
{}
json
.
paramName
=
item
.
paramName
json
.
paramName
=
item
.
paramName
json
.
nullable
=
item
.
nullable
||
'0'
json
.
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
return
json
})
})
this
.
form3
.
resParams
=
resParams
.
map
(
function
(
item
)
{
this
.
form3
.
resParams
=
resParams
.
map
(
function
(
item
)
{
let
json
=
{}
let
json
=
{}
json
.
fieldName
=
item
.
fieldName
json
.
fieldName
=
item
.
fieldName
json
.
remark
=
item
.
remark
||
undefined
json
.
dataType
=
item
.
dataType
||
undefined
json
.
exampleValue
=
item
.
exampleValue
||
undefined
return
json
return
json
})
})
this
.
$message
.
success
(
'解析成功,请进行下一步'
)
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
()
{
submitForm
:
function
()
{
this
.
$refs
[
'form3'
].
validate
(
valid
=>
{
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 @@
...
@@ -4,7 +4,7 @@
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<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
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</el-button-group>
</div>
</div>
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"字段列表"
v-if=
"form2.configType === '1'"
>
<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"
:max-height=
"300"
style=
"width: 100%; margin: 15px 0;"
>
style=
"width: 100%; margin: 15px 0;"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
...
@@ -338,8 +338,6 @@ export default {
...
@@ -338,8 +338,6 @@ export default {
sourceOptions
:
[],
sourceOptions
:
[],
// 数据库表数据字典
// 数据库表数据字典
tableNameOptions
:
[],
tableNameOptions
:
[],
// 数据库表字段列表
fieldParamList
:
[],
// 配置方式数据字典
// 配置方式数据字典
configTypeOptions
:
[],
configTypeOptions
:
[],
// 操作符数据字典
// 操作符数据字典
...
@@ -410,50 +408,22 @@ export default {
...
@@ -410,50 +408,22 @@ export default {
this
.
active
--
this
.
active
--
},
},
/** 获取详情 */
/** 获取详情 */
getDataApi
:
function
(
id
)
{
async
getDataApi
(
id
)
{
getDataApi
(
id
).
then
(
response
=>
{
this
.
form1
=
await
getDataApi
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
form1
=
response
.
data
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'
)
{
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
)
}
}
}
})
})
||
{}
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
()
{
apiCall
()
{
this
.
showOptions
.
data
.
id
=
this
.
data
.
id
this
.
showOptions
.
data
.
id
=
this
.
data
.
id
...
...
datax-ui/src/views/market/dataapi/DataApiEdit.vue
View file @
07e3e7b3
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"字段列表"
v-if=
"form2.configType === '1'"
>
<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"
:max-height=
"300"
style=
"width: 100%; margin: 15px 0;"
>
style=
"width: 100%; margin: 15px 0;"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
<el-table-column
prop=
"colPosition"
label=
"序号"
width=
"55"
align=
"center"
>
...
@@ -141,12 +141,12 @@
...
@@ -141,12 +141,12 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"reqable"
label=
"是否作为请求参数"
align=
"center"
width=
"50"
>
<el-table-column
prop=
"reqable"
label=
"是否作为请求参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<
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
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"resable"
label=
"是否作为返回参数"
align=
"center"
width=
"50"
>
<el-table-column
prop=
"resable"
label=
"是否作为返回参数"
align=
"center"
width=
"50"
>
<
template
slot-scope=
"scope"
>
<
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
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -356,8 +356,6 @@ export default {
...
@@ -356,8 +356,6 @@ export default {
sourceOptions
:
[],
sourceOptions
:
[],
// 数据库表数据字典
// 数据库表数据字典
tableNameOptions
:
[],
tableNameOptions
:
[],
// 数据库表字段列表
fieldParamList
:
[],
// 配置方式数据字典
// 配置方式数据字典
configTypeOptions
:
[],
configTypeOptions
:
[],
// 操作符数据字典
// 操作符数据字典
...
@@ -424,6 +422,7 @@ export default {
...
@@ -424,6 +422,7 @@ export default {
if
(
this
.
active
===
1
)
{
if
(
this
.
active
===
1
)
{
this
.
$refs
[
'form1'
].
validate
(
valid
=>
{
this
.
$refs
[
'form1'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
// 计算参数
this
.
active
++
this
.
active
++
}
}
})
})
...
@@ -447,7 +446,7 @@ export default {
...
@@ -447,7 +446,7 @@ export default {
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
getDbTables
(
this
.
form2
.
sourceId
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
}
})
})
}
}
...
@@ -457,7 +456,7 @@ export default {
...
@@ -457,7 +456,7 @@ export default {
getDbTables
(
val
).
then
(
response
=>
{
getDbTables
(
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
tableNameOptions
=
response
.
data
this
.
tableNameOptions
=
response
.
data
this
.
f
ieldParamList
=
[]
this
.
f
orm2
.
fieldParams
=
[]
}
}
})
})
}
}
...
@@ -465,7 +464,9 @@ export default {
...
@@ -465,7 +464,9 @@ export default {
tableNameSelectChanged
(
val
)
{
tableNameSelectChanged
(
val
)
{
getDbTableColumns
(
this
.
form2
.
sourceId
,
val
).
then
(
response
=>
{
getDbTableColumns
(
this
.
form2
.
sourceId
,
val
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
fieldParamList
=
response
.
data
this
.
form2
.
fieldParams
=
response
.
data
this
.
form3
.
reqParams
=
[]
this
.
form3
.
resParams
=
[]
}
}
})
})
},
},
...
@@ -488,20 +489,12 @@ export default {
...
@@ -488,20 +489,12 @@ export default {
this
.
form3
.
reqParams
=
reqParams
.
map
(
function
(
item
)
{
this
.
form3
.
reqParams
=
reqParams
.
map
(
function
(
item
)
{
let
json
=
{}
let
json
=
{}
json
.
paramName
=
item
.
paramName
json
.
paramName
=
item
.
paramName
json
.
nullable
=
item
.
nullable
||
'0'
json
.
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
return
json
})
})
this
.
form3
.
resParams
=
resParams
.
map
(
function
(
item
)
{
this
.
form3
.
resParams
=
resParams
.
map
(
function
(
item
)
{
let
json
=
{}
let
json
=
{}
json
.
fieldName
=
item
.
fieldName
json
.
fieldName
=
item
.
fieldName
json
.
remark
=
item
.
remark
||
undefined
json
.
dataType
=
item
.
dataType
||
undefined
json
.
exampleValue
=
item
.
exampleValue
||
undefined
return
json
return
json
})
})
this
.
$message
.
success
(
'解析成功,请进行下一步'
)
this
.
$message
.
success
(
'解析成功,请进行下一步'
)
...
@@ -509,50 +502,44 @@ export default {
...
@@ -509,50 +502,44 @@ export default {
})
})
},
},
/** 获取详情 */
/** 获取详情 */
getDataApi
:
function
(
id
)
{
async
getDataApi
(
id
)
{
getDataApi
(
id
).
then
(
response
=>
{
this
.
form1
=
await
getDataApi
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
form1
=
response
.
data
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'
)
{
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
)
}
}
}
})
})
||
{}
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
()
{
submitForm
:
function
()
{
...
...
datax-ui/src/views/market/dataapi/DataApiList.vue
View file @
07e3e7b3
...
@@ -121,27 +121,32 @@
...
@@ -121,27 +121,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['market:dataapi:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['market:dataapi:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['market:dataapi:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['market:dataapi:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['market:dataapi:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['market:dataapi:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -202,6 +207,8 @@ export default {
...
@@ -202,6 +207,8 @@ export default {
// 默认选择中表格头
// 默认选择中表格头
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 数据集表格数据
// 数据集表格数据
dataApiList
:
[],
dataApiList
:
[],
// 总数据条数
// 总数据条数
...
@@ -215,6 +222,11 @@ export default {
...
@@ -215,6 +222,11 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -334,12 +346,11 @@ export default {
...
@@ -334,12 +346,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -106,20 +106,25 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['monitor:loginlog:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['monitor:loginlog:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['monitor:loginlog:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['monitor:loginlog:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
datax-ui/src/views/monitor/operlog/LogList.vue
View file @
07e3e7b3
...
@@ -121,20 +121,25 @@
...
@@ -121,20 +121,25 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['monitor:operlog:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['monitor:operlog:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['monitor:operlog:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['monitor:operlog:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
datax-ui/src/views/scheduler/job/JobList.vue
View file @
07e3e7b3
...
@@ -145,48 +145,53 @@
...
@@ -145,48 +145,53 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handlePause(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:pause']"
type=
"text"
>
暂停任务
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handlePause(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:pause']"
type=
"text"
>
暂停任务
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleResume(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:resume']"
type=
"text"
>
恢复任务
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleResume(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:resume']"
type=
"text"
>
恢复任务
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleRun(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:run']"
type=
"text"
>
立即执行任务
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleRun(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:run']"
type=
"text"
>
立即执行任务
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:job:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['scheduler:job:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -246,6 +251,8 @@ export default {
...
@@ -246,6 +251,8 @@ export default {
// 默认选择中表格头
// 默认选择中表格头
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 参数表格数据
// 参数表格数据
jobList
:
[],
jobList
:
[],
// 总数据条数
// 总数据条数
...
@@ -259,6 +266,11 @@ export default {
...
@@ -259,6 +266,11 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
getDicts
(
'sys_job_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -417,12 +429,11 @@ export default {
...
@@ -417,12 +429,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictLabel
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -113,20 +113,25 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:log:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:log:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['scheduler:log:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['scheduler:log:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -181,6 +186,8 @@ export default {
...
@@ -181,6 +186,8 @@ export default {
// 默认选择中表格头
// 默认选择中表格头
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 日志表格数据
// 日志表格数据
logList
:
[],
logList
:
[],
// 总数据条数
// 总数据条数
...
@@ -196,6 +203,11 @@ export default {
...
@@ -196,6 +203,11 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
getDicts
(
'sys_normal_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getJobList
()
this
.
getJobList
()
this
.
getList
()
this
.
getList
()
},
},
...
@@ -300,11 +312,11 @@ export default {
...
@@ -300,11 +312,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
status
===
'0
'
)
{
if
(
cellValue
===
'1
'
)
{
return
<
el
-
tag
type
=
"
warning"
>
失败
<
/el-tag
>
return
<
el
-
tag
type
=
"
success"
>
{
dictLabel
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -128,27 +128,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:config:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:config:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:config:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:config:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['system:config:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:config:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -345,12 +350,11 @@ export default {
...
@@ -345,12 +350,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictText
=
row
.
status_dictText
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -77,34 +77,39 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-plus"
<el-button
@
click=
"handleAdd(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dept:add']"
type=
"text"
>
新增
</el-button>
icon=
"el-icon-plus"
<el-button
@
click=
"handleAdd(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dept:add']"
type=
"text"
>
新增
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dept:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dept:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dept:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dept:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dept:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:dept:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -147,10 +152,17 @@ export default {
...
@@ -147,10 +152,17 @@ export default {
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 部门表格数据
// 部门表格数据
deptTree
:
[]
deptTree
:
[],
// 状态数据字典
statusOptions
:
[]
}
}
},
},
created
()
{
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getList
()
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -236,11 +248,11 @@ export default {
...
@@ -236,11 +248,11 @@ export default {
})
})
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
status
=
row
.
status
let
dictText
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
status
===
'0
'
)
{
if
(
cellValue
===
'1
'
)
{
return
<
el
-
tag
type
=
"
warning"
>
禁用
<
/el-tag
>
return
<
el
-
tag
type
=
"
success"
>
{
dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -135,33 +135,38 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleItem(scope.row)"
size=
"mini"
>
字典项
</el-button>
type=
"text"
<el-button
icon=
"el-icon-edit-outline"
size=
"mini"
@
click=
"handleItem(scope.row)"
type=
"text"
>
字典项
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dict:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dict:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dict:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dict:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['system:dict:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:dict:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -388,12 +393,11 @@ export default {
...
@@ -388,12 +393,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictText
=
row
.
status_dictText
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 {
...
@@ -175,7 +175,7 @@ export default {
props
:
{
props
:
{
data
:
{
data
:
{
type
:
Object
,
type
:
Object
,
default
:
function
()
{
default
:
function
()
{
return
{}
return
{}
}
}
}
}
...
@@ -367,12 +367,11 @@ export default {
...
@@ -367,12 +367,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictText
=
row
.
status_dictText
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -76,34 +76,39 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-plus"
<el-button
@
click=
"handleAdd(scope.row)"
size=
"mini"
v-hasPerm=
"['system:menu:add']"
type=
"text"
>
新增
</el-button>
icon=
"el-icon-plus"
<el-button
@
click=
"handleAdd(scope.row)"
size=
"mini"
v-hasPerm=
"['system:menu:add']"
type=
"text"
>
新增
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:menu:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:menu:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:menu:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:menu:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['system:menu:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:menu:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -161,10 +166,24 @@ export default {
...
@@ -161,10 +166,24 @@ export default {
checkedTableColumns
:
[],
checkedTableColumns
:
[],
tableSize
:
'medium'
,
tableSize
:
'medium'
,
// 资源表格数据
// 资源表格数据
menuTree
:
[]
menuTree
:
[],
// 类型数据字典
menuTypeOptions
:
[],
// 状态数据字典
statusOptions
:
[]
}
}
},
},
created
()
{
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
()
this
.
getList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -250,27 +269,27 @@ export default {
...
@@ -250,27 +269,27 @@ export default {
})
})
},
},
menuIconFormatter
(
row
,
column
,
cellValue
,
index
)
{
menuIconFormatter
(
row
,
column
,
cellValue
,
index
)
{
cons
t
menuIcon
=
row
.
menuIcon
le
t
menuIcon
=
row
.
menuIcon
if
(
menuIcon
)
{
if
(
menuIcon
)
{
return
<
svg
-
icon
class
-
name
=
"size-icon"
icon
-
class
=
{
menuIcon
}
/
>
return
<
svg
-
icon
icon
-
class
=
{
menuIcon
}
/
>
}
}
},
},
menuTypeFormatter
(
row
,
column
,
cellValue
,
index
)
{
menuTypeFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
menuType
=
row
.
menuType
let
dictText
=
this
.
selectDictLabel
(
this
.
menuTypeOptions
,
cellValue
)
if
(
menuTyp
e
===
'0'
)
{
if
(
cellValu
e
===
'0'
)
{
return
<
el
-
tag
type
=
"primary"
>
目录
<
/el-tag
>
return
<
el
-
tag
type
=
"primary"
>
{
dictText
}
<
/el-tag
>
}
else
if
(
menuTyp
e
===
'1'
)
{
}
else
if
(
cellValu
e
===
'1'
)
{
return
<
el
-
tag
type
=
"warning"
>
菜单
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
dictText
}
<
/el-tag
>
}
else
if
(
menuTyp
e
===
'2'
)
{
}
else
if
(
cellValu
e
===
'2'
)
{
return
<
el
-
tag
type
=
"info"
>
按钮
<
/el-tag
>
return
<
el
-
tag
type
=
"info"
>
{
dictText
}
<
/el-tag
>
}
}
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
status
=
row
.
status
let
dictText
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
status
===
'0
'
)
{
if
(
cellValue
===
'1
'
)
{
return
<
el
-
tag
type
=
"
warning"
>
禁用
<
/el-tag
>
return
<
el
-
tag
type
=
"
success"
>
{
dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -121,27 +121,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:post:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:post:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:post:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:post:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['system:post:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:post:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -326,12 +331,11 @@ export default {
...
@@ -326,12 +331,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictText
=
row
.
status_dictText
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -121,27 +121,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:role:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:role:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:role:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:role:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['system:role:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:role:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -338,12 +343,11 @@ export default {
...
@@ -338,12 +343,11 @@ export default {
return
dataScope_dictText
return
dataScope_dictText
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictText
=
row
.
status_dictText
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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 @@
...
@@ -155,27 +155,32 @@
</
template
>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-popover
size=
"mini"
placement=
"left"
type=
"text"
trigger=
"click"
>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:user:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-edit-outline"
<el-button
@
click=
"handleEdit(scope.row)"
size=
"mini"
v-hasPerm=
"['system:user:edit']"
type=
"text"
>
修改
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:user:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-view"
<el-button
@
click=
"handleDetail(scope.row)"
size=
"mini"
v-hasPerm=
"['system:user:detail']"
type=
"text"
>
详情
</el-button>
icon=
"el-icon-delete"
<el-button
@
click=
"handleDelete(scope.row)"
size=
"mini"
v-hasPerm=
"['system:user:remove']"
type=
"text"
>
删除
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPerm=
"['system:user:remove']"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -426,12 +431,11 @@ export default {
...
@@ -426,12 +431,11 @@ export default {
return
row
.
posts
.
map
(
item
=>
item
.
postName
).
join
(
','
)
return
row
.
posts
.
map
(
item
=>
item
.
postName
).
join
(
','
)
},
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
let
status
=
row
.
status
let
dictText
=
row
.
status_dictText
let
status_dictText
=
row
.
status_dictText
if
(
cellValue
===
'1'
)
{
if
(
status
===
'0'
)
{
return
<
el
-
tag
type
=
"success"
>
{
dictText
}
<
/el-tag
>
return
<
el
-
tag
type
=
"warning"
>
{
status_dictText
}
<
/el-tag
>
}
else
{
}
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