From e9b8835521e0764978aea78b4d6e83e1206e8d46 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 29 Jul 2020 19:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E6=A0=BC=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E9=85=8D=E7=BD=AE=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/controller/DemoTableController.java | 9 ++ .../print/bootstrap-table-print.min.js | 10 +++ .../resources/templates/demo/table/print.html | 83 +++++++++++++++++++ .../src/main/resources/templates/include.html | 5 ++ .../src/main/resources/templates/index.html | 1 + 5 files changed, 108 insertions(+) create mode 100644 ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.min.js create mode 100644 ruoyi-admin/src/main/resources/templates/demo/table/print.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java index 8093ae12..3ca31e82 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java @@ -241,6 +241,15 @@ public class DemoTableController extends BaseController return prefix + "/refresh"; } + /** + * 表格打印配置 + */ + @GetMapping("/print") + public String print() + { + return prefix + "/print"; + } + /** * 表格其他操作 */ diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.min.js new file mode 100644 index 00000000..a4948889 --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.min.js @@ -0,0 +1,10 @@ +/** + * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) + * + * @version v1.17.1 + * @homepage https://bootstrap-table.com + * @author wenzhixin (http://wenzhixin.net.cn/) + * @license MIT + */ + +!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r((t=t||self).jQuery)}(this,(function(t){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,r){return t(r={exports:{}},r.exports),r.exports}var e=function(t){return t&&t.Math==Math&&t},o=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof r&&r)||Function("return this")(),i=function(t){try{return!!t()}catch(t){return!0}},c=!i((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,f={f:u&&!a.call({1:2},1)?function(t){var r=u(this,t);return!!r&&r.enumerable}:a},l=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},s={}.toString,p=function(t){return s.call(t).slice(8,-1)},y="".split,d=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?y.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return d(h(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},b=function(t,r){if(!g(t))return t;var n,e;if(r&&"function"==typeof(n=t.toString)&&!g(e=n.call(t)))return e;if("function"==typeof(n=t.valueOf)&&!g(e=n.call(t)))return e;if(!r&&"function"==typeof(n=t.toString)&&!g(e=n.call(t)))return e;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,w=function(t,r){return m.call(t,r)},O=o.document,S=g(O)&&g(O.createElement),j=function(t){return S?O.createElement(t):{}},T=!c&&!i((function(){return 7!=Object.defineProperty(j("div"),"a",{get:function(){return 7}}).a})),P=Object.getOwnPropertyDescriptor,A={f:c?P:function(t,r){if(t=v(t),r=b(r,!0),T)try{return P(t,r)}catch(t){}if(w(t,r))return l(!f.f.call(t,r),t[r])}},x=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},_=Object.defineProperty,L={f:c?_:function(t,r,n){if(x(t),r=b(r,!0),x(n),T)try{return _(t,r,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},C=c?function(t,r,n){return L.f(t,r,l(1,n))}:function(t,r,n){return t[r]=n,t},E=function(t,r){try{C(o,t,r)}catch(n){o[t]=r}return r},I=o["__core-js_shared__"]||E("__core-js_shared__",{}),k=Function.toString;"function"!=typeof I.inspectSource&&(I.inspectSource=function(t){return k.call(t)});var F,M,N,R=I.inspectSource,D=o.WeakMap,G="function"==typeof D&&/native code/.test(R(D)),V=n((function(t){(t.exports=function(t,r){return I[t]||(I[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.6.0",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),B=0,z=Math.random(),U=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++B+z).toString(36)},q=V("keys"),W=function(t){return q[t]||(q[t]=U(t))},$={},H=o.WeakMap;if(G){var Y=new H,J=Y.get,Q=Y.has,K=Y.set;F=function(t,r){return K.call(Y,t,r),r},M=function(t){return J.call(Y,t)||{}},N=function(t){return Q.call(Y,t)}}else{var X=W("state");$[X]=!0,F=function(t,r){return C(t,X,r),r},M=function(t){return w(t,X)?t[X]:{}},N=function(t){return w(t,X)}}var Z,tt={set:F,get:M,has:N,enforce:function(t){return N(t)?M(t):F(t,{})},getterFor:function(t){return function(r){var n;if(!g(r)||(n=M(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},rt=n((function(t){var r=tt.get,n=tt.enforce,e=String(String).split("String");(t.exports=function(t,r,i,c){var a=!!c&&!!c.unsafe,u=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof i&&("string"!=typeof r||w(i,"name")||C(i,"name",r),n(i).source=e.join("string"==typeof r?r:"")),t!==o?(a?!f&&t[r]&&(u=!0):delete t[r],u?t[r]=i:C(t,r,i)):u?t[r]=i:E(r,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&r(this).source||R(this)}))})),nt=o,et=function(t){return"function"==typeof t?t:void 0},ot=function(t,r){return arguments.length<2?et(nt[t])||et(o[t]):nt[t]&&nt[t][r]||o[t]&&o[t][r]},it=Math.ceil,ct=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ct:it)(t)},ut=Math.min,ft=function(t){return t>0?ut(at(t),9007199254740991):0},lt=Math.max,st=Math.min,pt=function(t,r){var n=at(t);return n<0?lt(n+r,0):st(n,r)},yt=function(t){return function(r,n,e){var o,i=v(r),c=ft(i.length),a=pt(e,c);if(t&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},dt={includes:yt(!0),indexOf:yt(!1)},ht=dt.indexOf,vt=function(t,r){var n,e=v(t),o=0,i=[];for(n in e)!w($,n)&&w(e,n)&&i.push(n);for(;r.length>o;)w(e,n=r[o++])&&(~ht(i,n)||i.push(n));return i},gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=gt.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(t){return vt(t,bt)}},wt={f:Object.getOwnPropertySymbols},Ot=ot("Reflect","ownKeys")||function(t){var r=mt.f(x(t)),n=wt.f;return n?r.concat(n(t)):r},St=function(t,r){for(var n=Ot(r),e=L.f,o=A.f,i=0;ii;)L.f(t,n=e[i++],r[n]);return t},Dt=ot("document","documentElement"),Gt=W("IE_PROTO"),Vt=function(){},Bt=function(t){return" + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/include.html b/ruoyi-admin/src/main/resources/templates/include.html index 01f8d2bc..ede6763f 100644 --- a/ruoyi-admin/src/main/resources/templates/include.html +++ b/ruoyi-admin/src/main/resources/templates/include.html @@ -200,3 +200,8 @@
+ + +
+ +
diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index b6863814..ab4c13ad 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -117,6 +117,7 @@
  • 表格行内编辑
  • 主子表提交
  • 表格自动刷新
  • +
  • 表格打印配置
  • 表格其他操作