diff --git a/CCFlow/.vs/CCFlowCloud/v17/.suo b/CCFlow/.vs/CCFlowCloud/v17/.suo index 8f95c604..06931fc2 100644 Binary files a/CCFlow/.vs/CCFlowCloud/v17/.suo and b/CCFlow/.vs/CCFlowCloud/v17/.suo differ diff --git a/CCFlow/CCFlow/DataUser/API/App_Start/SwaggerConfig.cs b/CCFlow/CCFlow/DataUser/API/App_Start/SwaggerConfig.cs index da9263d7..25712d05 100644 --- a/CCFlow/CCFlow/DataUser/API/App_Start/SwaggerConfig.cs +++ b/CCFlow/CCFlow/DataUser/API/App_Start/SwaggerConfig.cs @@ -6,7 +6,7 @@ using Swashbuckle.Swagger; using System.Web.Http.Description; using System.Linq; -[assembly: PreApplicationStartMethod(typeof(SwaggerConfig), "Register")] +//[assembly: PreApplicationStartMethod(typeof(SwaggerConfig), "Register")] namespace CCFlow.DataUser.API { diff --git a/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js b/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js index dd7074c5..9fcc963f 100644 --- a/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js +++ b/CCFlow/CCFlow/DataUser/JSLibData/MyFlowPublic.js @@ -64,6 +64,23 @@ function LoaclOperation() { function beforeSave() { return true; } +window.addEventListener('message', function (event) { + var data = event.data; + + if (data.action === 'refreshDiv' && data.divId === 'myDiv') { + // 假设这是刷新div的函数 + refreshDiv(data.divId, data.fast); + } +}, false); + +function refreshDiv(divId, fast) { + // 这里是刷新div的代码,例如重新加载数据或重新渲染 + var div = document.getElementById(divId); + // 假设有一个函数来获取新的内容 + //div.innerHTML = getNewContent(fast); + div.innerHTML = fast; +} + //发生前事件 function beforeSend() { diff --git a/CCFlow/CCFlow/WF/CCForm/Ath.js b/CCFlow/CCFlow/WF/CCForm/Ath.js index e8b125ec..1ea9e766 100644 --- a/CCFlow/CCFlow/WF/CCForm/Ath.js +++ b/CCFlow/CCFlow/WF/CCForm/Ath.js @@ -681,6 +681,8 @@ function Down2018(mypk) { var fileName = FrmAttachmentDBs[0].FileName;//文件名 var no = webUser.No;//当前登录人ID var name = webUser.Name;//当前登录人Name + var data = ''; + //data = getIP(); var url = ""; @@ -689,6 +691,7 @@ function Down2018(mypk) { handler.AddPara("WorkID", workID); handler.AddPara("FK_Node", nodeID); handler.AddPara("MyPK", mypk); + handler.AddPara("Address", data); var fileUrl = handler.DoMethodReturnString("AttachmentUpload_Down"); if (typeof fileUrl === "string" && fileUrl.indexOf("/DataUser/") !=-1 && fileUrl.indexOf("url@") == 0) { @@ -720,6 +723,18 @@ function Down2018(mypk) { link.href = url; link.click(); +} + +function getIP() { + //var data = ""; + //机器地址 + fetch('https://api.ipify.org?format=json') + .then(response => response.json()) + .then(json => data = json.ip) + + + return data; + } //打包下载 function DownZipBatch(fk_frmattachment, PKVal) { diff --git a/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm b/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm index fa5c750c..06d05dee 100644 --- a/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm +++ b/CCFlow/CCFlow/WF/CCForm/ChapterFrmView.htm @@ -92,6 +92,8 @@ } else { child.children = [...getChildren(item.OID.toString()), ...getAttrChildren(item.OID.toString(), item.CtrlType)]; }; + child.Lab = ""; + child.title = ""; group.push(child); }; } diff --git a/CCFlow/CCFlow/WF/CCForm/FrmEnd.js b/CCFlow/CCFlow/WF/CCForm/FrmEnd.js index 5b27a016..46edd6bf 100644 --- a/CCFlow/CCFlow/WF/CCForm/FrmEnd.js +++ b/CCFlow/CCFlow/WF/CCForm/FrmEnd.js @@ -2705,7 +2705,23 @@ function UsefulExpresFlow(attrKey, elementID) { OpenLayuiDialog(url, "常用短语", W, 70, "auto"); } +function GetFastInputVals(val) { + var input = document.getElementById('WorkCheck_Doc'); + input.value = val; +} + +function toggleDiv() { + var x = document.getElementById("myDiv"); + + if (x.style.display === "none") { + x.style.display = "block"; + document.querySelector('#isShow').innerText = '收起'; + } else { + document.querySelector('#isShow').innerText = '展开'; + x.style.display = "none"; + } +} //弹出附件 function OpenAth(title, keyOfEn, athMyPK, atPara, FK_MapData, frmType, isRead) { diff --git a/CCFlow/CCFlow/WF/WorkOpt/UsefulExpresFlow.htm b/CCFlow/CCFlow/WF/WorkOpt/UsefulExpresFlow.htm index 2683059e..fe41b17c 100644 --- a/CCFlow/CCFlow/WF/WorkOpt/UsefulExpresFlow.htm +++ b/CCFlow/CCFlow/WF/WorkOpt/UsefulExpresFlow.htm @@ -89,7 +89,8 @@ for (var i = 0; i < allEns.length; i++) { var en = allEns[i]; html += "
  • "; - html += " "; + //html += " "; + html += ""; html += "
  • "; } html += ""; @@ -105,7 +106,22 @@ en1.Update(); } } - window.location.href = window.location.href + window.location.href = window.location.href; + ens = new Entities("BP.Sys.FastInputs"); + ens = ens.DoMethodReturnJSON("InitData_Flow"); + var fastInput = ""; + for (var i = 0; i < ens.length; i++) { + if (ens[i].Vals != "" && ens[i].Vals != "null") { + fastInput += "" + ens[i].Vals + " "; + } + } + var fastHtml = fastInput + "修改 编辑常用审批语言." + //var parentInput = window.parent.document.getElementById('parentInput'); + //parentInput.value = document.getElementById('childInput').value; + //刷新父窗口指定div + parent.$("#mydiv").load(window.parent.location.href + " #mydiv"); + var data = { action: 'refreshDiv', divId: 'myDiv', fast: fastHtml }; + window.parent.postMessage(data, '*'); } var insEdit = true; //添加数据 @@ -255,7 +271,7 @@
    - +
    diff --git a/CCFlow/CCFlow/WF/WorkOpt/WorkCheck.js b/CCFlow/CCFlow/WF/WorkOpt/WorkCheck.js index 12dd1a31..38bfcd9c 100644 --- a/CCFlow/CCFlow/WF/WorkOpt/WorkCheck.js +++ b/CCFlow/CCFlow/WF/WorkOpt/WorkCheck.js @@ -158,6 +158,9 @@ function WorkCheck_Parse(track, frmWorkCheck, SignType, showNodeName, isShowChec //解析节点上传的附件 var subaths = GetSubAths(track.NodeID, frmWorkCheck); + var ens = null; + ens = new Entities("BP.Sys.FastInputs"); + ens = ens.DoMethodReturnJSON("InitData_Flow"); //仅显示自己的审核意见 if (frmWorkCheck.FWCMsgShow == "1" && track.NodeID == checkParam.FK_Node && track.IsDoc == false) { @@ -303,8 +306,18 @@ function WorkCheck_Parse(track, frmWorkCheck, SignType, showNodeName, isShowChec _Html += "
    "; else _Html += "
    "; - if (isEditWorkCheck == true && getConfigByKey("IsShowWorkCheckUsefulExpres", true) == true) - _Html += "
    常用短语 编辑常用审批语言.
    "; + if (isEditWorkCheck == true && getConfigByKey("IsShowWorkCheckUsefulExpres", true) == true) { + var arrEns = []; + var fastInput = ""; + for (var i = 0; i < ens.length; i++) { + if (ens[i].Vals != "" && ens[i].Vals != "null") { + fastInput += "" + ens[i].Vals + " "; + } + } + _Html += "收起
    " + fastInput + "修改 编辑常用审批语言.
    "; + + } + // _Html += "
    修改 编辑常用审批语言.
    "; if (frmWorkCheck.SigantureEnabel == "0") _Html += track.EmpFromT; @@ -484,8 +497,17 @@ function WorkCheck_Stamp_Parse(track, frmWorkCheck, showNodeName, isShowCheck, F _Html += "
    "; else _Html += "
    "; - if (isEditWorkCheck == true && getConfigByKey("IsShowWorkCheckUsefulExpres", true) == true) - _Html += ""; + if (isEditWorkCheck == true && getConfigByKey("IsShowWorkCheckUsefulExpres", true) == true) { + var arrEns = []; + var fastInput = ""; + for (var i = 0; i < ens.length; i++) { + if (ens[i].Vals != "" && ens[i].Vals != "null") { + fastInput += "" + ens[i].Vals + " "; + } + } + _Html += "收起
    " + fastInput + "修改 编辑常用审批语言.
    "; + //_Html += ""; + } //debugger //电子签名 diff --git a/CCFlow/Components/BP.En30/Pub/Engine.cs b/CCFlow/Components/BP.En30/Pub/Engine.cs index a1d1f888..a1d1b815 100644 --- a/CCFlow/Components/BP.En30/Pub/Engine.cs +++ b/CCFlow/Components/BP.En30/Pub/Engine.cs @@ -731,9 +731,10 @@ trgaph108\trleft5\trbrdrl\brdrs\brdrw10 \trbrdrt\brdrs\brdrw10 \trbrdrr\brdrs\br return content; SysEnums enums = new SysEnums(attr.UIBindKey); string str = ""; + string[] valArr = content.Split(','); foreach (SysEnum en in enums) { - if ((content + ",").Contains(en.IntKey + ",") == true) + if (Array.IndexOf(valArr, en.IntKey.ToString()) > -1) str += en.Lab + ","; } if (str != "") str = str.Substring(0, str.Length - 1); diff --git a/CCFlow/Components/BP.WF/HttpHandler/Base/DirectoryPageBase.cs b/CCFlow/Components/BP.WF/HttpHandler/Base/DirectoryPageBase.cs index 7e1e8c37..e53572a3 100644 --- a/CCFlow/Components/BP.WF/HttpHandler/Base/DirectoryPageBase.cs +++ b/CCFlow/Components/BP.WF/HttpHandler/Base/DirectoryPageBase.cs @@ -566,6 +566,19 @@ namespace BP.WF.HttpHandler return str; } } + /// + /// Address + /// + public string Address + { + get + { + string str = this.GetRequestVal("Address"); + if (DataType.IsNullOrEmpty(str)) + return ""; + return str; + } + } public string FK_Event { get diff --git a/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs b/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs index 0fc60c2b..b02250fa 100644 --- a/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs +++ b/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs @@ -5675,7 +5675,7 @@ namespace BP.WF.HttpHandler FrmAttachment dbAtt = new FrmAttachment(); dbAtt.MyPK = downDB.FK_FrmAttachment; dbAtt.Retrieve(); - + //string ip02 = HttpContext.Current.Request.Headers["X-Forwarded-For"]; if (dbAtt.ReadRole != 0 && this.NodeID != 0) { //标记已经阅读了. @@ -5693,6 +5693,7 @@ namespace BP.WF.HttpHandler bool isEncrypt = downDB.GetParaBoolen("IsEncrypt"); string filepath = ""; + if (dbAtt.AthSaveWay == AthSaveWay.IISServer) { @@ -5741,21 +5742,9 @@ namespace BP.WF.HttpHandler //string clientIP = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; string strHostName = System.Net.Dns.GetHostName(); //string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(1).ToString(); - string clientIPAddress = ""; - IPAddress[] addresses = Dns.GetHostAddresses(strHostName); - foreach (IPAddress addr in addresses) - { - if (addr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) - { - if (addr.ToString() != "172.15.89.222") - { - clientIPAddress += addr.ToString(); - clientIPAddress += "、"; - } - } - } - - string url = "http://172.15.89.222:8080/Personnel/Personnelapi/LogRecording"; + string clientIPAddress = this.Address; + string ip = HttpContext.Current.Request.Headers["X-Forwarded-For"]; + string url = "http://172.15.89.222:8080/Personnel/Personnelapi/LogRecording"; string questbody = ""; string result = ""; questbody += "{\r \"OperateUser\": \""; @@ -6111,20 +6100,7 @@ namespace BP.WF.HttpHandler //string clientIP = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; string strHostName = System.Net.Dns.GetHostName(); //string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(1).ToString(); - string clientIPAddress = ""; - IPAddress[] addresses = Dns.GetHostAddresses(strHostName); - foreach (IPAddress addr in addresses) - { - if (addr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) - { - if (addr.ToString() != "172.15.89.222") - { - clientIPAddress += addr.ToString(); - clientIPAddress += "、"; - } - } - } - + string clientIPAddress = this.Address; string urll = "http://172.15.89.222:8080/Personnel/Personnelapi/LogRecording"; string questbody = ""; string result = "";