zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
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
<template>
  <div class='app'>
    <a-row type='flex' :gutter='1'>
      <a-col :md='leftMd' :sm='24'>
        <weekly-left ref='weeklyLeft' @ok='leftSelect'></weekly-left>
      </a-col>
      <a-col :md='rightMd' :sm='24'>
        <div v-show='type==5' style='position: absolute;top:50vh;z-index: 999'>
          <a-icon v-if='leftOpen'  @click='toggleLeft' style='cursor: pointer' type='caret-left' />
          <a-icon v-else @click='toggleLeft' style='cursor: pointer' type='caret-right' />
        </div>
        <weekly-right :type='type' :record='leftRecord'></weekly-right>
      </a-col>
 
    </a-row>
 
  </div>
</template>
 
<script>
import WeeklyLeft from '@views/week/modules/WeeklyLeft'
import WeeklyRight from '@views/week/modules/WeeklyRight'
import { WEEKLY_LEFT_TOGGLE } from '@/vuebus/event-bus'
 
 
 
export default {
  name: 'Weekly',
  components: { WeeklyRight, WeeklyLeft },
  mounted() {
 
    },
  data() {
    return {
      description: '周报管理页面',
      leftRecord: {},//左侧选择记录
      type: '1',
      leftOpen: true,
      leftMd: 5,
      rightMd: 19
    }
  },
  methods: {
    leftSelect(type, record) {
      this.leftRecord = record
      this.type = type
    },
    toggleLeft() {
      console.log(this.$bus);
      this.$bus.$emit(WEEKLY_LEFT_TOGGLE)
      this.leftOpen = !this.leftOpen
      if (this.leftOpen) {
        this.leftMd = 5
        this.rightMd = 19
      } else {
        this.leftMd = 0
        this.rightMd = 24
      }
 
    }
  }
}
</script>
<style lang='less' scoped>
@import '~@assets/less/common.less';
 
.app {
  width: 100%;
  min-height: calc(100vh - 140px);
  position: relative;
 
  .a-divider {
    background: white;
  }
 
 
}
 
 
</style>