Commit ec81db90 by 温丽香

fixed账户

1 parent f473041e
Pipeline #4720 passed
in 2 minutes 10 seconds
Showing with 40 additions and 8 deletions
......@@ -63,6 +63,7 @@
<div slot="body" class="popup-body">
<st-form
label-width="90px"
style="height: 440px"
ref="form"
:model="form"
:rules="rules">
......@@ -92,6 +93,17 @@
<st-form-item v-if="submitType === 'edit'" :label="'新密码:'" prop="new_passwordd">
<st-input v-model="form.new_passwordd" type="password"></st-input>
</st-form-item>
<st-form-item
:label="'备注:'">
<st-input
type="textarea"
placeholder="请输入"
v-model="form.description"
maxlength="100"
show-word-limit
>
</st-input>
</st-form-item>
</st-form>
</div>
<div slot="footer" class="popup-footer flex right">
......@@ -141,7 +153,14 @@ export default {
},
{
label: '角色',
render: 'role'
render: row => {
switch (row.role) {
case 'operator': return '操作员'
case 'admin': return '管理员'
case 'watcher': return '观察员'
default: return ''
}
}
},
{
label: '邮箱',
......@@ -157,9 +176,7 @@ export default {
},
{
label: '备注',
render: () => {
return '-'
}
render: 'description'
},
{
label: '操作',
......@@ -206,9 +223,8 @@ export default {
switch (this.submitType) {
case 'create':
submitForm = JSON.parse(JSON.stringify(this.form))
delete submitForm.email
delete submitForm.confirmPwd
submitForm.creater = 'admin'
submitForm.creater = browserStorage.getItem('username')
res = await createUser(submitForm)
if (res && res.data && res.data.code === 0) {
this.getData()
......@@ -217,9 +233,8 @@ export default {
break
case 'edit':
submitForm = JSON.parse(JSON.stringify(this.form))
delete submitForm.email
delete submitForm.confirmPwd
submitForm.creater = 'admin'
submitForm.creater = browserStorage.getItem('username')
res = await editUser(submitForm)
if (res && res.data && res.data.code === 0) {
this.getData()
......@@ -270,6 +285,23 @@ export default {
</script>
<style lang="sass" scoped>
.update-dialog
::v-deep input
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
::v-deep.el-input__inner, ::v-deep.el-textarea, ::v-deep.el-textarea__inner
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color: #333
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
.popup-body
::v-deep.el-form-item
height: 32px
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!