更新部分代码
This commit is contained in:
parent
c52ba00f4f
commit
0de4168429
4
pom.xml
4
pom.xml
|
|
@ -213,7 +213,9 @@
|
||||||
<module>ruoyi-quartz</module>
|
<module>ruoyi-quartz</module>
|
||||||
<module>ruoyi-generator</module>
|
<module>ruoyi-generator</module>
|
||||||
<module>ruoyi-common</module>
|
<module>ruoyi-common</module>
|
||||||
</modules>
|
<module>ruoyi-imark</module>
|
||||||
|
<module>ruoyi-cloud</module>
|
||||||
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ spring:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: password
|
password: control
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
'<thead></thead>',
|
'<thead></thead>',
|
||||||
'</table>',
|
'</table>',
|
||||||
'</div>'].join(''));
|
'</div>'].join(''));
|
||||||
|
|
||||||
this.$fixedHeader.find('table').attr('class', this.$el.attr('class'));
|
this.$fixedHeader.find('table').attr('class', this.$el.attr('class'));
|
||||||
this.$fixedHeaderColumns = this.$fixedHeader.find('thead');
|
this.$fixedHeaderColumns = this.$fixedHeader.find('thead');
|
||||||
this.$tableHeader.before(this.$fixedHeader);
|
this.$tableHeader.before(this.$fixedHeader);
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
this.$rightfixedBodyColumns = this.$rightfixedBody.find('tbody');
|
this.$rightfixedBodyColumns = this.$rightfixedBody.find('tbody');
|
||||||
this.$tableBody.before(this.$rightfixedBody);
|
this.$tableBody.before(this.$rightfixedBody);
|
||||||
if (this.options.fixedColumns) {
|
if (this.options.fixedColumns) {
|
||||||
$('.right-fixed-table-columns').attr('style','right:0px');
|
$('.right-fixed-table-columns').attr('style','right:0px;');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -93,9 +93,9 @@
|
||||||
this.$fixedHeaderColumns.html('').append($ltr);
|
this.$fixedHeaderColumns.html('').append($ltr);
|
||||||
this.$selectAll = $ltr.find('[name="btSelectAll"]');
|
this.$selectAll = $ltr.find('[name="btSelectAll"]');
|
||||||
this.$selectAll.on('click', function () {
|
this.$selectAll.on('click', function () {
|
||||||
var checked = $(this).prop('checked');
|
var checked = $(this).prop('checked');
|
||||||
$(".left-fixed-body-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked);
|
$(".left-fixed-body-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked);
|
||||||
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -183,21 +183,16 @@
|
||||||
this.$fixedHeader.width(headerWidth + 2).show();
|
this.$fixedHeader.width(headerWidth + 2).show();
|
||||||
}
|
}
|
||||||
if (that.options.rightFixedColumns) {
|
if (that.options.rightFixedColumns) {
|
||||||
|
headerWidth = 0;
|
||||||
|
var totalLength = $("#" + table.options.id).find('th').length;
|
||||||
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
|
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
index = i;
|
index = totalLength - i - 1;
|
||||||
|
|
||||||
if (i >= visibleFields.length - that.options.rightFixedNumber) {
|
if (i >= that.options.rightFixedNumber) {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
if (that.options.detailView && !that.options.cardView) {
|
|
||||||
index = i - 1;
|
|
||||||
}
|
|
||||||
that.$rightfixedBody.find('thead th[data-field="' + visibleFields[index] + '"]')
|
|
||||||
.find('.fht-cell').width($this.innerWidth() - 1);
|
|
||||||
headerWidth += $this.outerWidth();
|
|
||||||
}
|
}
|
||||||
|
headerWidth += $("#" + table.options.id).find("tr:first-child>th").eq(index).width();
|
||||||
});
|
});
|
||||||
this.$rightfixedBody.width(headerWidth - 1).show();
|
this.$rightfixedBody.width(headerWidth - 1).show();
|
||||||
}
|
}
|
||||||
|
|
@ -213,7 +208,7 @@
|
||||||
this.$fixedBody.hide();
|
this.$fixedBody.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.options.height) {
|
if (!this.options.height) {
|
||||||
top = this.$fixedHeader.height()- 1;
|
top = this.$fixedHeader.height()- 1;
|
||||||
height = height - top;
|
height = height - top;
|
||||||
|
|
@ -221,58 +216,59 @@
|
||||||
|
|
||||||
this.$fixedBody.css({
|
this.$fixedBody.css({
|
||||||
width: this.$fixedHeader.width(),
|
width: this.$fixedHeader.width(),
|
||||||
height: height,
|
height: height - 12,
|
||||||
top: top + 1
|
top: top + 1
|
||||||
}).show();
|
}).show();
|
||||||
|
|
||||||
var bsHeight = $("#" + table.options.id).find("tr").eq(1).height();
|
var bsHeight = $("#" + table.options.id).find("tr").eq(1).height();
|
||||||
var fixedHeight = $("#" + table.options.id).parent().prev().find("tr").eq(1).height();
|
var fixedHeight = $("#" + table.options.id).parent().prev().find("tr").eq(1).height();
|
||||||
var resizeHeight = bsHeight > fixedHeight ? bsHeight: fixedHeight;
|
var resizeHeight = bsHeight > fixedHeight ? bsHeight: fixedHeight;
|
||||||
this.$body.find('> tr').each(function (i) {
|
this.$body.find('> tr').each(function (i) {
|
||||||
that.$fixedBody.find('tr:eq(' + i + ')').height(i == 0 ? resizeHeight - 1 : resizeHeight);
|
that.$fixedBody.find('tr:eq(' + i + ')').height(i == 0 ? resizeHeight - 1 : resizeHeight);
|
||||||
|
$("#" + table.options.id).find('tbody>tr:eq(' + i + ')').height(resizeHeight);
|
||||||
var thattds = this;
|
var thattds = this;
|
||||||
that.$fixedBody.find('tr:eq(' + i + ')').find('td').each(function (j) {
|
that.$fixedBody.find('tr:eq(' + i + ')').find('td').each(function (j) {
|
||||||
$(this).width($($(thattds).find('td')[j]).width() + 1);
|
$(this).width($($(thattds).find('td')[j]).width() + 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#" + table.options.id).on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
|
$("#" + table.options.id).on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
|
||||||
var index= $element.data('index');
|
var index= $element.data('index');
|
||||||
$(this).find('.bs-checkbox').find('input[data-index="' + index + '"]').prop("checked", true);
|
$(this).find('.bs-checkbox').find('input[data-index="' + index + '"]').prop("checked", true);
|
||||||
var selectFixedItem = $('.left-fixed-body-columns input[name=btSelectItem]');
|
var selectFixedItem = $('.left-fixed-body-columns input[name=btSelectItem]');
|
||||||
var checkAll = selectFixedItem.filter(':enabled').length &&
|
var checkAll = selectFixedItem.filter(':enabled').length &&
|
||||||
selectFixedItem.filter(':enabled').length ===
|
selectFixedItem.filter(':enabled').length ===
|
||||||
selectFixedItem.filter(':enabled').filter(':checked').length;
|
selectFixedItem.filter(':enabled').filter(':checked').length;
|
||||||
$(".left-fixed-table-columns input[name=btSelectAll]").prop('checked', checkAll);
|
$(".left-fixed-table-columns input[name=btSelectAll]").prop('checked', checkAll);
|
||||||
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#" + table.options.id).off('click', '.fixed-table-body').on('click', '.th-inner', function (event) {
|
$("#" + table.options.id).off('click', '.fixed-table-body').on('click', '.th-inner', function (event) {
|
||||||
$.each(that.$fixedHeader.find('th'), function (i, th) {
|
$.each(that.$fixedHeader.find('th'), function (i, th) {
|
||||||
$(th).find('.sortable').removeClass('desc asc').addClass('both');
|
$(th).find('.sortable').removeClass('desc asc').addClass('both');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// events
|
// events
|
||||||
this.$fixedHeader.off('click', '.th-inner').on('click', '.th-inner', function (event) {
|
this.$fixedHeader.off('click', '.th-inner').on('click', '.th-inner', function (event) {
|
||||||
var target = $(this);
|
var target = $(this);
|
||||||
var $this = event.type === "keypress" ? $(event.currentTarget) : $(event.currentTarget).parent(), $this_ = that.$header.find('th').eq($this.index());
|
var $this = event.type === "keypress" ? $(event.currentTarget) : $(event.currentTarget).parent(), $this_ = that.$header.find('th').eq($this.index());
|
||||||
|
|
||||||
var sortOrder = "";
|
var sortOrder = "";
|
||||||
if (table.options.sortName === $this.data('field')) {
|
if (table.options.sortName === $this.data('field')) {
|
||||||
sortOrder = table.options.sortOrder === 'asc' ? 'desc' : 'asc';
|
sortOrder = table.options.sortOrder === 'asc' ? 'desc' : 'asc';
|
||||||
} else {
|
} else {
|
||||||
sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
|
sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
|
||||||
}
|
}
|
||||||
table.options.sortOrder = sortOrder;
|
table.options.sortOrder = sortOrder;
|
||||||
var sortName = $this.data('sortName') ? $this.data('sortName') : $this.data('field');
|
var sortName = $this.data('sortName') ? $this.data('sortName') : $this.data('field');
|
||||||
if (target.parent().data().sortable) {
|
if (target.parent().data().sortable) {
|
||||||
$.each(that.$fixedHeader.find('th'), function (i, th) {
|
$.each(that.$fixedHeader.find('th'), function (i, th) {
|
||||||
$(th).find('.sortable').removeClass('desc asc').addClass(($(th).data('field') === sortName || $(th).data('sortName') === sortName) ? sortOrder : 'both');
|
$(th).find('.sortable').removeClass('desc asc').addClass(($(th).data('field') === sortName || $(th).data('sortName') === sortName) ? sortOrder : 'both');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$tableBody.on('scroll', function () {
|
this.$tableBody.on('scroll', function () {
|
||||||
that.$fixedBody.find('table').css('top', -$(this).scrollTop());
|
that.$fixedBody.find('table').css('top', -$(this).scrollTop());
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@
|
||||||
showColumns: false,
|
showColumns: false,
|
||||||
fixedColumns: true,
|
fixedColumns: true,
|
||||||
fixedNumber: 3,
|
fixedNumber: 3,
|
||||||
|
rightFixedColumns: true,
|
||||||
|
rightFixedNumber: 3,
|
||||||
columns: [{
|
columns: [{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>4.3.1</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-cloud</artifactId>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
# 代码生成
|
# 代码生成
|
||||||
gen:
|
gen:
|
||||||
# 作者
|
# 作者
|
||||||
author: ruoyi
|
author: GideonYeung
|
||||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.system
|
packageName: com.ruoyi.dataentry
|
||||||
# 自动去除表前缀,默认是false
|
# 自动去除表前缀,默认是false
|
||||||
autoRemovePre: false
|
autoRemovePre: true
|
||||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||||
tablePrefix: sys_
|
tablePrefix: db_
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>4.3.1</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-imark</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!--通用模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mysql驱动包 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 核心模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
Loading…
Reference in New Issue