diff --git a/ruoyi-site/ruoyi-h5/doc/需求.md b/ruoyi-site/ruoyi-h5/doc/需求.md index 600ce44a9..93a7d2f35 100644 --- a/ruoyi-site/ruoyi-h5/doc/需求.md +++ b/ruoyi-site/ruoyi-h5/doc/需求.md @@ -134,7 +134,7 @@ "sale_type": 0 } - +dashboard ## 表单需求 帮我理一下这个表单需求,然后帮我合理设计一下表结构和技术选型,再实现表单提交接口和表单提交过的数据查询接口等等,有遗漏的记得帮我补上,在h5在线编辑中,可以新建个表单,表单可以自定义提交项,这种自定义表单,如何设计表结构,是用mongo还是mysql, @@ -142,6 +142,38 @@ {"templet_form_id":450055,"form_id":"461709","form_data":{"19fef684-b6ef-4bfb-8d68-603c99444ac5":"文本内容","6cbf9138-a20d-428c-b635-291246da3926":"13255556645","14154ccc-c2b3-4d27-8eb2-e3e422af294f":"1713322582323@qq.com"}} 2、表单的结构是保存在 H5ProjectContent 下的 Element(type=form时)->formItems 中的,formItems 的结构是如下: {"formItems": [ { "prop": "cf1d1fd1-9df9-44b4-ba73-3c553784aeab", "widget": "input", "verify": { "enable": false, "hint": "请输入文本内容" } }, { "prop": "56d54498-7d9d-4055-badd-09596fc9a43c", "widget": "input", "verify": { "enable": false, "hint": "请输入文本内容" } }, { "prop": "073f7b1f-afb9-4810-8896-d760197f5d02", "widget": "input", "verify": { "enable": true, "hint": "请输入正确的手机号码" } }, { "prop": "155ed883-93e5-4509-88db-ace73caac0d2", "widget": "input", "verify": { "enable": false, "hint": "请输入文本内容" } } ]} +4、查询提交记录页面url:https://www.gaoding.com/odyssey/dashboard#/form/response?mode=company&platform=4&user_id=9021376240556066908&templet_id=34480589722472555 +3、查询结构是这样的: +https://www.gaoding.com/odyssey/editor/templetformResponses?page=1&page_size=20&order=id:desc&templet_form_id=450055 +```json +{ + "page": "1", + "page_size": "20", + "total": 2, + "data": [ + { + "id": 26964584, + "form_id": 461709, + "data": "{\"19fef684-b6ef-4bfb-8d68-603c99444ac5\":\"1\",\"14154ccc-c2b3-4d27-8eb2-e3e422af294f\":\"1212@134.com\",\"b8256478-4f71-4484-a859-f71628c6107a\":\"5656456456\"}", + "ip": "27.17.43.218, 110.75.191.49", + "deleted_at": null, + "created_at": "2025-11-14 17:25:52", + "updated_at": "2025-11-14 17:25:52", + "platform_user_id": 0 + }, + { + "id": 26963271, + "form_id": 461709, + "data": "{\"19fef684-b6ef-4bfb-8d68-603c99444ac5\":\"文本内容\",\"6cbf9138-a20d-428c-b635-291246da3926\":\"13255556645\",\"14154ccc-c2b3-4d27-8eb2-e3e422af294f\":\"1713322582323@qq.com\"}", + "ip": "27.17.43.218, 110.75.191.24", + "deleted_at": null, + "created_at": "2025-11-14 14:17:44", + "updated_at": "2025-11-14 14:17:44", + "platform_user_id": 0 + } + ] +} +``` 然后完善一下 H5ProjectContent 中的Element,目前有这几种类型,对应的内容有:image、 text、 svg、 group、 form、 map这几个,对应的内容结构如下: image: { "uuid": "0.241109143257637336", "type": "image", "title": "4", "category": "", "opacity": 1, "padding": [ 0, 0, 0, 0 ], "width": 143, "height": 139, "left": 621, "top": -24, "transform": { "a": 1, "b": 0, "c": 0, "d": 1, "tx": 0, "ty": 0 }, "animations": [ { "type": "enter", "order": 0, "keyframes": { "opacity": [ 0, 1 ], "transform": [ "translate(0%, -82.73381294964028%) matrix(1, 0, 0, 1, 0, 0)", "translate(0, 0) scale(1) matrix(1, 0, 0, 1, 0, 0)" ] }, "delay": 0, "duration": 1000, "fill": "both", "name": "渐变和移动", "easing": " cubic-bezier(0.31, 0.21, 0.20, 1)", "customValues": { "direction": 0 }, "groupOrder": 1 } ], "boxShadow": null, "resize": 7, "dragable": true, "rotatable": true, "editable": true, "frozen": false, "hidden": false, "lock": false, "borderRadius": 0, "filter": { "contrast": 0, "sharpness": 0, "hueRotate": 0, "saturate": 0, "brightness": 0, "gaussianBlur": 0, "temperature": 0, "tint": 0 }, "watermarkEnable": false, "metaInfo": { "materials": [ { "id": 48218352, "type": "image" } ] }, "linkId": "", "groupable": true, "flex": null, "backgroundColor": null, "backgroundEffect": null, "border": null, "blendMode": "blendNormal", "maskInfo": { "enable": false, "showSelf": false, "imageUrl": "", "effectedResult": { "width": 0, "height": 0, "left": 0, "top": 0 } }, "suspension": { "enable": false, "top": null, "left": null, "right": null, "bottom": null }, "url": "https://st-gdx.dancf.com/odyssey/uxms/20211022-190216-5ef3.png", "imageUrl": "", "effectedResult": { "width": 0, "height": 0, "left": 0, "right": 0, "top": 0 }, "imageEffects": [], "aggregatedColors": [], "mainColor": null, "effectScale": 1, "imageTransform": { "a": 1, "b": 0, "c": 0, "d": 1, "tx": 0, "ty": 0 }, "filterInfo": null, "naturalWidth": 143, "naturalHeight": 139, "resourceType": "image", "naturalDuration": 0, "enableDragToMask": true, "loop": true, "canDownload": false, "version": "7.1.71", "events": [] }