148 lines
4.5 KiB
TypeScript
148 lines
4.5 KiB
TypeScript
import { http, HttpResponse } from '@lingshu/vite-plugin-msw/msw';
|
|
|
|
const handlers = [
|
|
http.post('/api/lcdp/v1/page/view/query', () => {
|
|
const modelId = '704222211031014734';
|
|
const formView = 1;
|
|
const listView = 2;
|
|
const sysCategory = 0;
|
|
return HttpResponse.json({
|
|
code: '0',
|
|
data: {
|
|
pageId: '1916383724002201602',
|
|
pageName: {
|
|
'en': '',
|
|
'zh-CN': '何鹏验证页面',
|
|
},
|
|
modelId,
|
|
modelName: {
|
|
'en': '',
|
|
'zh-CN': '何鹏验证模型',
|
|
},
|
|
languageModule: 'PAGE-.1916383722216718337.1916383724002201602',
|
|
views: [
|
|
{
|
|
view: formView,
|
|
script: '',
|
|
pageComponent: [
|
|
{
|
|
category: sysCategory,
|
|
componentCode: '2cf233823c8611f09832770e0626f11a',
|
|
type: 'PAGE_ROOT',
|
|
modelId,
|
|
metaProps: {
|
|
code: '2cf233823c8611f09832770e0626f11a',
|
|
name: '9b419213',
|
|
component: {
|
|
labelPosition: 'right',
|
|
showLabel: true,
|
|
row: {
|
|
colNum: 2,
|
|
},
|
|
},
|
|
},
|
|
controls: {
|
|
hidden: false,
|
|
},
|
|
children: [
|
|
{
|
|
category: sysCategory,
|
|
componentCode: '2cf25a913c8611f09832770e0626f11a',
|
|
area: 'default',
|
|
type: 'SLOT',
|
|
metaProps: {
|
|
code: '2cf25a903c8611f09832770e0626f11a',
|
|
name: 'default',
|
|
component: {},
|
|
},
|
|
controls: {},
|
|
children: [
|
|
{
|
|
category: sysCategory,
|
|
modelId,
|
|
fieldId: '',
|
|
componentCode: '2e266dc03c8611f09832770e0626f11a',
|
|
type: 'TEXT_INPUT',
|
|
required: false,
|
|
metaProps: {
|
|
code: '2e266dc03c8611f09832770e0626f11a',
|
|
name: '4a4ae664',
|
|
formItem: {
|
|
label: '文本',
|
|
showLabel: true,
|
|
labelPosition: 'left',
|
|
},
|
|
col: {
|
|
span: 12,
|
|
},
|
|
component: {
|
|
placeholder: '请输入',
|
|
},
|
|
labelTips: {
|
|
content: '',
|
|
},
|
|
},
|
|
controls: {
|
|
hidden: false,
|
|
},
|
|
defaultValue: [],
|
|
max: '50',
|
|
min: '0',
|
|
children: [],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
view: listView,
|
|
script: '',
|
|
pageComponent: [
|
|
{
|
|
category: sysCategory,
|
|
componentCode: '2cf25a923c8611f09832770e0626f11a',
|
|
type: 'PAGE_ROOT',
|
|
modelId,
|
|
metaProps: {
|
|
code: '2cf25a923c8611f09832770e0626f11a',
|
|
name: '06aa5184',
|
|
component: {
|
|
labelPosition: 'right',
|
|
showLabel: true,
|
|
row: {
|
|
colNum: 2,
|
|
},
|
|
},
|
|
},
|
|
controls: {
|
|
hidden: false,
|
|
},
|
|
children: [
|
|
{
|
|
category: sysCategory,
|
|
componentCode: '2cf25a943c8611f09832770e0626f11a',
|
|
area: 'default',
|
|
type: 'SLOT',
|
|
metaProps: {
|
|
code: '2cf25a933c8611f09832770e0626f11a',
|
|
name: 'default',
|
|
component: {},
|
|
},
|
|
controls: {},
|
|
children: [],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
|
|
},
|
|
});
|
|
}),
|
|
];
|
|
|
|
export default handlers;
|