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 b366bee2
authored
Sep 17, 2018
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://github.com/glsx-web/authority
2 parents
ec5cf4ca
69432b72
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
src/components/UserCreate/src/main.vue
src/views/customer/user/index.vue
src/components/UserCreate/src/main.vue
View file @
b366bee
...
...
@@ -87,7 +87,7 @@
<
script
>
export
default
{
name
:
'User
Form
'
,
name
:
'User
Create
'
,
props
:
{
dialogFormVisible
:
Boolean
,
editUser
:
Object
...
...
src/views/customer/user/index.vue
View file @
b366bee
...
...
@@ -9,8 +9,8 @@
<div
class=
"default p-t15"
>
<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>
--
>
<gl-button
size=
"small"
@
click=
"
toggleRowSelection
"
>
删除选中
</gl-button>
<
user-create
:dialogFormVisible=
"dialogFormVisible"
:editUser=
"editUser"
@
userFormData=
"handleUserFormData"
></user-create
>
</div>
<div
class=
"m-b8"
>
<gl-table
:table=
"userData"
ref=
"multipleTable"
></gl-table>
...
...
@@ -24,19 +24,20 @@
</
template
>
<
script
>
import
{
User
Form
,
UserDetail
}
from
'@/components/index'
import
{
User
Create
,
UserDetail
}
from
'@/components/index'
// 接口
import
{
findAll
}
from
'@/api/api'
import
{
userDetailColumn
}
from
'@/common/commonConst'
export
default
{
name
:
'user'
,
components
:
{
User
Form
,
User
Create
,
UserDetail
},
data
()
{
return
{
userName
:
''
,
toggle
:
[],
dialogFormVisible
:
false
,
editUser
:
{},
userDetailVisible
:
false
,
...
...
@@ -51,6 +52,7 @@ export default {
apiParam
:
Number
,
flagRoleOrUser
:
Boolean
,
userData
:
{
select
:
this
.
handleSelectionChange
,
border
:
true
,
align
:
'center'
,
height
:
500
,
...
...
@@ -125,8 +127,8 @@ export default {
// 获取所需字段
getParams
()
{
return
{
//
pageSize: this.pageSize,
//
pageNum: this.pageNum,
pageSize
:
this
.
pageSize
,
pageNum
:
this
.
pageNum
,
username
:
this
.
userName
}
},
...
...
@@ -195,8 +197,21 @@ export default {
console
.
log
(
createTime
)
return
createTime
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
handleSelectionChange
(
val
,
row
)
{
// this.multipleSelection = val
this
.
toggle
=
val
console
.
log
(
this
.
toggle
)
},
toggleRowSelection
()
{
console
.
log
(
this
.
$refs
.
multipleTable
,
this
.
toggle
)
if
(
this
.
toggle
)
{
this
.
toggle
.
forEach
(
row
=>
{
this
.
userData
.
data
.
splice
(
this
.
toggle
,
1
)
// this.$refs.multipleTable.$refs.table.toggleRowSelection(row)
})
}
else
{
// this.$refs.multipleTable.clearSelection()
}
},
finduserName
()
{
// this.userName = ''
...
...
@@ -211,8 +226,8 @@ export default {
this
.
pageNum
=
val
this
.
findUserList
()
},
delteSelected
(
index
,
rows
)
{
console
.
log
(
rows
)
delteSelected
(
val
)
{
console
.
log
(
val
)
},
confirmDeleteOrNot
(
index
,
rows
)
{
this
.
$confirm
(
'确定要删除这条数据?'
,
''
,
{
...
...
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