Browse Source

后端发布: 8.2.15

前端发布: 8.2.74
main
wangshaoping 2 weeks ago
parent
commit
35ed2804a7
  1. 37
      io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/model/ParameterInOptionAddtion.java
  2. 6
      io.sc.engine.rule.frontend/src/i18n/messages.json
  3. 6
      io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json
  4. 6
      io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json
  5. 4
      io.sc.engine.rule.frontend/src/views/authorization/Authorization.vue
  6. 4
      io.sc.engine.rule.frontend/src/views/dictionary/dictionary.vue
  7. 12
      io.sc.engine.rule.frontend/src/views/lib/Lib.vue
  8. 43
      io.sc.engine.rule.frontend/src/views/resources/designer/Addition.vue
  9. 3
      io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue
  10. 8
      io.sc.engine.rule.frontend/src/views/resources/designer/Designer.vue
  11. 8
      io.sc.engine.rule.frontend/src/views/resources/designer/DesignerDialog.vue
  12. 6
      io.sc.engine.rule.frontend/src/views/resources/designer/ExecutionFlowDialog.vue
  13. 4
      io.sc.engine.rule.frontend/src/views/resources/designer/HttpRequestDialog.vue
  14. 4
      io.sc.engine.rule.frontend/src/views/shared/SelectIndicatorDialog.vue
  15. 4
      io.sc.engine.rule.frontend/src/views/shared/SimulatorDialog.vue
  16. 4
      io.sc.engine.rule.frontend/src/views/shared/TestCaseGrid.vue
  17. 2
      io.sc.engine.rule.frontend/src/views/shared/TestcaseParameterGrid.vue
  18. 8
      io.sc.engine.rule.frontend/src/views/testcase/Testcase.vue
  19. 4
      io.sc.engine.rule.frontend/src/views/workflow/Workflow.vue
  20. 10
      io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/converter/ParameterInOptionAdditionEntityConverter.java
  21. 56
      io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/entity/ParameterInOptionAdditionEntity.java
  22. 34
      io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/service/impl/ParameterInOptionAdditionServiceImpl.java
  23. 37
      io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/vo/ParameterInOptionAdditionVo.java
  24. 7
      io.sc.engine.rule.server/src/main/resources/liquibase/RE_1.0.0_20220515__Rule Engine Database Schema DDL.xml
  25. 1
      io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words.properties
  26. 1
      io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_tw_CN.properties
  27. 1
      io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_zh_CN.properties

37
io.sc.engine.rule.core/src/main/java/io/sc/engine/rule/core/po/model/ParameterInOptionAddtion.java

