修改问题

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])
}, },

@ -16,7 +16,7 @@
</template> </template>
<script> <script>
import { scrollTo } from '@/utils/scroll-to' import {scrollTo} from '@/utils/scroll-to'
export default { export default {
name: 'Pagination', name: 'Pagination',
@ -62,8 +62,7 @@ export default {
} }
}, },
data() { data() {
return { return {};
};
}, },
computed: { computed: {
currentPage: { currentPage: {
@ -88,13 +87,13 @@ export default {
if (this.currentPage * val > this.total) { if (this.currentPage * val > this.total) {
this.currentPage = 1 this.currentPage = 1
} }
this.$emit('pagination', { page: this.currentPage, limit: val }) this.$emit('pagination', {page: this.currentPage, limit: val})
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this.pageSize }) this.$emit('pagination', {page: val, limit: this.pageSize})
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
@ -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