Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
098b1cd341
@ -191,7 +191,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog v-model="realDataLineChartVisible" title="实时曲线" @close="closeLineChart">
|
<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>
|
<template #header>
|
||||||
<div>
|
<div>
|
||||||
<span style="font-size: 18px">实时曲线</span>
|
<span style="font-size: 18px">实时曲线</span>
|
||||||
@ -770,10 +770,10 @@ const downFun = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const realDataChartRef = ref()
|
const realDataChartRef = ref()
|
||||||
const clickRowId = ref('')
|
const clickRow = ref<TableDataObjType>()
|
||||||
const realDataLineChartVisible = ref(false)
|
const realDataLineChartVisible = ref(false)
|
||||||
const openLineChart = (row: TableDataObjType) => {
|
const openLineChart = (row: TableDataObjType) => {
|
||||||
clickRowId.value = row.irn
|
clickRow.value = row
|
||||||
realDataLineChartVisible.value = true
|
realDataLineChartVisible.value = true
|
||||||
autoUpdate.value = false
|
autoUpdate.value = false
|
||||||
linePause.value = false
|
linePause.value = false
|
||||||
@ -786,7 +786,7 @@ const linePause = ref(false)
|
|||||||
const saveLineChart = () => {
|
const saveLineChart = () => {
|
||||||
const data = realDataChartRef.value?.saveChart()
|
const data = realDataChartRef.value?.saveChart()
|
||||||
linePause.value = true
|
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 title = 'TimeStamp;'
|
||||||
let columns = ''
|
let columns = ''
|
||||||
data.time.forEach((item: any, index: number) => {
|
data.time.forEach((item: any, index: number) => {
|
||||||
@ -804,7 +804,7 @@ const saveLineChart = () => {
|
|||||||
let uri = 'data:text/plain;charset=utf-8,' + encodeURIComponent(str)
|
let uri = 'data:text/plain;charset=utf-8,' + encodeURIComponent(str)
|
||||||
let link = document.createElement('a')
|
let link = document.createElement('a')
|
||||||
link.href = uri
|
link.href = uri
|
||||||
link.download = clickRowId.value + 'ChartData' + '.txt'
|
link.download = clickRow.value?.deviceCode + 'ChartData' + '.txt'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
|
Loading…
Reference in New Issue
Block a user