From bb9be7b4e02d2527a1ce3f8c9964a120f4afb4e5 Mon Sep 17 00:00:00 2001 From: chenpingsen Date: Fri, 2 Aug 2024 16:28:35 +0800 Subject: [PATCH] =?UTF-8?q?add:=E7=A9=BA=E8=B0=83=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=BE=A4=E6=8E=A7-=E5=AF=B9=E6=8E=A5=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BB=A5=E5=8F=8A=E9=80=BB=E8=BE=91=E4=BF=AE=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 | 20 +- .../src/api/airConditionControlSystem.ts | 28 + hx-ai-intelligent/src/router/equipmentControl.ts | 19 + .../airConditionControlSystem/dialogStyle.less | 157 +++++ .../airConditionControlSystem/index.less | 149 ++++ .../airConditionControlSystem/index.vue | 323 +++++++++ .../airConditionControlSystem/light.vue | 149 ++++ .../airConditionControlSystem/lightPosition.ts | 3 + .../airConditionControlSystem/tabs1.less | 403 +++++++++++ .../airConditionControlSystem/tabs1.vue | 754 +++++++++++++++++++++ .../airConditionControlSystem/tabs2.vue | 318 +++++++++ .../airConditionControlSystem/tabs3.vue | 251 +++++++ .../equipmentControl/lightingManage/indexs.vue | 4 +- .../view/equipmentControl/lightingManage/tabs1.vue | 71 +- 14 files changed, 2597 insertions(+), 52 deletions(-) create mode 100644 hx-ai-intelligent/src/api/airConditionControlSystem.ts create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/light.vue create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/lightPosition.ts create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.less create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue create mode 100644 hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue 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/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/equipmentControl/airConditionControlSystem/dialogStyle.less b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less new file mode 100644 index 0000000..382533c --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less @@ -0,0 +1,157 @@ +.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, .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/airConditionControlSystem/index.less b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less new file mode 100644 index 0000000..ae84fcd --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less @@ -0,0 +1,149 @@ +// 页面容器 +.lighting-box { + position: relative; + width: 100%; + height: 100%; + // background: linear-gradient(#badaff, #8cabeb, #7095de); + // 照明设备功能总容器 + .lighting-img-box { + position: relative; + width: 1280px; + height: 720px; + user-select: none; + background-image: url(../image/bg.jpg); + // 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性 + perspective: 1000px; + perspective-origin: 850px -160px; + // 左上角区域切换功能 + .btn-box { + width: 120px; + position: sticky; + top: 10px; + left: 10px; + display: flex; + flex-direction: column; + gap: 8px; + .btn-item { + cursor: pointer; + width: 100%; + height: 40px; + border-radius: 4px; + background: rgba(39, 120, 255, 1); + border: 1px solid rgba(51, 199, 255, 1); + box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3); + font-size: 18px; + color: white; + } + .btn-item:hover { + color: black; + } + } + // 大区分区 + .area{ + position: absolute; + bottom: 170px; + left: 240px; + width: 780px; + height: 240px; + transform: rotateX(79deg) rotateZ(-22deg) skew(29deg); + display: flex; + gap: 5px; + .area1 { + width: 65px; + background: rgba(0, 251, 91, 0.3); + border: 2px solid rgb(0, 251, 91); + display: flex; + } + .area2 { + width: 100px; + background: rgba(255, 165, 0, 0.3); + border: 2px solid rgb(255, 165, 0); + display: flex; + } + .area3 { + width: 220px; + background: rgba(255, 0, 0, 0.3); + border: 2px solid rgb(255, 0, 0); + display: flex; + } + .area4 { + width: 70px; + background: rgba(80, 236, 244, 0.3); + border: 2px solid rgb(80, 236, 244); + display: flex; + } + .area5 { + flex: 210px; + background: rgba(0, 251, 91, 0.3); + border: 2px solid rgb(0, 251, 91); + display: flex; + } + .area6 { + flex: 1; + background: rgba(255, 165, 0, 0.3); + border: 2px solid rgb(255, 165, 0); + display: flex; + } + .area-item:hover { + transform: scale(1.05); + } + .area-item { + cursor: pointer; + transition: all ease 0.2s; + >.light-group { + height: 100%; + flex: 1; + display:flex; + justify-content: center; + align-items: center; + box-sizing: border-box; + padding: 10px; + // border: 2px solid red; + .shadow-box { + width: 30px; + height: 200px; + border-radius: 20px; + background: rgba(0, 0, 0, 0.2); + } + } + } + } + } +} +// 总容器与抽屉按钮 +.ns-content-main { + position: relative; + // 抽屉打开按钮 + .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; + } + // 抽屉关闭按钮 + .drawer-box-out { + width: 30px; + height: 40px; + border-radius: 2px; + position: fixed; + right: 496px; + top: 0; + bottom: 0; + margin: auto; + background: rgba(0, 0 ,0 ,0.5); + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + } + +} diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue new file mode 100644 index 0000000..6a1c010 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue @@ -0,0 +1,323 @@ + + + + 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: [], }; };