修改问题

master
夜笙歌 1 month ago
parent 135f53f331
commit b531a4f47c

@ -187,7 +187,8 @@ export default {
}, },
async toEquipmentRecord() { async toEquipmentRecord() {
this.dialogTableVisible = true this.dialogTableVisible = true
const data = await getRedisFile(this.$store.getters.tenantId) const data = await getRedisFile(this.$store.getters.tenantId) || {}
console.log(data)
this.tableData = JSON.parse(data.content) this.tableData = JSON.parse(data.content)
this.tableTh = Object.keys(data.Header).map(e => data.Header[e]) this.tableTh = Object.keys(data.Header).map(e => data.Header[e])
}, },

@ -62,8 +62,7 @@ export default {
} }
}, },
data() { data() {
return { return {};
};
}, },
computed: { computed: {
currentPage: { currentPage: {
@ -108,6 +107,7 @@ export default {
background: #fff; background: #fff;
padding: 32px 16px; padding: 32px 16px;
} }
.pagination-container.hidden { .pagination-container.hidden {
display: none; display: none;
} }

@ -154,7 +154,7 @@
width="180"> width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="historyTh[i] === '时间'">{{ parseTime(scope.row['ts']) }}</div> <div v-if="historyTh[i] === '时间'">{{ parseTime(scope.row['ts']) }}</div>
<div v-else>{{ scope.row[historyTh[i]] }}</div> <div v-else>{{ scope.row[i] }}</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -495,14 +495,15 @@ export default {
}] }]
} }
}) })
console.log(chartData)
let series = Object.keys(chartData).map(e => { let series = Object.keys(chartData).map(e => {
return { return {
name: (this.propArr.find(item => item.id === parseFloat(e)) || {}).name, name: (this.propArr.find(item => item.id === parseFloat(e)) || {}).name,
type: 'line', type: 'line',
stack: 'Total',
data: chartData[e] data: chartData[e]
} }
}) })
console.log(series)
this.$refs.chart.setData({ this.$refs.chart.setData({
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'

Loading…
Cancel
Save