Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
Project
Project
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
luoyangfei
store-system
Commits
55ec5905
Commit
55ec5905
authored
Nov 09, 2018
by
扫地僧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加系统用户新增店铺管理员属性
parent
95bcf7b0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
15 deletions
+31
-15
SysUserController.java
...ain/java/cn/com/fqy/controller/mgt/SysUserController.java
+1
-0
SysUserRoleIds.java
...m/src/main/java/cn/com/fqy/core/model/SysUserRoleIds.java
+12
-0
request.js
2code/web/mgt_pro/src/api/request.js
+0
-1
system.js
2code/web/mgt_pro/src/api/system.js
+1
-1
user.vue
2code/web/mgt_pro/src/views/system/user.vue
+17
-13
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/SysUserController.java
View file @
55ec5905
...
@@ -80,6 +80,7 @@ public class SysUserController extends BaseController {
...
@@ -80,6 +80,7 @@ public class SysUserController extends BaseController {
sysUser
.
setMobilePhone
(
sysUserRoleIds
.
getMobilePhone
());
sysUser
.
setMobilePhone
(
sysUserRoleIds
.
getMobilePhone
());
sysUser
.
setSex
(
sysUserRoleIds
.
getSex
());
sysUser
.
setSex
(
sysUserRoleIds
.
getSex
());
sysUser
.
setDeptId
(
sysUserRoleIds
.
getDeptId
());
sysUser
.
setDeptId
(
sysUserRoleIds
.
getDeptId
());
sysUser
.
setAdministratorsId
(
sysUserRoleIds
.
getAdministratorsId
());
if
(
sysUserRoleIds
.
getSysRole
()!=
null
)
{
if
(
sysUserRoleIds
.
getSysRole
()!=
null
)
{
String
[]
roleIds
=
sysUserRoleIds
.
getSysRole
();
String
[]
roleIds
=
sysUserRoleIds
.
getSysRole
();
List
<
SysRole
>
sysRoles
=
new
ArrayList
<
SysRole
>();
List
<
SysRole
>
sysRoles
=
new
ArrayList
<
SysRole
>();
...
...
2code/server/store-system/src/main/java/cn/com/fqy/core/model/SysUserRoleIds.java
View file @
55ec5905
...
@@ -45,6 +45,8 @@ public class SysUserRoleIds extends Entity<String> {
...
@@ -45,6 +45,8 @@ public class SysUserRoleIds extends Entity<String> {
private
Integer
operatorType
;
private
Integer
operatorType
;
//操作人id(根据操作人类型会对应不同的表记录)
//操作人id(根据操作人类型会对应不同的表记录)
private
String
operatorId
;
private
String
operatorId
;
//店铺管理员编号
private
String
administratorsId
;
private
String
[]
sysRole
;
private
String
[]
sysRole
;
...
@@ -57,6 +59,16 @@ public class SysUserRoleIds extends Entity<String> {
...
@@ -57,6 +59,16 @@ public class SysUserRoleIds extends Entity<String> {
return
userId
;
return
userId
;
}
}
public
String
getAdministratorsId
()
{
return
administratorsId
;
}
public
void
setAdministratorsId
(
String
administratorsId
)
{
this
.
administratorsId
=
administratorsId
;
}
public
void
setUserId
(
String
userId
){
public
void
setUserId
(
String
userId
){
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
...
...
2code/web/mgt_pro/src/api/request.js
View file @
55ec5905
...
@@ -12,7 +12,6 @@ const service = axios.create({
...
@@ -12,7 +12,6 @@ const service = axios.create({
console
.
log
(
'请求地址:'
+
process
.
env
.
BASE_API
);
console
.
log
(
'请求地址:'
+
process
.
env
.
BASE_API
);
// request interceptor
// request interceptor
service
.
interceptors
.
request
.
use
(
config
=>
{
service
.
interceptors
.
request
.
use
(
config
=>
{
debugger
// Do something before request is sent
// Do something before request is sent
const
userInfro
=
getUserInfro
()
const
userInfro
=
getUserInfro
()
let
param
=
config
.
data
;
let
param
=
config
.
data
;
...
...
2code/web/mgt_pro/src/api/system.js
View file @
55ec5905
...
@@ -41,7 +41,7 @@ export function queryAllSysRole() {
...
@@ -41,7 +41,7 @@ export function queryAllSysRole() {
// 选择管理员
// 选择管理员
export
function
queryAllShopAdmin
()
{
export
function
queryAllShopAdmin
()
{
return
request
({
return
request
({
url
:
'/
sysRole/queryAllSysRole
'
,
url
:
'/
administrators/getAdministrators
'
,
method
:
'post'
,
method
:
'post'
,
})
})
}
}
...
...
2code/web/mgt_pro/src/views/system/user.vue
View file @
55ec5905
...
@@ -118,15 +118,15 @@
...
@@ -118,15 +118,15 @@
<el-row
:gutter=
"15"
>
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
店铺管理员
</label></el-col>
<el-col
:span=
"8"
class=
"content-left"
><label>
店铺管理员
</label></el-col>
<el-col
:span=
"16"
class=
"content-right"
>
<el-col
:span=
"16"
class=
"content-right"
>
<el-select
size=
"small"
v-if=
"dialogType===1 || dialogType===2"
placeholder=
"请选择店铺管理员"
v-model=
"dialogBindData.
deptId"
@
change=
"getSectionsByDept
Id"
>
<el-select
size=
"small"
v-if=
"dialogType===1 || dialogType===2"
placeholder=
"请选择店铺管理员"
v-model=
"dialogBindData.
administrators
Id"
>
<el-option
<el-option
v-for=
"item in shopAdminsData"
v-for=
"item in shopAdminsData"
:key=
"item.
dept
Id"
:key=
"item.
administrators
Id"
:label=
"item.
dept
Name"
:label=
"item.
administrators
Name"
:value=
"item.
dept
Id"
>
:value=
"item.
administrators
Id"
>
</el-option>
</el-option>
</el-select>
</el-select>
<span
v-else
>
{{
viewDeptName(dialogBindData.deptId)
}}
</span>
<span
v-else
>
{{
dialogBindData.administratorsName
}}
</span>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -234,8 +234,8 @@ export default {
...
@@ -234,8 +234,8 @@ export default {
sex
:
""
,
sex
:
""
,
mobilePhone
:
""
,
mobilePhone
:
""
,
isAvailable
:
1
,
isAvailable
:
1
,
sysRole
:
""
,
administratorsName
:
""
,
flag
:
""
administratorsId
:
""
},
},
//店铺管理员下拉数据
//店铺管理员下拉数据
...
@@ -340,6 +340,7 @@ export default {
...
@@ -340,6 +340,7 @@ export default {
});
});
},
},
edit
(
data
)
{
edit
(
data
)
{
debugger
this
.
dialogType
=
2
;
this
.
dialogType
=
2
;
this
.
getRoleList
(()
=>
{
this
.
getRoleList
(()
=>
{
this
.
getSectionsByDeptId
(
data
.
deptId
,
()
=>
{
this
.
getSectionsByDeptId
(
data
.
deptId
,
()
=>
{
...
@@ -370,6 +371,8 @@ export default {
...
@@ -370,6 +371,8 @@ export default {
}
}
},
},
submmitFun
()
{
submmitFun
()
{
console
.
log
(
this
.
dialogBindData
)
let
isSubmitActive
;
let
isSubmitActive
;
if
(
this
.
dialogType
===
1
)
{
if
(
this
.
dialogType
===
1
)
{
// alert(`添加${JSON.stringify(this.dialogBindData)}`);
// alert(`添加${JSON.stringify(this.dialogBindData)}`);
...
@@ -379,8 +382,8 @@ export default {
...
@@ -379,8 +382,8 @@ export default {
this
.
dialogBindData
.
realName
&&
this
.
dialogBindData
.
realName
&&
this
.
dialogBindData
.
mobilePhone
&&
this
.
dialogBindData
.
mobilePhone
&&
this
.
dialogBindData
.
sysRole
&&
this
.
dialogBindData
.
sysRole
&&
this
.
dialogBindData
.
deptId
&&
this
.
dialogBindData
.
administratorsId
;
this
.
dialogBindData
.
sectionId
;
// this.dialogBindData.administratorsName
;
}
else
{
}
else
{
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
isSubmitActive
=
isSubmitActive
=
...
@@ -389,9 +392,8 @@ export default {
...
@@ -389,9 +392,8 @@ export default {
this
.
dialogBindData
.
password
&&
this
.
dialogBindData
.
password
&&
this
.
dialogBindData
.
realName
&&
this
.
dialogBindData
.
realName
&&
this
.
dialogBindData
.
mobilePhone
&&
this
.
dialogBindData
.
mobilePhone
&&
this
.
dialogBindData
.
sysRole
&&
this
.
dialogBindData
.
administratorsId
;
this
.
dialogBindData
.
deptId
&&
// this.dialogBindData.administratorsName;
this
.
dialogBindData
.
sectionId
;
}
}
// // 发送添加请求
// // 发送添加请求
if
(
isSubmitActive
)
{
if
(
isSubmitActive
)
{
...
@@ -494,11 +496,13 @@ export default {
...
@@ -494,11 +496,13 @@ export default {
.
all
([
.
all
([
//方法一
//方法一
system
.
queryAllSysRole
().
then
(
res
=>
{
system
.
queryAllSysRole
().
then
(
res
=>
{
debugger
this
.
chooseRole
=
res
.
data
;
this
.
chooseRole
=
res
.
data
;
}),
}),
//方法二
//方法二
system
.
queryAllShopAdmin
().
then
(
res
=>
{
system
.
queryAllShopAdmin
().
then
(
res
=>
{
this
.
shopAdminsData
=
res
.
data
;
debugger
this
.
shopAdminsData
=
res
.
data
.
data
;
})
})
])
])
.
then
(
.
then
(
...
...
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