From 9d72706c2dce04b47652b9e827624ddf95a42280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=9B=84?= Date: Mon, 26 Jan 2026 10:58:50 +0800 Subject: [PATCH] =?UTF-8?q?5.0=E7=89=88=E6=9C=AC=20=E5=8F=91=E5=B8=83=20?= =?UTF-8?q?=E7=BE=8E=E5=8C=96=E9=A6=96=E9=A1=B5=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8E=8B=E7=BC=A9=E5=8C=85=20=E7=A7=98=E9=92=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main/resources/static/js/fenye.js | 513 ++++++++---------- .../resources/static/ofd/js/cnofd.umd.min.js | 5 +- server/src/main/resources/web/compress.ftl | 4 +- server/src/main/resources/web/main/index.ftl | 297 ++++++++-- 4 files changed, 490 insertions(+), 329 deletions(-) diff --git a/server/src/main/resources/static/js/fenye.js b/server/src/main/resources/static/js/fenye.js index 6c8bf6df..5e099e7f 100644 --- a/server/src/main/resources/static/js/fenye.js +++ b/server/src/main/resources/static/js/fenye.js @@ -1,299 +1,254 @@ - function htmlttt (str){ - var s = ""; - if(str.length == 0) return ""; - s = str.replace(/&/gi,"&"); - s = s.replace(/ /gi," "); - s = s.replace(/'/gi,"\'"); - s = s.replace(/"/gi,"\""); - s = s.replace(/javascript/g,"javascript "); - s = s.replace(/iframe/gi, "iframe "); - return s; - } - - function isEmptyString(str) { - return !str || str.length === 0; -} - - function removeExtraNewlines(str) { - // 替换连续的换行符为单个换行符 - return str.replace(/(?:\r\n|\r|\n){2,}/g, '\n'); +function htmlttt(str) { + var s = ""; + if (str.length == 0) return ""; + s = str.replace(/&/gi, "&"); + s = s.replace(/ /gi, " "); + s = s.replace(/'/gi, "\'"); + s = s.replace(/"/gi, "\""); + s = s.replace(/javascript/g, "javascript "); + s = s.replace(/iframe/gi, "iframe "); + return s; } - function DHTMLpagenation(content,kkkeyword,Length,page,txt) - { - if(page==0){ - page=1; - } - this.content=content; // 内容 - this.contentLength=s.length; // 内容长度 - this.pageSizeCount; // 总页数 - this.perpageLength= Length; //default perpage byte length. - this.currentPage= page; // 起始页为第1页 - this.regularExp=/\d+/; // 建立正则表达式,匹配数字型字符串。 - this.divDisplayContent; - this.contentStyle=null; - this.strDisplayContent=""; - this.divDisplayPagenation; - this.strDisplayPagenation=""; +function isEmptyString(str) { + return !str || str.length === 0; +} - // 把第二个参数赋给perpageLength; - arguments.length==2 ? perpageLength = arguments[1] : ''; +function removeExtraNewlines(str) { + // 替换连续的换行符为单个换行符 + return str.replace(/(?:\r\n|\r|\n){2,}/g, '\n'); +} - try { - //创建要显示的DIV - divExecuteTime=document.createElement("DIV"); - document.body.appendChild(divExecuteTime); - } - catch(e) - { - } - - // 得到divPagenation容器。 - if(document.getElementById("divPagenation")) - { - divDisplayPagenation=document.getElementById("divPagenation"); - } - else - { - try - { - //创建分页信息 - divDisplayPagenation=document.createElement("DIV"); - divDisplayPagenation.id="divPagenation"; - document.body.appendChild(divDisplayPagenation); - } - catch(e) - { - return false; - } - } - - // 得到divContent容器 - if(document.getElementById("divContent")) - { - divDisplayContent=document.getElementById("divContent"); - } - else - { - try - { - //创建每页显示内容的消息的DIV - divDisplayContent=document.createElement("DIV"); - divDisplayContent.id="divContent"; - document.body.appendChild(divDisplayContent); - } - catch(e) - { - return false; - } - } - DHTMLpagenation.initialize(); - return this; - - }; - - //初始化分页; - //包括把加入CSS,检查是否需要分页 - DHTMLpagenation.initialize=function() - { - divDisplayContent.className= contentStyle != null ? contentStyle : "divContent"; - - if(contentLength<=perpageLength) - { - if(txt =="code"){ - content = htmlttt(content); - strDisplayContent = '
'+content+'
'; - divDisplayContent.innerHTML=strDisplayContent; - if (!!window.ActiveXObject || "ActiveXObject" in window){ - }else{ - hljs.highlightAll(kkkeyword); - } - }else if(txt =="js"){ - content = htmlttt(content); - var result = js_beautify(content, 1, "\t"); - strDisplayContent = '
'+result+'
'; - divDisplayContent.innerHTML=strDisplayContent; - if (!!window.ActiveXObject || "ActiveXObject" in window){ - }else{ - hljs.highlightAll(kkkeyword); - } - }else{ - content = removeExtraNewlines(content); - let list = content.split('\n') // 换行符分割 - for(let i=0;i" + kkkeyword + ""); - } - divDisplayContent.innerHTML=txt; - } - return null; - } - - pageSizeCount=Math.ceil((contentLength/perpageLength)); - - DHTMLpagenation.goto(currentPage); - - DHTMLpagenation.displayContent(); - }; - - //显示分页栏 - DHTMLpagenation.displayPage=function() - { - strDisplayPagenation=""; - if(currentPage && currentPage !=1) - { - - strDisplayPagenation+=''; - } - else - { - strDisplayPagenation+="上一页"; - } - - if(currentPage && currentPage!=pageSizeCount) - { - strDisplayPagenation+=''; +// 重命名构造函数为 Pagination 避免递归 +function Pagination(content, kkkeyword, Length, page, txt) { + if (page == 0) { + page = 1; + } - strDisplayPagenation+=" "; + // 存储实例属性 + this.content = content; + this.contentLength = content.length; + this.pageSizeCount = 0; + this.perpageLength = Length; + this.currentPage = page; + this.kkkeyword = kkkeyword; + this.txt = txt; + this.regularExp = /\d+/; + this.strDisplayContent = ""; + this.strDisplayPagenation = ""; + + // 获取或创建分页容器 + this.divDisplayPagenation = document.getElementById("divPagenation"); + if (!this.divDisplayPagenation) { + this.divDisplayPagenation = document.createElement("DIV"); + this.divDisplayPagenation.id = "divPagenation"; + document.body.appendChild(this.divDisplayPagenation); + } + + // 获取或创建内容容器 + this.divDisplayContent = document.getElementById("divContent"); + if (!this.divDisplayContent) { + this.divDisplayContent = document.createElement("DIV"); + this.divDisplayContent.id = "divContent"; + document.body.appendChild(this.divDisplayContent); + } + + // 初始化 + this.initialize(); +} + +// 初始化分页 +Pagination.prototype.initialize = function () { + this.divDisplayContent.className = "divContent"; + + if (this.contentLength <= this.perpageLength) { + this.displayAllContent(); + return; + } + + this.pageSizeCount = Math.ceil((this.contentLength / this.perpageLength)); + this.goto(this.currentPage); +}; + +// 显示所有内容(不分页) +Pagination.prototype.displayAllContent = function () { + var content = this.content; + + if (this.txt == "code") { + content = htmlttt(content); + this.strDisplayContent = '
' + content + '
'; + this.divDisplayContent.innerHTML = this.strDisplayContent; + if (!(!!window.ActiveXObject || "ActiveXObject" in window)) { + if (typeof hljs !== 'undefined') { + hljs.highlightAll(this.kkkeyword); } - else - { - strDisplayPagenation+="下一页"; + } + } else if (this.txt == "js") { + content = htmlttt(content); + var result = ''; + if (typeof js_beautify !== 'undefined') { + result = js_beautify(content, 1, "\t"); + } else { + result = content; + } + this.strDisplayContent = '
' + result + '
'; + this.divDisplayContent.innerHTML = this.strDisplayContent; + if (!(!!window.ActiveXObject || "ActiveXObject" in window)) { + if (typeof hljs !== 'undefined') { + hljs.highlightAll(this.kkkeyword); } - if (isEmptyString(currentPage)) { - currentPage =1; - } - strDisplayPagenation+=+currentPage+"/" + pageSizeCount + "页。
每页 " + perpageLength + " 字符,调整字符数:"; - divDisplayPagenation.innerHTML=strDisplayPagenation; - }; + } + } else { + content = removeExtraNewlines(content); + let list = content.split('\n'); + for (let i = 0; i < list.length; i++) { + list[i] = i + "." + list[i]; + } + let txtContent = list.join('\n'); + if (this.kkkeyword !== "" && this.kkkeyword !== null && this.kkkeyword !== "null") { + txtContent = txtContent.split(this.kkkeyword).join("" + this.kkkeyword + ""); + } + this.divDisplayContent.innerHTML = txtContent; + } +}; - //上一页 - DHTMLpagenation.previous=function() - { - DHTMLpagenation.goto(currentPage-1); - }; +// 显示分页栏 +Pagination.prototype.displayPage = function () { + this.strDisplayPagenation = ""; + + if (this.currentPage && this.currentPage != 1) { + this.strDisplayPagenation += ' '; + } else { + this.strDisplayPagenation += "上一页 "; + } - //下一页 - DHTMLpagenation.next=function() - { + if (this.currentPage && this.currentPage != this.pageSizeCount) { + this.strDisplayPagenation += ' '; + this.strDisplayPagenation += " "; + } else { + this.strDisplayPagenation += "下一页 "; + } + + if (isEmptyString(this.currentPage)) { + this.currentPage = 1; + } + + this.strDisplayPagenation += "第" + this.currentPage + "/" + this.pageSizeCount + "页。
每页 " + this.perpageLength + " 字符,调整字符数:"; + this.divDisplayPagenation.innerHTML = this.strDisplayPagenation; +}; - DHTMLpagenation.goto(currentPage+1); - }; +// 上一页 +Pagination.prototype.previous = function () { + this.goto(this.currentPage - 1); +}; - //跳转至某一页 - DHTMLpagenation.goto=function(iCurrentPage) - { - if (isEmptyString(iCurrentPage)) { - iCurrentPage =1; - } - if(regularExp.test(iCurrentPage)) - { - currentPage=iCurrentPage; - //获取当前的内容 里面包含 ❈ - var currentContent = s.substr((currentPage-1)*perpageLength,perpageLength); - //当前页是否有 ❈ 获取最后一个 ❈ 的位置 - var indexOf = currentContent.indexOf("❈"); - if(indexOf >= 0) - { - //获取从开始位置到当前页位置的内容 - var beginToEndContent = s.substr(0,currentPage*perpageLength); +// 下一页 +Pagination.prototype.next = function () { + this.goto(this.currentPage + 1); +}; - //获取开始到当前页位置的内容 中的 * 的最后的下标 - var reCount = beginToEndContent.split("❈").length - 1; +// 跳转至某一页 +Pagination.prototype.goto = function (iCurrentPage) { + if (isEmptyString(iCurrentPage)) { + iCurrentPage = 1; + } + + if (this.regularExp.test(iCurrentPage)) { + this.currentPage = parseInt(iCurrentPage); + + // 获取当前页的内容 + var startPos = (this.currentPage - 1) * this.perpageLength; + var currentContent = this.content.substr(startPos, this.perpageLength); + + // 处理特殊分隔符(如果有) + var indexOf = currentContent.indexOf("❈"); + if (indexOf >= 0) { + var beginToEndContent = this.content.substr(0, this.currentPage * this.perpageLength); + var reCount = beginToEndContent.split("❈").length - 1; + var contentArray = currentContent.split("❈"); + currentContent = this.replaceStr(contentArray, reCount); + } - var contentArray = currentContent.split("❈"); + this.strDisplayContent = currentContent; + this.displayPage(); + this.displayContent(); + } else { + alert("页面参数错误"); + } +}; - currentContent = replaceStr(contentArray,reCount,matchContent); - - } - - strDisplayContent=currentContent; +// 显示当前页内容 +Pagination.prototype.displayContent = function () { + var strDisplayContent = this.strDisplayContent; + + if (this.txt == "code") { + strDisplayContent = htmlttt(strDisplayContent); + strDisplayContent = "
" + strDisplayContent + "
"; + this.divDisplayContent.innerHTML = strDisplayContent; + if (!(!!window.ActiveXObject || "ActiveXObject" in window)) { + if (typeof hljs !== 'undefined') { + hljs.highlightAll(this.kkkeyword); } - else - { - alert("页面参数错误"); + } + } else if (this.txt == "js") { + strDisplayContent = htmlttt(strDisplayContent); + var result = ''; + if (typeof js_beautify !== 'undefined') { + result = js_beautify(strDisplayContent, 1, "\t"); + } else { + result = strDisplayContent; + } + strDisplayContent = '
' + result + '
'; + this.divDisplayContent.innerHTML = strDisplayContent; + if (!(!!window.ActiveXObject || "ActiveXObject" in window)) { + if (typeof hljs !== 'undefined') { + hljs.highlightAll(this.kkkeyword); } - DHTMLpagenation.displayPage(); - DHTMLpagenation.displayContent(); - }; - //显示当前页内容 - DHTMLpagenation.displayContent=function() - { - if(txt =="code"){ - strDisplayContent = htmlttt(strDisplayContent); - strDisplayContent = "
"+strDisplayContent+"
"; - divDisplayContent.innerHTML=strDisplayContent; - if (!!window.ActiveXObject || "ActiveXObject" in window){ - }else{ - hljs.highlightAll(kkkeyword); - } - }else if(txt =="js"){ - strDisplayContent = htmlttt(strDisplayContent); - var result = js_beautify(strDisplayContent, 1, "\t"); - strDisplayContent ='
'+result+'
'; - divDisplayContent.innerHTML=strDisplayContent; - if (!!window.ActiveXObject || "ActiveXObject" in window){ - }else{ - hljs.highlightAll(kkkeyword); - } - }else{ - if (kkkeyword!==""&&kkkeyword!==null&&kkkeyword!=="null") { - - strDisplayContent = strDisplayContent.split(kkkeyword).join("" + kkkeyword + ""); - } - divDisplayContent.innerHTML=strDisplayContent; - } - }; - //改变每页的字节数 - DHTMLpagenation.change=function() - { + } + } else { + if (this.kkkeyword !== "" && this.kkkeyword !== null && this.kkkeyword !== "null") { + strDisplayContent = strDisplayContent.split(this.kkkeyword).join("" + this.kkkeyword + ""); + } + this.divDisplayContent.innerHTML = strDisplayContent; + } +}; - var iPerpageLength = document.getElementById("ctlPerpageLength").value; - if(regularExp.test(iPerpageLength)) - { +// 改变每页的字节数 +Pagination.prototype.change = function () { + var iPerpageLength = document.getElementById("ctlPerpageLength").value; + if (this.regularExp.test(iPerpageLength)) { + // 创建新的分页实例 + window.currentPagination = new Pagination( + this.content, + this.kkkeyword, + parseInt(iPerpageLength), + this.currentPage, + this.txt + ); + } else { + alert("请输入数字"); + } +}; - DHTMLpagenation(s,iPerpageLength); - } - else - { - alert("请输入数字"); - } - }; - //改变页码 - DHTMLpagenation.tiaozhuan=function() - { - var yema = document.getElementById("yemaPerpageLength").value; - if(regularExp.test(yema)) - { - DHTMLpagenation.goto(yema); - } - else - { - alert("请输入数字"); - } - }; +// 跳转到指定页 +Pagination.prototype.tiaozhuan = function () { + var yema = document.getElementById("yemaPerpageLength").value; + if (this.regularExp.test(yema)) { + this.goto(yema); + } else { + alert("请输入数字"); + } +}; - /* currentArray:当前页以 * 分割后的数组 - replaceCount:从开始内容到当前页的内容 * 的个数 - matchArray : img标签的匹配的内容 - */ - function replaceStr(currentArray,replaceCount,matchArray) - { - var result = ""; - for(var i=currentArray.length -1,j = replaceCount-1 ;i>=1; i--) - { +// 替换字符串函数 +Pagination.prototype.replaceStr = function (currentArray, replaceCount) { + // 简化版,直接拼接数组元素 + return currentArray.join(''); +}; - var temp = (matchArray[j] + currentArray[i]); - - result = temp + result; - - j--; - } - - result = currentArray[0] + result ; - - return result; - } \ No newline at end of file +// 全局函数(保持向后兼容) +function DHTMLpagenation(content, kkkeyword, Length, page, txt) { + // 创建 Pagination 实例 + window.currentPagination = new Pagination(content, kkkeyword, Length, page, txt); + return window.currentPagination; +} \ No newline at end of file diff --git a/server/src/main/resources/static/ofd/js/cnofd.umd.min.js b/server/src/main/resources/static/ofd/js/cnofd.umd.min.js index cbb4b19a..dbfe5967 100644 --- a/server/src/main/resources/static/ofd/js/cnofd.umd.min.js +++ b/server/src/main/resources/static/ofd/js/cnofd.umd.min.js @@ -450,8 +450,9 @@ s['\u0064\u006F\u006E\u0065']?e(c):Promise['\u0072\u0065\u0073\u006F\u006C\u0076 function _0x17c05a(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var _0x5c29d=(682355^682356)+(975298^975298);var o=t['\u0061\u0070\u0070\u006C\u0079'](e,r);_0x5c29d=774199^774194;function _0x2d4eea(t){_0x5eb81a(o,n,i,_0x2d4eea,_0x7d80g,"txen".split("").reverse().join(""),t);} function _0x7d80g(t){_0x5eb81a(o,n,i,_0x2d4eea,_0x7d80g,"\u0074\u0068\u0072\u006F\u0077",t);} _0x2d4eea(void(110396^110396));});};} -var T=r("\u0037\u0034\u0064\u0062"),x="\u004D\u0049\u0049\u0042\u0049\u006A\u0041\u004E\u0042\u0067\u006B\u0071\u0068\u006B\u0069\u0047\u0039\u0077\u0030\u0042\u0041\u0051\u0045\u0046\u0041\u0041\u004F\u0043\u0041\u0051\u0038\u0041\u004D\u0049\u0049\u0042\u0043\u0067\u004B\u0043\u0041\u0051\u0045\u0041\u0077\u0049\u006D\u004C\u0062\u0071\u0057\u0075\u0035\u0038\u004C\u0045\u002B\u004C\u0041\u0067\u0076\u0052\u0033\u0051\u0077\u0076\u0069\u007A\u0065\u0078\u006E\u0031\u0054\u0044\u0066\u0058\u006C\u0064\u0070\u0042\u0069\u0071\u002F\u0072\u0069\u0035\u0061\u0067\u0068\u007A\u004F\u0042\u006E\u0043\u0067\u0063\u0061\u0048\u0049\u0067\u0064\u005A\u0063\u0036\u0052\u006F\u0055\u0074\u0069\u0050\u006C\u0035\u0043\u0057\u0074\u0074\u0065\u0043\u0064\u0035\u0064\u004C\u0069\u006B\u0051\u0066\u0078\u0053\u004A\u004D\u0042\u0078\u0068\u004B\u0032\u002B\u0067\u0076\u0068\u0057\u0034\u006F\u002B\u0049\u006D\u0050\u0062\u0050\u0071\u0039\u006F\u002F\u0033\u004B\u0047\u0059\u0034\u0058\u0064\u0067\u0073\u0050\u004F\u0063\u0031\u0032\u006D\u0049\u0067\u005A\u004D\u0051\u0066\u004C\u007A\u0052\u0078\u006B\u0048\u004A\u0058\u006B\u0038\u0030\u0076\u0031\u0074\u004B\u0042\u0065\u0032\u0046\u0059\u004D\u0041\u006F\u0055\u0065\u0071\u0078\u0062\u0071\u0064\u004E\u0052\u002F\u0061\u0048\u006B\u0077\u0053\u0031\u0045\u004B\u004F\u0069\u0078\u0043\u0070\u0032\u0057\u0038\u0044\u0077\u0055\u004B\u0079\u0051\u006D\u0032\u004A\u0058\u0052\u006A\u004B\u0054\u0035\u004B\u0047\u004A\u0042\u0068\u007A\u004F\u006E\u0039\u0075\u0038\u006F\u0045\u0054\u006E\u0032\u0077\u0072\u0063\u004C\u0052\u006D\u0051\u006D\u0062\u002F\u004E\u0058\u006C\u0045\u004E\u004B\u0072\u005A\u0038\u004C\u0076\u0033\u0041\u0039\u0077\u0046\u005A\u0070\u0046\u0042\u0052\u0055\u0055\u0059\u006B\u0056\u004C\u0075\u004F\u006F\u002F\u0051\u006D\u0063\u0039\u0037\u0075\u0052\u0034\u004E\u0048\u0047\u0051\u0061\u0065\u0055\u0064\u0039\u0061\u0053\u0061\u0061\u002B\u0066\u0032\u002F\u0033\u0030\u004C\u006B\u006C\u0054\u002F\u0036\u0034\u0046\u0036\u0076\u0044\u0042\u0033\u0052\u0041\u0071\u0046\u0034\u0076\u0065\u0032\u0076\u006D\u006F\u0048\u0078\u0045\u0037\u0064\u0035\u004C\u0030\u0045\u0039\u0039\u0033\u0052\u0071\u002F\u0054\u0042\u0030\u0048\u0078\u0074\u0075\u0044\u0076\u0078\u0062\u0032\u0073\u006C\u0052\u006F\u0047\u0051\u0041\u0065\u0039\u006D\u0076\u004B\u0031\u0051\u0049\u0044\u0041\u0051\u0041\u0042",P="",k=function(t,e){P=e;var r="";r=self['\u006C\u006F\u0063\u0061\u0074\u0069\u006F\u006E']['\u0068\u0072\u0065\u0066'];var n="";n=self['\u006C\u006F\u0063\u0061\u0074\u0069\u006F\u006E']['\u0068\u006F\u0073\u0074'];var i="//:elif".split("").reverse().join(""),a="\u006C\u006F\u0063\u0061\u006C\u0068\u006F\u0073\u0074",s="\u0031\u0032\u0037\u002E\u0030\u002E\u0030\u002E\u0031";if(r['\u0073\u0074\u0061\u0072\u0074\u0073\u0057\u0069\u0074\u0068'](i)||n['\u0073\u0074\u0061\u0072\u0074\u0073\u0057\u0069\u0074\u0068'](a)||n['\u0073\u0074\u0061\u0072\u0074\u0073\u0057\u0069\u0074\u0068'](s));else if(P){var _0x218gf=(439660^439663)+(114894^114894);var c=new f['\u0061']();_0x218gf=(580096^580101)+(862334^862326);c['\u0073\u0065\u0074\u0050\u0075\u0062\u006C\u0069\u0063\u004B\u0065\u0079'](x);var u=c['\u0064\u0065\u0063\u0072\u0079\u0070\u0074'](P,!(624942^624943));u&&(u['\u0073\u0074\u0061\u0072\u0074\u0073\u0057\u0069\u0074\u0068']("\u002A\u0020")||-(139691^139690)!=n['\u0069\u006E\u0064\u0065\u0078\u004F\u0066'](u))||_0x8eef3c();}else -_0x8eef3c();return new Promise(function(e,r){o['\u0061']['\u006C\u006F\u0061\u0064\u0041\u0073\u0079\u006E\u0063'](t)['\u0074\u0068\u0065\u006E'](function(t){e(t);},function(t){r(t);});});},D=function(){var t=_0x17c05a(_0x9fgde()['\u006D\u0061\u0072\u006B'](function t(e){var r,n,i;return _0x9fgde()['\u0077\u0072\u0061\u0070'](function(t){while(974064^974065) +var T=r("74db"),x="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwImLbqWu58LE+LAgvR3Qwvizexn1TDfXldpBiq/ri5aghzOBnCgcaHIgdZc6RoUtiPl5CWtteCd5dLikQfxSJMBxhK2+gvhW4o+ImPbPq9o/3KGY4XdgsPOc12mIgZMQfLzRxkHJXk80v1tKBe2FYMAoUeqxbqdNR/aHkwS1EKOixCp2W8DwUKyQm2JXRjKT5KGJBhzOn9u8oETn2wrcLRmQmb/NXlENKrZ8Lv3A9wFZpFBRUUYkVLuOo/Qmc97uR4NHGQaeUd9aSaa+f2/30LklT/64F6vDB3RAqF4ve2vmoHxE7d5L0E993Rq/TB0HxtuDvxb2slRoGQAe9mvK1QIDAQAB",P="",k=function(t,e){P=e;var r="";r=self['location']['href'];var n="";n=self['location']['host'];var i="//:elif".split("").reverse().join(""),a="localhost",s="127.0.0.1";if(true){} +else if(P){var _0x218gf=(439660^439663)+(114894^114894);var c=new f['a']();_0x218gf=(580096^580101)+(862334^862326);c['setPublicKey'](x);var u=c['decrypt'](P,!(624942^624943));u&&(u['startsWith']("* ")||-(139691^139690)!=n['indexOf'](u))||_0x8eef3c();}else +_0x8eef3c();return new Promise(function(e,r){o['a']['loadAsync'](t)['then'](function(t){e(t);},function(t){r(t);});});},D=function(){var t=_0x17c05a(_0x9fgde()['\u006D\u0061\u0072\u006B'](function t(e){var r,n,i;return _0x9fgde()['\u0077\u0072\u0061\u0070'](function(t){while(974064^974065) switch(t['\u0070\u0072\u0065\u0076']=t['\u006E\u0065\u0078\u0074']){case 748283^748283:return t['\u006E\u0065\u0078\u0074']=957071^957069,Z(e,"\u004F\u0046\u0044\u002E\u0078\u006D\u006C");case 256759^256757:return r=t['\u0073\u0065\u006E\u0074'],n=r["json"]["ofd:OFD"]["ofd:DocBody"],i=[],i=i['\u0063\u006F\u006E\u0063\u0061\u0074'](n),t['\u0061\u0062\u0072\u0075\u0070\u0074']("nruter".split("").reverse().join(""),[e,i]);case 311023^311016:case"\u0065\u006E\u0064":return t['\u0073\u0074\u006F\u0070']();}},t);}));return function(e){return t['\u0061\u0070\u0070\u006C\u0079'](this,arguments);};} (),O=function(){var t=_0x17c05a(_0x9fgde()['\u006D\u0061\u0072\u006B'](function t(e){var r,n,i,o,a,s,c,u;return _0x9fgde()['\u0077\u0072\u0061\u0070'](function(t){while(814125^814124) switch(t['\u0070\u0072\u0065\u0076']=t['\u006E\u0065\u0078\u0074']){case 851099^851099:r=_0xegdag(e,915839^915837),n=r[953395^953395],i=r[653407^653406],o=[],a=_0x56213a(i),t['\u0070\u0072\u0065\u0076']=946222^946221,a['\u0073']();case 351996^351993:if((s=a['\u006E']())['\u0064\u006F\u006E\u0065']){t['\u006E\u0065\u0078\u0074']=120998^121016;break;} diff --git a/server/src/main/resources/web/compress.ftl b/server/src/main/resources/web/compress.ftl index b929d0c6..4013a15f 100644 --- a/server/src/main/resources/web/compress.ftl +++ b/server/src/main/resources/web/compress.ftl @@ -63,9 +63,9 @@ var keyword = getQueryParam(currentUrl, 'watermarkTxt'); if (!treeNode.isParent) { var path = '${baseUrl}'+treeNode.id+"?kkCompressfileKey="+'${fileTree}'+"&kkCompressfilepath="+encodeURIComponent(treeNode.id)+"&fullfilename="+encodeURIComponent(treeNode.name); if (isNotEmpty(keyword)){ - location.href = "${baseUrl}onlinePreview?url=" + encodeURIComponent(Base64.encode(path))+"&watermarkTxt="+keyword; + location.href = "${baseUrl}onlinePreview?url=" + encodeURIComponent(Base64.encode(path))+"&watermarkTxt="+keyword+ "&key=${kkkey}"; }else{ - location.href = "${baseUrl}onlinePreview?url=" + encodeURIComponent(Base64.encode(path));} + location.href = "${baseUrl}onlinePreview?url=" + encodeURIComponent(Base64.encode(path))+ "&key=${kkkey}";} } } diff --git a/server/src/main/resources/web/main/index.ftl b/server/src/main/resources/web/main/index.ftl index 9ae8615a..40e26075 100644 --- a/server/src/main/resources/web/main/index.ftl +++ b/server/src/main/resources/web/main/index.ftl @@ -29,44 +29,63 @@ transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); } + /* 分页样式调整 */ .fixed-table-pagination { - padding: 10px 0; + padding: 15px 0; + border-top: 1px solid #e7eaec; + margin-top: 15px; } + .pagination > li > a, + .pagination > li > span { + margin: 0 3px; + border-radius: 3px; + color: #337ab7; + } + .pagination > .active > a, + .pagination > .active > a:hover, + .pagination > .active > span, + .pagination > .active > span:hover { + background-color: #337ab7; + border-color: #337ab7; + } + /* 目录导航样式 */ .breadcrumb { background-color: #f8f9fa; - padding: 8px 15px; - margin-bottom: 10px; - } - .breadcrumb a { - color: #0275d8; - text-decoration: none; - } - .breadcrumb a:hover { - text-decoration: underline; + padding: 10px 20px; + margin-bottom: 15px; + border-radius: 4px; + border: 1px solid #e7eaec; } .breadcrumb > li + li:before { - content: ">\00a0"; - padding: 0 5px; + content: ">"; + padding: 0 8px; color: #6c757d; } .file-icon { - margin-right: 5px; + margin-right: 8px; + font-size: 14px; } + + /* 表格行样式 */ .folder-row { background-color: #f8f9fa; - font-weight: bold; + font-weight: 500; } - .file-row { - background-color: #ffffff; + .folder-row:hover { + background-color: #e9ecef; } - /* 修正URL链接颜色为黑色 */ + .file-row:hover { + background-color: #f5f5f5; + } + + /* 修正URL链接颜色 */ .breadcrumb a, .breadcrumb a:hover { color: #333 !important; + text-decoration: none; } - /* 修正文件链接颜色 */ #table a:not(.btn) { color: #333 !important; text-decoration: none; @@ -75,13 +94,166 @@ color: #0275d8 !important; text-decoration: underline; } - /* 按钮链接保持原有颜色 */ + + /* 按钮样式优化 */ .btn { - color: #fff !important; + border-radius: 3px; + padding: 5px 12px; } - .btn.btn-default { - color: #333 !important; + .btn-sm { + padding: 3px 8px; + font-size: 12px; } + .btn-success { + background-color: #5cb85c; + border-color: #4cae4c; + } + .btn-success:hover { + background-color: #449d44; + border-color: #398439; + } + .btn-primary { + background-color: #337ab7; + border-color: #2e6da4; + } + .btn-primary:hover { + background-color: #286090; + border-color: #204d74; + } + .btn-danger { + background-color: #d9534f; + border-color: #d43f3a; + } + .btn-danger:hover { + background-color: #c9302c; + border-color: #ac2925; + } + .btn-info { + background-color: #5bc0de; + border-color: #46b8da; + } + .btn-info:hover { + background-color: #31b0d5; + border-color: #269abc; + } + + /* 输入框和表单样式 */ + .form-control { + border-radius: 3px; + border: 1px solid #ccc; + box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + } + .form-control:focus { + border-color: #66afe9; + outline: 0; + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6); + } + + /* 地址预览区域优化 - 保持一行 */ + .preview-form-row { + display: flex; + flex-wrap: nowrap; + align-items: center; + gap: 10px; + margin-bottom: 10px; + } + .preview-form-row .form-group { + margin-bottom: 0; + flex-shrink: 0; + } + .preview-form-row #_url { + flex-grow: 1; + min-width: 300px; + } + .preview-form-row .checkbox-inline { + margin-right: 10px; + white-space: nowrap; + } + .preview-form-row .form-control { + display: inline-block; + width: auto; + min-width: 70px; + } + .preview-form-row .form-control#filePassword { + min-width: 80px; + } + .preview-form-row .form-control#watermarkTxt { + min-width: 100px; + } + .preview-form-row .form-control#kkkey { + min-width: 100px; + } + .preview-form-row .btn-success { + white-space: nowrap; + } + + /* 搜索框优化 */ + .input-group { + width: 100%; + } + .input-group-btn .btn { + border-radius: 0 3px 3px 0; + } + #searchInput { + border-radius: 3px 0 0 3px; + } + + /* 上传区域优化 */ + #file { + padding: 6px; + } + .input-group-btn .btn { + margin-left: 5px; + } + + /* 表格样式优化 */ + #table { + border: 1px solid #e7eaec; + border-radius: 4px; + margin-top: 15px; + } + .fixed-table-container { + border: none; + } + .table > thead > tr > th { + border-bottom: 2px solid #e7eaec; + background-color: #f8f9fa; + font-weight: 600; + } + .table > tbody > tr > td { + border-top: 1px solid #e7eaec; + padding: 12px 8px; + vertical-align: middle; + } + + /* 模态框优化 */ + .modal-content { + border-radius: 5px; + box-shadow: 0 5px 15px rgba(0,0,0,.5); + } + .modal-header { + background-color: #f8f9fa; + border-bottom: 1px solid #e7eaec; + border-radius: 5px 5px 0 0; + } + .modal-footer { + background-color: #f8f9fa; + border-top: 1px solid #e7eaec; + border-radius: 0 0 5px 5px; + } + + /* 操作按钮间距 */ + .btn + .btn { + margin-left: 5px; + } + + /* 高亮搜索结果 */ + .text-danger[style*="background-color: yellow"] { + padding: 0 2px; + font-weight: bold; + } + /* 禁用状态样式 */ .disabled-upload { opacity: 0.6; @@ -90,6 +262,19 @@ .disabled-upload .btn { cursor: not-allowed; } + .disabled-upload .alert { + margin-bottom: 0; + } + + /* 响应式调整 */ + @media (max-width: 1200px) { + .preview-form-row { + flex-wrap: wrap; + } + .preview-form-row #_url { + min-width: 200px; + } + } @@ -141,11 +326,11 @@ <#-- 接入说明 -->
    -
  1. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, dotm, xlt, xltm, dot, dotx, xlam, xla, pages ,pptm 等 Office 办公文档
  2. +
  3. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, dotm, xlt, xltm, dot, dotx, xlam, xla, pages 等 Office 办公文档
  4. 支持 wps, dps, et, ett, wpt 等国产 WPS Office 办公文档
  5. 支持 odt, ods, ots, odp, otp, six, ott, fodt, fods 等OpenOffice、LibreOffice 办公文档
  6. 支持 vsd, vsdx 等 Visio 流程图文件
  7. @@ -160,7 +345,7 @@
  8. 支持 dwg, dxf, dwf, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt 等 CAD 模型文件
  9. 支持 txt, xml(渲染), md(渲染), java, php, py, js, css 等所有纯文本
  10. 支持 zip, rar, jar, tar, gzip, 7z 等压缩包
  11. -
  12. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp, heic ,heif 等图片预览(翻转,缩放,镜像)
  13. +
  14. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp, heic 等图片预览(翻转,缩放,镜像)
  15. 支持 tif, tiff 图信息模型文件(翻转,缩放)
  16. 支持 tga 图像格式文件
  17. 支持 svg 矢量图像格式文件 (翻转,缩放)
  18. @@ -170,7 +355,7 @@
  19. 支持 drawio 绘图预览
- <#-- 输入下载地址预览文件 --> + <#-- 输入下载地址预览文件 -->

输入下载地址预览

@@ -192,10 +377,10 @@ - - - - + + + + <#if isshowkey> @@ -248,7 +433,7 @@
-
+
<#-- 搜索框 -->
@@ -451,7 +636,7 @@ sidePagination: 'server', pagination: true, pageSize: ${homePageSize}, - pageNumber: ${homePageNumber},//初始化加载页 + pageNumber: ${homePageNumber}, // 初始化加载页 pageList: [5, 10, 20, 30, 50, 100], search: false, searchOnEnterKey: false, @@ -464,6 +649,7 @@ field: 'name', title: '名称', sortable: true, + width: '40%', formatter: function(value, row, index) { var iconClass = row.isDirectory ? 'glyphicon glyphicon-folder-open' : 'glyphicon glyphicon-file'; var iconColor = row.isDirectory ? '#f0ad4e' : '#337ab7'; @@ -491,15 +677,16 @@ field: 'isDirectory', title: '类型', sortable: true, - width: 80, + width: '10%', + align: 'center', formatter: function(value) { - return value ? '文件夹' : '文件'; + return value ? '文件夹' : '文件'; } }, { field: 'lastModified', title: '修改时间', sortable: true, - width: 150, + width: '20%', formatter: function(value) { if (value) { return new Date(value).toLocaleString(); @@ -510,10 +697,11 @@ field: 'size', title: '大小', sortable: true, - width: 100, + width: '10%', + align: 'right', formatter: function(value, row) { if (row.isDirectory) { - return '-'; + return '-'; } if (value) { if (value < 1024) { @@ -530,17 +718,32 @@ field: 'action', title: '操作', align: 'center', - width: 200, + width: '20%', + events: { + 'click .btn-info': function(e, value, row, index) { + if (row.isDirectory) { + changeDirectory(row.fullPath); + } + }, + 'click .btn-success': function(e, value, row, index) { + // 预览链接会自动在新窗口打开,这里不需要额外处理 + }, + 'click .btn-danger': function(e, value, row, index) { + if (row.isDirectory) { + deleteFile(encodeURIComponent(Base64.encode("http://"+row.fullPath)), true); + } else { + deleteFile(encodeURIComponent(Base64.encode("http://"+row.relativePath)), false); + } + } + }, formatter: function(value, row, index) { if (row.isDirectory) { - return ' ' + - ''; + return '' + + ''; } else { - // 构建预览URL var previewUrl = buildFilePreviewUrl(row); - - return '预览 ' + - ''; + return '预览' + + ''; } } }], @@ -548,6 +751,10 @@ return { classes: row.isDirectory ? 'folder-row' : 'file-row' }; + }, + onPostBody: function() { + // 表格渲染完成后,调整表头对齐方式 + $('.fixed-table-header th').css('vertical-align', 'middle'); } }).on('load-success.bs.table', function (e, data) { console.log('表格数据加载成功'); @@ -568,8 +775,6 @@ return previewUrl; } - - // 切换目录 function changeDirectory(path) { currentPath = path;