index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!--
  2. * @Description:
  3. * @Date: 2021-05-08 08:40:55
  4. * @LastEditTime: 2021-05-10 08:31:59
  5. * @FilePath: \WEB\maintenanceManagement\src\views\performanceManage\performanceStatistics\performanceStatistics.vue
  6. -->
  7. <template>
  8. <div class="main">
  9. <div class="tabs">
  10. <div :class="[{ active: currentView == 'kpiStatistics' }, 'tabItem']" @click="changeItem('kpiStatistics')">绩效统计</div>
  11. <div class="border"></div>
  12. <div :class="[{ active: currentView == 'kpiAnalysis' }, 'tabItem']" @click="changeItem('kpiAnalysis')">绩效分析</div>
  13. </div>
  14. <component :is="currentView"></component>
  15. </div>
  16. </template>
  17. <script>
  18. import kpiAnalysis from './components/kpiAnalysis';
  19. import kpiStatistics from './components/kpiStatistics';
  20. export default {
  21. components: {
  22. kpiAnalysis,
  23. kpiStatistics
  24. },
  25. data() {
  26. return {
  27. currentView: 'kpiStatistics'
  28. };
  29. },
  30. methods: {
  31. changeItem(item) {
  32. this.currentView = item;
  33. }
  34. },
  35. created() {}
  36. };
  37. </script>
  38. <style lang="scss" scoped>
  39. .tabs {
  40. width: 100%;
  41. height: 60px;
  42. background: #ffffff;
  43. padding: 20px;
  44. box-sizing: border-box;
  45. display: flex;
  46. margin-bottom: 20px;
  47. .tabItem {
  48. cursor: pointer;
  49. color: #a6abb6;
  50. }
  51. .active {
  52. color: #2787f1;
  53. }
  54. .border {
  55. width: 1px;
  56. height: 10px;
  57. background: #a6abb6;
  58. opacity: 1;
  59. margin: 6px 20px;
  60. }
  61. }
  62. </style>