diff --git a/pom.xml b/pom.xml
index 403d891cf..8e9d4a41f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,14 +22,14 @@
1.2.6
1.21
2.3.2
- 2.9.2
+ 3.0.0
2.1.4
1.3.0
1.2.76
- 5.6.0
- 5.7.0
- 2.5
- 1.3.3
+ 5.7.4
+ 5.8.0
+ 2.10.0
+ 1.4
4.1.2
1.7
@@ -47,21 +47,21 @@
import
-
+
com.alibaba
druid-spring-boot-starter
${druid.version}
-
+
com.github.penggle
kaptcha
${kaptcha.version}
-
+
org.apache.shiro
shiro-core
@@ -129,16 +129,12 @@
${jna.version}
-
+
io.springfox
- springfox-swagger2
+ springfox-boot-starter
${swagger.version}
-
- io.swagger
- swagger-annotations
-
io.swagger
swagger-models
@@ -146,21 +142,14 @@
-
-
- io.springfox
- springfox-swagger-ui
- ${swagger.version}
-
-
-
+
commons-io
commons-io
${commons.io.version}
-
+
commons-fileupload
commons-fileupload
@@ -174,7 +163,7 @@
${poi.version}
-
+
org.apache.velocity
velocity
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 5dbd4ce2d..fa9b21d73 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -30,29 +30,17 @@
true
-
+
io.springfox
- springfox-swagger2
-
-
-
-
- io.swagger
- swagger-annotations
- 1.5.21
+ springfox-boot-starter
+
io.swagger
swagger-models
- 1.5.21
-
-
-
-
- io.springfox
- springfox-swagger-ui
+ 1.6.2
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 82c53ceb9..06fb5480c 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
@@ -339,6 +339,15 @@ public class DemoTableController extends BaseController
return prefix + "/dynamicColumns";
}
+ /**
+ * 自定义视图分页
+ */
+ @GetMapping("/customView")
+ public String customView()
+ {
+ return prefix + "/customView";
+ }
+
/**
* 表格其他操作
*/
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
index cfa748f30..079d7d2a7 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java
@@ -19,6 +19,6 @@ public class SwaggerController extends BaseController
@GetMapping()
public String index()
{
- return redirect("/swagger-ui.html");
+ return redirect("/swagger-ui/index.html");
}
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
index d4f020098..0cfbfbadb 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
@@ -12,7 +12,6 @@ import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* Swagger2的接口配置
@@ -20,7 +19,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
* @author ruoyi
*/
@Configuration
-@EnableSwagger2
public class SwaggerConfig
{
/** 是否开启swagger */
@@ -33,7 +31,7 @@ public class SwaggerConfig
@Bean
public Docket createRestApi()
{
- return new Docket(DocumentationType.SWAGGER_2)
+ return new Docket(DocumentationType.OAS_30)
// 是否启用Swagger
.enable(enabled)
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js
new file mode 100644
index 000000000..a33bd170a
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js
@@ -0,0 +1,108 @@
+/**
+ * @author zhixin wen
+ */
+
+const Utils = $.fn.bootstrapTable.utils
+
+$.extend($.fn.bootstrapTable.defaults, {
+ customView: false,
+ showCustomView: false,
+ showCustomViewButton: false
+})
+
+$.extend($.fn.bootstrapTable.defaults.icons, {
+ customView: {
+ bootstrap3: 'glyphicon glyphicon-eye-open',
+ bootstrap5: 'bi-eye',
+ bootstrap4: 'fa fa-eye',
+ semantic: 'fa fa-eye',
+ foundation: 'fa fa-eye',
+ bulma: 'fa fa-eye',
+ materialize: 'remove_red_eye'
+ }[$.fn.bootstrapTable.theme] || 'fa-eye'
+})
+
+$.extend($.fn.bootstrapTable.defaults, {
+ onCustomViewPostBody () {
+ return false
+ },
+ onCustomViewPreBody () {
+ return false
+ }
+})
+
+$.extend($.fn.bootstrapTable.locales, {
+ formatToggleCustomView () {
+ return 'Toggle custom view'
+ }
+})
+$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales)
+
+$.fn.bootstrapTable.methods.push('toggleCustomView')
+
+$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
+ 'custom-view-post-body.bs.table': 'onCustomViewPostBody',
+ 'custom-view-pre-body.bs.table': 'onCustomViewPreBody'
+})
+
+$.BootstrapTable = class extends $.BootstrapTable {
+
+ init () {
+ this.showCustomView = this.options.showCustomView
+
+ super.init()
+ }
+
+ initToolbar (...args) {
+ if (this.options.customView && this.options.showCustomViewButton) {
+ this.buttons = Object.assign(this.buttons, {
+ customView: {
+ text: this.options.formatToggleCustomView(),
+ icon: this.options.icons.customView,
+ event: this.toggleCustomView,
+ attributes: {
+ 'aria-label': this.options.formatToggleCustomView(),
+ title: this.options.formatToggleCustomView()
+ }
+ }
+ })
+ }
+
+ super.initToolbar(...args)
+ }
+
+ initBody () {
+ super.initBody()
+
+ if (!this.options.customView) {
+ return
+ }
+
+ const $table = this.$el
+ const $customViewContainer = this.$container.find('.fixed-table-custom-view')
+
+ $table.hide()
+ $customViewContainer.hide()
+ if (!this.options.customView || !this.showCustomView) {
+ $table.show()
+ return
+ }
+
+ const data = this.getData().slice(this.pageFrom - 1, this.pageTo)
+ const value = Utils.calculateObjectValue(this, this.options.customView, [data], '')
+
+ this.trigger('custom-view-pre-body', data, value)
+ if ($customViewContainer.length === 1) {
+ $customViewContainer.show().html(value)
+ } else {
+ this.$tableBody.after(`${value}
`)
+ }
+
+ this.trigger('custom-view-post-body', data, value)
+ }
+
+ toggleCustomView () {
+ this.showCustomView = !this.showCustomView
+ this.initBody()
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js
index 7f9f04c6d..08f9a1288 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js
@@ -152,11 +152,16 @@ jQuery.tableDnD = {
config.dragHandle
// We only need to add the event to the specified cells
&& $(config.dragHandle, table).each(function() {
- // The cell is bound to "this"
- $(this).bind(startEvent, function(e) {
- $.tableDnD.initialiseDrag($(this).parents('tr')[0], table, this, e, config);
- return false;
- });
+ if (! $(this).hasClass("nodrag")) {
+ // The cell is bound to "this"
+ $(this).bind(startEvent, function(e) {
+ if (e.target.tagName === "TD" && event.target.className !== "nodrag") {
+ $.tableDnD.initialiseDrag($(this).parents('tr')[0], table, this, e, config);
+ return false;
+ }
+ return true;
+ });
+ }
})
// For backwards compatibility, we add the event to the whole row
// get all the rows as a wrapped set
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
index b7024ca83..4cdcb28e8 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
@@ -61,6 +61,7 @@ var table = {
showColumns: true,
showToggle: true,
showExport: false,
+ showPrint: false,
exportDataType: 'all',
exportTypes: ['csv', 'txt', 'doc', 'excel'],
clickToSelect: false,
@@ -110,6 +111,7 @@ var table = {
showColumns: options.showColumns, // 是否显示隐藏某列下拉框
showToggle: options.showToggle, // 是否显示详细视图和列表视图的切换按钮
showExport: options.showExport, // 是否支持导出文件
+ showPrint: options.showPrint, // 是否支持打印页面
showHeader: options.showHeader, // 是否显示表头
showFullscreen: options.showFullscreen, // 是否显示全屏按钮
uniqueId: options.uniqueId, // 唯一的标识符
@@ -470,6 +472,11 @@ var table = {
pageSize: pageSize
});
},
+ // 刷新options配置
+ refreshOptions: function(options, tableId) {
+ var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
+ $("#" + currentId).bootstrapTable('refreshOptions', options);
+ },
// 查询表格指定列值
selectColumns: function(column) {
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
diff --git a/ruoyi-admin/src/main/resources/templates/demo/modal/form.html b/ruoyi-admin/src/main/resources/templates/demo/modal/form.html
index f9e201518..f9c749d65 100644
--- a/ruoyi-admin/src/main/resources/templates/demo/modal/form.html
+++ b/ruoyi-admin/src/main/resources/templates/demo/modal/form.html
@@ -91,5 +91,12 @@
+