12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <div class="inner-container">
- <el-col :span="3">
- <el-tabs tab-position="left" v-model="activeName" @tab-click="handleClick">
- <el-tab-pane v-for="(item, index) in menuList" :key="index" :name="item.path" :label="item.label">
- </el-tab-pane>
- </el-tabs>
- </el-col>
- <el-col :span="21">
- <div style="height: 100%">
- <router-view />
- </div>
- </el-col>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- activeName: "budget",
- userNo: JSON.parse(window.sessionStorage.userInfo).loginNo,
- showList: [],
- routerList: [{
- label: "集团绩效",
- path: "/recallJt",
- name: "recallJt"
- },
- {
- label: "部门绩效",
- path: "/recallBm",
- name: "recallBm"
- },
- {
- label: "副总GS",
- path: "/recallGs",
- name: "recallGs"
- },
- {
- label: "绩效回复列表",
- path: "/kpiRecall",
- name: "kpiRecall"
- },
- {
- label: "绩效模板管理",
- path: "/kpiMuban",
- name: "kpiMuban"
- },
- ],
- };
- },
- computed: {
- menuList: function() {
- let arr = [];
- this.routerList.map((item) => {
- this.showList.map((row) => {
- if (item.path == row) {
- arr.push(item);
- }
- });
- });
- return arr;
- },
- },
- methods: {
- handleClick(val) {
- if (this.$route.path != this.activeName) {
- this.$router.push(this.activeName);
- }
- },
- },
- mounted() {
- this.activeName = this.$route.path;
- },
- created() {
- JSON.parse(sessionStorage.childrenMenus).map((item) => {
- this.showList.push(item.jspUrl);
- });
- },
- watch: {
- $route(to, from) {
- this.activeName = this.$route.path;
- },
- },
- };
- </script>
- <style>
- .el-tabs__content {
- display: none;
- }
- </style>
|