Browse Source

add:空调群控系统修改 / 素材引入 / 部分样式调节

temp
chenpingsen 1 month ago
parent
commit
7153a81c63
  1. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/alarm1.png
  2. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/off1.png
  3. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/on1.png
  4. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/repair1.png
  5. 89
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/device.vue
  6. 10
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/devicePosition.ts
  7. 117
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less
  8. 124
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue
  9. 3
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/lightPosition.ts
  10. 129
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue
  11. 32
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue
  12. 38
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue
  13. 4
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
  14. 19
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
  15. 2
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue
  16. 18
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue
  17. 4
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue

BIN
hx-ai-intelligent/public/asset/image/bulbLogo/alarm1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
hx-ai-intelligent/public/asset/image/bulbLogo/off1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
hx-ai-intelligent/public/asset/image/bulbLogo/on1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
hx-ai-intelligent/public/asset/image/bulbLogo/repair1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

89
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/light.vue → hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/device.vue

@ -5,75 +5,84 @@
<div class="light-tag-tit"> <div class="light-tag-tit">
<div> <div>
<img src="/asset/image//bulbLogo/21962.png" alt="" /> <img src="/asset/image//bulbLogo/21962.png" alt="" />
<span class="tag-text">{{ result.name }}</span> <span class="tag-text">{{
</div> device.regionName + ' > ' + device.deviceGroupName
<button class="right-button">{{ type == 1 ? '正常' : '关闭' }}</button> }}</span></div
>
<button class="right-button">{{
record?.runStatus?.label ? record.runStatus.label : '--'
}}</button>
</div> </div>
<div class="light-tag-box"> <div class="light-tag-box">
<div class="tag-box-item"> <div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" /> <img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制模式</span> <span class="title">控制模式</span>
<span class="result">自动</span> <span class="result">{{ record.autoStatus.label }}</span>
</div> </div>
<div class="tag-box-item"> <div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" /> <img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title"></span> <span class="title"></span>
<span class="result">{{ result.brightness }}</span> <span class="result">{{ record.temp + record.tempUnit }}</span>
</div> </div>
<div class="tag-box-item"> <div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" /> <img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span> <span class="title">控制场景</span>
<span class="result">{{ result.automatic2 }}</span> <span class="result">{{ device.scene.label }}</span>
</div> </div>
<div class="tag-box-item"> <div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" /> <img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">色温</span> <span class="title">风速</span>
<span class="result">{{ result.brightness3 }}</span> <span class="result">{{ record.windSpeed + record.windSpeedUnit }}</span>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<div class="icon-box" :style="styleObject" v-show="visible"> <div class="icon-box" :style="props.device.styleText">
<img v-if="type == 1" class="icon-item" src="/asset/image/bulbLogo/22394.png" alt="" /> <!-- 正常=0 -->
<img v-if="type == 2" class="icon-item" src="/asset/image/bulbLogo/22396.png" alt="" /> <img
<img v-if="type == 3" class="icon-item" src="/asset/image/bulbLogo/22400.png" alt="" /> v-if="record?.runStatus?.value == 0"
class="icon-item"
src="/asset/image/bulbLogo/on1.png"
alt="" />
<!-- 故障=1 -->
<img
v-if="record?.runStatus?.value == 1"
class="icon-item"
src="/asset/image/bulbLogo/off1.png"
alt="" />
<!-- 维修=2 -->
<img
v-if="record?.runStatus?.value == 2"
class="icon-item"
src="/asset/image/bulbLogo/repair1.png"
alt="" />
<!-- 警告=3 -->
<img
v-if="record?.runStatus?.value == 3"
class="icon-item"
src="/asset/image/bulbLogo/alarm1.png"
alt="" />
</div> </div>
</a-popover> </a-popover>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { computed } from 'vue';
const props = defineProps({
defineProps({ device: Object,
styleObject: Object,
type: Number,
visible: {
type: Boolean,
default: false,
},
});
const result = ref({
id: '1',
name: '站厅照明 1区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '舒适',
brightness3: '4000k',
brightness4: '3800k',
}); });
//
const device = computed(() => props.device);
//
const record = computed(() => props.device.record);
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.icon-box { .icon-box {
width: 25px; width: 35px;
height: 25px;
position: absolute; position: absolute;
.icon-item { .icon-item {
width: 25px; width: 35px;
cursor: pointer; cursor: pointer;
transition: all ease 0.1s; transition: all ease 0.1s;
} }
@ -104,7 +113,7 @@
} }
.right-button { .right-button {
width: 50px; width: 5em;
height: 26px; height: 26px;
background: rgba(57, 215, 187, 0.1); background: rgba(57, 215, 187, 0.1);
border: 1px solid rgba(57, 215, 187, 1); border: 1px solid rgba(57, 215, 187, 1);
@ -140,7 +149,7 @@
.result { .result {
line-height: 50px; line-height: 50px;
font-size: 16px; font-size: 14px;
font-weight: 700; font-weight: 700;
color: white; color: white;
} }

10
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/devicePosition.ts

@ -0,0 +1,10 @@
// 此文件只定义device(即空调小图标)的位置
// 与显示状态和分组信息无关
export const devicePosition = [
{ left: '200px', bottom: '290px' },
{ left: '320px', bottom: '320px' },
{ left: '260px', bottom: '190px' },
{ left: '390px', bottom: '230px' },
];
export const devicePosition1 = [];

117
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less

@ -10,10 +10,13 @@
width: 1280px; width: 1280px;
height: 720px; height: 720px;
user-select: none; user-select: none;
background-image: url(../image/bg.jpg); background-image: url(../image/floor-1.png);
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: linear-gradient(top to bottom,#c0deff, #8eadf0);
// 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性 // 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性
perspective: 1000px; perspective: 900px;
perspective-origin: 850px -160px; perspective-origin: 900px -120px;
// 左上角区域切换功能 // 左上角区域切换功能
.btn-box { .btn-box {
width: 100px; width: 100px;
@ -45,18 +48,20 @@
// 大区分区 // 大区分区
.area{ .area{
position: absolute; position: absolute;
bottom: 170px; bottom: 210px;
left: 240px; left: 250px;
width: 780px; width: 700px;
height: 240px; height: 270px;
transform: rotateX(79deg) rotateZ(-22deg) skew(29deg); transform: rotateX(73deg) rotateZ(340deg) skew(31deg);
display: flex; display: flex;
gap: 5px; gap: 5px;
.area1 { .area1 {
width: 65px; width: 200px;
background: rgba(0, 251, 91, 0.3); background: rgba(0, 251, 91, 0.3);
border: 2px solid rgb(0, 251, 91); border: 2px solid rgb(0, 251, 91);
display: flex; display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
} }
.area2 { .area2 {
width: 100px; width: 100px;
@ -93,7 +98,95 @@
} }
.area-item { .area-item {
cursor: pointer; cursor: pointer;
transition: all ease 0.2s; transition: transform ease 0.2s;
>.light-group {
height: auto;
flex: 1;
display:flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: 10px;
// border: 2px solid red;
.shadow-box {
width: 60px;
height: 60px;
border-radius: 30px;
background: rgba(0, 0, 0, 0.2);
}
}
}
}
}
.lightingImgBox1 {
position: relative;
width: 1280px;
height: 720px;
user-select: none;
background-image: url(../image/floor-2.png);
background-size: 100% 100%;
background-repeat: no-repeat;
background-color: linear-gradient(top to bottom,#c0deff, #8eadf0);
// 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性
perspective: 900px;
perspective-origin: 900px -120px;
// 左上角区域切换功能
.btn-box {
width: 100px;
position: sticky;
top: 15px;
margin-left: 10px;
display: flex;
flex-direction: column;
gap: 8px;
.btn-item {
cursor: pointer;
width: 100%;
height: 35px;
border-radius: 4px;
// background: rgba(39, 120, 255, 1);
background: rgb(7, 72, 116);
border: 1px solid rgba(51, 199, 255, 1);
box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
font-size: 16px;
color: white;
}
.btnActive {
background: rgba(39, 120, 255, 1);
}
.btn-item:hover {
color: white;
}
}
// 大区分区
.area{
position: absolute;
bottom: 320px;
left: 240px;
width: 950px;
height: 270px;
transform: rotateX(76deg) rotateZ(-22deg) skew(30deg);
display: flex;
justify-content: space-between;
gap: 5px;
.area1 {
width: 170px;
background: rgba(0, 251, 91, 0.3);
border: 2px solid rgb(0, 251, 91);
display: flex;
}
.area2 {
width: 150px;
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: transform ease 0.2s;
>.light-group { >.light-group {
height: 100%; height: 100%;
flex: 1; flex: 1;
@ -105,7 +198,7 @@
// border: 2px solid red; // border: 2px solid red;
.shadow-box { .shadow-box {
width: 30px; width: 30px;
height: 200px; height: 230px;
border-radius: 20px; border-radius: 20px;
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
} }

124
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="lighting-box"> <div class="lighting-box">
<div class="lighting-img-box"> <div class="lighting-img-box" :class="{ lightingImgBox1: thisFloor == '2' }">
<!-- 左上角区域切换 --> <!-- 左上角区域切换 -->
<div class="btn-box"> <div class="btn-box">
<button <button
@ -26,14 +26,9 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 照明设备 --> <!-- 空调设备 -->
<div class="lights"> <div class="lights">
<light <device v-for="(item, index) in devices" :key="index" :device="item" />
v-for="(item, index) in bulbs"
:key="index"
:styleObject="item.styleText"
:type="item.type"
:visible="item.visible" />
</div> </div>
</div> </div>
<!-- 右侧抽屉 --> <!-- 右侧抽屉 -->
@ -55,16 +50,17 @@
<a-tab-pane key="1" tab="控制面板"> <a-tab-pane key="1" tab="控制面板">
<tabs1 <tabs1
ref="tabs1Ref" ref="tabs1Ref"
@changeArea="changeArea"
@reset="reset" @reset="reset"
@reload="reload" @reload="reload"
@reset-all="resetDrawer"
@change-area="changeArea"
:treeData="treeData" /> :treeData="treeData" />
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="计划列表" force-render> <a-tab-pane key="2" tab="计划列表" force-render>
<tabs2 /> <tabs2 ref="tabs2Ref" @reset-all="resetDrawer" />
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3" tab="日志"> <a-tab-pane key="3" tab="日志">
<tabs3 /> <tabs3 ref="tabs3Ref" @reset-all="resetDrawer" />
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-drawer> </a-drawer>
@ -73,8 +69,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { devicePosition, devicePosition1 } from './devicePosition';
// //
import light from './light.vue'; import device from './device.vue';
import tabs1 from './tabs1.vue'; import tabs1 from './tabs1.vue';
import tabs2 from './tabs2.vue'; import tabs2 from './tabs2.vue';
import tabs3 from './tabs3.vue'; import tabs3 from './tabs3.vue';
@ -91,7 +88,7 @@
onMounted(() => { onMounted(() => {
// 线 // 线
getAllArea(); getAllArea();
// //
getBulbs(); getBulbs();
}); });
@ -108,7 +105,15 @@
const thisFloor = ref('1'); const thisFloor = ref('1');
// //
const changeFloor = (area: any, floor: string) => { const changeFloor = (area: any, floor: string) => {
if (floor == thisFloor.value) {
return;
}
//
tabs1Ref.value.refresh(false);
//
devices.value = [];
thisFloor.value = floor; thisFloor.value = floor;
getBulbs();
// //
reset(); reset();
// //
@ -127,56 +132,7 @@
// - // -
const area = ref(['1']); const area = ref(['1']);
// 线 - // 线 -
const bulbs = ref([ const devices = ref([]);
{
styleText: { left: '180px', bottom: '200px' },
area: 1,
type: 1,
visible: true,
},
{
styleText: { left: '230px', bottom: '125px' },
area: 1,
type: 2,
visible: true,
},
{
styleText: { left: '320px', bottom: '140px' },
area: 1,
type: 3,
visible: true,
},
{
styleText: { left: '245px', bottom: '230px' },
area: 1,
type: 3,
visible: true,
},
{
styleText: { left: '405px', bottom: '230px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '460px', bottom: '180px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '360px', bottom: '275px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '715px', bottom: '320px' },
area: 3,
type: 1,
visible: true,
},
]);
// 线 // 线
const changeArea = (result: any) => { const changeArea = (result: any) => {
console.log(result, 'changeArea'); console.log(result, 'changeArea');
@ -243,9 +199,7 @@
* @param id 用于判断样式和层级的前端属性 * @param id 用于判断样式和层级的前端属性
* @param selected 用于表示是否选中的前端属性 * @param selected 用于表示是否选中的前端属性
*/ */
// 1
data.forEach((floor: any) => { data.forEach((floor: any) => {
// 2
floor.childList.forEach((item: any, index: number) => { floor.childList.forEach((item: any, index: number) => {
if (index == 0) { if (index == 0) {
item.selected = true; item.selected = true;
@ -270,6 +224,10 @@
}); });
} }
treeData.value = data[index].childList; treeData.value = data[index].childList;
//
try {
tabs1Ref.value.setButtons2(treeData.value[0].childList);
} catch {}
// //
preload.value = true; preload.value = true;
}); });
@ -278,9 +236,16 @@
getAllArea(true); getAllArea(true);
}; };
// ============================================== // ==============================================
const getBulbs = () => { const getBulbs = () => {
const floor = thisFloor.value;
let arr: Array<Object> = [];
if (floor == '1') {
arr = devicePosition;
} else if (floor == '2') {
arr = devicePosition1;
}
http http
.get(airConditionControl.getDeviceList, { .get(airConditionControl.getDeviceList, {
floor: thisFloor.value, floor: thisFloor.value,
@ -288,7 +253,11 @@
siteId: state.siteId, siteId: state.siteId,
}) })
.then((res) => { .then((res) => {
console.log(res); const data = res.data;
data.forEach((item: any, index: number) => {
item.styleText = arr[index];
});
devices.value = data;
}); });
}; };
@ -302,8 +271,29 @@
const toggleDrawer = () => { const toggleDrawer = () => {
visible.value = !visible.value; visible.value = !visible.value;
}; };
// tabtab
const resetDrawer = () => {
//
getBulbs();
// tab1
reload();
tabs1Ref.value.refresh();
// tab2 tab3
try {
// tab2
tabs2Ref.value.reset();
} catch {}
try {
// tab3
tabs3Ref.value.reset();
} catch {}
};
// tab1 // tab1
const tabs1Ref = ref(); const tabs1Ref = ref();
// tab2
const tabs2Ref = ref();
// tab3
const tabs3Ref = ref();
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import './index.less'; @import './index.less';

3
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/lightPosition.ts

@ -1,3 +0,0 @@
// 此文件只定义light(即俯视图小灯泡)的位置信息
// 与显示状态和分组信息无关
export const lightPosition = [];

129
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue

@ -171,6 +171,7 @@
title="此操作将会撤销修改" title="此操作将会撤销修改"
ok-text="确定" ok-text="确定"
cancel-text="取消" cancel-text="取消"
placement="bottomRight"
@confirm="delBtn(item)" @confirm="delBtn(item)"
@cancel="changeCancel"> @cancel="changeCancel">
<button class="cxbtn">撤销</button> <button class="cxbtn">撤销</button>
@ -180,22 +181,24 @@
<div class="btn-item"> <div class="btn-item">
<div class="left">控制模式</div> <div class="left">控制模式</div>
<div class="right"> <div class="right">
<span>手动</span> <span>{{ item.stateBefore.autoStatus.label.replace('模式', '') }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>自动</span> <span>{{ item.stateAfter.autoStatus.label.replace('模式', '') }}</span>
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
<div class="left"> </div> <div class="left"> </div>
<div class="right"> <div class="right">
<!-- 数字0也会被判为false故只判断undefined null --> <!-- 数字0也会被判为false故只判断undefined null -->
<span>{{ <span>{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--' item.stateBefore.temperature != null ? item.stateBefore.temperature + '℃' : '--'
}}</span> }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{ <span>
item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--' {{
}}</span> item.stateAfter.temperature != null ? item.stateAfter.temperature + '℃' : '--'
}}
</span>
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
@ -211,14 +214,14 @@
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
<div class="left"> 色温 </div> <div class="left"> 风速 </div>
<div class="right"> <div class="right">
<span>{{ <span>{{
item?.stateBefore?.color != undefined ? item.stateBefore.color : '--' item.stateBefore.windSpeed != null ? item.stateBefore.windSpeed + 'm/s' : '--'
}}</span> }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span> <span>
{{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }} {{ item.stateAfter.windSpeed != null ? item.stateAfter.windSpeed + 'm/s' : '--' }}
</span> </span>
</div> </div>
</div> </div>
@ -269,8 +272,8 @@
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
// //
import { http } from '/nerv-lib/util/http'; import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
import { airConditionControl } from '/@/api/airConditionControlSystem'; import { airConditionControl } from '/@/api/airConditionControlSystem';
import { planManage } from '/@/api/planManage';
// //
import { items } from '/@/store/item'; import { items } from '/@/store/item';
@ -303,8 +306,9 @@
* @method changeArea 用于控制俯视图的选中状态 * @method changeArea 用于控制俯视图的选中状态
* @method reset 用于重置按钮区 * @method reset 用于重置按钮区
* @method reload 用于刷新一次页面 * @method reload 用于刷新一次页面
* @method resetAll 刷新所有tab对计划进行修改时需刷新tab2与tab3
*/ */
const emit = defineEmits(['changeArea', 'reset', 'reload']); const emit = defineEmits(['changeArea', 'reset', 'reload', 'resetAll']);
// ======================================================================= // =======================================================================
@ -439,6 +443,10 @@
treePid: '', treePid: '',
childList: [], childList: [],
}); });
//
const setButtons2 = (data: any) => {
buttons2.value = data;
};
// //
const changeLine = (button: any) => { const changeLine = (button: any) => {
// / // /
@ -666,22 +674,20 @@
changeList.value.forEach((item: any) => { changeList.value.forEach((item: any) => {
resetChangeList(item); resetChangeList(item);
}); });
}
changeList.value = [];
if (!reload) {
lockList.value.forEach((item: any) => { lockList.value.forEach((item: any) => {
resetLockList(item); resetLockList(item);
}); });
//
let data = props.treeData[0];
//
data.selected = true;
// 1-1
buttons2.value = data.childList;
// 线
resetMode();
} }
changeList.value = [];
lockList.value = []; lockList.value = [];
//
let data = props.treeData[0];
//
data.selected = true;
// 1-1
buttons2.value = data.childList;
// 线
resetMode();
}; };
// / // /
const resetLockList = (item: any) => { const resetLockList = (item: any) => {
@ -727,10 +733,59 @@
}; };
// //
const showModal = () => { const showModal = () => {
if (!changeList.value.length) { if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改'); return message.info('未产生任何修改');
} }
http http
.get(planManage.getRunningPlan, {
deviceType: 2,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
//
if (res.data && res.data.length) {
// 使confirm
// Modal.confirm({
// title: '',
// content: '""',
// onOk() {
// return new Promise((resolve, reject) => {
// });
// },
// onCancel() { },
// });
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
if (flag) {
//
http
.post(airConditionControl.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
console.log(res, '成功');
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
message.error('关闭进行中的任务操作失败,请重新尝试');
}
});
}
//
} else {
sendChangeList();
}
});
};
// /
const sendChangeList = () => {
http
.post(airConditionControl.getChangeList, { .post(airConditionControl.getChangeList, {
sceneList: changeList.value, sceneList: changeList.value,
lockList: lockList.value, lockList: lockList.value,
@ -738,7 +793,7 @@
siteId: state.siteId, siteId: state.siteId,
}) })
.then((res) => { .then((res) => {
if (res.msg === 'success') { if (res.retcode == 0) {
diffList.value = res.data; diffList.value = res.data;
executeVisible.value = true; executeVisible.value = true;
} else { } else {
@ -790,10 +845,24 @@
projectId: state.projectId, projectId: state.projectId,
siteId: state.siteId, siteId: state.siteId,
}) })
.then(() => { .then((res) => {
emit('reload'); let data = res.data;
//
if (res.retcode != 0) {
//
return message.warning(data.msg);
}
//
if (data.allSucceed) {
message.success('修改完成');
// allSucceedtrue
} else {
message.info(`${data.successList.length}条修改成功,${data.failList.length}条修改失败`);
}
refresh(true); refresh(true);
}); emit('resetAll');
})
.catch(() => {});
}; };
// ======================================================================== // ========================================================================
@ -814,6 +883,10 @@
changeArea, changeArea,
// //
changeLine, changeLine,
//
refresh,
//
setButtons2,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

32
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue

@ -99,11 +99,10 @@
// =========================================================== // ===========================================================
onMounted(() => { onMounted(() => {
//
getStateEnum(); getStateEnum();
// // 穿
getTable(); reset();
// 穿
getLeftPlan();
}); });
// //
const state = items(); const state = items();
@ -111,6 +110,10 @@
let enumData = await getEnum({ params: { enumType: 'PlanExecuteStatus' } }); let enumData = await getEnum({ params: { enumType: 'PlanExecuteStatus' } });
stateList.value = enumData.data; stateList.value = enumData.data;
}; };
/**
* @method resetAll 刷新3个tab中的全部数据修改计划会影响tab1数据信息生成tab3日志
*/
const emit = defineEmits(['resetAll']);
// tab ======================================================== // tab ========================================================
@ -190,14 +193,21 @@
.then((res) => { .then((res) => {
if (res.retcode == 0) { if (res.retcode == 0) {
message.success('操作成功'); message.success('操作成功');
getTable(); //
getLeftPlan(); emit('resetAll');
} else { } else {
message.info(res.msg); message.info(res.msg);
} }
}); });
}; };
const reset = () => {
//
getTable();
// 穿
getLeftPlan();
};
// tab ==================================================== // tab ====================================================
// //
@ -221,7 +231,7 @@
deviceType: 2, deviceType: 2,
}) })
.then((res) => { .then((res) => {
let arr = []; let arr: Array<Object> = [];
res.data.forEach((item: any) => { res.data.forEach((item: any) => {
arr.push({ arr.push({
key: item.id, key: item.id,
@ -248,14 +258,18 @@
http.post(planManage.submitTransData, targetKeys.value).then(() => { http.post(planManage.submitTransData, targetKeys.value).then(() => {
message.success('添加成功'); message.success('添加成功');
// //
getTable(); reset();
getLeftPlan();
}); });
}; };
// 穿 // 穿
const filterOption = (inputValue: string, option: any) => { const filterOption = (inputValue: string, option: any) => {
return option.description.indexOf(inputValue) > -1; return option.description.indexOf(inputValue) > -1;
}; };
//
defineExpose({
reset,
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import '../style/dialogStyle.less'; @import '../style/dialogStyle.less';

38
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue

@ -31,6 +31,7 @@
show-size-changer show-size-changer
:total="pagination.total" :total="pagination.total"
@change="getTable(true)" /> @change="getTable(true)" />
<div style="width: 100%; height: 40px"></div>
<div class="out-dialog" :class="{ showDialog: logModalVisible }" v-if="logModalVisible"> <div class="out-dialog" :class="{ showDialog: logModalVisible }" v-if="logModalVisible">
<div class="content"> <div class="content">
@ -54,18 +55,29 @@
<div class="btn-item"> <div class="btn-item">
<div class="left">控制模式</div> <div class="left">控制模式</div>
<div class="right"> <div class="right">
<span>手动</span> <span>{{
item.autoStatusBefore.label.indexOf('模式') != -1
? item.autoStatusBefore.label.replace('模式', '')
: item.autoStatusBefore.label
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>自动</span></div <span>{{
item.autoStatusAfter.label.indexOf('模式') != -1
? item.autoStatusAfter.label.replace('模式', '')
: item.autoStatusAfter.label
}}</span></div
> >
</div> </div>
<div class="btn-item"> <div class="btn-item">
<div class="left"> 亮度 </div> <div class="left"> </div>
<div class="right"> <div class="right">
<!-- 由于数字0也会被判为false故只判断undefined null --> <span>{{
<span>{{ item.brightnessBefore != null ? item.brightnessBefore : '--' }}</span> item.temperatureBefore != null ? item.temperatureBefore + '℃' : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{ item.brightnessAfter != null ? item.brightnessAfter : '--' }}</span> <span>
{{ item.temperatureAfter != null ? item.temperatureAfter + '℃' : '--' }}
</span>
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
@ -77,13 +89,11 @@
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
<div class="left"> 色温 </div> <div class="left"> 风速 </div>
<div class="right"> <div class="right">
<span>{{ item.colorBefore != null ? item.colorBefore : '--' }}</span> <span>{{ item.windSpeedBefore ? item.windSpeedBefore + 'm/s' : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span> <span>{{ item.windSpeedAfter ? item.windSpeedAfter + 'm/s' : '--' }}</span>
{{ item.colorAfter != null ? item.colorAfter : '--' }}
</span>
</div> </div>
</div> </div>
<div class="btn-item"> <div class="btn-item">
@ -194,7 +204,13 @@
} }
}); });
}; };
//
const cxList = ref([]); const cxList = ref([]);
//
defineExpose({
reset,
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import '../style/dialogStyle.less'; @import '../style/dialogStyle.less';

4
hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue

@ -227,6 +227,10 @@
}); });
} }
treeData.value = data[index].childList; treeData.value = data[index].childList;
//
try {
tabs1Ref.value.setButtons2(treeData.value[0].childList);
} catch {}
// //
preload.value = true; preload.value = true;
}); });

19
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue

@ -265,7 +265,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue'; import { ref, computed, onMounted } from 'vue';
import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue'; import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue';
import { message, Modal } from 'ant-design-vue'; import { message, Modal } from 'ant-design-vue';
// //
@ -301,16 +301,6 @@
}, },
}); });
watch(
() => props.treeData,
(newValue) => {
//
// buttons2.value = newValue[0].childList;
},
{
deep: true,
},
);
/** /**
* @method changeArea 用于控制俯视图的选中状态 * @method changeArea 用于控制俯视图的选中状态
* @method reset 用于重置按钮区 * @method reset 用于重置按钮区
@ -452,6 +442,10 @@
treePid: '', treePid: '',
childList: [], childList: [],
}); });
//
const setButtons2 = (data: any) => {
buttons2.value = data;
};
// //
const changeLine = (button: any) => { const changeLine = (button: any) => {
// / // /
@ -688,6 +682,7 @@
data.selected = true; data.selected = true;
// 1-1 // 1-1
buttons2.value = data.childList; buttons2.value = data.childList;
// 线
resetMode(); resetMode();
} }
changeList.value = []; changeList.value = [];
@ -890,6 +885,8 @@
changeLine, changeLine,
// //
refresh, refresh,
//
setButtons2,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

2
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue

@ -89,8 +89,8 @@
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
// //
import { http } from '/nerv-lib/util/http'; import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
import { planManage } from '/@/api/planManage'; import { planManage } from '/@/api/planManage';
import { lightingManage } from '/@/api/IlluminationInfo';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { getEnum } from '/@/api'; import { getEnum } from '/@/api';
// //

18
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue

@ -231,7 +231,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue'; import { ref, computed, onMounted } from 'vue';
import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue'; import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue';
import { message, Modal } from 'ant-design-vue'; import { message, Modal } from 'ant-design-vue';
// //
@ -289,16 +289,6 @@
}, },
}); });
watch(
() => props.treeData,
(newValue) => {
//
// buttons2.value = newValue[0].childList;
},
{
deep: true,
},
);
/** /**
* @method changeArea 用于控制俯视图的选中状态 * @method changeArea 用于控制俯视图的选中状态
* @method reset 用于重置按钮区 * @method reset 用于重置按钮区
@ -412,6 +402,10 @@
treePid: '', treePid: '',
childList: [], childList: [],
}); });
//
const setButtons2 = (data: any) => {
buttons2.value = data;
};
// //
const changeLine = (button: any) => { const changeLine = (button: any) => {
// / // /
@ -839,6 +833,8 @@
changeLine, changeLine,
// //
refresh, refresh,
//
setButtons2,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

4
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue

@ -370,6 +370,10 @@
http.get(url, { projectId: state.projectId, siteId: state.siteId }).then((res) => { http.get(url, { projectId: state.projectId, siteId: state.siteId }).then((res) => {
const data = res.data; const data = res.data;
treeData.value = data[0].childList; treeData.value = data[0].childList;
//
try {
tabs1Ref.value.setButtons2(treeData.value[0].childList);
} catch {}
}); });
}; };

Loading…
Cancel
Save