From 293242cf3c3731bbe864b78d55cf984e843c7e38 Mon Sep 17 00:00:00 2001 From: sunliang <593170460@qq.com> Date: Thu, 18 Apr 2024 14:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=B7=A5=E8=89=BA=E5=8D=A1?= =?UTF-8?q?=E4=B8=8E=E6=8A=80=E6=9C=AF=E5=8D=8F=E8=AE=AE=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=AD=E4=B8=8B=E8=BD=BD=EF=BC=8C=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E7=A7=BB=E4=B8=8B=E7=A7=BB=E5=8F=AA=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=99=84=E4=BB=B6=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CCFlow/CCFlow/WF/CCForm/Ath.js | 25 +++++++------ CCFlow/CCFlow/web.config | 3 ++ .../Components/BP.WF/HttpHandler/WF_CCForm.cs | 37 ++++++++++++------- 3 files changed, 39 insertions(+), 26 deletions(-) diff --git a/CCFlow/CCFlow/WF/CCForm/Ath.js b/CCFlow/CCFlow/WF/CCForm/Ath.js index 36baef94..cddd5f98 100644 --- a/CCFlow/CCFlow/WF/CCForm/Ath.js +++ b/CCFlow/CCFlow/WF/CCForm/Ath.js @@ -369,8 +369,8 @@ function FileShowWayTable(athDesc, dbs, uploadUrl) { //⑦操作列的增加. _html += ""; if (athDesc.IsIdx == 1 && athDesc.IsReadonly != 1) { - _html += "上移"; - _html += "下移"; + _html += "上移"; + _html += "下移"; } if (athDesc.IsChangeFileName == 1 && athDesc.IsReadonly != 1) { _html += "修改文件名"; @@ -473,23 +473,25 @@ function FileShowWayTable(athDesc, dbs, uploadUrl) { } // 向上移动. -function GFDoUp(mypk) { - +function GFDoUp(mypk, fk_framAttachment) { var en = new Entity("BP.Sys.FrmAttachmentDB", mypk); var data = en.DoMethodReturnString("DoUpTabIdx"); if (data.indexOf('err@') != -1) alert(data); - Reload(); + InitAthPage("Div_" + fk_framAttachment); + AthTable_Init(fk_framAttachment, "Div_" + fk_framAttachment, pageData.WorkID); + //Reload(); } //向下移动. -function GFDoDown(mypk) { - +function GFDoDown(mypk, fk_framAttachment) { var en = new Entity("BP.Sys.FrmAttachmentDB", mypk); var data = en.DoMethodReturnString("DoDownTabIdx"); if (data.indexOf('err@') != -1) alert(data); - Reload(); + InitAthPage("Div_" + fk_framAttachment); + AthTable_Init(fk_framAttachment, "Div_" + fk_framAttachment, pageData.WorkID); + //Reload(); } // 修改文件名. @@ -579,8 +581,6 @@ function GetFileStream(mypk, FK_FrmAttachment) { * @param MyPK 上传附件数据的信息主键 */ function Down2018(mypk) { - debugger - var nodeID = GetQueryString("FK_Node"); var workID = GetQueryString("WorkID"); @@ -591,8 +591,9 @@ function Down2018(mypk) { handler.AddPara("FK_Node", nodeID); handler.AddPara("MyPK", mypk); var fileUrl = handler.DoMethodReturnString("AttachmentUpload_Down"); - if (typeof fileUrl === "string" && fileUrl.startsWith("/DataUser/")) { - window.open(window.location.origin + fileUrl); + if (typeof fileUrl === "string" && fileUrl.indexOf("/DataUser/") !=-1 && fileUrl.indexOf("url@") == 0) { + var url = fileUrl.replace("url@", ""); + window.open(window.location.origin + url); return; } SetHref(basePath + "/WF/Comm/ProcessRequest?DoType=HttpHandler&DoMethod=AttachmentUpload_Down&HttpHandlerName=BP.WF.HttpHandler.WF_CCForm&WorkID=" + workID + "&FK_Node=" + nodeID + "&MyPK=" + mypk); diff --git a/CCFlow/CCFlow/web.config b/CCFlow/CCFlow/web.config index 95a43b9e..379c5ba1 100644 --- a/CCFlow/CCFlow/web.config +++ b/CCFlow/CCFlow/web.config @@ -247,6 +247,9 @@ + + + diff --git a/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs b/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs index d3ddcee9..6c8e0da4 100644 --- a/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs +++ b/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs @@ -4947,18 +4947,18 @@ namespace BP.WF.HttpHandler char[] c = input.ToCharArray(); for (int i = 0; i < c.Length; i++) { - if (c[i] == 12288) - { - c[i] = (char)32; - continue; - } + //if (c[i] == 12288) + //{ + // c[i] = (char)32; + // continue; + //} if (c[i] == 160) { c[i] = (char)32; continue; } - if (c[i] > 65280 && c[i] < 65375) - c[i] = (char)(c[i] - 65248); + //if (c[i] > 65280 && c[i] < 65375) + // c[i] = (char)(c[i] - 65248); } string s = new string(c); return s; @@ -5705,13 +5705,22 @@ namespace BP.WF.HttpHandler } else { - filepath = downDB.FileFullName; - int splitStartIndex = filepath.IndexOf("DataUser/"); - if(splitStartIndex > -1) - { - return "/" + filepath.Substring(splitStartIndex); + //表单类别区别打印@BKGY + MapData mp = new MapData(downDB.FrmID); + string[] flowAttr = { "37f23552-7", "a25d959b-7", "b12f75b4-b" }; + if (Array.IndexOf(flowAttr, mp.FormTreeNo) >= 0) + { + int splitStartIndex = filepath.IndexOf("DataUser/"); + string filePath = filepath.Substring(0, filepath.LastIndexOf('/') + 1); + filepath = filePath + downDB.FileName; + if (splitStartIndex > -1) + { + + return "url@/" + filepath.Substring(splitStartIndex); + } + return filepath; } - //return filepath; + filepath = downDB.FileFullName; } #endregion } @@ -5750,7 +5759,7 @@ namespace BP.WF.HttpHandler catch (Exception ex) { - throw new Exception (ex.Message); + throw new Exception(ex.Message); } return filepath; }