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