overviewOfLibraryInformation.vue 6.47 KB
<template>
	<div class="app-body">
		<Header title="立库信息总览" ></Header>
		<div class="dv-content-body">
			<!-- 顶部头表 -->
			<div class="dv-content-body-head-list">
				<div :class="eqName(item.name)" v-for="(item, index) in topData" :key="index" class="dv-content-body-head-list-delit1">
					<div class="qty">{{ item.number }}</div>
					<div class="text">{{ item.name }}</div>
				</div>
				<!-- <div class="dv-content-body-head-list-delit1">
					<div class="qty">123456</div>
					<div class="text">今日入库量</div>
				</div>
				<div class="dv-content-body-head-list-delit1">
					<div class="qty">123456</div>
					<div class="text">今日出库量</div>
				</div>
				<div class="dv-content-body-head-list-delit4">
					<div class="qty">123456</div>
					<div class="text">库存总量</div>
				</div>
				<div class="dv-content-body-head-list-delit2">
					<div class="qty">123456</div>
					<div class="text">库内物料品数</div>
				</div>
				<div class="dv-content-body-head-list-delit3">
					<div class="qty">123456</div>
					<div class="text">待执行任务数</div>
				</div> -->
			</div>
			<!-- 中间图表 -->
			<div class="dv-content-body-center-list">
				<bodyCenterLeft ref="bodyCenterLeft"></bodyCenterLeft>
				<bodyCenterRight ref="bodyCenterRight"></bodyCenterRight>
			</div>
			<!-- 底部图表 -->
			<div class="dv-content-body-bottom-list">
				<footerLeft ref="footerLeft"></footerLeft>
				<footerRight ref="footerRight"></footerRight>
			</div>
		</div>
	</div>
</template>

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

import headLeft from '@/overviewOfLibraryInformationComponets/headLeft'
import headRight from '@/overviewOfLibraryInformationComponets/headRight'

import bodyCenterLeft from '@/overviewOfLibraryInformationComponets/bodyCenterLeft'
import bodyCenterRight from '@/overviewOfLibraryInformationComponets/bodyCenterRight'

import footerLeft from '@/overviewOfLibraryInformationComponets/footerLeft'
import footerRight from '@/overviewOfLibraryInformationComponets/footerRight'

export default {
	data() {
		return {
			baseUrlOff: 'http://127.0.0.1:6001/api/BulletinBoard/Mes/V1/ReadData1',
			baseUrlOnLine: window.appConfig.overviewOfLibraryInformationLine,
			topData: [],
			sysData: {},
			sysInitTimeNum: window.appConfig.sysTimeNum,
			sysTimeNum: window.appConfig.sysTimeNum,
		}
	},
	components: {
		Header,

		headLeft,
		headRight,

		bodyCenterLeft,
		bodyCenterRight,

		footerLeft,
		footerRight,
	},

	methods: {
		getWMSData() {
			let opt = {
				urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOff,
				logTitle: 'WMS',
				isUrlALL: true,
				headers: window.baseOnLineOrOff,
				//isHanderAjaxSuccessActionLoad:true,
			}
			let callBackFn = (res) => {
				if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return
				this.getTopData()
				this.$refs.bodyCenterLeft.getData(this.sysData.bodyCecnterLeft)
				//this.$refs.bodyCenterRight.getData()
				this.$refs.footerLeft.getData(this.sysData.footerLeft)
				this.$refs.footerRight.bingDataSource(this.sysData.footerRight)
			}
			''.ajax(this, opt, callBackFn)
		},
		getTopData() {
			this.topData = this.sysData.topData
			//console.log(this.sysData.topData)
		},
		eqName(name) {
			if (name == '库存总量') {
				return 'dv-content-body-head-list-delit4'
			} else if (name == '库内物料品数') {
				return 'dv-content-body-head-list-delit2'
			} else if (name == '待执行任务数') {
				return 'dv-content-body-head-list-delit3'
			} else {
				return 'dv-content-body-head-list-delit1'
			}
		},
		ajaxSuccessDataBefore(res, title) {
			if (res.data == null) {
				''.Log(title + '无数据', 'getData')
				return false
			}
			return true
		},

		intInterval: function() {
			''.intInterval(this, this.sysInitTimeNum, () => {
				this.getWMSData()
			})
		},
	},
	mounted() {
		//eslint-disable-next-line no-debugger
		debugger
		this.getWMSData()

		// 【发布的时候要取消注释】
		this.intInterval()
	},
}
</script>

<style lang="scss" scoped>
.app-body {
	height: 100%;
	width: 100%;
	.dv-content-body {
		height: 90%;
		width: 100%;
		// background: rebeccapurple;
	}
	.dv-content-body-head-list {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 15.5%;
	}
	.dv-content-body-head-list-delit1 {
		width: 15%;
		height: 10vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		border: 3px solid hsl(208.57deg 51.22% 40.2%);
		box-shadow: inset 0 0 20px hsl(201, 86%, 50%);
		.qty {
			width: 100%;
			font-size: 30px;
			font-family: electronicFont;
			color: hsl(200.68deg 94.87% 69.41%);
			text-align: center;
		}
		.text {
			width: 100%;
			color: hsl(200.68deg 94.87% 69.41%);
			text-align: center;
		}
	}
	.dv-content-body-head-list-delit2 {
		width: 15%;
		height: 10vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		border: 3px solid hsl(264.77deg 77.48% 43.53%);
		box-shadow: inset 0 0 20px hsl(264.77deg 77.48% 43.53%);
		.qty {
			width: 100%;
			font-size: 30px;
			font-family: electronicFont;
			color: hsl(264.77deg 77.48% 43.53%);
			text-align: center;
		}
		.text {
			width: 100%;
			color: hsl(264.77deg 77.48% 43.53%);
			text-align: center;
		}
	}
	.dv-content-body-head-list-delit3 {
		width: 15%;
		height: 10vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		border: 3px solid hsl(160deg 100% 30%);
		box-shadow: inset 0 0 20px hsl(160deg 100% 30%);
		.qty {
			width: 100%;
			font-size: 30px;
			font-family: electronicFont;
			color: hsl(160deg 100% 30%);
			text-align: center;
		}
		.text {
			width: 100%;
			color: hsl(160deg 100% 30%);
			text-align: center;
		}
	}
	.dv-content-body-head-list-delit4 {
		width: 15%;
		height: 10vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		border: 3px solid rgb(1, 101, 113);
		box-shadow: inset 0 0 30px rgb(1, 64, 89);
		.qty {
			width: 100%;
			font-size: 30px;
			font-family: electronicFont;
			color: rgb(0, 235, 238);
			text-align: center;
		}
		.text {
			width: 100%;
			color: rgb(0, 235, 238);
			text-align: center;
		}
	}

	.dv-content-body-center-list {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 41.5%;
	}
	.dv-content-body-bottom-list {
		display: flex;
		height: 41.5%;
		justify-content: space-between;
		align-items: center;
	}
}
</style>
<style lang="less">
.div-span-title {
	display: block;
	height: 1.9vw;
	padding-left: 0vw;
	padding-top: 0px;
	font-size: 1.4vw;
	color: aliceblue;
	font-weight: 800;
	margin-left: 10px;
}
</style>