From f447cef661930e3c4a56e54447a621a34f970900 Mon Sep 17 00:00:00 2001 From: Paidax Date: Mon, 22 Dec 2025 17:05:38 +0800 Subject: [PATCH] =?UTF-8?q?pref=5F#jshvc=E5=8D=95=E4=BD=8D=E3=80=81?= =?UTF-8?q?=E6=8F=90=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/sys/controller/SysUnitController.java | 2 +- .../common/ProposalCommonController.java | 8 +- .../senior/ProposalSeniorBasicController.java | 8 +- .../TeacherCongressSessionServiceImpl.java | 312 +++++++++--------- .../views/platform/sys/unit/index.html | 112 +++++-- .../views/platform/sys/unit/unitManage.js | 91 ++--- .../proposal/query/comprehensive/index.html | 4 +- .../proposal/query/yearReport/index.html | 2 +- .../proposal/senior/basic/index.html | 53 +-- .../proposal/transact/feedback/index.html | 12 - .../proposal/transact/mine/index.html | 3 + .../zhghh5/democratic/proposal/common/info.js | 4 +- .../proposal/transact/mine/index.html | 2 +- .../proposal/transact/unitReply/index.html | 2 +- .../proposal/transact/write/index.html | 2 +- 15 files changed, 348 insertions(+), 269 deletions(-) diff --git a/src/main/java/com/budwk/app/sys/controller/SysUnitController.java b/src/main/java/com/budwk/app/sys/controller/SysUnitController.java index 04c2ba3..d923ccf 100644 --- a/src/main/java/com/budwk/app/sys/controller/SysUnitController.java +++ b/src/main/java/com/budwk/app/sys/controller/SysUnitController.java @@ -300,7 +300,7 @@ public class SysUnitController { ) )); } - List> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "0000")); + List> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "0")); // NutMap menuMap = NutMap.NEW(); // for (Sys_unit unit : list) { diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/common/ProposalCommonController.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/common/ProposalCommonController.java index 060f3fe..7e6cac3 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/common/ProposalCommonController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/common/ProposalCommonController.java @@ -2,6 +2,7 @@ package com.budwk.app.zhgh.democratic.proposal.controller.common; import cn.dev33.satoken.annotation.SaCheckLogin; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.util.StrUtil; import com.budwk.app.base.result.Result; import com.budwk.app.zhgh.democratic.proposal.models.ProposalConfig; import com.budwk.app.zhgh.democratic.proposal.models.ProposalType; @@ -49,8 +50,11 @@ public class ProposalCommonController { @At @SaCheckLogin @ApiOperation("查询全部的教代会") - public Result listSession() { - List list = dao.query(Teacher_congress_session.class, Cnd.NEW().asc("startDate")); + public Result listSession(String orderBy) { + if (StrUtil.isBlank(orderBy)) { + orderBy = "desc"; + } + List list = dao.query(Teacher_congress_session.class, Cnd.NEW().orderBy("startDate", orderBy)); return Result.success(list); } diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/senior/ProposalSeniorBasicController.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/senior/ProposalSeniorBasicController.java index 9500816..abe824c 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/senior/ProposalSeniorBasicController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/controller/senior/ProposalSeniorBasicController.java @@ -89,7 +89,13 @@ public class ProposalSeniorBasicController { @ApiOperation(value = "提案内容修改") @Aop(TransAop.READ_COMMITTED) public Result update(@Valid @Param("info") ProposalInfo proposalInfo) { - dao.update(proposalInfo,"^name|typeId|brief|measures|excerpt|suggestUnits$"); + int count = dao.count(ProposalInfo.class, Cnd.where("code", "=", proposalInfo.getCode()).and("id", "<>", proposalInfo.getId())); + + if (count > 0) { + return Result.error("提案编号已存在"); + } + + dao.update(proposalInfo,"^code|name|typeId|brief|measures|excerpt|suggestUnits|files$"); return Result.success(); } diff --git a/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/service/impl/TeacherCongressSessionServiceImpl.java b/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/service/impl/TeacherCongressSessionServiceImpl.java index b5d177b..a0ec55a 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/service/impl/TeacherCongressSessionServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/service/impl/TeacherCongressSessionServiceImpl.java @@ -67,174 +67,176 @@ public class TeacherCongressSessionServiceImpl extends BaseServiceImpl lastInstitutions = dao().query(Teacher_congress_institution.class, Cnd.where(Teacher_congress_institution::getSessionId, "=", lastSession.getId())); - List> treeNodes = lastInstitutions.stream().map(institution -> new TreeNode<>(institution.getId(), institution.getParentId(), institution.getName(), institution.getLocation()).setExtra(Map.of("code", institution.getCode(), "sessionId", institution.getSessionId()))).toList(); - List> treeList = TreeUtil.build(treeNodes, "0"); - insertInstitution(session.getId(), "0", treeList); + if (ObjectUtil.isEmpty(lastSession)) return; - //从代表团入手 - List lastDelegations = dao().query(Teacher_congress_delegation.class, Cnd.where("sessionId", "=", lastSession.getId())); - for (Teacher_congress_delegation lastDelegation : lastDelegations) { - //代表团继承 - Teacher_congress_delegation newDelegation = BeanUtil.copyProperties(lastDelegation, Teacher_congress_delegation.class); - newDelegation.setId(null); - newDelegation.setSessionId(session.getId()); - dao().insert(newDelegation); + //机构及机构人员数据 + List lastInstitutions = dao().query(Teacher_congress_institution.class, Cnd.where(Teacher_congress_institution::getSessionId, "=", lastSession.getId())); + List> treeNodes = lastInstitutions.stream().map(institution -> new TreeNode<>(institution.getId(), institution.getParentId(), institution.getName(), institution.getLocation()).setExtra(Map.of("code", institution.getCode(), "sessionId", institution.getSessionId()))).toList(); + List> treeList = TreeUtil.build(treeNodes, "0"); + insertInstitution(session.getId(), "0", treeList); - //团长角色权限继承 - List lastHeadUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId()) - .and(Sys_user_role::getRoleId, "=", delegationHeadRole.getId())); - for (Sys_user_role lastHeadUser : lastHeadUserRoles) { - Sys_user_role newHeadUser = BeanUtil.copyProperties(lastHeadUser, Sys_user_role.class); - newHeadUser.setTcDelegationId(newDelegation.getId()); - newHeadUser.setTcSessionId(session.getId()); - dao().insert(newHeadUser); - } - //副团长角色权限继承 - List lastViceHeadUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId()) - .and(Sys_user_role::getRoleId, "=", delegationViceHeadRole.getId())); - for (Sys_user_role lastViceHeadUser : lastViceHeadUserRoles) { - Sys_user_role newViceHeadUser = BeanUtil.copyProperties(lastViceHeadUser, Sys_user_role.class); - newViceHeadUser.setTcDelegationId(newDelegation.getId()); - newViceHeadUser.setTcSessionId(session.getId()); - dao().insert(newViceHeadUser); - } - //联络人角色权限继承 - List lastContactUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId()) - .and(Sys_user_role::getRoleId, "=", delegationContactRole.getId())); - for (Sys_user_role lastContactUser : lastContactUserRoles) { - Sys_user_role newContactUser = BeanUtil.copyProperties(lastContactUser, Sys_user_role.class); - newContactUser.setTcDelegationId(newDelegation.getId()); - newContactUser.setTcSessionId(session.getId()); - dao().insert(newContactUser); - } + //从代表团入手 + List lastDelegations = dao().query(Teacher_congress_delegation.class, Cnd.where("sessionId", "=", lastSession.getId())); + for (Teacher_congress_delegation lastDelegation : lastDelegations) { + //代表团继承 + Teacher_congress_delegation newDelegation = BeanUtil.copyProperties(lastDelegation, Teacher_congress_delegation.class); + newDelegation.setId(null); + newDelegation.setSessionId(session.getId()); + dao().insert(newDelegation); - //组成分工会 - List lastDelegationUnions = dao().query(Teacher_congress_delegation_union.class, Cnd.where(Teacher_congress_delegation_union::getDelegationId, "=", lastDelegation.getId())); - List newDelegationUnions = lastDelegationUnions.stream().map(lastDelegationUnion -> { - Teacher_congress_delegation_union newDelegationUnion = BeanUtil.copyProperties(lastDelegationUnion, Teacher_congress_delegation_union.class); - newDelegationUnion.setId(R.UU32()); - newDelegationUnion.setDelegationId(newDelegation.getId()); - newDelegationUnion.setSessionId(session.getId()); - newDelegationUnion.setCreatedAt(null); - newDelegationUnion.setUpdatedAt(null); - newDelegationUnion.setCreatedBy(null); - newDelegationUnion.setUpdatedBy(null); - return newDelegationUnion; - }).toList(); - dao().fastInsert(newDelegationUnions); - - - //组成单位 - List lastDelegationUnits = dao().query(Teacher_congress_delegation_unit.class, Cnd.where(Teacher_congress_delegation_unit::getDelegationId, "=", lastDelegation.getId())); - List newDelegationUnits = lastDelegationUnits.stream().map(lastDelegationUnit -> { - Teacher_congress_delegation_unit newDelegationUnit = BeanUtil.copyProperties(lastDelegationUnit, Teacher_congress_delegation_unit.class); - newDelegationUnit.setId(R.UU32()); - newDelegationUnit.setDelegationId(newDelegation.getId()); - newDelegationUnit.setSessionId(session.getId()); - newDelegationUnit.setCreatedAt(null); - newDelegationUnit.setUpdatedAt(null); - newDelegationUnit.setCreatedBy(null); - newDelegationUnit.setUpdatedBy(null); - return newDelegationUnit; - }).toList(); - dao().fastInsert(newDelegationUnits); - } - - //代表数据 单位 分工会 要根据最新的设置来调整 - - //代表数据 - List lastDelegates = dao().query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", lastSession.getId())); - List newDelegates = lastDelegates.stream().map(lastDelegate -> { - Teacher_congress_delegate newDelegate = BeanUtil.copyProperties(lastDelegate, Teacher_congress_delegate.class); - newDelegate.setId(R.UU32()); - newDelegate.setSessionId(session.getId()); - newDelegate.setCreatedAt(null); - newDelegate.setUpdatedAt(null); - newDelegate.setCreatedBy(null); - newDelegate.setUpdatedBy(null); - - //查询本人最新的信息从用户表中 - View_user vwUser = dao().fetch(View_user.class, Cnd.where(Sys_user::getId, "=", lastDelegate.getUserId())); - if (ObjectUtil.isNotEmpty(vwUser)) { - newDelegate.setUnitId(vwUser.getUnitId()); - newDelegate.setUnitName(vwUser.getUnitName()); - newDelegate.setUnionId(vwUser.getUnionId()); - newDelegate.setUnionName(vwUser.getUnionName()); - newDelegate.setSex(vwUser.getSex()); - newDelegate.setMobile(vwUser.getMobile()); - - //去查询他当前所处的单位、分工会处于哪个代表团 - if (StrUtil.isNotBlank(vwUser.getUnionId())) { - Teacher_congress_delegation_union delegationUnion = dao().fetch(Teacher_congress_delegation_union.class, Cnd.where(Teacher_congress_delegation_union::getSessionId, "=", session.getId()) - .and(Teacher_congress_delegation_union::getUnionId, "=", vwUser.getUnionId())); - if (ObjectUtil.isNotEmpty(delegationUnion)) { - newDelegate.setDelegationId(delegationUnion.getDelegationId()); - } + //团长角色权限继承 + List lastHeadUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId()) + .and(Sys_user_role::getRoleId, "=", delegationHeadRole.getId())); + for (Sys_user_role lastHeadUser : lastHeadUserRoles) { + Sys_user_role newHeadUser = BeanUtil.copyProperties(lastHeadUser, Sys_user_role.class); + newHeadUser.setTcDelegationId(newDelegation.getId()); + newHeadUser.setTcSessionId(session.getId()); + dao().insert(newHeadUser); + } + //副团长角色权限继承 + List lastViceHeadUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId()) + .and(Sys_user_role::getRoleId, "=", delegationViceHeadRole.getId())); + for (Sys_user_role lastViceHeadUser : lastViceHeadUserRoles) { + Sys_user_role newViceHeadUser = BeanUtil.copyProperties(lastViceHeadUser, Sys_user_role.class); + newViceHeadUser.setTcDelegationId(newDelegation.getId()); + newViceHeadUser.setTcSessionId(session.getId()); + dao().insert(newViceHeadUser); + } + //联络人角色权限继承 + List lastContactUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId()) + .and(Sys_user_role::getRoleId, "=", delegationContactRole.getId())); + for (Sys_user_role lastContactUser : lastContactUserRoles) { + Sys_user_role newContactUser = BeanUtil.copyProperties(lastContactUser, Sys_user_role.class); + newContactUser.setTcDelegationId(newDelegation.getId()); + newContactUser.setTcSessionId(session.getId()); + dao().insert(newContactUser); } - if (StrUtil.isNotBlank(vwUser.getUnitId())) { - Teacher_congress_delegation_unit delegationUnit = dao().fetch(Teacher_congress_delegation_unit.class, Cnd.where(Teacher_congress_delegation_unit::getSessionId, "=", session.getId()) - .and(Teacher_congress_delegation_unit::getUnitId, "=", vwUser.getUnitId())); - if (ObjectUtil.isNotEmpty(delegationUnit)) { - newDelegate.setDelegationId(delegationUnit.getDelegationId()); + //组成分工会 + List lastDelegationUnions = dao().query(Teacher_congress_delegation_union.class, Cnd.where(Teacher_congress_delegation_union::getDelegationId, "=", lastDelegation.getId())); + List newDelegationUnions = lastDelegationUnions.stream().map(lastDelegationUnion -> { + Teacher_congress_delegation_union newDelegationUnion = BeanUtil.copyProperties(lastDelegationUnion, Teacher_congress_delegation_union.class); + newDelegationUnion.setId(R.UU32()); + newDelegationUnion.setDelegationId(newDelegation.getId()); + newDelegationUnion.setSessionId(session.getId()); + newDelegationUnion.setCreatedAt(null); + newDelegationUnion.setUpdatedAt(null); + newDelegationUnion.setCreatedBy(null); + newDelegationUnion.setUpdatedBy(null); + return newDelegationUnion; + }).toList(); + dao().fastInsert(newDelegationUnions); + + + //组成单位 + List lastDelegationUnits = dao().query(Teacher_congress_delegation_unit.class, Cnd.where(Teacher_congress_delegation_unit::getDelegationId, "=", lastDelegation.getId())); + List newDelegationUnits = lastDelegationUnits.stream().map(lastDelegationUnit -> { + Teacher_congress_delegation_unit newDelegationUnit = BeanUtil.copyProperties(lastDelegationUnit, Teacher_congress_delegation_unit.class); + newDelegationUnit.setId(R.UU32()); + newDelegationUnit.setDelegationId(newDelegation.getId()); + newDelegationUnit.setSessionId(session.getId()); + newDelegationUnit.setCreatedAt(null); + newDelegationUnit.setUpdatedAt(null); + newDelegationUnit.setCreatedBy(null); + newDelegationUnit.setUpdatedBy(null); + return newDelegationUnit; + }).toList(); + dao().fastInsert(newDelegationUnits); + } + + //代表数据 单位 分工会 要根据最新的设置来调整 + + //代表数据 + List lastDelegates = dao().query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", lastSession.getId())); + List newDelegates = lastDelegates.stream().map(lastDelegate -> { + Teacher_congress_delegate newDelegate = BeanUtil.copyProperties(lastDelegate, Teacher_congress_delegate.class); + newDelegate.setId(R.UU32()); + newDelegate.setSessionId(session.getId()); + newDelegate.setCreatedAt(null); + newDelegate.setUpdatedAt(null); + newDelegate.setCreatedBy(null); + newDelegate.setUpdatedBy(null); + + //查询本人最新的信息从用户表中 + View_user vwUser = dao().fetch(View_user.class, Cnd.where(Sys_user::getId, "=", lastDelegate.getUserId())); + if (ObjectUtil.isNotEmpty(vwUser)) { + newDelegate.setUnitId(vwUser.getUnitId()); + newDelegate.setUnitName(vwUser.getUnitName()); + newDelegate.setUnionId(vwUser.getUnionId()); + newDelegate.setUnionName(vwUser.getUnionName()); + newDelegate.setSex(vwUser.getSex()); + newDelegate.setMobile(vwUser.getMobile()); + + //去查询他当前所处的单位、分工会处于哪个代表团 + if (StrUtil.isNotBlank(vwUser.getUnionId())) { + Teacher_congress_delegation_union delegationUnion = dao().fetch(Teacher_congress_delegation_union.class, Cnd.where(Teacher_congress_delegation_union::getSessionId, "=", session.getId()) + .and(Teacher_congress_delegation_union::getUnionId, "=", vwUser.getUnionId())); + if (ObjectUtil.isNotEmpty(delegationUnion)) { + newDelegate.setDelegationId(delegationUnion.getDelegationId()); + } + } + + if (StrUtil.isNotBlank(vwUser.getUnitId())) { + Teacher_congress_delegation_unit delegationUnit = dao().fetch(Teacher_congress_delegation_unit.class, Cnd.where(Teacher_congress_delegation_unit::getSessionId, "=", session.getId()) + .and(Teacher_congress_delegation_unit::getUnitId, "=", vwUser.getUnitId())); + if (ObjectUtil.isNotEmpty(delegationUnit)) { + newDelegate.setDelegationId(delegationUnit.getDelegationId()); + } + } + } + return newDelegate; + }).toList(); + dao().insert(newDelegates); + + //代表权限数据 + for (Teacher_congress_delegate newDelegate : newDelegates) { + Sys_user_role sysUserRole = new Sys_user_role(); + sysUserRole.setTcSessionId(session.getId()); + sysUserRole.setUserId(newDelegate.getUserId()); + sysUserRole.setRoleId(newDelegate.getRoleId()); + sysUserRole.setTcDelegationId(newDelegate.getDelegationId()); + dao().insert(sysUserRole); + } + + Sys_role committeeDoctorRole = sysRoleService.getByCode(RoleConstant.PROPOSAL_COMMITTEE_DIRECTOR); + + //提案委员会主任权限 + Teacher_congress_institution teacherCongressInstitutionProposalCommittee = dao().fetch(Teacher_congress_institution.class, Cnd.where(Teacher_congress_institution::getCode, "=", "TEACHER_CONGRESS_INSTITUTION_PROPOSAL_COMMITTEE") + .and(Teacher_congress_institution::getSessionId, "=", session.getId())); + if (ObjectUtil.isNotEmpty(teacherCongressInstitutionProposalCommittee)) { + List teacherCongressInstitutionUsers = dao().query(Teacher_congress_institution_user.class, Cnd.where(Teacher_congress_institution_user::getSessionId, "=", session.getId()) + .and(Teacher_congress_institution_user::getInstitutionId, "=", teacherCongressInstitutionProposalCommittee.getId()) + .and(Teacher_congress_institution_user::getIdentity, "=", "主任") + ); + if (ObjectUtil.isNotEmpty(teacherCongressInstitutionUsers)) { + for (Teacher_congress_institution_user teacherCongressInstitutionUser : teacherCongressInstitutionUsers) { + Sys_user_role sysUserRole = new Sys_user_role(); + sysUserRole.setTcSessionId(session.getId()); + sysUserRole.setUserId(teacherCongressInstitutionUser.getUserId()); + sysUserRole.setRoleId(committeeDoctorRole.getId()); + dao().insert(sysUserRole); } } } - return newDelegate; - }).toList(); - dao().insert(newDelegates); - //代表权限数据 - for (Teacher_congress_delegate newDelegate : newDelegates) { - Sys_user_role sysUserRole = new Sys_user_role(); - sysUserRole.setTcSessionId(session.getId()); - sysUserRole.setUserId(newDelegate.getUserId()); - sysUserRole.setRoleId(newDelegate.getRoleId()); - sysUserRole.setTcDelegationId(newDelegate.getDelegationId()); - dao().insert(sysUserRole); + sysRoleService.clearCache(); + sysUserService.clearCache(); } - - Sys_role committeeDoctorRole = sysRoleService.getByCode(RoleConstant.PROPOSAL_COMMITTEE_DIRECTOR); - - //提案委员会主任权限 - Teacher_congress_institution teacherCongressInstitutionProposalCommittee = dao().fetch(Teacher_congress_institution.class, Cnd.where(Teacher_congress_institution::getCode, "=", "TEACHER_CONGRESS_INSTITUTION_PROPOSAL_COMMITTEE") - .and(Teacher_congress_institution::getSessionId, "=", session.getId())); - if (ObjectUtil.isNotEmpty(teacherCongressInstitutionProposalCommittee)) { - List teacherCongressInstitutionUsers = dao().query(Teacher_congress_institution_user.class, Cnd.where(Teacher_congress_institution_user::getSessionId, "=", session.getId()) - .and(Teacher_congress_institution_user::getInstitutionId, "=", teacherCongressInstitutionProposalCommittee.getId()) - .and(Teacher_congress_institution_user::getIdentity, "=", "主任") - ); - if (ObjectUtil.isNotEmpty(teacherCongressInstitutionUsers)) { - for (Teacher_congress_institution_user teacherCongressInstitutionUser : teacherCongressInstitutionUsers) { - Sys_user_role sysUserRole = new Sys_user_role(); - sysUserRole.setTcSessionId(session.getId()); - sysUserRole.setUserId(teacherCongressInstitutionUser.getUserId()); - sysUserRole.setRoleId(committeeDoctorRole.getId()); - dao().insert(sysUserRole); - } - } - } - - sysRoleService.clearCache(); - sysUserService.clearCache(); } @Override diff --git a/src/main/resources/views/platform/sys/unit/index.html b/src/main/resources/views/platform/sys/unit/index.html index 08322b1..4145679 100644 --- a/src/main/resources/views/platform/sys/unit/index.html +++ b/src/main/resources/views/platform/sys/unit/index.html @@ -1,35 +1,101 @@ - +
- - - + + +
diff --git a/src/main/resources/views/platform/sys/unit/unitManage.js b/src/main/resources/views/platform/sys/unit/unitManage.js index 60690a9..956d398 100644 --- a/src/main/resources/views/platform/sys/unit/unitManage.js +++ b/src/main/resources/views/platform/sys/unit/unitManage.js @@ -1,5 +1,5 @@ const UNIT_MANAGE_TEMPLATE = { - template: ` + template: /*language=HTML*/ `
@@ -9,7 +9,7 @@ const UNIT_MANAGE_TEMPLATE = { - + 新建单位 @@ -30,10 +30,7 @@ const UNIT_MANAGE_TEMPLATE = { - - - - + @@ -47,10 +44,20 @@ const UNIT_MANAGE_TEMPLATE = { + + + + + + + + + @@ -88,6 +95,7 @@ const UNIT_MANAGE_TEMPLATE = { required: true } }, + store, data() { return { pageForm: { @@ -107,7 +115,7 @@ const UNIT_MANAGE_TEMPLATE = { formRules: { name: [{ required: true, message: "必填", trigger: "blur" }], unitcode: [{ required: true, message: "必填", trigger: "blur" }], - unitLevel: [{ required: true, message: "必填", trigger: "blur" }], + unitLevel: [{ required: false, message: "必填", trigger: "blur" }], email: [ { required: false, message: "单位邮箱", trigger: "blur" }, { type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] } @@ -115,24 +123,8 @@ const UNIT_MANAGE_TEMPLATE = { }, options: [], parentUnit: [], - props: { - lazy: true, - checkStrictly: true, - multiple: false, - lazyLoad: function (node, resolve) { - var url = base + "/platform/sys/unit/cascaderData" - $.post( - url, - { pid: node.value }, - function (data) { - if (data.code === 0) { - resolve(data.data) - } - }, - "json" - ) - } - } + + unions: [], } }, computed: {}, @@ -148,26 +140,29 @@ const UNIT_MANAGE_TEMPLATE = { this.options = [] }, doHandle() { - const self = this - const url = this.formData.id ? "/platform/sys/unit/editDo" : "/platform/sys/unit/addDo" - this.$refs["form"].validate(async function (valid) { - if (valid) { - if (!self.formData.id) { - self.formData.parentId = self.parentUnit[self.parentUnit.length - 1] || "" + this.$confirm("确定要提交吗?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + const self = this + const url = this.formData.id ? "/platform/sys/unit/editDo" : "/platform/sys/unit/addDo" + this.$refs["form"].validate(async function (valid) { + if (valid) { + if (self.currentNode) { + self.formData.parentId = self.currentData.id + } + const resp = await self.$axios.post(url, self.formData) + if (resp.code === 0) { + self.$message.success(resp.msg) + self.doSearch() + self.dialogVisible = false + self.$emit("refresh", null) + } else { + self.$message.warning(resp.msg) + } } - if (self.currentNode !== 1) { - self.formData.parentId = self.currentData.id - } - const resp = await self.$axios.post(url, self.formData) - if (resp.code === 0) { - self.$message.success(resp.msg) - self.doSearch() - self.dialogVisible = false - self.$emit("refresh", null) - } else { - self.$message.warning(resp.msg) - } - } + }) }) }, async openEdit(id) { @@ -216,7 +211,13 @@ const UNIT_MANAGE_TEMPLATE = { }) } }, - created() { + async created() { this.pageData() + + if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { + this.unions = await this.$businessTool.listUnion() + } else { + this.unions = await this.$businessTool.listUnion(this.store.state.user.union.id) + } } } diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/query/comprehensive/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/query/comprehensive/index.html index 2462dc1..6d41f36 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/query/comprehensive/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/query/comprehensive/index.html @@ -337,7 +337,9 @@ layout("/layouts/platform.html"){ }) }, listSession() { - this.$axios.post("/platform/proposal/common/listSession").then((res) => { + this.$axios.post("/platform/proposal/common/listSession", { + orderBy: "asc" + }).then((res) => { if (res.code === 0) { this.sessionOptions = res.data if (this.sessionOptions) { diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/query/yearReport/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/query/yearReport/index.html index ff92788..540fa43 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/query/yearReport/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/query/yearReport/index.html @@ -140,7 +140,7 @@ layout("/layouts/platform.html"){ new Vue({ el: "#app", - dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT"], + dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"], store, mixins: [initTableMixins], components: { diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/senior/basic/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/senior/basic/index.html index 1a807e4..0d42656 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/senior/basic/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/senior/basic/index.html @@ -128,29 +128,36 @@ layout("/layouts/platform.html"){ + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + @@ -177,15 +184,15 @@ layout("/layouts/platform.html"){ - - - - - - - - - + + + 取 消 diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/feedback/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/feedback/index.html index 0c4ad7b..3026717 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/feedback/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/feedback/index.html @@ -92,17 +92,6 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> - 取消 @@ -231,7 +220,6 @@ layout("/layouts/platform.html"){ if (this.sessionOptions) { this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id) this.pageData() - this.listDelegation() } } }) diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html index 8e59b44..cbd5d1c 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html @@ -42,6 +42,9 @@ layout("/layouts/platform.html"){ + diff --git a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html index 51ae5fb..481e34c 100644 --- a/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html +++ b/src/main/resources/views/platform/zhghh5/democratic/proposal/transact/write/index.html @@ -308,7 +308,7 @@ layout("/layouts/platform_h5.html"){ - +