From 894e9d38b47551874d52b983110d485b1b3bbdbc Mon Sep 17 00:00:00 2001 From: Lqc Date: Sat, 20 Sep 2025 18:01:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=AB=A0=E8=8A=82=20?= =?UTF-8?q?=E8=80=83=E8=AF=95=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/aiol/controller/AiolExamController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolExamController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolExamController.java index 3522be8a..d8e76677 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolExamController.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolExamController.java @@ -137,6 +137,19 @@ public class AiolExamController extends JeecgController queryExamList(@RequestParam(name="examName",required=false) String examName,@RequestParam(name="type",required=true) String type) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("type",type); + if(!oConvertUtils.isEmpty(examName)){ + queryWrapper.like("name",examName); + } + return Result.OK(examService.list(queryWrapper)); + } + /** * 批量删除 * From 16abb964a59920f2961bce5365304619cb76040c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BC=A0?= <2091066548@qq.com> Date: Sun, 21 Sep 2025 00:27:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9A=E9=97=A8=E6=88=B7=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E9=83=A8=E5=88=86=E6=90=AC=E8=BF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../online-design/portal/DesignEditor.vue | 539 +++++++++++ .../aiol/online-design/portal/Preview.vue | 224 +++++ .../portal/components/ComponentLibrary.vue | 328 +++++++ .../portal/components/DesignCanvas.vue | 831 +++++++++++++++++ .../portal/components/PropertyEditor.vue | 854 ++++++++++++++++++ .../design-components/ButtonComponent.vue | 232 +++++ .../design-components/CarouselComponent.vue | 230 +++++ .../design-components/ImageComponent.vue | 211 +++++ .../design-components/TextComponent.vue | 223 +++++ .../components/design-components/index.ts | 143 +++ .../views/aiol/online-design/portal/index.vue | 519 +++++++++++ .../src/views/aiol/online-design/test.vue | 135 +++ 12 files changed, 4469 insertions(+) create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/DesignEditor.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/Preview.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/ComponentLibrary.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/DesignCanvas.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/PropertyEditor.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ButtonComponent.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/CarouselComponent.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ImageComponent.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/TextComponent.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/index.ts create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/portal/index.vue create mode 100644 jeecgboot-vue3/src/views/aiol/online-design/test.vue diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/DesignEditor.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/DesignEditor.vue new file mode 100644 index 00000000..54e8d9e7 --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/DesignEditor.vue @@ -0,0 +1,539 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/Preview.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/Preview.vue new file mode 100644 index 00000000..18298681 --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/Preview.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/ComponentLibrary.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/ComponentLibrary.vue new file mode 100644 index 00000000..fb923ce3 --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/ComponentLibrary.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/DesignCanvas.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/DesignCanvas.vue new file mode 100644 index 00000000..ec8abc7c --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/DesignCanvas.vue @@ -0,0 +1,831 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/PropertyEditor.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/PropertyEditor.vue new file mode 100644 index 00000000..27698735 --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/PropertyEditor.vue @@ -0,0 +1,854 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ButtonComponent.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ButtonComponent.vue new file mode 100644 index 00000000..9f32918c --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ButtonComponent.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/CarouselComponent.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/CarouselComponent.vue new file mode 100644 index 00000000..c2bbae0e --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/CarouselComponent.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ImageComponent.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ImageComponent.vue new file mode 100644 index 00000000..484029e5 --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/ImageComponent.vue @@ -0,0 +1,211 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/TextComponent.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/TextComponent.vue new file mode 100644 index 00000000..7a0ca7af --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/TextComponent.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/index.ts b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/index.ts new file mode 100644 index 00000000..ef68bda5 --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/components/design-components/index.ts @@ -0,0 +1,143 @@ +import { App } from 'vue'; +import CarouselComponent from './CarouselComponent.vue'; +import TextComponent from './TextComponent.vue'; +import ImageComponent from './ImageComponent.vue'; +import ButtonComponent from './ButtonComponent.vue'; + +// 组件映射表 +export const componentMap = { + carousel: CarouselComponent, + text: TextComponent, + image: ImageComponent, + button: ButtonComponent, +}; + +// 获取组件类型 +export function getComponentType(type: string) { + return componentMap[type] || 'div'; +} + +// 注册所有设计组件 +export function registerDesignComponents(app: App) { + Object.entries(componentMap).forEach(([name, component]) => { + app.component(`Design${name.charAt(0).toUpperCase() + name.slice(1)}Component`, component); + }); +} + +// 导出所有组件 +export { + CarouselComponent, + TextComponent, + ImageComponent, + ButtonComponent, +}; + +// 组件配置信息 +export const componentConfigs = { + carousel: { + name: '轮播图', + icon: 'ion:images-outline', + description: '图片轮播展示', + category: 'basic', + defaultProps: { + autoplay: true, + dots: true, + arrows: false, + effect: 'scrollx', + dotPosition: 'bottom', + }, + defaultData: { + images: [ + { + url: 'https://via.placeholder.com/800x300/4CAF50/white?text=Slide+1', + alt: 'Slide 1' + }, + { + url: 'https://via.placeholder.com/800x300/2196F3/white?text=Slide+2', + alt: 'Slide 2' + }, + ], + }, + defaultStyle: { + width: '100%', + height: '300px', + marginBottom: '20px', + }, + }, + text: { + name: '文本', + icon: 'ion:text-outline', + description: '文字内容展示', + category: 'basic', + defaultProps: { + tag: 'p', + }, + defaultData: { + content: '这是一段文本内容,点击右侧属性面板可以编辑。', + }, + defaultStyle: { + fontSize: '16px', + color: '#333', + lineHeight: '1.6', + marginBottom: '16px', + }, + }, + image: { + name: '图片', + icon: 'ion:image-outline', + description: '单张图片展示', + category: 'basic', + defaultProps: { + alt: '图片', + objectFit: 'cover', + }, + defaultData: { + src: 'https://via.placeholder.com/400x200/FF9800/white?text=Image', + }, + defaultStyle: { + width: '400px', + height: '200px', + marginBottom: '16px', + }, + }, + button: { + name: '按钮', + icon: 'ion:radio-button-on-outline', + description: '交互按钮', + category: 'basic', + defaultProps: { + type: 'primary', + size: 'middle', + shape: 'default', + }, + defaultData: { + text: '按钮文字', + }, + defaultStyle: { + marginBottom: '16px', + }, + }, +}; + +// 根据类型获取组件配置 +export function getComponentConfig(type: string) { + return componentConfigs[type]; +} + +// 创建新组件实例 +export function createComponentInstance(type: string) { + const config = getComponentConfig(type); + if (!config) { + throw new Error(`Unknown component type: ${type}`); + } + + const id = `${type}_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`; + + return { + id, + type, + props: { ...config.defaultProps }, + data: { ...config.defaultData }, + style: { ...config.defaultStyle }, + }; +} diff --git a/jeecgboot-vue3/src/views/aiol/online-design/portal/index.vue b/jeecgboot-vue3/src/views/aiol/online-design/portal/index.vue new file mode 100644 index 00000000..7c313377 --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/portal/index.vue @@ -0,0 +1,519 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/aiol/online-design/test.vue b/jeecgboot-vue3/src/views/aiol/online-design/test.vue new file mode 100644 index 00000000..f8d27dff --- /dev/null +++ b/jeecgboot-vue3/src/views/aiol/online-design/test.vue @@ -0,0 +1,135 @@ + + + + +