@ -10,9 +10,12 @@ public class ParameterInOptionAddtion {
protected QualitativeAdditionComponentType componentType; protected QualitativeAdditionComponentType componentType;
protected String condition; protected String condition;
protected Boolean enable =true; protected Boolean enable =true;
protected Boolean required =true;
protected Integer order; protected Integer order;
protected Integer rows; protected Integer textareaHeight;
protected Integer textMinLength;
protected Integer textMaxLength;
protected String prompt; protected String prompt;
protected String attachmentExtendNames; protected String attachmentExtendNames;
protected Integer attachmentMaxCount; protected Integer attachmentMaxCount;
@ -73,6 +76,14 @@ public class ParameterInOptionAddtion {
this.enable = enable; this.enable = enable;
} }
public Boolean getRequired() {
return required;
}
public void setRequired(Boolean required) {
this.required = required;
}
public Integer getOrder() { public Integer getOrder() {
return order; return order;
} }
@ -81,12 +92,28 @@ public class ParameterInOptionAddtion {
this.order = order; this.order = order;
} }
public Integer getRows() { public Integer getTextareaHeight() {
return rows; return textareaHeight;
}
public void setTextareaHeight(Integer textareaHeight) {
this.textareaHeight = textareaHeight;
}
public Integer getTextMinLength() {
return textMinLength;
}
public void setTextMinLength(Integer textMinLength) {
this.textMinLength = textMinLength;
}
public Integer getTextMaxLength() {
return textMaxLength;
} }
public void setRows(Integer rows) { public void setTextMaxLength(Integer textMaxLength) {
this.rows = rows; this.textMaxLength = textMaxLength;
} }
public String getPrompt() { public String getPrompt() {

6
io.sc.engine.rule.frontend/src/i18n/messages.json

@ -101,9 +101,11 @@
"re.addition.grid.entity.description": "Description", "re.addition.grid.entity.description": "Description",
"re.addition.grid.entity.componentType": "Component Type", "re.addition.grid.entity.componentType": "Component Type",
"re.addition.grid.entity.condition": "Condition", "re.addition.grid.entity.condition": "Condition",
"re.addition.grid.entity.rows": "rows for textarea", "re.addition.grid.entity.textareaHeight": "Height of Textarea(Unit:pixel)",
"re.addition.grid.entity.textMinLength": "Minimal Length of Text",
"re.addition.grid.entity.textMaxLength": "Maximum Length of Text",
"re.addition.grid.entity.prompt": "Prompts", "re.addition.grid.entity.prompt": "Prompts",
"re.addition.grid.entity.attachmentExtendNames": "Extend Names of Attachment to upload", "re.addition.grid.entity.attachmentExtendNames": "Extend Names of Attachment to upload(split by comma when multiple)",
"re.addition.grid.entity.attachmentMaxCount": "Max Count of Attachment to upload", "re.addition.grid.entity.attachmentMaxCount": "Max Count of Attachment to upload",
"re.processor.dialog.decisionTree.title": "Decision Tree Designer", "re.processor.dialog.decisionTree.title": "Decision Tree Designer",

6
io.sc.engine.rule.frontend/src/i18n/messages_tw_CN.json

@ -101,9 +101,11 @@
"re.addition.grid.entity.description": "描述", "re.addition.grid.entity.description": "描述",
"re.addition.grid.entity.componentType": "組件類型", "re.addition.grid.entity.componentType": "組件類型",
"re.addition.grid.entity.condition": "觸發條件", "re.addition.grid.entity.condition": "觸發條件",
"re.addition.grid.entity.rows": "文本框行數", "re.addition.grid.entity.textareaHeight": "文本框高度(單位:像素)",
"re.addition.grid.entity.textMinLength": "文本框允許輸入的字符個數(最小值)",
"re.addition.grid.entity.textMaxLength": "文本框允許輸入的字符個數(最大值)",
"re.addition.grid.entity.prompt": "提示詞", "re.addition.grid.entity.prompt": "提示詞",
"re.addition.grid.entity.attachmentExtendNames": "允許上傳附件的文件擴展名", "re.addition.grid.entity.attachmentExtendNames": "允許上傳附件的文件擴展名(多個採用逗號分隔)",
"re.addition.grid.entity.attachmentMaxCount": "允許上傳附件的最大個數", "re.addition.grid.entity.attachmentMaxCount": "允許上傳附件的最大個數",
"re.processor.dialog.decisionTree.title": "決策樹設計器", "re.processor.dialog.decisionTree.title": "決策樹設計器",

6
io.sc.engine.rule.frontend/src/i18n/messages_zh_CN.json

@ -102,9 +102,11 @@
"re.addition.grid.entity.description": "描述", "re.addition.grid.entity.description": "描述",
"re.addition.grid.entity.componentType": "组件类型", "re.addition.grid.entity.componentType": "组件类型",
"re.addition.grid.entity.condition": "触发条件", "re.addition.grid.entity.condition": "触发条件",
"re.addition.grid.entity.rows": "文本框行数", "re.addition.grid.entity.textareaHeight": "文本框高度(单位:像素)",
"re.addition.grid.entity.textMinLength": "文本框允许输入的字符个数(最小值)",
"re.addition.grid.entity.textMaxLength": "文本框允许输入的字符个数(最大值)",
"re.addition.grid.entity.prompt": "提示词", "re.addition.grid.entity.prompt": "提示词",
"re.addition.grid.entity.attachmentExtendNames": "允许上传附件的文件扩展名", "re.addition.grid.entity.attachmentExtendNames": "允许上传附件的文件扩展名(多个采用逗号分隔)",
"re.addition.grid.entity.attachmentMaxCount": "允许上传附件的最大个数", "re.addition.grid.entity.attachmentMaxCount": "允许上传附件的最大个数",
"re.processor.dialog.decisionTree.title": "决策树设计器", "re.processor.dialog.decisionTree.title": "决策树设计器",

4
io.sc.engine.rule.frontend/src/views/authorization/Authorization.vue

@ -1,5 +1,5 @@
<template> <template>
<q-splitter :model-value="450" unit="px" separator-style="width: 3px;" class="w-full" style="height: 100%"> <w-splitter :model-value="450" unit="px" separator-style="width: 1px;" class="w-full" style="height: 100%">
<template #before> <template #before>
<div class="pr-1" style="height: 100%"> <div class="pr-1" style="height: 100%">
<w-grid <w-grid
@ -141,7 +141,7 @@
></w-grid> ></w-grid>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import 'tailwindcss/utilities.css'; import 'tailwindcss/utilities.css';

4
io.sc.engine.rule.frontend/src/views/dictionary/dictionary.vue

@ -1,5 +1,5 @@
<template> <template>
<q-splitter :model-value="600" unit="px" separator-style="width: 3px;" class="w-full" style="height: 100%"> <w-splitter :model-value="600" unit="px" separator-style="width: 1px;" class="w-full" style="height: 100%">
<template #before> <template #before>
<div class="pr-1" style="height: 100%"> <div class="pr-1" style="height: 100%">
<w-grid <w-grid
@ -523,7 +523,7 @@
</w-grid> </w-grid>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import 'tailwindcss/utilities.css'; import 'tailwindcss/utilities.css';

12
io.sc.engine.rule.frontend/src/views/lib/Lib.vue

@ -1,5 +1,5 @@
<template> <template>
<q-splitter :model-value="600" unit="px" separator-style="width: 3px;" class="w-full" style="height: 100%"> <w-splitter :model-value="600" unit="px" separator-style="width: 1px;" class="w-full" style="height: 100%">
<template #before> <template #before>
<LibGrid <LibGrid
ref="libTreeGridRef" ref="libTreeGridRef"
@ -32,7 +32,7 @@
</q-tabs> </q-tabs>
<q-tab-panels v-model="currentSelectedIndicatorOrTestcaseTabNameRef" animated style="height: calc(100% - 48px)"> <q-tab-panels v-model="currentSelectedIndicatorOrTestcaseTabNameRef" animated style="height: calc(100% - 48px)">
<q-tab-panel name="indicator" class="px-0 py-0" style="height: 100%; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px"> <q-tab-panel name="indicator" class="px-0 py-0" style="height: 100%; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px">
<q-splitter :model-value="60" unit="%" separator-style="height: 3px;" horizontal style="height: 100%"> <w-splitter :model-value="60" unit="%" separator-style="height: 1px;" horizontal style="height: 100%">
<template #before> <template #before>
<IndicatorGrid <IndicatorGrid
ref="indicatorGridRef" ref="indicatorGridRef"
@ -79,10 +79,10 @@
:read-only="readOnlyRef" :read-only="readOnlyRef"
></ProcessorGrid> ></ProcessorGrid>
</template> </template>
</q-splitter> </w-splitter>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="testcase" class="px-0 pb-0" style="height: 100%; padding-left: 0px; padding-right: 0px; padding-bottom: 0px"> <q-tab-panel name="testcase" class="px-0 pb-0" style="height: 100%; padding-left: 0px; padding-right: 0px; padding-bottom: 0px">
<q-splitter :model-value="50" unit="%" separator-style="height: 3px;" horizontal style="height: 100%"> <w-splitter :model-value="50" unit="%" separator-style="height: 1px;" horizontal style="height: 100%">
<template #before> <template #before>
<TestcaseGrid <TestcaseGrid
ref="testcaseGridRef" ref="testcaseGridRef"
@ -104,12 +104,12 @@
<template #after> <template #after>
<TestcaseParameterGrid ref="testcaseParameterGridRef" :test-case="currentSelectedTestCaseRef"></TestcaseParameterGrid> <TestcaseParameterGrid ref="testcaseParameterGridRef" :test-case="currentSelectedTestCaseRef"></TestcaseParameterGrid>
</template> </template>
</q-splitter> </w-splitter>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import 'tailwindcss/utilities.css'; import 'tailwindcss/utilities.css';

43
io.sc.engine.rule.frontend/src/views/resources/designer/Addition.vue

@ -55,6 +55,13 @@
align: 'center', align: 'center',
format: Formater.enableTag(), format: Formater.enableTag(),
}, },
{
width: 70,
name: 'required',
label: $t('required'),
align: 'center',
format: Formater.yesNo(),
},
{ {
width: 120, width: 120,
name: 'code', name: 'code',
@ -125,8 +132,9 @@
name: 'condition', name: 'condition',
label: $t('re.addition.grid.entity.condition'), label: $t('re.addition.grid.entity.condition'),
type: 'w-code-mirror', type: 'w-code-mirror',
toolbar: false,
lang: 'java', lang: 'java',
rows: 4, rows: 3,
placeholder: true, placeholder: true,
lineWrap: true, lineWrap: true,
lineBreak: false, lineBreak: false,
@ -141,18 +149,37 @@
requiredIf: true, requiredIf: true,
}, },
{ {
name: 'rows', name: 'textareaHeight',
label: $t('re.addition.grid.entity.rows'), label: $t('re.addition.grid.entity.textareaHeight'),
type: 'w-integer', type: 'w-integer',
defaultValue: 3, defaultValue: 100,
showIf: (args: any) => { showIf: (args: any) => {
return args.form.getFieldValue('componentType') === 'TEXTS'; return args.form.getFieldValue('componentType') === 'TEXTS';
}, },
}, },
{
name: 'textMinLength',
label: $t('re.addition.grid.entity.textMinLength'),
type: 'w-integer',
defaultValue: 0,
showIf: (args: any) => {
return args.form.getFieldValue('componentType') === 'TEXTS' || args.form.getFieldValue('componentType') === 'TEXT';
},
},
{
name: 'textMaxLength',
label: $t('re.addition.grid.entity.textMaxLength'),
type: 'w-integer',
defaultValue: 1024,
showIf: (args: any) => {
return args.form.getFieldValue('componentType') === 'TEXTS' || args.form.getFieldValue('componentType') === 'TEXT';
},
},
{ {
name: 'prompt', name: 'prompt',
label: $t('re.addition.grid.entity.prompt'), label: $t('re.addition.grid.entity.prompt'),
type: 'w-textarea', type: 'w-textarea',
rows: 3,
defaultValue: 3, defaultValue: 3,
showIf: (args: any) => { showIf: (args: any) => {
const type = args.form.getFieldValue('componentType'); const type = args.form.getFieldValue('componentType');
@ -164,7 +191,7 @@
name: 'attachmentExtendNames', name: 'attachmentExtendNames',
label: $t('re.addition.grid.entity.attachmentExtendNames'), label: $t('re.addition.grid.entity.attachmentExtendNames'),
type: 'w-text', type: 'w-text',
defaultValue: '*.pdf', defaultValue: '.pdf, .docx',
showIf: (args: any) => { showIf: (args: any) => {
const type = args.form.getFieldValue('componentType'); const type = args.form.getFieldValue('componentType');
return type === 'ATTACHMENT'; return type === 'ATTACHMENT';
@ -182,6 +209,7 @@
}, },
{ name: 'enable', label: $t('enable'), type: 'w-checkbox', defaultValue: true }, { name: 'enable', label: $t('enable'), type: 'w-checkbox', defaultValue: true },
{ name: 'required', label: $t('required'), type: 'w-checkbox', defaultValue: true },
], ],
}, },
}" }"
@ -197,9 +225,12 @@
{ name: 'componentType', label: $t('re.addition.grid.entity.component') }, { name: 'componentType', label: $t('re.addition.grid.entity.component') },
{ name: 'condition', label: $t('re.addition.grid.entity.condition') }, { name: 'condition', label: $t('re.addition.grid.entity.condition') },
{ name: 'enable', label: $t('isEnable') }, { name: 'enable', label: $t('isEnable') },
{ name: 'required', label: $t('isRequired') },
{ name: 'order', label: $t('order') }, { name: 'order', label: $t('order') },
{ name: 'rows', label: $t('re.addition.grid.entity.rows') }, { name: 'textareaHeight', label: $t('re.addition.grid.entity.textareaHeight') },
{ name: 'textMinLength', label: $t('re.addition.grid.entity.textMinLength') },
{ name: 'textMaxLength', label: $t('re.addition.grid.entity.textMaxLength') },
{ name: 'prompt', label: $t('re.addition.grid.entity.prompt') }, { name: 'prompt', label: $t('re.addition.grid.entity.prompt') },
{ name: 'attachmentExtendNames', label: $t('re.addition.grid.entity.attachmentExtendNames') }, { name: 'attachmentExtendNames', label: $t('re.addition.grid.entity.attachmentExtendNames') },
{ name: 'attachmentMaxCount', label: $t('re.addition.grid.entity.attachmentMaxCount') }, { name: 'attachmentMaxCount', label: $t('re.addition.grid.entity.attachmentMaxCount') },

