(this._fields = c)}>
@@ -404,18 +414,23 @@ class DlgSpecFields extends RbModalHandler {
-
-
)
}
- handleConfirm = () => {
+ handleConfirm() {
+ if (rb.commercial < 1) {
+ RbHighbar.error(WrapHtml($L('免费版不支持此功能 [(查看详情)](https://getrebuild.com/docs/rbv-features)')))
+ return
+ }
+
const selected = []
$(this._fields)
.find('input:checked')
diff --git a/src/main/resources/web/assets/js/trigger/trigger-list.js b/src/main/resources/web/assets/js/trigger/trigger-list.js
index 2f0d2f1bc..c1954f8a4 100644
--- a/src/main/resources/web/assets/js/trigger/trigger-list.js
+++ b/src/main/resources/web/assets/js/trigger/trigger-list.js
@@ -6,11 +6,6 @@ See LICENSE and COMMERCIAL in the project root for license information.
*/
/* global dlgActionAfter ShowEnable */
-let bosskeyShow = false
-window.bosskeyTrigger = function () {
- bosskeyShow = true
-}
-
$(document).ready(function () {
$('.J_add').click(() => renderRbcomp(
))
renderRbcomp(
, 'dataList')
@@ -25,6 +20,7 @@ const RBV_TRIGGERS = {
'PROXYTRIGGERACTION': $L('自定义触发器'),
'AUTOUNSHARE': $L('自动取消共享'),
'CREATEFEED': $L('新建动态'),
+ 'AUTOGENREPORT': $L('自动报表导出'),
}
const WHENS = {
@@ -197,8 +193,8 @@ class TriggerEdit extends ConfigFormDlg {
// #1
$.get('/admin/robot/trigger/available-actions', (res) => {
let actions = res.data || []
- if (!bosskeyShow) {
- actions = actions.filter((item) => item[0] !== 'PROXYTRIGGERACTION')
+ if (!window.__BOSSKEY) {
+ actions = actions.filter((item) => !['PROXYTRIGGERACTION', 'AUTOGENREPORT'].includes(item[0]))
}
this.setState({ actions }, () => {
diff --git a/src/main/resources/web/assets/js/trigger/trigger.FIELDAGGREGATION.js b/src/main/resources/web/assets/js/trigger/trigger.FIELDAGGREGATION.js
index 598d0d175..bd9dfd677 100644
--- a/src/main/resources/web/assets/js/trigger/trigger.FIELDAGGREGATION.js
+++ b/src/main/resources/web/assets/js/trigger/trigger.FIELDAGGREGATION.js
@@ -230,6 +230,9 @@ class ContentFieldAggregation extends ActionContentSpec {
if (content.stopPropagation === true) $(this._$stopPropagation).attr('checked', true).parents('.bosskey-show').removeClass('bosskey-show')
this.saveAdvFilter(content.dataFilter)
$(this._$matchFields).val(content.targetEntityMatchFields || null)
+
+ // eslint-disable-next-line no-undef
+ DlgSpecFields.render(content)
}
}
@@ -434,6 +437,9 @@ renderContentComp = function (props) {
$('#react-content [data-toggle="tooltip"]').tooltip()
})
+ // 指定字段
+ $('.when-update a.hide').removeClass('hide')
+
// eslint-disable-next-line no-undef
useExecManual()
}
diff --git a/src/main/resources/web/assets/js/trigger/trigger.FIELDWRITEBACK.js b/src/main/resources/web/assets/js/trigger/trigger.FIELDWRITEBACK.js
index 4fa6c81b2..212876094 100644
--- a/src/main/resources/web/assets/js/trigger/trigger.FIELDWRITEBACK.js
+++ b/src/main/resources/web/assets/js/trigger/trigger.FIELDWRITEBACK.js
@@ -244,6 +244,9 @@ class ContentFieldWriteback extends ActionContentSpec {
$(this._$stopPropagation).attr('checked', content.stopPropagation === true)
if (content.stopPropagation === true) $(this._$stopPropagation).parents('.bosskey-show').removeClass('bosskey-show')
$(this._$matchFields).val(content.targetEntityMatchFields || null)
+
+ // eslint-disable-next-line no-undef
+ DlgSpecFields.render(content)
}
}
@@ -637,6 +640,9 @@ renderContentComp = function (props) {
$('#react-content [data-toggle="tooltip"]').tooltip()
})
+ // 指定字段
+ $('.when-update a.hide').removeClass('hide')
+
// eslint-disable-next-line no-undef
useExecManual()
}
diff --git a/src/main/resources/web/assets/js/trigger/trigger.GROUPAGGREGATION.js b/src/main/resources/web/assets/js/trigger/trigger.GROUPAGGREGATION.js
index 2b517ff36..a7fadb031 100644
--- a/src/main/resources/web/assets/js/trigger/trigger.GROUPAGGREGATION.js
+++ b/src/main/resources/web/assets/js/trigger/trigger.GROUPAGGREGATION.js
@@ -284,6 +284,9 @@ class ContentGroupAggregation extends ActionContentSpec {
$(this._$stopPropagation).attr('checked', true).parents('.bosskey-show').removeClass('bosskey-show')
}
this.saveAdvFilter(content.dataFilter)
+
+ // eslint-disable-next-line no-undef
+ DlgSpecFields.render(content)
} else {
$(this._$autoCreate).attr('checked', true)
}
@@ -546,6 +549,9 @@ renderContentComp = function (props) {
$('#react-content [data-toggle="tooltip"]').tooltip()
})
+ // 指定字段
+ $('.when-update a.hide').removeClass('hide')
+
// eslint-disable-next-line no-undef
useExecManual()
}
diff --git a/src/main/resources/web/assets/js/trigger/trigger.SENDNOTIFICATION.js b/src/main/resources/web/assets/js/trigger/trigger.SENDNOTIFICATION.js
index 101551873..1d9e2ed78 100644
--- a/src/main/resources/web/assets/js/trigger/trigger.SENDNOTIFICATION.js
+++ b/src/main/resources/web/assets/js/trigger/trigger.SENDNOTIFICATION.js
@@ -232,7 +232,6 @@ class ContentSendNotification extends ActionContentSpec {
return false
}
- if (window.whenUpdateFields) _data.whenUpdateFields = window.whenUpdateFields
return _data
}
}
@@ -277,22 +276,20 @@ class AccountSelectorWithField extends UserSelector {
// eslint-disable-next-line no-undef
LastLogsViewer.renderLog = function (log) {
return log.level === 1 && log.message ? (
-
- - {$L('已发送至')}
- -
- {log.message.split(',').map((a, idx) => {
- return $regex.isId(a) ? (
-
- {a}
-
- ) : (
-
- {a}
-
- )
- })}
-
-
+
+ {$L('已发送至')}
+ {log.message.split(',').map((a, idx) => {
+ return $regex.isId(a) ? (
+
+ {a}
+
+ ) : (
+
+ {a}
+
+ )
+ })}
+
) : (
{log.message || 'N'}
)
diff --git a/src/test/java/com/rebuild/utils/ExcelUtilsTest.java b/src/test/java/com/rebuild/utils/ExcelUtilsTest.java
index 0602cfcf2..b9e9905ce 100644
--- a/src/test/java/com/rebuild/utils/ExcelUtilsTest.java
+++ b/src/test/java/com/rebuild/utils/ExcelUtilsTest.java
@@ -8,9 +8,17 @@ See LICENSE and COMMERCIAL in the project root for license information.
package com.rebuild.utils;
import cn.devezhao.commons.excel.IRow;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.apache.poi.xssf.usermodel.XSSFFont;
+import org.apache.poi.xssf.usermodel.XSSFRichTextString;
+import org.apache.poi.xssf.usermodel.XSSFSimpleShape;
+import org.apache.poi.xssf.usermodel.XSSFTextRun;
import org.junit.jupiter.api.Test;
import org.springframework.util.ResourceUtils;
+import java.io.File;
import java.io.IOException;
/**
@@ -29,4 +37,24 @@ class ExcelUtilsTest {
System.out.println(row.getCell("h"));
}
}
+
+ @Test
+ void testShape() throws IOException {
+ try (Workbook wb = WorkbookFactory.create(new File("/Users/zhaoff/Desktop/1.xlsx"))) {
+ Sheet sheet = wb.getSheetAt(0);
+ for (Object o : sheet.getDrawingPatriarch()) {
+ XSSFSimpleShape shape = (XSSFSimpleShape) o;
+ XSSFTextRun s = shape.getTextParagraphs().get(0).getTextRuns().get(0);
+
+ XSSFFont font = (XSSFFont) wb.createFont();
+ font.setFontName(s.getFontFamily());
+ font.setFontHeightInPoints((short) s.getFontSize());
+ font.setBold(s.isBold());
+ font.setItalic(s.isItalic());
+
+ XSSFRichTextString richTextString = new XSSFRichTextString("11");
+ richTextString.applyFont(font);
+ }
+ }
+ }
}
\ No newline at end of file