Skip to content

Commit 08d30e7

Browse files
author
奇淼(piexlmax
authored
Merge pull request #905 from flipped-aurora/person-dev
public:让用户对信息修改更加全面和简便——v2.5.0 beta2
2 parents 887ddae + c9e734f commit 08d30e7

File tree

35 files changed

+372
-217
lines changed

35 files changed

+372
-217
lines changed

server/api/v1/system/sys_user.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ func (b *BaseApi) SetUserInfo(c *gin.Context) {
275275
var user system.SysUser
276276
_ = c.ShouldBindJSON(&user)
277277
user.Username = ""
278+
user.Password = ""
279+
user.AuthorityId = ""
278280
if err := utils.Verify(user, utils.IdVerify); err != nil {
279281
response.FailWithMessage(err.Error(), c)
280282
return
@@ -299,6 +301,8 @@ func (b *BaseApi) SetSelfInfo(c *gin.Context) {
299301
var user system.SysUser
300302
_ = c.ShouldBindJSON(&user)
301303
user.Username = ""
304+
user.Password = ""
305+
user.AuthorityId = ""
302306
user.ID = utils.GetUserID(c)
303307
if err, ReqUser := userService.SetUserInfo(user); err != nil {
304308
global.GVA_LOG.Error("设置失败!", zap.Error(err))

server/core/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func RunWindowsServer() {
3838

3939
fmt.Printf(`
4040
欢迎使用 github.com/flipped-aurora/gin-vue-admin/server
41-
当前版本:V2.5.0 beta
41+
当前版本:V2.5.0 beta.2
4242
加群方式:微信号:shouzi_1994 QQ群:622360840
4343
GVA讨论社区:https://support.qq.com/products/371961
4444
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html

server/model/system/sys_user.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ type SysUser struct {
1818
AuthorityId string `json:"authorityId" gorm:"default:888;comment:用户角色ID"` // 用户角色ID
1919
Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"`
2020
Authorities []SysAuthority `json:"authorities" gorm:"many2many:sys_user_authority;"`
21+
Phone string `json:"phone" gorm:"comment:用户手机号"` // 用户角色ID
22+
Email string `json:"email" gorm:"comment:用户邮箱"` // 用户邮箱
2123
}

server/resource/template/web/table.vue.tpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@
2222
<el-input v-model="searchInfo.{{.FieldJson}}" placeholder="搜索条件" />
2323
</el-form-item>{{ end }}{{ end }}{{ end }}
2424
<el-form-item>
25-
<el-button size="mini" type="primary" icon="search" @click="onSubmit">查询</el-button>
26-
<el-button size="mini" icon="refresh" @click="onReset">重置</el-button>
25+
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
26+
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
2727
</el-form-item>
2828
</el-form>
2929
</div>
3030
<div class="gva-table-box">
3131
<div class="gva-btn-list">
32-
<el-button size="mini" type="primary" icon="plus" @click="openDialog">新增</el-button>
32+
<el-button size="small" type="primary" icon="plus" @click="openDialog">新增</el-button>
3333
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
3434
<p>确定要删除吗?</p>
3535
<div style="text-align: right; margin-top: 8px;">
36-
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
37-
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
36+
<el-button size="small" type="text" @click="deleteVisible = false">取消</el-button>
37+
<el-button size="small" type="primary" @click="onDelete">确定</el-button>
3838
</div>
3939
<template #reference>
40-
<el-button icon="delete" size="mini" style="margin-left: 10px;" :disabled="!multipleSelection.length">删除</el-button>
40+
<el-button icon="delete" size="small" style="margin-left: 10px;" :disabled="!multipleSelection.length">删除</el-button>
4141
</template>
4242
</el-popover>
4343
</div>
@@ -70,7 +70,7 @@
7070
<el-table-column align="left" label="按钮组">
7171
<template #default="scope">
7272
<el-button type="text" icon="edit" size="small" class="table-button" @click="update{{.StructName}}Func(scope.row)">变更</el-button>
73-
<el-button type="text" icon="delete" size="mini" @click="deleteRow(scope.row)">删除</el-button>
73+
<el-button type="text" icon="delete" size="small" @click="deleteRow(scope.row)">删除</el-button>
7474
</template>
7575
</el-table-column>
7676
</el-table>

server/source/system/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ func (a *api) Initialize() error {
2222
{ApiGroup: "jwt", Method: "POST", Path: "/jwt/jsonInBlacklist", Description: "jwt加入黑名单(退出,必选)"},
2323

2424
{ApiGroup: "系统用户", Method: "DELETE", Path: "/user/deleteUser", Description: "删除用户"},
25-
{ApiGroup: "系统用户", Method: "POST", Path: "/user/register", Description: "用户注册(必选)"},
25+
{ApiGroup: "系统用户", Method: "POST", Path: "/user/register", Description: "用户注册"},
2626
{ApiGroup: "系统用户", Method: "POST", Path: "/user/getUserList", Description: "获取用户列表"},
2727
{ApiGroup: "系统用户", Method: "PUT", Path: "/user/setUserInfo", Description: "设置用户信息"},
2828
{ApiGroup: "系统用户", Method: "PUT", Path: "/user/setSelfInfo", Description: "设置自身信息(必选)"},
2929
{ApiGroup: "系统用户", Method: "GET", Path: "/user/getUserInfo", Description: "获取自身信息(必选)"},
3030
{ApiGroup: "系统用户", Method: "POST", Path: "/user/setUserAuthorities", Description: "设置权限组"},
31-
{ApiGroup: "系统用户", Method: "POST", Path: "/user/changePassword", Description: "修改密码(建(选择)"},
31+
{ApiGroup: "系统用户", Method: "POST", Path: "/user/changePassword", Description: "修改密码(建议选择)"},
3232
{ApiGroup: "系统用户", Method: "POST", Path: "/user/setUserAuthority", Description: "修改用户角色(必选)"},
3333
{ApiGroup: "系统用户", Method: "POST", Path: "/user/resetPassword", Description: "重置用户密码"},
3434

server/source/system/user.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func (u *user) TableName() string {
1818

1919
func (u *user) Initialize() error {
2020
entities := []system.SysUser{
21-
{UUID: uuid.NewV4(), Username: "admin", Password: "e10adc3949ba59abbe56e057f20f883e", NickName: "超级管理员", HeaderImg: "https://qmplusimg.henrongyi.top/gva_header.jpg", AuthorityId: "888"},
22-
{UUID: uuid.NewV4(), Username: "a303176530", Password: "3ec063004a6f31642261936a379fde3d", NickName: "QMPlusUser", HeaderImg: "https:///qmplusimg.henrongyi.top/1572075907logo.png", AuthorityId: "9528"},
21+
{UUID: uuid.NewV4(), Username: "admin", Password: "e10adc3949ba59abbe56e057f20f883e", NickName: "超级管理员", HeaderImg: "https://qmplusimg.henrongyi.top/gva_header.jpg", AuthorityId: "888", Phone: "17611111111", Email: "[email protected]"},
22+
{UUID: uuid.NewV4(), Username: "a303176530", Password: "3ec063004a6f31642261936a379fde3d", NickName: "QMPlusUser", HeaderImg: "https:///qmplusimg.henrongyi.top/1572075907logo.png", AuthorityId: "9528", Phone: "17611111111", Email: "[email protected]"},
2323
}
2424
if err := global.GVA_DB.Create(&entities).Error; err != nil {
2525
return errors.Wrap(err, u.TableName()+"表数据初始化失败!")

web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit"
1111
},
1212
"dependencies": {
13-
"@element-plus/icons": "0.0.11",
13+
"@element-plus/icons-vue": "^0.2.7",
1414
"axios": "^0.19.2",
1515
"core-js": "^3.6.5",
1616
"echarts": "4.9.0",
17-
"element-plus": "1.2.0-beta.6",
17+
"element-plus": "2.0.1",
1818
"highlight.js": "^10.6.0",
1919
"marked": "^2.0.0",
2020
"mitt": "^3.0.0",

web/src/components/upload/image.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
:before-upload="beforeImageUpload"
1010
:multiple="false"
1111
>
12-
<el-button size="mini" type="primary">压缩上传</el-button>
12+
<el-button size="small" type="primary">压缩上传</el-button>
1313
</el-upload>
1414
</div>
1515
</template>

web/src/components/warningBar/warningBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</div>
1212
</template>
1313
<script setup>
14-
import { WarningFilled } from '@element-plus/icons'
14+
import { WarningFilled } from '@element-plus/icons-vue'
1515
defineProps({
1616
title: {
1717
type: String,

web/src/core/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const viteLogo = (env) => {
1818
)
1919
console.log(
2020
chalk.green(
21-
`> 当前版本:V2.5.0`
21+
`> 当前版本:V2.5.0 beta.2`
2222
)
2323
)
2424
console.log(

0 commit comments

Comments
 (0)