'use strict';

/**
 * 前台菜单配置
 *
 * @author CaiAoLin
 * @date 2017/11/29
 * @version
 */

const menu = {
    dashboard: {
        name: '待办事项',
        icon: 'fa-check-square-o',
        display: true,
        url: '/dashboard',
        children: null,
        caption: '待办',
    },
    tender: {
        name: '标段管理',
        icon: 'fa-list-ul',
        display: true,
        url: '/list',
        children: null,
        caption: '项目',
    },
    sum: {
        name: '总分包',
        icon: 'fa-sitemap',
        display: true,
        url: '/sum',
        children: null,
        caption: '',
    },
};

const tenderMenu = {
    info: {
        name: '标段概况',
        display: false,
        children: [
            {
                name: '标段概况',
                icon: '<i class="fa fa-pie-chart"></i> ',
                display: true,
                url: '',
            },
        ],
    },
    ledger: {
        name: '0号台帐',
        icon: '<i class="fa fa-list-alt"></i> ',
        display: true,
        children: [
            {
                name: '台帐分解',
                display: true,
                url: '/ledger/explode',
            }, {
                name: '台帐审批',
                display: true,
                url: '/ledger/audit',
            }, {
                name: '台帐修订',
                display: true,
                url: '/ledger/change',
            },
        ],
    },
    measure: {
        name: '计量台帐',
        icon: '<i class="fa fa-calendar-check-o"></i> ',
        display: true,
        children: [
            {
                name: '期列表',
                display: true,
                url: '/measure/stage',
            // }, {
            //     name: '清单汇总',
            //     display: true,
            //     url: '/measure/gather',
            }, {
                name: '多期比较',
                display: true,
                url: '/measure/compare',
            },
        ],
    },
    change: {
        name: '工程变更',
        display: false,
        children: [
            {
                name: '工程变更',
                icon: '<i class="fa fa-retweet"></i> ',
                display: true,
                url: '/change',
            },
        ],
    },
    report: {
        name: '报表',
        display: false,
        children: [
            {
                name: '报表',
                icon: '<i class="fa fa-file-text-o"></i> ',
                display: true,
                url: '/report',
            },
        ],
    },
};

const stageMenu = {
    back: {
        name: '返回',
        display: false,
        children: [
            {
                name: '返回',
                icon: '<i class="fa fa-chevron-left "></i> ',
                display: true,
                url: '/measure/stage',
                fixedUrl: true,
            },
        ],
    },
    ledger: {
        name: '本期计量台帐',
        display: false,
        children: [
            {
                name: '本期计量台帐',
                icon: '',
                display: true,
                url: '',
                class: ' class="ml-3"',
            },
        ],
    },
    detail: {
        name: '中间计量',
        display: false,
        children: [
            {
                name: '中间计量',
                icon: '',
                display: true,
                url: '/detail',
                class: ' class="ml-3"',
            },
        ],
    },
    pay: {
        name: '合同支付',
        display: false,
        children: [
            {
                name: '合同支付',
                icon: '',
                display: true,
                url: '/pay',
                class: ' class="ml-3"',
            },
        ],
    },
    change: {
        name: '变更令',
        display: false,
        children: [
            {
                name: '变更令',
                icon: '',
                display: true,
                url: '/change',
                class: ' class="ml-3"',
            },
        ],
    },
    gather: {
        name: '清单汇总',
        display: false,
        children: [
            {
                name: '清单汇总',
                icon: '',
                display: true,
                url: '/gather',
                class: ' class="ml-3"',
            },
        ],
    },
    compare: {
        name: '审核比较',
        display: false,
        children: [
            {
                name: '审核比较',
                icon: '',
                display: true,
                url: '/compare',
                class: ' class="ml-3"',
            },
        ],
    },
    report: {
        name: '报表',
        display: false,
        children: [
            {
                name: '报表',
                icon: '<i class="fa fa-file-text-o"></i> ',
                display: true,
                url: '/report',
                class: '',
            },
        ],
    },
};

const sumMenu = {
    info: {
        name: '总包概况',
        display: false,
        children: [
            {
                name: '总包概况',
                icon: '<i class="fa fa-pie-chart"></i> ',
                display: true,
                url: '/sum',
            },
        ],
    },
    stage: {
        name: '上报期',
        display: false,
        children: [
            {
                name: '上报期',
                icon: '<i class="fa fa-calendar-check-o"></i> ',
                display: true,
                url: '/sum/stage',
            },
        ],
    },
};

const settingMenu = {
    info: {
        name: '项目信息',
        display: true,
        url: '/setting/info',
        caption: '项目信息',
    },
    user: {
        name: '账号设置',
        display: true,
        url: '/setting/user',
        caption: '账号设置',
    },
    category: {
        name: '标段自定义类别',
        display: true,
        url: '/setting/category',
        caption: '标段自定义类别',
    },
};

module.exports = {
    menu,
    tenderMenu,
    stageMenu,
    sumMenu,
    settingMenu,
};
