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 3356373c
authored
Sep 18, 2018
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
state转换
1 parent
ef620ed7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
src/views/customer/role/index.vue
src/views/customer/user/index.vue
src/views/customer/role/index.vue
View file @
3356373
...
@@ -68,7 +68,10 @@ export default {
...
@@ -68,7 +68,10 @@ export default {
prop
:
'departName'
prop
:
'departName'
},
{
},
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'state'
prop
:
'state'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
return
cellValue
<
1
?
'禁止'
:
'启动'
}
},
{
},
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createTime'
prop
:
'createTime'
...
@@ -109,11 +112,11 @@ export default {
...
@@ -109,11 +112,11 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
// search--------------------
// search--------------------
//
watch: {
watch
:
{
//
roleName(val) {
roleName
(
val
)
{
// !val
!
val
&&
this
.
getList
()
//
}
}
//
},
},
methods
:
{
methods
:
{
message
(
message
,
type
)
{
message
(
message
,
type
)
{
type
&&
this
.
$message
({
type
&&
this
.
$message
({
...
@@ -174,15 +177,15 @@ export default {
...
@@ -174,15 +177,15 @@ export default {
},
},
// 接口请求-end---------------------------------------
// 接口请求-end---------------------------------------
// 新增用户到页面
// 新增用户到页面
aa
addRole
(
data
)
{
//
addRole(data) {
// 后台获取----------------------
// 后台获取----------------------
// data.id = '1038'
// data.id = '1038'
data
.
createTime
=
new
Date
().
toLocaleString
().
split
(
'/'
).
join
(
'-'
)
//
data.createTime = new Date().toLocaleString().split('/').join('-')
// 后台获取----------------------
// 后台获取----------------------
const
newData
=
data
//
const newData = data
this
.
roleData
.
data
.
push
(
newData
)
//
this.roleData.data.push(newData)
this
.
message
(
'创建角色成功!'
,
'success'
)
//
this.message('创建角色成功!', 'success')
},
//
},
createDialogVisible
()
{
createDialogVisible
()
{
this
.
createVisible
=
!
this
.
createVisible
this
.
createVisible
=
!
this
.
createVisible
},
},
...
@@ -235,8 +238,8 @@ export default {
...
@@ -235,8 +238,8 @@ export default {
this
.
roleParam
=
roleCreateStructure
this
.
roleParam
=
roleCreateStructure
!
data
&&
this
.
message
(
'取消创建角色'
)
!
data
&&
this
.
message
(
'取消创建角色'
)
// 将数据提交给后台,根据返回结果做判断
// 将数据提交给后台,根据返回结果做判断
// data && !flagEOrC && this.aaaddRole(data
)
data
&&
!
flagEOrC
&&
this
.
getList
()
&&
this
.
message
(
'创建角色成功!'
,
'success'
)
// data && flagEOrC
&& this.message('已经成功修改数据!', 'success')
data
&&
flagEOrC
&&
this
.
getList
()
&&
this
.
message
(
'已经成功修改数据!'
,
'success'
)
}
}
}
}
}
}
...
...
src/views/customer/user/index.vue
View file @
3356373
...
@@ -73,7 +73,10 @@ export default {
...
@@ -73,7 +73,10 @@ export default {
prop
:
'mobile'
prop
:
'mobile'
},
{
},
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'state'
prop
:
'state'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
return
cellValue
<
1
?
'禁止'
:
'启动'
}
},
{
},
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createTime'
prop
:
'createTime'
...
...
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