import {useRootStore} from "@/pinia/useStore";
import router from "@/router";
export  function getMenu(){
    debugger
    let userCode = localStorage.getItem("xyxx_usercode")
    let username = localStorage.getItem("xyxx_username")
    let store = useRootStore();
    if(userCode == "1"){
        store.leftMenuList = [
            {
                "children":[
                    {
                        "path":"policy-regulation-information",
                        "name":"政策法规信息"
                    },
                    {
                        "path":"memorandum-manage",
                        "name":"备忘录管理"
                    }
                ],
                "O_LCON":"iconfont icon-wenjianguanli iconColor",
                "path":"/",
                "name":"政策法规管理"
            },
            {
                "children":[
                    {
                        "path":"city-credit-information-platform-search",
                        "name":"市信用信息平台查询"
                    },
                    {
                        "children":[
                            {
                                "path":"relative-person-search",
                                "name":"按相对人查询"
                            },
                            {
                                "path":"matter-search",
                                "name":"按事项查询"
                            }
                        ],
                        "path":"/66",
                        "name":"委信用信息库查询"
                    },
                    {
                        "path":"commission-three-inventory-information-manage",
                        "name":"委三清单信息管理"
                    },
                    {
                        "path":"commission-credit-information-manage",
                        "name":"委信用信息管理"
                    }
                ],
                "O_LCON":"iconfont icon-xinyong iconColor",
                "path":"/99",
                "name":"信用信息"
            },
            {
                "children":[
                    {
                        "path":"memorandum-manage",
                        "name":"备忘录管理"
                    },
                    {
                        "path":"rewards-and-punishments-measure-manage",
                        "name":"奖惩措施管理"
                    },
                    {
                        "path":"combined-reward-and-punishments-measure-manage",
                        "name":"联合奖惩案例信息"
                    },
                ],
                "O_LCON":"iconfont icon-medal iconColor",
                "path":"/15",
                "name":"联合奖惩"
            },
            {
                "children":[
                    {
                        "path":"data-imputation-push",
                        "name":"数据归集推送"
                    },
                    {
                        "path":"apply-information",
                        "name":"应用情况"
                    },
                    {
                        "path":"credit-repair",
                        "name":"信用修复"
                    },
                    {
                        "path":"combined-rewards-and-punishments",
                        "name":"联合奖惩"
                    },
                    {
                        "path":"data-log",
                        "name":"数据日志"
                    },
                ],
                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
                "path":"/21",
                "name":"信用数据"
            },
            {
                "children":[
                    {
                        "path":"user-manage",
                        "name":"用户管理"
                    },
                    {
                        "path":"unit-manage",
                        "name":"单位管理"
                    },
                    {
                        "path":"user-log",
                        "name":"用户日志"
                    },
                    {
                        "path":"system-explain",
                        "name":"系统说明"
                    },
                ],
                "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
                "path":"/26",
                "name":"系统管理"
            },
        ]
        store.isManager = true;
    }else{
        store.isManager = false;
    }
    if(userCode == "529" && username=="youke"){
        store.leftMenuList = [
            {
                "children":[
                    {
                        "path":"data-imputation-push",
                        "name":"数据归集推送"
                    }
                ],
                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
                "path":"/21",
                "name":"信用数据"
            },
        ]
    }
    if(username == "sjsj"){
        store.leftMenuList = [{
            "children":[
                {
                    "path":"user-log",
                    "name":"用户日志"
                }
            ],
            "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
            "path":"/26",
            "name":"系统管理"
        }]
        router.push('/main/user-log');
        store.defaultActive = 'user-log用户日志'
    }else{
        router.push('/main/data-imputation-push');
        store.defaultActive = 'data-imputation-push数据归集推送'
    }

    if(userCode == "1"){
        store.leftMenuList = [
            {
                "children":[
                    {
                        "path":"policy-regulation-information",
                        "name":"政策法规信息"
                    },
                    {
                        "path":"memorandum-manage",
                        "name":"备忘录管理"
                    }
                ],
                "O_LCON":"iconfont icon-wenjianguanli iconColor",
                "path":"/",
                "name":"政策法规管理"
            },
            {
                "children":[
                    {
                        "path":"city-credit-information-platform-search",
                        "name":"市信用信息平台查询"
                    },
                    {
                        "children":[
                            {
                                "path":"relative-person-search",
                                "name":"按相对人查询"
                            },
                            {
                                "path":"matter-search",
                                "name":"按事项查询"
                            }
                        ],
                        "path":"/66",
                        "name":"委信用信息库查询"
                    },
                    {
                        "path":"commission-three-inventory-information-manage",
                        "name":"委三清单信息管理"
                    },
                    {
                        "path":"commission-credit-information-manage",
                        "name":"委信用信息管理"
                    }
                ],
                "O_LCON":"iconfont icon-xinyong iconColor",
                "path":"/99",
                "name":"信用信息"
            },
            {
                "children":[
                    {
                        "path":"memorandum-manage",
                        "name":"备忘录管理"
                    },
                    {
                        "path":"rewards-and-punishments-measure-manage",
                        "name":"奖惩措施管理"
                    },
                    {
                        "path":"combined-reward-and-punishments-measure-manage",
                        "name":"联合奖惩案例信息"
                    },
                ],
                "O_LCON":"iconfont icon-medal iconColor",
                "path":"/15",
                "name":"联合奖惩"
            },
            {
                "children":[
                    {
                        "path":"data-imputation-push",
                        "name":"数据归集推送"
                    },
                    {
                        "path":"apply-information",
                        "name":"应用情况"
                    },
                    {
                        "path":"credit-repair",
                        "name":"信用修复"
                    },
                    {
                        "path":"combined-rewards-and-punishments",
                        "name":"联合奖惩"
                    },
                    {
                        "path":"data-log",
                        "name":"数据日志"
                    },
                ],
                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
                "path":"/21",
                "name":"信用数据"
            },
            {
                "children":[
                    {
                        "path":"user-manage",
                        "name":"用户管理"
                    },
                    {
                        "path":"unit-manage",
                        "name":"单位管理"
                    },
                    {
                        "path":"user-log",
                        "name":"用户日志"
                    },
                    {
                        "path":"system-explain",
                        "name":"系统说明"
                    },
                ],
                "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
                "path":"/26",
                "name":"系统管理"
            },
        ]
    }else if(userCode == "529" && username=="youke"){
        store.leftMenuList = [
            {
                "children":[
                    {
                        "path":"data-imputation-push",
                        "name":"数据归集推送"
                    }
                ],
                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
                "path":"/21",
                "name":"信用数据"
            },
        ]
    }else if(username == "sjsj"){
        store.leftMenuList = [{
            "children":[
                {
                    "path":"user-log",
                    "name":"用户日志"
                }
            ],
            "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
            "path":"/26",
            "name":"系统管理"
        }]
    }else{
        store.leftMenuList = [
            {
                "children":[
                    {
                        "path":"policy-regulation-information",
                        "name":"政策法规信息"
                    },
                    {
                        "path":"memorandum-manage",
                        "name":"备忘录管理"
                    }
                ],
                "O_LCON":"iconfont icon-wenjianguanli iconColor",
                "path":"/",
                "name":"政策法规管理"
            },
            {
                "children":[
                    {
                        "path":"city-credit-information-platform-search",
                        "name":"市信用信息平台查询"
                    },
                    {
                        "children":[
                            {
                                "path":"relative-person-search",
                                "name":"按相对人查询"
                            },
                            {
                                "path":"matter-search",
                                "name":"按事项查询"
                            }
                        ],
                        "path":"/66",
                        "name":"委信用信息库查询"
                    },
                    {
                        "path":"commission-three-inventory-information-manage",
                        "name":"委三清单信息管理"
                    },
                    {
                        "path":"commission-credit-information-manage",
                        "name":"委信用信息管理"
                    }
                ],
                "O_LCON":"iconfont icon-xinyong iconColor",
                "path":"/99",
                "name":"信用信息"
            },
            {
                "children":[
                    {
                        "path":"memorandum-manage",
                        "name":"备忘录管理"
                    },
                    {
                        "path":"rewards-and-punishments-measure-manage",
                        "name":"奖惩措施管理"
                    },
                    {
                        "path":"combined-reward-and-punishments-measure-manage",
                        "name":"联合奖惩案例信息"
                    },
                ],
                "O_LCON":"iconfont icon-medal iconColor",
                "path":"/15",
                "name":"联合奖惩"
            },
            {
                "children":[
                    {
                        "path":"data-imputation-push",
                        "name":"数据归集推送"
                    },
                    {
                        "path":"apply-information",
                        "name":"应用情况"
                    },
                    {
                        "path":"credit-repair",
                        "name":"信用修复"
                    },
                    {
                        "path":"combined-rewards-and-punishments",
                        "name":"联合奖惩"
                    },
                    {
                        "path":"data-log",
                        "name":"数据日志"
                    },
                ],
                "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
                "path":"/21",
                "name":"信用数据"
            }
        ]
    }

}