Merge remote-tracking branch 'origin/main'

This commit is contained in:
谷成伟 2024-11-27 13:54:02 +08:00
commit 098b1cd341

View File

@ -191,7 +191,7 @@
</template>
</el-dialog>
<el-dialog v-model="realDataLineChartVisible" title="实时曲线" @close="closeLineChart">
<RealDataChart ref="realDataChartRef" :visible="realDataLineChartVisible" :id="clickRowId"></RealDataChart>
<RealDataChart ref="realDataChartRef" :visible="realDataLineChartVisible" :id="clickRow!.irn"></RealDataChart>
<template #header>
<div>
<span style="font-size: 18px">实时曲线</span>
@ -770,10 +770,10 @@ const downFun = () => {
}
const realDataChartRef = ref()
const clickRowId = ref('')
const clickRow = ref<TableDataObjType>()
const realDataLineChartVisible = ref(false)
const openLineChart = (row: TableDataObjType) => {
clickRowId.value = row.irn
clickRow.value = row
realDataLineChartVisible.value = true
autoUpdate.value = false
linePause.value = false
@ -786,7 +786,7 @@ const linePause = ref(false)
const saveLineChart = () => {
const data = realDataChartRef.value?.saveChart()
linePause.value = true
const info = 'deviceCode:' + clickRowId.value + '\n'
const info = 'deviceCode:' + clickRow.value?.deviceCode + '\n' + 'deviceName:' + clickRow.value?.name + '\n'
let title = 'TimeStamp;'
let columns = ''
data.time.forEach((item: any, index: number) => {
@ -804,7 +804,7 @@ const saveLineChart = () => {
let uri = 'data:text/plain;charset=utf-8,' + encodeURIComponent(str)
let link = document.createElement('a')
link.href = uri
link.download = clickRowId.value + 'ChartData' + '.txt'
link.download = clickRow.value?.deviceCode + 'ChartData' + '.txt'
document.body.appendChild(link)
link.click()
document.body.removeChild(link)