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. 44
      io.sc.engine.rule.frontend/webpack.config.common.cjs
  27. 35
      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. 44
      io.sc.platform.core.frontend/template-project/webpack.config.common.cjs
  31. 44
      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", "luckyexcel": "1.0.1",
"mockjs": "1.1.0", "mockjs": "1.1.0",
"pinia": "2.2.2", "pinia": "2.2.2",
"platform-core": "8.1.322", "platform-core": "8.1.323",
"quasar": "2.16.11", "quasar": "2.16.11",
"tailwindcss": "3.4.10", "tailwindcss": "3.4.10",
"vue": "3.4.38", "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-cols-num="3"
:query-form-fields="[ :query-form-fields="[
{ name: 'code', label: $t('code'), type: 'text' }, { name: 'code', label: $t('code'), type: 'w-text' },
{ name: 'name', label: $t('name'), type: 'text' }, { name: 'name', label: $t('name'), type: 'w-text' },
{ name: 'enable', label: $t('isEnable'), type: 'select', options: Options.yesNo() }, { name: 'enable', label: $t('isEnable'), type: 'w-select', options: Options.yesNo() },
]" ]"
:toolbar-configure="{ noIcon: false }" :toolbar-configure="{ noIcon: false }"
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'view', 'separator', 'export']" :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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'name', label: $t('name'), type: 'text', required: true }, { name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'signature', label: $t('re.function.grid.entity.signature'), type: 'text', required: true }, { name: 'signature', label: $t('re.function.grid.entity.signature'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'text' }, { name: 'description', label: $t('description'), type: 'w-text' },
{ {
name: 'mathXml', name: 'mathXml',
label: $t('re.function.grid.entity.mathXml'), label: $t('re.function.grid.entity.mathXml'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 5, rows: 5,
lang: 'xml', lang: 'xml',
toolbar: false, toolbar: false,
@ -103,8 +103,8 @@
<mi>)</mi> <mi>)</mi>
</mrow>`, </mrow>`,
}, },
{ name: 'body', label: $t('re.function.grid.entity.body'), type: 'code-mirror', rows: 10, lang: 'java', toolbar: false }, { 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: 'checkbox', defaultValue: true }, { 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-cols-num="6"
:query-form-fields="[ :query-form-fields="[
{ colSpan: 2, name: 'code', label: $t('code'), type: 'text', clearable: true }, { colSpan: 2, name: 'code', label: $t('code'), type: 'w-text', clearable: true },
{ colSpan: 3, name: 'name', label: $t('name'), type: 'text', clearable: true }, { colSpan: 3, name: 'name', label: $t('name'), type: 'w-text', clearable: true },
]" ]"
:columns="[ :columns="[
{ width: 60, name: 'order', label: $t('order'), align: 'right' }, { width: 60, name: 'order', label: $t('order'), align: 'right' },
@ -135,13 +135,13 @@
form: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'lib', label: $t('lib'), type: 'text', defaultValue: lib.id, hidden: true }, { name: 'lib', label: $t('lib'), type: 'w-text', defaultValue: lib.id, hidden: true },
{ name: 'name', label: $t('name'), type: 'text' }, { name: 'name', label: $t('name'), type: 'w-text' },
{ name: 'type', label: $t('type'), type: 'select', options: Options.enum(Enums.IndicatorType) }, { name: 'type', label: $t('type'), type: 'w-select', options: Options.enum(Enums.IndicatorType) },
{ {
name: 'valueType', name: 'valueType',
label: $t('re.resources.designer.parameter.grid.entity.valueType'), label: $t('re.resources.designer.parameter.grid.entity.valueType'),
type: 'select', type: 'w-select',
options: ValueTypeList, options: ValueTypeList,
'onUpdate:modelValue': (value) => { 'onUpdate:modelValue': (value) => {
axios.get(Environment.apiContextPath('/api/re/dictionary/getVersionsByCode?code=' + value)).then((response) => { axios.get(Environment.apiContextPath('/api/re/dictionary/getVersionsByCode?code=' + value)).then((response) => {
@ -157,7 +157,7 @@
{ {
name: 'valueTypeVersion', name: 'valueTypeVersion',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeVersion'), label: $t('re.resources.designer.parameter.grid.entity.valueTypeVersion'),
type: 'select', type: 'w-select',
options: valueTypeVersionRef, options: valueTypeVersionRef,
showIf: (arg) => { showIf: (arg) => {
const valueType = arg.form.getFieldValue('valueType'); const valueType = arg.form.getFieldValue('valueType');
@ -189,7 +189,7 @@
{ {
name: 'valueScale', name: 'valueScale',
label: $t('re.resources.designer.parameter.grid.entity.valueScale'), label: $t('re.resources.designer.parameter.grid.entity.valueScale'),
type: 'number', type: 'w-number',
defaultValue: 6, defaultValue: 6,
showIf: (arg) => { showIf: (arg) => {
const valueType = arg.form.getFieldValue('valueType'); const valueType = arg.form.getFieldValue('valueType');
@ -203,7 +203,7 @@
{ {
name: 'valueRoundingMode', name: 'valueRoundingMode',
label: $t('re.resources.designer.parameter.grid.entity.valueRoundingMode'), label: $t('re.resources.designer.parameter.grid.entity.valueRoundingMode'),
type: 'select', type: 'w-select',
options: Options.enum(Enums.RoundingMode), options: Options.enum(Enums.RoundingMode),
defaultValue: 'HALF_UP', defaultValue: 'HALF_UP',
showIf: (arg) => { showIf: (arg) => {
@ -218,16 +218,16 @@
{ {
name: 'valueTypeIsList', name: 'valueTypeIsList',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeIsList'), label: $t('re.resources.designer.parameter.grid.entity.valueTypeIsList'),
type: 'checkbox', type: 'w-checkbox',
defaultValue: false, defaultValue: false,
}, },
{ {
name: 'defaultValue', name: 'defaultValue',
label: $t('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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'parent', label: $t('parent'), type: 'text', hidden: true }, { name: 'parent', label: $t('parent'), type: 'w-text', hidden: true },
{ name: 'type', label: $t('type'), type: 'text', hidden: true }, { name: 'type', label: $t('type'), type: 'w-text', hidden: true },
{ {
name: 'code', name: 'code',
label: $t('code'), label: $t('code'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
return type !== 'FOLDER'; return type !== 'FOLDER';
}, },
}, },
{ name: 'name', label: $t('name'), type: 'text', required: true }, { name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'text' }, { name: 'description', label: $t('description'), type: 'w-text' },
], ],
}, },
}" }"

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

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

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

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

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

@ -87,16 +87,16 @@
form: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'testCase', label: $t('testCase'), type: 'text', defaultValue: testCase.id, hidden: true }, { name: 'testCase', label: $t('testCase'), type: 'w-text', defaultValue: testCase.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, { name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'source', label: $t('source'), type: 'text', hidden: true }, { name: 'source', label: $t('source'), type: 'w-text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'text', hidden: true }, { name: 'parameterType', label: $t('parameterType'), type: 'w-text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'text', hidden: true }, { name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'w-text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'text', hidden: true }, { name: 'indicatorType', label: $t('indicatorType'), type: 'w-text', hidden: true },
{ {
name: 'inputValue', name: 'inputValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
showIf: (arg) => { showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType'); const parameterType = arg.form.getFieldValue('parameterType');
@ -115,7 +115,7 @@
{ {
name: 'expectValue', name: 'expectValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
showIf: (arg) => { showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType'); const parameterType = arg.form.getFieldValue('parameterType');
@ -135,11 +135,11 @@
{ {
name: 'resultValue', name: 'resultValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
lang: 'json', 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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'indicator', label: 'indicator', type: 'text', defaultValue: indicator.id, hidden: true }, { name: 'indicator', label: 'indicator', type: 'w-text', defaultValue: indicator.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, { name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ {
name: 'description', name: 'description',
label: $t('description'), label: $t('description'),
type: 'text', type: 'w-text',
}, },
{ {
name: 'type', name: 'type',
label: $t('type'), label: $t('type'),
type: 'select', type: 'w-select',
required: true, required: true,
options: options:
ValueTypeAndValidatorTypeMapping[ValueTypeAndValidatorTypeMapping[indicator.valueType] == null ? 'java.lang.Object' : indicator.valueType], ValueTypeAndValidatorTypeMapping[ValueTypeAndValidatorTypeMapping[indicator.valueType] == null ? 'java.lang.Object' : indicator.valueType],
@ -61,7 +61,7 @@
{ {
name: 'minValue', name: 'minValue',
label: $t('minValue'), label: $t('minValue'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -73,7 +73,7 @@
{ {
name: 'minInclude', name: 'minInclude',
label: $t('isMinValueInclude'), label: $t('isMinValueInclude'),
type: 'checkbox', type: 'w-checkbox',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -85,7 +85,7 @@
{ {
name: 'maxValue', name: 'maxValue',
label: $t('maxValue'), label: $t('maxValue'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -97,7 +97,7 @@
{ {
name: 'maxInclude', name: 'maxInclude',
label: $t('isMaxValueInclude'), label: $t('isMaxValueInclude'),
type: 'checkbox', type: 'w-checkbox',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -109,7 +109,7 @@
{ {
name: 'pattern', name: 'pattern',
label: $t('RegExp'), label: $t('RegExp'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'PATTERN') { if (type == 'PATTERN') {
@ -121,9 +121,9 @@
{ {
name: 'tip', name: 'tip',
label: $t('re.resources.designer.validator.grid.entity.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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'type', label: $t('type'), type: 'text', hidden: true }, { name: 'type', label: $t('type'), type: 'w-text', hidden: true },
{ {
name: 'code', name: 'code',
label: $t('code'), label: $t('code'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
return type === 'MODEL' || type === 'SCORE_CARD'; return type === 'MODEL' || type === 'SCORE_CARD';
}, },
}, },
{ name: 'name', label: $t('name'), type: 'text', required: true }, { name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'text' }, { name: 'description', label: $t('description'), type: 'w-text' },
{ {
name: 'imports', name: 'imports',
label: $t('re.resources.grid.entity.imports'), label: $t('re.resources.grid.entity.imports'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
lineWrap: true, lineWrap: true,
lineBreak: false, lineBreak: false,
@ -346,9 +346,8 @@
}" }"
@row-db-click=" @row-db-click="
(args) => { (args) => {
console.log(args); if (args.row.type !== 'FOLDER') {
if (row.type !== 'FOLDER') { designerDialogRef.open(args.row);
designerDialogRef.open(row);
} }
} }
" "

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

@ -18,7 +18,7 @@
<w-form <w-form
ref="formRef" ref="formRef"
:cols-num="1" :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" class="p-2"
></w-form> ></w-form>
<w-select-assignee-dialog ref="selectAssigneeDialogRef" @assignee-selected="assigneeSelected"></w-select-assignee-dialog> <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 <Model
:resource="currentSelectedResourceRef" :resource="currentSelectedResourceRef"
@row-click=" @row-click="
(evt, row, index) => { (args) => {
currentSelectedModelRef = row; currentSelectedModelRef = args.row;
if (row.parent) { if (args.row.parent) {
statusReactive.parameterAndTestcaseTab = 'parameter'; statusReactive.parameterAndTestcaseTab = 'parameter';
statusReactive.isShowParameter = true; statusReactive.isShowParameter = true;
statusReactive.isShowTestCase = false; statusReactive.isShowTestCase = false;

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

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

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

@ -134,24 +134,24 @@
form: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'code', label: $t('code'), type: 'text' }, { name: 'code', label: $t('code'), type: 'w-text' },
{ name: 'name', label: $t('name'), type: 'text', required: true }, { name: 'name', label: $t('name'), type: 'w-text', required: true },
{ {
name: 'category', name: 'category',
label: $t('category'), label: $t('category'),
type: 'select', type: 'w-select',
options: Options.enum(Enums.ModelCategory), options: Options.enum(Enums.ModelCategory),
defaultValue: 'OTHER', defaultValue: 'OTHER',
}, },
{ {
name: 'executeMode', name: 'executeMode',
label: $t('re.resources.designer.model.grid.entity.executeMode'), label: $t('re.resources.designer.model.grid.entity.executeMode'),
type: 'select', type: 'w-select',
options: Options.enum(Enums.ExecuteMode), options: Options.enum(Enums.ExecuteMode),
defaultValue: 'DOWN_TOP', defaultValue: 'DOWN_TOP',
}, },
{ name: 'description', label: $t('description'), type: 'text' }, { name: 'description', label: $t('description'), type: 'w-text' },
{ name: 'enable', label: $t('isEnable'), type: 'checkbox', defaultValue: true }, { 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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'parameter', label: 'parameter', type: 'text', defaultValue: parameter.id, hidden: true }, { name: 'parameter', label: 'parameter', type: 'w-text', defaultValue: parameter.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, { name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ {
name: 'inputValue', name: 'inputValue',
label: $t('re.resources.designer.option.grid.entity.inputValue'), label: $t('re.resources.designer.option.grid.entity.inputValue'),
type: 'text', type: 'w-text',
}, },
{ {
name: 'value', name: 'value',
label: $t('re.resources.designer.option.grid.entity.value'), label: $t('re.resources.designer.option.grid.entity.value'),
type: 'text', type: 'w-text',
}, },
{ {
name: 'title', name: 'title',
label: $t('re.resources.designer.option.grid.entity.title'), label: $t('re.resources.designer.option.grid.entity.title'),
type: 'text', type: 'w-text',
}, },
{ {
name: 'description', name: 'description',
label: $t('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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'type', label: $t('type'), type: 'select', options: Options.enum(Enums.ParameterType), 'onUpdate:modelValue': (value) => {} }, { name: 'type', label: $t('type'), type: 'w-select', options: Options.enum(Enums.ParameterType), 'onUpdate:modelValue': (value) => {} },
{ name: 'model', label: $t('modelId'), type: 'text', defaultValue: model.id, hidden: true }, { name: 'model', label: $t('modelId'), type: 'w-text', defaultValue: model.id, hidden: true },
{ name: 'code', label: $t('code'), type: 'text' }, { name: 'code', label: $t('code'), type: 'w-text' },
{ name: 'name', label: $t('name'), type: 'text', required: true }, { name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'text' }, { name: 'description', label: $t('description'), type: 'w-text' },
{ {
name: 'libCode', name: 'libCode',
label: $t('re.resources.designer.parameter.grid.entity.libCode'), label: $t('re.resources.designer.parameter.grid.entity.libCode'),
type: 'select', type: 'w-select',
options: libCodeOptionsRef, options: libCodeOptionsRef,
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
@ -228,7 +228,7 @@
{ {
name: 'libVersion', name: 'libVersion',
label: $t('re.resources.designer.parameter.grid.entity.libVersion'), label: $t('re.resources.designer.parameter.grid.entity.libVersion'),
type: 'select', type: 'w-select',
options: libVersionOptionsRef, options: libVersionOptionsRef,
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
@ -242,7 +242,7 @@
{ {
name: 'indicatorCode', name: 'indicatorCode',
label: $t('re.resources.designer.parameter.grid.entity.indicatorCode'), label: $t('re.resources.designer.parameter.grid.entity.indicatorCode'),
type: 'select', type: 'w-select',
options: indicatorCodeOptionsRef, options: indicatorCodeOptionsRef,
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
@ -252,7 +252,7 @@
{ {
name: 'valueType', name: 'valueType',
label: $t('re.resources.designer.parameter.grid.entity.valueType'), label: $t('re.resources.designer.parameter.grid.entity.valueType'),
type: 'select', type: 'w-select',
options: ValueTypeList, options: ValueTypeList,
defaultValue: 'java.math.BigDecimal', defaultValue: 'java.math.BigDecimal',
showIf: (arg) => { showIf: (arg) => {
@ -277,7 +277,7 @@
{ {
name: 'valueTypeVersion', name: 'valueTypeVersion',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeVersion'), label: $t('re.resources.designer.parameter.grid.entity.valueTypeVersion'),
type: 'select', type: 'w-select',
clearable: true, clearable: true,
options: valueTypeVersionOptionsRef, options: valueTypeVersionOptionsRef,
showIf: (arg) => { showIf: (arg) => {
@ -314,7 +314,7 @@
{ {
name: 'valueScale', name: 'valueScale',
label: $t('re.resources.designer.parameter.grid.entity.valueScale'), label: $t('re.resources.designer.parameter.grid.entity.valueScale'),
type: 'number', type: 'w-number',
defaultValue: 6, defaultValue: 6,
showIf: (arg) => { showIf: (arg) => {
const valueType = arg.form.getFieldValue('valueType'); const valueType = arg.form.getFieldValue('valueType');
@ -334,7 +334,7 @@
{ {
name: 'valueRoundingMode', name: 'valueRoundingMode',
label: $t('re.resources.designer.parameter.grid.entity.valueRoundingMode'), label: $t('re.resources.designer.parameter.grid.entity.valueRoundingMode'),
type: 'select', type: 'w-select',
options: Options.enum(Enums.RoundingMode), options: Options.enum(Enums.RoundingMode),
defaultValue: 'HALF_UP', defaultValue: 'HALF_UP',
showIf: (arg) => { showIf: (arg) => {
@ -355,7 +355,7 @@
{ {
name: 'valueTypeIsList', name: 'valueTypeIsList',
label: $t('re.resources.designer.parameter.grid.entity.valueTypeIsList'), label: $t('re.resources.designer.parameter.grid.entity.valueTypeIsList'),
type: 'checkbox', type: 'w-checkbox',
defaultValue: false, defaultValue: false,
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
@ -368,7 +368,7 @@
{ {
name: 'defaultValue', name: 'defaultValue',
label: $t('defaultValue'), label: $t('defaultValue'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
const valueTypeIsList = arg.form.getFieldValue('valueTypeIsList'); 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=" @row-click="
(evt, row, index) => { (args) => {
emit('rowClick', evt, row, index); emit('rowClick', args);
} }
" "
@before-request-data=" @before-request-data="
@ -482,7 +482,7 @@ const props = defineProps({
}); });
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'rowClick', evt: Event, row: any, index: number): void; (e: 'rowClick', args): void;
(e: 'beforeRequestData', requestParams: URLSearchParams | any, callback: any): 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: { form: {
colsNum: 5, colsNum: 5,
fields: [ fields: [
{ colSpan: 5, name: 'parameter', label: 'parameter', type: 'text', defaultValue: parameter.id, hidden: true }, { colSpan: 5, name: 'parameter', label: 'parameter', type: 'w-text', defaultValue: parameter.id, hidden: true },
{ colSpan: 5, name: 'id', label: $t('id'), type: 'text', hidden: true }, { colSpan: 5, name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ colSpan: 5, name: 'order', label: $t('order'), type: 'number', hidden: true }, { colSpan: 5, name: 'order', label: $t('order'), type: 'w-number', hidden: true },
{ colSpan: 5, name: 'type', label: $t('type'), type: 'text', hidden: true }, { colSpan: 5, name: 'type', label: $t('type'), type: 'w-text', hidden: true },
{ colSpan: 5, name: 'description', label: $t('description'), type: 'text', hidden: true }, { colSpan: 5, name: 'description', label: $t('description'), type: 'w-text', hidden: true },
{ colSpan: 5, name: 'enable', label: $t('enable'), type: 'checkbox', defaultValue: true, hidden: true }, { colSpan: 5, name: 'enable', label: $t('enable'), type: 'w-checkbox', defaultValue: true, hidden: true },
{ {
colSpan: 5, colSpan: 5,
name: 'objectCondition', name: 'objectCondition',
label: $t('re.resources.designer.processor.grid.entity.objectCondition'), label: $t('re.resources.designer.processor.grid.entity.objectCondition'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 3, rows: 3,
lineWrap: true, lineWrap: true,
@ -563,7 +563,7 @@
{ {
name: 'expression', name: 'expression',
label: $t('expression'), label: $t('expression'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 3, rows: 3,
lineWrap: true, lineWrap: true,
@ -587,7 +587,7 @@
colSpan: 5, colSpan: 5,
name: 'optionCode', name: 'optionCode',
label: $t('re.resources.designer.processor.grid.entity.optionCode'), label: $t('re.resources.designer.processor.grid.entity.optionCode'),
type: 'select', type: 'w-select',
options: optionOptionsRef, options: optionOptionsRef,
showIf: (arg) => { showIf: (arg) => {
return 'OPTION_VALUE' === arg.form.getFieldValue('type'); return 'OPTION_VALUE' === arg.form.getFieldValue('type');
@ -597,7 +597,7 @@
colSpan: 5, colSpan: 5,
name: 'mathFormula', name: 'mathFormula',
label: $t('re.resources.designer.processor.grid.entity.mathFormula'), label: $t('re.resources.designer.processor.grid.entity.mathFormula'),
type: 'math', type: 'w-math',
autoCompletion: autoCompletion, autoCompletion: autoCompletion,
userDefinedFunctions: userDefinedFunctionsRef, userDefinedFunctions: userDefinedFunctionsRef,
showIf: (arg) => { showIf: (arg) => {
@ -608,7 +608,7 @@
colSpan: 5, colSpan: 5,
name: 'arithmetic', name: 'arithmetic',
label: $t('re.resources.designer.processor.grid.entity.arithmetic'), label: $t('re.resources.designer.processor.grid.entity.arithmetic'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 5, rows: 5,
placeholder: true, placeholder: true,
@ -624,7 +624,7 @@
colSpan: 5, colSpan: 5,
name: 'ternaryCondition', name: 'ternaryCondition',
label: $t('re.resources.designer.processor.grid.entity.ternaryCondition'), label: $t('re.resources.designer.processor.grid.entity.ternaryCondition'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 4, rows: 4,
placeholder: true, placeholder: true,
@ -640,7 +640,7 @@
colSpan: 5, colSpan: 5,
name: 'ternaryTrue', name: 'ternaryTrue',
label: $t('re.resources.designer.processor.grid.entity.ternaryTrue'), label: $t('re.resources.designer.processor.grid.entity.ternaryTrue'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 4, rows: 4,
placeholder: true, placeholder: true,
@ -656,7 +656,7 @@
colSpan: 5, colSpan: 5,
name: 'ternaryFalse', name: 'ternaryFalse',
label: $t('re.resources.designer.processor.grid.entity.ternaryFalse'), label: $t('re.resources.designer.processor.grid.entity.ternaryFalse'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 4, rows: 4,
placeholder: true, placeholder: true,
@ -672,7 +672,7 @@
colSpan: 5, colSpan: 5,
name: 'when', name: 'when',
label: $t('re.resources.designer.processor.grid.entity.when'), label: $t('re.resources.designer.processor.grid.entity.when'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 4, rows: 4,
lineWrap: true, lineWrap: true,
@ -688,7 +688,7 @@
colSpan: 5, colSpan: 5,
name: 'then', name: 'then',
label: $t('re.resources.designer.processor.grid.entity.then'), label: $t('re.resources.designer.processor.grid.entity.then'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 4, rows: 4,
lineWrap: true, lineWrap: true,
@ -704,7 +704,7 @@
colSpan: 5, colSpan: 5,
name: 'isWhenThenShorted', name: 'isWhenThenShorted',
label: $t('re.resources.designer.processor.grid.entity.isWhenThenShorted'), label: $t('re.resources.designer.processor.grid.entity.isWhenThenShorted'),
type: 'checkbox', type: 'w-checkbox',
showIf: (arg) => { showIf: (arg) => {
return 'WHEN_THEN' === arg.form.getFieldValue('type'); return 'WHEN_THEN' === arg.form.getFieldValue('type');
}, },
@ -716,7 +716,7 @@
showIf: (arg) => { showIf: (arg) => {
return 'NUMBER_RANGE' === arg.form.getFieldValue('type'); return 'NUMBER_RANGE' === arg.form.getFieldValue('type');
}, },
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 3, rows: 3,
lineWrap: true, lineWrap: true,
@ -814,11 +814,11 @@
colsNum: 4, colsNum: 4,
fields: [ fields: [
{ name: 'uuid', label: 'uuid', hidden: true, colSpan: 4 }, { name: 'uuid', label: 'uuid', hidden: true, colSpan: 4 },
{ name: 'min', label: $t('minValue'), type: 'text', colSpan: 3 }, { name: 'min', label: $t('minValue'), type: 'w-text', colSpan: 3 },
{ name: 'minIncluded', label: $t('include'), type: 'checkbox' }, { name: 'minIncluded', label: $t('include'), type: 'w-checkbox' },
{ name: 'max', label: $t('maxValue'), type: 'text', colSpan: 3 }, { name: 'max', label: $t('maxValue'), type: 'w-text', colSpan: 3 },
{ name: 'maxIncluded', label: $t('include'), type: 'checkbox' }, { name: 'maxIncluded', label: $t('include'), type: 'w-checkbox' },
{ name: 'value', label: $t('value'), type: 'number', colSpan: 3 }, { name: 'value', label: $t('value'), type: 'w-number', colSpan: 3 },
], ],
}, },
}, },
@ -912,7 +912,7 @@
{ {
name: 'condition', name: 'condition',
label: $t('condition'), label: $t('condition'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 4, rows: 4,
placeholder: true, placeholder: true,
@ -924,7 +924,7 @@
{ {
name: 'value', name: 'value',
label: $t('value'), label: $t('value'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 4, rows: 4,
lineWrap: true, lineWrap: true,
@ -953,7 +953,7 @@
colSpan: 5, colSpan: 5,
name: 'decisionTable2C', name: 'decisionTable2C',
label: $t('re.resources.designer.processor.grid.entity.decisionTable2C'), label: $t('re.resources.designer.processor.grid.entity.decisionTable2C'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 1, rows: 1,
showIf: (arg) => { showIf: (arg) => {
return 'DECISION_TABLE_2C' === arg.form.getFieldValue('type'); return 'DECISION_TABLE_2C' === arg.form.getFieldValue('type');
@ -963,7 +963,7 @@
colSpan: 5, colSpan: 5,
name: 'decisionTable', name: 'decisionTable',
label: $t('re.resources.designer.processor.grid.entity.decisionTable'), label: $t('re.resources.designer.processor.grid.entity.decisionTable'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 1, rows: 1,
showIf: (arg) => { showIf: (arg) => {
return 'DECISION_TABLE' === arg.form.getFieldValue('type'); return 'DECISION_TABLE' === arg.form.getFieldValue('type');
@ -973,7 +973,7 @@
colSpan: 5, colSpan: 5,
name: 'decisionTree', name: 'decisionTree',
label: $t('re.resources.designer.processor.grid.entity.decisionTree'), label: $t('re.resources.designer.processor.grid.entity.decisionTree'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 20, rows: 20,
lineNumber: true, lineNumber: true,
toolbar: false, toolbar: false,
@ -985,7 +985,7 @@
colSpan: 5, colSpan: 5,
name: 'executionFlow', name: 'executionFlow',
label: $t('re.resources.designer.processor.grid.entity.executionFlow'), label: $t('re.resources.designer.processor.grid.entity.executionFlow'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 20, rows: 20,
lineNumber: true, lineNumber: true,
toolbar: false, toolbar: false,
@ -997,7 +997,7 @@
colSpan: 5, colSpan: 5,
name: 'pmml', name: 'pmml',
label: $t('re.resources.designer.processor.grid.entity.pmml'), label: $t('re.resources.designer.processor.grid.entity.pmml'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 20, rows: 20,
lineNumber: true, lineNumber: true,
toolbar: false, toolbar: false,
@ -1010,7 +1010,7 @@
colSpan: 5, colSpan: 5,
name: 'groovyScript', name: 'groovyScript',
label: $t('re.resources.designer.processor.grid.entity.groovyScript'), label: $t('re.resources.designer.processor.grid.entity.groovyScript'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 20, rows: 20,
lineNumber: true, lineNumber: true,
lang: 'java', lang: 'java',
@ -1027,7 +1027,7 @@
colSpan: 5, colSpan: 5,
name: 'sqlDatasourceName', name: 'sqlDatasourceName',
label: $t('re.resources.designer.processor.grid.entity.sqlDatasourceName'), label: $t('re.resources.designer.processor.grid.entity.sqlDatasourceName'),
type: 'select', type: 'w-select',
clearable: true, clearable: true,
options: dsOptionsRef, options: dsOptionsRef,
rows: 1, rows: 1,
@ -1039,7 +1039,7 @@
colSpan: 3, colSpan: 3,
name: 'sql', name: 'sql',
label: $t('re.resources.designer.processor.grid.entity.sql'), label: $t('re.resources.designer.processor.grid.entity.sql'),
type: 'code-mirror', type: 'w-code-mirror',
height: 180, height: 180,
lang: 'sql', lang: 'sql',
toolbar: false, toolbar: false,
@ -1136,7 +1136,7 @@
{ {
name: 'name', name: 'name',
label: $t('name'), label: $t('name'),
type: 'code-mirror', type: 'w-code-mirror',
lang: 'java', lang: 'java',
rows: 1, rows: 1,
placeholder: true, placeholder: true,
@ -1145,7 +1145,7 @@
{ {
name: 'value', name: 'value',
label: $t('value'), label: $t('value'),
type: 'text', type: 'w-text',
}, },
], ],
}, },
@ -1282,13 +1282,13 @@
{ {
name: 'field', name: 'field',
label: $t('fieldName'), label: $t('fieldName'),
type: 'select', type: 'w-select',
options: sqlQueryResultFieldsRef, options: sqlQueryResultFieldsRef,
}, },
{ {
name: 'parameter', name: 'parameter',
label: $t('parameterName'), label: $t('parameterName'),
type: 'select', type: 'w-select',
options: parameterOptionsRef, options: parameterOptionsRef,
}, },
], ],
@ -1419,7 +1419,8 @@
} }
" "
@after-editor-open=" @after-editor-open="
(row) => { (args) => {
const row = args.data;
// //
axios.get(Environment.apiContextPath('/api/re/common/listParameterAndValueTypeByParameterId/' + parameter.id)).then((response) => { axios.get(Environment.apiContextPath('/api/re/common/listParameterAndValueTypeByParameterId/' + parameter.id)).then((response) => {
autoCompletionManager.setParameters(response.data.parameters); autoCompletionManager.setParameters(response.data.parameters);
@ -1498,14 +1499,14 @@
} }
" "
@row-db-click=" @row-db-click="
(e, row) => { (args) => {
const type = row.type; const type = args.row.type;
if ('DECISION_TREE' === type) { if ('DECISION_TREE' === type) {
decisionTreeDialogRef.open(row.id); decisionTreeDialogRef.open(args.row.id);
} else if ('EXECUTION_FLOW' === type) { } else if ('EXECUTION_FLOW' === type) {
executionFlowDialogRef.open(row.id); executionFlowDialogRef.open(args.row.id);
} else { } else {
gridRef.edit(row); gridRef.edit(args.row);
} }
} }
" "
@ -1540,11 +1541,6 @@ const props = defineProps({
readOnly: { type: Boolean, default: false }, 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 gridRef = ref();
const optionOptionsRef = ref([]); const optionOptionsRef = ref([]);
const dsOptionsRef = ref([]); const dsOptionsRef = ref([]);

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

@ -83,16 +83,16 @@
form: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'testCase', label: $t('testCase'), type: 'text', defaultValue: testCase.id, hidden: true }, { name: 'testCase', label: $t('testCase'), type: 'w-text', defaultValue: testCase.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, { name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'source', label: $t('source'), type: 'text', hidden: true }, { name: 'source', label: $t('source'), type: 'w-text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'text', hidden: true }, { name: 'parameterType', label: $t('parameterType'), type: 'w-text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'text', hidden: true }, { name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'w-text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'text', hidden: true }, { name: 'indicatorType', label: $t('indicatorType'), type: 'w-text', hidden: true },
{ {
name: 'inputValue', name: 'inputValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
showIf: (arg) => { showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType'); const parameterType = arg.form.getFieldValue('parameterType');
@ -111,7 +111,7 @@
{ {
name: 'expectValue', name: 'expectValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
showIf: (arg) => { showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType'); const parameterType = arg.form.getFieldValue('parameterType');
@ -131,11 +131,11 @@
{ {
name: 'resultValue', name: 'resultValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
lang: 'json', 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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'parameter', label: 'parameter', type: 'text', defaultValue: parameter.id, hidden: true }, { name: 'parameter', label: 'parameter', type: 'w-text', defaultValue: parameter.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, { name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ {
name: 'description', name: 'description',
label: $t('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', name: 'minValue',
label: $t('minValue'), label: $t('minValue'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -93,7 +93,7 @@
{ {
name: 'minInclude', name: 'minInclude',
label: $t('isMinValueInclude'), label: $t('isMinValueInclude'),
type: 'checkbox', type: 'w-checkbox',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -105,7 +105,7 @@
{ {
name: 'maxValue', name: 'maxValue',
label: $t('maxValue'), label: $t('maxValue'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -117,7 +117,7 @@
{ {
name: 'maxInclude', name: 'maxInclude',
label: $t('isMaxValueInclude'), label: $t('isMaxValueInclude'),
type: 'checkbox', type: 'w-checkbox',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') { if (type == 'INTEGER_RANGE' || type == 'DECIMAL_RANGE' || type == 'LENGTH_RANGE' || type == 'DATE_RANGE') {
@ -129,7 +129,7 @@
{ {
name: 'pattern', name: 'pattern',
label: $t('RegExp'), label: $t('RegExp'),
type: 'text', type: 'w-text',
showIf: (arg) => { showIf: (arg) => {
const type = arg.form.getFieldValue('type'); const type = arg.form.getFieldValue('type');
if (type == 'PATTERN') { if (type == 'PATTERN') {
@ -141,9 +141,9 @@
{ {
name: 'tip', name: 'tip',
label: $t('re.resources.designer.validator.grid.entity.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']" :toolbar-actions="['query', 'refresh', 'separator', 'view']"
:query-form-cols-num="2" :query-form-cols-num="2"
:query-form-fields="[ :query-form-fields="[
{ name: 'code', label: $t('code'), type: 'text', clearable: true }, { name: 'code', label: $t('code'), type: 'w-text', clearable: true },
{ name: 'name', label: $t('name'), type: 'text', clearable: true }, { name: 'name', label: $t('name'), type: 'w-text', clearable: true },
]" ]"
:columns="[ :columns="[
{ width: 60, name: 'order', label: $t('order'), align: 'right' }, { 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: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'order', label: $t('order'), type: 'text', hidden: true }, { name: 'order', label: $t('order'), type: 'w-text', hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, { name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'name', label: $t('name'), type: 'text', required: true }, { name: 'name', label: $t('name'), type: 'w-text', required: true },
{ name: 'description', label: $t('description'), type: 'text' }, { name: 'description', label: $t('description'), type: 'w-text' },
], ],
}, },
}" }"
@ -228,16 +228,16 @@
form: { form: {
colsNum: 1, colsNum: 1,
fields: [ fields: [
{ name: 'testCase', label: $t('testCase'), type: 'text', defaultValue: currentSelectedTestCaseRef.id, hidden: true }, { name: 'testCase', label: $t('testCase'), type: 'w-text', defaultValue: currentSelectedTestCaseRef.id, hidden: true },
{ name: 'id', label: $t('id'), type: 'text', hidden: true }, { name: 'id', label: $t('id'), type: 'w-text', hidden: true },
{ name: 'source', label: $t('source'), type: 'text', hidden: true }, { name: 'source', label: $t('source'), type: 'w-text', hidden: true },
{ name: 'parameterType', label: $t('parameterType'), type: 'text', hidden: true }, { name: 'parameterType', label: $t('parameterType'), type: 'w-text', hidden: true },
{ name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'text', hidden: true }, { name: 'scoreCardVarType', label: $t('scoreCardVarType'), type: 'w-text', hidden: true },
{ name: 'indicatorType', label: $t('indicatorType'), type: 'text', hidden: true }, { name: 'indicatorType', label: $t('indicatorType'), type: 'w-text', hidden: true },
{ {
name: 'inputValue', name: 'inputValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.inputValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
showIf: (arg) => { showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType'); const parameterType = arg.form.getFieldValue('parameterType');
@ -257,7 +257,7 @@
{ {
name: 'expectValue', name: 'expectValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.expectValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
showIf: (arg) => { showIf: (arg) => {
const parameterType = arg.form.getFieldValue('parameterType'); const parameterType = arg.form.getFieldValue('parameterType');
@ -280,11 +280,11 @@
{ {
name: 'resultValue', name: 'resultValue',
label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'), label: $t('re.resources.designer.testCaseParameter.grid.entity.resultValue'),
type: 'code-mirror', type: 'w-code-mirror',
rows: 4, rows: 4,
lang: 'json', 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 <w-form
v-model="formModelValue" v-model="formModelValue"
:cols-num="1" :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-form>
</w-dialog> </w-dialog>

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

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

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

@ -37,18 +37,19 @@ module.exports = {
exclude: /node_modules/, exclude: /node_modules/,
use: [ use: [
{ {
loader: "babel-loader", loader: 'babel-loader',
options: { options: {
cacheDirectory: true, cacheDirectory: true,
} },
} },
] ],
}, },
// css // css
{ {
test: /\.(sa|sc|c)ss$/, test: /\.(sa|sc|c)ss$/,
use: [{ use: [
{
loader: MiniCssExtractPlugin.loader, loader: MiniCssExtractPlugin.loader,
}, },
{ {
@ -56,7 +57,8 @@ module.exports = {
}, },
{ {
loader: 'postcss-loader', loader: 'postcss-loader',
}] },
],
}, },
// 字体文件 // 字体文件
@ -65,7 +67,7 @@ module.exports = {
type: 'asset/resource', type: 'asset/resource',
generator: { generator: {
filename: `fonts/[name].[contenthash:5].[ext]`, filename: `fonts/[name].[contenthash:5].[ext]`,
} },
}, },
// json5 // json5
@ -84,8 +86,8 @@ module.exports = {
use: [ use: [
{ {
loader: 'vue-loader', loader: 'vue-loader',
} },
] ],
}, },
// 解决 @maxgraph/core 的问题, 避免出现以下错误 // 解决 @maxgraph/core 的问题, 避免出现以下错误
@ -97,10 +99,10 @@ module.exports = {
// The extension in the request is mandatory for it to be fully specified. // The extension in the request is mandatory for it to be fully specified.
{ {
test: /\.js$/, test: /\.js$/,
include: /node_modules\/@maxgraph\/core/, include: /node_modules[\/\\]@maxgraph[\/\\]core/,
resolve: { resolve: {
fullySpecified: false, fullySpecified: false,
} },
}, },
], ],
}, },
@ -109,7 +111,7 @@ module.exports = {
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
__VUE_OPTIONS_API__: JSON.stringify(true), __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 抽取插件 // css 抽取插件
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: `css/[name].[contenthash:5].css`, filename: `css/[name].[contenthash:5].css`,
chunkFilename: `css/[name].[contenthash:5].css` chunkFilename: `css/[name].[contenthash:5].css`,
}), }),
// 自动生成静态 index.html 文件 // 自动生成静态 index.html 文件
@ -144,8 +146,8 @@ module.exports = {
return true; return true;
}, },
info: { minimized: true }, info: { minimized: true },
} },
] ],
}), }),
// vue loader 插件 // vue loader 插件
@ -156,9 +158,7 @@ module.exports = {
fix: true, fix: true,
formatter: 'stylish', formatter: 'stylish',
extensions: ['js', 'ts', 'vue', 'cjs'], extensions: ['js', 'ts', 'vue', 'cjs'],
exclude: [ exclude: ['node_modules'],
'node_modules',
],
}), }),
], ],
@ -171,9 +171,9 @@ module.exports = {
// 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用 // 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用
extensions: ['.js', '.cjs', '.ts', '.vue'], extensions: ['.js', '.cjs', '.ts', '.vue'],
fallback: { fallback: {
"fs": false, fs: false,
"os": false, os: false,
"path": false, path: false,
} },
}, },
}; };

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

@ -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;
} }
/** /**
@ -106,8 +132,8 @@ function isFileExisted(file) {
resolve(true); resolve(true);
} }
}); });
}) });
}; }
module.exports = { module.exports = {
mkdir, mkdir,
@ -115,7 +141,8 @@ module.exports = {
cp, cp,
parseJson, parseJson,
replaceAll, replaceAll,
sortObject,
mergeObject, mergeObject,
mergeJsonFile, mergeJsonFile,
isFileExisted isFileExisted,
}; };

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

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

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

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

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

@ -37,18 +37,19 @@ module.exports = {
exclude: /node_modules/, exclude: /node_modules/,
use: [ use: [
{ {
loader: "babel-loader", loader: 'babel-loader',
options: { options: {
cacheDirectory: true, cacheDirectory: true,
} },
} },
] ],
}, },
// css // css
{ {
test: /\.(sa|sc|c)ss$/, test: /\.(sa|sc|c)ss$/,
use: [{ use: [
{
loader: MiniCssExtractPlugin.loader, loader: MiniCssExtractPlugin.loader,
}, },
{ {
@ -56,7 +57,8 @@ module.exports = {
}, },
{ {
loader: 'postcss-loader', loader: 'postcss-loader',
}] },
],
}, },
// 字体文件 // 字体文件
@ -65,7 +67,7 @@ module.exports = {
type: 'asset/resource', type: 'asset/resource',
generator: { generator: {
filename: `fonts/[name].[contenthash:5].[ext]`, filename: `fonts/[name].[contenthash:5].[ext]`,
} },
}, },
// json5 // json5
@ -84,8 +86,8 @@ module.exports = {
use: [ use: [
{ {
loader: 'vue-loader', loader: 'vue-loader',
} },
] ],
}, },
// 解决 @maxgraph/core 的问题, 避免出现以下错误 // 解决 @maxgraph/core 的问题, 避免出现以下错误
@ -97,10 +99,10 @@ module.exports = {
// The extension in the request is mandatory for it to be fully specified. // The extension in the request is mandatory for it to be fully specified.
{ {
test: /\.js$/, test: /\.js$/,
include: /node_modules\/@maxgraph\/core/, include: /node_modules[\/\\]@maxgraph[\/\\]core/,
resolve: { resolve: {
fullySpecified: false, fullySpecified: false,
} },
}, },
], ],
}, },
@ -109,7 +111,7 @@ module.exports = {
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
__VUE_OPTIONS_API__: JSON.stringify(true), __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 抽取插件 // css 抽取插件
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: `css/[name].[contenthash:5].css`, filename: `css/[name].[contenthash:5].css`,
chunkFilename: `css/[name].[contenthash:5].css` chunkFilename: `css/[name].[contenthash:5].css`,
}), }),
// 自动生成静态 index.html 文件 // 自动生成静态 index.html 文件
@ -144,8 +146,8 @@ module.exports = {
return true; return true;
}, },
info: { minimized: true }, info: { minimized: true },
} },
] ],
}), }),
// vue loader 插件 // vue loader 插件
@ -156,9 +158,7 @@ module.exports = {
fix: true, fix: true,
formatter: 'stylish', formatter: 'stylish',
extensions: ['js', 'ts', 'vue', 'cjs'], extensions: ['js', 'ts', 'vue', 'cjs'],
exclude: [ exclude: ['node_modules'],
'node_modules',
],
}), }),
], ],
@ -171,9 +171,9 @@ module.exports = {
// 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用 // 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用
extensions: ['.js', '.cjs', '.ts', '.vue'], extensions: ['.js', '.cjs', '.ts', '.vue'],
fallback: { fallback: {
"fs": false, fs: false,
"os": false, os: false,
"path": false, path: false,
} },
}, },
}; };

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

@ -37,18 +37,19 @@ module.exports = {
exclude: /node_modules/, exclude: /node_modules/,
use: [ use: [
{ {
loader: "babel-loader", loader: 'babel-loader',
options: { options: {
cacheDirectory: true, cacheDirectory: true,
} },
} },
] ],
}, },
// css // css
{ {
test: /\.(sa|sc|c)ss$/, test: /\.(sa|sc|c)ss$/,
use: [{ use: [
{
loader: MiniCssExtractPlugin.loader, loader: MiniCssExtractPlugin.loader,
}, },
{ {
@ -56,7 +57,8 @@ module.exports = {
}, },
{ {
loader: 'postcss-loader', loader: 'postcss-loader',
}] },
],
}, },
// 字体文件 // 字体文件
@ -65,7 +67,7 @@ module.exports = {
type: 'asset/resource', type: 'asset/resource',
generator: { generator: {
filename: `fonts/[name].[contenthash:5].[ext]`, filename: `fonts/[name].[contenthash:5].[ext]`,
} },
}, },
// json5 // json5
@ -84,8 +86,8 @@ module.exports = {
use: [ use: [
{ {
loader: 'vue-loader', loader: 'vue-loader',
} },
] ],
}, },
// 解决 @maxgraph/core 的问题, 避免出现以下错误 // 解决 @maxgraph/core 的问题, 避免出现以下错误
@ -97,10 +99,10 @@ module.exports = {
// The extension in the request is mandatory for it to be fully specified. // The extension in the request is mandatory for it to be fully specified.
{ {
test: /\.js$/, test: /\.js$/,
include: /node_modules\/@maxgraph\/core/, include: /node_modules[\/\\]@maxgraph[\/\\]core/,
resolve: { resolve: {
fullySpecified: false, fullySpecified: false,
} },
}, },
], ],
}, },
@ -109,7 +111,7 @@ module.exports = {
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
__VUE_OPTIONS_API__: JSON.stringify(true), __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 抽取插件 // css 抽取插件
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: `css/[name].[contenthash:5].css`, filename: `css/[name].[contenthash:5].css`,
chunkFilename: `css/[name].[contenthash:5].css` chunkFilename: `css/[name].[contenthash:5].css`,
}), }),
// 自动生成静态 index.html 文件 // 自动生成静态 index.html 文件
@ -144,8 +146,8 @@ module.exports = {
return true; return true;
}, },
info: { minimized: true }, info: { minimized: true },
} },
] ],
}), }),
// vue loader 插件 // vue loader 插件
@ -156,9 +158,7 @@ module.exports = {
fix: true, fix: true,
formatter: 'stylish', formatter: 'stylish',
extensions: ['js', 'ts', 'vue', 'cjs'], extensions: ['js', 'ts', 'vue', 'cjs'],
exclude: [ exclude: ['node_modules'],
'node_modules',
],
}), }),
], ],
@ -171,9 +171,9 @@ module.exports = {
// 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用 // 设置支持的模块扩展名,即这些扩展名的文件可以作为模块被使用
extensions: ['.js', '.cjs', '.ts', '.vue'], extensions: ['.js', '.cjs', '.ts', '.vue'],
fallback: { fallback: {
"fs": false, fs: false,
"os": false, os: false,
"path": false, path: false,
} },
}, },
}; };

Loading…
Cancel
Save