From 15d3ec0ddde8e80ab49f4928ae29f69b1166787a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=8C=E5=85=88=E8=88=9C?= <2499071264@qq.com>
Date: Fri, 23 Oct 2026 14:36:43 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=99=E6=A0=A1=E5=B7=A5=E4=BC=9A?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=92=E8=89=B2=E6=97=B6=EF=BC=8C=E5=A6=82?=
=?UTF-8?q?=E6=9E=9C=E5=B7=B2=E7=BB=8F=E7=BB=99=E8=BF=99=E4=B8=AA=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E5=A2=9E=E5=8A=A0=E4=BA=86=EF=BC=8C=E5=86=8D=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E4=BC=9A=E6=8A=A5=E9=94=99=EF=BC=8C=E5=B9=B6=E4=B8=94?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=A0=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
分工会干部 加一个 编辑按钮, 只有超级管理员可以看到,另外添加这里的届次改为非必填
---
.../sys/controller/SysUnionController.java | 22 +++++++++
.../platform/sys/union/branchUnionManage.js | 2 +-
.../sys/union/branchUnionUserManage.js | 49 ++++++++++++++++---
.../views/platform/sys/union/index.html | 1 +
.../sys/union/schoolUnionUserManage.js | 6 ++-
5 files changed, 69 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/budwk/app/sys/controller/SysUnionController.java b/src/main/java/com/budwk/app/sys/controller/SysUnionController.java
index e6607b1..8782a3f 100644
--- a/src/main/java/com/budwk/app/sys/controller/SysUnionController.java
+++ b/src/main/java/com/budwk/app/sys/controller/SysUnionController.java
@@ -556,6 +556,28 @@ public class SysUnionController {
return Result.success();
}
+ @At
+ @ApiOperation("修改分工会干部届次")
+ @SaCheckPermission("sys.manager.union.branchOfficer")
+ public Result updateBranchUnionUserJ(String id, String j) {
+ if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) {
+ return Result.error("仅超级管理员可编辑");
+ }
+ if (StrUtil.isBlank(id)) {
+ return Result.error("请选择干部记录");
+ }
+ Sys_union_cadre unionCadre = dao.fetch(Sys_union_cadre.class, id);
+ if (Lang.isEmpty(unionCadre)) {
+ return Result.error("未找到对应干部记录");
+ }
+ if (StrUtil.isNotBlank(j) && sysDictService.getSubListByCode("TEACHER_CONGRESS_J").stream()
+ .noneMatch(item -> j.equals(item.getCode()))) {
+ return Result.error("请选择有效届次");
+ }
+ dao.update(Sys_union_cadre.class, Chain.make("j", StrUtil.isBlank(j) ? "" : j), Cnd.where("id", "=", id));
+ return Result.success();
+ }
+
@At
@ApiOperation("分工会干部离任")
@SaCheckPermission("sys.manager.union.branchOfficer")
diff --git a/src/main/resources/views/platform/sys/union/branchUnionManage.js b/src/main/resources/views/platform/sys/union/branchUnionManage.js
index 03b4bbb..295ea60 100644
--- a/src/main/resources/views/platform/sys/union/branchUnionManage.js
+++ b/src/main/resources/views/platform/sys/union/branchUnionManage.js
@@ -19,7 +19,7 @@ const branchUnionManage = {
-
+
编辑
删除
diff --git a/src/main/resources/views/platform/sys/union/branchUnionUserManage.js b/src/main/resources/views/platform/sys/union/branchUnionUserManage.js
index 2ee8ce8..0019131 100644
--- a/src/main/resources/views/platform/sys/union/branchUnionUserManage.js
+++ b/src/main/resources/views/platform/sys/union/branchUnionUserManage.js
@@ -50,15 +50,17 @@ const branchUnionUserManage = {
-
+
{{ row.jName || row.j }}
-
-
+
+
+ 编辑
确 定
+
+
+
+
+
+
+
+
@@ -147,6 +160,11 @@ const branchUnionUserManage = {
formData: {},
roleOptions: [],
partySecretaryUnitOptions: [],
+ editDialogVisible: false,
+ editForm: {
+ id: "",
+ j: ""
+ },
leaveDialogVisible: false,
leaveForm: {
id: "",
@@ -244,6 +262,25 @@ const branchUnionUserManage = {
this.formData = {}
})
},
+ openEdit(row) {
+ this.editForm = {
+ id: row.id,
+ j: row.j || ""
+ }
+ this.editDialogVisible = true
+ },
+ doEdit() {
+ $.post("/platform/sys/union/updateBranchUnionUserJ", this.editForm, (res) => {
+ if (res.code === 0) {
+ this.editDialogVisible = false
+ this.$message.success(res.msg)
+ this.loadUsedJCodes()
+ this.doSearch()
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
+ },
openLeave(row) {
this.leaveForm = {
id: row.id,
@@ -252,10 +289,6 @@ const branchUnionUserManage = {
this.leaveDialogVisible = true
},
doSubmit() {
- if (!this.formData.j) {
- this.$message.error("请选择届数")
- return
- }
if (this.isUnitPartySecretary() && (!this.formData.unitIds || this.formData.unitIds.length === 0)) {
this.$message.error("请选择所属单位")
return
diff --git a/src/main/resources/views/platform/sys/union/index.html b/src/main/resources/views/platform/sys/union/index.html
index 7c4de34..573822e 100644
--- a/src/main/resources/views/platform/sys/union/index.html
+++ b/src/main/resources/views/platform/sys/union/index.html
@@ -164,6 +164,7 @@ layout("/layouts/platform.html"){
new Vue({
el: "#app",
+ store,
components: {
"sys-union-branch-union-manage": branchUnionManage,
"sys-union-school-union-user-manage": schoolUnionUserManage,
diff --git a/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js b/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js
index c8e05d1..eefaf9c 100644
--- a/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js
+++ b/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js
@@ -32,7 +32,7 @@ const schoolUnionUserManage = {
-
+
@@ -74,11 +74,13 @@ const schoolUnionUserManage = {
})
},
doSubmit() {
- $.post("/platform/sys/union/insertSchoolUnionUserRole", this.formData).then((res) => {
+ $.post("/platform/sys/union/insertSchoolUnionUserRole", this.formData, (res) => {
if (res.code === 0) {
this.dialogFormVisible = false
this.$message.success(res.msg)
this.doSearch()
+ } else {
+ this.$message.error(res.msg)
}
})
},