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
483fe6b2
Commit
483fe6b2
authored
May 28, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0项目初始化
parent
60ce609a
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
396 additions
and
32 deletions
+396
-32
ConfigUtil.java
...ain/java/cn/datax/common/dictionary/utils/ConfigUtil.java
+45
-0
StartedUpRunner.java
.../java/cn/datax/service/system/config/StartedUpRunner.java
+14
-4
ConfigController.java
.../cn/datax/service/system/controller/ConfigController.java
+28
-5
DictController.java
...va/cn/datax/service/system/controller/DictController.java
+1
-1
ConfigDao.java
.../src/main/java/cn/datax/service/system/dao/ConfigDao.java
+10
-0
ConfigService.java
...n/java/cn/datax/service/system/service/ConfigService.java
+2
-0
ConfigServiceImpl.java
.../datax/service/system/service/impl/ConfigServiceImpl.java
+16
-0
ConfigMapper.xml
...system-service/src/main/resources/mapper/ConfigMapper.xml
+6
-0
config.js
datax-ui/src/api/system/config.js
+16
-0
dict.js
datax-ui/src/api/system/dict.js
+8
-0
ConfigAdd.vue
datax-ui/src/views/system/config/ConfigAdd.vue
+13
-1
ConfigEdit.vue
datax-ui/src/views/system/config/ConfigEdit.vue
+13
-1
ConfigList.vue
datax-ui/src/views/system/config/ConfigList.vue
+5
-1
DeptAdd.vue
datax-ui/src/views/system/dept/DeptAdd.vue
+13
-1
DeptEdit.vue
datax-ui/src/views/system/dept/DeptEdit.vue
+13
-1
DeptList.vue
datax-ui/src/views/system/dept/DeptList.vue
+5
-1
DictAdd.vue
datax-ui/src/views/system/dict/DictAdd.vue
+13
-1
DictEdit.vue
datax-ui/src/views/system/dict/DictEdit.vue
+13
-1
DictItemAdd.vue
datax-ui/src/views/system/dict/DictItemAdd.vue
+13
-1
DictItemEdit.vue
datax-ui/src/views/system/dict/DictItemEdit.vue
+13
-1
DictItemList.vue
datax-ui/src/views/system/dict/DictItemList.vue
+8
-0
DictList.vue
datax-ui/src/views/system/dict/DictList.vue
+4
-0
MenuAdd.vue
datax-ui/src/views/system/menu/MenuAdd.vue
+13
-1
MenuEdit.vue
datax-ui/src/views/system/menu/MenuEdit.vue
+13
-1
MenuList.vue
datax-ui/src/views/system/menu/MenuList.vue
+5
-1
PostAdd.vue
datax-ui/src/views/system/post/PostAdd.vue
+13
-1
PostEdit.vue
datax-ui/src/views/system/post/PostEdit.vue
+13
-1
PostList.vue
datax-ui/src/views/system/post/PostList.vue
+5
-1
RoleAdd.vue
datax-ui/src/views/system/role/RoleAdd.vue
+13
-1
RoleEdit.vue
datax-ui/src/views/system/role/RoleEdit.vue
+13
-1
RoleList.vue
datax-ui/src/views/system/role/RoleList.vue
+5
-1
UserAdd.vue
datax-ui/src/views/system/user/UserAdd.vue
+13
-1
UserEdit.vue
datax-ui/src/views/system/user/UserEdit.vue
+13
-1
UserList.vue
datax-ui/src/views/system/user/UserList.vue
+5
-1
No files found.
datax-common/datax-common-dictionary/src/main/java/cn/datax/common/dictionary/utils/ConfigUtil.java
0 → 100644
View file @
483fe6b2
package
cn
.
datax
.
common
.
dictionary
.
utils
;
import
cn.datax.common.redis.service.RedisService
;
import
cn.datax.common.utils.SpringContextHolder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
@Slf4j
public
class
ConfigUtil
{
private
ConfigUtil
()
{}
private
static
volatile
ConfigUtil
instance
;
public
static
ConfigUtil
getInstance
()
{
if
(
instance
==
null
)
{
synchronized
(
ConfigUtil
.
class
)
{
if
(
instance
==
null
)
{
instance
=
new
ConfigUtil
();
}
}
}
return
instance
;
}
private
RedisService
redisService
=
SpringContextHolder
.
getBean
(
RedisService
.
class
);
/**
* 获取参数
* @param code
*/
public
Object
getConfig
(
String
code
)
{
String
key
=
"data:system:configs"
;
Object
object
=
redisService
.
get
(
key
);
if
(
null
==
object
)
{
return
null
;
}
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
object
));
Object
o
=
jsonArray
.
stream
().
filter
(
obj
->
((
JSONObject
)
obj
).
get
(
"configKey"
).
equals
(
code
))
.
findFirst
().
orElse
(
null
);
return
o
;
}
}
datax-modules/system-service-parent/system-service/src/main/java/cn/datax/service/system/config/StartedUpRunner.java
View file @
483fe6b2
...
...
@@ -2,7 +2,9 @@ package cn.datax.service.system.config;
import
cn.datax.common.core.DataConstant
;
import
cn.datax.common.redis.service.RedisService
;
import
cn.datax.service.system.api.entity.ConfigEntity
;
import
cn.datax.service.system.api.entity.DictEntity
;
import
cn.datax.service.system.dao.ConfigDao
;
import
cn.datax.service.system.dao.DictDao
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -27,6 +29,8 @@ public class StartedUpRunner implements ApplicationRunner {
private
RedisService
redisService
;
@Autowired
private
DictDao
dictDao
;
@Autowired
private
ConfigDao
configDao
;
@Override
public
void
run
(
ApplicationArguments
args
)
{
...
...
@@ -39,11 +43,17 @@ public class StartedUpRunner implements ApplicationRunner {
System
.
out
.
println
(
banner
);
// 项目启动时,初始化缓存
String
k
ey
=
"data:system:dicts"
;
Boolean
has
Key
=
redisService
.
hasKey
(
k
ey
);
if
(!
hasKey
)
{
String
dictK
ey
=
"data:system:dicts"
;
Boolean
has
DictKey
=
redisService
.
hasKey
(
dictK
ey
);
if
(!
has
Dict
Key
)
{
List
<
DictEntity
>
dictEntityList
=
dictDao
.
queryDictList
(
DataConstant
.
EnableState
.
ENABLE
.
getKey
());
redisService
.
set
(
key
,
dictEntityList
);
redisService
.
set
(
dictKey
,
dictEntityList
);
}
String
configKey
=
"data:system:configs"
;
Boolean
hasConfigKey
=
redisService
.
hasKey
(
configKey
);
if
(!
hasConfigKey
)
{
List
<
ConfigEntity
>
configEntityList
=
configDao
.
queryConfigList
(
DataConstant
.
EnableState
.
ENABLE
.
getKey
());
redisService
.
set
(
configKey
,
configEntityList
);
}
}
}
...
...
datax-modules/system-service-parent/system-service/src/main/java/cn/datax/service/system/controller/ConfigController.java
View file @
483fe6b2
...
...
@@ -2,6 +2,7 @@ package cn.datax.service.system.controller;
import
cn.datax.common.core.JsonPage
;
import
cn.datax.common.core.R
;
import
cn.datax.common.dictionary.utils.ConfigUtil
;
import
cn.datax.common.validate.ValidationGroups
;
import
cn.datax.service.system.api.dto.ConfigDto
;
import
cn.datax.service.system.api.entity.ConfigEntity
;
...
...
@@ -69,7 +70,7 @@ public class ConfigController extends BaseController {
@ApiImplicitParam
(
name
=
"configQuery"
,
value
=
"查询实体configQuery"
,
required
=
true
,
dataTypeClass
=
ConfigQuery
.
class
)
})
@GetMapping
(
"/page"
)
public
R
get
Sys
ConfigPage
(
ConfigQuery
configQuery
)
{
public
R
getConfigPage
(
ConfigQuery
configQuery
)
{
QueryWrapper
<
ConfigEntity
>
queryWrapper
=
new
QueryWrapper
<>();
IPage
<
ConfigEntity
>
page
=
configService
.
page
(
new
Page
<>(
configQuery
.
getPageNum
(),
configQuery
.
getPageSize
()),
queryWrapper
);
List
<
ConfigVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
configMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
...
...
@@ -85,7 +86,7 @@ public class ConfigController extends BaseController {
@ApiOperation
(
value
=
"添加信息"
,
notes
=
"根据config对象添加信息"
)
@ApiImplicitParam
(
name
=
"config"
,
value
=
"详细实体config"
,
required
=
true
,
dataType
=
"ConfigDto"
)
@PostMapping
()
public
R
save
Sys
Config
(
@RequestBody
@Validated
({
ValidationGroups
.
Insert
.
class
})
ConfigDto
config
)
{
public
R
saveConfig
(
@RequestBody
@Validated
({
ValidationGroups
.
Insert
.
class
})
ConfigDto
config
)
{
ConfigEntity
configEntity
=
configService
.
saveConfig
(
config
);
return
R
.
ok
().
setData
(
configMapper
.
toVO
(
configEntity
));
}
...
...
@@ -101,7 +102,7 @@ public class ConfigController extends BaseController {
@ApiImplicitParam
(
name
=
"config"
,
value
=
"详细实体config"
,
required
=
true
,
dataType
=
"ConfigDto"
)
})
@PutMapping
(
"/{id}"
)
public
R
update
Sys
Config
(
@PathVariable
String
id
,
@RequestBody
@Validated
({
ValidationGroups
.
Update
.
class
})
ConfigDto
config
)
{
public
R
updateConfig
(
@PathVariable
String
id
,
@RequestBody
@Validated
({
ValidationGroups
.
Update
.
class
})
ConfigDto
config
)
{
ConfigEntity
configEntity
=
configService
.
updateConfig
(
config
);
return
R
.
ok
().
setData
(
configMapper
.
toVO
(
configEntity
));
}
...
...
@@ -114,7 +115,7 @@ public class ConfigController extends BaseController {
@ApiOperation
(
value
=
"删除"
,
notes
=
"根据url的id来指定删除对象"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"ID"
,
required
=
true
,
dataType
=
"String"
,
paramType
=
"path"
)
@DeleteMapping
(
"/{id}"
)
public
R
delete
Sys
ConfigById
(
@PathVariable
String
id
)
{
public
R
deleteConfigById
(
@PathVariable
String
id
)
{
configService
.
deleteConfigById
(
id
);
return
R
.
ok
();
}
...
...
@@ -122,8 +123,30 @@ public class ConfigController extends BaseController {
@ApiOperation
(
value
=
"批量删除"
,
notes
=
"根据url的ids来批量删除对象"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"ID集合"
,
required
=
true
,
dataType
=
"List"
,
paramType
=
"path"
)
@DeleteMapping
(
"/batch/{ids}"
)
public
R
delete
Post
Batch
(
@PathVariable
List
<
String
>
ids
)
{
public
R
delete
Config
Batch
(
@PathVariable
List
<
String
>
ids
)
{
configService
.
deleteConfigBatch
(
ids
);
return
R
.
ok
();
}
/**
* 获取参数
*
* @return
*/
@GetMapping
(
"/key/{key}"
)
public
R
getConfig
(
@PathVariable
String
key
)
{
Object
obj
=
ConfigUtil
.
getInstance
().
getConfig
(
key
);
return
R
.
ok
().
setData
(
obj
);
}
/**
* 刷新参数缓存
*
* @return
*/
@GetMapping
(
"/refresh"
)
public
R
refreshConfig
()
{
configService
.
refreshConfig
();
return
R
.
ok
();
}
}
datax-modules/system-service-parent/system-service/src/main/java/cn/datax/service/system/controller/DictController.java
View file @
483fe6b2
...
...
@@ -143,7 +143,7 @@ public class DictController extends BaseController {
}
/**
* 刷新字典
* 刷新字典
缓存
*
* @return
*/
...
...
datax-modules/system-service-parent/system-service/src/main/java/cn/datax/service/system/dao/ConfigDao.java
View file @
483fe6b2
...
...
@@ -3,6 +3,9 @@ package cn.datax.service.system.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.system.api.entity.ConfigEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* <p>
...
...
@@ -15,4 +18,11 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
ConfigDao
extends
BaseDao
<
ConfigEntity
>
{
/**
* 查询有效参数集合
*
* @return
* @param status
*/
List
<
ConfigEntity
>
queryConfigList
(
@Param
(
"status"
)
String
status
);
}
datax-modules/system-service-parent/system-service/src/main/java/cn/datax/service/system/service/ConfigService.java
View file @
483fe6b2
...
...
@@ -25,4 +25,6 @@ public interface ConfigService extends BaseService<ConfigEntity> {
void
deleteConfigById
(
String
id
);
void
deleteConfigBatch
(
List
<
String
>
ids
);
void
refreshConfig
();
}
datax-modules/system-service-parent/system-service/src/main/java/cn/datax/service/system/service/impl/ConfigServiceImpl.java
View file @
483fe6b2
package
cn
.
datax
.
service
.
system
.
service
.
impl
;
import
cn.datax.common.core.DataConstant
;
import
cn.datax.common.redis.service.RedisService
;
import
cn.datax.service.system.api.dto.ConfigDto
;
import
cn.datax.service.system.api.entity.ConfigEntity
;
import
cn.datax.service.system.service.ConfigService
;
...
...
@@ -31,6 +33,9 @@ public class ConfigServiceImpl extends BaseServiceImpl<ConfigDao, ConfigEntity>
@Autowired
private
ConfigMapper
configMapper
;
@Autowired
private
RedisService
redisService
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ConfigEntity
saveConfig
(
ConfigDto
sysConfigDto
)
{
...
...
@@ -64,4 +69,15 @@ public class ConfigServiceImpl extends BaseServiceImpl<ConfigDao, ConfigEntity>
public
void
deleteConfigBatch
(
List
<
String
>
ids
)
{
configDao
.
deleteBatchIds
(
ids
);
}
@Override
public
void
refreshConfig
()
{
String
key
=
"data:system:configs"
;
Boolean
hasKey
=
redisService
.
hasKey
(
key
);
if
(
hasKey
)
{
redisService
.
del
(
key
);
}
List
<
ConfigEntity
>
configEntityList
=
configDao
.
queryConfigList
(
DataConstant
.
EnableState
.
ENABLE
.
getKey
());
redisService
.
set
(
key
,
configEntityList
);
}
}
datax-modules/system-service-parent/system-service/src/main/resources/mapper/ConfigMapper.xml
View file @
483fe6b2
...
...
@@ -27,4 +27,10 @@
remark, config_name, config_key, config_value
</sql>
<select
id=
"queryConfigList"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM sys_config
WHERE status = #{status}
</select>
</mapper>
datax-ui/src/api/system/config.js
View file @
483fe6b2
import
request
from
'@/utils/request'
// 根据参数键名查询参数值
export
function
getConfigKey
(
configKey
)
{
return
request
({
url
:
'/system/configs/key/'
+
configKey
,
method
:
'get'
})
}
// 刷新参数缓存
export
function
refreshConfig
()
{
return
request
({
url
:
'/system/configs/refresh'
,
method
:
'get'
})
}
export
function
pageConfig
(
data
)
{
return
request
({
url
:
'/system/configs/page'
,
...
...
datax-ui/src/api/system/dict.js
View file @
483fe6b2
...
...
@@ -8,6 +8,14 @@ export function getDicts (dictCode) {
})
}
// 刷新字典缓存
export
function
refreshDict
()
{
return
request
({
url
:
'/system/dicts/refresh'
,
method
:
'get'
})
}
export
function
pageDict
(
data
)
{
return
request
({
url
:
'/system/dicts/page'
,
...
...
datax-ui/src/views/system/config/ConfigAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -60,6 +60,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
...
...
@@ -95,6 +101,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addConfig
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -104,6 +113,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/config/ConfigEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -60,6 +60,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -103,6 +109,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateConfig
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -112,6 +121,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/config/ConfigList.vue
View file @
483fe6b2
...
...
@@ -160,7 +160,7 @@
</template>
<
script
>
import
{
pageConfig
}
from
'@/api/system/config'
import
{
pageConfig
,
delConfig
,
delConfigs
}
from
'@/api/system/config'
export
default
{
name
:
'ConfigList'
,
...
...
@@ -298,6 +298,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delConfig
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
datax-ui/src/views/system/dept/DeptAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -64,6 +64,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
,
...
...
@@ -130,6 +136,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addDept
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -139,6 +148,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/dept/DeptEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -64,6 +64,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -136,6 +142,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateDept
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -145,6 +154,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/dept/DeptList.vue
View file @
483fe6b2
...
...
@@ -113,7 +113,7 @@
</template>
<
script
>
import
{
listDept
}
from
'@/api/system/dept'
import
{
listDept
,
delDept
,
delDepts
}
from
'@/api/system/dept'
import
{
construct
}
from
'@/utils/json-tree'
export
default
{
...
...
@@ -227,6 +227,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delDept
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
datax-ui/src/views/system/dict/DictAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -61,6 +61,12 @@ export default {
showItemEdit
:
false
,
showItemDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
...
...
@@ -93,6 +99,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addDict
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -102,6 +111,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/dict/DictEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -61,6 +61,12 @@ export default {
showItemEdit
:
false
,
showItemDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -101,6 +107,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateDict
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -110,6 +119,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/dict/DictItemAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -64,6 +64,12 @@ export default {
showItemEdit
:
false
,
showItemDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
,
...
...
@@ -99,6 +105,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addDictItem
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -108,6 +117,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/dict/DictItemEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -64,6 +64,12 @@ export default {
showItemEdit
:
false
,
showItemDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -104,6 +110,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateDictItem
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -113,6 +122,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/dict/DictItemList.vue
View file @
483fe6b2
...
...
@@ -21,6 +21,7 @@
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回主表
</el-button>
</el-form-item>
</el-form>
...
...
@@ -239,6 +240,9 @@ export default {
this
.
initCols
()
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 查询参数列表 */
getList
()
{
this
.
loading
=
true
...
...
@@ -333,6 +337,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delDictItem
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
datax-ui/src/views/system/dict/DictList.vue
View file @
483fe6b2
...
...
@@ -341,6 +341,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delDict
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
datax-ui/src/views/system/menu/MenuAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -91,6 +91,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
,
...
...
@@ -166,6 +172,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addMenu
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -175,6 +184,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/menu/MenuEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -91,6 +91,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -170,6 +176,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateMenu
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -179,6 +188,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/menu/MenuList.vue
View file @
483fe6b2
...
...
@@ -112,7 +112,7 @@
</template>
<
script
>
import
{
listMenu
}
from
'@/api/system/menu'
import
{
listMenu
,
delMenu
,
delMenus
}
from
'@/api/system/menu'
import
{
construct
}
from
'@/utils/json-tree'
export
default
{
...
...
@@ -241,6 +241,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delMenu
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
datax-ui/src/views/system/post/PostAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -54,6 +54,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
...
...
@@ -83,6 +89,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addPost
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -92,6 +101,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/post/PostEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -54,6 +54,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -91,6 +97,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updatePost
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -100,6 +109,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/post/PostList.vue
View file @
483fe6b2
...
...
@@ -160,7 +160,7 @@
</template>
<
script
>
import
{
pagePost
}
from
'@/api/system/post'
import
{
pagePost
,
delPost
,
delPosts
}
from
'@/api/system/post'
export
default
{
name
:
'PostList'
,
...
...
@@ -296,6 +296,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delPost
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
datax-ui/src/views/system/role/RoleAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -97,6 +97,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
,
...
...
@@ -199,6 +205,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
this
.
form
.
menuList
=
this
.
getMenuAllCheckedKeys
()
this
.
form
.
deptList
=
this
.
getDeptAllCheckedKeys
()
addRole
(
this
.
form
).
then
(
response
=>
{
...
...
@@ -210,6 +219,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/role/RoleEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -97,6 +97,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
...
...
@@ -206,6 +212,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
this
.
form
.
menuList
=
this
.
getMenuAllCheckedKeys
()
this
.
form
.
deptList
=
this
.
getDeptAllCheckedKeys
()
updateRole
(
this
.
form
).
then
(
response
=>
{
...
...
@@ -217,6 +226,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/role/RoleList.vue
View file @
483fe6b2
...
...
@@ -160,7 +160,7 @@
</template>
<
script
>
import
{
pageRole
}
from
'@/api/system/role'
import
{
pageRole
,
delRole
,
delRoles
}
from
'@/api/system/role'
export
default
{
name
:
'RoleList'
,
...
...
@@ -303,6 +303,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delRole
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
datax-ui/src/views/system/user/UserAdd.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -105,6 +105,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
status
:
'1'
,
...
...
@@ -208,6 +214,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addUser
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -217,6 +226,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/user/UserEdit.vue
View file @
483fe6b2
...
...
@@ -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-plus"
round
@
click=
"submitForm"
>
保存
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
@
click=
"submitForm"
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
...
...
@@ -102,6 +102,12 @@ export default {
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
postList
:
[],
...
...
@@ -215,6 +221,9 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateUser
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
...
...
@@ -224,6 +233,9 @@ export default {
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
})
}
...
...
datax-ui/src/views/system/user/UserList.vue
View file @
483fe6b2
...
...
@@ -196,7 +196,7 @@
</template>
<
script
>
import
{
pageUser
}
from
'@/api/system/user'
import
{
pageUser
,
delUser
,
delUsers
}
from
'@/api/system/user'
import
{
listDept
}
from
'@/api/system/dept'
import
{
construct
}
from
'@/utils/json-tree'
...
...
@@ -379,6 +379,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delUser
(
row
.
id
)
}).
then
(()
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}).
catch
(()
=>
{
})
},
...
...
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