61 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
| <template>
 | |
|   <div class="attachment-wrapper">
 | |
|     <el-tabs v-model="activeTab" @tab-click="clickTab">
 | |
|       <el-tab-pane label="系统文件" name="systemAttachment">
 | |
|         <SystemAttachment v-if="activeTab === 'systemAttachment'" />
 | |
|       </el-tab-pane>
 | |
|       <el-tab-pane label="文件模板" name="attachmentTemplate">
 | |
|         <AttachmentTemplate v-if="activeTab === 'attachmentTemplate'" />
 | |
|       </el-tab-pane>
 | |
|     </el-tabs>
 | |
|   </div>
 | |
| </template>
 | |
| <script>
 | |
| import SystemAttachment from './systemAttachment/index'
 | |
| import AttachmentTemplate from './attachmentTemplate/index'
 | |
| export default {
 | |
|   name: 'Attachment',
 | |
|   components: {
 | |
|     SystemAttachment,
 | |
|     AttachmentTemplate
 | |
|   },
 | |
|   data() {
 | |
|     return {
 | |
|       activeTab: ''
 | |
|     }
 | |
|   },
 | |
|   mounted() {
 | |
|     if (this.$route.query.tabActive) {
 | |
|       this.activeTab = this.$route.query.tabActive
 | |
|     } else {
 | |
|       this.activeTab = 'systemAttachment'
 | |
|     }
 | |
|   },
 | |
|   methods: {
 | |
|     clickTab(tab, event) {
 | |
|       this.$router.push({ path: `/dictionary/attachment?tabActive=${tab.name}` })
 | |
|     }
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| <style lang="scss">
 | |
| .attachment-wrapper{
 | |
|   .el-tabs{
 | |
|     height: 100%;
 | |
|     display: flex;
 | |
|     flex-direction: column;
 | |
|   }
 | |
|   .el-tabs__header {
 | |
|     height: 40px;
 | |
|     margin-bottom:5px;
 | |
|   }
 | |
|   .el-tabs__content{
 | |
|     flex: 1;
 | |
|     .el-tab-pane{
 | |
|       height: 100%;
 | |
|     }
 | |
|   }
 | |
| }
 | |
| </style>
 | |
| 
 |