zhangzengfei
2020-10-15 a2ebd9a92a375b0b6898d532d3fee782b5fd8f49
src/pages/analysisPower/index/App.vue
@@ -50,7 +50,13 @@
          </div>
          <span :class="stretchStyle" @click="strethTable = !strethTable"></span>
          <el-button size="small" type="primary" style="float:right" @click="openDrawer">设置</el-button>
          <el-button
            size="small"
            type="primary"
            style="float:right"
            @click="openDrawer"
            v-if="showSetting"
          >设置</el-button>
        </div>
        <el-table
@@ -235,6 +241,20 @@
      }
      return ret
    },
    isAdmin() {
      if (
        sessionStorage.getItem("userInfo") &&
        sessionStorage.getItem("userInfo") !== ""
      ) {
        let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
        return loginName === "superadmin" || loginName === "basic";
      }
      return false;
    },
    showSetting() {
      return this.isAdmin || this.buttonAuthority.indexOf("analysisPower:set") > -1
    }
  },
  data() {
@@ -249,7 +269,8 @@
      showSysInfo: false,
      drawer: false,
      formData: {},
      strethTable: false
      strethTable: false,
      buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
    };
  },
  mounted() {