Browse Source

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

temp
chenpingsen 3 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. 41
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/index.vue
  5. 8
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/component/logTab.vue
  6. 12
      hx-ai-intelligent/src/view/equipmentControl/waterSystem/device.ts
  7. 13
      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>
<span class="circuit-text">{{ props.type }}</span>
<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
v-model:checked="selectAllCheckbox"
:disabled="singleSelection"
@ -190,16 +182,27 @@
}}</span></div
>
</div>
<div class="btn-item">
<div class="left"> 亮度 </div>
<div class="btn-item" v-if="url.deviceType != 5">
<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">
<!-- 由于数字0也会被判为false故只判断undefined null -->
<span>{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--'
item.stateBefore.openPercent != null ? item.stateBefore.openPercent : '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--'
item.stateAfter.openPercent != null ? item.stateAfter.openPercent : '--'
}}</span>
</div>
</div>
@ -216,14 +219,20 @@
</div>
</div>
<div class="btn-item">
<div class="left"> 色温 </div>
<div class="left"> 开启状态 </div>
<div class="right">
<span>{{
item?.stateBefore?.color != undefined ? item.stateBefore.color : '--'
item?.stateBefore?.switchStatus?.label != null
? item.stateBefore.switchStatus.label
: '--'
}}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }}
{{
item?.stateAfter?.switchStatus?.label != null
? item.stateAfter.switchStatus.label
: '--'
}}
</span>
</div>
</div>
@ -231,7 +240,7 @@
<div class="left"> 启用状态 </div>
<div class="right">
<span>{{
item?.stateBefore?.lockStatus != undefined
item?.stateBefore?.lockStatus != null
? item.stateBefore.lockStatus
? '禁用'
: '启用'
@ -240,7 +249,7 @@
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>
{{
item?.stateAfter?.lockStatus != undefined
item?.stateAfter?.lockStatus != null
? item.stateAfter.lockStatus
? '禁用'
: '启用'
@ -292,7 +301,7 @@
url.getList = ventilating.getChangeList2;
url.sendList = ventilating.sendChangeList2;
url.deviceType = 4;
} else {
} else if (props.type == '电动窗') {
url.getList = ventilating.getChangeList3;
url.sendList = ventilating.sendChangeList3;
url.deviceType = 5;
@ -852,6 +861,7 @@
};
//
const submitChangeList = () => {
state.setLoading(true);
http
.post(url.sendList, {
sceneList: changeList.value,
@ -860,6 +870,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
//
if (res.retcode != 0) {
@ -876,7 +887,9 @@
refresh(true);
emit('resetAll');
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
// ========================================================================

41
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' }"
:closable="false"
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">
<double-right-outlined class="drawer-icon" style="color: white" />
@ -410,19 +411,26 @@
} else {
url = ventilating.getTree3;
}
http.get(url, { projectId: state.projectId, siteId: state.siteId }).then((res) => {
const data = res.data[0].childList;
//
data.forEach((item: any, index: number) => {
if (index === 0) {
item.selected = true;
} else {
item.selected = false;
}
state.setLoading(true);
http
.get(url, { projectId: state.projectId, siteId: state.siteId })
.then((res) => {
state.setLoading(false);
const data = res.data[0].childList;
//
data.forEach((item: any, index: number) => {
if (index === 0) {
item.selected = true;
} else {
item.selected = false;
}
});
treeData.value = data;
selectIndex.value = index;
})
.catch(() => {
state.setLoading(false);
});
treeData.value = data;
selectIndex.value = index;
});
};
const getDevice = async (type: number) => {
// tab1
@ -491,6 +499,13 @@
const resetDrawer = () => {
// tab1
reload();
if (selectIndex.value == 4) {
getDevice(1);
} else if (selectIndex.value == 5) {
getDevice(2);
} else if (selectIndex.value == 6) {
getDevice(3);
}
tabs1Ref.value.refresh();
// tab2 tab3
try {

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

@ -64,7 +64,6 @@
<span>{{ item.openPercentAfter + '%' }}</span>
</div>
</div>
<div></div>
</div>
</div>
<a-empty style="margin-top: 100px" v-if="valveLogList.length == 0">
@ -83,9 +82,9 @@
<div>
<div class="info">频率</div>
<div class="text">
<span>{{ item.frequencyBefore + 'MHz' }}</span>
<span>{{ item.frequencyBefore + ' MHz' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{ item.frequencyAfter + 'MHz' }}</span>
<span>{{ item.frequencyAfter + ' MHz' }}</span>
</div>
</div>
<div>
@ -348,7 +347,6 @@
margin-left: 15px;
margin-top: 15px;
width: calc(100% - 15px);
font-size: 13px;
height: auto;
display: flex;
gap: 15px;
@ -392,6 +390,8 @@
}
.list-item-main {
display: flex;
flex-direction: column;
gap: 15px;
> div {
flex: 1;
display: flex;

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

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

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

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

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

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

Loading…
Cancel
Save