mirror of
https://github.com/himool/HimoolERP.git
synced 2024-09-20 14:56:00 +08:00
feat: 调整
This commit is contained in:
parent
ca002f10d8
commit
ef53cbed70
|
@ -80,7 +80,7 @@ class UserSerializer(BaseSerializer):
|
|||
return instances
|
||||
|
||||
def create(self, validated_data):
|
||||
validated_data['password'] = make_password(validated_data['username'])
|
||||
validated_data['password'] = make_password('123456')
|
||||
return super().create(validated_data)
|
||||
|
||||
def save(self, **kwargs):
|
||||
|
|
|
@ -111,7 +111,7 @@ class UserViewSet(ModelViewSet):
|
|||
"""重置密码"""
|
||||
|
||||
instance = self.get_object()
|
||||
instance.password = make_password(self.user.username)
|
||||
instance.password = make_password('123456')
|
||||
instance.save(update_fields=['password'])
|
||||
|
||||
return Response(status=status.HTTP_200_OK)
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
<div slot="action" slot-scope="value, item">
|
||||
<a-button-group>
|
||||
<a-button icon="edit" size="small" @click="targetItem = {...item}; visible = true;">编辑</a-button>
|
||||
<a-popconfirm title="确定重置吗" @confirm="resetPassword(item.id)">
|
||||
<a-popconfirm title="确定重置吗? 密码: 123456" @confirm="resetPassword(item.id)">
|
||||
<a-button size="small" type="primary" icon="sync">重置密码</a-button>
|
||||
</a-popconfirm>
|
||||
<a-popconfirm title="确定删除吗" @confirm="destroy(item.id)">
|
||||
<a-popconfirm title="确定删除吗?" @confirm="destroy(item.id)">
|
||||
<a-button type="danger" icon="delete" size="small">删除</a-button>
|
||||
</a-popconfirm>
|
||||
</a-button-group>
|
||||
|
|
|
@ -38,6 +38,10 @@
|
|||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
|
||||
<div style="color: rgb(255, 77, 79); text-align: center;">
|
||||
默认初始密码为: 123456, 登录后请修改密码
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue