<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-if="values == '来料未加工'" :mgroupName="mgroupName"></inm>
			<inmOut v-else-if="values == '出料已完成'" :mgroupName="mgroupName"></inmOut>
			<record v-else :mgroupName="mgroupName"></record>
		</el-main>
	</el-container>
</template>

<script>
import inm from "./inm.vue";
import inmOut from "./inmOut.vue";
import mlogs from "./fmlogs.vue";
import mtask from "./mtask.vue";
import handover from "./handover.vue";
import record from "./inmrecord.vue";
export default {
	components: { inm, inmOut,mlogs, mtask, handover,record },
	data() {
		return {
			tableHieght: 200,
			options: ["日志", "交接记录", "来料未加工","出料已完成","入库记录"],
			values: "日志",
			mgroupName: "减薄B",
			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>
