From 03c237e6d9c00033f4aecca488f1b529b53634e8 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Thu, 12 Feb 2026 14:47:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86app=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/rm/unFinishWorkList-mobile.jsp | 53 +++++++------------ 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/WebContent/WEB-INF/views/rm/unFinishWorkList-mobile.jsp b/WebContent/WEB-INF/views/rm/unFinishWorkList-mobile.jsp index 1b1cf3f..07dab60 100644 --- a/WebContent/WEB-INF/views/rm/unFinishWorkList-mobile.jsp +++ b/WebContent/WEB-INF/views/rm/unFinishWorkList-mobile.jsp @@ -542,8 +542,9 @@ var taskKey = task.checkerId + '_' + (task.processName || ''); var isChecked = selectedTasks.has(taskKey) ? 'checked' : ''; var canCheck = $('#taskStatus').val() === '0' ? '' : 'disabled'; - - html += '
'; + // 判断是否是派车计划,拼接点击事件属性 + var clickEvent = 'onclick="viewTaskDetail(\'' + task.id + '\', \'' + (task.processName || '') + '\', \'' + task.isFinish + '\' )"'; + html += '
'; html += '
'; html += ' '; html += ' ' + ((task.processName || '') + '-' + (task.definitionName || '')) + ''; @@ -580,65 +581,51 @@ } // 查看任务详情(页面跳转) - function viewTaskDetail(id, processName) { + function viewTaskDetail(id, processName, isFinish) { var uname = localStorage.getItem("uname"); var pwd = localStorage.getItem("pwd"); - + if (!uname || !pwd) { showAlert('未找到用户凭证,请重新登录'); return; } - - // 设置导航标志,防止页面可见性检测干扰 - isNavigatingToDetail = true; + showLoading(); - + $.ajax({ type: "post", - url: CAR_IP+"/login/userLogin", + url: CAR_IP + "/login/userLogin", data: { username: uname, password: pwd }, - success: function(data) { + success: function (data) { hideLoading(); - + if (data.code == "200") { localStorage.setItem("token", data.token); - - // 根据流程类型跳转到对应页面 + var targetUrl = ""; if (processName === '派车计划') { - targetUrl = CAR_HTML_IP+ "page/car_demand_plan/child/dispatch_car_detail.html?id=" + id + "&token=" + data.token; + targetUrl = CAR_HTML_IP + "page/car_demand_plan/child/dispatch_car_detail.html?id=" + id + "&isFinish=" + isFinish; } else if (processName === '用车计划') { - targetUrl =CAR_HTML_IP+ "page/car_demand_plan/child/apply_plan_detail.html?id=" + id + "&token=" + data.token; + targetUrl = CAR_HTML_IP + "page/car_demand_plan/child/apply_plan_detail.html?id=" + id + "&isFinish=" + isFinish; } else { - isNavigatingToDetail = false; // 重置标志 showAlert('暂不支持该类型任务的详情查看: ' + processName); return; } - - // 使用 window.open 打开新窗口,避免影响当前页面 - try { - var newWindow = window.open(targetUrl, '_blank'); - // 检查新窗口是否成功打开 - if (!newWindow || newWindow.closed || typeof newWindow.closed == 'undefined') { - // 如果弹窗被阻止,尝试在当前窗口打开 - window.location.href = targetUrl; - } - } catch (e) { - console.error('打开详情页面失败:', e); - isNavigatingToDetail = false; - showAlert('打开详情页面失败,请稍后重试'); - } + + // ✅ App + PC 通用跳转方式 + setTimeout(function () { + window.location.href = targetUrl; + }, 100); + } else { - isNavigatingToDetail = false; // 重置标志 showAlert("没有权限!"); } }, - error: function(XMLHttpRequest, textStatus, errorThrown) { + error: function (XMLHttpRequest) { hideLoading(); - isNavigatingToDetail = false; // 重置标志 showAlert("未连接到服务器,请检查网络!状态码:" + XMLHttpRequest.status); } });