diff --git a/hx-ai-intelligent/src/api/IlluminationInfo.ts b/hx-ai-intelligent/src/api/IlluminationInfo.ts index 113f7fa..29fc6df 100644 --- a/hx-ai-intelligent/src/api/IlluminationInfo.ts +++ b/hx-ai-intelligent/src/api/IlluminationInfo.ts @@ -3,29 +3,29 @@ export enum lightingManage { // 主页 ======================================================== // 获得分区与线路 - getArea = '/carbon-smart/IlluminationInfo/region', + getTree = '/carbon-smart/api/illuminationCtrl/getCtrlPanelTree', // 修改线路的可用/禁用状态 - setDisable = '/carbon-smart/IlluminationInfo/changePanelStatus', + setDisable = '/carbon-smart/api/illuminationCtrl/changePanelStatus', // 获得设备 - 小灯泡 - getBulbs = '/carbon-smart/IlluminationInfo/getLightState', + getBulbs = '/carbon-smart/api/illuminationCtrl/getLightState', // 控制面板tab页 ================================================ // 获取当前修改的内容对比数据 - getChangeList = '/carbon-smart/IlluminationInfo/getLightSceneChangeInfo', + getChangeList = '/carbon-smart/api/illuminationCtrl/getLightSceneChangeInfo', // 提交当前修改 - submitChangeList = '/carbon-smart/IlluminationInfo/changeLightScene', + submitChangeList = '/carbon-smart/api/illuminationCtrl/changeLightScene', // 计划列表tab页 ================================================ // 获得计划列表tab页的表格数据 - getPlanTable = '/carbon-smart/IlluminationPlan/selectPanelPlan', + getPlanTable = '/carbon-smart/api/illuminationInfo/selectPanelPlan', // 获得计划列表tab页的穿梭框左侧数据 - getLeftPlan = '/carbon-smart/IlluminationPlan/getPlan', + getLeftPlan = '/carbon-smart/api/illuminationInfo/getPlan', // 提交穿梭框被选择的数据 - submitLeftPlan = '/carbon-smart/IlluminationPlan/joinPlan', + submitLeftPlan = '/carbon-smart/api/illuminationInfo/joinPlan', // 删除表格中的计划 - deletePlan = '/carbon-smart/IlluminationPlan/deletePlan', + deletePlan = '/carbon-smart/api/illuminationInfo/deletePlan', // 重启表格计划 - restartPlan = '/carbon-smart/IlluminationPlan/enable', + restartPlan = '/carbon-smart/api/illuminationInfo/enable', } diff --git a/hx-ai-intelligent/src/api/airConditionControlSystem.ts b/hx-ai-intelligent/src/api/airConditionControlSystem.ts new file mode 100644 index 0000000..ae3ea58 --- /dev/null +++ b/hx-ai-intelligent/src/api/airConditionControlSystem.ts @@ -0,0 +1,28 @@ +const prefix = '/carbon-smart'; +// 空调系统及相关接口 +export enum airConditionControl { + // 主页 ====================================================== + + // 主页分区结构 + getTree = prefix + '/airConditioningCtrl/getCtrlPanelTree', + // 主页小灯泡 + getDeviceList = prefix + '/airConditioningCtrl/getDeviceState', + + // 主页 > 抽屉 > 控制面板 ======================================= + + // 获得修改的比对列表 + getChangeList = prefix + '/airConditioningCtrl/getSceneChangeInfo', + // 提交修改结果 + submitChangeList = prefix + '/airConditioningCtrl/changeToSceneMode', + + // 主页 > 抽屉 > 计划列表 ======================================= + + // 穿梭框来源数据 + getTransData = prefix + '/airConditioningInfo/getDeActivatedPlanList', + // 右侧表格数据 + getTableData = prefix + '/airConditioningInfo/getActivatedPlanList', + // 穿梭框结果数据提交 + submitTransData = prefix + '/airConditioningInfo/activePlanByIdList', + // 右侧表格修改数据提交 + submitTableData = prefix + '/airConditioningCtrl/refreshPlanStatus', +} 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/router/equipmentControl.ts b/hx-ai-intelligent/src/router/equipmentControl.ts index 32b7c71..bd6ccb5 100644 --- a/hx-ai-intelligent/src/router/equipmentControl.ts +++ b/hx-ai-intelligent/src/router/equipmentControl.ts @@ -100,6 +100,25 @@ const equipmentControl = { // }, // ], // }, + { + path: 'airConditionControlSystem', + name: 'airConditionControlSystem', + meta: { title: '空调系统群控', hideChildren: true, icon: 'shebeiqunkong' }, + component: Base, + redirect: { name: 'airConditionControlSystemIndex' }, + children: [ + { + path: 'index', + name: 'airConditionControlSystemIndex', + component: () => import('/@/view/equipmentControl/airConditionControlSystem/index.vue'), + meta: { + title: '空调系统群控', + keepAlive: false, + // backApi: [], + }, + }, + ], + }, ], }; export default equipmentControl; 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/airConditionControlSystem/light.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/light.vue new file mode 100644 index 0000000..1f941b4 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/light.vue @@ -0,0 +1,149 @@ + + + + diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/lightPosition.ts b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/lightPosition.ts new file mode 100644 index 0000000..1991f66 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/lightPosition.ts @@ -0,0 +1,3 @@ +// 此文件只定义light(即俯视图小灯泡)的位置信息 +// 与显示状态和分组信息无关 +export const lightPosition = []; diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.less b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.less new file mode 100644 index 0000000..7bec33a --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.less @@ -0,0 +1,403 @@ +// 抽屉 +.drawer-item { + + .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; + } + .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/airConditionControlSystem/tabs1.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue new file mode 100644 index 0000000..41392d6 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue @@ -0,0 +1,754 @@ + + + + diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue new file mode 100644 index 0000000..99a1949 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue @@ -0,0 +1,318 @@ + + + + diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue new file mode 100644 index 0000000..347920a --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue @@ -0,0 +1,251 @@ + + + + diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue index 39fafd4..35df6a3 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue @@ -7,7 +7,7 @@ v-for="(item, index) in floorData" :key="index" class="btn-item" - @click="changeFloor(item.childList, item.code)" + @click="changeFloor(item.childList, item.dataCode)" >{{ item.name }}
@@ -233,7 +233,7 @@ // 获得所有分区 const getAllArea = () => { - http.get(lightingManage.getArea, { projectId: state.projectId }).then((res) => { + http.get(lightingManage.getTree, { projectId: state.projectId }).then((res) => { const data = res.data; floorData.value = data; /** 只在前端使用的变量 diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue index 203e8f1..b2017f6 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue @@ -98,27 +98,26 @@
-
-
+
+
控制模式
-
+
-
-
+
+
控制场景
-
+
@@ -156,7 +155,7 @@
-
+
变更内容 @@ -247,7 +246,6 @@ // 请求 import { http } from '/nerv-lib/util/http'; import { lightingManage } from '/@/api/IlluminationInfo'; - import { getAllEnum } from '/@/api/index'; // 全局变量 import { items } from '/@/store/item'; @@ -256,19 +254,7 @@ onMounted(() => { // 分区初始化 setArea(); - // 获得枚举 - getEnum(['IlluminationMode', 'IlluminationScene']); }); - // 获得枚举 - const getEnum = (arr: any) => { - getAllEnum({ params: arr }).then((res) => { - const data = res.data; - // 控制模式 - controlMode.value = data.IlluminationMode; - // 控制场景 - controlScene.value = data.IlluminationScene; - }); - }; // 分区初始化,以 1-1 作为默认回路 const setArea = () => { const data = props.treeData[0]; @@ -346,7 +332,7 @@ isLoading.value = true; http .get(lightingManage.setDisable, { - deviceGroup: btn.code, + deviceGroup: btn.dataCode, panel, projectId: state.projectId, siteId: state.siteId, @@ -419,6 +405,7 @@ scene: { value: -1, }, + childList: [], }); // 照明回路的按钮切换 const changeLine = (button: any) => { @@ -455,6 +442,12 @@ if (button.selected) { // 发生了选中事件 thisButton2.value = button; + // 获得启动模式 + thisButton3.value = button.childList.find((item: any) => { + if (item.selectAble) { + return item.childList ? item.childList : []; + } + }); } else { // 未发生选中 或 多选的其中一个按钮被取消 resetMode(); @@ -471,23 +464,20 @@ // 控制模式业务 ==================================================================== + const thisButton3 = ref({ + childList: [], + }); // 控制模式 - 按钮切换 const selectButton3 = (button3: any) => { - let checked = thisButton2.value.mode; - console.log(button3.value, '---', checked.value); - // 如果点击了相同的按钮,则未作出修改 - if (checked.value === button3.value) { - return; + console.log(button3); + if (!button3.selectAble) { + return message.warning(`${button3.name} 暂不支持`); } - checked.value = button3.value; + thisButton3.value = button3; }; // 控制场景业务 ===================================================================== - // 控制模式枚举 - const controlMode = ref([]); - // 场景枚举 - const controlScene = ref([]); // 控制场景 - 按钮切换 const selectButton4 = (button4) => { // 当前选中的回路数据 @@ -527,7 +517,7 @@ // 查询之前是否修改过 const result = changeList.value.find((item: any, index: number) => { item.index = index; - return item.deviceGroup == button.code; + return item.deviceGroup == button.dataCode; }); // 如果已产生过修改 if (result) { @@ -544,7 +534,7 @@ } else { changeList.value.push({ // 回路 - deviceGroup: button.code, + deviceGroup: button.dataCode, deviceGroupName: button.name, // 分区 region: button.pcode, @@ -659,6 +649,7 @@ scene: { value: -1, }, + childList: [], }; };