You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
991 lines
27 KiB
Vue
991 lines
27 KiB
Vue
<template>
|
|
<div id="asider-wrapper">
|
|
<div class="asider-icon">
|
|
<div></div>
|
|
</div>
|
|
<!-- 左边导航栏颜色 background-color="#f78989"-->
|
|
<el-menu :default-active="indexPath" :default-openeds="openeds" :unique-opened='true' class="el-menu-vertical-demo max-height-95" @select="open" @open="handleOpen" @close="handleClose" :collapse="collapse" active-text-color="#5e9af5" text-color="white">
|
|
<!-- 循环遍历列表 -->
|
|
<template>
|
|
<el-submenu v-for="(item,index) in menuList" :key="index" :index="item.index" v-role='item.number' id="icon">
|
|
<template slot="title">
|
|
<i :class="item.icon"></i>
|
|
<span slot="title">{{item.name}}</span>
|
|
</template>
|
|
<router-link v-for="(items,indexs) in item.menuLists" :key="indexs" :to="items.route" v-role='items.number' tag="p">
|
|
<el-menu-item :index="items.index" @click="rowClick(items)">
|
|
<i :class="items.icon"></i>
|
|
<span slot="title">{{items.name}}</span>
|
|
</el-menu-item>
|
|
</router-link>
|
|
</el-submenu>
|
|
</template>
|
|
<!-- <router-link :to="'/AboutUs'" tag="p" id="icons">
|
|
<el-menu-item index="4">
|
|
<i class="el-icon-office-building"></i>
|
|
<span slot="title">关于我们</span>
|
|
</el-menu-item>
|
|
</router-link> -->
|
|
</el-menu>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import $ from "jquery";
|
|
import { mapState } from "vuex";
|
|
import bus from "./bus";
|
|
export default {
|
|
name: "asider",
|
|
data() {
|
|
return {
|
|
openeds: [],
|
|
// screenHeight: document.body.clientHeight,
|
|
fullHeight: document.documentElement.clientHeight - 160,
|
|
indexPath: "",
|
|
sessionStorageData: {}, //门店参数集合
|
|
isShow: false,
|
|
search: "",
|
|
rowList: [],
|
|
menuList: [
|
|
{
|
|
name: "系统设置",
|
|
icon: "el-icon-mobile-phone",
|
|
index: "400",
|
|
number: "400",
|
|
menuLists: [
|
|
{
|
|
name: "首页",
|
|
icon: "el-icon-s-home",
|
|
route: "/home",
|
|
index: "home",
|
|
number: "400",
|
|
},
|
|
{
|
|
name: "门店参数",
|
|
icon: "el-icon-s-data",
|
|
route: "/storeParameters",
|
|
index: "storeParameters",
|
|
number: "400100",
|
|
},
|
|
{
|
|
name: "微信公众号",
|
|
icon: "el-icon-s-data",
|
|
route: "/tencentAccount",
|
|
index: "tencentAccount",
|
|
number: "400110",
|
|
},
|
|
{
|
|
name: "角色档案",
|
|
icon: "el-icon-user",
|
|
route: "/role",
|
|
index: "role",
|
|
number: "400210",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "基础档案",
|
|
icon: "el-icon-menu",
|
|
index: "410",
|
|
number: "400",
|
|
menuLists: [
|
|
{
|
|
name: "项目类别",
|
|
icon: "el-icon-reading",
|
|
route: "/baseProjectType",
|
|
index: "baseProjectType",
|
|
number: "400400",
|
|
},
|
|
{
|
|
name: "项目",
|
|
icon: "el-icon-files",
|
|
route: "/baseProject",
|
|
index: "baseProject",
|
|
number: "400500",
|
|
},
|
|
{
|
|
name: "充值类别",
|
|
icon: "el-icon-coin",
|
|
route: "/rechargeType",
|
|
index: "rechargeType",
|
|
number: "400600",
|
|
},
|
|
{
|
|
name: "房间档案",
|
|
icon: "el-icon-s-home",
|
|
route: "/room",
|
|
index: "room",
|
|
number: "400810",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "员工管理",
|
|
icon: "el-icon-user",
|
|
index: "420",
|
|
number: "400",
|
|
menuLists: [
|
|
{
|
|
name: "职务档案",
|
|
icon: "el-icon-user-solid",
|
|
route: "/gradeList",
|
|
index: "gradeList",
|
|
number: "400210",
|
|
},
|
|
{
|
|
name: "工种档案",
|
|
icon: "el-icon-s-custom",
|
|
route: "/jobList",
|
|
index: "jobList",
|
|
number: "400220",
|
|
},
|
|
{
|
|
name: "员工",
|
|
icon: "el-icon-user",
|
|
route: "/baseStaff",
|
|
index: "baseStaff",
|
|
number: "400200",
|
|
},
|
|
{
|
|
name: "员工作品",
|
|
icon: "el-icon-info",
|
|
route: "/staffWorks",
|
|
index: "staffWorks",
|
|
number: "400300",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
name: "会员管理",
|
|
icon: "el-icon-s-custom",
|
|
index: "430",
|
|
number: "400",
|
|
menuLists: [
|
|
{
|
|
name: "会员清单",
|
|
icon: "el-icon-view",
|
|
route: "/memberList",
|
|
index: "memberList",
|
|
number: "400700",
|
|
},
|
|
{
|
|
name: "会员等级",
|
|
icon: "el-icon-info",
|
|
route: "/memberClass",
|
|
index: "memberClass",
|
|
number: "400720",
|
|
},
|
|
{
|
|
name: "会员分派",
|
|
icon: "el-icon-c-scale-to-original",
|
|
route: "/menmberAllot",
|
|
index: "menmberAllot",
|
|
number: "400800",
|
|
},
|
|
{
|
|
name: "员工会员统计表",
|
|
icon: "el-icon-sunset",
|
|
route: "/staffVipSum",
|
|
index: "staffVipSum",
|
|
number: "400900",
|
|
},
|
|
{
|
|
name: "会员交易记录",
|
|
icon: "el-icon-s-order",
|
|
route: "/trading",
|
|
index: "trading",
|
|
number: "4001100",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
name: "加盟商管理",
|
|
icon: "el-icon-s-promotion",
|
|
index: "440",
|
|
number: "4400",
|
|
menuLists: [
|
|
// {
|
|
// name: "激活会员",
|
|
// icon: "el-icon-info",
|
|
// route: "/activationMember",
|
|
// index: "activationMember",
|
|
// number: "400710",
|
|
// },
|
|
{
|
|
name: "加盟商档案",
|
|
icon: "el-icon-s-check",
|
|
route: "/alliance",
|
|
index: "alliance",
|
|
number: "4008100",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "物资管理",
|
|
icon: "el-icon-s-ticket",
|
|
index: "450",
|
|
number: "4500",
|
|
menuLists: [
|
|
{
|
|
name: "物资",
|
|
icon: "el-icon-s-ticket",
|
|
route: "/materials",
|
|
index: "materials",
|
|
number: "4008100",
|
|
},
|
|
{
|
|
name: "商品",
|
|
icon: "el-icon-s-goods",
|
|
route: "/goods",
|
|
index: "goods",
|
|
number: "400510",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "业绩管理",
|
|
icon: "el-icon-s-flag",
|
|
index: "460",
|
|
number: "400",
|
|
menuLists: [
|
|
{
|
|
name: "门店月度任务",
|
|
icon: "el-icon-s-flag",
|
|
route: "/storeTask",
|
|
index: "storeTask",
|
|
number: "4001000",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "收银员",
|
|
index: "26",
|
|
icon: "el-icon-user-solid",
|
|
number: "500",
|
|
menuLists: [
|
|
{
|
|
name: "房间收银",
|
|
icon: "el-icon-more",
|
|
route: "/roomCash",
|
|
index: "roomCash",
|
|
number: "500200",
|
|
},
|
|
// {
|
|
// name: "员工出勤表",
|
|
// icon: "el-icon-wind-power",
|
|
// route: "/attendanceList",
|
|
// index: "attendanceList",
|
|
// number: "500100"
|
|
// },
|
|
|
|
// {
|
|
// name: "预约",
|
|
// icon: "el-icon-alarm-clock",
|
|
// route: "/subscribe",
|
|
// index: "subscribe"
|
|
// },
|
|
// {
|
|
// name: "测试",
|
|
// icon: "el-icon-alarm-clock",
|
|
// route: "/rece",
|
|
// index: "rece",
|
|
// number:"500100"
|
|
// },
|
|
{
|
|
name: "预约叫号",
|
|
icon: "el-icon-loading",
|
|
route: "/line",
|
|
index: "line",
|
|
number: "500100",
|
|
},
|
|
{
|
|
name: "服务单",
|
|
icon: "el-icon-receiving",
|
|
route: "/shareBill",
|
|
index: "shareBill",
|
|
number: "500200",
|
|
},
|
|
{
|
|
name: "直接收银",
|
|
icon: "el-icon-receiving",
|
|
route: "/services",
|
|
index: "services",
|
|
number: "500200",
|
|
},
|
|
{
|
|
name: "充值",
|
|
icon: "el-icon-info",
|
|
route: "/collectionList",
|
|
index: "collectionList",
|
|
number: "500300",
|
|
},
|
|
{
|
|
name: "疗程",
|
|
icon: "el-icon-bell",
|
|
route: "/reatment",
|
|
index: "reatment",
|
|
number: "500400",
|
|
},
|
|
{
|
|
name: "加价转疗程",
|
|
icon: "el-icon-connection",
|
|
route: "/raiseReatment",
|
|
index: "raiseReatment",
|
|
number: "500410",
|
|
},
|
|
{
|
|
name: "疗程转充值",
|
|
icon: "el-icon-connection",
|
|
route: "/coursetorec",
|
|
index: "coursetorec",
|
|
number: "500410",
|
|
},
|
|
{
|
|
name: "充值内调单",
|
|
icon: "el-icon-sort",
|
|
route: "/within",
|
|
index: "within",
|
|
number: "500410",
|
|
},
|
|
{
|
|
name: "会员转卡",
|
|
icon: "el-icon-sort",
|
|
route: "/transfer",
|
|
index: "transfer",
|
|
number: "4001500",
|
|
},
|
|
// {
|
|
// name: "收款",
|
|
// icon: "el-icon-s-management",
|
|
// route: "/receipt",
|
|
// index: "receipt",
|
|
// },
|
|
{
|
|
name: "充值退",
|
|
icon: "el-icon-warning-outline",
|
|
route: "/refundRecharge",
|
|
index: "refundRecharge",
|
|
number: "500500",
|
|
},
|
|
{
|
|
name: "疗程退",
|
|
icon: "el-icon-s-ticket",
|
|
route: "/refundCourse",
|
|
index: "refundCourse",
|
|
number: "500600",
|
|
},
|
|
{
|
|
name: "消费退",
|
|
icon: "el-icon-sold-out",
|
|
route: "/refund",
|
|
index: "refund",
|
|
number: "500700",
|
|
},
|
|
{
|
|
name: "房间单据退款",
|
|
icon: "el-icon-sold-out",
|
|
route: "/roomRefund",
|
|
index: "roomRefund",
|
|
number: "500710",
|
|
},
|
|
{
|
|
name: "还款单",
|
|
icon: "el-icon-notebook-2",
|
|
route: "/repayment",
|
|
index: "repayment",
|
|
number: "500800",
|
|
},
|
|
{
|
|
name: "异常单",
|
|
icon: "el-icon-question",
|
|
route: "/errorOrder",
|
|
index: "errorOrder",
|
|
number: "500800",
|
|
},
|
|
{
|
|
name: "业绩重算",
|
|
icon: "el-icon-refresh-right",
|
|
route: "/recountOrder",
|
|
index: "recountOrder",
|
|
number: "500800",
|
|
},
|
|
|
|
// {
|
|
// name: "会员账户明细",
|
|
// icon: "el-icon-view",
|
|
// route: "/memberAccount",
|
|
// index: "memberAccount",
|
|
// number: "500900",
|
|
// },
|
|
{
|
|
name: "会员初始化",
|
|
icon: "el-icon-document-add",
|
|
route: "/setImport",
|
|
index: "setImport",
|
|
number: "5001000",
|
|
},
|
|
{
|
|
name: "会员账户管理",
|
|
icon: "el-icon-edit",
|
|
route: "/accountSet",
|
|
index: "accountSet",
|
|
number: "5001100",
|
|
},
|
|
|
|
{
|
|
name: "员工业绩统计",
|
|
icon: "el-icon-s-data",
|
|
route: "/staffPerList",
|
|
index: "staffPerList",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "员工业绩明细",
|
|
icon: "el-icon-view",
|
|
route: "/perDetail",
|
|
index: "perDetail",
|
|
number: "0",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "促销管理",
|
|
index: "30",
|
|
icon: "el-icon-takeaway-box",
|
|
number: "700",
|
|
menuLists: [
|
|
{
|
|
name: "打包价",
|
|
icon: "el-icon-suitcase",
|
|
route: "/packing",
|
|
index: "packing",
|
|
number: "700100",
|
|
},
|
|
{
|
|
name: "买就送",
|
|
icon: "el-icon-present",
|
|
route: "/buyandgive",
|
|
index: "buyandgive",
|
|
number: "700200",
|
|
},
|
|
{
|
|
name: "随心配",
|
|
icon: "el-icon-present",
|
|
route: "/handpick",
|
|
index: "handpick",
|
|
number: "700200",
|
|
},
|
|
{
|
|
name: "促销列表",
|
|
icon: "el-icon-document",
|
|
route: "/sellpackingTable",
|
|
index: "sellpackingTable",
|
|
number: "700300",
|
|
},
|
|
{
|
|
name: "充值促销",
|
|
icon: "el-icon-money",
|
|
route: "/recpromotion",
|
|
index: "recpromotion",
|
|
number: "700400",
|
|
},
|
|
{
|
|
name: "赠卡",
|
|
icon: "el-icon-s-ticket",
|
|
route: "/giftCards",
|
|
index: "giftCards",
|
|
number: "700400",
|
|
},
|
|
{
|
|
name: "团购卡",
|
|
icon: "el-icon-message-solid",
|
|
route: "/group",
|
|
index: "group",
|
|
number: "700400",
|
|
},
|
|
{
|
|
name: "腾讯地图",
|
|
icon: "el-icon-suitcase",
|
|
route: "/map",
|
|
index: "map",
|
|
number: "0",
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
name: "统计报表",
|
|
index: "40",
|
|
icon: "el-icon-s-data",
|
|
number: "600",
|
|
menuLists: [
|
|
{
|
|
name: "门店日报",
|
|
icon: "el-icon-suitcase",
|
|
route: "/storeDaily",
|
|
index: "storeDaily",
|
|
number: "600100",
|
|
},
|
|
{
|
|
name: "活跃会员",
|
|
icon: "el-icon-present",
|
|
route: "/activeMember",
|
|
index: "activeMember",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "沉积会员",
|
|
icon: "el-icon-warning-outline",
|
|
route: "/notActiveMember",
|
|
index: "notActiveMember",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "新增会员",
|
|
icon: "el-icon-warning-outline",
|
|
route: "/newMember",
|
|
index: "newMember",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "负卡金",
|
|
icon: "el-icon-s-finance",
|
|
route: "/negativeCard",
|
|
index: "negativeCard",
|
|
number: "600100",
|
|
},
|
|
{
|
|
name: "月度营业额",
|
|
icon: "el-icon-coin",
|
|
route: "/monthlyTaking",
|
|
index: "monthlyTaking",
|
|
number: "600500",
|
|
},
|
|
{
|
|
name: "员工服务统计",
|
|
icon: "el-icon-warning-outline",
|
|
route: "/staffService",
|
|
index: "staffService",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "高管业绩",
|
|
icon: "el-icon-s-order",
|
|
route: "/managers",
|
|
index: "managers",
|
|
number: "4001200",
|
|
},
|
|
{
|
|
name: "管理层业绩",
|
|
icon: "el-icon-s-order",
|
|
route: "/admins",
|
|
index: "admins",
|
|
number: "4001300",
|
|
},
|
|
|
|
{
|
|
name: "部门业绩",
|
|
icon: "el-icon-s-finance",
|
|
route: "/dept",
|
|
index: "dept",
|
|
number: "4001400",
|
|
},
|
|
// {
|
|
// name: "员工工资",
|
|
// icon: "el-icon-wallet",
|
|
// route: "/staffSalary",
|
|
// index: "staffSalary",
|
|
// number: "600600",
|
|
// },
|
|
{
|
|
name: "员工业绩提成表",
|
|
icon: "el-icon-warning-outline",
|
|
route: "/staffBrokerage",
|
|
index: "staffBrokerage",
|
|
number: "600200",
|
|
},
|
|
// {
|
|
// name: "员工排行榜",
|
|
// icon: "el-icon-s-marketing",
|
|
// route: "/staffRanking",
|
|
// index: "staffRanking",
|
|
// number: "600200",
|
|
// },
|
|
{
|
|
name: "项目排行榜",
|
|
icon: "el-icon-s-marketing",
|
|
route: "/projectRanking",
|
|
index: "projectRanking",
|
|
number: "600300",
|
|
},
|
|
{
|
|
name: "会员排行榜",
|
|
icon: "el-icon-s-marketing",
|
|
route: "/memberRanking",
|
|
index: "memberRanking",
|
|
number: "600400",
|
|
},
|
|
{
|
|
name: "门店单品贡献率",
|
|
icon: "el-icon-s-data",
|
|
route: "/contribution",
|
|
index: "contribution",
|
|
number: "600200",
|
|
},
|
|
{
|
|
name: "公司单品贡献率",
|
|
icon: "el-icon-s-grid",
|
|
route: "/contributions",
|
|
index: "contributions",
|
|
number: "600200",
|
|
},
|
|
{
|
|
name: "会员拉新排行榜",
|
|
icon: "el-icon-info",
|
|
route: "/recommend",
|
|
index: "recommend",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "人均单价",
|
|
icon: "el-icon-s-finance",
|
|
route: "/perCapita",
|
|
index: "perCapita",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "活动排行榜",
|
|
icon: "el-icon-s-cooperation",
|
|
route: "/activity",
|
|
index: "activity",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "计划达成",
|
|
icon: "el-icon-s-flag",
|
|
route: "/achieve",
|
|
index: "achieve",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "商城营收",
|
|
icon: "el-icon-s-marketing",
|
|
route: "/turnover",
|
|
index: "turnover",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "商品营收",
|
|
icon: "el-icon-s-flag",
|
|
route: "/commodity",
|
|
index: "commodity",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "新增会员",
|
|
icon: "el-icon-s-custom",
|
|
route: "/addMember",
|
|
index: "addMember",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "离职率",
|
|
icon: "el-icon-finished",
|
|
route: "/separation",
|
|
index: "separation",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "费用清单",
|
|
icon: "el-icon-tickets",
|
|
route: "/expenses",
|
|
index: "expenses",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "结算",
|
|
icon: "el-icon-document",
|
|
route: "/account",
|
|
index: "account",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "活动效率比",
|
|
icon: "el-icon-takeaway-box",
|
|
route: "/efficiency",
|
|
index: "efficiency",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "活动新会员",
|
|
icon: "el-icon-user",
|
|
route: "/activityNew",
|
|
index: "activityNew",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "服务年限",
|
|
icon: "el-icon-more-outline",
|
|
route: "/seniority",
|
|
index: "seniority",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "会员时长",
|
|
icon: "el-icon-s-platform",
|
|
route: "/memberTime",
|
|
index: "memberTime",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "创收",
|
|
icon: "el-icon-s-platform",
|
|
route: "/income",
|
|
index: "income",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "合作费用",
|
|
icon: "el-icon-s-finance",
|
|
route: "/collaboration",
|
|
index: "collaboration",
|
|
number: "6001100",
|
|
},
|
|
{
|
|
name: "合作费用支付",
|
|
icon: "el-icon-s-claim",
|
|
route: "/verification",
|
|
index: "verification",
|
|
number: "6001100",
|
|
},
|
|
|
|
{
|
|
name: "收入分类",
|
|
icon: "el-icon-warning-outline",
|
|
route: "/incomeClassify",
|
|
index: "incomeClassify",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "门店业绩排行",
|
|
icon: "el-icon-medal-1",
|
|
route: "/performance",
|
|
index: "performance",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "门店利润排行",
|
|
icon: "el-icon-data-line",
|
|
route: "/storeProfits",
|
|
index: "storeProfits",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "单店经营分析",
|
|
icon: "el-icon-s-shop",
|
|
route: "/runAnalyse",
|
|
index: "runAnalyse",
|
|
number: "0",
|
|
},
|
|
{
|
|
name: "公司经营分析",
|
|
icon: "el-icon-office-building",
|
|
route: "/firmAnalyse",
|
|
index: "firmAnalyse",
|
|
number: "0",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "分店管理",
|
|
index: "90",
|
|
icon: "el-icon-office-building",
|
|
number: "900",
|
|
menuLists: [
|
|
{
|
|
name: "开通分店",
|
|
icon: "el-icon-suitcase",
|
|
route: "/openBranch",
|
|
index: "openBranch",
|
|
number: "900100",
|
|
},
|
|
{
|
|
name: "分店明细",
|
|
icon: "el-icon-suitcase",
|
|
route: "/subbranch",
|
|
index: "subbranch",
|
|
number: "900200",
|
|
},
|
|
],
|
|
},
|
|
// 优惠券
|
|
{
|
|
name: "优惠券",
|
|
index: "100",
|
|
icon: "el-icon-s-ticket",
|
|
number: "1000",
|
|
menuLists: [
|
|
{
|
|
name: "建立",
|
|
icon: "el-icon-s-promotion",
|
|
route: "/couponIssue",
|
|
index: "couponIssue",
|
|
number: "1000100",
|
|
},
|
|
{
|
|
name: "管理",
|
|
icon: "el-icon-s-operation",
|
|
route: "/couponMane",
|
|
index: "couponMane",
|
|
number: "1000200",
|
|
},
|
|
{
|
|
name: "领取消费",
|
|
icon: "el-icon-time",
|
|
route: "/couponRecord",
|
|
index: "couponRecord",
|
|
number: "1000300",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|
|
},
|
|
computed: {
|
|
...mapState(["collapse"]),
|
|
},
|
|
methods: {
|
|
rowClick(row) {
|
|
if (this.rowList.length < 9) {
|
|
let flag = true;
|
|
this.rowList.forEach((item) => {
|
|
if (row.index == item.index) {
|
|
flag = false;
|
|
}
|
|
});
|
|
if (flag) {
|
|
this.rowList.push(row);
|
|
}
|
|
} else {
|
|
}
|
|
},
|
|
handleOpen(key, keyPath) {
|
|
//console.log(key, keyPath);
|
|
sessionStorage.setItem("keyPath", key);
|
|
},
|
|
handleClose(key, keyPath) {
|
|
//console.log(key, keyPath);
|
|
},
|
|
open(index) {
|
|
sessionStorage.setItem("indexPath", index);
|
|
},
|
|
//菜单收放事件
|
|
handleChangeCollapse(show) {
|
|
this.$store.dispatch("actionChange", !this.collapse);
|
|
this.isShow = !this.isShow;
|
|
},
|
|
},
|
|
created() {
|
|
var that = this;
|
|
let menuList = [...that.menuList];
|
|
setTimeout(() => {
|
|
that.sessionStorageData = JSON.parse(
|
|
sessionStorage.getItem("sessionStorageData")
|
|
);
|
|
that.indexPath = sessionStorage.getItem("indexPath");
|
|
that.openeds.push(sessionStorage.getItem("keyPath"));
|
|
menuList.forEach((item, index) => {
|
|
if (sessionStorage.getItem("headOffice") * 1 != 1) {
|
|
if (item.number == "900") {
|
|
menuList.splice(index, 1);
|
|
}
|
|
item.menuLists.forEach((items, indexs) => {
|
|
if (items.number == "4001200" || items.name == "角色档案") {
|
|
item.menuLists.splice(indexs, 1);
|
|
}
|
|
});
|
|
}
|
|
item.menuLists.forEach((items) => {
|
|
if (
|
|
that.sessionStorageData.allowdebt == false &&
|
|
item.number * 1 == 500 &&
|
|
items.number * 1 == 500800
|
|
) {
|
|
items.number = "0";
|
|
}
|
|
});
|
|
});
|
|
that.menuList = menuList;
|
|
}, 1000);
|
|
},
|
|
mounted() {
|
|
//console.log(document.body.clientHeight);
|
|
var h = document.documentElement.clientHeight || document.body.clientHeight;
|
|
var a = document.getElementById("asider-wrapper");
|
|
a.style.height = h - 58 + "px"; //减去顶部高度
|
|
a.style.height = document.body.clientHeight + "px";
|
|
},
|
|
watch: {
|
|
$route(to, from) {
|
|
//监听路由 把当前路由的index存到sessionStorage 页面刷新时不该变页面 把index赋值给this.indexPath 实现路由跳转
|
|
sessionStorage.setItem("indexPath", to.meta.index);
|
|
this.indexPath = this.$route.meta.index;
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
/* .el-menu-item.is-active i {
|
|
color: #a09f9f;
|
|
} */
|
|
.el-menu-vertical-demo:not(.el-menu--collapse) {
|
|
width: 200px;
|
|
min-width: 64px;
|
|
border-top: #5e9af5 1px solid;
|
|
}
|
|
|
|
/* 一级菜单字体 */
|
|
.el-submenu__title span {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 二级菜单字体 */
|
|
.el-menu-item {
|
|
font-size: 12px;
|
|
}
|
|
|
|
* /deep/ .el-submenu__title i {
|
|
color: white !important;
|
|
}
|
|
|
|
/* 收缩按钮样式 */
|
|
#i i:hover {
|
|
background: #438efd;
|
|
}
|
|
|
|
#icon i {
|
|
color: white;
|
|
}
|
|
|
|
#icons i {
|
|
color: white;
|
|
}
|
|
|
|
#asider-wrapper {
|
|
max-width: 200px;
|
|
min-width: 64px;
|
|
min-height: 940px;
|
|
z-index: 100;
|
|
}
|
|
|
|
.el-menu {
|
|
border: none;
|
|
}
|
|
|
|
/* .asider-icon{
|
|
|
|
} */
|
|
</style>
|