src/views/dashboard/Analysis.vue
@@ -1,9 +1,9 @@
<template>
  <Component :is="currentSignage" :productionCode="productionCode" @switchToBranchFactory="switchToBranchFactory">
    <template #back_nav>
      <dv-decoration-11 class="back-nav" v-if="userType===4">
        <div @click="backToLastSignage">返回上一级</div>
      </dv-decoration-11>
      <div class="back-nav" @click="backToLastSignage" v-if="userType===4">
        <dv-decoration-7>上一级</dv-decoration-7>
      </div>
    </template>
  </Component>
</template>
@@ -12,12 +12,14 @@
  import signageApi from '@/api/signage'
  import IndexSignage from './IndexSignage.vue'
  import BranchFactorySignage from './BranchFactorySignage.vue'
  import WorkshopSectionSignage from './WorkshopSectionSignage.vue'
  export default {
    name: 'Analysis',
    components: {
      IndexSignage,
      BranchFactorySignage
      BranchFactorySignage,
      WorkshopSectionSignage
    },
    data() {
      return {
@@ -37,13 +39,12 @@
        signageApi.getUserByIdApi(id)
          .then(res => {
            this.userType = res.userType
            console.log('触发判断', this.userType)
            switch (this.userType) {
              case 1:
                this.currentSignage = ''
                break
              case 2:
                this.currentSignage = 'BranchFactorySignage'
                this.currentSignage = 'WorkshopSectionSignage'
                break
              case 3:
                this.currentSignage = 'BranchFactorySignage'
@@ -73,5 +74,14 @@
</script>
<style lang="less" scoped>
  .back-nav {
    width: 100px;
    height: 30px;
    color: #ccc;
    position: absolute;
    top: 25px;
    left: 25px;
    cursor: pointer;
    z-index: 9999
  }
</style>