From 54d11f9a2f395e021486e6a31912616274b3feda Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 08 九月 2025 11:55:10 +0800 Subject: [PATCH] 车间智慧看板页面新增定时刷新功能 --- src/views/mdc/base/modules/WorkshopSignage/WorkshopAlarmInfoTable.vue | 77 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 0 deletions(-) diff --git a/src/views/mdc/base/modules/WorkshopSignage/WorkshopAlarmInfoTable.vue b/src/views/mdc/base/modules/WorkshopSignage/WorkshopAlarmInfoTable.vue new file mode 100644 index 0000000..0065a84 --- /dev/null +++ b/src/views/mdc/base/modules/WorkshopSignage/WorkshopAlarmInfoTable.vue @@ -0,0 +1,77 @@ +<template> + <div> + <dv-scroll-board :config="config" style="width:100%;flex: 1;display: flex;flex-direction: column"/> + </div> +</template> + +<script> + import signageApi from '@/api/signage' + + export default { + name: 'WorkshopAlarmInfoTable', + components: {}, + data() { + return { + config: {}, + dataSource: [] + } + }, + methods: { + getWorkshopAlarmInfoByApi() { + const that = this + signageApi.getWorkshopAlarmInfoApi() + .then(res => { + if (res.success) { + that.dataSource = res.result + that.initChart() + } + }) + }, + + initChart() { + this.config = { + // indexHeader: '搴忓彿', + header: ['璁惧缂栧彿', '鎶ヨ鏃堕棿', '鎶ヨ鍙�'], + headerBGC: 'rgb(45, 59, 94)', + oddRowBGC: 'transparent', + evenRowBGC: 'transparent', + data: this.dataSource.map(item => { + return [item.equipmentId, item.collectTime, item.alarm] + }), + rowNum: 3, + index: false, + // columnWidth: [300, 300], + align: ['center', 'center', 'center'] + } + } + } + } +</script> + +<style scoped lang="less"> + table { + width: 100%; + + th, td { + text-align: center; + } + } + + /deep/ .header, /deep/ .row-item { + border-bottom: 0.1vw solid #79b2e2; + & > div { + width: 33.33% !important; + font-size: 0.9vw; + color: #eee; + border-left: 0.1vw solid #79b2e2; + border-right: 0.1vw solid #79b2e2; + } + } + + /deep/ .header { + & > div { + height: 2vw !important; + line-height: 2vw !important; + } + } +</style> \ No newline at end of file -- Gitblit v1.9.3