Compare commits

...

3 commits

Author SHA1 Message Date
RB
03a2405964 Update DataExporter.java 2024-09-11 19:03:50 +08:00
RB
7b3569d895 be 2024-09-11 17:38:04 +08:00
RB
d78863212a be 2024-09-11 17:16:00 +08:00
7 changed files with 31 additions and 10 deletions

2
@rbv

@ -1 +1 @@
Subproject commit 734c2297f22409c82bd1f70228362c245c4db246
Subproject commit f7cd2def480c19edbf2cc36aca2e1811b027decc

View file

@ -105,8 +105,10 @@ public class DataExporter extends SetUser {
final List<String> head = this.buildHead(builder);
// Excel
if ("xls".equalsIgnoreCase(csvOrExcel)) {
File file = RebuildConfiguration.getFileOfTemp(String.format("RBEXPORT-%d.xls", System.currentTimeMillis()));
// xlsx: 65535 行数限制
if ("xls".equalsIgnoreCase(csvOrExcel) || "xlsx".equalsIgnoreCase(csvOrExcel)) {
File file = RebuildConfiguration.getFileOfTemp(
String.format("RBEXPORT-%d.%s", System.currentTimeMillis(), csvOrExcel.toLowerCase()));
List<List<String>> head4Excel = new ArrayList<>();
for (String h : head) {

View file

@ -177,7 +177,8 @@ public class LoginAction extends BaseController {
uaSimple = "UNKNOW";
}
String ipAddr = StringUtils.defaultString(ServletUtils.getRemoteAddr(request), "127.0.0.1");
final String ipAddr = StringUtils.defaultString(ServletUtils.getRemoteAddr(request), "127.0.0.1");
final String reqUrl = request.getRequestURL() == null ? "" : request.getRequestURL().toString();
final Record llog = EntityHelper.forNew(EntityHelper.LoginLog, UserService.SYSTEM_USER);
llog.setID("user", user);
@ -194,7 +195,7 @@ public class LoginAction extends BaseController {
String uaUrl = String.format("api/authority/user/echo?user=%s&ip=%s&ua=%s&source=%s",
CodecUtils.base64UrlEncode(uid), ipAddr, CodecUtils.urlEncode(userAgent),
CodecUtils.base64UrlEncode(request.getRequestURL().toString()));
CodecUtils.base64UrlEncode(reqUrl));
License.siteApiNoCache(uaUrl);
});
}

View file

@ -190,6 +190,7 @@ See LICENSE and COMMERCIAL in the project root for license information.
.dataTables_oper.invisible2 > .btn.J_view {
display: inline-block;
margin-right: 0;
}
.record-merge-table {

View file

@ -5,9 +5,10 @@ rebuild is dual-licensed under commercial and open source licenses (GPLv3).
See LICENSE and COMMERCIAL in the project root for license information.
*/
const userId = window.__PageConfig.recordId
const wpc = window.__PageConfig || {}
const userId = wpc.recordId
$(document).ready(function () {
$(document).ready(() => {
$('.J_delete')
.off('click')
.on('click', () => {
@ -154,6 +155,22 @@ $(document).ready(function () {
}
})
}
// v3.8
if (userId === '001-0000000000000001') {
const RbForm_renderAfter = RbForm.renderAfter
RbForm.renderAfter = function (formObject) {
typeof RbForm_renderAfter === 'function' && RbForm_renderAfter()
formObject.onFieldValueChange((nv) => {
if (nv.name === 'isDisabled') {
let c = formObject.getFieldComp('isDisabled') || {}
if (nv.value === 'T') c.setTip(<span className="text-warning">{$L('禁用将导致超级管理员无法登录')}</span>)
else c.setTip(null)
}
})
}
}
})
// 启用/禁用

View file

@ -76,7 +76,7 @@ const RbListPage = {
// Privileges
if (ep) {
if (ep.C === false) $('.J_new').remove()
if (ep.C === false) $('.J_new, .J_new_group').remove()
if (ep.D === false) $('.J_delete').remove()
if (ep.U === false) $('.J_edit, .J_batch-update').remove()
if (ep.A !== true) $('.J_assign').remove()

View file

@ -93,7 +93,7 @@
<div class="dataTables_oper invisible2">
<button class="btn btn-space btn-secondary J_view" type="button" disabled="disabled"><i class="icon mdi mdi-folder-open"></i> [[${bundle.L('打开')}]]</button>
<button class="btn btn-space btn-secondary J_edit" type="button" disabled="disabled"><i class="icon zmdi zmdi-edit"></i> [[${bundle.L('编辑')}]]</button>
<div class="btn-group btn-space">
<div class="btn-group btn-space J_new_group">
<button class="btn btn-primary J_new" type="button"><i class="icon zmdi zmdi-plus"></i> [[${bundle.L('新建')}]]</button>
<button class="btn btn-primary dropdown-toggle w-auto hide" type="button" data-toggle="dropdown"><span class="icon zmdi zmdi-chevron-down"></span></button>
<div class="dropdown-menu dropdown-menu-primary dropdown-menu-right"></div>