需求描述

This commit is contained in:
lizhengwei 2026-03-01 23:47:35 +08:00
parent d0f1c868c6
commit 4d2fe41f6a

View File

@ -134,7 +134,7 @@
"sale_type": 0 "sale_type": 0
} }
dashboard
## 表单需求 ## 表单需求
帮我理一下这个表单需求然后帮我合理设计一下表结构和技术选型再实现表单提交接口和表单提交过的数据查询接口等等有遗漏的记得帮我补上在h5在线编辑中可以新建个表单表单可以自定义提交项这种自定义表单如何设计表结构是用mongo还是mysql 帮我理一下这个表单需求然后帮我合理设计一下表结构和技术选型再实现表单提交接口和表单提交过的数据查询接口等等有遗漏的记得帮我补上在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"}} {"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 的结构是如下: 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": "请输入文本内容" } } ]} {"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、查询提交记录页面urlhttps://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这几个对应的内容结构如下 然后完善一下 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": [] } 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": [] }