upperCloth_PP.vue 1.78 KB
<template>
	<div class="app-body">
		<Header title="宏仁PP仓看板" :sysInitTimeNum="sysTimeNum"></Header>
		<div class="dv-content-body"></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://127.0.0.1:6001/api/BulletinBoard/Mes/V1/ReadData1',
			baseUrlOnLine: window.appConfig.baseUrlintTwo,
			sysData: {},
			sysInitTimeNum: 2,
			sysTimeNum: 2,
		}
	},
	components: {
		Header,
	},

	methods: {
		getAGVDataOne() {
			let opt = {
				urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOff,
				logTitle: 'AGV-路线信息',
				isUrlALL: true,
				headers: window.baseOnLineOrOff,
				header: window.baseOnLineOrOff,
				// isHanderAjaxSuccessActionLoad: true,
				// type: 'post',
			}
			let callBackFn = (res) => {
				if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return

				setTimeout(() => {
					this.$refs.headLeft.sed(res.data.data)
					this.$refs.headCenter.getData(res.data.data)
					this.$refs.headRight.sed(res.data.data)
					this.$refs.footerLeft.sed(res.data.data)
					this.$refs.footerCenter.sed(res.data.data)
					this.$refs.footerRight.sed(res.data.data)
				}, 300)
			}
			''.ajax(this, opt, callBackFn)
		},
		ajaxSuccessDataBefore(res, title) {
			if (res.data.data == null || res.data.data.length == 0) {
				this.sysData = []
				''.Log(title + '无数据', 'getData')
				return false
			}
			return true
		},
		intInterval: function() {
			''.intInterval(this, this.sysInitTimeNum, () => {
				this.getAGVDataOne()
			})
		},
	},
	mounted() {
		debugger
		// this.getAGVDataOne()
		// this.intInterval()
	},
}
</script>

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