
import { ProcessReport } from 'pc-component-v3';

import {
    Login,
    Desktop,
    Dashboard,
    SheetWindow,
    TabFormEdit1,
    TabFormView1,
    AttributeEditPanel,
    TabAudit,
    Approve,
    RoleCurdField,
    RoleCurdFieldTab,
    TabDataSort,
    WorkflowEdit,
    DataImportPanel,
    Notification,
    SingleNotification,
    GenerateDocumentTool,
    UserParameters,
    OrganizationEditPanel,
    BarCodeEdit,
    Archive,
    UserSearch,
    Monitor,
    BatchUpdateField,
    ActivitiAdmin,
    DocManagement,
    PrintPage,
    NotFound,
    Camera,
    Cropper,
    WebSocketCapture,
    WebRtcCapture,
    InfoWindowPage,
    TaskProcessManagement,
    ExecutionList,
    NoRole,
    PrivacyStatement,
    StudyVideo,
    ResetPassword,
    PdfPrint,
    RetrievePassword,
    KnowledgeTrain1,
    KnowledgeTrainAnswer,
    ReportApprove,
    ExcelReport,
    DateExcelReport,
    DelegationReport,
    DataArchive,
    ArchivalRecord,
    ExcelImport,
    IdentityManager,
    CreateIdentity,
    SamlLogin,
    CasLogin,
    PrinterConfiguration,
    CurdWindow1,
    ShortcutMenu,
    FlowChart,
    DeviceManagement,
    DeviceTimingSwitcher,
    OperationLog,
    ViewEdit,
    LoginGraphic,
    LoginNode,
} from 'client-base-v5/dist/client-base-v5.js';


