zuozhengqing
2023-12-20 a4ad4789a091367fc2d63e0a6250a816335ea501
src/components/layout/components/appsidebar/index.vue
@@ -41,7 +41,6 @@
</template>
<script>
import {getMenuTreeByRole} from "@/api/menus/index"
export default {
  name: "AppSidebar",
  props: {},
@@ -62,11 +61,8 @@
  },
  methods: {
    getMenuTreeByRole(){
      getMenuTreeByRole().then((res)=>{
        console.log(res.data.list,"crm菜单")
        res.data.list.map((item)=>{
          if(item.systemType===2){
            let newList= JSON.parse(JSON.stringify([...item.menus]))
      let newList=this.$store.state.menus
      console.log(newList,"newList")
            // 隐藏了 生成计划 和 服务收费管理模块
            if(newList[1]){
              const found = newList[1].children.find(obj => obj.title === "生成计划")
@@ -81,9 +77,6 @@
              }
            }
            this.menus=newList
          }
        })
      })
    },
    // 监听路由
    initNavMenu() {