Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
098b1cd341
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user