mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-02-16 10:22:59 +08:00
Fix 3.9 beta4b (#852)
* 3.9.0 * trigger: targetRef * fix: select2无光标 * feat: fileUpdir * fixs * styled * be
This commit is contained in:
parent
8e5ac1ed56
commit
8c9e831d26
21 changed files with 94 additions and 52 deletions
2
@rbv
2
@rbv
|
@ -1 +1 @@
|
|||
Subproject commit 0632edc28ced726d01dcc7d949932aca976db5f7
|
||||
Subproject commit 55386d909e5ed6afe1fe7a0793c460451b491296
|
|
@ -1,11 +1,11 @@
|
|||
FROM amazoncorretto:11-alpine
|
||||
#docker pull amazoncorretto:11-alpine
|
||||
|
||||
RUN apk add ttf-dejavu
|
||||
|
||||
EXPOSE 18080
|
||||
|
||||
COPY ./target/rebuild.jar /app/rebuild/rebuild-boot.jar
|
||||
|
||||
#COPY ./.deploy/SourceHanSansK-Regular.ttf /app/rebuild/.rebuild/
|
||||
|
||||
WORKDIR /app/rebuild/
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
</parent>
|
||||
<groupId>com.rebuild</groupId>
|
||||
<artifactId>rebuild</artifactId>
|
||||
<version>3.9.0-beta3</version>
|
||||
<version>3.9.0</version>
|
||||
<name>rebuild</name>
|
||||
<description>Building your business-systems freely!</description>
|
||||
<url>https://getrebuild.com/</url>
|
||||
|
|
|
@ -74,11 +74,11 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
|
|||
/**
|
||||
* Rebuild Version
|
||||
*/
|
||||
public static final String VER = "3.9.0-beta3";
|
||||
public static final String VER = "3.9.0";
|
||||
/**
|
||||
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
|
||||
*/
|
||||
public static final int BUILD = 3090003;
|
||||
public static final int BUILD = 3090005;
|
||||
|
||||
static {
|
||||
// Driver for DB
|
||||
|
|
|
@ -102,6 +102,10 @@ public class EasyFieldConfigProps {
|
|||
* 允许上传文件类型
|
||||
*/
|
||||
public static final String FILE_SUFFIX = "fileSuffix";
|
||||
/**
|
||||
* 指定上传路径
|
||||
*/
|
||||
public static final String FILE_UPDIR = "fileUpdir";
|
||||
|
||||
/**
|
||||
* 允许上传数量
|
||||
|
|
|
@ -121,6 +121,7 @@ public class ApprovalList extends ChartData implements BuiltinChart {
|
|||
Map<String, Object> ret = new HashMap<>();
|
||||
ret.put("data", rearray);
|
||||
ret.put("stats", stats);
|
||||
ret.put("overLimit", array.length >= 500);
|
||||
return (JSON) JSON.toJSON(ret);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class QuickCodeReindexTask extends HeavyTask<Integer> {
|
|||
try {
|
||||
quickCode = HanLP.convertToPinyinString(nameVal, "", Boolean.FALSE);
|
||||
} catch (Exception e) {
|
||||
log.error("QuickCode shorting error : " + nameVal, e);
|
||||
log.error("QuickCode shorting error : {}", nameVal, e);
|
||||
quickCode = StringUtils.EMPTY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -344,8 +344,8 @@ public class QiniuCloud {
|
|||
String dt = CalendarUtils.getDateFormat("yyyyMMddHHmmssSSS").format(CalendarUtils.now());
|
||||
String subdir = dt.substring(0, 8);
|
||||
String filePrefix = dt.substring(8);
|
||||
// remove unsafe /\.
|
||||
if (StringUtils.isNotBlank(updir)) subdir = updir.replaceAll("[./\\\\\\s]", "");
|
||||
// remove unsafe flags
|
||||
if (StringUtils.isNotBlank(updir)) subdir = updir.replaceAll("[%./\\\\\\s]", "");
|
||||
|
||||
return String.format("rb/%s/%s__%s", subdir, filePrefix, fileName);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.rebuild.core.metadata.MetadataHelper;
|
|||
import com.rebuild.core.metadata.MetadataSorter;
|
||||
import com.rebuild.core.metadata.easymeta.EasyMetaFactory;
|
||||
import com.rebuild.core.service.approval.RobotApprovalManager;
|
||||
import com.rebuild.core.service.datareport.DataReportManager;
|
||||
import com.rebuild.core.service.trigger.ActionFactory;
|
||||
import com.rebuild.core.service.trigger.ActionType;
|
||||
import com.rebuild.core.service.trigger.TriggerAction;
|
||||
|
@ -158,24 +159,32 @@ public class TriggerAdminController extends BaseController {
|
|||
// 自动记录转换
|
||||
String useTransform = configJson.getString("useTransform");
|
||||
if (ID.isId(useTransform)) {
|
||||
ConfigBean cb;
|
||||
try {
|
||||
cb = TransformManager.instance.getTransformConfig(ID.valueOf(useTransform), sourceEntity);
|
||||
} catch (Exception ignored) {
|
||||
return null;
|
||||
ConfigBean cb = TransformManager.instance.getTransformConfig(ID.valueOf(useTransform), sourceEntity);
|
||||
return new String[]{ useTransform, cb.getString("name") };
|
||||
} catch (Exception deleted) {
|
||||
return new String[]{ null, String.format("[%s]", useTransform.toUpperCase()) };
|
||||
}
|
||||
return new String[]{ useTransform, cb.getString("name") };
|
||||
}
|
||||
// 自动审批
|
||||
String useApproval = configJson.getString("useApproval");
|
||||
if (ID.isId(useApproval)) {
|
||||
ConfigBean cb;
|
||||
try {
|
||||
cb = RobotApprovalManager.instance.getFlowDefinition(ID.valueOf(useApproval));
|
||||
} catch (Exception ignored) {
|
||||
return null;
|
||||
ConfigBean cb = RobotApprovalManager.instance.getFlowDefinition(ID.valueOf(useApproval));
|
||||
return new String[]{ useApproval, cb.getString("name") };
|
||||
} catch (Exception deleted) {
|
||||
return new String[]{ null, String.format("[%s]", useApproval.toUpperCase()) };
|
||||
}
|
||||
}
|
||||
// 导出报表
|
||||
String useTemplate = configJson.getString("useTemplate");
|
||||
if (ID.isId(useTemplate)) {
|
||||
try {
|
||||
ConfigBean cb = DataReportManager.instance.getReportRaw(ID.valueOf(useTemplate));
|
||||
return new String[]{ useTemplate, cb.getString("name") };
|
||||
} catch (Exception deleted) {
|
||||
return new String[]{ null, String.format("[%s]", useTemplate.toUpperCase()) };
|
||||
}
|
||||
return new String[]{ useApproval, cb.getString("name") };
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -3343,5 +3343,7 @@
|
|||
"立即备份":"立即备份",
|
||||
"数据库":"数据库",
|
||||
"未备份":"未备份",
|
||||
"选择要备份哪些数据":"选择要备份哪些数据"
|
||||
"选择要备份哪些数据":"选择要备份哪些数据",
|
||||
"分配与共享":"分配与共享",
|
||||
"最多显示最近 500 条记录":"最多显示最近 500 条记录"
|
||||
}
|
|
@ -171,6 +171,12 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div th:if="${fieldType == 'FILE'}" class="form-group row J_for-FILE bosskey-show">
|
||||
<label class="col-md-12 col-xl-3 col-lg-4 col-form-label text-lg-right">[[${bundle.L('上传目录')}]]</label>
|
||||
<div class="col-md-12 col-xl-6 col-lg-8">
|
||||
<input type="text" class="form-control form-control-sm" id="fileUpdir" th:placeholder="${bundle.L('默认')}" />
|
||||
</div>
|
||||
</div>
|
||||
<div th:if="${fieldType == 'PICKLIST' or fieldType == 'MULTISELECT'}" class="form-group row J_for-PICKLIST J_for-MULTISELECT">
|
||||
<label class="col-md-12 col-xl-3 col-lg-4 col-form-label text-lg-right">[[${bundle.L('选项列表')}]]</label>
|
||||
<div class="col-md-12 col-xl-6 col-lg-8">
|
||||
|
|
|
@ -101,12 +101,6 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
.axis .axis-head > a {
|
||||
display: inline-block;
|
||||
padding: 0 3px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.axis .axis-target {
|
||||
margin-left: 80px;
|
||||
min-height: 30px;
|
||||
|
|
|
@ -358,7 +358,7 @@ class DlgBackup extends RbAlert {
|
|||
<div className="text-warning mb-1" ref={(c) => (this._$tips = c)}>
|
||||
<i className="mdi-alert-outline mdi" /> {$L('请勿在业务高峰时段执行备份')}
|
||||
</div>
|
||||
<button type="button" className="btn btn-space btn-primary" onClick={this.confirm} disabled={this.state.disable}>
|
||||
<button type="button" className="btn btn-space btn-primary" onClick={this.confirm} ref={(c) => (this._$btn = c)} data-spinner>
|
||||
{$L('开始备份')}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -371,6 +371,7 @@ class DlgBackup extends RbAlert {
|
|||
if (type === 0) return
|
||||
|
||||
this.disabled(true, true)
|
||||
const $btn = $(this._$btn).button('loading')
|
||||
$.post(`systems/backup?type=${type}`, (res) => {
|
||||
if (res.error_code === 0) {
|
||||
const data = res.data || {}
|
||||
|
@ -380,6 +381,7 @@ class DlgBackup extends RbAlert {
|
|||
RbHighbar.error(res.error_msg)
|
||||
}
|
||||
this.disabled(false, false)
|
||||
$btn.button('reset')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -413,12 +413,18 @@ const ECHART_LEGEND_VOPT = {
|
|||
textStyle: { fontSize: 12 },
|
||||
}
|
||||
|
||||
// K=千 M=百万
|
||||
// K=千 M=百万 B=亿
|
||||
const shortNumber = function (num) {
|
||||
if (rb.locale === 'zh_CN' && (num > 10000 || num < -10000)) return (num / 10000).toFixed(1) + '万'
|
||||
if (num > 1000000 || num < -1000000) return (num / 1000000).toFixed(1) + 'M'
|
||||
if (rb.locale === 'zh_CN') {
|
||||
if (num > 100000000 || num < -100000000) return (num / 100000000).toFixed(1) + '亿'
|
||||
else if (num > 1000000 || num < -1000000) return (num / 1000000).toFixed(1) + '百万'
|
||||
else if (num > 10000 || num < -10000) return (num / 10000).toFixed(1) + '万'
|
||||
return num
|
||||
}
|
||||
if (num > 100000000 || num < -100000000) return (num / 100000000).toFixed(1) + 'B'
|
||||
else if (num > 1000000 || num < -1000000) return (num / 1000000).toFixed(1) + 'M'
|
||||
else if (num > 10000 || num < -10000) return (num / 1000).toFixed(1) + 'K'
|
||||
else return num
|
||||
return num
|
||||
}
|
||||
|
||||
// 千分位
|
||||
|
@ -918,6 +924,11 @@ class ApprovalList extends BaseChart {
|
|||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
{data.overLimit && (
|
||||
<div className="m-2 text-center text-warning">
|
||||
<i className="mdi mdi-information-outline" /> {$L('最多显示最近 500 条记录')}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
|
|
|
@ -1857,7 +1857,15 @@ class RbFormFile extends RbFormImage {
|
|||
)
|
||||
})}
|
||||
<div className={`file-select ${showUpload ? '' : 'hide'}`}>
|
||||
<input type="file" className="inputfile" ref={(c) => (this._fieldValue__input = c)} id={this._htmlid} accept={this.props.fileSuffix || null} multiple />
|
||||
<input
|
||||
type="file"
|
||||
className="inputfile"
|
||||
ref={(c) => (this._fieldValue__input = c)}
|
||||
id={this._htmlid}
|
||||
accept={this.props.fileSuffix || null}
|
||||
multiple
|
||||
data-updir={this.props.fileUpdir || null}
|
||||
/>
|
||||
<label htmlFor={this._htmlid} title={$L('拖动或点击选择文件。需要 %s 个', `${this.__minUpload}~${this.__maxUpload}`)} className="btn-secondary" onClick={(e) => this._fileClick(e)}>
|
||||
{this._captureType === 2 ? <span className="mdi mdi-camera" /> : <span className="zmdi zmdi-upload" />}
|
||||
<span className="ml-1">{$L('上传文件')}</span>
|
||||
|
|
|
@ -192,6 +192,8 @@ See LICENSE and COMMERCIAL in the project root for license information.
|
|||
this.$search.closest('.select2-search--inline').css('width', widthParent)
|
||||
}
|
||||
})(jQuery)
|
||||
// fix:select2:https://stackoverflow.com/questions/18487056/select2-doesnt-work-when-embedded-in-a-bootstrap-modal
|
||||
$.fn.modal.Constructor.prototype._enforceFocus = function () {}
|
||||
|
||||
// extends Array
|
||||
Array.prototype.remove = function (item) {
|
||||
|
|
|
@ -70,19 +70,28 @@ class TriggerList extends ConfigList {
|
|||
<RF>
|
||||
{(this.state.data || []).map((item) => {
|
||||
let targetRef = item[9]
|
||||
// [ID, NAME]
|
||||
if (targetRef) {
|
||||
if (targetRef[0] && targetRef[0].startsWith('028-')) {
|
||||
if (!targetRef[0]) {
|
||||
targetRef = <a className="text-danger">{targetRef[1]}</a>
|
||||
} else if (targetRef[0].startsWith('028-')) {
|
||||
targetRef = (
|
||||
<a href={`${rb.baseUrl}/admin/robot/approval/${targetRef[0]}`} className="light-link" target={`_${targetRef[0]}`}>
|
||||
{targetRef[1]}
|
||||
</a>
|
||||
)
|
||||
} else if (targetRef[0] && targetRef[0].startsWith('037-')) {
|
||||
} else if (targetRef[0].startsWith('037-')) {
|
||||
targetRef = (
|
||||
<a href={`${rb.baseUrl}/admin/robot/transform/${targetRef[0]}`} className="light-link" target={`_${targetRef[0]}`}>
|
||||
{targetRef[1]}
|
||||
</a>
|
||||
)
|
||||
} else if (targetRef[0].startsWith('032-')) {
|
||||
targetRef = (
|
||||
<a href={`${rb.baseUrl}/admin/data/report-templates#gs=${targetRef[0]}`} className="light-link" target={`_${targetRef[0]}`}>
|
||||
{targetRef[1]}
|
||||
</a>
|
||||
)
|
||||
} else {
|
||||
targetRef = (
|
||||
<a href={`${rb.baseUrl}/admin/entity/${targetRef[0]}/base`} className="light-link" target={`_${targetRef[0]}`}>
|
||||
|
|
|
@ -347,26 +347,26 @@ class ContentFieldAggregation extends ActionContentSpec {
|
|||
$s2sf.trigger('change')
|
||||
|
||||
// 回填
|
||||
const $fbf = $(this._$fillbackField).select2({ placeholder: $L('(可选)'), allowClear: true })
|
||||
this.__select2.push($fbf)
|
||||
const $fbField = $(this._$fillbackField).select2({ placeholder: $L('(可选)'), allowClear: true })
|
||||
$fbField.val(null).trigger('change')
|
||||
this.__select2.push($fbField)
|
||||
|
||||
this.__select2.push($s2sf)
|
||||
this.__select2.push($s2cm)
|
||||
this.__select2.push($s2tf)
|
||||
})
|
||||
|
||||
const content = this.props.content
|
||||
if (content) {
|
||||
this.setState({ items: content.items || [] })
|
||||
if (content.targetEntityMatchFields) {
|
||||
setTimeout(() => this._MatchFields && this._MatchFields.setState({ groupFields: content.targetEntityMatchFields }), 200)
|
||||
}
|
||||
setTimeout(() => {
|
||||
// init
|
||||
const content = this.props.content
|
||||
if (content) {
|
||||
this.setState({ items: content.items || [] })
|
||||
if (content.targetEntityMatchFields) {
|
||||
this._MatchFields && this._MatchFields.setState({ groupFields: content.targetEntityMatchFields })
|
||||
}
|
||||
$(this._$fillbackField)
|
||||
.val(content.fillbackField || null)
|
||||
.trigger('change')
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// v3.7
|
||||
|
|
|
@ -214,14 +214,12 @@
|
|||
<div class="axis J_dimension">
|
||||
<div class="axis-head">
|
||||
<span>[[${bundle.L('维度')}]]</span>
|
||||
<a><i class="zmdi zmdi-edit"></i></a>
|
||||
</div>
|
||||
<div class="axis-target J_axis-dim"></div>
|
||||
</div>
|
||||
<div class="axis J_numerical">
|
||||
<div class="axis-head">
|
||||
<span>[[${bundle.L('数值')}]]</span>
|
||||
<a><i class="zmdi zmdi-edit"></i></a>
|
||||
</div>
|
||||
<div class="axis-target J_axis-num"></div>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<h3 class="title">[[${bundle.L('审批流程')}]]</h3>
|
||||
<span>
|
||||
<a class="close J_close" th:title="${bundle.L('关闭')}"><i class="zmdi zmdi-close"></i></a>
|
||||
<a class="close sm J_reload" th:title="${bundle.L('刷新')}"><i class="zmdi zmdi-refresh"></i></a>
|
||||
<a class="close sm J_back hide" th:title="${bundle.L('回退')}"><i class="zmdi zmdi-arrow-left"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -131,9 +131,6 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<a href="#read" data-type="2" class="hide list-group-item d-flex list-group-item-action">
|
||||
<span class="text">[[${bundle.L('已读消息')}]]</span>
|
||||
</a>
|
||||
<a href="#feeds" data-type="30" class="list-group-item d-flex list-group-item-action">
|
||||
<span class="text">[[${bundle.L('动态')}]]</span>
|
||||
</a>
|
||||
|
@ -144,7 +141,7 @@
|
|||
<span class="text">[[${bundle.L('审批')}]]</span>
|
||||
</a>
|
||||
<a href="#assigns" data-type="10" class="list-group-item d-flex list-group-item-action">
|
||||
<span class="text">[[${bundle.L('分配&共享')}]]</span>
|
||||
<span class="text">[[${bundle.L('分配与共享')}]]</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue