Browse Source

add:增加全局loading

temp
chenpingsen 4 weeks ago
parent
commit
7b4f22222d
  1. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/fault.png
  2. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/fault1.png
  3. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/repair.png
  4. 7
      hx-ai-intelligent/src/App.vue
  5. 57
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/device.vue
  6. 71
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue
  7. 14
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue
  8. 50
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue
  9. 56
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
  10. 84
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue
  11. 37
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/lightPosition.ts
  12. 78
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
  13. 14
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue
  14. 49
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue
  15. 4
      hx-ai-intelligent/src/view/equipmentControl/style/dialogStyle.less
  16. 71
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue
  17. 46
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanLog.vue
  18. 14
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanPlant.vue

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

7
hx-ai-intelligent/src/App.vue

@ -1,6 +1,8 @@
<template>
<a-config-provider :locale="locale">
<router-view />
<a-spin :spinning="state.isLoading" size="large">
<router-view />
</a-spin>
</a-config-provider>
</template>
@ -10,6 +12,7 @@
import { useRouter } from 'vue-router';
import Cookies from 'js-cookie';
import { message } from 'ant-design-vue';
import { items } from '/@/store/item';
export default defineComponent({
name: 'App',
@ -37,6 +40,8 @@
return {
cachedViews,
locale: zhCN,
//
state: items(),
};
},
});

57
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/device.vue

@ -9,29 +9,29 @@
device.regionName + ' > ' + device.deviceGroupName
}}</span></div
>
<button class="right-button">{{
record?.runStatus?.label ? record.runStatus.label : '--'
<button class="right-button" :class="getClass(record)">{{
record.runStatus.value != 0 ? record.runStatus.label : record.switchStatus.label
}}</button>
</div>
<div class="light-tag-box">
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制模式</span>
<span class="title-text">控制模式</span>
<span class="result">{{ record.autoStatus.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">温度</span>
<span class="title-text">温度</span>
<span class="result">{{ record.temp + record.tempUnit }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span>
<span class="title-text">控制场景</span>
<span class="result">{{ device.scene.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">风速</span>
<span class="title-text">风速</span>
<span class="result">{{ record.windSpeed + record.windSpeedUnit }}</span>
</div>
</div>
@ -75,6 +75,23 @@
const device = computed(() => props.device);
//
const record = computed(() => props.device.record);
const getClass = (data: any) => {
let state = data.runStatus.value;
let isOpen = data.switchStatus.value;
//
if (state == 1) {
return 'button-fault';
} else if (state == 2) {
return 'button-repair';
} else if (state == 3) {
return 'button-alarm';
} else if (state == 0 && isOpen == 1) {
return 'button-on';
} else if (state == 0 && isOpen == 0) {
return 'button-off';
}
};
</script>
<style lang="less" scoped>
.icon-box {
@ -116,9 +133,29 @@
width: 5em;
height: 26px;
background: rgba(57, 215, 187, 0.1);
border: 1px solid rgba(57, 215, 187, 1);
border-width: 1px;
border-style: solid;
font-size: 12px;
color: rgba(57, 215, 187, 1);
}
.button-on {
color: #0dffa4;
border-color: #0dffa4;
}
.button-off {
color: #bfcde2;
border-color: #bfcde2;
}
.button-repair {
color: #ffbc46;
border-color: #ffbc46;
}
.button-alarm {
color: #f36163;
border-color: #f36163;
}
.button-fault {
color: #ff7636;
border-color: #ff7636;
}
}
}
@ -140,9 +177,9 @@
vertical-align: middle;
}
.title {
.title-text {
position: absolute;
left: 60px;
left: 53px;
top: 13px;
color: rgba(64, 255, 252, 1);
}

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

@ -269,7 +269,7 @@
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue';
import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue';
import { message } from 'ant-design-vue';
import { message, Modal } from 'ant-design-vue';
//
import { http } from '/nerv-lib/util/http';
import { airConditionControl } from '/@/api/airConditionControlSystem';
@ -736,47 +736,47 @@
if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改');
}
state.setLoading(true);
http
.get(planManage.getRunningPlan, {
deviceType: 2,
ctrlType: 2,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
//
if (res.data && res.data.length) {
state.setLoading(false);
// 使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('关闭进行中的任务操作失败,请重新尝试');
}
});
}
Modal.confirm({
title: '提示信息',
content: '有计划正在执行,点击"确定"将暂停当前计划',
onOk() {
state.setLoading(true);
//
http
.post(airConditionControl.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
state.setLoading(false);
message.error('关闭进行中的任务操作失败,请重新尝试');
}
})
.catch(() => {
state.setLoading(false);
});
},
onCancel() {},
});
//
} else {
sendChangeList();
@ -793,6 +793,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
diffList.value = res.data;
executeVisible.value = true;
@ -800,7 +801,9 @@
message.warning('获取修改内容失败');
}
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
//
const changeCancel = () => {};

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

@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(row, index) in dataSource" :key="index">
<tr v-for="(row, index) in dataSource" v-show="row.executeStatus.value != 0" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ row.startTime }}</td>
<td>{{ row.planName }}</td>
@ -162,7 +162,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 2,
ctrlType: 2,
})
.then((res) => {
dataSource.value = res.data;
@ -184,6 +184,10 @@
};
//
const sendTable = () => {
if (!dataSource.value.length) {
return message.info('没有任何数据可以提交');
}
state.setLoading(true);
http
.post(
airConditionControl.submitTableData +
@ -191,6 +195,7 @@
dataSource.value,
)
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
message.success('操作成功');
//
@ -198,6 +203,9 @@
} else {
message.info(res.msg);
}
})
.catch(() => {
state.setLoading(false);
});
};
@ -228,7 +236,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 2,
ctrlType: 2,
})
.then((res) => {
let arr: Array<Object> = [];

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

@ -55,16 +55,10 @@
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>{{
item.autoStatusBefore.label.indexOf('模式') != -1
? item.autoStatusBefore.label.replace('模式', '')
: item.autoStatusBefore.label
}}</span>
<span>{{ item.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item.autoStatusAfter.label.indexOf('模式') != -1
? item.autoStatusAfter.label.replace('模式', '')
: item.autoStatusAfter.label
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
}}</span></div
>
</div>
@ -110,7 +104,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 80px"></div>
<div style="width: 100%; height: 160px"></div>
<div class="button-box">
<button class="cancel" @click="logModalVisible = false">关闭</button>
</div>
@ -126,7 +120,8 @@
import { Pagination } from 'ant-design-vue';
import { http } from '/nerv-lib/util/http';
import { airConditionControl } from '/@/api/airConditionControlSystem';
//
import { items } from '/@/store/item';
// =======================================================
//
@ -140,6 +135,9 @@
getTable();
});
//
const state = items();
// ======================================================
//
@ -154,6 +152,7 @@
let trIndex = ref(-1);
//
const getTable = (changePage = false) => {
state.setLoading(true);
//
if (changePage) {
trIndex.value = -1;
@ -166,9 +165,13 @@
pageNum: pagination.value.pageNum,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
dataSource.value = data.records;
pagination.value.total = data.total;
})
.catch(() => {
state.setLoading(false);
});
};
//
@ -193,16 +196,23 @@
//
const logModalVisible = ref(false);
const getLogDetail = (id: any) => {
http.get(airConditionControl.getLogDetail, { logId: id }).then((res) => {
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
});
state.setLoading(true);
http
.get(airConditionControl.getLogDetail, { logId: id })
.then((res) => {
const data = res.data;
state.setLoading(false);
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
})
.catch(() => {
state.setLoading(false);
});
};
//
const cxList = ref([]);

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

@ -3,18 +3,14 @@
<div class="lighting-img-box" :class="{ lightingImgBox1: thisFloor == '2' }">
<!-- 左上角区域切换 -->
<div class="btn-box">
<a-popconfirm
<button
v-for="(item, index) in floorData"
:key="index"
title="切换楼层将取消当前的所有修改项"
ok-text="确定"
cancel-text="取消"
placement="bottomLeft"
@confirm="changeFloor(item.childList, item.dataCode)">
<button class="btn-item" :class="{ btnActive: item.dataCode == thisFloor }">{{
item.name
}}</button>
</a-popconfirm>
class="btn-item"
:class="{ btnActive: item.dataCode == thisFloor }"
@click="changeFloor(item.childList, item.dataCode)"
>{{ item.name }}</button
>
</div>
<!-- 楼层区域 -->
<div class="area">
@ -84,6 +80,7 @@
import { lightingManage } from '/@/api/IlluminationInfo';
// ICON
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons-vue';
import { message, Modal } from 'ant-design-vue';
//
import { items } from '/@/store/item';
@ -110,23 +107,30 @@
//
const changeFloor = (area: any, floor: string) => {
if (floor == thisFloor.value) {
return;
return message.info('已选择此楼层');
}
//
tabs1Ref.value.refresh(false);
//
bulbs.value = [];
thisFloor.value = floor;
getBulbs();
//
reset();
//
changeArea(['1']);
//
treeData.value = area;
//
treeData.value[0].selected = true;
tabs1Ref.value.changeArea(treeData.value[0]);
Modal.confirm({
title: '提示信息',
content: '切换楼层会放弃已保存的修改内容',
onOk() {
//
tabs1Ref.value.refresh(false);
//
bulbs.value = [];
thisFloor.value = floor;
getBulbs();
//
reset();
//
changeArea(['1']);
//
treeData.value = area;
//
treeData.value[0].selected = true;
tabs1Ref.value.changeArea(treeData.value[0]);
},
onCancel() {},
});
};
// =====================================================

84
hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue

@ -7,59 +7,65 @@
<img src="/asset/image//bulbLogo/21962.png" alt="" />
<span class="tag-text">{{ blub.regionName + ' > ' + blub.deviceGroupName }}</span></div
>
<button class="right-button">{{
record?.runStatus?.label ? record.runStatus.label : '--'
<button class="right-button" :class="getClass(record)">{{
record.runStatus.value != 0 ? record.runStatus.label : record.switchStatus.label
}}</button>
</div>
<div class="light-tag-box">
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制模式</span>
<span class="title-text">控制模式</span>
<span class="result">{{ record.autoStatus.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">亮度</span>
<span class="title-text">亮度</span>
<span class="result">{{ record.brightness + record.brightnessUnit }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span>
<span class="title-text">控制场景</span>
<span class="result">{{ blub.scene.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">色温</span>
<span class="title-text">色温</span>
<span class="result">{{ record.LwctemC + record.LwctemCUnit }}</span>
</div>
</div>
</div>
</template>
<div class="icon-box" :style="props.blub.styleText">
<!-- 正常=0 -->
<img
v-if="record?.runStatus?.value == 0"
class="icon-item"
src="/asset/image/bulbLogo/on.png"
alt="" />
<!-- 故障=1 -->
<img
v-if="record?.runStatus?.value == 1"
v-if="record.runStatus.value == 1"
class="icon-item"
src="/asset/image/bulbLogo/off.png"
src="/asset/image/bulbLogo/fault.png"
alt="" />
<!-- 维修=2 -->
<img
v-if="record?.runStatus?.value == 2"
v-if="record.runStatus.value == 2"
class="icon-item"
src="/asset/image/bulbLogo/repair.png"
alt="" />
<!-- 警告=3 -->
<img
v-if="record?.runStatus?.value == 3"
v-if="record.runStatus.value == 3"
class="icon-item"
src="/asset/image/bulbLogo/alarm.png"
alt="" />
<!-- 开启 -->
<img
v-if="record.runStatus.value == 0 && record.switchStatus.value == 1"
class="icon-item"
src="/asset/image/bulbLogo/on.png"
alt="" />
<!-- 关闭 -->
<img
v-if="record.runStatus.value == 0 && record.switchStatus.value == 0"
class="icon-item"
src="/asset/image/bulbLogo/off.png"
alt="" />
</div>
</a-popover>
</template>
@ -73,13 +79,29 @@
const blub = computed(() => props.blub);
//
const record = computed(() => props.blub.record);
const getClass = (data: any) => {
let state = data.runStatus.value;
let isOpen = data.switchStatus.value;
//
if (state == 1) {
return 'button-fault';
} else if (state == 2) {
return 'button-repair';
} else if (state == 3) {
return 'button-alarm';
} else if (state == 0 && isOpen == 1) {
return 'button-on';
} else if (state == 0 && isOpen == 0) {
return 'button-off';
}
};
</script>
<style lang="less" scoped>
.icon-box {
width: 28px;
height: 40px;
position: absolute;
.icon-item {
width: 25px;
cursor: pointer;
@ -115,9 +137,29 @@
width: 5em;
height: 26px;
background: rgba(57, 215, 187, 0.1);
border: 1px solid rgba(57, 215, 187, 1);
border-width: 1px;
border-style: solid;
font-size: 12px;
color: rgba(57, 215, 187, 1);
}
.button-on {
color: #0dffa4;
border-color: #0dffa4;
}
.button-off {
color: #bfcde2;
border-color: #bfcde2;
}
.button-repair {
color: #ffbc46;
border-color: #ffbc46;
}
.button-alarm {
color: #f36163;
border-color: #f36163;
}
.button-fault {
color: #ff7636;
border-color: #ff7636;
}
}
}
@ -139,9 +181,9 @@
vertical-align: middle;
}
.title {
.title-text {
position: absolute;
left: 60px;
left: 53px;
top: 13px;
color: rgba(64, 255, 252, 1);
}

37
hx-ai-intelligent/src/view/equipmentControl/lightingManage/lightPosition.ts

@ -1,51 +1,52 @@
// 此文件只定义light(即俯视图小灯泡)的位置信息
// 与显示状态和分组信息无关
export const lightPosition = [
// 安检区A
// 走廊西
{ left: '160px', bottom: '270px' },
{ left: '185px', bottom: '230px' },
{ left: '220px', bottom: '180px' },
{ left: '250px', bottom: '130px' },
// 站厅区B 1组
// 办公西区 1组
{ left: '240px', bottom: '290px' },
{ left: '260px', bottom: '260px' },
{ left: '280px', bottom: '230px' },
{ left: '310px', bottom: '190px' },
{ left: '330px', bottom: '160px' },
// 站厅区B 2组
// 办公西区 2组
{ left: '300px', bottom: '305px' },
{ left: '325px', bottom: '275px' },
{ left: '350px', bottom: '245px' },
{ left: '375px', bottom: '215px' },
{ left: '400px', bottom: '180px' },
// 站台区A 1组
// 站厅西区 1组
{ left: '370px', bottom: '320px' },
{ left: '470px', bottom: '210px' },
// 站台区A 2组
// 站厅西区 2组
{ left: '425px', bottom: '335px' },
{ left: '530px', bottom: '230px' },
// 站台区A 3组
// 站厅西区 3组
{ left: '475px', bottom: '350px' },
{ left: '590px', bottom: '250px' },
// 站台区A 4组
// 站厅西区 4组
{ left: '530px', bottom: '365px' },
{ left: '640px', bottom: '270px' },
// 一楼办公
// 临检
{ left: '570px', bottom: '390px' },
{ left: '605px', bottom: '365px' },
{ left: '640px', bottom: '340px' },
{ left: '675px', bottom: '315px' },
{ left: '710px', bottom: '290px' },
// 安保区 4 分组
{ left: '670px', bottom: '370px' },
{ left: '720px', bottom: '385px' },
{ left: '770px', bottom: '400px' },
{ left: '820px', bottom: '415px' },
// 一楼男厕A
{ left: '810px', bottom: '455px' },
{ left: '970px', bottom: '370px' },
{ left: '850px', bottom: '465px' },
{ left: '1010px', bottom: '385px' },
// 安检区
{ left: '635px', bottom: '405px' },
{ left: '675px', bottom: '375px' },
{ left: '725px', bottom: '340px' },
{ left: '780px', bottom: '305px' },
// 站厅东区 共4组
{ left: '690px', bottom: '420px' },
{ left: '835px', bottom: '330px' },
{ left: '800px', bottom: '390px' },
{ left: '850px', bottom: '400px' },
{ left: '900px', bottom: '410px' },
];
export const lightPosition1 = [

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

@ -249,7 +249,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 60px"></div>
<div style="width: 100%; height: 100px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
@ -736,47 +736,46 @@
if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改');
}
state.setLoading(true);
http
.get(planManage.getRunningPlan, {
deviceType: 1,
ctrlType: 1,
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(lightingManage.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
console.log(res, '成功');
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
message.error('关闭进行中的任务操作失败,请重新尝试');
}
});
}
state.setLoading(false);
Modal.confirm({
title: '提示信息',
content: '有计划正在执行,点击"确定"将暂停当前计划',
onOk() {
state.setLoading(true);
//
http
.post(lightingManage.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
state.setLoading(false);
message.error('关闭进行中的任务操作失败,请重新尝试');
}
})
.catch(() => {
state.setLoading(false);
});
},
onCancel() {},
});
//
} else {
sendChangeList();
@ -793,6 +792,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
diffList.value = res.data;
executeVisible.value = true;
@ -800,7 +800,9 @@
message.error('获取修改内容失败');
}
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
//
const changeCancel = () => {};
@ -838,6 +840,7 @@
};
//
const submitChangeList = () => {
state.setLoading(true);
http
.post(lightingManage.submitChangeList, {
sceneList: changeList.value,
@ -846,6 +849,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
//
if (res.retcode != 0) {
@ -862,7 +866,9 @@
refresh(true);
emit('resetAll');
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
// ========================================================================

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

@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(row, index) in dataSource" :key="index">
<tr v-for="(row, index) in dataSource" v-show="row.executeStatus.value != 0" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ row.startTime }}</td>
<td>{{ row.planName }}</td>
@ -163,7 +163,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 1,
ctrlType: 1,
})
.then((res) => {
dataSource.value = res.data;
@ -185,6 +185,10 @@
};
//
const sendTable = () => {
if (!dataSource.value.length) {
return message.info('没有任何数据可以提交');
}
state.setLoading(true);
http
.post(
lightingManage.submitTableData +
@ -192,6 +196,7 @@
dataSource.value,
)
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
message.success('操作成功');
//
@ -199,6 +204,9 @@
} else {
message.info(res.msg);
}
})
.catch(() => {
state.setLoading(false);
});
};
@ -229,7 +237,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 1,
ctrlType: 1,
})
.then((res) => {
let arr: Array<Object> = [];

49
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue

@ -55,16 +55,10 @@
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>{{
item.autoStatusBefore.label.indexOf('模式') != -1
? item.autoStatusBefore.label.replace('模式', '')
: item.autoStatusBefore.label
}}</span>
<span>{{ item.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item.autoStatusAfter.label.indexOf('模式') != -1
? item.autoStatusAfter.label.replace('模式', '')
: item.autoStatusAfter.label
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
}}</span></div
>
</div>
@ -109,7 +103,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 80px"></div>
<div style="width: 100%; height: 160px"></div>
<div class="button-box">
<button class="cancel" @click="logModalVisible = false">关闭</button>
</div>
@ -125,6 +119,8 @@
import { Pagination } from 'ant-design-vue';
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
//
import { items } from '/@/store/item';
// =======================================================
@ -139,6 +135,9 @@
getTable();
});
//
const state = items();
// ======================================================
//
@ -153,6 +152,7 @@
let trIndex = ref(-1);
//
const getTable = (changePage = false) => {
state.setLoading(true);
//
if (changePage) {
trIndex.value = -1;
@ -165,9 +165,13 @@
pageNum: pagination.value.pageNum,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
dataSource.value = data.records;
pagination.value.total = data.total;
})
.catch(() => {
state.setLoading(false);
});
};
//
@ -192,16 +196,23 @@
//
const logModalVisible = ref(false);
const getLogDetail = (id: any) => {
http.get(lightingManage.getLogDetail, { logId: id }).then((res) => {
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
});
state.setLoading(true);
http
.get(lightingManage.getLogDetail, { logId: id })
.then((res) => {
state.setLoading(false);
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
})
.catch(() => {
state.setLoading(false);
});
};
//
const cxList = ref([]);

4
hx-ai-intelligent/src/view/equipmentControl/style/dialogStyle.less

@ -108,7 +108,7 @@
line-height: 35px;
text-align: left;
padding-left: 10px;
font-size: 14px;
font-size: 13px;
:first-child {
color: white;
}
@ -116,7 +116,7 @@
vertical-align: middle;
}
img {
padding: 0 5px;
padding: 0 2px;
}
}
}

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

@ -215,7 +215,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 60px"></div>
<div style="width: 100%; height: 100px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
@ -686,47 +686,47 @@
if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改');
}
state.setLoading(true);
http
.get(planManage.getRunningPlan, {
deviceType: url.deviceType,
ctrlType: url.deviceType,
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() { },
// });
state.setLoading(false);
Modal.confirm({
title: '提示信息',
content: '有计划正在执行,点击"确定"将暂停当前计划',
onOk() {
state.setLoading(false);
//
http
.post(url.getList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
state.setLoading(false);
message.error('关闭进行中的任务操作失败,请重新尝试');
}
})
.catch(() => {
state.setLoading(false);
});
},
onCancel() {},
});
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
if (flag) {
//
http
.post(url.getList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
console.log(res, '成功');
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
message.error('关闭进行中的任务操作失败,请重新尝试');
}
});
}
//
} else {
sendChangeList();
@ -743,6 +743,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
diffList.value = res.data;
executeVisible.value = true;
@ -750,7 +751,9 @@
message.error('获取修改内容失败');
}
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
//
const changeCancel = () => {};

46
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanLog.vue

@ -55,16 +55,10 @@
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>{{
item.autoStatusBefore.label.indexOf('模式') != -1
? item.autoStatusBefore.label.replace('模式', '')
: item.autoStatusBefore.label
}}</span>
<span>{{ item.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item.autoStatusAfter.label.indexOf('模式') != -1
? item.autoStatusAfter.label.replace('模式', '')
: item.autoStatusAfter.label
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
}}</span></div
>
</div>
@ -109,7 +103,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 80px"></div>
<div style="width: 100%; height: 160px"></div>
<div class="button-box">
<button class="cancel" @click="logModalVisible = false">关闭</button>
</div>
@ -125,7 +119,6 @@
import { Pagination } from 'ant-design-vue';
import { http } from '/nerv-lib/util/http';
import { ventilating } from '/@/api/ventilatingSystem';
//
import { items } from '/@/store/item';
@ -183,6 +176,7 @@
let trIndex = ref(-1);
//
const getTable = (changePage = false) => {
state.setLoading(true);
//
if (changePage) {
trIndex.value = -1;
@ -195,16 +189,19 @@
pageNum: pagination.value.pageNum,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
dataSource.value = data.records;
pagination.value.total = data.total;
})
.catch(() => {
state.setLoading(false);
});
};
//
const reset = () => {
trIndex.value = -1;
logModalVisible.value = false;
// state.setLoading(true);
pagination.value = {
pageSize: 10,
pageNum: 1,
@ -223,16 +220,23 @@
//
const logModalVisible = ref(false);
const getLogDetail = (id: any) => {
http.get(logDetail, { logId: id }).then((res) => {
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
});
state.setLoading(true);
http
.get(logDetail, { logId: id })
.then((res) => {
state.setLoading(false);
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
})
.catch(() => {
state.setLoading(false);
});
};
const cxList = ref([]);

14
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanPlant.vue

@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(row, index) in dataSource" :key="index">
<tr v-for="(row, index) in dataSource" v-show="row.executeStatus.value != 0" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ row.startTime }}</td>
<td>{{ row.planName }}</td>
@ -177,7 +177,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: props.type,
ctrlType: props.type,
})
.then((res) => {
dataSource.value = res.data;
@ -199,12 +199,17 @@
};
//
const sendTable = () => {
if (!dataSource.value.length) {
return message.info('没有任何数据可以提交');
}
state.setLoading(true);
http
.post(
url + `?projectId=${state.projectId}${state.siteId ? `&siteId=${state.siteId}` : ''}`,
dataSource.value,
)
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
message.success('操作成功');
//
@ -212,6 +217,9 @@
} else {
message.info(res.msg);
}
})
.catch(() => {
state.setLoading(false);
});
};
@ -242,7 +250,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: props.type,
ctrlType: props.type,
})
.then((res) => {
let arr: Array<Object> = [];

Loading…
Cancel
Save