From 6c49e3f69562fbefec26d9a1a4c141e43a906d6d Mon Sep 17 00:00:00 2001 From: JyuHsin <729757837@qq.com> Date: Mon, 17 Nov 2025 09:07:01 +0800 Subject: [PATCH] commit --- pom.xml | 2 +- .../ActivityDeclareApplyController.java | 3 +++ .../assets/platform/js/util/commonUtil.js | 19 +++++++++++++++++++ .../resources/views/layouts/platform.html | 10 +++++----- .../views/layouts/v4/baseLayout.html | 7 ++++--- .../resources/views/layouts/v4/platform.html | 2 +- 6 files changed, 33 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index f3797ed..6e1fd03 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 jar com.budwk - v4 + zhgh_jshvc 5.6.0-plus 2.6.0-SNAPSHOT diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/controller/ActivityDeclareApplyController.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/controller/ActivityDeclareApplyController.java index 8104017..40eadfe 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/controller/ActivityDeclareApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/controller/ActivityDeclareApplyController.java @@ -108,6 +108,9 @@ public class ActivityDeclareApplyController { args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode()); args.set(FlowConst.FORM_DATA, activityDeclareInfo); args.set("type", activityDeclareInfo.getActivityType()); + if(StrUtil.isNotBlank(activityDeclareInfo.getClubId())) { + args.set("clubId", activityDeclareInfo.getClubId()); + } ProcessInstance instance = flowEngine.startProcessInstanceByKey("HDSB", activityDeclareInfo.getId(), SecurityUtil.getUserId(), args); // 自动完成第一个申请任务 diff --git a/src/main/resources/static/assets/platform/js/util/commonUtil.js b/src/main/resources/static/assets/platform/js/util/commonUtil.js index 7ae0c5c..a074aef 100644 --- a/src/main/resources/static/assets/platform/js/util/commonUtil.js +++ b/src/main/resources/static/assets/platform/js/util/commonUtil.js @@ -327,6 +327,25 @@ function createLoading(text = '加载中...') { }) } +function getBaseSubAppPath() { + const pathname = window.location.pathname; + const startIndex = pathname.indexOf('/platform'); + if (startIndex === -1) { + throw new Error('Target path not found in URL'); + } + return pathname.substring(startIndex); +} + +function getFullSubAppPath() { + const pathname = window.location.pathname; + const search = window.location.search; // 包含 ?appId=... + const startIndex = pathname.indexOf('/platform'); + if (startIndex === -1) { + throw new Error('Target path not found in URL'); + } + return pathname.substring(startIndex) + search; +} + diff --git a/src/main/resources/views/layouts/platform.html b/src/main/resources/views/layouts/platform.html index 05eb855..54187e6 100644 --- a/src/main/resources/views/layouts/platform.html +++ b/src/main/resources/views/layouts/platform.html @@ -345,10 +345,10 @@ layout("/layouts/v4/baseLayout.html"){ } } }, - // 菜单回显 echoMenus() { try { + debugger const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app")) this.activeMenuIndex = window.sessionStorage.getItem("zhgh_sub_app_left_menu_active_index-" + app.id) this.openedMenus = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app_left_menu_opens-" + app.id)) || [] @@ -356,7 +356,7 @@ layout("/layouts/v4/baseLayout.html"){ console.log(this.activeMenuIndex) // !this.activeMenuIndex && - if ('/platform/v4/subApp' === window.location.pathname) { + if ('/platform/v4/subApp' === getBaseSubAppPath()) { this.defaultSelect() } else { this.hrefSelect() @@ -386,8 +386,8 @@ layout("/layouts/v4/baseLayout.html"){ return search(menus, []); } - const result = findMenuPath(this.menus, window.location.pathname) - + const result = findMenuPath(this.menus, getBaseSubAppPath()) + debugger if(result){ this.activeMenuIndex = result[result.length-1]['id'] this.openedMenus = result.map(v=>v.id) @@ -439,7 +439,7 @@ layout("/layouts/v4/baseLayout.html"){ init() { // 页面加载时获取到正确的菜单 - const pathname = window.location.pathname + const pathname = getFullSubAppPath() if (!pathname.startsWith("/platform/v4/subApp")) { this.$axios.post("/platform/sys/user/rootMenuByPath", {pathname}).then((res) => { if (res.code === 0) { diff --git a/src/main/resources/views/layouts/v4/baseLayout.html b/src/main/resources/views/layouts/v4/baseLayout.html index e2d0e85..b62aef8 100644 --- a/src/main/resources/views/layouts/v4/baseLayout.html +++ b/src/main/resources/views/layouts/v4/baseLayout.html @@ -149,7 +149,8 @@ } connect() { - const WS_URL = window.location.host + "${base}/websocket" + //const WS_URL = window.location.host + "${base}/websocket" + const WS_URL = 'zhgh.jshvc.edu.cn' + "${base}/websocket" const protocol = window.location.protocol === "http:" ? "ws://" : "wss://" this.ws = new WebSocket(protocol + WS_URL) } @@ -683,7 +684,7 @@ $(document).ready(function () { // 控制页脚显示的函数 function toggleFooter() { - var currentPath = window.location.pathname + var currentPath = getBaseSubAppPath() var footer = $("#v4-footer") if (currentPath === "/platform/v4/home") { @@ -695,7 +696,7 @@ // 初始化:根据当前URL设置active状态 function setActiveNavItem() { - var currentPath = window.location.pathname + var currentPath = getBaseSubAppPath() $(".v4-nav-item").removeClass("active") $(".v4-nav-item").each(function () { if ($(this).attr("href") === currentPath) { diff --git a/src/main/resources/views/layouts/v4/platform.html b/src/main/resources/views/layouts/v4/platform.html index b76d9cd..772748a 100644 --- a/src/main/resources/views/layouts/v4/platform.html +++ b/src/main/resources/views/layouts/v4/platform.html @@ -282,7 +282,7 @@ $(document).ready(function() { // 初始化:根据当前URL设置active状态 function setActiveNavItem() { - var currentPath = window.location.pathname; + var currentPath = getBaseSubAppPath(); $('.v4-nav-item').removeClass('active'); $('.v4-nav-item').each(function() { if ($(this).attr('href') === currentPath) {