achievementsIndex.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <div class="inner-container">
  3. <div class="box">
  4. <el-tabs v-model="activeName" @tab-click="handleClick" type="card">
  5. <el-tab-pane
  6. v-for="(item, index) in menuList"
  7. :key="index"
  8. :name="item.path"
  9. :label="item.label"
  10. >
  11. </el-tab-pane>
  12. </el-tabs>
  13. </div>
  14. <el-row>
  15. <div style="height: 100%;padding-left:15px">
  16. <router-view />
  17. </div>
  18. </el-row>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. activeName: "budget",
  26. userNo: JSON.parse(window.sessionStorage.userInfo).loginNo,
  27. showList: [],
  28. routerList: [
  29. {
  30. label: "集团绩效",
  31. path: "/recallJt",
  32. name: "recallJt",
  33. },
  34. {
  35. label: "部门绩效",
  36. path: "/recallBm",
  37. name: "recallBm",
  38. },
  39. {
  40. label: "副总GS",
  41. path: "/recallGs",
  42. name: "recallGs",
  43. },
  44. // {
  45. // label: "绩效回复列表",
  46. // path: "/kpiRecall",
  47. // name: "kpiRecall"
  48. // },
  49. {
  50. label: "绩效模板管理",
  51. path: "/kpiMuban",
  52. name: "kpiMuban",
  53. },
  54. {
  55. label: "下发管理",
  56. path: "/kpiIssueList",
  57. name: "kpiIssueList",
  58. },
  59. {
  60. label: "科室绩效",
  61. path: "/recallkpi",
  62. name: "recallkpi",
  63. },
  64. ],
  65. };
  66. },
  67. computed: {
  68. menuList: function () {
  69. let arr = [];
  70. let list = []
  71. this.routerList.map((item) => {
  72. this.showList.map((row) => {
  73. if (item.path == row) {
  74. arr.push(item);
  75. list = [...new Set(arr)]
  76. }
  77. });
  78. });
  79. return list;
  80. },
  81. },
  82. methods: {
  83. handleClick(val) {
  84. if (this.$route.path != this.activeName) {
  85. this.$router.push(this.activeName);
  86. }
  87. },
  88. },
  89. mounted() {
  90. this.activeName = this.$route.path;
  91. },
  92. created() {
  93. JSON.parse(sessionStorage.childrenMenus).map((item) => {
  94. this.showList.push(item.jspUrl);
  95. });
  96. },
  97. watch: {
  98. $route(to, from) {
  99. this.activeName = this.$route.path;
  100. },
  101. },
  102. };
  103. </script>
  104. <style lang="scss" scoped>
  105. .el-tabs__content {
  106. display: none;
  107. }
  108. .box {
  109. border-bottom: 1px solid #e1e1e1;
  110. height: 55px;
  111. margin-top:10px ;
  112. }
  113. ::v-deep .el-tabs__item {
  114. width: 166px;
  115. text-align: center;
  116. border-left: 10px solid #ffffff;
  117. border-right: 10px solid #ffffff;
  118. }
  119. ::v-deep .el-tabs__header {
  120. margin: 0px;
  121. background: #d8eaf6;
  122. color: black;
  123. border:0;
  124. margin-left: 20px;
  125. display: inline-block;
  126. }
  127. ::v-deep .is-active {
  128. background: #0583cd;
  129. color: white;
  130. }
  131. ::v-deep .el-tabs__item:hover {
  132. color: black;
  133. }
  134. ::v-deep .is-active:hover {
  135. background: #0583cd;
  136. color: white;
  137. }
  138. ::v-deep .el-tabs--card>.el-tabs__header .el-tabs__nav {
  139. border:0px
  140. }
  141. </style>