<template>
	<view id="equipmentInformation">
		<view class="top-table-button-box">
			<view :class="checkType == 1?'checkButton':''" @click="checkButton(1)">设备信息</view>
			<view :class="checkType == 2?'checkButton':''" @click="checkButton(2)">使用记录</view>
		</view>
		<view class="bottom-flex">
			<infoPage v-if="checkType == 1"></infoPage>
			<listPage v-if="checkType == 2"></listPage>
		</view>
	</view>
</template>

<script>
	import {
		demo1,
	} from '@/pages_equipmentUtilization/api/index.js'
	import {
		infoPage
	} from './infoPage.vue'
	import {
		listPage
	} from './listPage.vue'
	export default {
		components: {
			infoPage,
			listPage
		},
		data() {
			return {
				checkType:1,
			}
		},
		onLoad(option) {
		},
		onShow() {
			
		},
		mounted() {
		},
		methods: {
			checkButton(type){
				if(this.checkType != type){
					this.$set(this,'checkType',type);
				}
			},
		},
	}
</script>

<style lang="stylus" scoped>
	#equipmentInformation {
		height: 100%;
		flex:1;
		display:flex;
		overflow: hidden;
		flex-direction:column;
		.top-table-button-box{
			display: flex;
			border-bottom: 1rpx solid #0183FA;
			background-color: #fff;
			view{
				font-weigth:700;
				flex: 1;
				text-align: center;
				line-height:80rpx;
			}
			.checkButton{
				color:#0183FA;
			}
		}
		.bottom-flex{
			flex: 1;
			overflow: hidden;
		}
	}
</style>