3
io.sc.engine.rule.frontend/src/views/resources/designer/DecisionTreeDialog.vue

@ -300,6 +300,9 @@ const vertexDefines = [
return { name: row.icon }; return { name: row.icon };
} }
}, },
selectableIf: (args: any) => {
return args.data.type === 'MODEL';
},
dataUrl: Environment.apiContextPath('/api/re/resource'), dataUrl: Environment.apiContextPath('/api/re/resource'),
pageable: false, pageable: false,
sortBy: ['type', 'namec', '-lastModifyDate'], sortBy: ['type', 'namec', '-lastModifyDate'],

8
io.sc.engine.rule.frontend/src/views/resources/designer/Designer.vue

@ -1,5 +1,5 @@
<template> <template>
<q-splitter :model-value="400" unit="px" separator-style="width: 3px;" style="height: 100%"> <w-splitter :model-value="400" unit="px" separator-style="width: 1px;" style="height: 100%">
<template #before> <template #before>
<Model <Model
:resource="currentSelectedResourceRef" :resource="currentSelectedResourceRef"
@ -43,7 +43,7 @@
</template> </template>
<template #after> <template #after>
<q-splitter v-model="horizontalSplitterRef" unit="%" separator-style="height: 3px" horizontal style="height: 100%"> <w-splitter v-model="horizontalSplitterRef" unit="%" separator-style="height: 1px" horizontal style="height: 100%">
<template #before> <template #before>
<q-tabs <q-tabs
v-model="statusReactive.parameterAndTestcaseTab" v-model="statusReactive.parameterAndTestcaseTab"
@ -165,9 +165,9 @@
></TestcaseParameterGrid> ></TestcaseParameterGrid>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
</template> </template>
</q-splitter> </w-splitter>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, nextTick, reactive } from 'vue'; import { ref, nextTick, reactive } from 'vue';

