Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
authority
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0a931da9
authored
Sep 13, 2018
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口
1 parent
fcd80451
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
33 deletions
src/common/common.js → src/common/commonConst.js
src/common/roleCommon.js → src/common/roleConst.js
src/common/userCommon.js → src/common/userConst.js
src/components/RoleCreate/src/main.vue
src/config/common.conf.js
src/views/customer/role/index.vue
src/views/customer/user/index.vue
src/common/common.js
→
src/common/common
Const
.js
View file @
0a931da
import
{
roleCreateStructure
,
userRoleDetailColumn
,
userRoleDetailConsole
}
from
'./roleCo
mmon
'
import
{
userDetailColumn
}
from
'./userCo
mmon
'
import
{
roleCreateStructure
,
userRoleDetailColumn
,
userRoleDetailConsole
}
from
'./roleCo
nst
'
import
{
userDetailColumn
}
from
'./userCo
nst
'
export
{
roleCreateStructure
,
...
...
src/common/roleCo
mmon
.js
→
src/common/roleCo
nst
.js
View file @
0a931da
File moved
src/common/userCo
mmon
.js
→
src/common/userCo
nst
.js
View file @
0a931da
File moved
src/components/RoleCreate/src/main.vue
View file @
0a931da
...
...
@@ -27,7 +27,7 @@
</
template
>
<
script
>
import
{
roleCreateStructure
}
from
'@/common/
roleCommon
'
import
{
roleCreateStructure
}
from
'@/common/
commonConst
'
export
default
{
name
:
'RoleCreate'
,
props
:
{
...
...
src/config/common.conf.js
View file @
0a931da
export
default
{
axios
:
{
// baseURL: 'http://cas.dev.glsx.net/cas
/',
baseURL
:
'http://192.168.3.171:7300/mock/5b91805391b67469b43e2921/subsystem
'
,
whiteList
:
[
'
/role/deleteRoleById'
,
'/role/deleteUserRoleById'
,
'/role/getRoleDetail'
,
'/role/getRoleDetail'
,
'/role/getRoleList'
,
'/role/isRoleNameExit'
,
'/role/saveRoleList'
,
'/role/selectMenuTreeRoleId'
,
'/role/selectUserRoleByRoleId'
,
'/
role/updateRole'
,
'role/userList'
,
'role/roleList'
],
baseURL
:
'http://cas.dev.glsx.net/admin-operating-auth
/'
,
// baseURL: 'http://192.168.3.171:7300/mock/5b91805391b67469b43e2921/subsystem/
',
whiteList
:
[
'
role/deleteRoleById'
,
'role/deleteUserRoleById'
,
'role/getRoleDetail'
,
'role/getRoleDetail'
,
'role/getRoleList'
,
'role/isRoleNameExit'
,
'role/saveRoleList'
,
'role/selectMenuTreeRoleId'
,
'role/selectUserRoleByRoleId'
,
'
role/updateRole'
,
'role/userList'
,
'role/roleList'
],
timeout
:
15000
,
result
:
{
data_key
:
'data'
,
// 返回值数据实体存放对象
...
...
src/views/customer/role/index.vue
View file @
0a931da
...
...
@@ -25,10 +25,10 @@
<
script
>
import
{
RoleCreate
,
RoleDetail
,
UserDetail
}
from
'@/components/index'
// easy mock接口
import
{
roleTest
}
from
'@/api/api'
//
import { roleTest } from '@/api/api'
// 后台接口
//
import { getRoleList } from '@/api/api'
import
{
roleCreateStructure
,
userRoleDetailColumn
,
userRoleDetailConsole
}
from
'@/common/common'
import
{
getRoleList
}
from
'@/api/api'
import
{
roleCreateStructure
,
userRoleDetailColumn
,
userRoleDetailConsole
}
from
'@/common/common
Const
'
export
default
{
name
:
'role'
,
components
:
{
...
...
@@ -107,26 +107,25 @@ export default {
}
},
mounted
()
{
roleTest
.
req
().
then
(
res
=>
{
this
.
roleData
.
data
=
res
.
roleData
})
// 请求表格数据
// getRoleList.req(this.pagination).then(res => {
// console.log(res)
// this.total = res.total
// this.roleData.data = res.condition
// }).catch(err => {
// console.log(err)
// roleTest.req().then(res => {
// this.roleData.data = res.roleData
// })
// 请求表格数据
// console.log(this.pagination)
getRoleList
.
req
(
this
.
pagination
).
then
(
res
=>
{
this
.
total
=
res
.
total
this
.
roleData
.
data
=
res
.
list
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
watch
:
{
roleName
(
val
)
{
!
val
}
},
// search--------------------
// watch: {
// roleName(val) {
// !val
// }
// },
methods
:
{
getRoleList
()
{
},
message
(
message
,
type
)
{
type
&&
this
.
$message
({
showClose
:
true
,
...
...
src/views/customer/user/index.vue
View file @
0a931da
...
...
@@ -10,7 +10,7 @@
<div
class=
"control-tabledata-button"
>
<gl-button
size=
"small"
@
click=
"createUser(editUser=
{})">新增用户
</gl-button>
<gl-button
size=
"small"
@
click=
"delteSelected(index[rows])"
>
删除选中
</gl-button>
<
user-form
:dialogFormVisible=
"dialogFormVisible"
:editUser=
"editUser"
@
userFormData=
"handleUserFormData"
></user-form
>
<
!--
<user-form
:dialogFormVisible=
"dialogFormVisible"
:editUser=
"editUser"
@
userFormData=
"handleUserFormData"
></user-form>
--
>
</div>
<div
class=
"m-b8"
>
<gl-table
:table=
"userData"
ref=
"multipleTable"
:pagination=
"pagination"
></gl-table>
...
...
@@ -22,8 +22,8 @@
<
script
>
import
{
UserForm
,
UserDetail
}
from
'@/components/index'
import
{
getUser
}
from
'@/api/userApi'
import
{
userDetailColumn
}
from
'@/common/common'
//
import { getUser } from '@/api/userApi'
import
{
userDetailColumn
}
from
'@/common/common
Const
'
export
default
{
name
:
'user'
,
components
:
{
...
...
@@ -116,10 +116,10 @@ export default {
}
},
mounted
()
{
getUser
.
req
().
then
(
res
=>
{
this
.
userData
.
data
=
res
.
userData
console
.
log
(
res
.
userData
)
})
//
getUser.req().then(res => {
//
this.userData.data = res.userData
//
console.log(res.userData)
//
})
},
methods
:
{
message
(
message
,
type
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment