mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 07:25:54 +08:00
Fix 3.6.2 (#740)
* fix: XSSFSimpleShape Gitee#I9AVLE * fix: email regex * fix: 表单回填多引用字段 * fix: at user * style * v3.6.2
This commit is contained in:
parent
c5efdcb2e1
commit
c05f113abb
2
@rbv
2
@rbv
|
@ -1 +1 @@
|
|||
Subproject commit f536bdfad3cc51f7edd2256579843bffae3ccfb0
|
||||
Subproject commit d42ae420345c31581e65f1fbac7085a9c4dad5d9
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
</parent>
|
||||
<groupId>com.rebuild</groupId>
|
||||
<artifactId>rebuild</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<version>3.6.2</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.6.1";
|
||||
public static final String VER = "3.6.2";
|
||||
/**
|
||||
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
|
||||
*/
|
||||
public static final int BUILD = 3060106;
|
||||
public static final int BUILD = 3060207;
|
||||
|
||||
static {
|
||||
// Driver for DB
|
||||
|
|
|
@ -293,12 +293,14 @@ public class AutoFillinManager implements ConfigManager {
|
|||
return newValue; // Long
|
||||
}
|
||||
|
||||
if (sourceEasy instanceof MixValue) {
|
||||
if (sourceEasy instanceof EasyID && targetEasy instanceof EasyN2NReference) {
|
||||
newValue = FieldValueHelper.wrapFieldValue(newValue, targetEasy);
|
||||
} else if (targetEasy instanceof EasyN2NReference) {
|
||||
newValue = targetEasy.wrapValue(newValue);
|
||||
} else if (sourceEasy instanceof MixValue) {
|
||||
if (!(newValue instanceof String) || sourceEasy instanceof EasyFile) {
|
||||
newValue = sourceEasy.wrapValue(newValue);
|
||||
}
|
||||
} else if (sourceEasy instanceof EasyID && targetEasy instanceof EasyN2NReference) {
|
||||
newValue = FieldValueHelper.wrapFieldValue(newValue, targetEasy);
|
||||
}
|
||||
|
||||
return newValue;
|
||||
|
@ -313,8 +315,22 @@ public class AutoFillinManager implements ConfigManager {
|
|||
value = ((JSONObject) value).getString("id");
|
||||
return ID.valueOf(value.toString());
|
||||
}
|
||||
// FILE,IMAGE
|
||||
// FILE,IMAGE,N2NREF
|
||||
if (value instanceof JSONArray) {
|
||||
JSONArray array = (JSONArray) value;
|
||||
if (array.isEmpty()) return null;
|
||||
|
||||
// N2NREF
|
||||
Object type = array.get(0);
|
||||
if (type instanceof JSONObject) {
|
||||
List<ID> n2nValue = new ArrayList<>();
|
||||
for (Object o : array) {
|
||||
String s = ((JSONObject) o).getString("id");
|
||||
n2nValue.add(ID.valueOf(s));
|
||||
}
|
||||
return n2nValue.toArray(new ID[0]);
|
||||
}
|
||||
|
||||
return ((JSONArray) value).toJSONString();
|
||||
}
|
||||
// Keep
|
||||
|
|
|
@ -320,6 +320,7 @@ public class EasyExcelGenerator33 extends EasyExcelGenerator {
|
|||
try (Workbook wb = WorkbookFactory.create(file)) {
|
||||
Sheet sheet = wb.getSheetAt(0);
|
||||
for (Object o : sheet.getDrawingPatriarch()) {
|
||||
if (!(o instanceof XSSFSimpleShape)) continue; // 仅文本
|
||||
XSSFSimpleShape shape = (XSSFSimpleShape) o;
|
||||
String shapeText = shape.getText();
|
||||
Matcher matcher = TemplateExtractor33.PATT_V2.matcher(shapeText);
|
||||
|
@ -356,7 +357,7 @@ public class EasyExcelGenerator33 extends EasyExcelGenerator {
|
|||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
log.error("Cannot fill vars to shape", ex);
|
||||
log.error("DEBUG:Cannot fill vars to shape", ex);
|
||||
}
|
||||
|
||||
return file;
|
||||
|
|
|
@ -180,6 +180,7 @@ public class TemplateExtractor33 extends TemplateExtractor {
|
|||
Drawing<?> drawing = sheet.getDrawingPatriarch();
|
||||
if (drawing != null) {
|
||||
for (Object o : sheet.getDrawingPatriarch()) {
|
||||
if (!(o instanceof XSSFSimpleShape)) continue; // 仅文本
|
||||
XSSFSimpleShape shape = (XSSFSimpleShape) o;
|
||||
String shapeText = shape.getText();
|
||||
Matcher matcher = PATT_V2.matcher(shapeText);
|
||||
|
@ -194,7 +195,7 @@ public class TemplateExtractor33 extends TemplateExtractor {
|
|||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
log.error("Cannot extract vars in shape", ex);
|
||||
log.error("DEBUG:Cannot extract vars in shape", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<div class="float-right pt-1">
|
||||
<button class="btn btn-primary J_add" type="button"><i class="icon zmdi zmdi-plus"></i> [[${bundle.L('添加')}]]</button>
|
||||
</div>
|
||||
<div class="float-right pt-1 mr-2">
|
||||
<div class="float-right pt-1 mr-1">
|
||||
<div class="input-group input-search">
|
||||
<input class="form-control" type="text" th:placeholder="${bundle.L('查询')}" maxlength="40" />
|
||||
<span class="input-group-btn">
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right pt-1 mr-2">
|
||||
<div class="float-right pt-1 mr-1">
|
||||
<div class="input-group input-search">
|
||||
<input class="form-control" type="text" th:placeholder="${bundle.L('查询')}" maxlength="40" />
|
||||
<span class="input-group-btn">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="float-right pt-1">
|
||||
<button class="btn btn-primary J_add" type="button"><i class="icon zmdi zmdi-plus"></i> [[${bundle.L('添加')}]]</button>
|
||||
</div>
|
||||
<div class="float-right pt-1 mr-2">
|
||||
<div class="float-right pt-1 mr-1">
|
||||
<div class="input-group input-search">
|
||||
<input class="form-control" type="text" th:placeholder="${bundle.L('查询')}" maxlength="40" />
|
||||
<span class="input-group-btn">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="float-right pt-1">
|
||||
<button class="btn btn-primary J_add" type="button"><i class="icon zmdi zmdi-plus"></i> [[${bundle.L('添加')}]]</button>
|
||||
</div>
|
||||
<div class="float-right pt-1 mr-2">
|
||||
<div class="float-right pt-1 mr-1">
|
||||
<div class="input-group input-search">
|
||||
<input class="form-control" type="text" th:placeholder="${bundle.L('查询')}" maxlength="40" />
|
||||
<span class="input-group-btn">
|
||||
|
|
|
@ -198,7 +198,7 @@ class FeedsEditor extends React.Component {
|
|||
const isFinish = this.state.type === 4 && this.props.contentMore && this.props.contentMore.finishTime
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<RF>
|
||||
{isFinish && <RbAlertBox message={$L('此日程已完成,修改后你需要重新将其完成')} />}
|
||||
|
||||
<div className={`rich-editor ${this.state.focus ? 'active' : ''}`}>
|
||||
|
@ -302,7 +302,7 @@ class FeedsEditor extends React.Component {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
</React.Fragment>
|
||||
</RF>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -360,6 +360,7 @@ class FeedsEditor extends React.Component {
|
|||
const text = this.__lastInputKey === '@' ? `${s.text} ` : `@${s.text} `
|
||||
$(this._$editor).insertAtCursor(text)
|
||||
this.setState({ showAtUser: false })
|
||||
this.__lastInputKey = null
|
||||
}
|
||||
|
||||
_handleInputAt(e) {
|
||||
|
@ -372,7 +373,9 @@ class FeedsEditor extends React.Component {
|
|||
|
||||
if (e.key === '@') {
|
||||
this.__lastInputKey = '@'
|
||||
this._handleInput__Timer = setTimeout(() => this._UserSelector.toggle('show'), 400)
|
||||
this._handleInput__Timer = setTimeout(() => this._UserSelector.toggle('show'), 200)
|
||||
} else {
|
||||
this.__lastInputKey = null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ var $regex = {
|
|||
_Time: /^[0-9]{1,2}:[0-9]{1,2}(:[0-9]{1,2})?$/, // eg. 16:01:10, 10:1:9
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
_Url: /^(http|https|ftp)\:\/\/[a-z0-9\-\.]+(:[0-9]*)?\/?([a-z0-9\-\._\?\,\'\/\\\+&%\$#\=~!:])*$/i,
|
||||
_Mail: /^[a-z0-9._-]+@[a-z0-9.-]+\.[a-z]{2,4}$/i,
|
||||
_Mail: /^[a-z0-9._-]+@[a-z0-9.-]+\.[a-z]{2,6}$/i,
|
||||
_Number: /^[-+]?[0-9]+$/, // 数字
|
||||
_Decimal: /^[-+]?\d*\.?\d+$/, // 包括小数点的数字
|
||||
_Mobile: /^(1[3456789])\d{9}$/, // CN Mobile
|
||||
|
|
Loading…
Reference in a new issue