8
io.sc.engine.rule.frontend/src/views/resources/designer/DesignerDialog.vue

@ -12,7 +12,7 @@
:maximized="true" :maximized="true"
body-padding="2px 2px 2px 2px" body-padding="2px 2px 2px 2px"
> >
<q-splitter :model-value="400" unit="px" separator-style="width: 3px;" style="height: 100%"> <w-splitter :model-value="400" unit="px" separator-style="width: 1px;" style="height: 100%">
<template #before> <template #before>
<Model <Model
:resource="currentSelectedResourceRef" :resource="currentSelectedResourceRef"
@ -59,7 +59,7 @@
</template> </template>
<template #after> <template #after>
<q-splitter v-model="horizontalSplitterRef" unit="%" separator-style="height: 3px" horizontal style="height: 100%"> <w-splitter v-model="horizontalSplitterRef" unit="%" separator-style="height: 1px" horizontal style="height: 100%">
<template #before> <template #before>
<q-tabs <q-tabs
v-model="statusReactive.parameterAndTestcaseTab" v-model="statusReactive.parameterAndTestcaseTab"
@ -229,9 +229,9 @@
></TestcaseParameterGrid> ></TestcaseParameterGrid>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
</template> </template>
</q-splitter> </w-splitter>
</w-dialog> </w-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

