<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>
|