import { MockAdapter } from '../mock-adapter';
const mock = MockAdapter.getInstance();

import Mock from 'mockjs'
const Random = Mock.Random;

// 获取全部数组
mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
    let status = MockAdapter.mockStatus(config);
    return [status, [
        {
        srfkey: 'CodeList121',
        emptytext: '未定义',
        "codelisttype":"static",
        items: [
            {
                id: 'A1',
                label: '轿车',
                text: '轿车',
                value: 'A1',
                disabled: false,
            },
            {
                id: 'A2',
                label: '客车',
                text: '客车',
                value: 'A2',
                disabled: false,
            },
        ]
    },
    {
        "srfkey": "SysOperator",
        "emptytext": "未定义",
        "codelisttype":"dynamic",
        "appdataentity":"",
        "appdedataset":"",
        "items": []
    },
    {
        srfkey: 'CodeList123',
        emptytext: '未定义',
        "codelisttype":"static",
        items: [
            {
                id: 'A',
                label: 'A-进口',
                text: 'A-进口',
                value: 'A',
                disabled: false,
            },
            {
                id: 'B',
                label: 'B-国产',
                text: 'B-国产',
                value: 'B',
                disabled: false,
            },
        ]
    },
    {
        srfkey: 'CodeList122',
        emptytext: '未定义',
        "codelisttype":"static",
        items: [
            {
                id: 'A1',
                label: '蓝色',
                text: '蓝色',
                value: 'A1',
                disabled: false,
            },
            {
                id: 'A2',
                label: '黄色',
                text: '黄色',
                value: 'A2',
                disabled: false,
            },
            {
                id: 'A3',
                label: '绿色',
                text: '绿色',
                value: 'A3',
                disabled: false,
            },
            {
                id: 'A4',
                label: '黑色',
                text: '黑色',
                value: 'A4',
                disabled: false,
            },
        ]
    }
    ]];
});
