From 1990fd11e61c04b5b9435ad0e7ad51a2d568cfc4 Mon Sep 17 00:00:00 2001 From: fks-xuxinyue <2822784518@qq.com> Date: Mon, 5 Aug 2024 15:20:16 +0800 Subject: [PATCH 1/9] taskid:282,remark:'commit' --- .../src/api/carbonEmissionFactorLibrary.ts | 4 + .../carbonEmissions/index.vue | 1 - .../carbonEmissionStatistics/index.vue | 1 + .../carbonPlanning/all/index.vue | 248 +++++++++++---------- .../carbonPlanning/category/index.vue | 117 ++++++++-- .../carbonEmissionManage/carbonPlanning/index.vue | 36 +-- 6 files changed, 262 insertions(+), 145 deletions(-) diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts index 8358746..fe5380d 100644 --- a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts +++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts @@ -79,7 +79,11 @@ export enum uploadPic { // 碳规划 export enum carbonPlanning { // 全部 + whole = '/carbon-smart/api/carbon/planning/whole', // 详情 searchListByYear = '/carbon-smart/api/carbon/planning/searchListByYear', searchListByMonth = '/carbon-smart/api/carbon/planning/searchListByMonth', + yearAndMonthAchievement = '/carbon-smart/api/carbon/planning/yearAndMonthAchievement', + annualElectricityConsumption = '/carbon-smart/api/carbon/planning/annualElectricityConsumption', + electricityUsageBackThen = '/carbon-smart/api/carbon/planning/electricityUsageBackThen', } diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue index 3872240..a5b9204 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue @@ -54,7 +54,6 @@ // 年份选择改变触发 const changeYearData = () => { - debugger queryParams.value.year = selectYear.value; getTableList(); }; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue index 76f48a0..94da7c9 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue @@ -37,6 +37,7 @@ energyConsumptionRef.value.mainRef.nsTableRef.reload(); } } else if (key === '2') { + debugger if (carbonEmissionsRef.value) { carbonEmissionsRef.value.getTableList(); // 调用子组件的方法 } diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue index 73250c2..14f7fd2 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue @@ -3,8 +3,18 @@
查询 - - + +
@@ -13,11 +23,11 @@
-
-
-
-
-
+
@@ -27,13 +37,22 @@ diff --git a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less new file mode 100644 index 0000000..26c41ae --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less @@ -0,0 +1,168 @@ +.out-dialog { + position: fixed; + right: 496px; + width: 500px; + height: 100%; + z-index: 0; + top: 0; + bottom: 0; + margin: auto; + box-sizing: border-box; + color: rgb(255, 83, 0); + background: black; + display: flex; + padding: 25px; + flex-direction: column; + transition: all ease 0.5s; + .content { + overflow-y: scroll; + .div-operation { + display: inline-block; + width: 3px; + height: 13px; + opacity: 1; + border-radius: 1px; + background: rgba(67, 136, 251, 1); + } + .text-operation { + display: inline-block; + color: rgba(255, 255, 255, 1); + font-size: 16px; + font-weight: 700; + margin-left: 5px; + } + .j-box { + background-color: #000; + opacity: 1; + z-index: 99999; + overflow-y: scroll; + .journal { + padding: 1% 3%; + width: 100%; + height: 150px; + background-color: rgba(0, 0, 0); + border-radius: 12px; + border: 2px solid transparent; + border-image: linear-gradient(to bottom, #0077ff, #00f6ff, #000000) 1; + .title-img { + padding-top: 6px; + } + } + .imgText { + display: flex; + align-items: center; + justify-content: space-between; + + .ztzm { + display: flex; + align-items: center; + } + + .cxbtn { + color: rgba(255, 255, 255, 1); + border: none; + border-radius: 6px; + width: 59.79px; + height: 32px; + opacity: 1; + background: linear-gradient( + 180deg, + rgba(255, 187, 0, 1) 0%, + rgba(255, 112, 3, 1) 91.21%, + rgba(255, 129, 3, 1) 100% + ); + cursor: pointer; + } + } + .btn-box { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: 1fr 1fr; + grid-row-gap: 15px; + .btn-item { + text-align: center; + display: flex; + align-content: space-between; + .left { + width: 70px; + height: 35px; + line-height: 35px; + border-radius: 4px; + background: linear-gradient( + 180deg, + rgba(1, 206, 255, 1) 0%, + rgba(0, 150, 229, 1) 100% + ); + color: rgba(255, 255, 255, 1); + font-size: 14px; + font-weight: 400; + } + .right { + width: 140px; + height: 35px; + line-height: 35px; + :first-child { + color: white; + } + span { + vertical-align: middle; + } + img { + padding: 0 5px; + } + } + } + } + } + } + + .button-box { + width: 100%; + box-sizing: border-box; + padding: 10px; + height: 60px; + position: absolute; + background-color: transparent; + bottom: 0; + left: 0; + right: 0; + .execute { + margin-right: 10px; + width: 74px; + height: 40px; + opacity: 1; + cursor: pointer; + border-radius: 4px; + font-size: 14px; + font-weight: 400; + border: 0; + margin-left: 10px; + }.cancel { + margin-right: 10px; + width: 74px; + height: 40px; + opacity: 1; + cursor: pointer; + border-radius: 4px; + font-size: 14px; + font-weight: 400; + border: 0; + margin-left: 10px; + } + .execute { + background: rgb(67, 136, 251); + color: white; + } + .cancel { + background: white; + color: black; + } + } +} + +.fade-enter-active, .fade-leave-active { + transform: translateX(0px); +} +.fade-enter-from, .fade-leave-to { + transform: translateX(496px); +} \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue new file mode 100644 index 0000000..dad0fa7 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue @@ -0,0 +1,201 @@ + + + diff --git a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanPlant.vue b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanPlant.vue new file mode 100644 index 0000000..05bb3c6 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanPlant.vue @@ -0,0 +1,248 @@ + + + + diff --git a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/tabs1.less b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/tabs1.less new file mode 100644 index 0000000..e0f02c9 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/tabs1.less @@ -0,0 +1,423 @@ +// 抽屉 +.drawer-fan { + .light-area, + .circuit-area, + .control-area, + .control-scene-area, + .light-parameters-area { + width: 100%; + margin-top: 20px; + display: flex; + align-items: center; + } + + .light-area-tab, + .circuit-tab, + .control-tab, + .control-scene-tab, + .light-parameters-tab { + width: 5px; + height: 23px; + opacity: 1; + background: rgba(26, 174, 251, 1); + margin-right: 4px; + } + + .light-area-text, + .circuit-text, + .control-text, + .control-scene-text, + .light-parameters-text { + font-size: 14px; + color: white; + padding-left: 5px; + line-height: 23px; + width: 110px; + height: 23px; + background: linear-gradient(270deg, rgba(86, 221, 253, 0) 0%, rgba(25, 176, 255, 1) 100%); + user-select: none; + } + + .light-area-tab, + .light-area-text { + display: inline-block; + justify-content: center; + } + .plan { + border: none; + font-size: 14px; + font-weight: 400; + border-radius: 5px; + vertical-align: top; + margin-left: 235px; + width: 88px; + height: 32px; + color: white; + cursor: pointer; + } + .plan.enabled { + background: linear-gradient(180deg, rgba(103, 222, 0, 1) 0%, rgba(0, 181, 6, 1) 100%); + } + .plan.disabled { + background-color: red; + } + .plan:disabled { + cursor: not-allowed; + } + .openPlan { + cursor: pointer; + border: none; + font-size: 14px; + font-weight: 400; + border-radius: 5px; + color: white; + vertical-align: top; + width: 88px; + height: 32px; + } + .openPlan.enabled2 { + background: linear-gradient(180deg, rgba(103, 222, 0, 1) 0%, rgba(0, 181, 6, 1) 100%); + } + + .openPlan.disabled2 { + background-color: red; + } + + .openPlan:disabled { + cursor: not-allowed; + } + + .btn2 { + display: flex; + align-items: center; + margin-left: 80px; + } + + .openzm { + cursor: pointer; + color: rgba(34, 183, 255, 1); + margin-left: 20px; + font-size: 14px; + } + + .custom-checkbox { + width: 13px; + height: 13px; + } + + .both { + width: 59.79px; + height: 32px; + opacity: 1; + background: linear-gradient(180deg, + rgba(255, 187, 0, 1) 0%, + rgba(255, 112, 3, 1) 91.21%, + rgba(255, 129, 3, 1) 100%); + margin-left: 8px; + font-size: 12px; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + } + + .btn2 { + button { + margin: 0 5px; + } + } + + .allBtn { + border: 0; + width: 40px; + color: white; + background-color: transparent; + } + + .blue-background.ant-switch-checked { + background-color: linear-gradient(180deg, + rgba(1, 206, 255, 1) 0%, + rgba(0, 150, 229, 1) 100%) !important; + } + + .grey-background.ant-switch { + background-color: grey !important; + } + + .blue-background.ant-switch-checked .ant-switch-handle { + background-color: linear-gradient(180deg, + rgba(1, 206, 255, 1) 0%, + rgba(0, 150, 229, 1) 100%) !important; + } + + .grey-background.ant-switch .ant-switch-handle { + background-color: grey !important; + } + + p { + color: white; + } + + .area, + .btnArea, + .control-mode-btn-area, + .control-scene-btn-area { + margin-left: -17px; + + button { + width: 21%; + padding: 0 2%; + } + } + + .btn { + width: 92px; + height: 40px; + border-radius: 4px; + opacity: 1; + margin-top: 10px; + margin-left: 17px; + font-size: 14px; + font-weight: 400; + opacity: 1; + border: 1px solid rgba(207, 212, 219, 1); + line-height: 20.27px; + color: white; + text-align: center; + vertical-align: top; + background-color: rgba(255, 255, 255, 0.1); + } + + .selected { + background: linear-gradient(180deg, rgba(201, 245, 255, 1) 0%, rgba(138, 215, 255, 1) 100%); + color: rgba(0, 61, 90, 1); + border: 1px solid white; + } + + .btn:hover { + background-color: rgba(207, 212, 219, 1); + } + + .btn:active { + background-color: rgba(102, 102, 102, 1); + color: white; + } + + .circuit-area, + .control-scene-area, + .light-parameters-area { + left: 51px; + width: 100%; + margin-top: 20px; + } + + .circuit-tab, + .circuit-text { + display: inline-block; + } + + .batch { + width: 60px; + height: 32px; + opacity: 1; + border: 1px solid rgba(67, 136, 251, 1); + color: rgba(67, 136, 251, 1); + border-radius: 5px; + background-color: white; + margin-left: 11px; + } + + .control-area { + left: 51px; + width: 100%; + margin-top: 20px; + } + + .control-tab, + .control-text { + display: inline-block; + } + + :deep(.cell) { + text-align: center; + } + + :deep(#pane-first) { + height: 100%; + } + + .control-scene-tab, + .control-scene-text { + display: inline-block; + } + + .light-parameters-tab, + .light-parameters-text { + display: inline-block; + } + + .light-parameters-textarea>p { + height: 100%; + display: flex; + border: 1px solid rgba(236, 239, 245, 1); + justify-content: center; + align-items: center; + } + + .bottom { + width: 100%; + height: 64px; + display: flex; + justify-content: flex-end; + align-items: center; + position: fixed; + bottom: 0; + right: 0; + } + + .execute { + margin-right: 20px; + width: 74px; + height: 40px; + opacity: 1; + cursor: pointer; + border-radius: 4px; + background: rgba(67, 136, 251, 1); + font-size: 14px; + font-weight: 400; + color: white; + border: 0; + margin: 0 10px; + } + + .flushed { + width: 74px; + height: 40px; + cursor: pointer; + opacity: 1; + border-radius: 4px; + font-size: 14px; + font-weight: 400; + color: rgba(102, 102, 102, 1); + background: white; + border: 1px solid rgba(193, 197, 204, 1); + margin: 0 10px; + } + + :deep(.ant-table-pagination) { + visibility: hidden; + } + + .drawer-content { + margin-left: 20px; + } + + .arrow-indicator { + position: absolute; + top: 50%; + left: 0; + transform: translateY(-50%); + z-index: 1; + } + + .drawer-title1 { + position: fixed; + width: 33px; + height: 33px; + top: 0; + bottom: 0; + right: 20px; + margin: auto; + z-index: 99999; + } + + .drawer-title2 { + position: fixed; + width: 33px; + height: 33px; + top: 0; + bottom: 0; + right: 495px; + margin: auto; + z-index: 99999; + } + + .arrowbtn { + display: flex; + justify-content: center; + align-items: center; + width: 28px; + height: 28px; + background: rgba(0, 0, 0, 1); + opacity: 0.5; + border: none; + } + + :deep(.ant-tabs-tab-btn) { + color: white; + } + + :deep(.ant-table) { + background-color: transparent; + } + + :deep(.ant-table-bordered) { + background-color: transparent; + } + + :deep(.ant-table-thead) { + background-color: transparent; + } + + :deep(.ant-table-cell) { + background-color: transparent; + color: #fff; + } + + .custom-table { + border-collapse: collapse; + width: 416px; + height: 60px; + color: rgba(255, 255, 255, 1); + } + + .custom-table th, + .custom-table td { + border: 1px solid rgba(163, 192, 243, 1); + text-align: left; + padding: 8px; + text-align: center; + } + + .table1 { + margin-top: 20px; + width: 100%; + cellspacing: 0; + cellpadding: 0; + border: 1px solid rgba(255, 255, 255); + border-radius: 5px; + background: rgba(255, 255, 255, 0.1); + } + + .light-area, + .circuit-area, + .control-area, + .control-scene-area, + .light-parameters-area { + width: 100%; + margin-top: 20px; + display: flex; + align-items: center; + } + + .zmhlbtn { + position: relative; + } + + // 禁用图标 + .anticon-stop { + position: absolute; + right: 3px; + bottom: 3px; + } +} \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue index a21cac4..ebf278f 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue @@ -65,6 +65,196 @@
+ +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + + + + + 日志 + +
+ + +
+ +
+
+ + + +
+ +
+ + 风幕机 + 计划列表 + 日志 + +
+ +
+ +
+
+ + + +
+ +
+ + 电动窗 + 计划列表 + 日志 + +
@@ -257,4 +550,44 @@ opacity: 0; /* 结束时完全透明 */ } } + .drawer-fan { + width: 496px; + // 抽屉关闭按钮 + .drawer-box-out { + width: 30px; + height: 40px; + border-radius: 2px; + position: fixed; + right: 466px; + top: 0; + bottom: 0; + margin: auto; + background: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + } + .ant-tabs-tab-btn { + color: white; + } + .ant-tabs-tabpane { + color: white; + } + } + .drawer-box-in { + width: 30px; + height: 40px; + border-radius: 2px; + position: fixed; + right: 0; + top: 0; + bottom: 0; + margin: auto; + background: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + } From 243aea92bb6e841b023d81c10667ed93cdeab51a Mon Sep 17 00:00:00 2001 From: zhaohy <1695786511@qq.com> Date: Mon, 5 Aug 2024 15:23:28 +0800 Subject: [PATCH 3/9] =?UTF-8?q?fix:=E9=80=9A=E9=A3=8E=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/router/equipmentControl.ts | 38 ++++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/hx-ai-intelligent/src/router/equipmentControl.ts b/hx-ai-intelligent/src/router/equipmentControl.ts index bd6ccb5..ffc3285 100644 --- a/hx-ai-intelligent/src/router/equipmentControl.ts +++ b/hx-ai-intelligent/src/router/equipmentControl.ts @@ -81,25 +81,25 @@ const equipmentControl = { }, ], }, - // { - // path: 'ventilationSystem', - // name: 'ventilationSystem', - // meta: { title: '通风系统', hideChildren: true, icon: 'shebeiqunkong' }, - // component: Base, - // redirect: { name: 'ventilationSystemIndex' }, - // children: [ - // { - // path: 'index', - // name: 'ventilationSystemIndex', - // component: () => import('/@/view/equipmentControl/ventilationSystem/index.vue'), - // meta: { - // title: '通风系统', - // keepAlive: false, - // // backApi: [], - // }, - // }, - // ], - // }, + { + path: 'ventilationSystem', + name: 'ventilationSystem', + meta: { title: '通风系统', hideChildren: true, icon: 'shebeiqunkong' }, + component: Base, + redirect: { name: 'ventilationSystemIndex' }, + children: [ + { + path: 'index', + name: 'ventilationSystemIndex', + component: () => import('/@/view/equipmentControl/ventilationSystem/index.vue'), + meta: { + title: '通风系统', + keepAlive: false, + // backApi: [], + }, + }, + ], + }, { path: 'airConditionControlSystem', name: 'airConditionControlSystem', From 5fb72355100a988bcbad4b42d8a323f8d1464b1a Mon Sep 17 00:00:00 2001 From: chenpingsen Date: Mon, 5 Aug 2024 17:28:54 +0800 Subject: [PATCH 4/9] =?UTF-8?q?add:=E7=A9=BA=E8=B0=83/=E7=85=A7=E6=98=8E?= =?UTF-8?q?=E7=BE=A4=E6=8E=A7=E7=B3=BB=E7=BB=9F=E4=BA=A4=E4=BA=92=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=A2=9E=E8=A1=A5=20=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/api/IlluminationInfo.ts | 25 +-- .../src/api/airConditionControlSystem.ts | 6 - hx-ai-intelligent/src/api/planManage.ts | 13 ++ .../airConditionControlSystem/index.vue | 1 + .../airConditionControlSystem/tabs1.vue | 63 ++++-- .../airConditionControlSystem/tabs2.vue | 23 +- .../equipmentControl/lightingManage/indexs.vue | 30 ++- .../view/equipmentControl/lightingManage/tabs1.vue | 248 +++++++++++++++------ .../view/equipmentControl/lightingManage/tabs2.vue | 177 +++++++++++---- 9 files changed, 408 insertions(+), 178 deletions(-) create mode 100644 hx-ai-intelligent/src/api/planManage.ts diff --git a/hx-ai-intelligent/src/api/IlluminationInfo.ts b/hx-ai-intelligent/src/api/IlluminationInfo.ts index 29fc6df..c76417f 100644 --- a/hx-ai-intelligent/src/api/IlluminationInfo.ts +++ b/hx-ai-intelligent/src/api/IlluminationInfo.ts @@ -1,31 +1,24 @@ +const prefix = '/carbon-smart'; // 照明系统及相关接口 export enum lightingManage { // 主页 ======================================================== // 获得分区与线路 - getTree = '/carbon-smart/api/illuminationCtrl/getCtrlPanelTree', + getTree = prefix + '/illuminationCtrl/getCtrlPanelTree', // 修改线路的可用/禁用状态 setDisable = '/carbon-smart/api/illuminationCtrl/changePanelStatus', // 获得设备 - 小灯泡 - getBulbs = '/carbon-smart/api/illuminationCtrl/getLightState', + getBulbs = prefix + '/illuminationCtrl/getDeviceState', - // 控制面板tab页 ================================================ + // 主页 > 抽屉 > 控制面板 ======================================= // 获取当前修改的内容对比数据 - getChangeList = '/carbon-smart/api/illuminationCtrl/getLightSceneChangeInfo', + getChangeList = prefix + '/illuminationCtrl/getSceneChangeInfo', // 提交当前修改 - submitChangeList = '/carbon-smart/api/illuminationCtrl/changeLightScene', + submitChangeList = prefix + '/illuminationCtrl/changeToSceneMode', - // 计划列表tab页 ================================================ + // 主页 > 抽屉 > 计划列表 ======================================= - // 获得计划列表tab页的表格数据 - getPlanTable = '/carbon-smart/api/illuminationInfo/selectPanelPlan', - // 获得计划列表tab页的穿梭框左侧数据 - getLeftPlan = '/carbon-smart/api/illuminationInfo/getPlan', - // 提交穿梭框被选择的数据 - submitLeftPlan = '/carbon-smart/api/illuminationInfo/joinPlan', - // 删除表格中的计划 - deletePlan = '/carbon-smart/api/illuminationInfo/deletePlan', - // 重启表格计划 - restartPlan = '/carbon-smart/api/illuminationInfo/enable', + // 右侧表格修改数据提交 + submitTableData = prefix + '/illuminationCtrl/refreshPlanStatus', } diff --git a/hx-ai-intelligent/src/api/airConditionControlSystem.ts b/hx-ai-intelligent/src/api/airConditionControlSystem.ts index ae3ea58..f5b8f1d 100644 --- a/hx-ai-intelligent/src/api/airConditionControlSystem.ts +++ b/hx-ai-intelligent/src/api/airConditionControlSystem.ts @@ -17,12 +17,6 @@ export enum airConditionControl { // 主页 > 抽屉 > 计划列表 ======================================= - // 穿梭框来源数据 - getTransData = prefix + '/airConditioningInfo/getDeActivatedPlanList', - // 右侧表格数据 - getTableData = prefix + '/airConditioningInfo/getActivatedPlanList', - // 穿梭框结果数据提交 - submitTransData = prefix + '/airConditioningInfo/activePlanByIdList', // 右侧表格修改数据提交 submitTableData = prefix + '/airConditioningCtrl/refreshPlanStatus', } diff --git a/hx-ai-intelligent/src/api/planManage.ts b/hx-ai-intelligent/src/api/planManage.ts new file mode 100644 index 0000000..678c291 --- /dev/null +++ b/hx-ai-intelligent/src/api/planManage.ts @@ -0,0 +1,13 @@ +const prefix = '/carbon-smart'; +// 照明系统及相关接口 +export enum planManage { + /** + * @param deviceType 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵) + */ + // 获得未激活的计划 + getTransData = prefix + '/deviceCtrlPlan/getDeActivatedPlanList', + // 获得激活的计划 + getTableData = prefix + '/deviceCtrlPlan/getActivatedPlanList', + // 提交计划状态修改 + submitTransData = prefix + '/deviceCtrlPlan/activePlanByIdList', +} diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue index 6a1c010..449e1d7 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue @@ -121,6 +121,7 @@ treeData.value = area; // 默认选择第一项 treeData.value[0].selected = true; + tabs1Ref.value.changeArea(treeData.value[0]); }; // 分区业务 ===================================================== diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue index 41392d6..1fbe132 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue @@ -34,7 +34,7 @@
- +
@@ -136,7 +136,7 @@ title="刷新将会取消已作出的修改" ok-text="确定" cancel-text="取消" - @confirm="refresh" + @confirm="refresh(false)" @cancel="changeCancel"> @@ -186,7 +186,7 @@
亮度
- + {{ item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--' }} @@ -231,7 +231,7 @@ title="此操作将提交以上修改内容" ok-text="确定" cancel-text="取消" - @click="submitChangeList" + @confirm="submitChangeList" @cancel="changeCancel"> @@ -320,7 +320,7 @@ const togglePlan2 = () => { // 如果未交互任何按钮 if (handleButton.value == '') { - return message.info('请选择照明回路'); + return message.info('请选择空调分组'); } // 获取最近交互过的按钮 const btn: any = buttons2.value.find((button: any) => button.id === handleButton.value); @@ -399,7 +399,6 @@ }); // 照明回路的按钮切换 const changeLine = (button: any) => { - console.log(button, 'button2mmmm'); // 存储一次按钮ID,用于禁用/启用交互 handleButton.value = button.id; // 根据按钮状态,展示禁用/启用按钮文本 @@ -482,7 +481,7 @@ // 操作线路总数 let sum = 0; // 没有这个选项的线路 - let nofind = 0; + // let nofind = 0; // 修改无效的数量 let checked = 0; // 可修改的数量 @@ -515,19 +514,20 @@ return (checked += 1); // 修改 } else { - alert(v.treePid + '---' + before + '---' + after); changed += 1; - resetScene(item.childList); - changeScene(v1, before, after); + changeScene(v1, before, after, item); v1.executeStatus.value = 1; } + // 不符合条件的全部重置 + } else { + v1.executeStatus.value = 0; } }); } }); } }); - alert(`共修改${sum}条,${checked}条无需修改,${nofind}条不具有该选项,${changed}条生效`); + message.info(`共修改${sum}条数据,其中${checked}条无需修改,${changed}条修改有效`); // 如果是单选模式 } else { // 如果按钮已经被选择 @@ -565,15 +565,15 @@ /** 控制场景 - 按钮切换通用方法(单选 & 多选) * @param button 当前被选中的场景(单选 & 多选) * @param before 当前回路场景的初始值(撤回时需使用) + * @param after 修改后的值(修改时使用) + * @param anyButton 多选时使用 */ - const changeScene = (button: any, before: string | undefined, after: string) => { - console.log(changeList.value, 'vvvvvvvvvvvvvv-----', button, 'bbbbbbbb---------'); + const changeScene = (button: any, before: string | undefined, after: string, line = null) => { // 通过分组ID,查询之前是否修改过 const result = changeList.value.find((item: any, index: number) => { item.index = index; return item.deviceGroup == button.treePid.split('_')[0]; }); - console.log(result, 'rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr'); // 如果已产生过修改 if (result) { // 改回了原有的值,则从数组中移除 @@ -587,12 +587,20 @@ } // 如果未产生过修改 } else { + let nowButton; + // 多选,则使用第四个参数 + if (line) { + nowButton = line; + // 如果是单选,则使用thisbotton2 + } else { + nowButton = thisButton2.value; + } changeList.value.push({ // 回路 - deviceGroup: thisButton2.value.dataCode, - deviceGroupName: thisButton2.value.name, + deviceGroup: nowButton.dataCode, + deviceGroupName: nowButton.name, // 分区 - region: thisButton2.value.treePid, + region: nowButton.treePid, regionName: '', // 修改前 before, @@ -608,7 +616,7 @@ // 执行按钮loading const buttonLoading = ref(false); // 刷新 - const refresh = () => { + const refresh = (reload = false) => { // 关闭执行弹窗 executeVisible.value = false; // 设置当前选中的序列 @@ -616,10 +624,12 @@ // 重置选中样式 和 按钮选中状态 emit('changeArea', ['1']); emit('reset'); - // 将所有修改改回 - changeList.value.forEach((item: any) => { - resetChangeList(item); - }); + // 如果是中途刷新(对应提交后刷新),需要将所有修改改回 + if (!reload) { + changeList.value.forEach((item: any) => { + resetChangeList(item); + }); + } changeList.value = []; // 默认选择第一个楼层 let data = props.treeData[0]; @@ -644,6 +654,10 @@ if (item.scene == v3.dataCode) { v3.executeStatus.value = 0; } + if (!item.before) { + console.log(item, '没有这个选项'); + v3.executeStatus.value = 0; + } // 旧值选中 if (item.before == v3.dataCode) { v3.executeStatus.value = 1; @@ -695,6 +709,7 @@ const diffList = ref([]); //撤销 const delBtn = (obj: any) => { + console.log(obj, '当前选择的修改内容'); // 将treeData对应回路的数据改回,数据以后端为准 obj.scene = obj.stateAfter.scene.value; obj.before = obj.stateBefore.scene.value; @@ -722,9 +737,9 @@ projectId: state.projectId, siteId: state.siteId, }) - .then((res) => { + .then(() => { emit('reload'); - refresh(); + refresh(true); }); }; diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue index 99a1949..d766a90 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue @@ -1,7 +1,9 @@