diff --git a/config/routes.ts b/config/routes.ts index 2f29b33..2575adb 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -144,6 +144,19 @@ path: '/list/table-list4', component: './list/table-list4', }, + { + name: 'list9', + icon: 'smile', + path: '/list/backend', + redirect: '/list/backend/1', + }, + { + name: '', + icon: 'smile', + path: '/list/backend/:id', + menuRender: false, // 不渲染菜单 + component: './list/list', + }, { name: 'list5', icon: 'smile', diff --git a/src/locales/zh-CN/menu.ts b/src/locales/zh-CN/menu.ts index cd2fdbf..69d517d 100644 --- a/src/locales/zh-CN/menu.ts +++ b/src/locales/zh-CN/menu.ts @@ -31,6 +31,7 @@ export default { 'menu.list.list6': '数据列表', 'menu.list.list7': '字段列表', 'menu.list.list8': '类型列表', + 'menu.list.list9': '后端列表', 'menu.list.basic-list': '标准列表', 'menu.list.card-list': '卡片列表', 'menu.list.search-list': '搜索列表', diff --git a/src/pages/list/backend/1.json b/src/pages/list/backend/1.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/backend/1.json @@ -0,0 +1,513 @@ +[ + { + "title": "名称", + "dataIndex": "name", + "search": { + "type": "text", + "width": 260 + }, + "table": { + "type": "text", + "width": 100 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "增", + "dataIndex": "add", + "search": {}, + "table": { + "width": 60, + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ] + }, + "create": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "help": "是否支持字段的增加", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "help": "是否支持字段的增加", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ] + } + }, + { + "title": "删", + "dataIndex": "delete", + "table": { + "width": 60, + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ] + }, + "search": {}, + "create": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "help": "是否支持字段的删除", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ] + } + }, + { + "title": "改", + "dataIndex": "edit", + "table": { + "width": 60, + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ] + }, + "create": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "help": "是否支持字段的修改", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "查", + "dataIndex": "view", + "table": { + "width": 60, + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ] + }, + "create": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "help": "是否支持字段的查询", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ], + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "radio", + "options": [ + { + "value": true, + "label": "是" + }, + { + "value": false, + "label": "否" + } + ] + } + }, + { + "title": "字段类型", + "dataIndex": "type", + "table": { + "type": "text", + "width": 160 + }, + "create": { + "type": "select", + "options": [ + { + "value": "string", + "label": "字符串" + }, + { + "value": "boolean", + "label": "布尔值" + }, + { + "value": "array", + "label": "数组" + }, + { + "value": "object", + "label": "对象" + }, + { + "value": "time", + "label": "时间" + }, + { + "value": "image", + "label": "图片" + } + ], + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "type": "select", + "options": [ + { + "value": "string", + "label": "字符串" + }, + { + "value": "boolean", + "label": "布尔值" + }, + { + "value": "array", + "label": "数组" + }, + { + "value": "object", + "label": "对象" + }, + { + "value": "time", + "label": "时间" + }, + { + "value": "image", + "label": "图片" + } + ], + "rules": [ + { + "required": true, + "message": "字段类型值" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "select", + "options": [ + { + "value": "string", + "label": "字符串" + }, + { + "value": "boolean", + "label": "布尔值" + }, + { + "value": "array", + "label": "数组" + }, + { + "value": "object", + "label": "对象" + }, + { + "value": "time", + "label": "时间" + }, + { + "value": "image", + "label": "图片" + } + ] + } + }, + { + "title": "默认值", + "dataIndex": "addDefault", + "table": { + "type": "text", + "width": 260 + }, + "create": { + "rules": [ + { + "required": false, + "message": "设置字段的默认值" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": false, + "message": "修改字段的默认值" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "备注", + "dataIndex": "remark", + "table": { + "type": "text", + "width": 260 + }, + "create": { + "type": "textArea", + "rules": [ + { + "required": false, + "message": "设置字段的备注信息" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "type": "textArea", + "rules": [ + { + "required": false, + "message": "修改字段的备注信息" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "textArea" + } + }, + { + "title": "创建时间", + "dataIndex": "createdAt", + "table": { + "type": "time", + "width": 100 + }, + "create": false, + "edit": false, + "view": { + "type": "time", + "width": 100 + } + }, + { + "title": "更新时间", + "dataIndex": "updatedAt", + "table": { + "type": "time", + "width": 100 + }, + "create": false, + "edit": false, + "view": { + "type": "time", + "width": 100 + } + } +] diff --git a/src/pages/list/backend/2.json b/src/pages/list/backend/2.json new file mode 100644 index 0000000..1fd647d --- /dev/null +++ b/src/pages/list/backend/2.json @@ -0,0 +1,312 @@ +[ + { + "title": "类型名称", + "dataIndex": "typeName", + "search": { + "type": "select", + "width": 60 + }, + "table": { + "type": "text", + "width": 100 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "类型", + "dataIndex": "type", + "search": {}, + "table": {}, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "字段名称", + "dataIndex": "title", + "table": { + "type": "text", + "width": 100 + }, + "search": { + "type": "text", + "width": 60 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "字段值", + "dataIndex": "dataIndex", + "table": { + "type": "text", + "width": 100 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "搜索属性", + "dataIndex": "search", + "table": { + "type": "text", + "width": 160 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "表格属性", + "dataIndex": "table", + "table": { + "type": "text", + "width": 160 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "创建属性", + "dataIndex": "create", + "table": { + "type": "text", + "width": 260 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "编辑属性", + "dataIndex": "edit", + "table": { + "type": "text", + "width": 260 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "展示属性", + "dataIndex": "view", + "table": { + "type": "text", + "width": 160 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + }, + { + "title": "创建时间", + "dataIndex": "createdAt", + "table": { + "type": "time", + "width": 100 + }, + "create": false, + "edit": false, + "view": { + "type": "text" + } + }, + { + "title": "更新时间", + "dataIndex": "updatedAt", + "table": { + "type": "time", + "width": 100 + }, + "create": false, + "edit": false, + "view": { + "type": "text" + } + }, + { + "title": "后端", + "dataIndex": "backend", + "table": { + "type": "text", + "width": 100 + }, + "create": { + "colProps": { "span": 24 } + }, + "edit": { + "colProps": { "span": 24 } + }, + "view": { + "type": "text" + } + } +] diff --git a/src/pages/list/backend/3.json b/src/pages/list/backend/3.json new file mode 100644 index 0000000..4923f4f --- /dev/null +++ b/src/pages/list/backend/3.json @@ -0,0 +1,252 @@ +[ + { + "title": "类型", + "dataIndex": "type", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "名称", + "dataIndex": "title", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "字段", + "dataIndex": "dataIndex", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "搜索显示", + "dataIndex": "hideInSearch", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格显示", + "dataIndex": "hideInTable", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "列表显示", + "dataIndex": "hideInForm", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格属性", + "dataIndex": "table", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "创建属性", + "dataIndex": "create", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "编辑属性", + "dataIndex": "edit", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "展示属性", + "dataIndex": "view", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + } +] diff --git a/src/pages/list/backend/4.json b/src/pages/list/backend/4.json new file mode 100644 index 0000000..4923f4f --- /dev/null +++ b/src/pages/list/backend/4.json @@ -0,0 +1,252 @@ +[ + { + "title": "类型", + "dataIndex": "type", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "名称", + "dataIndex": "title", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "字段", + "dataIndex": "dataIndex", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "搜索显示", + "dataIndex": "hideInSearch", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格显示", + "dataIndex": "hideInTable", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "列表显示", + "dataIndex": "hideInForm", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格属性", + "dataIndex": "table", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "创建属性", + "dataIndex": "create", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "编辑属性", + "dataIndex": "edit", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "展示属性", + "dataIndex": "view", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + } +] diff --git a/src/pages/list/backend/5.json b/src/pages/list/backend/5.json new file mode 100644 index 0000000..4923f4f --- /dev/null +++ b/src/pages/list/backend/5.json @@ -0,0 +1,252 @@ +[ + { + "title": "类型", + "dataIndex": "type", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "名称", + "dataIndex": "title", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "字段", + "dataIndex": "dataIndex", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "搜索显示", + "dataIndex": "hideInSearch", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格显示", + "dataIndex": "hideInTable", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "列表显示", + "dataIndex": "hideInForm", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格属性", + "dataIndex": "table", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "创建属性", + "dataIndex": "create", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "编辑属性", + "dataIndex": "edit", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "展示属性", + "dataIndex": "view", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + } +] diff --git a/src/pages/list/backend/6.json b/src/pages/list/backend/6.json new file mode 100644 index 0000000..4923f4f --- /dev/null +++ b/src/pages/list/backend/6.json @@ -0,0 +1,252 @@ +[ + { + "title": "类型", + "dataIndex": "type", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "名称", + "dataIndex": "title", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "字段", + "dataIndex": "dataIndex", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "搜索显示", + "dataIndex": "hideInSearch", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格显示", + "dataIndex": "hideInTable", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "列表显示", + "dataIndex": "hideInForm", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格属性", + "dataIndex": "table", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "创建属性", + "dataIndex": "create", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "编辑属性", + "dataIndex": "edit", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "展示属性", + "dataIndex": "view", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + } +] diff --git a/src/pages/list/backend/7.json b/src/pages/list/backend/7.json new file mode 100644 index 0000000..5c496aa --- /dev/null +++ b/src/pages/list/backend/7.json @@ -0,0 +1,330 @@ +[ + { + "title": "类型", + "dataIndex": "type", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "名称", + "dataIndex": "title", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "字段", + "dataIndex": "dataIndex", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "搜索显示", + "dataIndex": "hideInSearch", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格显示", + "dataIndex": "hideInTable", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "列表显示", + "dataIndex": "hideInForm", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格属性", + "dataIndex": "table", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "创建属性", + "dataIndex": "create", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "编辑属性", + "dataIndex": "edit", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "展示属性", + "dataIndex": "view", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "后端增", + "dataIndex": "add", + "hideInSearch": false, + "hideInTable": false, + "create": { + "colProps": { "span": 24 } + }, + "edit": { + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "后端删", + "dataIndex": "delete", + "hideInSearch": false, + "hideInTable": false, + "create": { + "colProps": { "span": 24 } + }, + "edit": { + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "后端改", + "dataIndex": "modify", + "hideInSearch": false, + "hideInTable": false, + "create": { + "colProps": { "span": 24 } + }, + "edit": { + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "后端查", + "dataIndex": "query", + "hideInSearch": false, + "hideInTable": false, + "create": { + "colProps": { "span": 24 } + }, + "edit": { + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "后端类型", + "dataIndex": "typesof", + "hideInSearch": false, + "hideInTable": false, + "create": { + "colProps": { "span": 24 } + }, + "edit": { + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "后端默认值", + "dataIndex": "defaults", + "hideInSearch": false, + "hideInTable": false, + "create": { + "colProps": { "span": 24 } + }, + "edit": { + "colProps": { "span": 24 } + }, + "view": true + } +] diff --git a/src/pages/list/backend/8.json b/src/pages/list/backend/8.json new file mode 100644 index 0000000..4923f4f --- /dev/null +++ b/src/pages/list/backend/8.json @@ -0,0 +1,252 @@ +[ + { + "title": "类型", + "dataIndex": "type", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "名称", + "dataIndex": "title", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "字段", + "dataIndex": "dataIndex", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "搜索显示", + "dataIndex": "hideInSearch", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格显示", + "dataIndex": "hideInTable", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "列表显示", + "dataIndex": "hideInForm", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "表格属性", + "dataIndex": "table", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "创建属性", + "dataIndex": "create", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "编辑属性", + "dataIndex": "edit", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + }, + { + "title": "展示属性", + "dataIndex": "view", + "hideInSearch": false, + "hideInTable": false, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { "span": 24 } + }, + "view": true + } +] diff --git a/src/pages/list/backend/backend1data.json b/src/pages/list/backend/backend1data.json new file mode 100644 index 0000000..6d738ab --- /dev/null +++ b/src/pages/list/backend/backend1data.json @@ -0,0 +1,101 @@ +[ + { + "add": false, + "delete": false, + "edit": false, + "view": true, + "name": "id", + "type": "string", + "addDefault": "0000001" + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "name", + "type": "string", + "addDefault": "" + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "add", + "type": "boolean", + "addDefault": true + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "delete", + "type": "boolean", + "addDefault": true + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "edit", + "type": "boolean", + "addDefault": true + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "view", + "type": "boolean", + "addDefault": true + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "type", + "type": "string", + "addDefault": "" + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "addDefault", + "type": "string", + "addDefault": "" + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "remark", + "type": "string", + "addDefault": "" + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "createdAt", + "type": "string", + "addDefault": "" + }, + { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "updatedAt", + "type": "string", + "addDefault": "" + } +] diff --git a/src/pages/list/list/index.tsx b/src/pages/list/list/index.tsx index f3fb354..8bb3a80 100644 --- a/src/pages/list/list/index.tsx +++ b/src/pages/list/list/index.tsx @@ -141,7 +141,7 @@ const TableList: React.FC = () => { const [options, setOptions] = useState([]); const getTemplateData = async (key: string) => { let template: any = []; - if (path.includes('template')) { + if (path.includes('template') || path.includes('backend')) { template = await require(`../${path.split('/')[2]}/${key}.json`); } else { const result = await getTemplate(key, path.split('/')[2]); @@ -174,7 +174,7 @@ const TableList: React.FC = () => { useEffect(() => { getTemplateData(params.id); handleOnSearch(); - }, []); + }, [params.id]); const handleOnTabChange = async (key: string) => { await getTemplateData(key); setTabActiveKey(key); @@ -233,11 +233,14 @@ const TableList: React.FC = () => { render: (dom: any) => { if (!item.hideInTable && item.table && item.table.type === 'image') { if (Array.isArray(dom)) { - return dom.map((i: any) => ); + return dom.map((i: any, key) => ); } else { return ; } } + if (!item.hideInTable && item.table && item.table.type === 'radio') { + return item.table.options.find((i: any) => i.value === dom)?.label; + } if (!item.hideInTable && item.table && item.table.type === 'time') { return
{moment(dom).fromNow()}
; } @@ -601,7 +604,9 @@ const TableList: React.FC = () => { ); break; case 'radio': - form = ; + form = ( + + ); break; case 'switch': form = ( @@ -666,7 +671,9 @@ const TableList: React.FC = () => { form = ; break; case 'radio': - form = ; + form = ( + + ); break; case 'switch': form = ; diff --git a/src/pages/list/template/template1data.json b/src/pages/list/template/template1data.json new file mode 100644 index 0000000..5035642 --- /dev/null +++ b/src/pages/list/template/template1data.json @@ -0,0 +1,1112 @@ +[ + { + "typeName": "数据", + "type": "data", + "title": "创建时间", + "dataIndex": "createdAt", + "search": {}, + "table": { + "type": "time" + }, + "edit": false, + "view": { + "type": "time" + }, + "create": false + }, + { + "typeName": "数据", + "type": "data", + "title": "更新时间", + "dataIndex": "updatedAt", + "search": {}, + "table": { + "type": "time" + }, + "create": false, + "edit": false, + "view": { + "type": "time" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "数值", + "dataIndex": "images", + "search": {}, + "table": { + "type": "text", + "width": 200 + }, + "create": { + "type": "text", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "type": "text", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "详情", + "dataIndex": "detail", + "search": { + "type": "text" + }, + "table": { + "type": "text", + "width": 200, + "ellipsis": { + "showTitle": true + } + }, + "create": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "textArea" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "描述", + "dataIndex": "descript", + "search": { + "type": "text" + }, + "table": { + "type": "text", + "width": 500, + "ellipsis": { + "showTitle": true + } + }, + "create": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "textArea" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "作者", + "dataIndex": "author", + "search": { + "type": "select" + }, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": "24" + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": "24" + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "名称", + "dataIndex": "name", + "search": { + "type": "text" + }, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "类型编号", + "dataIndex": "type", + "search": {}, + "table": { + "type": "text", + "width": 100 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "类型名称", + "dataIndex": "typeName", + "search": { + "type": "select" + }, + "table": { + "type": "text", + "width": 100 + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "数据", + "type": "data", + "title": "编号", + "dataIndex": "id", + "search": {}, + "table": {}, + "create": {}, + "edit": { + "disabled": true, + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "创建时间", + "dataIndex": "createdAt", + "search": {}, + "table": { + "type": "time" + }, + "edit": false, + "view": { + "type": "time" + }, + "create": false + }, + { + "typeName": "字段", + "type": "field", + "title": "更新时间", + "dataIndex": "updatedAt", + "search": {}, + "table": { + "type": "time" + }, + "create": false, + "edit": false, + "view": { + "type": "time" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "数值", + "dataIndex": "images", + "search": {}, + "table": { + "type": "text" + }, + "create": { + "type": "text", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 30 + } + }, + "edit": { + "type": "text", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "详情", + "dataIndex": "detail", + "search": { + "type": "text" + }, + "table": { + "type": "text", + "width": 200, + "ellipsis": { + "showTitle": true + } + }, + "create": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "textArea" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "描述", + "dataIndex": "descript", + "search": { + "type": "text" + }, + "table": { + "type": "text", + "width": 500, + "ellipsis": { + "showTitle": true + } + }, + "create": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "textArea" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "名称编号", + "dataIndex": "value", + "search": {}, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "名称", + "dataIndex": "name", + "search": { "type": "text" }, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "类型编号", + "dataIndex": "type", + "search": {}, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "类型名称", + "dataIndex": "typeName", + "search": { + "type": "select" + }, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "字段", + "type": "field", + "title": "编号", + "dataIndex": "id", + "search": {}, + "table": {}, + "create": {}, + "edit": { + "disabled": true, + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "typeName": "类型", + "type": "type", + "title": "更新时间", + "dataIndex": "updatedAt", + "search": {}, + "table": { + "type": "time" + }, + "create": false, + "edit": false, + "view": { + "type": "time" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "updatedAt", + "type": "array", + "addDefault": "[]", + "single": true + } + }, + { + "typeName": "类型", + "type": "type", + "title": "创建时间", + "dataIndex": "createdAt", + "search": {}, + "table": { + "type": "time" + }, + "edit": false, + "view": { + "type": "time" + }, + "create": false, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "createdAt", + "type": "array", + "addDefault": "[]", + "single": true + } + }, + { + "typeName": "类型", + "type": "type", + "title": "节点", + "dataIndex": "children", + "search": {}, + "table": { + "type": "text" + }, + "create": {}, + "edit": {}, + "view": {}, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "children", + "type": "array", + "addDefault": "[]", + "single": true + } + }, + { + "typeName": "类型", + "type": "type", + "title": "子节点", + "dataIndex": "hasChildren", + "search": {}, + "table": { + "type": "text" + }, + "create": { + "colProps": { + "span": 24 + } + }, + "edit": { + "colProps": { + "span": 24 + } + }, + "view": {}, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "hasChildren", + "type": "string", + "addDefault": "", + "single": true + } + }, + { + "typeName": "类型", + "type": "type", + "title": "数值", + "dataIndex": "images", + "search": {}, + "table": { + "type": "text" + }, + "create": { + "type": "text", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 30 + } + }, + "edit": { + "type": "text", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "images", + "type": "array", + "addDefault": "[]", + "single": true + } + }, + { + "typeName": "类型", + "type": "type", + "title": "详情", + "dataIndex": "detail", + "search": { + "type": "text" + }, + "table": { + "type": "text", + "width": 200, + "ellipsis": { + "showTitle": true + } + }, + "create": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "textArea" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "detail", + "type": "string", + "addDefault": "111", + "single": true + } + }, + { + "typeName": "类型", + "type": "type", + "title": "描述", + "dataIndex": "descript", + "search": { + "type": "text" + }, + "table": { + "type": "text", + "width": 500, + "ellipsis": { + "showTitle": true + } + }, + "create": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "type": "textArea", + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "textArea" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "descript", + "type": "string", + "addDefault": "111", + "single": true + } + }, + { + "typeName": "类型", + "type": "type", + "title": "名称编号", + "dataIndex": "value", + "search": {}, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "value", + "type": "string", + "addDefault": "名称编号" + } + }, + { + "typeName": "类型", + "type": "type", + "title": "名称", + "dataIndex": "name", + "search": { + "type": "select" + }, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "name", + "type": "string", + "addDefault": "名称" + } + }, + { + "typeName": "类型", + "type": "type", + "title": "类型编号", + "dataIndex": "type", + "search": {}, + "table": {}, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "type", + "type": "string", + "addDefault": "类型编号" + } + }, + { + "typeName": "类型", + "type": "type", + "title": "类型名称", + "dataIndex": "typeName", + "search": { + "type": "select" + }, + "table": { + "type": "text" + }, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + }, + "backend": { + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "typeName", + "type": "string", + "addDefault": "类型名称" + } + }, + { + "typeName": "类型", + "type": "type", + "title": "编号", + "dataIndex": "id", + "search": {}, + "table": {}, + "create": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "edit": { + "rules": [ + { + "required": true, + "message": "内容必填" + } + ], + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + }, + "backend": { + "add": false, + "delete": false, + "edit": false, + "view": true, + "name": "id", + "type": "string", + "addDefault": "id号" + } + } +]