Browse Source

fix:字段修改/交互逻辑修改

temp
chenpingsen 2 months ago
parent
commit
93f2869a5b
  1. BIN
      hx-ai-intelligent/src/view/equipmentControl/image/floor1.png
  2. BIN
      hx-ai-intelligent/src/view/equipmentControl/image/floor2.png
  3. 53
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue
  4. 19
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue
  5. 4
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/component/logTab.vue
  6. 12
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/device.ts
  7. 11
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/deviceInfo.vue
  8. 8
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/index.vue

BIN
hx-ai-intelligent/src/view/equipmentControl/image/floor1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
hx-ai-intelligent/src/view/equipmentControl/image/floor2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

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

@ -39,14 +39,6 @@
<div class="circuit-tab"></div> <div class="circuit-tab"></div>
<span class="circuit-text">{{ props.type }}</span> <span class="circuit-text">{{ props.type }}</span>
<div class="btn2"> <div class="btn2">
<!-- <a-badge :offset="[-10, 2]" :count="lockList.length">
<button
class="openPlan"
:class="{ enabled2: isPlanEnabled2, disabled2: !isPlanEnabled2 }"
@click="togglePlan2">
{{ isPlanEnabled2 ? '启用开关' : '禁用开关' }}
</button>
</a-badge> -->
<a-switch <a-switch
v-model:checked="selectAllCheckbox" v-model:checked="selectAllCheckbox"
:disabled="singleSelection" :disabled="singleSelection"
@ -190,16 +182,27 @@
}}</span></div }}</span></div
> >
</div> </div>
<div class="btn-item"> <div class="btn-item" v-if="url.deviceType != 5">
<div class="left"> 亮度 </div> <div class="left"> 运行模式 </div>
<div class="right">
<span>{{
item.stateBefore.runMode.label != null ? item.stateBefore.runMode.label : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item.stateAfter.runMode.label != null ? item.stateAfter.runMode.label : '--'
}}</span>
</div>
</div>
<div class="btn-item" v-if="url.deviceType == 5">
<div class="left"> 开窗幅度 </div>
<div class="right"> <div class="right">
<!-- 由于数字0也会被判为false故只判断undefined null -->
<span>{{ <span>{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--' item.stateBefore.openPercent != null ? item.stateBefore.openPercent : '--'
}}</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 : '--' item.stateAfter.openPercent != null ? item.stateAfter.openPercent : '--'
}}</span> }}</span>
</div> </div>
</div> </div>
@ -216,14 +219,20 @@
</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?.switchStatus?.label != null
? item.stateBefore.switchStatus.label
: '--'
}}</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?.switchStatus?.label != null
? item.stateAfter.switchStatus.label
: '--'
}}
</span> </span>
</div> </div>
</div> </div>
@ -231,7 +240,7 @@
<div class="left"> 启用状态 </div> <div class="left"> 启用状态 </div>
<div class="right"> <div class="right">
<span>{{ <span>{{
item?.stateBefore?.lockStatus != undefined item?.stateBefore?.lockStatus != null
? item.stateBefore.lockStatus ? item.stateBefore.lockStatus
? '禁用' ? '禁用'
: '启用' : '启用'
@ -240,7 +249,7 @@
<img src="/asset/image/bulbLogo/22406.png" alt="" /> <img src="/asset/image/bulbLogo/22406.png" alt="" />
<span> <span>
{{ {{
item?.stateAfter?.lockStatus != undefined item?.stateAfter?.lockStatus != null
? item.stateAfter.lockStatus ? item.stateAfter.lockStatus
? '禁用' ? '禁用'
: '启用' : '启用'
@ -292,7 +301,7 @@
url.getList = ventilating.getChangeList2; url.getList = ventilating.getChangeList2;
url.sendList = ventilating.sendChangeList2; url.sendList = ventilating.sendChangeList2;
url.deviceType = 4; url.deviceType = 4;
} else { } else if (props.type == '电动窗') {
url.getList = ventilating.getChangeList3; url.getList = ventilating.getChangeList3;
url.sendList = ventilating.sendChangeList3; url.sendList = ventilating.sendChangeList3;
url.deviceType = 5; url.deviceType = 5;
@ -852,6 +861,7 @@
}; };
// //
const submitChangeList = () => { const submitChangeList = () => {
state.setLoading(true);
http http
.post(url.sendList, { .post(url.sendList, {
sceneList: changeList.value, sceneList: changeList.value,
@ -860,6 +870,7 @@
siteId: state.siteId, siteId: state.siteId,
}) })
.then((res) => { .then((res) => {
state.setLoading(false);
let data = res.data; let data = res.data;
// //
if (res.retcode != 0) { if (res.retcode != 0) {
@ -876,7 +887,9 @@
refresh(true); refresh(true);
emit('resetAll'); emit('resetAll');
}) })
.catch(() => {}); .catch(() => {
state.setLoading(false);
});
}; };
// ======================================================================== // ========================================================================

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

@ -130,7 +130,8 @@
:body-style="{ background: 'rgba(0, 0, 0)', opacity: 0.8, color: 'white' }" :body-style="{ background: 'rgba(0, 0, 0)', opacity: 0.8, color: 'white' }"
:closable="false" :closable="false"
id="drawer" id="drawer"
:maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }"> :maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }"
:mask="false">
<!-- 左侧抽屉的关闭按钮 --> <!-- 左侧抽屉的关闭按钮 -->
<div class="drawer-box-out" @click="toggleDrawer"> <div class="drawer-box-out" @click="toggleDrawer">
<double-right-outlined class="drawer-icon" style="color: white" /> <double-right-outlined class="drawer-icon" style="color: white" />
@ -410,7 +411,11 @@
} else { } else {
url = ventilating.getTree3; url = ventilating.getTree3;
} }
http.get(url, { projectId: state.projectId, siteId: state.siteId }).then((res) => { state.setLoading(true);
http
.get(url, { projectId: state.projectId, siteId: state.siteId })
.then((res) => {
state.setLoading(false);
const data = res.data[0].childList; const data = res.data[0].childList;
// //
data.forEach((item: any, index: number) => { data.forEach((item: any, index: number) => {
@ -422,6 +427,9 @@
}); });
treeData.value = data; treeData.value = data;
selectIndex.value = index; selectIndex.value = index;
})
.catch(() => {
state.setLoading(false);
}); });
}; };
const getDevice = async (type: number) => { const getDevice = async (type: number) => {
@ -491,6 +499,13 @@
const resetDrawer = () => { const resetDrawer = () => {
// tab1 // tab1
reload(); reload();
if (selectIndex.value == 4) {
getDevice(1);
} else if (selectIndex.value == 5) {
getDevice(2);
} else if (selectIndex.value == 6) {
getDevice(3);
}
tabs1Ref.value.refresh(); tabs1Ref.value.refresh();
// tab2 tab3 // tab2 tab3
try { try {

4
hx-ai-intelligent/src/view/equipmentControl/waterSystem/component/logTab.vue

@ -64,7 +64,6 @@
<span>{{ item.openPercentAfter + '%' }}</span> <span>{{ item.openPercentAfter + '%' }}</span>
</div> </div>
</div> </div>
<div></div>
</div> </div>
</div> </div>
<a-empty style="margin-top: 100px" v-if="valveLogList.length == 0"> <a-empty style="margin-top: 100px" v-if="valveLogList.length == 0">
@ -348,7 +347,6 @@
margin-left: 15px; margin-left: 15px;
margin-top: 15px; margin-top: 15px;
width: calc(100% - 15px); width: calc(100% - 15px);
font-size: 13px;
height: auto; height: auto;
display: flex; display: flex;
gap: 15px; gap: 15px;
@ -392,6 +390,8 @@
} }
.list-item-main { .list-item-main {
display: flex; display: flex;
flex-direction: column;
gap: 15px;
> div { > div {
flex: 1; flex: 1;
display: flex; display: flex;

12
hx-ai-intelligent/src/view/equipmentControl/waterSystem/device.ts

@ -52,14 +52,14 @@ export const linePosition = [
// 汇入市政管道 - 途径水泵2 // 汇入市政管道 - 途径水泵2
{ left: '68%', top: '45%', width: '28%' }, { left: '68%', top: '45%', width: '28%' },
// 总排水闸 - 总排水泵1 上半 // 总排水闸 - 总排水泵1 上半
{ left: '75%', top: '45%', transform: 'rotateZ(-90deg)', transformOrigin: 'left', width: '10%' }, { left: '76%', top: '45%', transform: 'rotateZ(-90deg)', transformOrigin: 'left', width: '10%' },
{ left: '75%', top: '23%', width: '11%' }, { left: '76%', top: '23%', width: '11%' },
{ left: '86%', top: '22.5%', transform: 'rotateZ(90deg)', transformOrigin: 'left', width: '10%' }, { left: '87%', top: '22.5%', transform: 'rotateZ(90deg)', transformOrigin: 'left', width: '10%' },
// 总排水闸 - 总排水泵3 下半 // 总排水闸 - 总排水泵3 下半
{ left: '75%', top: '45%', transform: 'rotateZ(90deg)', transformOrigin: 'left', width: '9%' }, { left: '76%', top: '45%', transform: 'rotateZ(90deg)', transformOrigin: 'left', width: '9%' },
{ left: '75%', top: '65%', width: '11%' }, { left: '76%', top: '65%', width: '11%' },
{ {
left: '86%', left: '87%',
top: '65%', top: '65%',
transform: 'rotateZ(-90deg)', transform: 'rotateZ(-90deg)',
transformOrigin: 'left', transformOrigin: 'left',

11
hx-ai-intelligent/src/view/equipmentControl/waterSystem/deviceInfo.vue

@ -12,13 +12,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mode"> <!-- <div class="mode">
<div class="title-item"> <div class="title-item">
<div class="title-back">控制模式</div> <div class="title-back">控制模式</div>
<div class="title-button">计划启用</div> <div class="title-button">计划启用</div>
</div> </div>
<div class="mode-item"></div> <div class="mode-item">
<button class="btn">手动模式</button>
<button class="btn">强排模式</button>
</div> </div>
</div> -->
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -143,7 +146,11 @@
// //
.mode { .mode {
width: 200px; width: 200px;
display: flex;
justify-content: space-between;
.mode-item { .mode-item {
display: flex;
justify-content: space-between;
} }
} }
} }

8
hx-ai-intelligent/src/view/equipmentControl/waterSystem/index.vue

@ -22,7 +22,7 @@
</div> </div>
<!-- 右下角按钮 --> <!-- 右下角按钮 -->
<div class="buttons"> <div class="buttons">
<a-button type="primary" @click="openDrawer1">执行</a-button> <a-button type="primary" @click="openDrawer">执行</a-button>
<a-button type="primary" @click="resetAll">全部撤销</a-button> <a-button type="primary" @click="resetAll">全部撤销</a-button>
</div> </div>
<!-- 页面右侧抽屉开关 --> <!-- 页面右侧抽屉开关 -->
@ -91,7 +91,6 @@
<span>{{ item.value + item.unit }}</span> <span>{{ item.value + item.unit }}</span>
</div> </div>
</div> </div>
<div></div>
</div> </div>
</div> </div>
<a-empty style="margin-top: 100px" v-if="valveList.length == 0"> <a-empty style="margin-top: 100px" v-if="valveList.length == 0">
@ -197,7 +196,7 @@
const valveList = ref<any>([]); const valveList = ref<any>([]);
// //
const openDrawer1 = () => { const openDrawer = () => {
valveList.value = device2.value.filter((item: any) => { valveList.value = device2.value.filter((item: any) => {
return item.edited; return item.edited;
}); });
@ -461,6 +460,7 @@
transform: translateY(-60px); transform: translateY(-60px);
img { img {
height: 100%; height: 100%;
user-select: none;
} }
div { div {
width: inherit; width: inherit;
@ -593,6 +593,8 @@
.list-item-main { .list-item-main {
display: flex; display: flex;
font-size: 13px; font-size: 13px;
flex-direction: column;
gap: 15px;
> div { > div {
flex: 1; flex: 1;
display: flex; display: flex;

Loading…
Cancel
Save