zhiyong.zhou
2024-02-26 60d911172b1dbebe0ab952ce10366b327d5744f1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<template>
  <div class="workspace">
    <div class="workspace__header">
      <el-button icon="el-icon-back" class="back" type="info" size="mini" plain @click="$router.push('/')">返回主页</el-button>
    </div>
    <div class="workspace__tabs">
      <route-tab :routes="routes" type="border-card">
        <router-view></router-view>
      </route-tab>
    </div>
  </div>
</template>
 
<script>
import RouteTab from '@/components/common/route-tab'
 
export default {
  name: 'workSpace',
  components: {
    RouteTab
  },
  data() {
    return {
      routes: [
        {
          label: '审批列表',
          path: '/workspace/approval'
        },
        {
          label: '待我处理',
          path: '/workspace/todo'
        },
        {
          label: '我发起的',
          path: '/workspace/apply'
        },
        {
          label: '关于我的',
          path: '/workspace/about'
        }
        ,
                {
                  label: '抄送我的',
                  path: '/workspace/cc'
                }
        ,
                {
                  label: '数据管理',
                  path: '/workspace/submit'
                }                
      ]
    }
  },
  methods: {
    handleClick(tab) {
      this.$router.push({
        path: tab.name
      })
    }
  }
}
</script>
 
<style lang="less" scoped>
.workspace {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
 
  &__header {
    margin-bottom: 10px;
  }
 
  &__tabs {
    flex: 1;
    .route-tab {
      /deep/ .el-tabs__content {
        height: calc(100vh - 150px);
        overflow-y: auto;
      }
    }
  }
}
</style>