diff --git a/erm.frontend/.eslintrc.cjs b/erm.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/erm.frontend/.eslintrc.cjs +++ b/erm.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/erm.frontend/package.json b/erm.frontend/package.json index 6b8d9c09..025b7710 100644 --- a/erm.frontend/package.json +++ b/erm.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/gradle.properties b/gradle.properties index 0ac45dd8..d672eec6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -38,7 +38,7 @@ application_version=1.0.0 platform_group=io.sc platform_version=8.2.5 platform_plugin_version=8.2.5 -platform_core_frontend_version=8.2.24 +platform_core_frontend_version=8.2.28 ########################################################### # dependencies version diff --git a/io.sc.engine.mv.frontend/.eslintrc.cjs b/io.sc.engine.mv.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.engine.mv.frontend/.eslintrc.cjs +++ b/io.sc.engine.mv.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.engine.mv.frontend/package.json b/io.sc.engine.mv.frontend/package.json index 6f86727c..a9c86edc 100644 --- a/io.sc.engine.mv.frontend/package.json +++ b/io.sc.engine.mv.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/DictionaryGenerator.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/DictionaryGenerator.java index c337246d..1aeabe43 100644 --- a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/DictionaryGenerator.java +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/code/generator/impl/DictionaryGenerator.java @@ -1,7 +1,7 @@ package io.sc.engine.rule.core.code.generator.impl; -import io.sc.engine.rule.core.po.dictionary.Dictionary; -import io.sc.engine.rule.core.po.dictionary.UserDefinedJavaClassField; +import io.sc.engine.rule.core.enums.EnumDictionaryItemValueType; +import io.sc.engine.rule.core.po.dictionary.*; import io.sc.engine.rule.core.po.model.Parameter; import io.sc.engine.rule.core.util.GroovyExpressionReplacer; import io.sc.engine.rule.core.util.IdReplacer; @@ -15,10 +15,29 @@ import java.util.List; import java.util.Map; public class DictionaryGenerator { - public String generateFields(List fields){ - if(!CollectionUtil.hasElements(fields)){ return null; } + public String generateFields(Dictionary dictionary){ + if(dictionary instanceof UserDefinedJavaClassDictionary){ + return generateUserDefinedJavaClassFields((UserDefinedJavaClassDictionary)dictionary); + }else if(dictionary instanceof EnumDictionary){ + return generateEnumFields((EnumDictionary)dictionary); + } + return null; + } + + public String generateFieldInits(Dictionary dictionary){ + if(dictionary instanceof UserDefinedJavaClassDictionary){ + return generateUserDefinedJavaClassFieldInits((UserDefinedJavaClassDictionary)dictionary); + }else if(dictionary instanceof EnumDictionary){ + + } + return null; + } + + private String generateUserDefinedJavaClassFields(UserDefinedJavaClassDictionary userDefinedJavaClassDictionary){ + if(userDefinedJavaClassDictionary==null || !CollectionUtil.hasElements(userDefinedJavaClassDictionary.getFields())){ return null; } + StringBuilder sb =new StringBuilder(""); - for(UserDefinedJavaClassField field : fields){ + for(UserDefinedJavaClassField field : userDefinedJavaClassDictionary.getFields()){ String code =field.getCode(); String name =field.getName(); String valueType =field.getValueType(); @@ -52,10 +71,31 @@ public class DictionaryGenerator { return sb.toString(); } - public String generateInits(List fields){ - if(!CollectionUtil.hasElements(fields)){ return null; } + public String generateEnumFields(EnumDictionary enumDictionary){ + if(enumDictionary==null || !CollectionUtil.hasElements(enumDictionary.getItems())){ return null; } + StringBuilder sb =new StringBuilder(""); + + for(EnumItem item : enumDictionary.getItems()){ + if(EnumDictionaryItemValueType.STRING.equals(item.getValueType())) { + sb.append("public static final String ").append(item.getCode()).append(" =").append("'").append(item.getValue()).append("';"); + }else if(EnumDictionaryItemValueType.INTEGER.equals(item.getValueType())){ + sb.append("public static final Long ").append(item.getCode()).append(" =").append(item.getValue()).append(";"); + }else if(EnumDictionaryItemValueType.DECIMAL.equals(item.getValueType())){ + sb.append("public static final BigDecimal ").append(item.getCode()).append(" =").append(item.getValue()).append(";"); + } + sb.append(" //").append(item.getName()).append("\n"); + } + if(sb.length()>0){ + sb.setLength(sb.length()-1); + } + return sb.toString(); + } + + public String generateUserDefinedJavaClassFieldInits(UserDefinedJavaClassDictionary userDefinedJavaClassDictionary){ + if(userDefinedJavaClassDictionary==null || !CollectionUtil.hasElements(userDefinedJavaClassDictionary.getFields())){ return null; } + StringBuilder sb =new StringBuilder(""); - for(UserDefinedJavaClassField field : fields){ + for(UserDefinedJavaClassField field : userDefinedJavaClassDictionary.getFields()){ String code =field.getCode(); String name =field.getName(); String valueCalculation =field.getValueCalculation(); diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/enums/EnumDictionaryItemValueType.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/enums/EnumDictionaryItemValueType.java new file mode 100644 index 00000000..b00cdd85 --- /dev/null +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/enums/EnumDictionaryItemValueType.java @@ -0,0 +1,10 @@ +package io.sc.engine.rule.core.enums; + +/** + * 枚举元数据项值类型枚举 + */ +public enum EnumDictionaryItemValueType { + STRING, //字符串 + INTEGER, //整数 + DECIMAL; //小数 +} diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/Dictionary.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/Dictionary.java index 7273f4a6..6a8aa5c6 100644 --- a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/Dictionary.java +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/Dictionary.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.sc.engine.rule.core.enums.DeployStatus; +import io.sc.engine.rule.core.enums.DictionaryType; @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.PROPERTY, property="type",defaultImpl=FolderDictionary.class) @@ -18,6 +19,7 @@ import io.sc.engine.rule.core.enums.DeployStatus; }) public abstract class Dictionary { protected String id; //Id + protected DictionaryType type; //类型 protected String code; //代码 protected String name; //名称 protected String namec; //名称(字母) @@ -37,6 +39,12 @@ public abstract class Dictionary { public void setId(String id) { this.id = id; } + public DictionaryType getType() { + return type; + } + public void setType(DictionaryType type) { + this.type = type; + } public String getCode() { return code; } diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/EnumItem.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/EnumItem.java index 0406ad9b..6de0d449 100644 --- a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/EnumItem.java +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/dictionary/EnumItem.java @@ -1,52 +1,72 @@ package io.sc.engine.rule.core.po.dictionary; +import io.sc.engine.rule.core.enums.EnumDictionaryItemValueType; + /** * 枚举项 - * @author wangshaoping - * */ public class EnumItem { protected String id; //ID + protected String code; //代码 + protected String name; //名称 + protected EnumDictionaryItemValueType valueType;//值类型 protected String value; //值 - protected String title; //标题 protected String description; //描述 protected Integer order; //排序 - protected String config; //配置 - + public String getId() { return id; } + public void setId(String id) { this.id = id; } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public EnumDictionaryItemValueType getValueType() { + return valueType; + } + + public void setValueType(EnumDictionaryItemValueType valueType) { + this.valueType = valueType; + } + public String getValue() { return value; } + public void setValue(String value) { this.value = value; } - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } + public String getDescription() { return description; } + public void setDescription(String description) { this.description = description; } + public Integer getOrder() { return order; } + public void setOrder(Integer order) { this.order = order; } - public String getConfig() { - return config; - } - public void setConfig(String config) { - this.config = config; - } } diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/util/GroovyExpressionReplacer.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/util/GroovyExpressionReplacer.java index 27f64d98..f4e7777c 100644 --- a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/util/GroovyExpressionReplacer.java +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/util/GroovyExpressionReplacer.java @@ -58,6 +58,7 @@ public class GroovyExpressionReplacer { } // 再处理 xxx content =PlaceHolderExpressionUtil.replace(content,"${arg.","}"); + content =PlaceHolderEnumExpressionUtil.replace(content,"",""); // 最后处理 `xxx`, 替换回正确的值 for(String key : sortedCache.keySet()){ @@ -65,6 +66,7 @@ public class GroovyExpressionReplacer { } return "\"\"\"" + content + "\"\"\""; }else{ + content =PlaceHolderEnumExpressionUtil.replace(content,"",""); return PlaceHolderExpressionUtil.replace(content,"arg.",""); } } diff --git a/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/util/PlaceHolderEnumExpressionUtil.java b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/util/PlaceHolderEnumExpressionUtil.java new file mode 100644 index 00000000..cf721d8f --- /dev/null +++ b/io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/util/PlaceHolderEnumExpressionUtil.java @@ -0,0 +1,174 @@ +package io.sc.engine.rule.core.util; + +import io.sc.platform.util.CollectionUtil; +import io.sc.platform.util.support.PlaceholderExpression; +import io.sc.platform.util.support.PlaceholderExpressionPart; +import io.sc.platform.util.support.StringLengthDescComparator; +import org.springframework.util.StringUtils; + +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 占位符表达式工具类 + */ +public class PlaceHolderEnumExpressionUtil { + // 占位符表达式的模式匹配 + // 可匹配以下模式 + // 1. #{aaa} + // 2. #{bbb}[1] + // 3. #{ccc}[1].#{ddd} + // 4. #{eee}[1].#{fff}[2] + // 5. #{ggg}[1].#{hhh}[2].#{iii} + private static final String PH_EXPRESSION_REG_PATTERN_STR = "(# \\{ (.+?) \\})(\\[ (.+?) \\])?((\\[ (.+?) \\])?(\\.? (# \\{ (.+?) \\})(\\[ (.+?) \\])?)+?)*"; + // --- --- ----- --- --- ----- --- --- ----- --- --- --- --- ----- --- --- ----- --- + // (# { xxx } )([ nnn ] )?(([ nnn ] )?(.? (# { xxx } )([ nnn ] )?)+?)* + // (#{xxx} )([nnn] )?(([nnn] )?(.? (#{xxx} )([nnn ] )?)+?)* + // (#{xxx})([nnn])?(([nnn])?(.?(#{xxx})([nnn])?)+?)* + // -------- ------- ? ------- - ------ ------- + // (变量)([下标])?(([下标])?(.?(变量)([下标])?)+?)* + private static final Pattern PH_EXPRESSION_REG_PATTERN =Pattern.compile(StringUtils.trimAllWhitespace(PH_EXPRESSION_REG_PATTERN_STR)); + private static final String PH_EXPRESSION_PART_REG_PATTERN_STR = "(# \\{ (.+?) \\})(\\[ (.+?) \\])?"; + // --- --- ----- --- --- ----- --- --- ----- --- --- --- --- ----- --- --- ----- --- + // (# { xxx } )([ nnn ] )? + // (#{xxx})([nnn])? + private static final Pattern PH_EXPRESSION_PART_REG_PATTERN =Pattern.compile(StringUtils.trimAllWhitespace(PH_EXPRESSION_PART_REG_PATTERN_STR)); + private static final Pattern PH_VARIABLE_REG_PATTERN =Pattern.compile("#\\{(.+?)\\}"); + private static final Pattern PH_VARIABLE_ARRAY_INDEX_REG_PATTERN =Pattern.compile("\\[(.+?)\\]"); + + /** + * 将占位符表达式替换为非占位符表达式,示例: + * PlaceHolderExpressionUtil.replace("(#{aaa} + #{bbb}[1] - #{ccc}['some.key'].#{xxx}) / (#{ddd}[1].#{eee}[2] + #{fff}[1].#{ggg}[2].#{hhh})","",""); + * 替换结果为: (aaa + bbb[1] - ccc['some.key'].xxx) / (ddd[1].eee[2] + fff[1].ggg[2].hhh) + * PlaceHolderExpressionUtil.replace("(#{aaa} + #{bbb}[1] - #{ccc}['some.key'].#{xxx}) / (#{ddd}[1].#{eee}[2] + #{fff}[1].#{ggg}[2].#{hhh})","arg."); + * 替换结果为: (arg.aaa + arg.bbb[1] - arg.ccc['some.key'].xxx) / (arg.ddd[1].eee[2] + arg.fff[1].ggg[2].hhh) + * PlaceHolderExpressionUtil.replace("(#{aaa} + #{bbb}[1] - #{ccc}['some.key'].#{xxx}) / (#{ddd}[1].#{eee}[2] + #{fff}[1].#{ggg}[2].#{hhh})","#{arg.","}"); + * 替换结果为: (#{arg.aaa} + #{arg.bbb[1]} - #{arg.ccc['some.key'].xxx}) / (#{arg.ddd[1].eee[2]} + #{arg.fff[1].ggg[2].hhh}) + * @param content 字符串 + * @param prefix 前缀 + * @param suffix 后缀 + * @returns 替换后的字符串 + */ + public static String replace(String content,String prefix,String suffix) { + if (!StringUtils.hasText(content)) { + return content; + } + List expressions =parse(content); + if(!CollectionUtil.hasElements(expressions)){ + return content; + } + // 在替换时, 需要先替换长度较长的, 避免替换错误 + Map sortedCache =new TreeMap<>(new StringLengthDescComparator()); + String result =content; + for(PlaceholderExpression expression : expressions){ + List parts =expression.getParts(); + StringBuilder sb =new StringBuilder(); + sb.append(prefix); + int size =parts.size(); + for(int i=0;i parse(String content) { + Set expressions =new TreeSet<>(new Comparator() { + @Override + public int compare(PlaceholderExpression o1, PlaceholderExpression o2) { + return o2.getExpression().compareTo(o1.getExpression()); + } + }); + Matcher matcher =PH_EXPRESSION_REG_PATTERN.matcher(content); + while(matcher.find()){ + String group =matcher.group(); + PlaceholderExpression expression =parseExpression(group); + if(!expression.isEmpty()) { + expressions.add(expression); + } + } + return CollectionUtil.set2List(expressions); + } + + /** + * PlaceHolderExpressionUtil.parseExpression("#{fff}[1].#{ggg}[2].#{hhh})"); + * 解析结果如下: + * { + * "expression" : "#{fff}[1].#{ggg}[2].#{hhh}", + * "parts" : [ + * { "name" : "fff", "arrayIndex" : "1" }, + * { "name" : "ggg", "arrayIndex" : "2" }, + * { "name" : "hhh", "arrayIndex" : null } + * ] + * } + * 解析占位符表达式 + * @param content 表达式 + * @return 解析后的表达式对象 + */ + public static PlaceholderExpression parseExpression(String content){ + PlaceholderExpression expression =new PlaceholderExpression(); + expression.setExpression(content); + Matcher matcher =PH_EXPRESSION_PART_REG_PATTERN.matcher(content); + while(matcher.find()){ + String group =matcher.group(); + Matcher variableMatcher =PH_VARIABLE_REG_PATTERN.matcher(group); + if(variableMatcher.find()){ + PlaceholderExpressionPart part =new PlaceholderExpressionPart(); + part.setName(variableMatcher.group(1)); + Matcher variableArrayIndexMatcher =PH_VARIABLE_ARRAY_INDEX_REG_PATTERN.matcher(group); + if(variableArrayIndexMatcher.find()){ + part.setArrayIndex(variableArrayIndexMatcher.group(1)); + } + expression.addPart(part); + } + } + return expression; + } +} diff --git a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/dictionary_render.tpl b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/dictionary_render.tpl index bd3b307b..9715e1f8 100644 --- a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/dictionary_render.tpl +++ b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/dictionary_render.tpl @@ -2,12 +2,16 @@ /** * #(dictionary.name) */ +#if("UD_JAVA_CLASS"==dictionary.type.toString()) @JsonIgnoreProperties(ignoreUnknown=true) +#end class #(className(dictionary.code,dictionary.version)) { - #(tabs(DictionaryGenerator.generateFields(dictionary.getFields()),1)) - + #(tabs(DictionaryGenerator.generateFields(dictionary),1)) + #if("UD_JAVA_CLASS"==dictionary.type.toString()) public void init(){ - #(tabs(DictionaryGenerator.generateInits(dictionary.getFields()),2)) + #(tabs(DictionaryGenerator.generateFieldInits(dictionary),2)) } + #end } + #end \ No newline at end of file diff --git a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/lib.tpl b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/lib.tpl index 8f633187..553a2388 100644 --- a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/lib.tpl +++ b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/lib.tpl @@ -4,11 +4,11 @@ ####################################### ### 模版函数 ####################################### -#include("/io/sc/engine/rule/core/code/template/package_render.tpl") -#include("/io/sc/engine/rule/core/code/template/import_render.tpl") -#include("/io/sc/engine/rule/core/code/template/functions_render.tpl") #include("/io/sc/engine/rule/core/code/template/dictionary_render.tpl") +#include("/io/sc/engine/rule/core/code/template/functions_render.tpl") +#include("/io/sc/engine/rule/core/code/template/import_render.tpl") #include("/io/sc/engine/rule/core/code/template/lib_render.tpl") +#include("/io/sc/engine/rule/core/code/template/package_render.tpl") #@renderPackage(packageName) diff --git a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/resource.tpl b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/resource.tpl index 28e5ee99..28086574 100644 --- a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/resource.tpl +++ b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/code/template/impl/resource.tpl @@ -6,14 +6,14 @@ ####################################### ### 模版函数 ####################################### -#include("/io/sc/engine/rule/core/code/template/package_render.tpl") -#include("/io/sc/engine/rule/core/code/template/import_render.tpl") -#include("/io/sc/engine/rule/core/code/template/functions_render.tpl") -#include("/io/sc/engine/rule/core/code/template/parameter_render.tpl") -#include("/io/sc/engine/rule/core/code/template/model_render.tpl") #include("/io/sc/engine/rule/core/code/template/argument_render.tpl") #include("/io/sc/engine/rule/core/code/template/dictionary_render.tpl") +#include("/io/sc/engine/rule/core/code/template/functions_render.tpl") +#include("/io/sc/engine/rule/core/code/template/import_render.tpl") #include("/io/sc/engine/rule/core/code/template/lib_render.tpl") +#include("/io/sc/engine/rule/core/code/template/model_render.tpl") +#include("/io/sc/engine/rule/core/code/template/package_render.tpl") +#include("/io/sc/engine/rule/core/code/template/parameter_render.tpl") #@renderPackage(packageName) diff --git a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums.properties b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums.properties index b8ecbe9d..5671ce4b 100644 --- a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums.properties +++ b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums.properties @@ -99,6 +99,13 @@ io.sc.engine.rule.core.enums.DictionaryType.JAVA_CLASS=Java Class io.sc.engine.rule.core.enums.DictionaryType.UD_JAVA_CLASS=Structure io.sc.engine.rule.core.enums.DictionaryType.ENUM=Enumerate +#================================================ +# \u679A\u4E3E\u5143\u6570\u636E\u9879\u503C\u7C7B\u578B\u679A\u4E3E +#================================================ +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.STRING=String +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.INTEGER=Integer +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.DECIMAL=Decimal + #================================================ # \u5E93\u7C7B\u578B\u679A\u4E3E #================================================ diff --git a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_tw_CN.properties b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_tw_CN.properties index 4b168157..74e413df 100644 --- a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_tw_CN.properties +++ b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_tw_CN.properties @@ -99,6 +99,13 @@ io.sc.engine.rule.core.enums.DictionaryType.JAVA_CLASS=Java \u985E io.sc.engine.rule.core.enums.DictionaryType.UD_JAVA_CLASS=\u7D50\u69CB\u9AD4 io.sc.engine.rule.core.enums.DictionaryType.ENUM=\u679A\u8209 +#================================================ +# \u679A\u4E3E\u5143\u6570\u636E\u9879\u503C\u7C7B\u578B\u679A\u4E3E +#================================================ +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.STRING=\u5B57\u7B26\u4E32 +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.INTEGER=\u6574\u6578 +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.DECIMAL=\u5C0F\u6578 + #================================================ # \u5E93\u7C7B\u578B\u679A\u4E3E #================================================ diff --git a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_zh_CN.properties b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_zh_CN.properties index 4fff15ea..cff20fc4 100644 --- a/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_zh_CN.properties +++ b/io.sc.engine.rule.core/src/main/resources/io/sc/engine/rule/core/i18n/enums_zh_CN.properties @@ -99,6 +99,13 @@ io.sc.engine.rule.core.enums.DictionaryType.JAVA_CLASS=Java \u7C7B io.sc.engine.rule.core.enums.DictionaryType.UD_JAVA_CLASS=\u7ED3\u6784\u4F53 io.sc.engine.rule.core.enums.DictionaryType.ENUM=\u679A\u4E3E +#================================================ +# \u679A\u4E3E\u5143\u6570\u636E\u9879\u503C\u7C7B\u578B\u679A\u4E3E +#================================================ +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.STRING=\u5B57\u7B26\u4E32 +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.INTEGER=\u6574\u6570 +io.sc.engine.rule.core.enums.EnumDictionaryItemValueType.DECIMAL=\u5C0F\u6570 + #================================================ # \u5E93\u7C7B\u578B\u679A\u4E3E #================================================ diff --git a/io.sc.engine.rule.frontend/.eslintrc.cjs b/io.sc.engine.rule.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.engine.rule.frontend/.eslintrc.cjs +++ b/io.sc.engine.rule.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.engine.rule.frontend/package.json b/io.sc.engine.rule.frontend/package.json index 267c59ae..eabbb076 100644 --- a/io.sc.engine.rule.frontend/package.json +++ b/io.sc.engine.rule.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.engine.rule.frontend/src/i18n/messages.json b/io.sc.engine.rule.frontend/src/i18n/messages.json index c96f315e..5d3d83f2 100644 --- a/io.sc.engine.rule.frontend/src/i18n/messages.json +++ b/io.sc.engine.rule.frontend/src/i18n/messages.json @@ -76,6 +76,7 @@ "re.parameter.grid.entity.libVersion": "Library Version", "re.parameter.grid.entity.indicatorCode": "Indicator", "re.parameter.tip.indicatorParameterCanNotEditable": "Indicator parameter can NOT editable!", + "re.parameter.tip.subModelParameterCanNotEditable": "Sub model parameter can NOT editable!", "re.parameter.dialog.moveParameter.title": "Select Target Location of Parameter", diff --git a/io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json b/io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json index ad46d7a7..4b54c248 100644 --- a/io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json +++ b/io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json @@ -76,6 +76,7 @@ "re.parameter.grid.entity.libVersion": "指標庫版本", "re.parameter.grid.entity.indicatorCode": "指標", "re.parameter.tip.indicatorParameterCanNotEditable": "類型為指標的參數不能進行編輯!", + "re.parameter.tip.subModelParameterCanNotEditable": "子模型參數不能進行編輯!", "re.parameter.dialog.moveParameter.title": "選擇參數移動的目標位置", diff --git a/io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json b/io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json index 5abf0a3b..c5f8a003 100644 --- a/io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json +++ b/io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json @@ -76,6 +76,7 @@ "re.parameter.grid.entity.libVersion": "指标库版本", "re.parameter.grid.entity.indicatorCode": "指标", "re.parameter.tip.indicatorParameterCanNotEditable": "类型为指标的参数不能进行编辑!", + "re.parameter.tip.subModelParameterCanNotEditable": "子模型参数不能进行编辑!", "re.parameter.dialog.moveParameter.title": "选择参数移动的目标位置", diff --git a/io.sc.engine.rule.frontend/src/utils/PlaceHolder.ts b/io.sc.engine.rule.frontend/src/utils/PlaceHolder.ts index 330db0d3..5806477d 100644 --- a/io.sc.engine.rule.frontend/src/utils/PlaceHolder.ts +++ b/io.sc.engine.rule.frontend/src/utils/PlaceHolder.ts @@ -1,18 +1,15 @@ import { Tools } from 'platform-core'; class PlaceHolder { - static #prefix: string = ''; + static #parameterPrefix: string = ''; + static #enumPrefix: string = ''; static #suffix: string = ''; - public static replace(str: string, prefix?: string, suffix?: string) { + + public static replace(str: string) { if (Tools.isString(str)) { str = str.replace('<', '<'); - if (Tools.isUndefinedOrNull(prefix)) { - prefix = PlaceHolder.#prefix; - } - if (Tools.isUndefinedOrNull(suffix)) { - suffix = PlaceHolder.#suffix; - } - return str.replace(/\$\{(.+?)\}/g, prefix + '$1' + suffix); + str = str.replace(/#\{(.+?)\}/g, PlaceHolder.#enumPrefix + '$1' + PlaceHolder.#suffix); + str = str.replace(/\$\{(.+?)\}/g, PlaceHolder.#parameterPrefix + '$1' + PlaceHolder.#suffix); } return str; } diff --git a/io.sc.engine.rule.frontend/src/views/dictionary/dictionary.vue b/io.sc.engine.rule.frontend/src/views/dictionary/dictionary.vue index ede9968e..55a16e0d 100644 --- a/io.sc.engine.rule.frontend/src/views/dictionary/dictionary.vue +++ b/io.sc.engine.rule.frontend/src/views/dictionary/dictionary.vue @@ -457,6 +457,7 @@ import 'tailwindcss/utilities.css'; import { ref, reactive } from 'vue'; -import { i18n, eventBus, $t, axios, Environment, Formater, Tools, EnumTools, DialogManager, Downloader, CorporationAuditorEntityManager } from 'platform-core'; +import { + i18n, + eventBus, + $t, + axios, + Environment, + Formater, + Tools, + EnumTools, + DialogManager, + Downloader, + CorporationAuditorEntityManager, + Options, +} from 'platform-core'; import UserDefinedJavaClassDictionaryJsonDialog from './UserDefinedJavaClassDictionaryJsonDialog.vue'; import ImportDialog from './ImportDialog.vue'; import ImportSampleDialog from './ImportSampleDialog.vue'; @@ -544,12 +566,17 @@ const autoCompletionManager = new AutoCompletionManager(); const userDefinedFunctionsManager = new UserDefinedFunctionsManager(); const templateImportAndExportDialogRef = ref(); const templateImportAndExportManager = new TemplateImportAndExportManager(templateImportAndExportDialogRef); +const valueTypeOptions = [ + { label: $t('java.lang.String'), value: 'java.lang.String' }, + { label: $t('java.lang.Long'), value: 'java.lang.Long' }, +]; const divStatus = reactive({ isShowFieldGrid: false, isShowEnumGrid: false, }); +const ValueTypeEnums = await EnumTools.fetch('io.sc.engine.rule.core.enums.EnumDictionaryItemValueType'); await EngineEnums.init(); await valueTypeManager.init(); diff --git a/io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue b/io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue index 37a17b55..0bc49438 100644 --- a/io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue +++ b/io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue @@ -5,7 +5,7 @@ diff --git a/io.sc.platform.core.frontend/src/views/testcase/maxgraph/AutoCompletionManager.ts b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/AutoCompletionManager.ts new file mode 100644 index 00000000..c2950e69 --- /dev/null +++ b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/AutoCompletionManager.ts @@ -0,0 +1,226 @@ +import { axios, Tools } from '@/platform'; + +class AutoCompletionManager { + parameters: any; + valueTypes: any; + + constructor() { + this.parameters = {}; + this.valueTypes = {}; + } + + public setParameters(parameters: any) { + this.parameters = parameters; + } + public setValueTypes(valueTypes: any) { + this.valueTypes = valueTypes; + } + + public getOptions(path: string): any { + // 如果没有路径, 返回参数列表 + if (!path) { + return this.getParameterOptions(); + } + // 以 . 结束表示对象属性 + if (path.endsWith('.')) { + path = path.substring(0, path.length - 1); + } + const names = path.split('.'); + if (!names) { + return this.getParameterOptions(); + } + //查找参数 + const parameter = this.findParmeterByName(names[0]); + if (!parameter) { + return null; + } + let valueType = this.findValueType(parameter.valueType, parameter.valueTypeVersion); + if (!valueType || !valueType.properties || valueType.properties.length <= 0) { + return null; + } + let index = 1; + while (index < names.length) { + valueType = this.findValueTypeByPropertyName(valueType.code, valueType.version, names[index++]); + } + const options: any[] = []; + for (const property of valueType.properties) { + const option = this.getOptionItem(property); + if (option) { + options.push(option); + } + } + return options; + } + + public findParmeterByCode(parameterCode: string) { + return this.parameters[parameterCode]; + } + + public findParmeterByName(parameterName: string) { + const values = Object.values(this.parameters); + for (const value of values) { + if (value.name === parameterName) { + return value; + } + } + return null; + } + + public findValueType(valueType: string, valueTypeVersion: number): any { + if (Tools.isNill(valueType)) { + return null; + } + const key = valueType + (Tools.isNill(valueTypeVersion) ? '' : ':' + valueTypeVersion); + return this.valueTypes[key]; + } + + public findValueTypeByPropertyName(valueTypeString: string, valueTypeVersion: number, propertyName: string) { + const valueType = this.findValueType(valueTypeString, valueTypeVersion); + if (!valueType || !valueType.properties || valueType.properties.length <= 0) { + return null; + } + for (const property of valueType.properties) { + if (property.name === propertyName) { + return this.findValueType(property.valueType, property.valueTypeVersion); + } + } + return null; + } + + public findValueTypeByPropertyCode(valueTypeString: string, valueTypeVersion: number, propertyCode: string) { + const valueType = this.findValueType(valueTypeString, valueTypeVersion); + if (!valueType || !valueType.properties || valueType.properties.length <= 0) { + return null; + } + for (const property of valueType.properties) { + if (property.code === propertyCode) { + return this.findValueType(property.valueType, property.valueTypeVersion); + } + } + return null; + } + + public getParameterOptions(): any { + const options: any[] = []; + Object.values(this.parameters).forEach((parameter: any) => { + const option = this.getOptionItem(parameter); + if (option) { + options.push(option); + } + }); + return options; + } + + public getOptionItem(parameter: any) { + const valueType = this.findValueType(parameter.valueType, parameter.valueTypeVersion); + if (!Tools.isNill(valueType)) { + const version = valueType.version ? valueType.name + '(V' + valueType.version + ')' : valueType.name; + const info = parameter.valueTypeIsList ? 'List<' + version + '>' : version; + if (parameter.type === 'parameter') { + if (parameter.valueTypeIsList) { + return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}[0]', info: info }; + } else { + return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}', info: info }; + } + } else if (parameter.type === 'enum') { + return { label: parameter.name, type: 'enum', apply: '#{' + parameter.name + '}', info: info }; + } + } + return null; + } + + public autoCompletionParameters(to: any, matchedText?: any): any { + return { + from: to, + options: this.getParameterOptions(), + validFor: /(.*)?/, + }; + } + + public autoCompletionProperties(to: any, matchedText?: any): any { + const matchedTextReverse = Tools.reverseString(matchedText); + const regReverse = /(\.(\](.+?)\[)?\}(.+?)\{[$#])+/g; //匹配 '.]n[}xxx{$#' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {$# + const matcheds: any = matchedTextReverse.match(regReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + return null; + } + const matched = Tools.reverseString(matcheds[0]); + const parameterName = matched.replace(/[#$]\{(.+?)\}(\[(.+?)\])?/g, '$1'); + if (Tools.isUndefinedOrNull(parameterName)) { + return null; + } + + /* + const enumRegReverse = /(\.(\](.+?)\[)?\}(.+?)\{#)+/g; //匹配 '.]n[}xxx{#' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {# + let matcheds: any = matchedTextReverse.match(enumRegReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + const regReverse = /(\.(\](.+?)\[)?\}(.+?)\{\$)+/g; //匹配 '.]n[}xxx{$' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {$ + matcheds = matchedTextReverse.match(regReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + return null; + } + } + const matched = Tools.reverseString(matcheds[0]); + let parameterName = matched.replace(/#\{(.+?)\}(\[(.+?)\])?/g, '$1'); + // ---- --- -- -- --- -- + // $ { xxx } [ n ] + if (Tools.isUndefinedOrNull(parameterName)) { + parameterName = matched.replace(/\$\{(.+?)\}(\[(.+?)\])?/g, '$1'); + if (Tools.isUndefinedOrNull(parameterName)) { + return null; + } + } + */ + const options = this.getOptions(parameterName); + if (Tools.isUndefinedOrNull(options)) { + return null; + } + return { + from: to, + options: options, + validFor: /^(.*)?$/, + }; + } + + public doAutoCompletion(context: any): any { + console.log('>>>>'); + const beforeMatched = context.matchBefore(/(.+?)/g); + console.log(beforeMatched); + + if (Tools.isUndefinedOrNull(beforeMatched)) { + return null; + } + const beforeText = beforeMatched.text || ''; + if (beforeText.endsWith('.')) { + //匹配属性 + return this.autoCompletionProperties(beforeMatched.to, beforeText); + } else if (beforeText.endsWith(' ')) { + //匹配参数 + return this.autoCompletionParameters(beforeMatched.to); + } else { + return null; + } + } + + public load(url: string) { + axios.get(url).then((response) => { + this.setParameters(response.data?.parameters); + this.setValueTypes(response.data?.valueTypes); + }); + } + + public autoCompletion(): any { + console.log('????'); + return (context: any) => { + return this.doAutoCompletion(context); + }; + } +} + +export { AutoCompletionManager }; diff --git a/io.sc.platform.core.frontend/src/views/testcase/maxgraph/PlaceHolder.ts b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/PlaceHolder.ts new file mode 100644 index 00000000..7339a583 --- /dev/null +++ b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/PlaceHolder.ts @@ -0,0 +1,18 @@ +import { Tools } from '@/platform'; + +class PlaceHolder { + static #parameterPrefix: string = ''; + static #enumPrefix: string = ''; + static #suffix: string = ''; + + public static replace(str: string) { + if (Tools.isString(str)) { + str = str.replace('<', '<'); + str = str.replace(/#\{(.+?)\}/g, PlaceHolder.#enumPrefix + '$1' + PlaceHolder.#suffix); + str = str.replace(/\$\{(.+?)\}/g, PlaceHolder.#parameterPrefix + '$1' + PlaceHolder.#suffix); + } + return str; + } +} + +export { PlaceHolder }; diff --git a/io.sc.platform.core.frontend/src/views/testcase/maxgraph/UserDefinedFunctionsManager.ts b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/UserDefinedFunctionsManager.ts new file mode 100644 index 00000000..60ce7702 --- /dev/null +++ b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/UserDefinedFunctionsManager.ts @@ -0,0 +1,23 @@ +import { ref } from 'vue'; +import { axios, Environment, Tools } from '@/platform'; + +class UserDefinedFunctionsManager { + #functions: any; + + constructor() { + this.#functions = ref([]); + } + + public userDefinedFunctions(): any { + return this.#functions; + } + + public async load() { + const response = await axios.get(Environment.apiContextPath('/api/re/function?pageable=false&sortBy=name')); + this.#functions.value = Tools.objects2Objects(response.data?.content, null, (obj: any) => { + return obj.enable; + }); + } +} + +export { UserDefinedFunctionsManager }; diff --git a/io.sc.platform.core.frontend/src/views/testcase/maxgraph/maxgraph.vue b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/maxgraph.vue index a6139573..9116579a 100644 --- a/io.sc.platform.core.frontend/src/views/testcase/maxgraph/maxgraph.vue +++ b/io.sc.platform.core.frontend/src/views/testcase/maxgraph/maxgraph.vue @@ -3,29 +3,29 @@ diff --git a/io.sc.platform.core.frontend/template-project/.eslintrc.cjs b/io.sc.platform.core.frontend/template-project/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.platform.core.frontend/template-project/.eslintrc.cjs +++ b/io.sc.platform.core.frontend/template-project/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.platform.core.frontend/template-project/package.json b/io.sc.platform.core.frontend/template-project/package.json index e4db55e6..5e4d4f33 100644 --- a/io.sc.platform.core.frontend/template-project/package.json +++ b/io.sc.platform.core.frontend/template-project/package.json @@ -1,6 +1,6 @@ { "name": "platform-core", - "version": "8.2.24", + "version": "8.2.28", "description": "前端核心包,用于快速构建前端的脚手架", "private": false, "keywords": [], @@ -110,7 +110,7 @@ "mockjs": "1.1.0", "node-sql-parser": "5.3.4", "pinia": "2.2.6", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/AutoCompletionManager.ts b/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/AutoCompletionManager.ts index 429e939f..c2950e69 100644 --- a/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/AutoCompletionManager.ts +++ b/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/AutoCompletionManager.ts @@ -116,10 +116,14 @@ class AutoCompletionManager { if (!Tools.isNill(valueType)) { const version = valueType.version ? valueType.name + '(V' + valueType.version + ')' : valueType.name; const info = parameter.valueTypeIsList ? 'List<' + version + '>' : version; - if (parameter.valueTypeIsList) { - return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}[0]', info: info }; - } else { - return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}', info: info }; + if (parameter.type === 'parameter') { + if (parameter.valueTypeIsList) { + return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}[0]', info: info }; + } else { + return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}', info: info }; + } + } else if (parameter.type === 'enum') { + return { label: parameter.name, type: 'enum', apply: '#{' + parameter.name + '}', info: info }; } } return null; @@ -135,20 +139,44 @@ class AutoCompletionManager { public autoCompletionProperties(to: any, matchedText?: any): any { const matchedTextReverse = Tools.reverseString(matchedText); - const regReverse = /(\.(\](.+?)\[)?\}(.+?)\{\$)+/g; //匹配 '.]n[}xxx{$' 模式 + const regReverse = /(\.(\](.+?)\[)?\}(.+?)\{[$#])+/g; //匹配 '.]n[}xxx{$#' 模式 // -- -- --- -- -- --- ---- - // . ] n [ } xxx { $ + // . ] n [ } xxx {$# const matcheds: any = matchedTextReverse.match(regReverse); if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { return null; } const matched = Tools.reverseString(matcheds[0]); - const parameterName = matched.replace(/\$\{(.+?)\}(\[(.+?)\])?/g, '$1'); + const parameterName = matched.replace(/[#$]\{(.+?)\}(\[(.+?)\])?/g, '$1'); + if (Tools.isUndefinedOrNull(parameterName)) { + return null; + } + + /* + const enumRegReverse = /(\.(\](.+?)\[)?\}(.+?)\{#)+/g; //匹配 '.]n[}xxx{#' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {# + let matcheds: any = matchedTextReverse.match(enumRegReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + const regReverse = /(\.(\](.+?)\[)?\}(.+?)\{\$)+/g; //匹配 '.]n[}xxx{$' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {$ + matcheds = matchedTextReverse.match(regReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + return null; + } + } + const matched = Tools.reverseString(matcheds[0]); + let parameterName = matched.replace(/#\{(.+?)\}(\[(.+?)\])?/g, '$1'); // ---- --- -- -- --- -- // $ { xxx } [ n ] if (Tools.isUndefinedOrNull(parameterName)) { - return null; + parameterName = matched.replace(/\$\{(.+?)\}(\[(.+?)\])?/g, '$1'); + if (Tools.isUndefinedOrNull(parameterName)) { + return null; + } } + */ const options = this.getOptions(parameterName); if (Tools.isUndefinedOrNull(options)) { return null; @@ -161,7 +189,10 @@ class AutoCompletionManager { } public doAutoCompletion(context: any): any { + console.log('>>>>'); const beforeMatched = context.matchBefore(/(.+?)/g); + console.log(beforeMatched); + if (Tools.isUndefinedOrNull(beforeMatched)) { return null; } @@ -185,6 +216,7 @@ class AutoCompletionManager { } public autoCompletion(): any { + console.log('????'); return (context: any) => { return this.doAutoCompletion(context); }; diff --git a/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/code-mirror.vue b/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/code-mirror.vue index 1883961b..33bc801a 100644 --- a/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/code-mirror.vue +++ b/io.sc.platform.core.frontend/template-project/src/views/testcase/code-mirror/code-mirror.vue @@ -20,7 +20,7 @@ import { axios, Environment, EnumTools, Tools, Formater } from '@/platform'; import { UserDefinedFunctionsManager } from './UserDefinedFunctionsManager'; import { AutoCompletionManager } from './AutoCompletionManager'; -const modelValue = ref('${个人征信报告.报告头.报告头信息单元.报告标识信息段.报告编号}'); +const modelValue = ref('${个人征信报告.报告头.报告头信息单元.报告标识信息段.报告编号} #{枚举}'); const click = () => { //console.log(modelValue.value); @@ -30,7 +30,10 @@ const click = () => { const autoCompletionManager = new AutoCompletionManager(); const userDefinedFunctionsManager = new UserDefinedFunctionsManager(); -autoCompletionManager.load(Environment.apiContextPath('/api/re/common/autoCompletionByIndicatorId/34e7391f-ba76-4e14-b152-ae0da917fd20')); +autoCompletionManager.load(Environment.apiContextPath('/api/re/common/parameterAndValueType/findByParameterId/34e7391f-ba76-4e14-b152-ae0da917fd20')); userDefinedFunctionsManager.load(); console.log(Tools.escapeHtml('&')); + +const matcheds = '${kdsf} #{aaa}'.match(/\$\{(.+?)\}|#\{(.+?)\}/g); +//console.log(matcheds); diff --git a/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/AutoCompletionManager.ts b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/AutoCompletionManager.ts new file mode 100644 index 00000000..c2950e69 --- /dev/null +++ b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/AutoCompletionManager.ts @@ -0,0 +1,226 @@ +import { axios, Tools } from '@/platform'; + +class AutoCompletionManager { + parameters: any; + valueTypes: any; + + constructor() { + this.parameters = {}; + this.valueTypes = {}; + } + + public setParameters(parameters: any) { + this.parameters = parameters; + } + public setValueTypes(valueTypes: any) { + this.valueTypes = valueTypes; + } + + public getOptions(path: string): any { + // 如果没有路径, 返回参数列表 + if (!path) { + return this.getParameterOptions(); + } + // 以 . 结束表示对象属性 + if (path.endsWith('.')) { + path = path.substring(0, path.length - 1); + } + const names = path.split('.'); + if (!names) { + return this.getParameterOptions(); + } + //查找参数 + const parameter = this.findParmeterByName(names[0]); + if (!parameter) { + return null; + } + let valueType = this.findValueType(parameter.valueType, parameter.valueTypeVersion); + if (!valueType || !valueType.properties || valueType.properties.length <= 0) { + return null; + } + let index = 1; + while (index < names.length) { + valueType = this.findValueTypeByPropertyName(valueType.code, valueType.version, names[index++]); + } + const options: any[] = []; + for (const property of valueType.properties) { + const option = this.getOptionItem(property); + if (option) { + options.push(option); + } + } + return options; + } + + public findParmeterByCode(parameterCode: string) { + return this.parameters[parameterCode]; + } + + public findParmeterByName(parameterName: string) { + const values = Object.values(this.parameters); + for (const value of values) { + if (value.name === parameterName) { + return value; + } + } + return null; + } + + public findValueType(valueType: string, valueTypeVersion: number): any { + if (Tools.isNill(valueType)) { + return null; + } + const key = valueType + (Tools.isNill(valueTypeVersion) ? '' : ':' + valueTypeVersion); + return this.valueTypes[key]; + } + + public findValueTypeByPropertyName(valueTypeString: string, valueTypeVersion: number, propertyName: string) { + const valueType = this.findValueType(valueTypeString, valueTypeVersion); + if (!valueType || !valueType.properties || valueType.properties.length <= 0) { + return null; + } + for (const property of valueType.properties) { + if (property.name === propertyName) { + return this.findValueType(property.valueType, property.valueTypeVersion); + } + } + return null; + } + + public findValueTypeByPropertyCode(valueTypeString: string, valueTypeVersion: number, propertyCode: string) { + const valueType = this.findValueType(valueTypeString, valueTypeVersion); + if (!valueType || !valueType.properties || valueType.properties.length <= 0) { + return null; + } + for (const property of valueType.properties) { + if (property.code === propertyCode) { + return this.findValueType(property.valueType, property.valueTypeVersion); + } + } + return null; + } + + public getParameterOptions(): any { + const options: any[] = []; + Object.values(this.parameters).forEach((parameter: any) => { + const option = this.getOptionItem(parameter); + if (option) { + options.push(option); + } + }); + return options; + } + + public getOptionItem(parameter: any) { + const valueType = this.findValueType(parameter.valueType, parameter.valueTypeVersion); + if (!Tools.isNill(valueType)) { + const version = valueType.version ? valueType.name + '(V' + valueType.version + ')' : valueType.name; + const info = parameter.valueTypeIsList ? 'List<' + version + '>' : version; + if (parameter.type === 'parameter') { + if (parameter.valueTypeIsList) { + return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}[0]', info: info }; + } else { + return { label: parameter.name, type: 'variable', apply: '${' + parameter.name + '}', info: info }; + } + } else if (parameter.type === 'enum') { + return { label: parameter.name, type: 'enum', apply: '#{' + parameter.name + '}', info: info }; + } + } + return null; + } + + public autoCompletionParameters(to: any, matchedText?: any): any { + return { + from: to, + options: this.getParameterOptions(), + validFor: /(.*)?/, + }; + } + + public autoCompletionProperties(to: any, matchedText?: any): any { + const matchedTextReverse = Tools.reverseString(matchedText); + const regReverse = /(\.(\](.+?)\[)?\}(.+?)\{[$#])+/g; //匹配 '.]n[}xxx{$#' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {$# + const matcheds: any = matchedTextReverse.match(regReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + return null; + } + const matched = Tools.reverseString(matcheds[0]); + const parameterName = matched.replace(/[#$]\{(.+?)\}(\[(.+?)\])?/g, '$1'); + if (Tools.isUndefinedOrNull(parameterName)) { + return null; + } + + /* + const enumRegReverse = /(\.(\](.+?)\[)?\}(.+?)\{#)+/g; //匹配 '.]n[}xxx{#' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {# + let matcheds: any = matchedTextReverse.match(enumRegReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + const regReverse = /(\.(\](.+?)\[)?\}(.+?)\{\$)+/g; //匹配 '.]n[}xxx{$' 模式 + // -- -- --- -- -- --- ---- + // . ] n [ } xxx {$ + matcheds = matchedTextReverse.match(regReverse); + if (Tools.isUndefinedOrNull(matcheds) || matcheds.length <= 0) { + return null; + } + } + const matched = Tools.reverseString(matcheds[0]); + let parameterName = matched.replace(/#\{(.+?)\}(\[(.+?)\])?/g, '$1'); + // ---- --- -- -- --- -- + // $ { xxx } [ n ] + if (Tools.isUndefinedOrNull(parameterName)) { + parameterName = matched.replace(/\$\{(.+?)\}(\[(.+?)\])?/g, '$1'); + if (Tools.isUndefinedOrNull(parameterName)) { + return null; + } + } + */ + const options = this.getOptions(parameterName); + if (Tools.isUndefinedOrNull(options)) { + return null; + } + return { + from: to, + options: options, + validFor: /^(.*)?$/, + }; + } + + public doAutoCompletion(context: any): any { + console.log('>>>>'); + const beforeMatched = context.matchBefore(/(.+?)/g); + console.log(beforeMatched); + + if (Tools.isUndefinedOrNull(beforeMatched)) { + return null; + } + const beforeText = beforeMatched.text || ''; + if (beforeText.endsWith('.')) { + //匹配属性 + return this.autoCompletionProperties(beforeMatched.to, beforeText); + } else if (beforeText.endsWith(' ')) { + //匹配参数 + return this.autoCompletionParameters(beforeMatched.to); + } else { + return null; + } + } + + public load(url: string) { + axios.get(url).then((response) => { + this.setParameters(response.data?.parameters); + this.setValueTypes(response.data?.valueTypes); + }); + } + + public autoCompletion(): any { + console.log('????'); + return (context: any) => { + return this.doAutoCompletion(context); + }; + } +} + +export { AutoCompletionManager }; diff --git a/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/Maxgraph.vue b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/Maxgraph.vue index a6139573..9116579a 100644 --- a/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/Maxgraph.vue +++ b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/Maxgraph.vue @@ -3,29 +3,29 @@ diff --git a/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/PlaceHolder.ts b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/PlaceHolder.ts new file mode 100644 index 00000000..7339a583 --- /dev/null +++ b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/PlaceHolder.ts @@ -0,0 +1,18 @@ +import { Tools } from '@/platform'; + +class PlaceHolder { + static #parameterPrefix: string = ''; + static #enumPrefix: string = ''; + static #suffix: string = ''; + + public static replace(str: string) { + if (Tools.isString(str)) { + str = str.replace('<', '<'); + str = str.replace(/#\{(.+?)\}/g, PlaceHolder.#enumPrefix + '$1' + PlaceHolder.#suffix); + str = str.replace(/\$\{(.+?)\}/g, PlaceHolder.#parameterPrefix + '$1' + PlaceHolder.#suffix); + } + return str; + } +} + +export { PlaceHolder }; diff --git a/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/UserDefinedFunctionsManager.ts b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/UserDefinedFunctionsManager.ts new file mode 100644 index 00000000..60ce7702 --- /dev/null +++ b/io.sc.platform.core.frontend/template-project/src/views/testcase/maxgraph/UserDefinedFunctionsManager.ts @@ -0,0 +1,23 @@ +import { ref } from 'vue'; +import { axios, Environment, Tools } from '@/platform'; + +class UserDefinedFunctionsManager { + #functions: any; + + constructor() { + this.#functions = ref([]); + } + + public userDefinedFunctions(): any { + return this.#functions; + } + + public async load() { + const response = await axios.get(Environment.apiContextPath('/api/re/function?pageable=false&sortBy=name')); + this.#functions.value = Tools.objects2Objects(response.data?.content, null, (obj: any) => { + return obj.enable; + }); + } +} + +export { UserDefinedFunctionsManager }; diff --git a/io.sc.platform.developer.doc/package.json b/io.sc.platform.developer.doc/package.json index b7efa8bc..94babd99 100644 --- a/io.sc.platform.developer.doc/package.json +++ b/io.sc.platform.developer.doc/package.json @@ -28,7 +28,7 @@ "vuepress": "2.0.0-rc.15" }, "dependencies": { - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "vue": "3.5.13", "vue-i18n": "10.0.4" diff --git a/io.sc.platform.developer.frontend/.eslintrc.cjs b/io.sc.platform.developer.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.platform.developer.frontend/.eslintrc.cjs +++ b/io.sc.platform.developer.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.platform.developer.frontend/package.json b/io.sc.platform.developer.frontend/package.json index 5ef393b8..8393e938 100644 --- a/io.sc.platform.developer.frontend/package.json +++ b/io.sc.platform.developer.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.platform.gradle/templates/pgp/setup/gradle.properties b/io.sc.platform.gradle/templates/pgp/setup/gradle.properties index 1cbb364a..0ac45dd8 100644 --- a/io.sc.platform.gradle/templates/pgp/setup/gradle.properties +++ b/io.sc.platform.gradle/templates/pgp/setup/gradle.properties @@ -38,7 +38,7 @@ application_version=1.0.0 platform_group=io.sc platform_version=8.2.5 platform_plugin_version=8.2.5 -platform_core_frontend_version=8.2.22 +platform_core_frontend_version=8.2.24 ########################################################### # dependencies version diff --git a/io.sc.platform.lcdp.frontend/.eslintrc.cjs b/io.sc.platform.lcdp.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.platform.lcdp.frontend/.eslintrc.cjs +++ b/io.sc.platform.lcdp.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.platform.lcdp.frontend/package.json b/io.sc.platform.lcdp.frontend/package.json index 09a9f5b4..ef72172a 100644 --- a/io.sc.platform.lcdp.frontend/package.json +++ b/io.sc.platform.lcdp.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.platform.license.keygen.frontend/.eslintrc.cjs b/io.sc.platform.license.keygen.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.platform.license.keygen.frontend/.eslintrc.cjs +++ b/io.sc.platform.license.keygen.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.platform.license.keygen.frontend/package.json b/io.sc.platform.license.keygen.frontend/package.json index b921f84f..697f1a40 100644 --- a/io.sc.platform.license.keygen.frontend/package.json +++ b/io.sc.platform.license.keygen.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.platform.mvc.frontend/.eslintrc.cjs b/io.sc.platform.mvc.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.platform.mvc.frontend/.eslintrc.cjs +++ b/io.sc.platform.mvc.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.platform.mvc.frontend/package.json b/io.sc.platform.mvc.frontend/package.json index a2f9d230..0132a047 100644 --- a/io.sc.platform.mvc.frontend/package.json +++ b/io.sc.platform.mvc.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.platform.scheduler.manager.frontend/.eslintrc.cjs b/io.sc.platform.scheduler.manager.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.platform.scheduler.manager.frontend/.eslintrc.cjs +++ b/io.sc.platform.scheduler.manager.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.platform.scheduler.manager.frontend/package.json b/io.sc.platform.scheduler.manager.frontend/package.json index c6feddfb..9042d132 100644 --- a/io.sc.platform.scheduler.manager.frontend/package.json +++ b/io.sc.platform.scheduler.manager.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.platform.system.frontend/.eslintrc.cjs b/io.sc.platform.system.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.platform.system.frontend/.eslintrc.cjs +++ b/io.sc.platform.system.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.platform.system.frontend/package.json b/io.sc.platform.system.frontend/package.json index 4e752e77..84f31cba 100644 --- a/io.sc.platform.system.frontend/package.json +++ b/io.sc.platform.system.frontend/package.json @@ -110,7 +110,7 @@ "mockjs": "1.1.0", "node-sql-parser": "5.3.4", "pinia": "2.2.6", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.platform.util/src/main/java/io/sc/platform/util/PlaceHolderExpressionUtil.java b/io.sc.platform.util/src/main/java/io/sc/platform/util/PlaceHolderExpressionUtil.java index 5a840e73..1d6182d8 100644 --- a/io.sc.platform.util/src/main/java/io/sc/platform/util/PlaceHolderExpressionUtil.java +++ b/io.sc.platform.util/src/main/java/io/sc/platform/util/PlaceHolderExpressionUtil.java @@ -20,8 +20,8 @@ public class PlaceHolderExpressionUtil { // 3. ${ccc}[1].${ddd} // 4. ${eee}[1].${fff}[2] // 5. ${ggg}[1].${hhh}[2].${iii} - private static final String PH_EXPRESSION_REG_PATTERN_STR = "(\\$ \\{ (.+?) \\})(\\[ (.+?) \\])?((\\[ (.+?) \\])?(\\.? (\\$ \\{ (.+?) \\})(\\[ (.+?) \\])?)+?)*"; - //private static final String PH_EXPRESSION_REG_PATTERN_STR = "(\\$ \\{ (\\S+?) \\})(\\[ (\\S+?) \\])?((\\[ (\\S+?) \\])?(\\.? (\\$ \\{ (\\S+?) \\})(\\[ (\\S+?) \\])?)+?)*"; + + private static final String PH_EXPRESSION_REG_PATTERN_STR = "(\\$ \\{ (.+?) \\})(\\[ (.+?) \\])?((\\[ (.+?) \\])?(\\.? (\\$ \\{ (.+?) \\})(\\[ (.+?) \\])?)+?)*"; // --- --- ----- --- --- ----- --- --- ----- --- --- --- --- ----- --- --- ----- --- // ($ { xxx } )([ nnn ] )?(([ nnn ] )?(.? ($ { xxx } )([ nnn ] )?)+?)* // (${xxx} )([nnn] )?(([nnn] )?(.? (${xxx} )([nnn ] )?)+?)* @@ -29,16 +29,13 @@ public class PlaceHolderExpressionUtil { // -------- ------- ? ------- - ------ ------- // (变量)([下标])?(([下标])?(.?(变量)([下标])?)+?)* private static final Pattern PH_EXPRESSION_REG_PATTERN =Pattern.compile(StringUtils.trimAllWhitespace(PH_EXPRESSION_REG_PATTERN_STR)); - private static final String PH_EXPRESSION_PART_REG_PATTERN_STR = "(\\$ \\{ (.+?) \\})(\\[ (.+?) \\])?"; - //private static final String PH_EXPRESSION_PART_REG_PATTERN_STR = "(\\$ \\{ (\\S+?) \\})(\\[ (\\S+?) \\])?"; - // --- --- ----- --- --- ----- --- --- ----- --- --- --- --- ----- --- --- ----- --- + private static final String PH_EXPRESSION_PART_REG_PATTERN_STR = "(\\$ \\{ (.+?) \\})(\\[ (.+?) \\])?"; + // --- --- ----- --- --- ----- --- // ($ { xxx } )([ nnn ] )? // (${xxx})([nnn])? private static final Pattern PH_EXPRESSION_PART_REG_PATTERN =Pattern.compile(StringUtils.trimAllWhitespace(PH_EXPRESSION_PART_REG_PATTERN_STR)); private static final Pattern PH_VARIABLE_REG_PATTERN =Pattern.compile("\\$\\{(.+?)\\}"); private static final Pattern PH_VARIABLE_ARRAY_INDEX_REG_PATTERN =Pattern.compile("\\[(.+?)\\]"); - //private static final Pattern PH_VARIABLE_REG_PATTERN =Pattern.compile("\\$\\{(\\S+?)\\}"); - //private static final Pattern PH_VARIABLE_ARRAY_INDEX_REG_PATTERN =Pattern.compile("\\[(\\S+?)\\]"); /** * 将占位符表达式替换为非占位符表达式,示例: diff --git a/io.sc.standard.frontend/.eslintrc.cjs b/io.sc.standard.frontend/.eslintrc.cjs index 90511fd3..3c6261c6 100644 --- a/io.sc.standard.frontend/.eslintrc.cjs +++ b/io.sc.standard.frontend/.eslintrc.cjs @@ -66,5 +66,6 @@ module.exports = { 'prefer-rest-params': 'off', 'no-control-regex': 'off', 'no-case-declarations': 'off', + 'vue/no-v-html': 'off' }, }; diff --git a/io.sc.standard.frontend/package.json b/io.sc.standard.frontend/package.json index 3c02126c..be0f3809 100644 --- a/io.sc.standard.frontend/package.json +++ b/io.sc.standard.frontend/package.json @@ -111,7 +111,7 @@ "node-sql-parser": "5.3.4", "pinia": "2.2.6", "pinia-undo": "0.2.4", - "platform-core": "8.2.24", + "platform-core": "8.2.28", "quasar": "2.17.4", "sort-array": "5.0.0", "svg-path-commander": "2.1.5", diff --git a/io.sc.website/package.json b/io.sc.website/package.json index 61a835ff..8f9118db 100644 --- a/io.sc.website/package.json +++ b/io.sc.website/package.json @@ -28,6 +28,6 @@ }, "dependencies": { "vue": "3.5.13", - "platform-core": "8.2.24" + "platform-core": "8.2.28" } } \ No newline at end of file