Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_江南一点雨
vhr
提交
41dcea34
V
vhr
项目概览
_江南一点雨
/
vhr
9 个月 前同步成功
通知
393
Star
80
Fork
9
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vhr
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
41dcea34
编写于
8月 27, 2019
作者:
L
lenve
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复hr角色请求路径
上级
5414bcb7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
4 deletion
+12
-4
hrserver/src/main/java/org/sang/controller/system/SystemHrController.java
...n/java/org/sang/controller/system/SystemHrController.java
+8
-0
vuehr/src/components/system/SysHr.vue
vuehr/src/components/system/SysHr.vue
+4
-4
未找到文件。
hrserver/src/main/java/org/sang/controller/system/SystemHrController.java
浏览文件 @
41dcea34
...
@@ -2,7 +2,9 @@ package org.sang.controller.system;
...
@@ -2,7 +2,9 @@ package org.sang.controller.system;
import
org.sang.bean.Hr
;
import
org.sang.bean.Hr
;
import
org.sang.bean.RespBean
;
import
org.sang.bean.RespBean
;
import
org.sang.bean.Role
;
import
org.sang.service.HrService
;
import
org.sang.service.HrService
;
import
org.sang.service.RoleService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -19,6 +21,8 @@ import java.util.List;
...
@@ -19,6 +21,8 @@ import java.util.List;
public
class
SystemHrController
{
public
class
SystemHrController
{
@Autowired
@Autowired
HrService
hrService
;
HrService
hrService
;
@Autowired
RoleService
roleService
;
@RequestMapping
(
"/id/{hrId}"
)
@RequestMapping
(
"/id/{hrId}"
)
public
Hr
getHrById
(
@PathVariable
Long
hrId
)
{
public
Hr
getHrById
(
@PathVariable
Long
hrId
)
{
...
@@ -55,6 +59,10 @@ public class SystemHrController {
...
@@ -55,6 +59,10 @@ public class SystemHrController {
return
hrs
;
return
hrs
;
}
}
@RequestMapping
(
value
=
"/roles"
,
method
=
RequestMethod
.
GET
)
public
List
<
Role
>
allRoles
()
{
return
roleService
.
roles
();
}
@RequestMapping
(
value
=
"/hr/reg"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/hr/reg"
,
method
=
RequestMethod
.
POST
)
public
RespBean
hrReg
(
String
username
,
String
password
)
{
public
RespBean
hrReg
(
String
username
,
String
password
)
{
...
...
vuehr/src/components/system/SysHr.vue
浏览文件 @
41dcea34
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
_this
.
eploading
.
splice
(
index
,
1
,
false
);
_this
.
eploading
.
splice
(
index
,
1
,
false
);
if
(
resp
&&
resp
.
status
==
200
)
{
if
(
resp
&&
resp
.
status
==
200
)
{
var
data
=
resp
.
data
;
var
data
=
resp
.
data
;
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
_this
.
refreshHr
(
hrId
,
index
);
_this
.
refreshHr
(
hrId
,
index
);
}
}
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
},
},
loadAllRoles
(){
loadAllRoles
(){
var
_this
=
this
;
var
_this
=
this
;
this
.
getRequest
(
"
/system/
basic
/roles
"
).
then
(
resp
=>
{
this
.
getRequest
(
"
/system/
hr
/roles
"
).
then
(
resp
=>
{
_this
.
fullloading
=
false
;
_this
.
fullloading
=
false
;
if
(
resp
&&
resp
.
status
==
200
)
{
if
(
resp
&&
resp
.
status
==
200
)
{
_this
.
allRoles
=
resp
.
data
;
_this
.
allRoles
=
resp
.
data
;
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
_this
.
cardLoading
.
splice
(
index
,
1
,
false
)
_this
.
cardLoading
.
splice
(
index
,
1
,
false
)
if
(
resp
&&
resp
.
status
==
200
)
{
if
(
resp
&&
resp
.
status
==
200
)
{
var
data
=
resp
.
data
;
var
data
=
resp
.
data
;
if
(
data
.
status
==
'
error
'
)
{
if
(
data
.
status
==
'
error
'
)
{
_this
.
refreshHr
(
hrId
,
index
);
_this
.
refreshHr
(
hrId
,
index
);
}
}
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
_this
.
fullloading
=
false
;
_this
.
fullloading
=
false
;
if
(
resp
&&
resp
.
status
==
200
)
{
if
(
resp
&&
resp
.
status
==
200
)
{
var
data
=
resp
.
data
;
var
data
=
resp
.
data
;
if
(
data
.
status
==
'
success
'
)
{
if
(
data
.
status
==
'
success
'
)
{
_this
.
initCards
();
_this
.
initCards
();
_this
.
loadAllRoles
();
_this
.
loadAllRoles
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录