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 {
sysUser
.
setMobilePhone
(
sysUserRoleIds
.
getMobilePhone
());
sysUser
.
setSex
(
sysUserRoleIds
.
getSex
());
sysUser
.
setDeptId
(
sysUserRoleIds
.
getDeptId
());
sysUser
.
setAdministratorsId
(
sysUserRoleIds
.
getAdministratorsId
());
if
(
sysUserRoleIds
.
getSysRole
()!=
null
)
{
String
[]
roleIds
=
sysUserRoleIds
.
getSysRole
();
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> {
private
Integer
operatorType
;
//操作人id(根据操作人类型会对应不同的表记录)
private
String
operatorId
;
//店铺管理员编号
private
String
administratorsId
;
private
String
[]
sysRole
;
...
...
@@ -57,6 +59,16 @@ public class SysUserRoleIds extends Entity<String> {
return
userId
;
}
public
String
getAdministratorsId
()
{
return
administratorsId
;
}
public
void
setAdministratorsId
(
String
administratorsId
)
{
this
.
administratorsId
=
administratorsId
;
}
public
void
setUserId
(
String
userId
){
this
.
userId
=
userId
;
}
...
...
2code/web/mgt_pro/src/api/request.js
View file @
55ec5905
...
...
@@ -12,7 +12,6 @@ const service = axios.create({
console
.
log
(
'请求地址:'
+
process
.
env
.
BASE_API
);
// request interceptor
service
.
interceptors
.
request
.
use
(
config
=>
{
debugger
// Do something before request is sent
const
userInfro
=
getUserInfro
()
let
param
=
config
.
data
;
...
...
2code/web/mgt_pro/src/api/system.js
View file @
55ec5905
...
...
@@ -41,7 +41,7 @@ export function queryAllSysRole() {
// 选择管理员
export
function
queryAllShopAdmin
()
{
return
request
({
url
:
'/
sysRole/queryAllSysRole
'
,
url
:
'/
administrators/getAdministrators
'
,
method
:
'post'
,
})
}
...
...
2code/web/mgt_pro/src/views/system/user.vue
View file @
55ec5905
...
...
@@ -118,15 +118,15 @@
<el-row
:gutter=
"15"
>
<el-col
:span=
"8"
class=
"content-left"
><label>
店铺管理员
</label></el-col>
<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
v-for=
"item in shopAdminsData"
:key=
"item.
dept
Id"
:label=
"item.
dept
Name"
:value=
"item.
dept
Id"
>
:key=
"item.
administrators
Id"
:label=
"item.
administrators
Name"
:value=
"item.
administrators
Id"
>
</el-option>
</el-select>
<span
v-else
>
{{
viewDeptName(dialogBindData.deptId)
}}
</span>
<span
v-else
>
{{
dialogBindData.administratorsName
}}
</span>
</el-col>
</el-row>
...
...
@@ -234,8 +234,8 @@ export default {
sex
:
""
,
mobilePhone
:
""
,
isAvailable
:
1
,
sysRole
:
""
,
flag
:
""
administratorsName
:
""
,
administratorsId
:
""
},
//店铺管理员下拉数据
...
...
@@ -340,6 +340,7 @@ export default {
});
},
edit
(
data
)
{
debugger
this
.
dialogType
=
2
;
this
.
getRoleList
(()
=>
{
this
.
getSectionsByDeptId
(
data
.
deptId
,
()
=>
{
...
...
@@ -370,6 +371,8 @@ export default {
}
},
submmitFun
()
{
console
.
log
(
this
.
dialogBindData
)
let
isSubmitActive
;
if
(
this
.
dialogType
===
1
)
{
// alert(`添加${JSON.stringify(this.dialogBindData)}`);
...
...
@@ -379,8 +382,8 @@ export default {
this
.
dialogBindData
.
realName
&&
this
.
dialogBindData
.
mobilePhone
&&
this
.
dialogBindData
.
sysRole
&&
this
.
dialogBindData
.
deptId
&&
this
.
dialogBindData
.
sectionId
;
this
.
dialogBindData
.
administratorsId
;
// this.dialogBindData.administratorsName
;
}
else
{
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
isSubmitActive
=
...
...
@@ -389,9 +392,8 @@ export default {
this
.
dialogBindData
.
password
&&
this
.
dialogBindData
.
realName
&&
this
.
dialogBindData
.
mobilePhone
&&
this
.
dialogBindData
.
sysRole
&&
this
.
dialogBindData
.
deptId
&&
this
.
dialogBindData
.
sectionId
;
this
.
dialogBindData
.
administratorsId
;
// this.dialogBindData.administratorsName;
}
// // 发送添加请求
if
(
isSubmitActive
)
{
...
...
@@ -494,11 +496,13 @@ export default {
.
all
([
//方法一
system
.
queryAllSysRole
().
then
(
res
=>
{
debugger
this
.
chooseRole
=
res
.
data
;
}),
//方法二
system
.
queryAllShopAdmin
().
then
(
res
=>
{
this
.
shopAdminsData
=
res
.
data
;
debugger
this
.
shopAdminsData
=
res
.
data
.
data
;
})
])
.
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