workstationMaterialBox_one.vue 2.76 KB
<template>
	<div class="app-body">
		<Header title="工位料箱看板1" ></Header>
		<div class="dv-content-body">
			<dv-scroll-board :config="pickup" style="width: 100%;" />
		</div>
	</div>
</template>

<script>
import Header from '@/layout/appHead'
export default {
	data() {
		return {
			baseUrlOff: 'http://127.0.0.1:6001/api/BulletinBoard/Mes/V1/ReadData2',
			baseUrlOnLine: window.appConfig.workstationMaterialBox_one,
			sysData: {},
			sysInitTimeNum: window.appConfig.sysTimeNum,
			sysTimeNum: window.appConfig.sysTimeNum,
			pickup: window.pickup_chenPin,
		}
	},
	components: {
		Header,
	},

	methods: {
		getECSData() {
			let opt = {
				urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOff,
				logTitle: '工位料箱看板1',
				isUrlALL: true,
				headers: window.baseOnLineOrOff,
				isHanderAjaxSuccessActionLoad: true,
			}
			let callBackFn = (res) => {
				if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return
				let data = this.sysData.topData
				let tempList = []
				data.forEach((item) => {
					var Material = `<span style="text-decoration: underline;color:hsl(201, 86%, 50%)">${item.workstationCode} </span>`
					var eleIsstackdata = `<span style="display: block;width:40px;height:20px;border:1px solid #00c860;text-align:center;line-height:20px;margin-top:12px;color:#00c860">是</span>`
					if (item.materialBox == '否') {
						eleIsstackdata = `<span style="display: block;width:40px;height:20px;border:1px solid red;text-align:center;line-height:20px;margin-top:12px;color:red">否</span>`
					}
					tempList.push([Material, item.workstationName, eleIsstackdata, item.remarks])
				})
				let tableData = {
					header: window.pickup_chenPin.header,
					data: tempList,
					align: window.pickup_chenPin.align,
					columnWidth: window.pickup_chenPin.columnWidth,
					headerHeight: window.pickup_chenPin.headerHeight,
					rowNum: window.pickup_chenPin.rowNum,
					index: window.pickup_chenPin.index,
				}
				this.pickup = tableData
			}
			''.ajax(this, opt, callBackFn)
		},
		ajaxSuccessDataBefore(res, title) {
			if (res.data == null) {
				''.Log(title + '无数据', 'getData')
				return false
			}
			return true
		},

		getAllWMSData() {},

		intInterval: function() {
			''.intInterval(this, this.sysInitTimeNum, () => {
				this.getECSData()
			})
		},
	},
	mounted() {
		//eslint-disable-next-line no-debugger
		debugger
		this.getECSData()
		// 【发布的时候要取消注释】
		this.intInterval()
	},
}
</script>

<style lang="scss" scoped>
.app-body {
	height: 100%;
	width: 100%;
	.dv-content-body {
		height: 90%;
		width: 100%;
		// background: rebeccapurple;
	}
}
</style>
<style>
.dv-scroll-board .header .header-item {
	font-size: 19px !important;
}
.dv-scroll-board .rows div.ceil {
	font-size: 17px !important;
}
</style>