foodRight.vue 3.8 KB
<template>
	<div class="stacker-status-container">
		<!-- 顶部标题栏 -->
		<div class="status-header">
			<span class="div-span-title">当天报警信息(超10分钟)</span>
		</div>

		<!-- 主体内容区 -->
		<div class="status-content">
			<dv-scroll-board :config="getList" style="width:100%;height:17vw; margin-left: 0vw" />
		</div>
	</div>
</template>

<script>
export default {
	data() {
		return {
			sysData: {},
			getList: {
				header: ['名称', '故障信息', '开始时间'],
				data: [
					// ['1号焊机', '电流过大', '01-09 15:33/1'],
					// ['4号焊机', '电压过冲', '01-09 13:08/1'],
					// ['7号焊机', '电压过冲', '01-09 10:54/1'],
					// ['带锯床', '未匹配到该管径信息', '01-09 09:22/0'],
					// ['1号焊机', '电流过大', '01-09 15:33/1'],
					// ['4号焊机', '电压过冲', '01-09 13:08/1'],
					// ['7号焊机', '电压过冲', '01-09 10:54/1'],
					// ['带锯床', '未匹配到该管径信息', '01-09 09:22/0'],
					// ['带锯床', '未匹配到该管径信息', '01-09 09:22/0'],
				],
				align: ['left'],
				headerBGC: '#201e1e', //表头
				oddRowBGC: '#021c66',
				evenRowBGC: '#65,105,225',
				rowNum: 6,
				columnWidth: [78, 150, 100],
				headerHeight: 25,
				carousel: 'page',
				waitTime: 8000,
			},
		}
	},
	methods: {
		// 生产情况
		getData(data) {
			let tempList = []
			data.equipmentAlarmsToDay.forEach((item) => {
				const hms = item.startTime.slice(-8)
				tempList.push([item.code, item.msg, hms])
			})
			let tableData = {
				header: ['设备', '故障信息', '开始时间'],
				data: tempList,
				align: ['left'],
				headerBGC: '#201e1e', //表头
				oddRowBGC: '#021c66',
				evenRowBGC: '#65,105,225',
				rowNum: 6,
				columnWidth: [78, 150, 100],
				headerHeight: 25,
				carousel: 'page',
				waitTime: 8000,
			}
			this.getList = tableData
		},
	},
	mounted() {
		//eslint-disable-next-line no-debugger
		debugger
	},
}
</script>

<style scoped>
/* 最外层容器:深色背景,和截图一致 */
.stacker-status-container {
	width: 32vw;
	height: 22vw;
	border: 1px solid #1e3a7a;
	border-radius: 0.3vw;
	/* padding: 1.5vw; */
	position: relative;
	overflow: hidden;
}

/* 顶部标题栏 */
.status-header {
	width: 100%;
	height: 3vw;
	display: flex;
	padding: 0.2vw 0 0 0.5vw;
}

/* 主体内容区:左右分栏 */
.status-content {
	width: 100%;
	height: calc(100% - 3.5vw);
	display: flex;
	align-items: center;
}

/* 左侧:堆垛机图片容器 */
.stacker-img-box {
	width: 30%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.stacker-img {
	max-width: 90%;
	max-height: 90%;
	width: auto;
	height: auto;
}

.status-arrow {
	width: 5vw;
	height: 1vw;
	background-color: #0066cc;
	position: relative;
}
.status-arrow::after {
	content: '';
	position: absolute;
	right: -1vw;
	top: 50.5%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-top: 0.8vw solid transparent;
	border-bottom: 0.8vw solid transparent;
	border-left: 1.2vw solid #0066cc;
}

/* 右侧:状态信息区 */
.status-info-box {
	width: 48%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.5vw;
	margin-left: 2vw;
}

/* 状态图标(运行/待机/故障) */
.status-icon {
	width: 8vw;
	height: 8vw;
	margin-bottom: 1vw;
}
.icon-run {
	fill: #00e068;
}
.icon-idle {
	fill: #ffb800;
}
.icon-error {
	fill: #ff3333;
}
.icon-offline {
	fill: #888888;
}
.lamp {
	width: 100%;
	height: 10vw;
}
.information {
	width: 100%;
	height: 60%;
	font-size: 1.2vw;
	line-height: 2vw;
}
/* 状态信息文本 */
.info-item {
	font-size: 1.2vw;
	color: #ffffff;
	/* line-height: 2.2vw; */
}

/* 底部报警信息 */
.alarm-info {
	position: absolute;
	bottom: 2.2vw;
	left: 1vw;
	font-size: 1vw;
	font-weight: bold;
	color: #ff0000;
}
</style>