Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopFront
Project
Project
Details
Activity
Releases
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
newshop
newShopFront
Commits
fc41d7e6
Commit
fc41d7e6
authored
Dec 19, 2019
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
htf
parent
f246e3c9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
221 additions
and
17 deletions
+221
-17
authority.js
src/api/authority.js
+20
-1
homeURL.js
src/api/homeURL.js
+1
-1
router.config.js
src/config/router.config.js
+7
-0
Manage_editor.vue
src/views/authority/details/Manage_editor.vue
+153
-0
manageList.vue
src/views/authority/manageList.vue
+12
-3
menuList.vue
src/views/authority/menuList.vue
+27
-11
vue.config.js
vue.config.js
+1
-1
No files found.
src/api/authority.js
View file @
fc41d7e6
...
@@ -16,7 +16,6 @@ import homeUrl from './homeURL'
...
@@ -16,7 +16,6 @@ import homeUrl from './homeURL'
*/
*/
// 获取权限节点列表
// 获取权限节点列表
export
function
getMenuList
(
parameter
)
{
export
function
getMenuList
(
parameter
)
{
console
.
log
(
'111111111111111111111111111111111111111111111'
)
console
.
log
(
parameter
)
console
.
log
(
parameter
)
return
axios
({
return
axios
({
url
:
'authority/authority-nodes/node-list'
,
url
:
'authority/authority-nodes/node-list'
,
...
@@ -83,6 +82,26 @@ export function getMangeList(parameter) {
...
@@ -83,6 +82,26 @@ export function getMangeList(parameter) {
params
:
parameter
params
:
parameter
})
})
}
}
// 获取管理员详情
export
function
getManageUserInfo
(
parameter
)
{
console
.
log
(
parameter
)
return
axios
({
url
:
'authority/manage-lists/get-user-info'
,
method
:
'get'
,
params
:
{
'GUID'
:
parameter
}
})
}
// 获取角色列表
export
function
getManageGroupList
()
{
return
axios
({
url
:
'authority/manage-lists/manage-group-list'
,
method
:
'get'
,
params
:
{}
})
}
/**
/**
* get user 2step code open?
* get user 2step code open?
* @param parameter {*}
* @param parameter {*}
...
...
src/api/homeURL.js
View file @
fc41d7e6
const
homeUrl
=
'http://localhost/
dengxueyun/newshopBack
/backend/web/v1/'
;
const
homeUrl
=
'http://localhost/
hantengfei/newShopBack1
/backend/web/v1/'
;
export
default
homeUrl
export
default
homeUrl
\ No newline at end of file
src/config/router.config.js
View file @
fc41d7e6
...
@@ -184,6 +184,13 @@ export const asyncRouterMap = [
...
@@ -184,6 +184,13 @@ export const asyncRouterMap = [
name
:
'manageList'
,
name
:
'manageList'
,
component
:
()
=>
import
(
'@/views/authority/manageList'
),
component
:
()
=>
import
(
'@/views/authority/manageList'
),
meta
:
{
title
:
'管理员列表'
,
keepAlive
:
false
,
permission
:
[
'table'
]
}
meta
:
{
title
:
'管理员列表'
,
keepAlive
:
false
,
permission
:
[
'table'
]
}
},
{
path
:
'/authority/details/Manage_editor'
,
name
:
'Manageeditor'
,
hidden
:
true
,
component
:
()
=>
import
(
'@/views/authority/details/Manage_editor'
),
meta
:
{
title
:
'编辑管理员'
,
keepAlive
:
false
,
permission
:
[
'table'
]
}
}
}
]
]
},
},
...
...
src/views/authority/details/Manage_editor.vue
0 → 100644
View file @
fc41d7e6
<
template
>
<a-card
:body-style=
"
{ padding: '24px 32px' }" :bordered="false">
<a-form
:form=
"form"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"姓名"
>
<a-input
v-decorator=
"['GUID',
{ rules: [{ required: true, message: '请输入姓名' }] }]"
name="GUID"
placeholder="请输入姓名"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"省级公司"
>
<a-input
v-decorator=
"['NAME',
{ rules: [{ required: true, message: '请输入省级公司' }] }]"
name="NAME"
placeholder="请输入省级公司"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"所属门店"
>
<a-input
v-decorator=
"['EMPLOYEE_CODE']"
name=
"EMPLOYEE_CODE"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"拥有权限"
>
<a-radio-group
v-model=
"res.ROLE_ID"
>
<a-radio
v-for=
"(group, index) in grouplist"
:key=
"index"
:value=
"group.ID"
>
{{
group
.
NAME
}}
</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item
:wrapperCol=
"
{ span: 24 }" style="text-align: center">
<a-button
v-if=
"GUID"
@
click
.
stop
.
prevent=
"handleSubmit"
htmlType=
"submit"
type=
"primary"
>
提交
</a-button>
<a-button
v-else
@
click
.
stop
.
prevent=
"handleSubmit1()"
htmlType=
"submit"
type=
"primary"
>
提交
</a-button>
<a-button
@
click=
"goBack"
style=
"margin-left: 8px"
>
返回
</a-button>
</a-form-item>
</a-form>
</a-card>
</
template
>
<
script
>
import
moment
from
'moment'
import
{
getManageUserInfo
,
getManageGroupList
}
from
'@/api/authority'
export
default
{
name
:
'authority'
,
data
()
{
return
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
7
}
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
12
}
},
// count: 2,
description
:
'表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。'
,
// goId: 1,
GUID
:
''
,
res
:[],
grouplist
:
[],
// form
form
:
this
.
$form
.
createForm
(
this
)
}
},
mounted
()
{
var
id
=
this
.
$route
.
query
.
GUID
console
.
log
(
id
)
// var gooId = this.$route.query.goid
// this.goId = gooId
this
.
GUID
=
id
if
(
id
)
{
getManageGroupList
()
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
grouplist
=
res
.
info
;
return
getManageUserInfo
(
id
)
})
// getManageUserInfo(id)
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
form
.
setFieldsValue
(
res
)
this
.
res
=
res
})
.
catch
(
err
=>
{})
}
//获取所有权限
// getManageGroupList()
// .then(res => {
// console.log(res)
// this.grouplist = res.info
// })
// .catch(err => {})
},
methods
:
{
// checkboxGroup处理
checkRadio
(
value
)
{
if
(
value
)
{
return
value
.
toString
()
}
},
//time
DateCheck
(
value
)
{
if
(
value
||
value
!=
null
||
value
!=
''
)
{
console
.
log
(
value
)
return
moment
(
value
,
'YYYY-MM-DD'
)
}
},
checkRadio
(
value
)
{
if
(
value
==
null
||
value
==
''
)
{
return
'0'
}
else
{
return
value
.
toString
()
}
},
handleSubmit
()
{
console
.
log
(
validateFields
)
const
{
form
:
{
validateFields
}
}
=
this
validateFields
({
force
:
true
},
(
err
,
values
)
=>
{
console
.
log
(
values
)
if
(
!
err
)
{
console
.
log
(
err
)
const
EminformanParams
=
{
...
values
}
addEminforman
(
EminformanParams
)
this
.
$router
.
push
({
path
:
'/authority/manageList'
})
}
})
},
handleSubmit1
()
{
let
guid
=
this
.
GUID
const
{
form
:
{
validateFields
}
}
=
this
validateFields
({
force
:
true
},
(
err
,
values
)
=>
{
if
(
!
err
)
{
const
EminformanModify
=
Object
.
assign
({
...
values
},
{
GUID
:
guid
})
if
(
EminformanModify
.
CONTACTBIRTH_DATE
)
{
EminformanModify
.
CONTACTBIRTH_DATE
=
EminformanModify
.
CONTACTBIRTH_DATE
.
format
(
'YYYY-MM-DD'
)
}
modifyEminformanDetails
(
EminformanModify
)
this
.
$router
.
push
({
path
:
'/authority/manageList'
})
}
})
},
goBack
()
{
this
.
$router
.
push
({
path
:
'/authority/manageList'
})
}
}
}
</
script
>
src/views/authority/manageList.vue
View file @
fc41d7e6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<a-card
style=
"margin-bottom:10px"
>
<a-card
style=
"margin-bottom:10px"
>
<div
class=
"table-operator"
>
<div
class=
"table-operator"
>
<a-button-group>
<a-button-group>
<a-button
type=
'primary'
icon=
'plus'
@
click=
"goEdit(
1
)"
>
添加管理员
</a-button>
<a-button
type=
'primary'
icon=
'plus'
@
click=
"goEdit()"
>
添加管理员
</a-button>
</a-button-group>
</a-button-group>
</div>
</div>
<s-table
<s-table
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
>
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<template>
<template>
<a
@
click=
"
handleEdit(record
)"
>
角色分配
</a>
<a
@
click=
"
goEdit(record.GUID
)"
>
角色分配
</a>
<!--
<a-divider
type=
"vertical"
/>
-->
<!--
<a-divider
type=
"vertical"
/>
-->
<!--
<a-popconfirm
title=
"是否要删除此行?"
@
confirm=
"remove(record.ID)"
>
<!--
<a-popconfirm
title=
"是否要删除此行?"
@
confirm=
"remove(record.ID)"
>
<a>
删除
</a>
<a>
删除
</a>
...
@@ -93,7 +93,16 @@ export default {
...
@@ -93,7 +93,16 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
goEdit
(
GUID
=
''
)
{
if
(
GUID
){
this
.
$router
.
push
({
path
:
'/authority/details/Manage_editor'
,
query
:{
GUID
:
GUID
}})
// this.$router.push({path:'/authority/details/Manage_editor',query:{goid:1}})
}
else
{
console
.
log
(
value
)
this
.
$router
.
push
({
path
:
'/authority/details/Manage_editor'
,
query
:{
goid
:
0
,
GUID
:
value
.
GUID
}})
}
},
}
}
}
}
...
...
src/views/authority/menuList.vue
View file @
fc41d7e6
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
rowKey=
"ID"
rowKey=
"ID"
:columns=
"columns"
:columns=
"columns"
:data=
"loadData"
:data=
"loadData"
:scroll=
"
{ x: 1200, y:300 }"
:showPagination="pagination"
:showPagination="pagination"
>
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<span
slot=
"action"
slot-scope=
"text, record"
>
...
@@ -161,11 +162,17 @@ export default {
...
@@ -161,11 +162,17 @@ export default {
columns
:
[
columns
:
[
{
{
title
:
'菜单名称'
,
title
:
'菜单名称'
,
dataIndex
:
'TITLE'
dataIndex
:
'TITLE'
,
width
:
200
,
key
:
'TITLE'
,
fixed
:
'left'
},
},
{
{
title
:
'节点id'
,
title
:
'节点id'
,
dataIndex
:
'ID'
dataIndex
:
'ID'
,
width
:
90
,
key
:
'ID'
,
fixed
:
'left'
// customRender: (value, row, index) => {
// customRender: (value, row, index) => {
// var ret = []
// var ret = []
// // 添加icon
// // 添加icon
...
@@ -184,27 +191,33 @@ export default {
...
@@ -184,27 +191,33 @@ export default {
},
},
{
{
title
:
'菜单地址'
,
title
:
'菜单地址'
,
dataIndex
:
'NAME'
dataIndex
:
'NAME'
,
width
:
200
},
},
{
{
title
:
'菜单状态'
,
title
:
'菜单状态'
,
dataIndex
:
'STATUS'
dataIndex
:
'STATUS'
,
width
:
150
},
},
{
{
title
:
'是否为菜单'
,
title
:
'是否为菜单'
,
dataIndex
:
'IS_MENU'
dataIndex
:
'IS_MENU'
,
width
:
100
},
},
{
{
title
:
'是否顶部菜单'
,
title
:
'是否顶部菜单'
,
dataIndex
:
'IS_TOP_MENU'
dataIndex
:
'IS_TOP_MENU'
,
width
:
100
},
},
{
{
title
:
'是否默认显示'
,
title
:
'是否默认显示'
,
dataIndex
:
'IS_DEFAULT_SHOW'
dataIndex
:
'IS_DEFAULT_SHOW'
,
width
:
150
},
},
{
{
title
:
'描述'
,
title
:
'描述'
,
dataIndex
:
'REMARK'
dataIndex
:
'REMARK'
,
width
:
90
},
},
// {
// {
// title: '类型',
// title: '类型',
...
@@ -225,11 +238,13 @@ export default {
...
@@ -225,11 +238,13 @@ export default {
// },
// },
{
{
title
:
'排序'
,
title
:
'排序'
,
dataIndex
:
'SORT'
dataIndex
:
'SORT'
,
width
:
100
},
},
{
{
title
:
'类型'
,
title
:
'类型'
,
dataIndex
:
'LEVEL'
dataIndex
:
'LEVEL'
,
width
:
100
// customRender: (state, row, index) => {
// customRender: (state, row, index) => {
// return
<
div
>
{
state
===
0
?
<
a
-
tag
color
=
"cyan"
>
显示
<
/a-tag> : <a-tag color="red">隐藏</
a
-
tag
>
}
<
/div
>
// return
<
div
>
{
state
===
0
?
<
a
-
tag
color
=
"cyan"
>
显示
<
/a-tag> : <a-tag color="red">隐藏</
a
-
tag
>
}
<
/div
>
// }
// }
...
@@ -238,7 +253,8 @@ export default {
...
@@ -238,7 +253,8 @@ export default {
{
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'action'
,
dataIndex
:
'action'
,
width
:
'150px'
,
fixed
:
'right'
,
width
:
100
,
scopedSlots
:
{
customRender
:
'action'
}
scopedSlots
:
{
customRender
:
'action'
}
}
}
],
],
...
...
vue.config.js
View file @
fc41d7e6
...
@@ -102,7 +102,7 @@ const vueConfig = {
...
@@ -102,7 +102,7 @@ const vueConfig = {
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
proxy
:
{
proxy
:
{
'/apis'
:
{
'/apis'
:
{
target
:
'http://localhost/
dengxueyun/newshopBack
/backend/web/v1/'
,
target
:
'http://localhost/
hantengfei/newShopBack1
/backend/web/v1/'
,
ws
:
false
,
ws
:
false
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:{
pathRewrite
:{
...
...
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