bugfixed:添加高频选项
This commit is contained in:
parent
91fbce7d98
commit
80952ac7f4
@ -1,12 +1,21 @@
|
||||
<template>
|
||||
<div class="measurement">
|
||||
<div class="transferHeader">
|
||||
<div class="pointDialogColTitleInput">
|
||||
<span class="transferTitle">可添加的测点</span>
|
||||
<el-input v-model="inputValue" clearable @keyup.enter="typeChange"></el-input>
|
||||
<el-button type="primary" @click="typeChange">查询</el-button>
|
||||
</div>
|
||||
<div class="radios">
|
||||
<span style="margin-right: 10px">是否高频数据</span>
|
||||
<el-switch style="margin-right: 24px" v-model="highSpeed" @change="typeChange" />
|
||||
|
||||
<el-radio-group v-model="radioActiveName" @change="typeChange">
|
||||
<el-radio :value="138">模拟量</el-radio>
|
||||
<el-radio :value="199">计算量</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main">
|
||||
<el-table :columns="tableColumn" :data="tableData" max-height="420">
|
||||
<el-table-column
|
||||
@ -70,6 +79,8 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const radioActiveName = ref(138)
|
||||
const inputValue = ref('')
|
||||
const highSpeed = ref(false)
|
||||
const typeChange = () => {
|
||||
pageSetting.current == 1 ? getCompleteData() : (pageSetting.current = 1)
|
||||
}
|
||||
@ -120,6 +131,8 @@ const getAttributeList = () => {
|
||||
pageNum: pageSetting.current,
|
||||
pageSize: pageSetting.pageSize,
|
||||
attributeType: radioActiveName.value,
|
||||
highSpeed: highSpeed.value ? 1 : 0,
|
||||
attributeName: inputValue.value,
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
getModelAttributeListReq(requestData)
|
||||
@ -163,8 +176,10 @@ watch(
|
||||
() => props.show,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
pageSetting.current == 1 ? getCompleteData() : (pageSetting.current = 1)
|
||||
selectedIndex.value = props.irn
|
||||
inputValue.value = ''
|
||||
highSpeed.value = false
|
||||
pageSetting.current == 1 ? getCompleteData() : (pageSetting.current = 1)
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -187,6 +202,18 @@ watch(
|
||||
background: #f7f9fc;
|
||||
border-bottom: 1px solid #e1edf6;
|
||||
border-radius: 6px 6px 0 0;
|
||||
.pointDialogColTitleInput {
|
||||
.el-input {
|
||||
width: 180px;
|
||||
}
|
||||
.el-button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.radios {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
padding: 10px;
|
||||
|
@ -494,6 +494,8 @@ const intervalChange = (val: any) => {
|
||||
const tableDataLeftRef = ref()
|
||||
const openMeasure = () => {
|
||||
showMeasure.value = true
|
||||
highSpeed.value = false
|
||||
inputValue.value = ''
|
||||
pageSetting.current = 1
|
||||
getCompleteData()
|
||||
selectedLeft.value = JSON.parse(JSON.stringify(submitParams.selectedLeft))
|
||||
@ -629,8 +631,12 @@ const handleRes = (res: any, selectAllDevices: any) => {
|
||||
lowSpeedExoprtData.value.push(dataItem.join(','))
|
||||
})
|
||||
}
|
||||
highcsvContent.value = highSpeedExoprtHeader.value + '\n' + highSpeedExoprtData.value.join('\n')
|
||||
lowcsvContent.value = lowSpeedExoprtHeader.value + '\n' + lowSpeedExoprtData.value.join('\n')
|
||||
highcsvContent.value = highSpeedExoprtData.value.length
|
||||
? highSpeedExoprtHeader.value + '\n' + highSpeedExoprtData.value.join('\n')
|
||||
: []
|
||||
lowcsvContent.value = lowSpeedExoprtData.value.length
|
||||
? lowSpeedExoprtHeader.value + '\n' + lowSpeedExoprtData.value.join('\n')
|
||||
: []
|
||||
if (!yData.length) {
|
||||
ElMessage.info(`${deviceName + attName}数据为空`)
|
||||
return
|
||||
@ -695,11 +701,8 @@ const statAnalysisExport = () => {
|
||||
|
||||
tables.forEach((table) => {
|
||||
const csvContent = table.data
|
||||
|
||||
// 创建Blob对象
|
||||
if (csvContent.length) {
|
||||
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' })
|
||||
|
||||
// 创建下载链接并触发下载
|
||||
const link = document.createElement('a')
|
||||
if (link.download !== undefined) {
|
||||
const url = URL.createObjectURL(blob)
|
||||
@ -710,6 +713,7 @@ const statAnalysisExport = () => {
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user