功率曲线

This commit is contained in:
geting 2024-12-09 10:42:32 +08:00
parent a95496410e
commit 2c4c1ca309

View File

@ -37,7 +37,7 @@
<el-dialog v-model="showMeasure" title="选择测点" width="1200" top="0">
<div class="measureSlot">
<el-row :gutter="20">
<el-col :span="8">
<el-col :span="12">
<div class="col">
<div class="transferHeader">
<span class="transferTitle">风机列表</span>
@ -49,23 +49,35 @@
v-model:selection="selectedLeft"
@selection-change="handleSelectionChange"
row-key="irn"
class="windtable"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="name" label="风机名称" width="120" />
<el-table-column type="selection" width="40" />
<el-table-column prop="name" label="风机名称" />
</el-table>
<el-table
:data="tableDataMid"
v-model:selection="selectedMid"
@selection-change="handleSelectionChange2"
row-key="irn"
class="windtable"
>
<el-table-column type="selection" width="40" />
<el-table-column prop="name" label="风机名称" />
</el-table>
<el-table
:data="tableDataRight"
v-model:selection="selectedRight"
@selection-change="handleSelectionChange1"
row-key="irn"
class="windtable"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="name" label="风机名称" width="120" />
<el-table-column type="selection" width="40" />
<el-table-column prop="name" label="风机名称" />
</el-table>
</div>
</div>
</el-col>
<el-col :span="16">
<el-col :span="12">
<div class="col">
<div class="transferHeader">
<span class="transferTitle">可添加的测点</span>
@ -83,7 +95,7 @@
row-key="id"
class="attrtable"
>
<el-table-column type="selection" width="55" />
<el-table-column type="selection" width="40" />
<el-table-column prop="attributeName" label="属性名称" />
<el-table-column prop="attributeCode" label="属性编码" />
<el-table-column prop="subSystem" label="子系统" />
@ -202,9 +214,11 @@ onMounted(() => {
})
const tableDataLeft = ref([])
const tableDataRight = ref([])
const tableDataMid = ref([])
const iotModelId = ref('')
const selectedLeft = ref([])
const selectedRight = ref([])
const selectedMid = ref([])
const radioActiveName = ref(138)
const attributeTableRef = ref()
@ -225,9 +239,10 @@ const queryWindTurbines = () => {
})
if (resData.length) {
iotModelId.value = resData[0]['modelId']
const middleIndex = Math.ceil(resData.length / 2)
const middleIndex = Math.floor(resData.length / 3)
tableDataLeft.value = resData.slice(0, middleIndex)
tableDataRight.value = resData.slice(middleIndex)
tableDataMid.value = resData.slice(middleIndex, middleIndex * 2)
tableDataRight.value = resData.slice(middleIndex * 2)
}
resolve(resData[0])
} else {
@ -388,6 +403,9 @@ const openMeasure = () => {
const handleSelectionChange1 = (val: any) => {
selectedRight.value = val
}
const handleSelectionChange2 = (val: any) => {
selectedMid.value = val
}
const handleSelectionChange = (val: any) => {
selectedLeft.value = val
}
@ -404,7 +422,7 @@ function generateDeviceAttributes(devices: any, attributes: any) {
}
const statAnalysisOperate = () => {
const allDevices = [...selectedLeft.value, ...selectedRight.value]
const allDevices = [...selectedLeft.value, ...selectedMid.value, ...selectedRight.value]
if (!statAnalysisTime.value) {
ElMessage.info('请选择查询时间!')
return
@ -425,7 +443,7 @@ const statAnalysisOperate = () => {
}
const calculate: any = ref([{ max: '', min: '', average: '' }])
const historyDataReq = (data: any) => {
const selectAllDevices = [...selectedLeft.value, ...selectedRight.value].sort((a: any, b: any) => {
const selectAllDevices = [...selectedLeft.value, ...selectedMid.value, ...selectedRight.value].sort((a: any, b: any) => {
return a.index - b.index
})
historyReq(data)
@ -507,7 +525,7 @@ const statAnalysisExport = () => {
}
const getRequestData = () => {
const devices = generateDeviceAttributes([...selectedLeft.value, ...selectedRight.value], multipleSelection.value)
const devices = generateDeviceAttributes([...selectedLeft.value, ...selectedMid.value, ...selectedRight.value], multipleSelection.value)
const requestData = {
devices: devices,
interval: statAnalysisInterval.value || '5m',
@ -674,7 +692,9 @@ const timestampToTime = (timestamp: any) => {
border-bottom: 1px solid #e1edf6;
border-radius: 6px 6px 0 0;
}
.windtable {
height: 721px;
}
.mainPart {
display: flex;
padding: 10px;