6
io.sc.engine.rule.frontend/src/views/resources/designer/ExecutionFlowDialog.vue

@ -298,6 +298,9 @@ const vertexDefines = [
return { name: row.icon }; return { name: row.icon };
} }
}, },
selectableIf: (args: any) => {
return args.data.type === 'MODEL';
},
dataUrl: Environment.apiContextPath('/api/re/resource'), dataUrl: Environment.apiContextPath('/api/re/resource'),
pageable: false, pageable: false,
sortBy: ['type', 'namec', '-lastModifyDate'], sortBy: ['type', 'namec', '-lastModifyDate'],
@ -406,6 +409,9 @@ const vertexDefines = [
return { name: row.icon }; return { name: row.icon };
} }
}, },
selectableIf: (args: any) => {
return args.data.type === 'MODEL';
},
dataUrl: Environment.apiContextPath('/api/re/resource'), dataUrl: Environment.apiContextPath('/api/re/resource'),
pageable: false, pageable: false,
sortBy: ['type', 'namec', '-lastModifyDate'], sortBy: ['type', 'namec', '-lastModifyDate'],

4
io.sc.engine.rule.frontend/src/views/resources/designer/HttpRequestDialog.vue

@ -19,7 +19,7 @@
}, },
]" ]"
> >
<q-splitter :model-value="50" horizontal separator-style="height:3px"> <w-splitter :model-value="50" horizontal separator-style="height:1px">
<template #before> <template #before>
<q-tabs v-model="selectedTabRef" no-caps inline-label align="left" class="px-4" @update:model-value="refresh"> <q-tabs v-model="selectedTabRef" no-caps inline-label align="left" class="px-4" @update:model-value="refresh">
<q-tab name="url" icon="bi-link-45deg" :label="$t('re.processor.httpRequest.tab.url.title')" /> <q-tab name="url" icon="bi-link-45deg" :label="$t('re.processor.httpRequest.tab.url.title')" />
@ -447,7 +447,7 @@
> >
</w-form> </w-form>
</template> </template>
</q-splitter> </w-splitter>
</w-dialog> </w-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

4
io.sc.engine.rule.frontend/src/views/shared/SelectIndicatorDialog.vue

@ -23,7 +23,7 @@
}, },
]" ]"
> >
<q-splitter :model-value="450" unit="px" separator-style="width: 3px;" class="w-full" style="height: 100%"> <w-splitter :model-value="450" unit="px" separator-style="width: 1px;" class="w-full" style="height: 100%">
<template #before> <template #before>
<div class="pr-1" style="height: 100%"> <div class="pr-1" style="height: 100%">
<w-grid <w-grid
@ -152,7 +152,7 @@
></w-grid> ></w-grid>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
</w-dialog> </w-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

4
io.sc.engine.rule.frontend/src/views/shared/SimulatorDialog.vue

@ -23,7 +23,7 @@
}, },
]" ]"
> >
<q-splitter :model-value="70" unit="%" separator-style="width: 3px;" class="w-full" style="height: 100%"> <w-splitter :model-value="70" unit="%" separator-style="width: 1px;" class="w-full" style="height: 100%">
<template #before> <template #before>
<div class="pr-1" style="width: 100%; height: 100%"> <div class="pr-1" style="width: 100%; height: 100%">
<w-echarts <w-echarts
@ -69,7 +69,7 @@
<template #after> <template #after>
<div class="pl-1" style="height: 100%"></div> <div class="pl-1" style="height: 100%"></div>
</template> </template>
</q-splitter> </w-splitter>
</w-dialog> </w-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

4
io.sc.engine.rule.frontend/src/views/shared/TestCaseGrid.vue

@ -1,5 +1,5 @@
<template> <template>
<div style="width: 100%; height: 100%"> <div class="px-2" style="height: 100%">
<w-grid <w-grid
ref="gridRef" ref="gridRef"
:title="$t('re.lib.tab.testcase.title')" :title="$t('re.lib.tab.testcase.title')"
@ -36,7 +36,7 @@
format: EngineEnums.TestResult.formater, format: EngineEnums.TestResult.formater,
}, },
{ width: 150, name: 'lastTestDate', label: $t('re.testcase.grid.entity.lastTestDate') }, { width: 150, name: 'lastTestDate', label: $t('re.testcase.grid.entity.lastTestDate') },
{ width: 290, name: 'name', label: $t('name') }, { width: '100%', name: 'name', label: $t('name') },
{ width: 200, name: 'description', label: $t('description') }, { width: 200, name: 'description', label: $t('description') },
{ {
width: 80, width: 80,

2
io.sc.engine.rule.frontend/src/views/shared/TestcaseParameterGrid.vue

@ -1,5 +1,5 @@
<template> <template>
<div style="width: 100%; height: 100%"> <div class="px-2" style="height: 100%">
<w-grid <w-grid
ref="gridRef" ref="gridRef"
:title="$t('re.testCaseParameter.grid.title')" :title="$t('re.testCaseParameter.grid.title')"

8
io.sc.engine.rule.frontend/src/views/testcase/Testcase.vue

@ -1,8 +1,8 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%">
<q-splitter horizontal :model-value="50" unit="%" separator-style="height: 3px;" class="w-full" style="height: 100%"> <w-splitter horizontal :model-value="50" unit="%" separator-style="height: 1px;" class="w-full" style="height: 100%">
<template #before> <template #before>
<div class="pr-1" style="height: 100%"> <div class="px-1" style="height: 100%">
<TestcaseGrid <TestcaseGrid
ref="testcaseGridRef" ref="testcaseGridRef"
@row-click=" @row-click="
@ -21,11 +21,11 @@
</div> </div>
</template> </template>
<template #after> <template #after>
<div class="pl-1" style="height: 100%"> <div class="px-1" style="height: 100%">
<TestcaseParameterGrid ref="testcaseParameterGridRef" :test-case="currentSelectedTestCaseRef"></TestcaseParameterGrid> <TestcaseParameterGrid ref="testcaseParameterGridRef" :test-case="currentSelectedTestCaseRef"></TestcaseParameterGrid>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

4
io.sc.engine.rule.frontend/src/views/workflow/Workflow.vue

@ -1,6 +1,6 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%">
<q-splitter horizontal :model-value="splitterRef" unit="px" separator-style="width: 3px;" class="w-full" style="height: 100%"> <w-splitter horizontal :model-value="splitterRef" unit="px" separator-style="width: 1px;" class="w-full" style="height: 100%">
<template #before> <template #before>
<div class="pr-1" style="height: 100%"> <div class="pr-1" style="height: 100%">
<w-grid <w-grid
@ -231,7 +231,7 @@
></w-grid> ></w-grid>
</div> </div>
</template> </template>
</q-splitter> </w-splitter>
<DesignerDialog ref="designerDialogRef"></DesignerDialog> <DesignerDialog ref="designerDialogRef"></DesignerDialog>
<AttachmentDialog <AttachmentDialog
ref="attachmentDialogRef" ref="attachmentDialogRef"

10
io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/converter/ParameterInOptionAdditionEntityConverter.java

@ -25,8 +25,11 @@ public class ParameterInOptionAdditionEntityConverter {
po.setComponentType(entity.getComponentType()); po.setComponentType(entity.getComponentType());
po.setCondition(entity.getCondition()); po.setCondition(entity.getCondition());
po.setEnable(entity.getEnable()); po.setEnable(entity.getEnable());
po.setRequired(entity.getRequired());
po.setOrder(entity.getOrder()); po.setOrder(entity.getOrder());
po.setRows(entity.getRows()); po.setTextareaHeight(entity.getTextareaHeight());
po.setTextMinLength(entity.getTextMinLength());
po.setTextMaxLength(entity.getTextMaxLength());
po.setPrompt(entity.getPrompt()); po.setPrompt(entity.getPrompt());
po.setAttachmentExtendNames(entity.getAttachmentExtendNames()); po.setAttachmentExtendNames(entity.getAttachmentExtendNames());
po.setAttachmentMaxCount(entity.getAttachmentMaxCount()); po.setAttachmentMaxCount(entity.getAttachmentMaxCount());
@ -66,8 +69,11 @@ public class ParameterInOptionAdditionEntityConverter {
entity.setComponentType(po.getComponentType()); entity.setComponentType(po.getComponentType());
entity.setCondition(po.getCondition()); entity.setCondition(po.getCondition());
entity.setEnable(po.getEnable()); entity.setEnable(po.getEnable());
entity.setRequired(po.getRequired());
entity.setOrder(po.getOrder()); entity.setOrder(po.getOrder());
entity.setRows(po.getRows()); entity.setTextareaHeight(po.getTextareaHeight());
entity.setTextMinLength(po.getTextMinLength());
entity.setTextMaxLength(po.getTextMaxLength());
entity.setPrompt(po.getPrompt()); entity.setPrompt(po.getPrompt());
entity.setAttachmentExtendNames(po.getAttachmentExtendNames()); entity.setAttachmentExtendNames(po.getAttachmentExtendNames());
entity.setAttachmentMaxCount(po.getAttachmentMaxCount()); entity.setAttachmentMaxCount(po.getAttachmentMaxCount());

56
io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/entity/ParameterInOptionAdditionEntity.java

@ -61,13 +61,26 @@ public class ParameterInOptionAdditionEntity extends CorporationAuditorEntity<Pa
@Convert(converter= NumericBooleanConverter.class) @Convert(converter= NumericBooleanConverter.class)
protected Boolean enable =true; protected Boolean enable =true;
//是否必填项
@Column(name="REQUIRED_")
@Convert(converter= NumericBooleanConverter.class)
protected Boolean required =true;
//排序 //排序
@Column(name="ORDER_") @Column(name="ORDER_")
protected Integer order; protected Integer order;
//当组件类型是 TEXTS(多行文本框) 时, 指定多行文本框组件的行数 //当组件类型是 TEXTS(多行文本框) 时, 指定多行文本框组件的高度
@Column(name="ROWS_") @Column(name="TEXTAREA_HEIGHT_")
protected Integer rows; protected Integer textareaHeight;
//当组件类型是 TEXTS(多行文本框) 或者 TEXT(单行文本框) 时, 指定文本框允许输入的字符个数(最小)
@Column(name="TEXT_MIN_LENGTH_")
protected Integer textMinLength=0;
//当组件类型是 TEXTS(多行文本框) 或者 TEXT(单行文本框) 时, 指定文本框允许输入的字符个数(最大)
@Column(name="TEXT_MAX_LENGTH_")
protected Integer textMaxLength =Integer.MAX_VALUE;
//当组件类型是 TEXT(单行文本框) 或 TEXTS(多行文本框) 时, 指定文本框组件的提示词 //当组件类型是 TEXT(单行文本框) 或 TEXTS(多行文本框) 时, 指定文本框组件的提示词
@Column(name="PROMPT_", length=1024) @Column(name="PROMPT_", length=1024)
@ -95,8 +108,11 @@ public class ParameterInOptionAdditionEntity extends CorporationAuditorEntity<Pa
vo.setComponentType(this.getComponentType()); vo.setComponentType(this.getComponentType());
vo.setCondition(this.getCondition()); vo.setCondition(this.getCondition());
vo.setEnable(this.getEnable()); vo.setEnable(this.getEnable());
vo.setRequired(this.getRequired());
vo.setOrder(this.getOrder()); vo.setOrder(this.getOrder());
vo.setRows(this.getRows()); vo.setTextareaHeight(this.getTextareaHeight());
vo.setTextMinLength(this.getTextMinLength());
vo.setTextMaxLength(this.getTextMaxLength());
vo.setPrompt(this.getPrompt()); vo.setPrompt(this.getPrompt());
vo.setAttachmentExtendNames(this.getAttachmentExtendNames()); vo.setAttachmentExtendNames(this.getAttachmentExtendNames());
vo.setAttachmentMaxCount(this.getAttachmentMaxCount()); vo.setAttachmentMaxCount(this.getAttachmentMaxCount());
@ -167,6 +183,14 @@ public class ParameterInOptionAdditionEntity extends CorporationAuditorEntity<Pa
this.enable = enable; this.enable = enable;
} }
public Boolean getRequired() {
return required;
}
public void setRequired(Boolean required) {
this.required = required;
}
public Integer getOrder() { public Integer getOrder() {
return order; return order;
} }
@ -175,12 +199,28 @@ public class ParameterInOptionAdditionEntity extends CorporationAuditorEntity<Pa
this.order = order; this.order = order;
} }
public Integer getRows() { public Integer getTextareaHeight() {
return rows; return textareaHeight;
}
public void setTextareaHeight(Integer textareaHeight) {
this.textareaHeight = textareaHeight;
}
public Integer getTextMinLength() {
return textMinLength;
}
public void setTextMinLength(Integer textMinLength) {
this.textMinLength = textMinLength;
}
public Integer getTextMaxLength() {
return textMaxLength;
} }
public void setRows(Integer rows) { public void setTextMaxLength(Integer textMaxLength) {
this.rows = rows; this.textMaxLength = textMaxLength;
} }
public String getPrompt() { public String getPrompt() {

34
io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/service/impl/ParameterInOptionAdditionServiceImpl.java

@ -40,6 +40,40 @@ public class ParameterInOptionAdditionServiceImpl extends DaoServiceImpl<Paramet
}else { }else {
entity.setOrder(1); entity.setOrder(1);
} }
normalize(entity);
return super.add(entity); return super.add(entity);
} }
@Override
public ParameterInOptionAdditionEntity update(String s, ParameterInOptionAdditionEntity entity) throws Exception {
normalize(entity);
return super.update(s, entity);
}
private void normalize(ParameterInOptionAdditionEntity entity){
if(entity!=null) {
switch (entity.getComponentType()) {
case ATTACHMENT:
entity.setTextareaHeight(null);
entity.setTextMinLength(null);
entity.setTextMaxLength(null);
entity.setPrompt(null);
break;
case INTEGER:
case DECIMAL:
entity.setAttachmentExtendNames(null);
entity.setAttachmentMaxCount(null);
entity.setTextareaHeight(null);
entity.setTextMinLength(null);
entity.setTextMaxLength(null);
entity.setPrompt(null);
break;
case TEXT:
case TEXTS:
entity.setAttachmentExtendNames(null);
entity.setAttachmentMaxCount(null);
break;
}
}
}
} }

37
io.sc.engine.rule.server/src/main/java/io/sc/engine/rule/server/model/vo/ParameterInOptionAdditionVo.java

@ -18,9 +18,12 @@ public class ParameterInOptionAdditionVo extends CorporationAuditorVo {
protected QualitativeAdditionComponentType componentType; protected QualitativeAdditionComponentType componentType;
protected String condition; protected String condition;
protected Boolean enable =true; protected Boolean enable =true;
protected Boolean required =true;
protected Integer order; protected Integer order;
protected Integer rows; protected Integer textareaHeight;
protected Integer textMinLength;
protected Integer textMaxLength;
protected String prompt; protected String prompt;
protected String attachmentExtendNames; protected String attachmentExtendNames;
protected Integer attachmentMaxCount; protected Integer attachmentMaxCount;
@ -89,6 +92,14 @@ public class ParameterInOptionAdditionVo extends CorporationAuditorVo {
this.enable = enable; this.enable = enable;
} }
public Boolean getRequired() {
return required;
}
public void setRequired(Boolean required) {
this.required = required;
}
public Integer getOrder() { public Integer getOrder() {
return order; return order;
} }
@ -97,12 +108,28 @@ public class ParameterInOptionAdditionVo extends CorporationAuditorVo {
this.order = order; this.order = order;
} }
public Integer getRows() { public Integer getTextareaHeight() {
return rows; return textareaHeight;
}
public void setTextareaHeight(Integer textareaHeight) {
this.textareaHeight = textareaHeight;
}
public Integer getTextMinLength() {
return textMinLength;
}
public void setTextMinLength(Integer textMinLength) {
this.textMinLength = textMinLength;
}
public Integer getTextMaxLength() {
return textMaxLength;
} }
public void setRows(Integer rows) { public void setTextMaxLength(Integer textMaxLength) {
this.rows = rows; this.textMaxLength = textMaxLength;
} }
public String getPrompt() { public String getPrompt() {

7
io.sc.engine.rule.server/src/main/resources/liquibase/RE_1.0.0_20220515__Rule Engine Database Schema DDL.xml

@ -263,10 +263,15 @@
<column name="COMPONENT_TYPE_" type="NVARCHAR(20)" remarks="组件类型(INTEGER:整数;DECIMAL:小数,TEXT:文本;TEXTS:多行文本;ATTACHMENT:附件)"/> <column name="COMPONENT_TYPE_" type="NVARCHAR(20)" remarks="组件类型(INTEGER:整数;DECIMAL:小数,TEXT:文本;TEXTS:多行文本;ATTACHMENT:附件)"/>
<column name="CONDITION_" type="NVARCHAR(1024)" remarks="条件"/> <column name="CONDITION_" type="NVARCHAR(1024)" remarks="条件"/>
<column name="ENABLE_" type="SMALLINT" remarks="是否可用"/> <column name="ENABLE_" type="SMALLINT" remarks="是否可用"/>
<column name="REQUIRED_" type="SMALLINT" remarks="是否必填项"/>
<column name="ORDER_" type="INTEGER" remarks="排序"/> <column name="ORDER_" type="INTEGER" remarks="排序"/>
<!-- 当 COMPONENT_TYPE_ ="TEXTS" (多行文本) --> <!-- 当 COMPONENT_TYPE_ ="TEXTS" (多行文本) -->
<column name="ROWS_" type="INTEGER" remarks="多行文本框行数"/> <column name="TEXTAREA_HEIGHT_" type="INTEGER" remarks="多行文本框高度"/>
<!-- 当 COMPONENT_TYPE_ ="TEXTS" or COMPONENT_TYPE_="TEXT" (文本) -->
<column name="TEXT_MIN_LENGTH_" type="INTEGER" remarks="文本框可输入的字符个数(最小)"/>
<column name="TEXT_MAX_LENGTH_" type="INTEGER" remarks="文本框可输入的字符个数(最大)"/>
<!-- 当 COMPONENT_TYPE_ ="TEXT" or COMPONENT_TYPE_ ="TEXTS" (文本或者多行文本) --> <!-- 当 COMPONENT_TYPE_ ="TEXT" or COMPONENT_TYPE_ ="TEXTS" (文本或者多行文本) -->
<column name="PROMPT_" type="NVARCHAR(1024)" remarks="提示词"/> <column name="PROMPT_" type="NVARCHAR(1024)" remarks="提示词"/>

1
io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words.properties

@ -262,3 +262,4 @@ migration=Migration
view=View view=View
before=Before before=Before
send=Send send=Send
required=Required

1
io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_tw_CN.properties

@ -262,3 +262,4 @@ migration=\u9077\u79FB
view=\u67E5\u770B view=\u67E5\u770B
before=\u4EE5\u524D before=\u4EE5\u524D
send=\u767C\u9001 send=\u767C\u9001
required=\u5FC5\u9700

1
io.sc.platform.core/src/main/resources/io/sc/platform/core/i18n/words_zh_CN.properties

@ -262,3 +262,4 @@ migration=\u8FC1\u79FB
view=\u67E5\u770B view=\u67E5\u770B
before=\u4EE5\u524D before=\u4EE5\u524D
send=\u53D1\u9001 send=\u53D1\u9001
required=\u5FC5\u9700
Loading…
Cancel
Save