footerRight.vue 2.49 KB
<template>
	<div class="dv-content-body-bottom-list-right">
		<dv-border-box-12 :dur="35">
			<div style="width: 100; height: 13%;padding-top: 0.5vw">
				<span class="div-span-title">报警信息</span>
			</div>
			<div style="width: 100%; height: 88%">
				<dv-scroll-board :config="getList" style="width: 96%; margin-left: 0.65vw" />
			</div>
		</dv-border-box-12>
	</div>
</template>

<script>
export default {
	data() {
		return {
			baseUrlOff: 'http://172.16.43.82:6002/api/BulletinBoard/Mes/V1/ReadData5',
			baseUrlOnLine: window.appConfig.baseUrlintFive,
			sysData: {},
			getList: null,
			sysInitTimeNum: 20,
			sysTimeNum: 20,
			sysData: {},
		}
	},
	methods: {
		getMessData() {
			console.log('324234')

			// let opt = {
			// 	urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOnLine,
			// 	logTitle: 'CNC实时报警',
			// 	isUrlALL: true,
			// 	headers: false,
			// }
			// let callBackFn = (res) => {
			// 	if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return
			// 	this.setproductionInformation()
			// }
			// ''.ajax(this, opt, callBackFn)
		},
		setproductionInformation() {
			let listData = []
			this.sysData.forEach((item) => {
				const at = ''
				if (item.updateTime != null || item.updateTime != '') {
					console.log('13')

					at = item.updateTime
				} else {
					console.log('4')
					at = item.createTime
				}
				listData.push([item.equipmentName, item.alarmMessage, at])
			})
			this.initproductionInformationTable(listData)
		},
		initproductionInformationTable(e) {
			this.getList = {
				header: ['设备', '故障信息', '时间'],
				data: e,
				align: ['left'],
				headerBGC: '#201e1e', //表头
				oddRowBGC: '#021c66',
				evenRowBGC: '#65,105,225',
				rowNum: 4,
				columnWidth: [110, 230, 140],
				headerHeight: 25,
				carousel: 'page',
				waitTime: 8000,
			}
		},
		ajaxSuccessDataBefore(res, title) {
			if (res.data.result == null || res.data.result.length == 0) {
				''.Log(title + '无数据', 'getData')
				this.getMessData()
				return false
			}
			return true
		},
		intInterval: function() {
			''.intInterval(this, this.sysInitTimeNum, () => {
				this.getMessData()
			})
		},
	},
	mounted() {
		this.getMessData()
		// this.intInterval()
		debugger
	},
}
</script>

<style lang="less" scoped>
.dv-content-body-bottom-list-right {
	width: 33vw;
	height: 95%;
	//background-color: #63a9ad;
}
.dv-scroll-board .header .header-item {
	font-size: 1vw !important;
}
.dv-scroll-board .rows div.ceil {
	font-size: 0.8vw !important;
}
</style>