const router = [
    { path: '/', redirect: '/login' },
    {
        path: '/login',
        component: Login,
        meta: {
            loginRequired: false,
        },
    },
    {
        path: '/samlLogin',
        component: SamlLogin,
        meta: {
            loginRequired: false,
        },
    },
    {
        path: '/casLogin',
        component: CasLogin,
        meta: {
            loginRequired: false,
        },
    },
    {
        path: '/desktop', component: Desktop,
        children: [
            //仪表盘
            {
                path: 'dashboard',
                component: Dashboard,
                meta: {
                    loginRequired: false,
                    functionAccessArray: [
                        {
                            functionNo: '资产仪表盘',
                            itemNo: ['公司资产统计', '部门资产统计'],
                        },
                        {
                            functionNo: '仓库仪表盘',
                            itemNo: '出入库统计',
                        },
                    ],
                },
            },
            // Web电子表格 窗口
            { path: 'sheetWindow/:windowNo', component: SheetWindow },

            // 快捷菜单
            { path: 'shortcutMenu',name:'ShortcutMenu', component: ShortcutMenu },


            { path: 'window1/:windowNo', component: CurdWindow1 },

            // eslint-disable-next-line
            { path: 'window1/window-edit/:type/:uuid', component: TabFormEdit1 },
            // eslint-disable-next-line
            { path: 'window1/window-edit/:type/:windowNo/:tabIndex', component: TabFormEdit1 },
            // eslint-disable-next-line
            { path: 'window1/window-edit/:type/:windowNo/:tabIndex/:recordId', component: TabFormEdit1 },

            // CRUD不可编辑窗口
            // eslint-disable-next-line
            { path: 'window1/window-read/:type/:uuid', component: TabFormView1 },
            // eslint-disable-next-line
            { path: 'window1/window-read/:type/:windowNo/:tabIndex/:recordId', component: TabFormView1 },

            // 属性编辑窗口
            {
                path: 'attribute-edit/:uuid', component: AttributeEditPanel,
                'meta': {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220321_212846',
                            'itemNo': '1',
                        },
                    ],
                },
            },
            // 审计数据窗口
            { path: 'window/window-audit/:uuid', component: TabAudit },
            // 查询窗口
            { path: 'info/:infoWindowNo', component: InfoWindowPage },

            // 流程和报口
            { path: 'process-report/:no', component: ProcessReport },
            // 审批
            { path: 'approve', component: Approve },
            // 无权限访问界面
            { path: 'no-role', component: NoRole },
            //角色CURD访问权限（父页签）
            {
                path: 'roleCurdField',
                component: RoleCurdField,
                meta: {
                    loginRequired: true,
                    functionAccessArray: [
                        {
                            functionNo: 'xxx',
                            itemNo: ['x1', 'x2'],
                        },
                        {
                            functionNo: 'yyy',
                            itemNo: 'y1',
                        },
                    ],
                },
            },

            //角色CURD访问权限（子页签）
            {
                path: 'roleCurdFieldTab', component: RoleCurdFieldTab,
                'meta': {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220321_212846',
                            'itemNo': '1',
                        },
                    ],
                },
            },

            // 页签字段排序
            { path: 'tab-data-sort/:uuid', component: TabDataSort },
            // 工作流编辑
            {
                path: 'workflow-edit', component: WorkflowEdit,
                meta: {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220424_144806',
                            'itemNo': '1',
                        },
                    ],
                },
            },
            // 数据导入
            {
                path: 'data-import-panel', component: DataImportPanel,
                meta: {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220328_093317',
                            'itemNo': '2',
                        },
                        {
                            'functionNo': '20220712_133418',
                            'itemNo': '1',
                        },
                    ],
                },

            },
            // 数据导入
            { path: 'data-import-panel/:uuid', component: DataImportPanel },
            // 通知
            { path: 'notification', component: Notification },
            // 单条通知
            // eslint-disable-next-line
            { path: 'single-notification/:messageId', component: SingleNotification },
            // 生单
            // eslint-disable-next-line
            { path: 'generate-document/:type/:infoWindowNo/:uuid', component: GenerateDocumentTool },
            // 用户参数
            { path: 'userParameters', component: UserParameters },
            // 部门编辑
            {
                path: 'OrganizationEditPanel', component: OrganizationEditPanel,
                meta: {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220314_103037',
                            'itemNo': '2',
                        },
                    ],
                },
            },
            // 条码编辑（老编辑器）
            {
                path: 'barCode-edit-o', component: BarCodeEdit,
                meta: {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220328_092713',
                            'itemNo': '3',
                        },
                    ],
                },
            },
            // 归档
            { path: 'archive', component: Archive },
            // 归档
            { path: '/desktop/dataArchive', component: DataArchive },
            // 归档记录
            { path: '/desktop/ArchivalRecord', component: ArchivalRecord },
            //用户搜索
            { path: 'userSearch', component: UserSearch },
            //抓拍
            { path: 'monitor', component: Monitor },
            //批量修改字段
            {
                path: 'batchUpdateField/:uuid', component: BatchUpdateField,
                'meta': {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220322_095822',
                            'itemNo': '1',
                        },
                    ],
                },
            },
            // 工作流管理员2019
            { path: 'activitiAdmin', component: ActivitiAdmin },
            // 工作流管理员2019
            {
                path: 'DocManagement', component: DocManagement,
                'meta': {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220424_144806',
                            'itemNo': '1',
                        },
                    ],
                },
            },




            // 任务流程管理
            {
                path: 'taskProcessManagement', component: TaskProcessManagement,
                meta: {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220424_144806',
                            'itemNo': '1',
                        },
                    ],
                },
            },

            // 执行列表
            {
                path: 'executionList', component: ExecutionList,
                meta: {
                    'loginRequired': true,
                    'functionAccessArray': [
                        {
                            'functionNo': '20220424_144806',
                            'itemNo': '1',
                        },
                    ],
                },
            },

            { path: 'pdf-print', component: PdfPrint },

            { path: 'report-approve', component: ReportApprove },
        ],
    },

    // 打印页面
    { path: '/single/PrintPage', component: PrintPage },

    { path: '/webrt', component: WebRtcCapture },
    { path: '/WebSocketCapture', component: WebSocketCapture },
    { path: '/cropper', component: Cropper },
    { path: '/camera', component: Camera },

    { path: '/notFound', component: NotFound },
    { path: '/privacy-statement', component: PrivacyStatement },
    { path: '/studyVideo', component: StudyVideo },
    { path: '/resetPassword', component: ResetPassword },

    { path: '/retrievePassword', component: RetrievePassword },
    { path: '/knowledgeTrain', component: KnowledgeTrain1 },
    { path: '/knowledgeTrainAnswer', component: KnowledgeTrainAnswer },
    { path: '/excelReport/:processReportNo', component: ExcelReport },
    { path: '/dateExcelReport/:processReportNo', component: DateExcelReport },
    { path: '/desktop/delegationReport', component: DelegationReport },
    { path: '/desktop/excelImport', component: ExcelImport },
    { path: '/desktop/identityManager', component: IdentityManager },
    { path: '/desktop/CreateIdentity', component: CreateIdentity },
    { path: '/desktop/printerConfiguration', component: PrinterConfiguration },
    { path: '/desktop/flowChart', component: FlowChart },
    { path: '/desktop/deviceManagement', component: DeviceManagement },
    { path: '/desktop/deviceTimingSwitcher', component: DeviceTimingSwitcher },
    { path: '/desktop/operationLog', component: OperationLog },
    { path: '/desktop/viewEdit', component: ViewEdit },
    { path: '/loginGraphic', component: LoginGraphic },
    { path: '/loginNode', component: LoginNode },
];

export default router;