diff --git a/RuoYi-Vue/easycode-web/src/components/business-blocks/BusinessBlockDesigner.vue b/RuoYi-Vue/easycode-web/src/components/business-blocks/BusinessBlockDesigner.vue new file mode 100644 index 0000000..ff73f11 --- /dev/null +++ b/RuoYi-Vue/easycode-web/src/components/business-blocks/BusinessBlockDesigner.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/RuoYi-Vue/easycode-web/src/components/business-blocks/ChartBlockConfigForm.vue b/RuoYi-Vue/easycode-web/src/components/business-blocks/ChartBlockConfigForm.vue new file mode 100644 index 0000000..7721aac --- /dev/null +++ b/RuoYi-Vue/easycode-web/src/components/business-blocks/ChartBlockConfigForm.vue @@ -0,0 +1,444 @@ + + + + + diff --git a/RuoYi-Vue/easycode-web/src/components/business-blocks/ChartFilterEditor.vue b/RuoYi-Vue/easycode-web/src/components/business-blocks/ChartFilterEditor.vue new file mode 100644 index 0000000..9c49d1f --- /dev/null +++ b/RuoYi-Vue/easycode-web/src/components/business-blocks/ChartFilterEditor.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/RuoYi-Vue/easycode-web/src/components/businessBlockDesigner.test.mjs b/RuoYi-Vue/easycode-web/src/components/businessBlockDesigner.test.mjs index c9ea3d5..43f512b 100644 --- a/RuoYi-Vue/easycode-web/src/components/businessBlockDesigner.test.mjs +++ b/RuoYi-Vue/easycode-web/src/components/businessBlockDesigner.test.mjs @@ -144,6 +144,28 @@ test('business block schema form renders table and field controls', () => { assert.equal(source.includes('update:modelValue'), true) }) +test('chart blocks use a dedicated dataset and display editor', () => { + const source = readSource('business-blocks/BusinessBlockDesigner.vue') + const formPath = resolve(currentDir, 'business-blocks/ChartBlockConfigForm.vue') + const filterPath = resolve(currentDir, 'business-blocks/ChartFilterEditor.vue') + + assert.equal(existsSync(formPath), true) + assert.equal(existsSync(filterPath), true) + + const form = readSource('business-blocks/ChartBlockConfigForm.vue') + const filters = readSource('business-blocks/ChartFilterEditor.vue') + assert.equal(source.includes("import ChartBlockConfigForm from './ChartBlockConfigForm.vue'"), true) + assert.equal(source.includes("selectedDefinition?.kind === 'chart'"), true) + assert.equal(source.includes('selectedChartErrors'), true) + assert.equal(form.includes('update:dataset'), true) + assert.equal(form.includes('update:display'), true) + assert.equal(form.includes('update:span'), true) + assert.equal(form.includes(' { const source = readSource('business-blocks/BlockCanvas.vue')