diff --git a/hw-ui/src/views/board/production/firstFloor.vue b/hw-ui/src/views/board/production/firstFloor.vue index 5bed3c5a..d2a3a39c 100644 --- a/hw-ui/src/views/board/production/firstFloor.vue +++ b/hw-ui/src/views/board/production/firstFloor.vue @@ -378,6 +378,9 @@ export default { } .scrollTableItem { + white-space: nowrap; + overflow: hidden; + text-overflow:ellipsis; display: inline-block; width: calc(100% / 6); text-align: center; diff --git a/hw-ui/src/views/board/warehouse/firstFloor.vue b/hw-ui/src/views/board/warehouse/firstFloor.vue index d4823ced..88a4caad 100644 --- a/hw-ui/src/views/board/warehouse/firstFloor.vue +++ b/hw-ui/src/views/board/warehouse/firstFloor.vue @@ -185,39 +185,7 @@ export default { singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3 waitTime: 0 }, - scrollTableData: [ - { - 'createBy': null, - 'createTime': null, - 'updateBy': null, - 'updateTime': null, - 'remark': null, - 'objid': 463400, - 'monitorId': 'E0004_3500', - 'monitorName': '空压机', - 'address': null, - 'collectTime': '2024-12-04 12:56:33', - 'recordTime': '2024-12-04T12:56:39.000+08:00', - 'glys': 0.912, - 'zxyg': 62.94, - 'activePower': 0.00, - 'reactivePower': 0.00, - 'consumption': null, - 'collectType': null, - 'deptId': null, - 'userId': null, - 'monitorSubset': null, - 'onlineState': null, - 'startTime': null, - 'endTime': null, - 'vc': 229.90, - 'vb': 230.10, - 'va': 229.40, - 'ia': 0.02, - 'ib': 0.01, - 'ic': 0.01 - } - ], + scrollTableData: [], scrollTableData1: [] } }, @@ -232,146 +200,92 @@ export default { getData() { energyFirstFloorData().then(e=>{ console.log(e) - }) - getEnergyHistoryData().then(e=>{ - console.log(e) - }) - let data = [ - { - 'is_ammeter': '否', - 'expendPercentage': '7%', - 'monitorId': 'E0004_3400', - 'monitorName': '折弯1', - 'expend': 2.83, - 'meterValue': 11.24, - 'timeRange': '2024-11-04 至 2024-12-04' - }, - { - 'is_ammeter': '否', - 'expendPercentage': '0%', - 'monitorId': 'E0004_3300', - 'monitorName': '折弯2', - 'expend': 0.00, - 'meterValue': 2.80, - 'timeRange': '2024-11-04 至 2024-12-04' - }, - { - 'is_ammeter': '否', - 'expendPercentage': '27%', - 'monitorId': 'E0004_0400', - 'monitorName': '激光下料', - 'expend': 10.44, - 'meterValue': 36.81, - 'timeRange': '2024-11-04 至 2024-12-04' - }, - { - 'is_ammeter': '否', - 'expendPercentage': '0%', - 'monitorId': 'E0004_0200', - 'monitorName': '烘干机', - 'expend': 0.20, - 'meterValue': 1.19, - 'timeRange': '2024-11-04 至 2024-12-04' - }, - { - 'is_ammeter': '否', - 'expendPercentage': '41%', - 'monitorId': 'E0004_3500', - 'monitorName': '空压机', - 'expend': 15.53, - 'meterValue': 62.93, - 'timeRange': '2024-11-04 至 2024-12-04' - }, - { - 'is_ammeter': '否', - 'expendPercentage': '22%', - 'monitorId': 'E0004_0300', - 'monitorName': '除尘系统', - 'expend': 8.30, - 'meterValue': 33.09, - 'timeRange': '2024-11-04 至 2024-12-04' - } - ] - this.$refs.chart3.setData({ - tooltip: { - trigger: 'axis', - axisPointer: { - // 坐标轴指示器,坐标轴触发有效 - type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' - } - }, - grid: { - left: '2%', - right: '4%', - bottom: '14%', - top: '16%', - containLabel: true - }, - legend: { - x: 'center', - top: 12, - textStyle: { - color: '#fff' - }, - itemWidth: 12, - itemHeight: 10 - // itemGap: 35 - }, - xAxis: { - type: 'category', - data: data.map(v => v.monitorName), - axisLine: { - lineStyle: { - color: 'white' + let data = e.rows + this.$refs.chart3.setData({ + tooltip: { + trigger: 'axis', + axisPointer: { + // 坐标轴指示器,坐标轴触发有效 + type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' } }, - axisLabel: { - // interval: 0, - // rotate: 40, + grid: { + left: '2%', + right: '4%', + bottom: '14%', + top: '16%', + containLabel: true + }, + legend: { + x: 'center', + top: 12, textStyle: { - fontFamily: 'Microsoft YaHei' - } - } - }, - - yAxis: { - type: 'value', - axisLine: { - show: false, - lineStyle: { - color: 'white' - } + color: '#fff' + }, + itemWidth: 12, + itemHeight: 10 + // itemGap: 35 }, - splitLine: { - show: true, - lineStyle: { - color: 'rgba(255,255,255,0.3)' + xAxis: { + type: 'category', + data: data.map(v => v.monitorName), + axisLine: { + lineStyle: { + color: 'white' + } + }, + axisLabel: { + // interval: 0, + // rotate: 40, + textStyle: { + fontFamily: 'Microsoft YaHei' + } } }, - axisLabel: {} - }, - series: [ - { - name: '消耗', - type: 'bar', - barWidth: '15%', - itemStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: '#fccb05' - }, - { - offset: 1, - color: '#f5804d' - } - ]) + + yAxis: { + type: 'value', + axisLine: { + show: false, + lineStyle: { + color: 'white' + } + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(255,255,255,0.3)' } }, - data: data.map(v => v.expend) - } - ] + axisLabel: {} + }, + series: [ + { + name: '消耗', + type: 'bar', + barWidth: '15%', + itemStyle: { + normal: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: '#fccb05' + }, + { + offset: 1, + color: '#f5804d' + } + ]) + } + }, + data: data.map(v => v.expend) + } + ] + }) + }) + getEnergyHistoryData().then(e=>{ + console.log(e) + this.scrollTableData = e.rows }) } }