From 71bb62b6a29301a8c8a365b3b25848c0d4295ff7 Mon Sep 17 00:00:00 2001 From: fengrong Date: Thu, 21 Nov 2024 15:14:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=95=B0=E6=8D=AE=EF=BC=9A?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/backend/realData/index.vue | 211 +++++++++--------- 1 file changed, 109 insertions(+), 102 deletions(-) diff --git a/ui/dasadmin/src/views/backend/realData/index.vue b/ui/dasadmin/src/views/backend/realData/index.vue index a09cd4d0..1de22656 100644 --- a/ui/dasadmin/src/views/backend/realData/index.vue +++ b/ui/dasadmin/src/views/backend/realData/index.vue @@ -8,6 +8,7 @@ 可添加的测点 模拟量 + 计算量 状态量 @@ -61,7 +62,7 @@ -
+
@@ -131,9 +132,18 @@ const tableItem0: any = [ title: '风机列表' }] const tableItem1: any = [ + { + label: '机组运行状态', + unit: ' ', + prop: 'iturbineoperationmode', + align: 'center', + custom: 'header', + name: 'iTurbineOperationMode', + title: '机组运行状态' + }, { label: '风速 (m/s)', - unit:' (m/s)', + unit: ' (m/s)', prop: 'iwindspeed', align: 'center', custom: 'header', @@ -141,49 +151,13 @@ const tableItem1: any = [ title: '风速' }, { - label: '有功功率 (MW)', - unit:' (MW)', - prop: 'igenpower', + label: '风向', + unit: '', + prop: 'iwinddirection', align: 'center', custom: 'header', - name:'iGenPower', - title: '有功功率' - }, - { - label: '日发电量 (kWh)', - unit:' (kWh)', - prop: 'ikwhthisday', - align: 'center', - custom: 'header', - name:'iKWhThisDay', - title: '日发电量' - }, - { - label: '总发电量 (万kWh)', - unit:' (万kWh)', - prop: 'ikwhoverall', - align: 'center', - custom: 'header', - name:'iKWhOverall', - title: '总发电量' - }, - { - label: '机舱角度', - unit:'', - prop: 'ivanedirection', - align: 'center', - custom: 'header', - name:'iVaneDirection', - title: '机舱角度' - }, - { - label: '叶轮转速 (rmp)', - unit:' (rmp)', - prop: 'irotorspeed', - align: 'center', - custom: 'header', - name:'iRotorSpeed', - title: '叶轮转速' + name:'iWindDirection', + title: '风向' }, { label: '发电机转速 (rmp)', @@ -195,32 +169,94 @@ const tableItem1: any = [ title: '发电机转速' }, { - label: '机舱温度 (℃)', - unit:' (℃)', - prop: 'itempnacelle_1sec', + label: '有功功率 (MW)', + unit:' (MW)', + prop: 'igenpower', align: 'center', custom: 'header', - name:'iTempNacelle_1sec', - title: '机舱温度' + name:'iGenPower', + title: '有功功率' }, { - label: '主油路压力 (kpa)', - unit:' (kpa)', - prop: 'ihydrpress', + label: '给定有功功率 (kW)', + unit:' (kW)', + prop: 'iactivepowersetpointvalue', align: 'center', custom: 'header', - name:'iHydrPress', - title: '主油路压力' + name:'iActivePowerSetPointValue', + title: '给定有功功率' }, { - label: '变桨角度', - unit:' ', - //prop: 'ipitchangle1', - prop: 'ipitchangle', + label: '无功功率 (kvar)', + unit:' (kvar)', + prop: 'ireactivepower', + align: 'center', + custom: 'header', + name:'iReactivePower', + title: '无功功率' + }, + { + label: '给定无功功率 (kvar)', + unit:' (kvar)', + prop: 'ireactivepowersetpointvalue', + align: 'center', + custom: 'header', + name:'iReactivePowerSetPointValue', + title: '给定无功功率' + }, + { + label: '桨叶1角度', + unit: ' ', + prop: 'ipitchangle1', align: 'center', custom: 'header', name:'iPitchAngle1', - title: '变桨角度' + title: '桨叶1角度' + }, + { + label: '桨叶2角度', + unit: ' ', + prop: 'ipitchangle2', + align: 'center', + custom: 'header', + name:'iPitchAngle2', + title: '桨叶2角度' + }, + { + label: '桨叶3角度', + unit: ' ', + prop: 'ipitchangle3', + align: 'center', + custom: 'header', + name:'iPitchAngle3', + title: '桨叶1角度' + }, + { + label: '限电原因', + unit: ' ', + prop: '', + align: 'center', + custom: 'header', + name:'', + title: '限电原因' + }, + { + label: '机舱位置', + unit: ' ', + prop: 'ivanedirection', + align: 'center', + custom: 'header', + name:'iVaneDirection', + title: '机舱位置' + }, + { + label: '日发电量 (kWh)', + unit:' (kWh)', + prop: 'ikwhthisday', + align: 'center', + custom: 'header', + name:'iKWhThisDay', + title: '日发电量' } ] const tableColumn=ref( @@ -264,7 +300,6 @@ const defaultdeviceQuery = () => { deviceId.forEach((item,index) => { objparms.deviceId=item attributesCode=tableColumn.value.map((item1)=>item1.prop) - attributesCode.push('iPitchAngle1','iPitchAngle2', 'iPitchAngle3') objparms.attributes=attributesCode snapshotParms.push({...objparms}) }) @@ -281,16 +316,12 @@ const defaultdeviceQuery = () => { const attributeCodeLower = item1.prop; if(attributeCodeLower!='name'){ if (attributeCodeLower) { - const ipitchangle=Math.min(tsnapshotVoItem.ipitchangle1, tsnapshotVoItem.ipitchangle2, tsnapshotVoItem.ipitchangle3) - let ipitchanglevalue; - if(isNaN(ipitchangle)){ - ipitchanglevalue='-' - }else{ - ipitchanglevalue=ipitchangle !== undefined ? (ipitchangle % 1 === 0 ? ipitchangle : ipitchangle.toFixed(3)) : '-'; - } const value=tsnapshotVoItem[attributeCodeLower]; - const formattedValue = value !== undefined ? (value % 1 === 0 ? value : value.toFixed(3)) : '-'; - acc[i] = { ...item, [attributeCodeLower]: formattedValue,ipitchangle:ipitchanglevalue}; + let formattedValue = value !== undefined ? (value % 1 === 0 ? value : value.toFixed(3)) : '-'; + if (enumStore.keys.includes(item1.name)) { + formattedValue = enumStore.data[item1.name][formattedValue]?enumStore.data[item1.name][formattedValue]:'-' + } + acc[i] = { ...item, [attributeCodeLower]: formattedValue}; } } @@ -367,14 +398,6 @@ const getSel = () => { console.error('Error in tableColumn processing:', error); } multipleSelection.value=selectList.value - /*RealtableRef.value.clearSelection() - if (selectList.value.length > 0) { - //setTimeout(()=>{ - selectList.value.forEach((item1, index1) => { - RealtableRef.value.toggleRowSelection(item1, undefined, true); - }); - //},0) - }*/ }; let isCheckRow = false; const RealtableRef=ref() @@ -391,7 +414,6 @@ const selectTable = (selected: TableType[] | null) => { } }); } -//const getRowKey = (row) => row.id; const getRowKey = (row) => row.attributeCode; const visible = ref(false) const openMeasure=() =>{ @@ -400,7 +422,6 @@ const openMeasure=() =>{ queryListData.attributeType=radioActiveName.value modelAttributeList(queryListData) nextTick(() => { - //RealtableRef.value.clearSelection() getSel() }) } @@ -515,8 +536,8 @@ const getTableData = () => { multipleSelection.value.forEach(item => { if (item.attributeCode) { const attributeCodeLower = item.attributeCode.toLowerCase(); - if(attributeCodeLower==='ipitchangle1'||attributeCodeLower==='ipitchangle2'||attributeCodeLower==='ipitchangle3'){ - tableColumnEnds.value.push({ + // if(attributeCodeLower==='ipitchangle1'||attributeCodeLower==='ipitchangle2'||attributeCodeLower==='ipitchangle3'){ + /* tableColumnEnds.value.push({ label: '变桨角度', unit:'', prop: 'ipitchangle', @@ -524,8 +545,8 @@ const getTableData = () => { custom: 'header', name: 'ipitchangle', title: '变桨角度', - }); - }else{ + });*/ + //}else{ tableColumnEnds.value.push({ label: item.attributeName+'\n'+item.unit, unit:item.unit, @@ -535,7 +556,7 @@ const getTableData = () => { name: item.attributeCode, title: item.attributeName, }); - } + //} } }); tableColumn.value = [...tableItem0, ...tableColumnEnds.value]; @@ -553,27 +574,13 @@ const getTableData = () => { for (const itemKey in tsnapshotVoObject) { if (item.id === itemKey) { const attributeCodeLower = item1.attributeCode?.toLowerCase(); - const ipitchangle=''; - const ipitchangle1=Math.min(item1.ipitchangle1, item1.ipitchangle2, item1.ipitchangle3) - let ipitchanglevalue; - if(isNaN(ipitchangle1)){ - ipitchanglevalue='-' - }else{ - ipitchanglevalue=ipitchangle1 !== undefined ? (ipitchangle1 % 1 === 0 ? ipitchangle1 : ipitchangle1.toFixed(3)) : '-'; - } const value = tsnapshotVoObject[itemKey]?.[attributeCodeLower]; let formattedValue = value !== undefined ? (value % 1 === 0 ? value : value.toFixed(3)) : '-'; if (enumStore.keys.includes(item1.attributeCode)) { formattedValue = enumStore.data[item1.attributeCode][formattedValue]?enumStore.data[item1.attributeCode][formattedValue]:'-' } - if(attributeCodeLower==='ipitchangle'|| - attributeCodeLower==='ipitchangle1'|| - attributeCodeLower==='ipitchangle2'|| - attributeCodeLower==='ipitchangle3'){ - arr[i] = { ...item, [attributeCodeLower]: formattedValue,[ipitchangle]: ipitchanglevalue}; - }else{ - arr[i] = { ...item, [attributeCodeLower]: formattedValue}; - } + arr[i] = { ...item, [attributeCodeLower]: formattedValue}; + } } }); @@ -638,7 +645,7 @@ const downFun=(tableColumn,tableData)=>{ let uri = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(str); let link = document.createElement('a'); link.href = uri; - link.download = Date.now() + ".csv"; + link.download = '实时数据'+Date.now() + ".csv"; document.body.appendChild(link); link.click(); document.body.removeChild(link); @@ -714,7 +721,7 @@ $paginationHeight: 32px; border: 1px solid #E1EDF6; border-radius: 6px; .transferMain{ - height: 600px; + height: 655px; /*padding: 10px;*/ padding:0; ::v-deep .el-table__row{