diff --git a/config/routes.ts b/config/routes.ts index 2575adb..ef09796 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -144,6 +144,19 @@ path: '/list/table-list4', component: './list/table-list4', }, + { + name: 'list10', + icon: 'smile', + path: '/list/tab', + redirect: '/list/tab/1', + }, + { + name: '', + icon: 'smile', + path: '/list/tab/:id', + menuRender: false, // 不渲染菜单 + component: './list/list', + }, { name: 'list9', icon: 'smile', diff --git a/src/locales/zh-CN/menu.ts b/src/locales/zh-CN/menu.ts index 69d517d..e7ce1a9 100644 --- a/src/locales/zh-CN/menu.ts +++ b/src/locales/zh-CN/menu.ts @@ -32,6 +32,7 @@ export default { 'menu.list.list7': '字段列表', 'menu.list.list8': '类型列表', 'menu.list.list9': '后端列表', + 'menu.list.list10': '项目列表', 'menu.list.basic-list': '标准列表', 'menu.list.card-list': '卡片列表', 'menu.list.search-list': '搜索列表', diff --git a/src/pages/list/list/index.tsx b/src/pages/list/list/index.tsx index c7fa5e5..a43a2d0 100644 --- a/src/pages/list/list/index.tsx +++ b/src/pages/list/list/index.tsx @@ -15,6 +15,7 @@ import { import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import ProDescriptions from '@ant-design/pro-descriptions'; import { + requestTabs, requestList, addList, updateList, @@ -137,11 +138,12 @@ const TableList: React.FC = () => { ); const [selectedRowsState, setSelectedRows] = useState([]); const params: any = useParams(); + const [tabs, setTabs] = useState([]); const [templateData, setTemplateData] = useState([]); const [options, setOptions] = useState([]); const getTemplateData = async (key: string) => { let template: any = []; - if (path.includes('template') || path.includes('backend')) { + if (path.includes('template') || path.includes('backend') || path.includes('tab')) { template = await require(`../${path.split('/')[2]}/${key}.json`); } else { const result = await getTemplate(key, path.split('/')[2]); @@ -160,6 +162,8 @@ const TableList: React.FC = () => { } } setTemplateData(template); + const tabsData = await requestTabs({}); + setTabs(tabsData.data); if (location.href.includes('id')) { const arr = location.href.split('?id='); const id: string = arr[arr.length - 1]; @@ -349,40 +353,11 @@ const TableList: React.FC = () => { title: false, ghost: true, }} - tabList={[ - { - tab: 'echarts', - key: '1', - }, - { - tab: 'openlayers', - key: '2', - }, - { - tab: 'cesium', - key: '3', - }, - { - tab: 'web-vue', - key: '4', - }, - { - tab: 'web-elementui', - key: '5', - }, - { - tab: 'web-react', - key: '6', - }, - { - tab: 'web-antd', - key: '7', - }, - { - tab: '列表8', - key: '8', - }, - ]} + tabList={ + location.pathname.includes('tab') + ? [] + : tabs.reverse().map((item: any) => ({ tab: item.name, key: item.type })) + } tabActiveKey={tabActiveKey} > diff --git a/src/pages/list/list/service.ts b/src/pages/list/list/service.ts index 60dfd1e..a137ca1 100644 --- a/src/pages/list/list/service.ts +++ b/src/pages/list/list/service.ts @@ -8,8 +8,6 @@ export async function getTemplate(key: string, type: string) { }>('/api/list/template/' + key, { method: 'GET', params: { - current: '1', - pageSize: '20', type: type, }, }); @@ -33,7 +31,25 @@ export async function requestList( ...(options || {}), }); } - +export async function requestTabs( + params: { + current?: number; + pageSize?: number; + }, + options?: {}, +) { + return request<{ + data: TableListItem[]; + total?: number; + success?: boolean; + }>('/api/list/tab/' + location.pathname.split('/')[location.pathname.split('/').length - 1], { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} export async function updateList(options?: { [key: string]: any }) { return request('/api' + location.pathname.replace('/antdpro-demo', ''), { method: 'PUT', diff --git a/src/pages/list/tab/1.json b/src/pages/list/tab/1.json new file mode 100644 index 0000000..dac62b9 --- /dev/null +++ b/src/pages/list/tab/1.json @@ -0,0 +1,173 @@ +[ + { + "type": "data", + "title": "编号", + "dataIndex": "id", + "search": {}, + "table": {}, + "create": {}, + "edit": { + "disabled": true, + "colProps": { + "span": 24 + } + }, + "view": { + "type": "text" + } + }, + { + "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": "type", + "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": "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/tab/2.json b/src/pages/list/tab/2.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/tab/2.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/tab/3.json b/src/pages/list/tab/3.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/tab/3.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/tab/4.json b/src/pages/list/tab/4.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/tab/4.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/tab/5.json b/src/pages/list/tab/5.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/tab/5.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/tab/6.json b/src/pages/list/tab/6.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/tab/6.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/tab/7.json b/src/pages/list/tab/7.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/tab/7.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/tab/8.json b/src/pages/list/tab/8.json new file mode 100644 index 0000000..b51f1f4 --- /dev/null +++ b/src/pages/list/tab/8.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/tab/backend1data.json b/src/pages/list/tab/backend1data.json new file mode 100644 index 0000000..b9b965b --- /dev/null +++ b/src/pages/list/tab/backend1data.json @@ -0,0 +1,459 @@ +[ + { + "filterType": "template", + "add": false, + "delete": false, + "edit": false, + "view": true, + "name": "id", + "type": "string", + "addDefault": "0000001" + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "filterType", + "type": "string", + "addDefault": "" + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "name", + "type": "string", + "addDefault": "" + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "add", + "type": "boolean", + "addDefault": true + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "delete", + "type": "boolean", + "addDefault": true + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "edit", + "type": "boolean", + "addDefault": true + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "view", + "type": "boolean", + "addDefault": true + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "type", + "type": "string", + "addDefault": "" + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "addDefault", + "type": "string", + "addDefault": "" + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "remark", + "type": "string", + "addDefault": "" + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "createdAt", + "type": "string", + "addDefault": "" + }, + { + "filterType": "template", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "updatedAt", + "type": "string", + "addDefault": "" + }, + { + "filterType": "type", + "add": false, + "delete": false, + "edit": false, + "view": true, + "name": "id", + "type": "string", + "addDefault": "id号" + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "typeName", + "type": "string", + "addDefault": "类型名称" + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "type", + "type": "string", + "addDefault": "类型编号" + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "name", + "type": "string", + "addDefault": "名称" + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "value", + "type": "string", + "addDefault": "名称编号" + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "descript", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "detail", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "images", + "type": "array", + "addDefault": "[]", + "single": true + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "hasChildren", + "type": "string", + "addDefault": "", + "single": true + }, + { + "filterType": "type", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "children", + "type": "array", + "addDefault": "[]", + "single": true + }, + { + "filterType": "field", + "add": false, + "delete": false, + "edit": false, + "view": true, + "name": "id", + "type": "string", + "addDefault": "id号" + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "typeName", + "type": "string", + "addDefault": "类型名称" + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "type", + "type": "string", + "addDefault": "类型编号" + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "name", + "type": "string", + "addDefault": "名称" + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "value", + "type": "string", + "addDefault": "名称编号" + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "descript", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "detail", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "images", + "type": "array", + "addDefault": "[]", + "single": true + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "hasChildren", + "type": "string", + "addDefault": "", + "single": true + }, + { + "filterType": "field", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "children", + "type": "array", + "addDefault": "[]", + "single": true + }, + { + "filterType": "data", + "add": false, + "delete": false, + "edit": false, + "view": true, + "name": "id", + "type": "string", + "addDefault": "" + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "typeName", + "type": "string", + "addDefault": "类型名称" + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "type", + "type": "string", + "addDefault": "111" + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "author", + "type": "string", + "addDefault": "111" + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "name", + "type": "string", + "addDefault": "111" + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "descript", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "detail", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "images", + "type": "array", + "addDefault": "[]", + "single": true + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "latitude", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "longitude", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "city", + "type": "string", + "addDefault": "111", + "single": true + }, + { + "filterType": "data", + "add": true, + "delete": true, + "edit": true, + "view": true, + "name": "time", + "type": "string", + "addDefault": "111", + "single": true + } +]