From 3a9f56f04b7d4f2411d13b2b94be635909bbf41b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Apr 2025 15:35:58 +0800 Subject: [PATCH 01/10] update status name --- .../src/main/java/com/ruoyi/system/api/domain/SysUser.java | 5 +++-- sql/{ry_20240629.sql => ry_20250417.sql} | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) rename sql/{ry_20240629.sql => ry_20250417.sql} (99%) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java index 6f8a5574..85179888 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java @@ -56,8 +56,8 @@ public class SysUser extends BaseEntity /** 密码 */ private String password; - /** 帐号状态(0正常 1停用) */ - @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用") + /** 账号状态(0正常 1停用) */ + @Excel(name = "账号状态", readConverterExp = "0=正常,1=停用") private String status; /** 删除标志(0代表存在 2代表删除) */ @@ -297,6 +297,7 @@ public class SysUser extends BaseEntity { this.roleId = roleId; } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/sql/ry_20240629.sql b/sql/ry_20250417.sql similarity index 99% rename from sql/ry_20240629.sql rename to sql/ry_20250417.sql index a9b89d48..90f3d3a4 100644 --- a/sql/ry_20240629.sql +++ b/sql/ry_20250417.sql @@ -52,7 +52,7 @@ create table sys_user ( sex char(1) default '0' comment '用户性别(0男 1女 2未知)', avatar varchar(100) default '' comment '头像地址', password varchar(100) default '' comment '密码', - status char(1) default '0' comment '帐号状态(0正常 1停用)', + status char(1) default '0' comment '账号状态(0正常 1停用)', del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', login_ip varchar(128) default '' comment '最后登录IP', login_date datetime comment '最后登录时间', From 90922844ea9d710a787c1c4aa8521dd4d8651a11 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Apr 2025 15:36:18 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E4=B8=8D=E5=85=81=E8=AE=B8=E5=88=86=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/system/user/authRole.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/system/user/authRole.vue b/ruoyi-ui/src/views/system/user/authRole.vue index aeb42225..efbda653 100644 --- a/ruoyi-ui/src/views/system/user/authRole.vue +++ b/ruoyi-ui/src/views/system/user/authRole.vue @@ -10,7 +10,7 @@ - + @@ -20,10 +20,10 @@ - + @@ -52,14 +52,14 @@ export default { name: "AuthRole", data() { return { - // 遮罩层 + // 遮罩层 loading: true, // 分页信息 total: 0, pageNum: 1, pageSize: 10, // 选中角色编号 - roleIds:[], + roleIds: [], // 角色信息 roles: [], // 用户信息 @@ -88,7 +88,9 @@ export default { methods: { /** 单击选中行数据 */ clickRow(row) { - this.$refs.table.toggleRowSelection(row); + if (this.checkSelectable(row)) { + this.$refs.table.toggleRowSelection(row); + } }, // 多选框选中数据 handleSelectionChange(selection) { @@ -98,6 +100,10 @@ export default { getRowKey(row) { return row.roleId; }, + // 检查角色状态 + checkSelectable(row) { + return row.status === "0" ? true : false; + }, /** 提交按钮 */ submitForm() { const userId = this.form.userId; From bbd112d5a31d39a144518f436580bba688e3418a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 18 Apr 2025 13:25:28 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=87=E4=BB=B6&?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=BB=84=E4=BB=B6=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=9C=B0=E5=9D=80&=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/FileUpload/index.vue | 14 ++++++++++++-- ruoyi-ui/src/components/ImageUpload/index.vue | 12 +++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue index 03c3d55b..7b4fe120 100644 --- a/ruoyi-ui/src/components/FileUpload/index.vue +++ b/ruoyi-ui/src/components/FileUpload/index.vue @@ -5,6 +5,7 @@ :action="uploadFileUrl" :before-upload="handleBeforeUpload" :file-list="fileList" + :data="data" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed" @@ -48,6 +49,15 @@ export default { props: { // 值 value: [String, Object, Array], + // 上传接口地址 + action: { + type: String, + default: "/file/upload" + }, + // 上传携带的参数 + data: { + type: Object + }, // 数量限制 limit: { type: Number, @@ -78,7 +88,7 @@ export default { return { number: 0, uploadList: [], - uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/upload", // 上传文件服务器地址 + uploadFileUrl: process.env.VUE_APP_BASE_API + this.action, // 上传文件服务器地址 headers: { Authorization: "Bearer " + getToken(), }, @@ -152,7 +162,7 @@ export default { // 上传失败 handleUploadError(err) { this.$modal.msgError("上传文件失败,请重试"); - this.$modal.closeLoading() + this.$modal.closeLoading(); }, // 上传成功回调 handleUploadSuccess(res, file) { diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue index 7da56eb0..4966c654 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -6,6 +6,7 @@ list-type="picture-card" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload" + :data="data" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed" @@ -48,6 +49,15 @@ import { getToken } from "@/utils/auth"; export default { props: { value: [String, Object, Array], + // 上传接口地址 + action: { + type: String, + default: "/file/upload" + }, + // 上传携带的参数 + data: { + type: Object + }, // 图片数量限制 limit: { type: Number, @@ -76,7 +86,7 @@ export default { dialogImageUrl: "", dialogVisible: false, hideUpload: false, - uploadImgUrl: process.env.VUE_APP_BASE_API + "/file/upload", // 上传的图片服务器地址 + uploadImgUrl: process.env.VUE_APP_BASE_API + this.action, // 上传的图片服务器地址 headers: { Authorization: "Bearer " + getToken(), }, From 60e2d55a2304ed7b973ed7a9bd40f3a6fb242585 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 21 Apr 2025 13:28:32 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9F=A5=E8=AF=A2=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/HeaderSearch/index.vue | 143 +++++++++++------- 1 file changed, 89 insertions(+), 54 deletions(-) diff --git a/ruoyi-ui/src/components/HeaderSearch/index.vue b/ruoyi-ui/src/components/HeaderSearch/index.vue index d5cbf93d..88871efe 100644 --- a/ruoyi-ui/src/components/HeaderSearch/index.vue +++ b/ruoyi-ui/src/components/HeaderSearch/index.vue @@ -1,25 +1,44 @@ - + From d4af286f414b44d5ff627f9a14492c90506f6c48 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 21 Apr 2025 15:30:32 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=98=BE=E9=9A=90=E5=88=97=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=94=AF=E6=8C=81=E5=85=A8=E9=80=89/=E5=85=A8?= =?UTF-8?q?=E4=B8=8D=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/RightToolbar/index.vue | 41 +++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/ruoyi-ui/src/components/RightToolbar/index.vue index 67da2930..8ecf5fb3 100644 --- a/ruoyi-ui/src/components/RightToolbar/index.vue +++ b/ruoyi-ui/src/components/RightToolbar/index.vue @@ -12,9 +12,14 @@ + + + 列展示 + +
@@ -41,33 +46,33 @@ export default { // 弹出层标题 title: "显示/隐藏", // 是否显示弹出层 - open: false, + open: false }; }, props: { /* 是否显示检索条件 */ showSearch: { type: Boolean, - default: true, + default: true }, /* 显隐列信息 */ columns: { - type: Array, + type: Array }, /* 是否显示检索图标 */ search: { type: Boolean, - default: true, + default: true }, /* 显隐列类型(transfer穿梭框、checkbox复选框) */ showColumnsType: { type: String, - default: "checkbox", + default: "checkbox" }, /* 右外边距 */ gutter: { type: Number, - default: 10, + default: 10 }, }, computed: { @@ -77,6 +82,15 @@ export default { ret.marginRight = `${this.gutter / 2}px`; } return ret; + }, + isChecked: { + get() { + return this.columns.every((col) => col.visible); + }, + set() {} + }, + isIndeterminate() { + return this.columns.some((col) => col.visible) && !this.isChecked; } }, created() { @@ -109,9 +123,14 @@ export default { showColumn() { this.open = true; }, - // 勾选 + // 单勾选 checkboxChange(event, label) { this.columns.filter(item => item.label == label)[0].visible = event; + }, + // 切换全选/反选 + toggleCheckAll() { + const newValue = !this.isChecked; + this.columns.forEach((col) => (col.visible = newValue)) } }, }; @@ -126,4 +145,10 @@ export default { ::v-deep .el-transfer__button:first-child { margin-bottom: 10px; } +.check-line { + width: 90%; + height: 1px; + background-color: #ccc; + margin: 3px auto; +} From e29284e68790c120a31666f47058b0ed0d5ad7aa Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 22 Apr 2025 12:06:59 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/sidebar.scss | 2 +- ruoyi-ui/src/components/HeaderSearch/index.vue | 1 + ruoyi-ui/src/components/TopNav/index.vue | 2 +- ruoyi-ui/src/views/login.vue | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/sidebar.scss b/ruoyi-ui/src/assets/styles/sidebar.scss index 9f390460..f1c821f1 100644 --- a/ruoyi-ui/src/assets/styles/sidebar.scss +++ b/ruoyi-ui/src/assets/styles/sidebar.scss @@ -25,7 +25,7 @@ z-index: 1001; overflow: hidden; -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35); - box-shadow: 2px 0 6px rgba(0,21,41,.35); + box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1); // reset element-ui css .horizontal-collapse-transition { diff --git a/ruoyi-ui/src/components/HeaderSearch/index.vue b/ruoyi-ui/src/components/HeaderSearch/index.vue index 88871efe..da6dfea2 100644 --- a/ruoyi-ui/src/components/HeaderSearch/index.vue +++ b/ruoyi-ui/src/components/HeaderSearch/index.vue @@ -15,6 +15,7 @@ @input="querySearch" prefix-icon="Search" placeholder="菜单搜索,支持标题、URL模糊查询" + clearable > diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index e27a12f6..6a5aff02 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -57,7 +57,7 @@ export default { this.routers.map((menu) => { if (menu.hidden !== true) { // 兼容顶部栏一级菜单内部跳转 - if (menu.path === "/") { + if (menu.path === '/' && menu.children) { topMenus.push(menu.children[0]); } else { topMenus.push(menu); diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index 5185371a..b4a03728 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -176,6 +176,7 @@ export default { background: #ffffff; width: 400px; padding: 25px 25px 5px 25px; + z-index: 1; .el-input { height: 38px; input { From 189100f74e26bf25fc81f95a6a7ab8c2e99f6d70 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 22 Apr 2025 12:07:07 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=8E=E7=89=88?= =?UTF-8?q?=E6=9C=ACnode=E6=97=A0=E6=B3=95=E5=90=AF=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index c9de4a15..fc99314c 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -5,9 +5,9 @@ "author": "若依", "license": "MIT", "scripts": { - "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", + "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", + "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", + "build:stage": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src" }, From 02de344d8c3638bddc9cab067c4325e21e26e25d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 24 Apr 2025 18:18:44 +0800 Subject: [PATCH 08/10] update package.json --- ruoyi-ui/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index fc99314c..c9de4a15 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -5,9 +5,9 @@ "author": "若依", "license": "MIT", "scripts": { - "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", - "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", - "build:stage": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode staging", + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src" }, From 1a0f37a2dc03bfdecb209c24b4694b486ac2a8c5 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 24 Apr 2025 18:19:16 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E7=B2=98=E8=B4=B4=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=87=B3url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Editor/index.vue | 27 ++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index b0487ff0..66209ff3 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -18,6 +18,7 @@