From a3441e013188f1b1ba780449d654adbc3bd4c92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E4=BA=91=E9=B9=8F?= Date: Wed, 30 Oct 2024 14:03:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A3=8E=E6=9C=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9A=E7=8A=B6=E6=80=81=E5=87=BD=E6=95=B0=E6=8F=90=E5=8F=96?= =?UTF-8?q?=EF=BC=8C=E7=AD=9B=E9=80=89=E4=BC=98=E5=8C=96=20=E5=8D=95?= =?UTF-8?q?=E9=A3=8E=E6=9C=BA=EF=BC=9A=E5=9B=BE=E8=A1=A8=E5=AE=9E=E4=BE=8B?= =?UTF-8?q?=E5=8C=96=E9=87=8D=E6=9E=84=EF=BC=8C=E6=98=BE=E7=A4=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/backend/WindBlower/index.vue | 846 +++++++++--------- .../src/views/backend/WindBlower/overview.vue | 6 +- .../backend/equipment/airBlower/index.vue | 36 +- .../backend/equipment/airBlower/utils.ts | 17 + 4 files changed, 463 insertions(+), 442 deletions(-) create mode 100644 ui/dasadmin/src/views/backend/equipment/airBlower/utils.ts diff --git a/ui/dasadmin/src/views/backend/WindBlower/index.vue b/ui/dasadmin/src/views/backend/WindBlower/index.vue index 503a9eb7..9217e28f 100644 --- a/ui/dasadmin/src/views/backend/WindBlower/index.vue +++ b/ui/dasadmin/src/views/backend/WindBlower/index.vue @@ -31,12 +31,6 @@
实时预览 -
@@ -95,7 +89,7 @@ 功率趋势 -
+
@@ -166,16 +160,16 @@
-
+
-
+
-
+
-
+
@@ -187,11 +181,6 @@
发电量概况 - - 当日发电量 - {{ realTimeDataForSingle.ikwhthisday }} - kWh -
@@ -201,7 +190,7 @@
- {{ realTimeDataForSingle.dayGeneration }} + {{ realTimeDataForSingle.ikwhthisday }}
kWh
日发电量
@@ -258,14 +247,15 @@ 发电量趋势 - - -
+ + + - -
+ +
+
@@ -316,7 +306,7 @@ @@ -1407,7 +1419,7 @@ onUnmounted(() => { .el-button { width: 80px; height: 40px; - background: #0064aa; + // background: rgb(0,100,170); border-radius: 6px; color: #ffffff; border: none; diff --git a/ui/dasadmin/src/views/backend/WindBlower/overview.vue b/ui/dasadmin/src/views/backend/WindBlower/overview.vue index f424e124..63529776 100644 --- a/ui/dasadmin/src/views/backend/WindBlower/overview.vue +++ b/ui/dasadmin/src/views/backend/WindBlower/overview.vue @@ -21,7 +21,7 @@ background :pager-count="7" layout="prev, pager, next, jumper,sizes,total" - @change="getcurrentPage" + @size-change="sizeChangePage" >
@@ -49,7 +49,9 @@ const pageSetting = reactive({ pageSizes: [20, 50, 100], }) -const getcurrentPage = () => {} +const sizeChangePage = () => { + pageSetting.current = 1 +} watch( () => props.type, diff --git a/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue b/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue index c8d003ac..d188dc94 100644 --- a/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue +++ b/ui/dasadmin/src/views/backend/equipment/airBlower/index.vue @@ -128,8 +128,8 @@ import { useI18n } from 'vue-i18n' import { getAirBlowerListReq, getBelongLineListReq, runAirBlowerReq } from '/@/api/backend/airBlower/request' import { ElMessage, TableInstance } from 'element-plus' import { useRouter, useRoute } from 'vue-router' +import { getRealTimeState } from './utils' const router = useRouter() -const route = useRoute() const { t } = useI18n() @@ -188,6 +188,10 @@ const airBlowerSelectOptions = reactive<{ [K in SelectTypeKeyUnionType]: { label label: '电网故障停机', value: 1111, }, + { + label: '安全链停机', + value: 1112, + }, ], belongLine: [], }) @@ -198,13 +202,15 @@ const selectAirBlower = (type: SelectTypeKeyUnionType) => { return } else if (airBlowerSelect.belongLine !== '全部' && airBlowerSelect.iturbineoperationmode !== 987654321) { if (type === 'iturbineoperationmode' && airBlowerSelect.iturbineoperationmode === 2) { - const type1 = tableData.value.filter((item) => item.iturbineoperationmode === 1) - const type6 = tableData.value.filter((item) => item.iturbineoperationmode === 6) - const type2 = tableData.value.filter((item) => item.iturbineoperationmode === 2) - tableData.value = [...type1, ...type6, ...type2] + const type1 = originTableData.value.filter((item) => item.iturbineoperationmode === 1) + const type6 = originTableData.value.filter((item) => item.iturbineoperationmode === 6) + const type2 = originTableData.value.filter((item) => item.iturbineoperationmode === 2) + const typeAll = [...type1, ...type6, ...type2] + tableData.value = typeAll.filter((item) => item.belongLine === airBlowerSelect.belongLine) return } - tableData.value = tableData.value.filter((item) => item[type] === airBlowerSelect[type]) + const resData = originTableData.value.filter((item) => item.iturbineoperationmode === airBlowerSelect.iturbineoperationmode) + tableData.value = resData.filter((item) => item.belongLine === airBlowerSelect.belongLine) return } else { if (type === 'belongLine' && airBlowerSelect.belongLine === '全部') { @@ -329,22 +335,6 @@ const tableColumn: TableColumnType[] = [ }, ] -const getRealTimeState = (data: any) => { - if (data.attributeMap.iturbineoperationmode) { - if (data.attributeMap.iturbineoperationmode > 1 && data.attributeMap.iturbineoperationmode < 6) { - return 2 - } - if (data.attributeMap.iturbineoperationmode === 21) { - return 20 - } - return data.attributeMap.iturbineoperationmode - } else if (data.attributeMap.iyplevel === 10) { - return 1110 - } else if (data.attributeMap.gridlostdetected === 1) { - return 1111 - } -} - const tableRef = ref() const tableData = ref([]) const originTableData = ref([]) @@ -352,7 +342,7 @@ const getTableData = () => { getAirBlowerListReq() .then((res) => { const data = res.data.map((item: any) => { - const state = getRealTimeState(item) + const state = getRealTimeState(item.attributeMap) const ipitchangle = Math.min(item.attributeMap.ipitchangle1, item.attributeMap.ipitchangle2, item.attributeMap.ipitchangle3) const resVal: any = {} Object.keys(item.attributeMap).forEach((attrKey) => { diff --git a/ui/dasadmin/src/views/backend/equipment/airBlower/utils.ts b/ui/dasadmin/src/views/backend/equipment/airBlower/utils.ts new file mode 100644 index 00000000..4d932162 --- /dev/null +++ b/ui/dasadmin/src/views/backend/equipment/airBlower/utils.ts @@ -0,0 +1,17 @@ +export const getRealTimeState = (data: any) => { + if (data.iturbineoperationmode) { + if (data.iturbineoperationmode > 1 && data.iturbineoperationmode < 6) { + return 2 + } + if (data.iturbineoperationmode === 21) { + return 20 + } + return data.iturbineoperationmode + } else if (data.iyplevel === 10) { + return 1110 + } else if (data.gridlostdetected === 1) { + return 1111 + } else if (data.ibplevel === 200) { + return 1112 + } +} \ No newline at end of file From 5284f1ab1167a81c3260b3945e13365bc09fd06e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E4=BA=91=E9=B9=8F?= Date: Wed, 30 Oct 2024 14:05:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8D=95=E9=A3=8E=E6=9C=BA=EF=BC=9A?= =?UTF-8?q?=E5=86=97=E4=BD=99=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/dasadmin/src/views/backend/WindBlower/index.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ui/dasadmin/src/views/backend/WindBlower/index.vue b/ui/dasadmin/src/views/backend/WindBlower/index.vue index 9217e28f..ee97ef71 100644 --- a/ui/dasadmin/src/views/backend/WindBlower/index.vue +++ b/ui/dasadmin/src/views/backend/WindBlower/index.vue @@ -249,10 +249,8 @@ - -
@@ -308,7 +306,7 @@