Skip to content

Commit 08d30e7

Browse files
author
奇淼(piexlmax
authored
Merge pull request flipped-aurora#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: "333333333@qq.com"},
22+
{UUID: uuid.NewV4(), Username: "a303176530", Password: "3ec063004a6f31642261936a379fde3d", NickName: "QMPlusUser", HeaderImg: "https:///qmplusimg.henrongyi.top/1572075907logo.png", AuthorityId: "9528", Phone: "17611111111", Email: "333333333@qq.com"},
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(

web/src/core/gin-vue-admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
register(app)
1111
console.log(`
1212
欢迎使用 Gin-Vue-Admin
13-
当前版本:V2.5.0 beta
13+
当前版本:V2.5.0 beta.2
1414
加群方式:微信:shouzi_1994 QQ群:622360840
1515
GVA讨论社区:https://support.qq.com/products/371961
1616
默认自动化文档地址:http://127.0.0.1:${import.meta.env.VITE_SERVER_PORT}/swagger/index.html

web/src/core/global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import config from './config'
22
import { emitter } from '@/utils/bus.js'
33

44
// 统一导入el-icon图标
5-
import * as ElIconModules from '@element-plus/icons'
5+
import * as ElIconModules from '@element-plus/icons-vue'
66
// 导入转换图标名称的函数
77

88
export const closeThisPage = () => {

web/src/style/element_visiable.scss

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,19 @@
6868
background-color: #fff;
6969
border-radius: 2px;
7070
margin-bottom: 12px;
71-
.el-form {
72-
.el-form-item {
73-
padding-right: 28px;
74-
}
71+
}
72+
73+
.el-form--inline{
74+
.el-form-item{
75+
margin-right: 24px;
7576
}
7677
}
7778

79+
.el-input__inner{
80+
height: 40px;
81+
line-height: 40px;
82+
}
83+
7884
.gva-form-box {
7985
padding: 24px;
8086
background-color: #fff;
@@ -145,8 +151,13 @@
145151
}
146152
}
147153

148-
.el-button--mini {
154+
.el-button--small {
149155
min-height: 32px;
156+
font-size: 12px !important;
157+
}
158+
159+
.el-checkbox{
160+
height: auto;
150161
}
151162

152163
.el-button {

web/src/style/main.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,10 +971,10 @@ li {
971971
.el-input-number__increase {
972972
position: absolute;
973973
z-index: 1;
974-
top: 3px !important;
974+
top: 2px !important;
975975
width: 42px;
976-
height: 29px;
977-
line-height: 29px;
976+
height: 28px;
977+
line-height: 28px;
978978
text-align: center;
979979
background: #F5F7FA;
980980
color: #606266;

web/src/style/newLogin.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
position: relative;
99
.input-icon{
1010
padding-right: 6px;
11-
padding-top: 2px;
11+
padding-top: 4px;
1212
}
1313
.login_panle {
1414
position: absolute;
@@ -48,15 +48,18 @@
4848
padding-left: 20px;
4949
}
5050
}
51+
.vPicBox{
52+
display:flex;
53+
justify-content:space-between;
54+
width:100%;
55+
}
5156
.vPic {
5257
width: 33%;
5358
height: 38px;
54-
float: right !important;
5559
background: #ccc;
5660
img {
5761
width: 100%;
5862
height: 100%;
59-
cursor: pointer;
6063
vertical-align: middle;
6164
}
6265
}

web/src/view/example/breakpoint/breakpoint.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<input v-show="false" id="file" ref="FileInput" multiple="multiple" type="file" @change="choseFile">
99
</div>
1010
</form>
11-
<el-button :disabled="limitFileSize" type="primary" size="mini" class="uploadBtn" @click="getFile">上传文件</el-button>
11+
<el-button :disabled="limitFileSize" type="primary" size="small" class="uploadBtn" @click="getFile">上传文件</el-button>
1212
<div class="el-upload__tip">请上传不超过5MB的文件</div>
1313
<div class="list">
1414
<transition name="list" tag="p">

web/src/view/example/customer/customer.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<warning-bar title="在资源权限中将此角色的资源权限清空 或者不包含创建者的角色 即可屏蔽此客户资源的显示" />
44
<div class="gva-table-box">
55
<div class="gva-btn-list">
6-
<el-button size="mini" type="primary" icon="plus" @click="openDialog">新增</el-button>
6+
<el-button size="small" type="primary" icon="plus" @click="openDialog">新增</el-button>
77
</div>
88
<el-table
99
ref="multipleTable"
@@ -27,11 +27,11 @@
2727
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
2828
<p>确定要删除吗?</p>
2929
<div style="text-align: right; margin-top: 8px;">
30-
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
31-
<el-button type="primary" size="mini" @click="deleteCustomer(scope.row)">确定</el-button>
30+
<el-button size="small" type="text" @click="scope.row.visible = false">取消</el-button>
31+
<el-button type="primary" size="small" @click="deleteCustomer(scope.row)">确定</el-button>
3232
</div>
3333
<template #reference>
34-
<el-button type="text" icon="delete" size="mini">删除</el-button>
34+
<el-button type="text" icon="delete" size="small" @click="scope.row.visible = true">删除</el-button>
3535
</template>
3636
</el-popover>
3737
</template>

web/src/view/example/excel/excel.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
:on-success="loadExcel"
1111
:show-file-list="false"
1212
>
13-
<el-button size="mini" type="primary" icon="upload">导入</el-button>
13+
<el-button size="small" type="primary" icon="upload">导入</el-button>
1414
</el-upload>
15-
<el-button class="excel-btn" size="mini" type="primary" icon="download" @click="handleExcelExport('ExcelExport.xlsx')">导出</el-button>
16-
<el-button class="excel-btn" size="mini" type="success" icon="download" @click="downloadExcelTemplate()">下载模板</el-button>
15+
<el-button class="excel-btn" size="small" type="primary" icon="download" @click="handleExcelExport('ExcelExport.xlsx')">导出</el-button>
16+
<el-button class="excel-btn" size="small" type="success" icon="download" @click="downloadExcelTemplate()">下载模板</el-button>
1717
</div>
1818
<el-table :data="tableData" row-key="ID">
1919
<el-table-column align="left" label="ID" min-width="100" prop="ID" />

web/src/view/example/upload/upload.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
:show-file-list="false"
1212
class="upload-btn"
1313
>
14-
<el-button size="mini" type="primary">普通上传</el-button>
14+
<el-button size="small" type="primary">普通上传</el-button>
1515
</el-upload>
1616
<upload-image
1717
v-model:imageUrl="imageUrl"

web/src/view/login/index.vue

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,29 +48,33 @@
4848
</template>
4949
</el-input>
5050
</el-form-item>
51-
<el-form-item style="position: relative" prop="captcha">
52-
<el-input
53-
v-model="loginFormData.captcha"
54-
placeholder="请输入验证码"
55-
style="width: 60%"
56-
/>
57-
<div class="vPic">
58-
<img
59-
v-if="picPath"
60-
:src="picPath"
61-
alt="请输入验证码"
62-
@click="loginVerify()"
63-
>
51+
<el-form-item prop="captcha">
52+
<div class="vPicBox">
53+
<el-input
54+
v-model="loginFormData.captcha"
55+
placeholder="请输入验证码"
56+
style="width: 60%"
57+
/>
58+
<div class="vPic">
59+
<img
60+
v-if="picPath"
61+
:src="picPath"
62+
alt="请输入验证码"
63+
@click="loginVerify()"
64+
>
65+
</div>
6466
</div>
6567
</el-form-item>
6668
<el-form-item>
6769
<el-button
6870
type="primary"
6971
style="width: 46%"
72+
size="large"
7073
@click="checkInit"
7174
>前往初始化</el-button>
7275
<el-button
7376
type="primary"
77+
size="large"
7478
style="width: 46%; margin-left: 8%"
7579
@click="submitForm"
7680
>登 录</el-button>

0 commit comments

Comments
 (0)