Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
sun
Commits
6e22e34c
Commit
6e22e34c
authored
Dec 18, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
账号不可编辑
parent
62f313f5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
25 deletions
+24
-25
AccountDetail.vue
vu/src/views/account/components/AccountDetail.vue
+24
-25
No files found.
vu/src/views/account/components/AccountDetail.vue
View file @
6e22e34c
...
@@ -10,13 +10,13 @@
...
@@ -10,13 +10,13 @@
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
style=
"margin-bottom: 40px;"
prop=
"username"
v-if=
"isShow
"
>
<el-form-item
v-if=
"isShow"
style=
"margin-bottom: 40px;"
prop=
"username
"
>
<MDinput
v-model=
"postForm.username"
:maxlength=
"100"
name=
"username"
required
disabled=
"disabled"
>
<MDinput
v-model=
"postForm.username"
:maxlength=
"100"
name=
"username"
required
disabled=
"disabled"
>
账号
账号
</MDinput>
</MDinput>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-bottom: 40px;"
prop=
"username"
v-else
>
<el-form-item
v-else
style=
"margin-bottom: 40px;"
prop=
"username"
>
<MDinput
v-model=
"postForm.username"
:maxlength=
"100"
name=
"username"
required
>
<MDinput
v-model=
"postForm.username"
:maxlength=
"100"
name=
"username"
required
>
账号
账号
</MDinput>
</MDinput>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
style=
"margin-bottom: 40px;"
prop=
"password"
v-show=
"is_show
"
>
<el-form-item
v-show=
"is_show"
style=
"margin-bottom: 40px;"
prop=
"password
"
>
<MDinput
v-model=
"postForm.password"
:maxlength=
"100"
name=
"password"
required
>
<MDinput
v-model=
"postForm.password"
:maxlength=
"100"
name=
"password"
required
>
密码
密码
</MDinput>
</MDinput>
...
@@ -76,24 +76,24 @@
...
@@ -76,24 +76,24 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
MDinput
from
'@/components/MDinput'
import
MDinput
from
'@/components/MDinput'
import
Sticky
from
'@/components/Sticky'
// 粘性header组件
import
Sticky
from
'@/components/Sticky'
// 粘性header组件
import
{
validateURL
}
from
'@/utils/validate'
import
{
validateURL
}
from
'@/utils/validate'
import
{
CreateAccount
,
fetchAccountDetail
,
}
from
'@/api/account'
import
{
CreateAccount
,
fetchAccountDetail
}
from
'@/api/account'
import
{
userSearch
}
from
'@/api/remoteSearch'
import
{
userSearch
}
from
'@/api/remoteSearch'
const
defaultForm
=
{
const
defaultForm
=
{
status
:
'draft'
,
status
:
'draft'
,
username
:
''
,
username
:
''
,
password
:
''
,
password
:
''
,
email
:
''
,
email
:
''
,
phone
:
''
,
phone
:
''
,
nick_name
:
''
nick_name
:
''
}
}
export
default
{
export
default
{
name
:
'GroupDetail'
,
name
:
'GroupDetail'
,
components
:
{
MDinput
,
Sticky
},
components
:
{
MDinput
,
Sticky
},
props
:
{
props
:
{
isEdit
:
{
isEdit
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
type
:
'error'
type
:
'error'
})
})
callback
(
new
Error
(
rule
.
field
+
'为必传项'
))
callback
(
new
Error
(
rule
.
field
+
'为必传项'
))
}
else
if
(
value
.
length
<
6
)
{
}
else
if
(
value
.
length
<
6
)
{
this
.
$message
({
this
.
$message
({
message
:
'密码不得少于6位'
,
message
:
'密码不得少于6位'
,
type
:
'error'
type
:
'error'
...
@@ -137,13 +137,13 @@
...
@@ -137,13 +137,13 @@
loading
:
false
,
loading
:
false
,
userListOptions
:
[],
userListOptions
:
[],
rules
:
{
rules
:
{
username
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
username
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
nick_name
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
nick_name
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
email
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
email
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
password
:
[{
validator
:
validatePasswordLength
,
trigger
:
'blur'
}],
password
:
[{
validator
:
validatePasswordLength
,
trigger
:
'blur'
}],
phone
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
phone
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}]
},
},
is_show
:
tru
e
isShow
:
fals
e
}
}
},
},
created
()
{
created
()
{
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
fetchData
(
id
)
{
fetchData
(
id
)
{
fetchAccountDetail
(
id
).
then
(
response
=>
{
fetchAccountDetail
(
id
).
then
(
response
=>
{
this
.
postForm
=
response
.
data
.
data
.
data
this
.
postForm
=
response
.
data
.
data
.
data
this
.
is_show
=
fals
e
this
.
isShow
=
tru
e
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
})
})
...
@@ -177,8 +177,8 @@
...
@@ -177,8 +177,8 @@
type
:
'error'
,
type
:
'error'
,
duration
:
2000
duration
:
2000
})
})
this
.
loading
=
false
;
this
.
loading
=
false
return
false
;
return
false
}
}
this
.
$notify
({
this
.
$notify
({
title
:
'成功'
,
title
:
'成功'
,
...
@@ -189,7 +189,6 @@
...
@@ -189,7 +189,6 @@
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$router
.
push
(
'/account/list'
)
this
.
$router
.
push
(
'/account/list'
)
},
1000
)
},
1000
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
'失败'
,
...
@@ -197,7 +196,7 @@
...
@@ -197,7 +196,7 @@
type
:
'danger'
,
type
:
'danger'
,
duration
:
2000
duration
:
2000
})
})
});
})
this
.
postForm
.
status
=
'published'
this
.
postForm
.
status
=
'published'
this
.
loading
=
false
this
.
loading
=
false
...
@@ -214,7 +213,7 @@
...
@@ -214,7 +213,7 @@
})
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment