Browse Source

update

main
wangshaoping 6 months ago
parent
commit
4545f7c587
  1. 0
      .zed/settings.json
  2. 1027
      Untitled
  3. 2
      io.sc.engine.rule.frontend/package.json
  4. 6
      io.sc.engine.rule.frontend/src/views/authorization/Authorization.vue
  5. 12
      io.sc.engine.rule.frontend/src/views/function/Function.vue
  6. 24
      io.sc.engine.rule.frontend/src/views/lib/IndicatorGrid.vue
  7. 10
      io.sc.engine.rule.frontend/src/views/lib/LibGrid.vue
  8. 58
      io.sc.engine.rule.frontend/src/views/lib/ProcessorGrid.vue
  9. 12
      io.sc.engine.rule.frontend/src/views/lib/TestCase.vue
  10. 20
      io.sc.engine.rule.frontend/src/views/lib/TestCaseParameter.vue
  11. 22
      io.sc.engine.rule.frontend/src/views/lib/ValidatorGrid.vue
  12. 15
      io.sc.engine.rule.frontend/src/views/resources/Resources.vue
  13. 2
      io.sc.engine.rule.frontend/src/views/resources/StartDeployWorkflowDialog.vue
  14. 6
      io.sc.engine.rule.frontend/src/views/resources/designer/Designer.vue
  15. 21
      io.sc.engine.rule.frontend/src/views/resources/designer/DesignerDialog.vue
  16. 12
      io.sc.engine.rule.frontend/src/views/resources/designer/Model.vue
  17. 14
      io.sc.engine.rule.frontend/src/views/resources/designer/Option.vue
  18. 36
      io.sc.engine.rule.frontend/src/views/resources/designer/Parameter.vue
  19. 92
      io.sc.engine.rule.frontend/src/views/resources/designer/Processor.vue
  20. 20
      io.sc.engine.rule.frontend/src/views/resources/designer/TestCaseParameter.vue
  21. 22
      io.sc.engine.rule.frontend/src/views/resources/designer/Validator.vue
  22. 4
      io.sc.engine.rule.frontend/src/views/shared/SelectIndicatorDialog.vue
  23. 28
      io.sc.engine.rule.frontend/src/views/testcase/Testcase.vue
  24. 2
      io.sc.engine.rule.frontend/src/views/workflow/CompleteTaskDialog.vue
  25. 8
      io.sc.engine.rule.frontend/src/views/workflow/Workflow.vue
  26. 80
      io.sc.engine.rule.frontend/webpack.config.common.cjs
  27. 85
      io.sc.platform.core.frontend/.bin/util.js
  28. 2
      io.sc.platform.core.frontend/package.json
  29. 4
      io.sc.platform.core.frontend/template-project/package.json
  30. 80
      io.sc.platform.core.frontend/template-project/webpack.config.common.cjs
  31. 80
      io.sc.platform.core.frontend/webpack.config.common.cjs

0
.zed/settings.json

1027
Untitled

File diff suppressed because it is too large

2
io.sc.engine.rule.frontend/package.json

@ -92,7 +92,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.2.2",
"platform-core": "8.1.322",
"platform-core": "8.1.323",
"quasar": "2.16.11",
"tailwindcss": "3.4.10",
"vue": "3.4.38",

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

@ -15,9 +15,9 @@
}"
:query-form-cols-num="3"
:query-form-fields="[
{ name: 'code', label: $t('code'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'text' },
{ name: 'enable', label: $t('isEnable'), type: 'select', options: Options.yesNo() },
{ name: 'code', label: $t('code'), type: 'w-text' },
{ name: 'name', label: $t('name'), type: 'w-text' },
{ name: 'enable', label: $t('isEnable'), type: 'w-select', options: Options.yesNo() },
]"
:toolbar-configure="{ noIcon: false }"
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'view', 'separator', 'export']"

12
io.sc.engine.rule.frontend/src/views/function/Function.vue

@ -80,13 +80,13 @@
form: {
colsNum: 1,
fields: [
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'signature', label: $t('re.function.grid.entity.signature'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'signature', label: $t('re.function.grid.entity.signature'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
{
name: 'mathXml',
label: $t('re.function.grid.entity.mathXml'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 5,
lang: 'xml',
toolbar: false,
@ -103,8 +103,8 @@
<mi>)</mi>
</mrow>`,
},
{ name: 'body', label: $t('re.function.grid.entity.body'), type: 'code-mirror', rows: 10, lang: 'java', toolbar: false },
{ name: 'enable', label: $t('enable'), type: 'checkbox', defaultValue: true },
{ name: 'body', label: $t('re.function.grid.entity.body'), type: 'w-code-mirror', rows: 10, lang: 'java', toolbar: false },
{ name: 'enable', label: $t('enable'), type: 'w-checkbox', defaultValue: true },
],
},
}"

24
io.sc.engine.rule.frontend/src/views/lib/IndicatorGrid.vue

@ -94,8 +94,8 @@
]"
:query-form-cols-num="6"
:query-form-fields="[
{ colSpan: 2, name: 'code', label: $t('code'), type: 'text', clearable: true },
{ colSpan: 3, name: 'name', label: $t('name'), type: 'text', clearable: true },
{ colSpan: 2, name: 'code', label: $t('code'), type: 'w-text', clearable: true },
{ colSpan: 3, name: 'name', label: $t('name'), type: 'w-text', clearable: true },
]"
:columns="[
{ width: 60, name: 'order', label: $t('order'), align: 'right' },
@ -135,13 +135,13 @@
form: {
colsNum: 1,
fields: [
{ name: 'lib', label: $t('lib'), type: 'text', defaultValue: lib.id, hidden: true },
{ name: 'name', label: $t('name'), type: 'text' },
{ name: 'type', label: $t('type'), type: 'select', options: Options.enum(Enums.IndicatorType) },
{ name: 'lib', label: $t('lib'), type: 'w-text', defaultValue: lib.id, hidden: true },
{ name: 'name', label: $t('name'), type: 'w-text' },
{ name: 'type', label: $t('type'), type: 'w-select', options: Options.enum(Enums.IndicatorType) },
{
name: 'valueType',
label: $t('re.resources.designer.parameter.grid.entity.valueType'),
type: 'select',
type: 'w-select',
options: ValueTypeList,
'onUpdate:modelValue': (value) => {
axios.get(Environment.apiContextPath('/api/re/dictionary/getVersionsByCode?code=' + value)).then((response) => {
@ -157,7 +157,7 @@
{
name: 'valueTypeVersion',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeVersion'),
type: 'select',
type: 'w-select',
options: valueTypeVersionRef,
showIf: (arg) => {
const valueType = arg.form.getFieldValue('valueType');
@ -189,7 +189,7 @@
{
name: 'valueScale',
label: $t('re.resources.designer.parameter.grid.entity.valueScale'),
type: 'number',
type: 'w-number',
defaultValue: 6,
showIf: (arg) => {
const valueType = arg.form.getFieldValue('valueType');
@ -203,7 +203,7 @@
{
name: 'valueRoundingMode',
label: $t('re.resources.designer.parameter.grid.entity.valueRoundingMode'),
type: 'select',
type: 'w-select',
options: Options.enum(Enums.RoundingMode),
defaultValue: 'HALF_UP',
showIf: (arg) => {
@ -218,16 +218,16 @@
{
name: 'valueTypeIsList',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeIsList'),
type: 'checkbox',
type: 'w-checkbox',
defaultValue: false,
},
{
name: 'defaultValue',
label: $t('defaultValue'),
type: 'text',
type: 'w-text',
},
{ name: 'order', label: $t('order'), type: 'number' },
{ name: 'order', label: $t('order'), type: 'w-number' },
],
},
}"

10
io.sc.engine.rule.frontend/src/views/lib/LibGrid.vue

@ -224,19 +224,19 @@
form: {
colsNum: 1,
fields: [
{ name: 'parent', label: $t('parent'), type: 'text', hidden: true },
{ name: 'type', label: $t('type'), type: 'text', hidden: true },
{ name: 'parent', label: $t('parent'), type: 'w-text', hidden: true },
{ name: 'type', label: $t('type'), type: 'w-text', hidden: true },
{
name: 'code',
label: $t('code'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
return type !== 'FOLDER';
},
},
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
],
},
}"

58
io.sc.engine.rule.frontend/src/views/lib/ProcessorGrid.vue

@ -303,15 +303,15 @@
form: {
colsNum: 5,
fields: [
{ colSpan: 5, name: 'indicator', label: 'indicator', type: 'text', defaultValue: indicator.id, hidden: true },
{ colSpan: 5, name: 'id', label: $t('id'), type: 'text', hidden: true },
{ colSpan: 5, name: 'order', label: $t('order'), type: 'number', hidden: true },
{ colSpan: 5, name: 'type', label: $t('type'), type: 'text', hidden: true },
{ colSpan: 5, name: 'indicator', label: 'indicator', type: 'w-text', defaultValue: indicator.id, hidden: true },
{ colSpan: 5, name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ colSpan: 5, name: 'order', label: $t('order'), type: 'w-number', hidden: true },
{ colSpan: 5, name: 'type', label: $t('type'), type: 'w-text', hidden: true },
{
colSpan: 5,
name: 'objectCondition',
label: $t('re.resources.designer.processor.grid.entity.objectCondition'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -432,7 +432,7 @@
{
name: 'expression',
label: $t('expression'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -457,7 +457,7 @@
colSpan: 5,
name: 'mathFormula',
label: $t('re.resources.designer.processor.grid.entity.mathFormula'),
type: 'math',
type: 'w-math',
autoCompletion: autoCompletion,
showIf: (arg) => {
return 'MATH_FORMULA' === arg.form.getFieldValue('type');
@ -467,7 +467,7 @@
colSpan: 5,
name: 'arithmetic',
label: $t('re.resources.designer.processor.grid.entity.arithmetic'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 5,
lineWrap: true,
@ -483,7 +483,7 @@
colSpan: 5,
name: 'ternaryCondition',
label: $t('re.resources.designer.processor.grid.entity.ternaryCondition'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -499,7 +499,7 @@
colSpan: 5,
name: 'ternaryTrue',
label: $t('re.resources.designer.processor.grid.entity.ternaryTrue'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -515,7 +515,7 @@
colSpan: 5,
name: 'ternaryFalse',
label: $t('re.resources.designer.processor.grid.entity.ternaryFalse'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -531,7 +531,7 @@
colSpan: 5,
name: 'when',
label: $t('re.resources.designer.processor.grid.entity.when'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -547,7 +547,7 @@
colSpan: 5,
name: 'then',
label: $t('re.resources.designer.processor.grid.entity.then'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -563,7 +563,7 @@
colSpan: 5,
name: 'isWhenThenShorted',
label: $t('re.resources.designer.processor.grid.entity.isWhenThenShorted'),
type: 'checkbox',
type: 'w-checkbox',
showIf: (arg) => {
return 'WHEN_THEN' === arg.form.getFieldValue('type');
},
@ -575,7 +575,7 @@
showIf: (arg) => {
return 'NUMBER_RANGE' === arg.form.getFieldValue('type');
},
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 2,
lineWrap: true,
@ -672,11 +672,11 @@
colsNum: 4,
fields: [
{ name: 'uuid', label: 'uuid', hidden: true, colSpan: 4 },
{ name: 'min', label: $t('minValue'), type: 'text', colSpan: 3 },
{ name: 'minIncluded', label: $t('include'), type: 'checkbox' },
{ name: 'max', label: $t('maxValue'), type: 'text', colSpan: 3 },
{ name: 'maxIncluded', label: $t('include'), type: 'checkbox' },
{ name: 'value', label: $t('value'), type: 'number', colSpan: 3 },
{ name: 'min', label: $t('minValue'), type: 'w-text', colSpan: 3 },
{ name: 'minIncluded', label: $t('include'), type: 'w-checkbox' },
{ name: 'max', label: $t('maxValue'), type: 'w-text', colSpan: 3 },
{ name: 'maxIncluded', label: $t('include'), type: 'w-checkbox' },
{ name: 'value', label: $t('value'), type: 'w-number', colSpan: 3 },
],
},
},
@ -768,7 +768,7 @@
{
name: 'condition',
label: $t('condition'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -780,7 +780,7 @@
{
name: 'value',
label: $t('value'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -809,7 +809,7 @@
colSpan: 5,
name: 'groovyScript',
label: $t('re.resources.designer.processor.grid.entity.groovyScript'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 20,
lang: 'java',
lineWrap: false,
@ -825,7 +825,7 @@
colSpan: 5,
name: 'sqlDatasourceName',
label: $t('re.resources.designer.processor.grid.entity.sqlDatasourceName'),
type: 'select',
type: 'w-select',
clearable: true,
options: dsOptionsRef,
rows: 1,
@ -837,7 +837,7 @@
colSpan: 3,
name: 'sql',
label: $t('re.resources.designer.processor.grid.entity.sql'),
type: 'code-mirror',
type: 'w-code-mirror',
height: 180,
lang: 'sql',
toolbar: false,
@ -934,7 +934,7 @@
{
name: 'name',
label: $t('name'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 1,
placeholder: true,
@ -944,7 +944,7 @@
{
name: 'value',
label: $t('value'),
type: 'text',
type: 'w-text',
},
],
},
@ -1081,13 +1081,13 @@
{
name: 'field',
label: $t('fieldName'),
type: 'select',
type: 'w-select',
options: sqlQueryResultFieldsRef,
},
{
name: 'parameter',
label: $t('parameterName'),
type: 'select',
type: 'w-select',
options: indicatorOptionsRef,
},
],

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

@ -80,12 +80,12 @@
form: {
colsNum: 1,
fields: [
{ name: 'order', label: $t('order'), type: 'text', hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'ownerType', label: $t('ownerType'), type: 'text', defaultValue: 'LIB', hidden: true },
{ name: 'owner', label: $t('owner'), type: 'text', defaultValue: lib.id, hidden: true },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'order', label: $t('order'), type: 'w-text', hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'ownerType', label: $t('ownerType'), type: 'w-text', defaultValue: 'LIB', hidden: true },
{ name: 'owner', label: $t('owner'), type: 'w-text', defaultValue: lib.id, hidden: true },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
],
},
}"

20
io.sc.engine.rule.frontend/src/views/lib/TestCaseParameter.vue

@ -87,16 +87,16 @@
form: {
colsNum: 1,
fields: [
{ name: 'testCase', label: $t('testCase'), type: 'text', defaultValue: testCase.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'source', label: $t('source'), type: 'text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'text', hidden: true },
{ name: 'testCase', label: $t('testCase'), type: 'w-text', defaultValue: testCase.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'source', label: $t('source'), type: 'w-text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'w-text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'w-text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'w-text', hidden: true },
{
name: 'inputValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType');
@ -115,7 +115,7 @@
{
name: 'expectValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType');
@ -135,11 +135,11 @@
{
name: 'resultValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
lang: 'json',
},
{ name: 'skipCheck', label: $t('re.resources.designer.testCaseParameter.grid.entity.skipCheck'), type: 'checkbox' },
{ name: 'skipCheck', label: $t('re.resources.designer.testCaseParameter.grid.entity.skipCheck'), type: 'w-checkbox' },
],
},
}"

22
io.sc.engine.rule.frontend/src/views/lib/ValidatorGrid.vue

@ -43,17 +43,17 @@
form: {
colsNum: 1,
fields: [
{ name: 'indicator', label: 'indicator', type: 'text', defaultValue: indicator.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'indicator', label: 'indicator', type: 'w-text', defaultValue: indicator.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{
name: 'description',
label: $t('description'),
type: 'text',
type: 'w-text',
},
{
name: 'type',
label: $t('type'),
type: 'select',
type: 'w-select',
required: true,
options:
ValueTypeAndValidatorTypeMapping[ValueTypeAndValidatorTypeMapping[indicator.valueType] == null ? 'java.lang.Object' : indicator.valueType],
@ -61,7 +61,7 @@
{
name: 'minValue',
label: $t('minValue'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -73,7 +73,7 @@
{
name: 'minInclude',
label: $t('isMinValueInclude'),
type: 'checkbox',
type: 'w-checkbox',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -85,7 +85,7 @@
{
name: 'maxValue',
label: $t('maxValue'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -97,7 +97,7 @@
{
name: 'maxInclude',
label: $t('isMaxValueInclude'),
type: 'checkbox',
type: 'w-checkbox',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -109,7 +109,7 @@
{
name: 'pattern',
label: $t('RegExp'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'PATTERN') {
@ -121,9 +121,9 @@
{
name: 'tip',
label: $t('re.resources.designer.validator.grid.entity.tip'),
type: 'text',
type: 'w-text',
},
{ name: 'order', label: $t('order'), type: 'number', hidden: false },
{ name: 'order', label: $t('order'), type: 'w-number', hidden: false },
],
},
}"

15
io.sc.engine.rule.frontend/src/views/resources/Resources.vue

@ -290,22 +290,22 @@
form: {
colsNum: 1,
fields: [
{ name: 'type', label: $t('type'), type: 'text', hidden: true },
{ name: 'type', label: $t('type'), type: 'w-text', hidden: true },
{
name: 'code',
label: $t('code'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
return type === 'MODEL' || type === 'SCORE_CARD';
},
},
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
{
name: 'imports',
label: $t('re.resources.grid.entity.imports'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
lineWrap: true,
lineBreak: false,
@ -346,9 +346,8 @@
}"
@row-db-click="
(args) => {
console.log(args);
if (row.type !== 'FOLDER') {
designerDialogRef.open(row);
if (args.row.type !== 'FOLDER') {
designerDialogRef.open(args.row);
}
}
"

2
io.sc.engine.rule.frontend/src/views/resources/StartDeployWorkflowDialog.vue

@ -18,7 +18,7 @@
<w-form
ref="formRef"
:cols-num="1"
:fields="[{ name: 'treatment', label: $t('re.workflow.dialog.entity.treatment'), type: 'textarea', rows: 5, required: true }]"
:fields="[{ name: 'treatment', label: $t('re.workflow.dialog.entity.treatment'), type: 'w-textarea', rows: 5, required: true }]"
class="p-2"
></w-form>
<w-select-assignee-dialog ref="selectAssigneeDialogRef" @assignee-selected="assigneeSelected"></w-select-assignee-dialog>

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

@ -5,9 +5,9 @@
<Model
:resource="currentSelectedResourceRef"
@row-click="
(evt, row, index) => {
currentSelectedModelRef = row;
if (row.parent) {
(args) => {
currentSelectedModelRef = args.row;
if (args.row.parent) {
statusReactive.parameterAndTestcaseTab = 'parameter';
statusReactive.isShowParameter = true;
statusReactive.isShowTestCase = false;

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

@ -18,9 +18,9 @@
:resource="currentSelectedResourceRef"
:read-only="readOnlyRef"
@row-click="
(evt, row, index) => {
currentSelectedModelRef = row;
if (row.parent) {
(args) => {
currentSelectedModelRef = args.row;
if (args.row.parent) {
statusReactive.parameterAndTestcaseTab = 'parameter';
statusReactive.isShowParameter = true;
statusReactive.isShowTestCase = false;
@ -84,21 +84,26 @@
:model="currentSelectedModelRef"
:resource="currentSelectedResourceRef"
@row-click="
(evt, row, index) => {
currentSelectedParameterRef = row;
if (row.type === 'IN') {
(args) => {
currentSelectedParameterRef = args.row;
if (args.row.type === 'IN') {
statusReactive.isShowValidator = true;
statusReactive.isShowProcessor = false;
statusReactive.isShowOption = false;
statusReactive.isShowTestCaseParameter = false;
validatorGridRef?.refresh();
} else if (row.type === 'IN_OPTION') {
} else if (args.row.type === 'IN_OPTION') {
statusReactive.isShowValidator = false;
statusReactive.isShowProcessor = false;
statusReactive.isShowOption = true;
statusReactive.isShowTestCaseParameter = false;
optionGridRef?.refresh();
} else if (row.type == 'OUT' || row.type == 'INTERMEDIATE' || row.type == 'RULE_RESULT' || row.type == 'SINGLE_RULE_RESULT') {
} else if (
args.row.type == 'OUT' ||
args.row.type == 'INTERMEDIATE' ||
args.row.type == 'RULE_RESULT' ||
args.row.type == 'SINGLE_RULE_RESULT'
) {
statusReactive.isShowValidator = false;
statusReactive.isShowProcessor = true;
statusReactive.isShowOption = false;

12
io.sc.engine.rule.frontend/src/views/resources/designer/Model.vue

@ -134,24 +134,24 @@
form: {
colsNum: 1,
fields: [
{ name: 'code', label: $t('code'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'code', label: $t('code'), type: 'w-text' },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{
name: 'category',
label: $t('category'),
type: 'select',
type: 'w-select',
options: Options.enum(Enums.ModelCategory),
defaultValue: 'OTHER',
},
{
name: 'executeMode',
label: $t('re.resources.designer.model.grid.entity.executeMode'),
type: 'select',
type: 'w-select',
options: Options.enum(Enums.ExecuteMode),
defaultValue: 'DOWN_TOP',
},
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'enable', label: $t('isEnable'), type: 'checkbox', defaultValue: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
{ name: 'enable', label: $t('isEnable'), type: 'w-checkbox', defaultValue: true },
],
},
}"

14
io.sc.engine.rule.frontend/src/views/resources/designer/Option.vue

@ -60,29 +60,29 @@
form: {
colsNum: 1,
fields: [
{ name: 'parameter', label: 'parameter', type: 'text', defaultValue: parameter.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'parameter', label: 'parameter', type: 'w-text', defaultValue: parameter.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{
name: 'inputValue',
label: $t('re.resources.designer.option.grid.entity.inputValue'),
type: 'text',
type: 'w-text',
},
{
name: 'value',
label: $t('re.resources.designer.option.grid.entity.value'),
type: 'text',
type: 'w-text',
},
{
name: 'title',
label: $t('re.resources.designer.option.grid.entity.title'),
type: 'text',
type: 'w-text',
},
{
name: 'description',
label: $t('description'),
type: 'text',
type: 'w-text',
},
{ name: 'order', label: $t('order'), type: 'number', hidden: false },
{ name: 'order', label: $t('order'), type: 'w-number', hidden: false },
],
},
}"

36
io.sc.engine.rule.frontend/src/views/resources/designer/Parameter.vue

@ -207,15 +207,15 @@
form: {
colsNum: 1,
fields: [
{ name: 'type', label: $t('type'), type: 'select', options: Options.enum(Enums.ParameterType), 'onUpdate:modelValue': (value) => {} },
{ name: 'model', label: $t('modelId'), type: 'text', defaultValue: model.id, hidden: true },
{ name: 'code', label: $t('code'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'type', label: $t('type'), type: 'w-select', options: Options.enum(Enums.ParameterType), 'onUpdate:modelValue': (value) => {} },
{ name: 'model', label: $t('modelId'), type: 'w-text', defaultValue: model.id, hidden: true },
{ name: 'code', label: $t('code'), type: 'w-text' },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
{
name: 'libCode',
label: $t('re.resources.designer.parameter.grid.entity.libCode'),
type: 'select',
type: 'w-select',
options: libCodeOptionsRef,
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
@ -228,7 +228,7 @@
{
name: 'libVersion',
label: $t('re.resources.designer.parameter.grid.entity.libVersion'),
type: 'select',
type: 'w-select',
options: libVersionOptionsRef,
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
@ -242,7 +242,7 @@
{
name: 'indicatorCode',
label: $t('re.resources.designer.parameter.grid.entity.indicatorCode'),
type: 'select',
type: 'w-select',
options: indicatorCodeOptionsRef,
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
@ -252,7 +252,7 @@
{
name: 'valueType',
label: $t('re.resources.designer.parameter.grid.entity.valueType'),
type: 'select',
type: 'w-select',
options: ValueTypeList,
defaultValue: 'java.math.BigDecimal',
showIf: (arg) => {
@ -277,7 +277,7 @@
{
name: 'valueTypeVersion',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeVersion'),
type: 'select',
type: 'w-select',
clearable: true,
options: valueTypeVersionOptionsRef,
showIf: (arg) => {
@ -314,7 +314,7 @@
{
name: 'valueScale',
label: $t('re.resources.designer.parameter.grid.entity.valueScale'),
type: 'number',
type: 'w-number',
defaultValue: 6,
showIf: (arg) => {
const valueType = arg.form.getFieldValue('valueType');
@ -334,7 +334,7 @@
{
name: 'valueRoundingMode',
label: $t('re.resources.designer.parameter.grid.entity.valueRoundingMode'),
type: 'select',
type: 'w-select',
options: Options.enum(Enums.RoundingMode),
defaultValue: 'HALF_UP',
showIf: (arg) => {
@ -355,7 +355,7 @@
{
name: 'valueTypeIsList',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeIsList'),
type: 'checkbox',
type: 'w-checkbox',
defaultValue: false,
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
@ -368,7 +368,7 @@
{
name: 'defaultValue',
label: $t('defaultValue'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
const valueTypeIsList = arg.form.getFieldValue('valueTypeIsList');
@ -379,7 +379,7 @@
},
},
{ name: 'order', label: $t('order'), type: 'number' },
{ name: 'order', label: $t('order'), type: 'w-number' },
],
},
}"
@ -413,8 +413,8 @@
},
}"
@row-click="
(evt, row, index) => {
emit('rowClick', evt, row, index);
(args) => {
emit('rowClick', args);
}
"
@before-request-data="
@ -482,7 +482,7 @@ const props = defineProps({
});
const emit = defineEmits<{
(e: 'rowClick', evt: Event, row: any, index: number): void;
(e: 'rowClick', args): void;
(e: 'beforeRequestData', requestParams: URLSearchParams | any, callback: any): void;
}>();

92
io.sc.engine.rule.frontend/src/views/resources/designer/Processor.vue

@ -434,17 +434,17 @@
form: {
colsNum: 5,
fields: [
{ colSpan: 5, name: 'parameter', label: 'parameter', type: 'text', defaultValue: parameter.id, hidden: true },
{ colSpan: 5, name: 'id', label: $t('id'), type: 'text', hidden: true },
{ colSpan: 5, name: 'order', label: $t('order'), type: 'number', hidden: true },
{ colSpan: 5, name: 'type', label: $t('type'), type: 'text', hidden: true },
{ colSpan: 5, name: 'description', label: $t('description'), type: 'text', hidden: true },
{ colSpan: 5, name: 'enable', label: $t('enable'), type: 'checkbox', defaultValue: true, hidden: true },
{ colSpan: 5, name: 'parameter', label: 'parameter', type: 'w-text', defaultValue: parameter.id, hidden: true },
{ colSpan: 5, name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ colSpan: 5, name: 'order', label: $t('order'), type: 'w-number', hidden: true },
{ colSpan: 5, name: 'type', label: $t('type'), type: 'w-text', hidden: true },
{ colSpan: 5, name: 'description', label: $t('description'), type: 'w-text', hidden: true },
{ colSpan: 5, name: 'enable', label: $t('enable'), type: 'w-checkbox', defaultValue: true, hidden: true },
{
colSpan: 5,
name: 'objectCondition',
label: $t('re.resources.designer.processor.grid.entity.objectCondition'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -563,7 +563,7 @@
{
name: 'expression',
label: $t('expression'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -587,7 +587,7 @@
colSpan: 5,
name: 'optionCode',
label: $t('re.resources.designer.processor.grid.entity.optionCode'),
type: 'select',
type: 'w-select',
options: optionOptionsRef,
showIf: (arg) => {
return 'OPTION_VALUE' === arg.form.getFieldValue('type');
@ -597,7 +597,7 @@
colSpan: 5,
name: 'mathFormula',
label: $t('re.resources.designer.processor.grid.entity.mathFormula'),
type: 'math',
type: 'w-math',
autoCompletion: autoCompletion,
userDefinedFunctions: userDefinedFunctionsRef,
showIf: (arg) => {
@ -608,7 +608,7 @@
colSpan: 5,
name: 'arithmetic',
label: $t('re.resources.designer.processor.grid.entity.arithmetic'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 5,
placeholder: true,
@ -624,7 +624,7 @@
colSpan: 5,
name: 'ternaryCondition',
label: $t('re.resources.designer.processor.grid.entity.ternaryCondition'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 4,
placeholder: true,
@ -640,7 +640,7 @@
colSpan: 5,
name: 'ternaryTrue',
label: $t('re.resources.designer.processor.grid.entity.ternaryTrue'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 4,
placeholder: true,
@ -656,7 +656,7 @@
colSpan: 5,
name: 'ternaryFalse',
label: $t('re.resources.designer.processor.grid.entity.ternaryFalse'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 4,
placeholder: true,
@ -672,7 +672,7 @@
colSpan: 5,
name: 'when',
label: $t('re.resources.designer.processor.grid.entity.when'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 4,
lineWrap: true,
@ -688,7 +688,7 @@
colSpan: 5,
name: 'then',
label: $t('re.resources.designer.processor.grid.entity.then'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 4,
lineWrap: true,
@ -704,7 +704,7 @@
colSpan: 5,
name: 'isWhenThenShorted',
label: $t('re.resources.designer.processor.grid.entity.isWhenThenShorted'),
type: 'checkbox',
type: 'w-checkbox',
showIf: (arg) => {
return 'WHEN_THEN' === arg.form.getFieldValue('type');
},
@ -716,7 +716,7 @@
showIf: (arg) => {
return 'NUMBER_RANGE' === arg.form.getFieldValue('type');
},
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 3,
lineWrap: true,
@ -814,11 +814,11 @@
colsNum: 4,
fields: [
{ name: 'uuid', label: 'uuid', hidden: true, colSpan: 4 },
{ name: 'min', label: $t('minValue'), type: 'text', colSpan: 3 },
{ name: 'minIncluded', label: $t('include'), type: 'checkbox' },
{ name: 'max', label: $t('maxValue'), type: 'text', colSpan: 3 },
{ name: 'maxIncluded', label: $t('include'), type: 'checkbox' },
{ name: 'value', label: $t('value'), type: 'number', colSpan: 3 },
{ name: 'min', label: $t('minValue'), type: 'w-text', colSpan: 3 },
{ name: 'minIncluded', label: $t('include'), type: 'w-checkbox' },
{ name: 'max', label: $t('maxValue'), type: 'w-text', colSpan: 3 },
{ name: 'maxIncluded', label: $t('include'), type: 'w-checkbox' },
{ name: 'value', label: $t('value'), type: 'w-number', colSpan: 3 },
],
},
},
@ -912,7 +912,7 @@
{
name: 'condition',
label: $t('condition'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 4,
placeholder: true,
@ -924,7 +924,7 @@
{
name: 'value',
label: $t('value'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 4,
lineWrap: true,
@ -953,7 +953,7 @@
colSpan: 5,
name: 'decisionTable2C',
label: $t('re.resources.designer.processor.grid.entity.decisionTable2C'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 1,
showIf: (arg) => {
return 'DECISION_TABLE_2C' === arg.form.getFieldValue('type');
@ -963,7 +963,7 @@
colSpan: 5,
name: 'decisionTable',
label: $t('re.resources.designer.processor.grid.entity.decisionTable'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 1,
showIf: (arg) => {
return 'DECISION_TABLE' === arg.form.getFieldValue('type');
@ -973,7 +973,7 @@
colSpan: 5,
name: 'decisionTree',
label: $t('re.resources.designer.processor.grid.entity.decisionTree'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 20,
lineNumber: true,
toolbar: false,
@ -985,7 +985,7 @@
colSpan: 5,
name: 'executionFlow',
label: $t('re.resources.designer.processor.grid.entity.executionFlow'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 20,
lineNumber: true,
toolbar: false,
@ -997,7 +997,7 @@
colSpan: 5,
name: 'pmml',
label: $t('re.resources.designer.processor.grid.entity.pmml'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 20,
lineNumber: true,
toolbar: false,
@ -1010,7 +1010,7 @@
colSpan: 5,
name: 'groovyScript',
label: $t('re.resources.designer.processor.grid.entity.groovyScript'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 20,
lineNumber: true,
lang: 'java',
@ -1027,7 +1027,7 @@
colSpan: 5,
name: 'sqlDatasourceName',
label: $t('re.resources.designer.processor.grid.entity.sqlDatasourceName'),
type: 'select',
type: 'w-select',
clearable: true,
options: dsOptionsRef,
rows: 1,
@ -1039,7 +1039,7 @@
colSpan: 3,
name: 'sql',
label: $t('re.resources.designer.processor.grid.entity.sql'),
type: 'code-mirror',
type: 'w-code-mirror',
height: 180,
lang: 'sql',
toolbar: false,
@ -1136,7 +1136,7 @@
{
name: 'name',
label: $t('name'),
type: 'code-mirror',
type: 'w-code-mirror',
lang: 'java',
rows: 1,
placeholder: true,
@ -1145,7 +1145,7 @@
{
name: 'value',
label: $t('value'),
type: 'text',
type: 'w-text',
},
],
},
@ -1282,13 +1282,13 @@
{
name: 'field',
label: $t('fieldName'),
type: 'select',
type: 'w-select',
options: sqlQueryResultFieldsRef,
},
{
name: 'parameter',
label: $t('parameterName'),
type: 'select',
type: 'w-select',
options: parameterOptionsRef,
},
],
@ -1419,7 +1419,8 @@
}
"
@after-editor-open="
(row) => {
(args) => {
const row = args.data;
//
axios.get(Environment.apiContextPath('/api/re/common/listParameterAndValueTypeByParameterId/' + parameter.id)).then((response) => {
autoCompletionManager.setParameters(response.data.parameters);
@ -1498,14 +1499,14 @@
}
"
@row-db-click="
(e, row) => {
const type = row.type;
(args) => {
const type = args.row.type;
if ('DECISION_TREE' === type) {
decisionTreeDialogRef.open(row.id);
decisionTreeDialogRef.open(args.row.id);
} else if ('EXECUTION_FLOW' === type) {
executionFlowDialogRef.open(row.id);
executionFlowDialogRef.open(args.row.id);
} else {
gridRef.edit(row);
gridRef.edit(args.row);
}
}
"
@ -1540,11 +1541,6 @@ const props = defineProps({
readOnly: { type: Boolean, default: false },
});
const emit = defineEmits<{
(e: 'rowClick', evt: Event, row: any, index: number): void;
(e: 'beforeRequestData', requestParams: URLSearchParams | any, callback: any): void;
}>();
const gridRef = ref();
const optionOptionsRef = ref([]);
const dsOptionsRef = ref([]);

20
io.sc.engine.rule.frontend/src/views/resources/designer/TestCaseParameter.vue

@ -83,16 +83,16 @@
form: {
colsNum: 1,
fields: [
{ name: 'testCase', label: $t('testCase'), type: 'text', defaultValue: testCase.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'source', label: $t('source'), type: 'text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'text', hidden: true },
{ name: 'testCase', label: $t('testCase'), type: 'w-text', defaultValue: testCase.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'source', label: $t('source'), type: 'w-text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'w-text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'w-text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'w-text', hidden: true },
{
name: 'inputValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType');
@ -111,7 +111,7 @@
{
name: 'expectValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType');
@ -131,11 +131,11 @@
{
name: 'resultValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
lang: 'json',
},
{ name: 'skipCheck', label: $t('re.resources.designer.testCaseParameter.grid.entity.skipCheck'), type: 'checkbox' },
{ name: 'skipCheck', label: $t('re.resources.designer.testCaseParameter.grid.entity.skipCheck'), type: 'w-checkbox' },
],
},
}"

22
io.sc.engine.rule.frontend/src/views/resources/designer/Validator.vue

@ -70,18 +70,18 @@
form: {
colsNum: 1,
fields: [
{ name: 'parameter', label: 'parameter', type: 'text', defaultValue: parameter.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'parameter', label: 'parameter', type: 'w-text', defaultValue: parameter.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{
name: 'description',
label: $t('description'),
type: 'text',
type: 'w-text',
},
{ name: 'type', label: $t('type'), type: 'select', options: ValueTypeAndValidatorTypeMapping[parameter.valueType] },
{ name: 'type', label: $t('type'), type: 'w-select', options: ValueTypeAndValidatorTypeMapping[parameter.valueType] },
{
name: 'minValue',
label: $t('minValue'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -93,7 +93,7 @@
{
name: 'minInclude',
label: $t('isMinValueInclude'),
type: 'checkbox',
type: 'w-checkbox',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -105,7 +105,7 @@
{
name: 'maxValue',
label: $t('maxValue'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -117,7 +117,7 @@
{
name: 'maxInclude',
label: $t('isMaxValueInclude'),
type: 'checkbox',
type: 'w-checkbox',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -129,7 +129,7 @@
{
name: 'pattern',
label: $t('RegExp'),
type: 'text',
type: 'w-text',
showIf: (arg) => {
const type = arg.form.getFieldValue('type');
if (type == 'PATTERN') {
@ -141,9 +141,9 @@
{
name: 'tip',
label: $t('re.resources.designer.validator.grid.entity.tip'),
type: 'text',
type: 'w-text',
},
{ name: 'order', label: $t('order'), type: 'number', hidden: false },
{ name: 'order', label: $t('order'), type: 'w-number', hidden: false },
],
},
}"

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

@ -117,8 +117,8 @@
:toolbar-actions="['query', 'refresh', 'separator', 'view']"
:query-form-cols-num="2"
:query-form-fields="[
{ name: 'code', label: $t('code'), type: 'text', clearable: true },
{ name: 'name', label: $t('name'), type: 'text', clearable: true },
{ name: 'code', label: $t('code'), type: 'w-text', clearable: true },
{ name: 'name', label: $t('name'), type: 'w-text', clearable: true },
]"
:columns="[
{ width: 60, name: 'order', label: $t('order'), align: 'right' },

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

@ -100,10 +100,10 @@
form: {
colsNum: 1,
fields: [
{ name: 'order', label: $t('order'), type: 'text', hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'order', label: $t('order'), type: 'w-text', hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
],
},
}"
@ -228,16 +228,16 @@
form: {
colsNum: 1,
fields: [
{ name: 'testCase', label: $t('testCase'), type: 'text', defaultValue: currentSelectedTestCaseRef.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'source', label: $t('source'), type: 'text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'text', hidden: true },
{ name: 'testCase', label: $t('testCase'), type: 'w-text', defaultValue: currentSelectedTestCaseRef.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'source', label: $t('source'), type: 'w-text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'w-text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'w-text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'w-text', hidden: true },
{
name: 'inputValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType');
@ -257,7 +257,7 @@
{
name: 'expectValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType');
@ -280,11 +280,11 @@
{
name: 'resultValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'),
type: 'code-mirror',
type: 'w-code-mirror',
rows: 4,
lang: 'json',
},
{ name: 'skipCheck', label: $t('re.resources.designer.testCaseParameter.grid.entity.skipCheck'), type: 'checkbox' },
{ name: 'skipCheck', label: $t('re.resources.designer.testCaseParameter.grid.entity.skipCheck'), type: 'w-checkbox' },
],
},
}"

2
io.sc.engine.rule.frontend/src/views/workflow/CompleteTaskDialog.vue

@ -14,7 +14,7 @@
<w-form
v-model="formModelValue"
:cols-num="1"
:fields="[{ name: 'treatment', label: $t('re.workflow.dialog.entity.treatment'), type: 'textarea', rows: 5, required: true }]"
:fields="[{ name: 'treatment', label: $t('re.workflow.dialog.entity.treatment'), type: 'w-textarea', rows: 5, required: true }]"
>
</w-form>
</w-dialog>

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

@ -156,10 +156,10 @@
form: {
colsNum: 1,
fields: [
{ name: 'order', label: $t('order'), type: 'text', hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{ name: 'order', label: $t('order'), type: 'w-text', hidden: true },
{ name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'w-text' },
],
},
}"

80
io.sc.engine.rule.frontend/webpack.config.common.cjs

@ -1,16 +1,16 @@
/**
* webpack 通用配置
*/
const path = require('path'); // path
const webpack = require('webpack'); // webpack
const json5 = require('json5'); // json5
const HtmlWebpackPlugin = require('html-webpack-plugin'); // webpack html 生成插件
const CopyWebpackPlugin = require('copy-webpack-plugin'); // webpack copy 插件
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); // 抽取 css 插件
const { VueLoaderPlugin } = require('vue-loader'); // vue loader 插件
const ESLintPlugin = require('eslint-webpack-plugin'); // eslint 插件
const packageJson = require('./package.json'); // package.json
const projectName =packageJson.name; // 项目名称
const path = require('path'); // path
const webpack = require('webpack'); // webpack
const json5 = require('json5'); // json5
const HtmlWebpackPlugin = require('html-webpack-plugin'); // webpack html 生成插件
const CopyWebpackPlugin = require('copy-webpack-plugin'); // webpack copy 插件
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); // 抽取 css 插件
const { VueLoaderPlugin } = require('vue-loader'); // vue loader 插件
const ESLintPlugin = require('eslint-webpack-plugin'); // eslint 插件
const packageJson = require('./package.json'); // package.json
const projectName = packageJson.name; // 项目名称
module.exports = {
// 入口文件
@ -37,26 +37,28 @@ module.exports = {
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
loader: 'babel-loader',
options: {
cacheDirectory: true,
}
}
]
},
},
],
},
// css
{
test: /\.(sa|sc|c)ss$/,
use: [{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
}]
use: [
{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
},
],
},
// 字体文件
@ -65,7 +67,7 @@ module.exports = {
type: 'asset/resource',
generator: {
filename: `fonts/[name].[contenthash:5].[ext]`,
}
},
},
// json5
@ -84,8 +86,8 @@ module.exports = {
use: [
{
loader: 'vue-loader',
}
]
},
],
},
// 解决 @maxgraph/core 的问题, 避免出现以下错误
@ -97,10 +99,10 @@ module.exports = {
// The extension in the request is mandatory for it to be fully specified.
{
test: /\.js$/,
include: /node_modules\/@maxgraph\/core/,
resolve:{
include: /node_modules[\/\\]@maxgraph[\/\\]core/,
resolve: {
fullySpecified: false,
}
},
},
],
},
@ -109,7 +111,7 @@ module.exports = {
plugins: [
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: JSON.stringify(true),
__VUE_PROD_DEVTOOLS__: JSON.stringify(false)
__VUE_PROD_DEVTOOLS__: JSON.stringify(false),
}),
// 进度显示插件
@ -118,7 +120,7 @@ module.exports = {
// css 抽取插件
new MiniCssExtractPlugin({
filename: `css/[name].[contenthash:5].css`,
chunkFilename: `css/[name].[contenthash:5].css`
chunkFilename: `css/[name].[contenthash:5].css`,
}),
// 自动生成静态 index.html 文件
@ -144,8 +146,8 @@ module.exports = {
return true;
},
info: { minimized: true },
}
]
},
],
}),
// vue loader 插件
@ -156,9 +158,7 @@ module.exports = {
fix: true,
formatter: 'stylish',
extensions: ['js', 'ts', 'vue', 'cjs'],
exclude: [
'node_modules',
],
exclude: ['node_modules'],
}),
],
@ -171,9 +171,9 @@ module.exports = {
// 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用
extensions: ['.js', '.cjs', '.ts', '.vue'],
fallback: {
"fs": false,
"os": false,
"path": false,
}
fs: false,
os: false,
path: false,
},
},
};

85
io.sc.platform.core.frontend/.bin/util.js

@ -1,23 +1,23 @@
const fs =require('fs');
const fs = require('fs');
/**
* 新建目录
* @param {*} dir 目录路径
*/
function mkdir(dir){
fs.mkdirSync(dir,{recursive: true});
function mkdir(dir) {
fs.mkdirSync(dir, { recursive: true });
}
/**
* 删除目录
* @param {*} dir 目录
*/
function rm(dir){
fs.rmSync(dir,{recursive: true});
function rm(dir) {
fs.rmSync(dir, { recursive: true });
}
function cp(src,target){
fs.cpSync(src,target,{recursive: true});
function cp(src, target) {
fs.cpSync(src, target, { recursive: true });
}
/**
@ -25,7 +25,7 @@ function cp(src,target){
* @param {*} src 文件路径
* @returns javascript 对象
*/
function parseJson(src){
function parseJson(src) {
return JSON.parse(fs.readFileSync(src).toString());
}
@ -34,14 +34,14 @@ function parseJson(src){
* @param {*} filePath 文件路径
* @param {*} repalcer 替换字符 Map(key:需要替换的字符串,value:替换后的字符串)
*/
function replaceAll(filePath,repalcer){
let content =fs.readFileSync(filePath,{encoding:'utf-8'});
if(repalcer){
for(const key in repalcer){
content =content.replaceAll(key,repalcer[key]);
function replaceAll(filePath, repalcer) {
let content = fs.readFileSync(filePath, { encoding: 'utf-8' });
if (repalcer) {
for (const key in repalcer) {
content = content.replaceAll(key, repalcer[key]);
}
}
fs.writeFileSync(filePath,content);
fs.writeFileSync(filePath, content);
}
/**
@ -66,7 +66,33 @@ function mergeObject(target, source) {
}
}
}
return target;
return sortObject(target);
}
/**
* 排序对象的属性
* @param {*} obj 对象
* @returns 排序后的对象
*/
function sortObject(obj) {
if (!obj) {
return null;
}
const propertyNames = [];
for (const property in obj) {
propertyNames.push(property);
}
propertyNames.sort();
const result = {};
for (const propertyName of propertyNames) {
const value = obj[propertyName];
if (typeof value === 'object' && !Array.isArray(value)) {
result[propertyName] = sortObject(obj[propertyName]);
} else {
result[propertyName] = obj[propertyName];
}
}
return result;
}
/**
@ -75,19 +101,19 @@ function mergeObject(target, source) {
* @param {*} srcPath 源文件
* @param {*} includeProperties 包含的需要合并的属性列表
*/
function mergeJsonFile(targetPath,srcPath,includeProperties){
const target =parseJson(targetPath);
const source =parseJson(srcPath);
if(includeProperties && includeProperties.length>0){
for(const property of includeProperties){
if(target[property]){
mergeObject(target[property],source[property]);
}else{
target[property] =source[property];
function mergeJsonFile(targetPath, srcPath, includeProperties) {
const target = parseJson(targetPath);
const source = parseJson(srcPath);
if (includeProperties && includeProperties.length > 0) {
for (const property of includeProperties) {
if (target[property]) {
mergeObject(target[property], source[property]);
} else {
target[property] = source[property];
}
}
}else{
mergeObject(target,source);
} else {
mergeObject(target, source);
}
fs.writeFileSync(targetPath, JSON.stringify(target, null, ' '));
}
@ -106,8 +132,8 @@ function isFileExisted(file) {
resolve(true);
}
});
})
};
});
}
module.exports = {
mkdir,
@ -115,7 +141,8 @@ module.exports = {
cp,
parseJson,
replaceAll,
sortObject,
mergeObject,
mergeJsonFile,
isFileExisted
isFileExisted,
};

2
io.sc.platform.core.frontend/package.json

@ -1,6 +1,6 @@
{
"name": "platform-core",
"version": "8.1.322",
"version": "8.1.323",
"description": "前端核心包,用于快速构建前端的脚手架",
"//main": "库的主文件",
"main": "dist/platform-core.js",

4
io.sc.platform.core.frontend/template-project/package.json

@ -1,6 +1,6 @@
{
"name": "platform-core",
"version": "8.1.322",
"version": "8.1.323",
"description": "前端核心包,用于快速构建前端的脚手架",
"private": false,
"keywords": [],
@ -105,7 +105,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.2.2",
"platform-core": "8.1.322",
"platform-core": "8.1.323",
"quasar": "2.16.11",
"svg-path-commander": "2.0.10",
"tailwindcss": "3.4.10",

80
io.sc.platform.core.frontend/template-project/webpack.config.common.cjs

@ -1,16 +1,16 @@
/**
* webpack 通用配置
*/
const path = require('path'); // path
const webpack = require('webpack'); // webpack
const json5 = require('json5'); // json5
const HtmlWebpackPlugin = require('html-webpack-plugin'); // webpack html 生成插件
const CopyWebpackPlugin = require('copy-webpack-plugin'); // webpack copy 插件
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); // 抽取 css 插件
const { VueLoaderPlugin } = require('vue-loader'); // vue loader 插件
const ESLintPlugin = require('eslint-webpack-plugin'); // eslint 插件
const packageJson = require('./package.json'); // package.json
const projectName =packageJson.name; // 项目名称
const path = require('path'); // path
const webpack = require('webpack'); // webpack
const json5 = require('json5'); // json5
const HtmlWebpackPlugin = require('html-webpack-plugin'); // webpack html 生成插件
const CopyWebpackPlugin = require('copy-webpack-plugin'); // webpack copy 插件
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); // 抽取 css 插件
const { VueLoaderPlugin } = require('vue-loader'); // vue loader 插件
const ESLintPlugin = require('eslint-webpack-plugin'); // eslint 插件
const packageJson = require('./package.json'); // package.json
const projectName = packageJson.name; // 项目名称
module.exports = {
// 入口文件
@ -37,26 +37,28 @@ module.exports = {
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
loader: 'babel-loader',
options: {
cacheDirectory: true,
}
}
]
},
},
],
},
// css
{
test: /\.(sa|sc|c)ss$/,
use: [{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
}]
use: [
{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
},
],
},
// 字体文件
@ -65,7 +67,7 @@ module.exports = {
type: 'asset/resource',
generator: {
filename: `fonts/[name].[contenthash:5].[ext]`,
}
},
},
// json5
@ -84,8 +86,8 @@ module.exports = {
use: [
{
loader: 'vue-loader',
}
]
},
],
},
// 解决 @maxgraph/core 的问题, 避免出现以下错误
@ -97,10 +99,10 @@ module.exports = {
// The extension in the request is mandatory for it to be fully specified.
{
test: /\.js$/,
include: /node_modules\/@maxgraph\/core/,
resolve:{
include: /node_modules[\/\\]@maxgraph[\/\\]core/,
resolve: {
fullySpecified: false,
}
},
},
],
},
@ -109,7 +111,7 @@ module.exports = {
plugins: [
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: JSON.stringify(true),
__VUE_PROD_DEVTOOLS__: JSON.stringify(false)
__VUE_PROD_DEVTOOLS__: JSON.stringify(false),
}),
// 进度显示插件
@ -118,7 +120,7 @@ module.exports = {
// css 抽取插件
new MiniCssExtractPlugin({
filename: `css/[name].[contenthash:5].css`,
chunkFilename: `css/[name].[contenthash:5].css`
chunkFilename: `css/[name].[contenthash:5].css`,
}),
// 自动生成静态 index.html 文件
@ -144,8 +146,8 @@ module.exports = {
return true;
},
info: { minimized: true },
}
]
},
],
}),
// vue loader 插件
@ -156,9 +158,7 @@ module.exports = {
fix: true,
formatter: 'stylish',
extensions: ['js', 'ts', 'vue', 'cjs'],
exclude: [
'node_modules',
],
exclude: ['node_modules'],
}),
],
@ -171,9 +171,9 @@ module.exports = {
// 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用
extensions: ['.js', '.cjs', '.ts', '.vue'],
fallback: {
"fs": false,
"os": false,
"path": false,
}
fs: false,
os: false,
path: false,
},
},
};

80
io.sc.platform.core.frontend/webpack.config.common.cjs

@ -1,16 +1,16 @@
/**
* webpack 通用配置
*/
const path = require('path'); // path
const webpack = require('webpack'); // webpack
const json5 = require('json5'); // json5
const HtmlWebpackPlugin = require('html-webpack-plugin'); // webpack html 生成插件
const CopyWebpackPlugin = require('copy-webpack-plugin'); // webpack copy 插件
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); // 抽取 css 插件
const { VueLoaderPlugin } = require('vue-loader'); // vue loader 插件
const ESLintPlugin = require('eslint-webpack-plugin'); // eslint 插件
const packageJson = require('./package.json'); // package.json
const projectName =packageJson.name; // 项目名称
const path = require('path'); // path
const webpack = require('webpack'); // webpack
const json5 = require('json5'); // json5
const HtmlWebpackPlugin = require('html-webpack-plugin'); // webpack html 生成插件
const CopyWebpackPlugin = require('copy-webpack-plugin'); // webpack copy 插件
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); // 抽取 css 插件
const { VueLoaderPlugin } = require('vue-loader'); // vue loader 插件
const ESLintPlugin = require('eslint-webpack-plugin'); // eslint 插件
const packageJson = require('./package.json'); // package.json
const projectName = packageJson.name; // 项目名称
module.exports = {
// 入口文件
@ -37,26 +37,28 @@ module.exports = {
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
loader: 'babel-loader',
options: {
cacheDirectory: true,
}
}
]
},
},
],
},
// css
{
test: /\.(sa|sc|c)ss$/,
use: [{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
}]
use: [
{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
},
],
},
// 字体文件
@ -65,7 +67,7 @@ module.exports = {
type: 'asset/resource',
generator: {
filename: `fonts/[name].[contenthash:5].[ext]`,
}
},
},
// json5
@ -84,8 +86,8 @@ module.exports = {
use: [
{
loader: 'vue-loader',
}
]
},
],
},
// 解决 @maxgraph/core 的问题, 避免出现以下错误
@ -97,10 +99,10 @@ module.exports = {
// The extension in the request is mandatory for it to be fully specified.
{
test: /\.js$/,
include: /node_modules\/@maxgraph\/core/,
resolve:{
include: /node_modules[\/\\]@maxgraph[\/\\]core/,
resolve: {
fullySpecified: false,
}
},
},
],
},
@ -109,7 +111,7 @@ module.exports = {
plugins: [
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: JSON.stringify(true),
__VUE_PROD_DEVTOOLS__: JSON.stringify(false)
__VUE_PROD_DEVTOOLS__: JSON.stringify(false),
}),
// 进度显示插件
@ -118,7 +120,7 @@ module.exports = {
// css 抽取插件
new MiniCssExtractPlugin({
filename: `css/[name].[contenthash:5].css`,
chunkFilename: `css/[name].[contenthash:5].css`
chunkFilename: `css/[name].[contenthash:5].css`,
}),
// 自动生成静态 index.html 文件
@ -144,8 +146,8 @@ module.exports = {
return true;
},
info: { minimized: true },
}
]
},
],
}),
// vue loader 插件
@ -156,9 +158,7 @@ module.exports = {
fix: true,
formatter: 'stylish',
extensions: ['js', 'ts', 'vue', 'cjs'],
exclude: [
'node_modules',
],
exclude: ['node_modules'],
}),
],
@ -171,9 +171,9 @@ module.exports = {
// 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用
extensions: ['.js', '.cjs', '.ts', '.vue'],
fallback: {
"fs": false,
"os": false,
"path": false,
}
fs: false,
os: false,
path: false,
},
},
};

Loading…
Cancel
Save