upperClothOne.vue 3.77 KB
<template>
	<div class="app-body">
		<Header title="长沙货叉预装台看板#P501" :sysInitTimeNum="sysTimeNum"></Header>
		<div class="dv-content-body">
			<div class="container">
				<!-- 左侧卡片 -->
				<div class="card">
					<div class="card-header">
						<div class="header-item">
							<div class="label">站台</div>
							<div class="value">P1001</div>
						</div>
						<div class="header-item">
							<div class="label">部件名称</div>
							<div class="value">{{ denTalbe.projectName }}</div>
						</div>
						<div class="header-item">
							<div class="label">项目号</div>
							<div class="value">{{ denTalbe.projectCode }}</div>
						</div>
						<div class="header-item">
							<div class="label">图号</div>
							<div class="value">{{ denTalbe.drawno }}</div>
						</div>
					</div>
					<table>
						<thead>
							<tr>
								<th>#</th>
								<th>工序名称</th>
								<th>加工名称</th>
								<th>状态</th>
							</tr>
						</thead>
						<tbody>
							<tr v-for="(item1, index) in denTalbe.detailList" :key="index">
								<td>{{ index + 1 }}</td>
								<td>{{ item1.craftName }}</td>
								<td>{{ item1.programCode }}</td>
								<td class="status-done">{{ item1.status }}</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="card">
					<img :ref="denTalbe.img" />
				</div>
			</div>
		</div>
	</div>
</template>

<script>
import Header from '@/layout/appHead'

export default {
	data() {
		return {
			// baseUrlOff: 'http://172.16.30.219:5221/api/Index/GetWebFWSInfo',
			baseUrlOff: 'http://172.16.43.82:6002/api/BulletinBoard/Mes/V1/ReadData3',
			baseUrlOnLine: window.appConfig.baseUrlintSix,
			sysData: {},
			sysInitTimeNum: 20,
			sysTimeNum: 20,
			denTalbe: {},
		}
	},
	components: {
		Header,
	},

	methods: {
		setData() {
			let opt = {
				urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOff,
				logTitle: '#P501',
				isUrlALL: true,
				headers: window.baseOnLineOrOff,
				header: window.baseOnLineOrOff,
				// isHanderAjaxSuccessActionLoad: true,
				// type: 'post',
			}
			let callBackFn = (res) => {
				if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return
				this.denTalbe = res.data.result
			}
			''.ajax(this, opt, callBackFn)
		},
		ajaxSuccessDataBefore(res, title) {
			if (res.data.result == null || res.data.result.length == 0) {
				this.sysData = []
				''.Log(title + '无数据', 'getData')
				return false
			}
			return true
		},
		intInterval: function() {
			''.intInterval(this, this.sysInitTimeNum, () => {
				this.setData()
			})
		},
	},
	mounted() {
		debugger
		this.setData()
		// this.getAGVDataOne()
		this.intInterval()
	},
}
</script>

<style lang="scss" scoped>
.app-body {
	height: 100%;
	width: 100%;
}

.dv-content-body {
	height: 90%;
	width: 100%;
}

.container {
	display: flex;
	width: 99vw;
	height: 49vw;
	margin-left: 0.5vw;
}
.card {
	flex: 1;
	background-color: rgba(10, 26, 58, 0.8);
	border: 1px solid #00bfff;
	border-radius: 0.5vw;
	padding: 0.5vw;
}
.card-header {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1vw;
	margin-bottom: 2vw;
}
.header-item {
	background-color: rgba(0, 60, 120, 0.6);
	border: 1px solid #00bfff;
	border-radius: 0.3vw;
	padding: 0.5vw;
	text-align: center;
}
.header-item .label {
	font-size: 1.2vw;
	color: #b0e0ff;
}
.header-item .value {
	font-size: 1.8vw;
	font-weight: bold;
	color: #00ccff;
}
table {
	width: 100%;
	border-collapse: collapse;
}
th,
td {
	border: 1px solid #00bfff;
	padding: 0.5vw;
	text-align: center;
	font-size: 1.2vw;
	color: #fff;
}
th {
	background-color: #007acc;
	color: #fff;
}
tr:nth-child(odd) {
	background-color: rgba(0, 40, 80, 0.6);
}
tr:nth-child(even) {
	background-color: rgba(0, 60, 100, 0.6);
}
.status-done {
	color: #00ff88;
}
.status-undone {
	color: #ffff66;
}
</style>