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 1038b9f1
authored
Sep 29, 2018
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
基本完成
1 parent
5614627c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
src/views/customer/user/index.vue
src/views/customer/user/index.vue
View file @
1038b9f
...
@@ -123,13 +123,22 @@ export default {
...
@@ -123,13 +123,22 @@ export default {
column
.
label
=
rows
[
index
].
state
<
1
?
'启动'
:
'禁用'
column
.
label
=
rows
[
index
].
state
<
1
?
'启动'
:
'禁用'
},
},
callback
:
(
index
,
rows
)
=>
{
callback
:
(
index
,
rows
)
=>
{
console
.
log
(
rows
[
index
].
state
)
this
.
$confirm
(
'确定要修改这条数据?'
,
''
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
if
(
rows
[
index
].
state
<
1
)
{
if
(
rows
[
index
].
state
<
1
)
{
this
.
$set
(
rows
[
index
],
'state'
,
'1'
)
this
.
$set
(
rows
[
index
],
'state'
,
'1'
)
this
.
operatUser
({
id
:
rows
[
index
].
id
,
state
:
1
})
}
else
{
}
else
{
this
.
$set
(
rows
[
index
],
'state'
,
'0'
)
this
.
$set
(
rows
[
index
],
'state'
,
'0'
)
this
.
operatUser
({
id
:
rows
[
index
].
id
,
state
:
0
})
}
}
console
.
log
(
rows
[
index
].
state
)
this
.
message
(
'修改成功'
,
'success'
)
}).
catch
(()
=>
{
this
.
message
(
'修改失败'
,
'info'
)
})
}
}
},
{
},
{
label
:
'删除'
,
label
:
'删除'
,
...
@@ -228,9 +237,9 @@ export default {
...
@@ -228,9 +237,9 @@ export default {
},
},
// 接受子组件传递的值
// 接受子组件传递的值
handleUserFormData
(
isEdit
,
params
)
{
handleUserFormData
(
isEdit
,
params
)
{
console
.
log
(
isEdit
)
console
.
log
(
params
)
this
.
userManageForm
=
{}
this
.
userManageForm
=
{}
!
params
&&
this
.
message
(
'取消操作'
,
'
warning
'
)
!
params
&&
this
.
message
(
'取消操作'
,
'
info
'
)
params
&&
this
.
updateUser_Post
(
params
)
params
&&
this
.
updateUser_Post
(
params
)
this
.
dialogFormVisible
=
!
this
.
dialogFormVisible
this
.
dialogFormVisible
=
!
this
.
dialogFormVisible
},
},
...
@@ -242,6 +251,7 @@ export default {
...
@@ -242,6 +251,7 @@ export default {
},
},
// 编辑按钮
// 编辑按钮
editUser
(
row
)
{
editUser
(
row
)
{
console
.
log
(
row
)
row
.
password
=
''
row
.
password
=
''
row
.
roleList
=
this
.
$deep_clone
(
userForm
.
roleList
)
row
.
roleList
=
this
.
$deep_clone
(
userForm
.
roleList
)
row
.
state
=
row
.
state
+
''
row
.
state
=
row
.
state
+
''
...
@@ -255,7 +265,8 @@ export default {
...
@@ -255,7 +265,8 @@ export default {
if
(
row
.
roles
&&
typeof
(
row
.
roles
)
===
'string'
)
{
if
(
row
.
roles
&&
typeof
(
row
.
roles
)
===
'string'
)
{
row
.
roles
=
(
row
.
roles
+
''
).
split
(
','
).
map
(
role
=>
+
role
)
row
.
roles
=
(
row
.
roles
+
''
).
split
(
','
).
map
(
role
=>
+
role
)
}
else
{
}
else
{
row
.
roles
=
[]
(
typeof
(
row
.
roles
)
===
'object'
)
&&
row
.
roles
!
(
typeof
(
row
.
roles
)
===
'object'
)
&&
[]
}
}
this
.
userManageForm
=
this
.
$deep_clone
(
row
)
this
.
userManageForm
=
this
.
$deep_clone
(
row
)
})
})
...
@@ -283,9 +294,10 @@ export default {
...
@@ -283,9 +294,10 @@ export default {
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
message
(
'取消删除'
,
'info'
)
this
.
message
(
'取消删除'
,
'info'
)
})
})
}
else
{
this
.
message
(
''
,
'操作失败'
)
}
}
// else {
// this.message('', '操作失败')
// }
},
},
// 提示
// 提示
createOrEditSuccess
()
{
createOrEditSuccess
()
{
...
...
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