<template>
	<el-container>
		<el-header>
			<el-segmented
				v-model="values"
				:options="options"
				size="default"
			></el-segmented>
		</el-header>
		<el-main id="elMain" class="nopadding">
			<!-- 日志 -->
			<mlogs
				v-if="values == '日志'"
				:mgroupName="mgroupName"
				style="height: 60%"
			></mlogs>
			<mtask
				v-if="values == '日志'"
				:mgroupName="mgroupName"
				style="height: 40%"
			></mtask>
			<!-- 交接记录 -->
			<handover
				v-else-if="values == '交接记录'"
				:mgroupName="mgroupName"
			></handover>
			<!-- 库存 -->
			<inm v-else :mgroupName="mgroupName"></inm>
		</el-main>
	</el-container>
</template>

<script>
import inm from "./inm.vue";
import mlogs from "./mlogs.vue";
import mtask from "./mtask.vue";
import handover from "./handover.vue";
export default {
	components: { inm, mlogs, mtask, handover },
	data() {
		return {
			tableHieght: 200,
			options: ["日志", "交接记录", "库存"],
			values: "日志",
			mgroupName: "三次超洗",
			mgroupId: "",
		};
	},
	created() {},
	mounted() {
		let that = this;
		let height = document.getElementById("elMain").clintHeight / 2;
		that.tableHieght = height;
	},
	methods: {
		handleChange(value) {
			this.value = value;
			console.log("Selected value:", value);
		},
	},
};
</script>
