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

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

// 获取全部数组
mock.onGet('./assets/json/portlet-data.json').reply((config: any) => {
    let status = MockAdapter.mockStatus(config);
    return [status,
    [
        {"type":"appde",
    "appCodeName":"EMEquip",
    "appName":"设备档案",
    "portletCodeName": "EQNumPie",
    "portletName": "各类型设备数量统计",
    "groupCodeName":"EquipPortletCat",
    "groupName":"设备类统计",
    "portletTYpe":"CHART","componentName":"emequip-eqnum-pie-portlet"},
    {"type":"appde",
    "appCodeName":"EMEQSpare",
    "appName":"备件包",
    "portletCodeName": "MainView9",
    "portletName": "备件包信息",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"VIEW","componentName":"emeqspare-main-view9-portlet"},
    {"type":"appde",
    "appCodeName":"EMWO",
    "appName":"工单",
    "portletCodeName": "YearWoTrend",
    "portletName": "年度工单数量统计柱状图",
    "groupCodeName":"WoPortletCat",
    "groupName":"工单类统计",
    "portletTYpe":"CHART","componentName":"emwo-year-wo-trend-portlet"},
    {"type":"appde",
    "appCodeName":"EMStock",
    "appName":"库存",
    "portletCodeName": "StoclCntBar",
    "portletName": "物品库存统计",
    "groupCodeName":"ItemPortletCat",
    "groupName":"物料类统计",
    "portletTYpe":"CHART","componentName":"emstock-stocl-cnt-bar-portlet"},
    {"type":"appde",
    "appCodeName":"EMEQSpareMap",
    "appName":"备件包引用",
    "portletCodeName": "GridView9",
    "portletName": "备件包应用",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"VIEW","componentName":"emeqspare-map-grid-view9-portlet"},
    {"type":"appde",
    "appCodeName":"EMEQSpareDetail",
    "appName":"备件包明细",
    "portletCodeName": "GridView92",
    "portletName": "备件物品",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"VIEW","componentName":"emeqspare-detail-grid-view9-portlet"},
    {"type":"appde",
    "appCodeName":"EMWPList",
    "appName":"采购申请",
    "portletCodeName": "WpAmountFunnel",
    "portletName": "采购金额统计",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"emwplist-wp-amount-funnel-portlet"},
    {"type":"appde",
    "appCodeName":"EMPODetail",
    "appName":"订单条目",
    "portletCodeName": "PeDetailLine",
    "portletName": "年度采购金额统计",
    "groupCodeName":"ItemPortletCat",
    "groupName":"物料类统计",
    "portletTYpe":"CHART","componentName":"empodetail-pe-detail-line-portlet"},
    {"type":"app",
    "appCodeName":"EMEquip",
    "appName":"设备档案",
    "portletCodeName": "EQNumPie",
    "portletName": "各类型设备数量统计",
    "groupCodeName":"EquipPortletCat",
    "groupName":"设备类统计",
    "portletTYpe":"CHART","componentName":"app-emequip-eqnum-pie-portlet"},
    {"type":"app",
    "appCodeName":"EMEQSpare",
    "appName":"备件包",
    "portletCodeName": "MainView9",
    "portletName": "备件包信息",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"VIEW","componentName":"app-emeqspare-main-view9-portlet"},
    {"type":"app",
    "appCodeName":"EMEQSpareMap",
    "appName":"备件包引用",
    "portletCodeName": "GridView9",
    "portletName": "备件包应用",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"VIEW","componentName":"app-emeqspare-map-grid-view9-portlet"},
    {"type":"app",
    "appCodeName":"EMEQSpareDetail",
    "appName":"备件包明细",
    "portletCodeName": "GridView92",
    "portletName": "备件物品",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"VIEW","componentName":"app-emeqspare-detail-grid-view9-portlet"},
    {"type":"app",
    "appCodeName":"EMWO",
    "appName":"工单",
    "portletCodeName": "YearWoTrend",
    "portletName": "年度工单数量统计柱状图",
    "groupCodeName":"WoPortletCat",
    "groupName":"工单类统计",
    "portletTYpe":"CHART","componentName":"app-emwo-year-wo-trend-portlet"},
    {"type":"app",
    "appCodeName":"EMPODetail",
    "appName":"订单条目",
    "portletCodeName": "PeDetailLine",
    "portletName": "年度采购金额统计",
    "groupCodeName":"ItemPortletCat",
    "groupName":"物料类统计",
    "portletTYpe":"CHART","componentName":"app-empodetail-pe-detail-line-portlet"},
    {"type":"app",
    "appCodeName":"EMStock",
    "appName":"库存",
    "portletCodeName": "StoclCntBar",
    "portletName": "物品库存统计",
    "groupCodeName":"ItemPortletCat",
    "groupName":"物料类统计",
    "portletTYpe":"CHART","componentName":"app-emstock-stocl-cnt-bar-portlet"},
    {"type":"app",
    "appCodeName":"EMWPList",
    "appName":"采购申请",
    "portletCodeName": "WpAmountFunnel",
    "portletName": "采购金额统计",
    "groupCodeName":"Ungroup",
    "groupName":"（未分类）",
    "portletTYpe":"CHART","componentName":"app-emwplist-wp-amount-funnel-portlet"}
    ]];
});