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 8c46f021
authored
Sep 14, 2018
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
。。
1 parent
68074757
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
src/components/UserCreate/src/main.vue
src/views/customer/user/index.vue
src/components/UserCreate/src/main.vue
View file @
8c46f02
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'User
Form
'
,
name
:
'User
Create
'
,
props
:
{
props
:
{
dialogFormVisible
:
Boolean
,
dialogFormVisible
:
Boolean
,
editUser
:
Object
editUser
:
Object
...
...
src/views/customer/user/index.vue
View file @
8c46f02
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
<div
class=
"default p-t15"
>
<div
class=
"default p-t15"
>
<div
class=
"control-tabledata-button"
>
<div
class=
"control-tabledata-button"
>
<gl-button
size=
"small"
@
click=
"createUser(editUser=
{})">新增用户
</gl-button>
<gl-button
size=
"small"
@
click=
"createUser(editUser=
{})">新增用户
</gl-button>
<gl-button
size=
"small"
@
click=
"
delteSelected(index[rows]
)"
>
删除选中
</gl-button>
<gl-button
size=
"small"
@
click=
"
toggleSelection(this.toggle
)"
>
删除选中
</gl-button>
<user-
form
:dialogFormVisible=
"dialogFormVisible"
:editUser=
"editUser"
@
userFormData=
"handleUserFormData"
></user-form
>
<user-
create
:dialogFormVisible=
"dialogFormVisible"
:editUser=
"editUser"
@
userFormData=
"handleUserFormData"
></user-create
>
</div>
</div>
<div
class=
"m-b8"
>
<div
class=
"m-b8"
>
<gl-table
:table=
"userData"
ref=
"multipleTable"
:pagination=
"pagination"
></gl-table>
<gl-table
:table=
"userData"
ref=
"multipleTable"
:pagination=
"pagination"
></gl-table>
...
@@ -21,18 +21,19 @@
...
@@ -21,18 +21,19 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
User
Form
,
UserDetail
}
from
'@/components/index'
import
{
User
Create
,
UserDetail
}
from
'@/components/index'
import
{
getUser
}
from
'@/api/userApi'
import
{
getUser
}
from
'@/api/userApi'
import
{
userDetailColumn
}
from
'@/common/common'
import
{
userDetailColumn
}
from
'@/common/common'
export
default
{
export
default
{
name
:
'user'
,
name
:
'user'
,
components
:
{
components
:
{
User
Form
,
User
Create
,
UserDetail
UserDetail
},
},
data
()
{
data
()
{
return
{
return
{
userName
:
''
,
userName
:
''
,
toggle
:
{},
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
editUser
:
{},
editUser
:
{},
userDetailVisible
:
false
,
userDetailVisible
:
false
,
...
@@ -40,6 +41,7 @@ export default {
...
@@ -40,6 +41,7 @@ export default {
columnParam
:
[],
columnParam
:
[],
consoleParam
:
[],
consoleParam
:
[],
userData
:
{
userData
:
{
select
:
this
.
handleSelectionChange
,
border
:
true
,
border
:
true
,
align
:
'center'
,
align
:
'center'
,
height
:
500
,
height
:
500
,
...
@@ -177,13 +179,24 @@ export default {
...
@@ -177,13 +179,24 @@ export default {
return
createTime
return
createTime
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
// this.multipleSelection = val
alert
(
val
)
this
.
toggle
=
val
},
toggleSelection
(
rows
)
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
)
})
}
else
{
this
.
$refs
.
multipleTable
.
clearSelection
()
}
},
},
finduserName
()
{
finduserName
()
{
this
.
userName
=
''
this
.
userName
=
''
},
},
delteSelected
(
index
,
rows
)
{
delteSelected
(
val
)
{
console
.
log
(
rows
)
console
.
log
(
val
)
},
},
confirmDeleteOrNot
(
index
,
rows
)
{
confirmDeleteOrNot
(
index
,
rows
)
{
this
.
$confirm
(
'确定要删除这条数据?'
,
''
,
{
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