add:增加全局loading
This commit is contained in:
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/fault.png
Normal file
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/fault.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/fault1.png
Normal file
BIN
hx-ai-intelligent/public/asset/image/bulbLogo/fault1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-config-provider :locale="locale">
|
<a-config-provider :locale="locale">
|
||||||
|
<a-spin :spinning="state.isLoading" size="large">
|
||||||
<router-view />
|
<router-view />
|
||||||
|
</a-spin>
|
||||||
</a-config-provider>
|
</a-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -10,6 +12,7 @@
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { items } from '/@/store/item';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'App',
|
name: 'App',
|
||||||
|
|
||||||
@@ -37,6 +40,8 @@
|
|||||||
return {
|
return {
|
||||||
cachedViews,
|
cachedViews,
|
||||||
locale: zhCN,
|
locale: zhCN,
|
||||||
|
// 获得全局变量
|
||||||
|
state: items(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@@ -9,29 +9,29 @@
|
|||||||
device.regionName + ' > ' + device.deviceGroupName
|
device.regionName + ' > ' + device.deviceGroupName
|
||||||
}}</span></div
|
}}</span></div
|
||||||
>
|
>
|
||||||
<button class="right-button">{{
|
<button class="right-button" :class="getClass(record)">{{
|
||||||
record?.runStatus?.label ? record.runStatus.label : '--'
|
record.runStatus.value != 0 ? record.runStatus.label : record.switchStatus.label
|
||||||
}}</button>
|
}}</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-text">控制模式</span>
|
||||||
<span class="result">{{ record.autoStatus.label }}</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-text">温度</span>
|
||||||
<span class="result">{{ record.temp + record.tempUnit }}</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-text">控制场景</span>
|
||||||
<span class="result">{{ device.scene.label }}</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-text">风速</span>
|
||||||
<span class="result">{{ record.windSpeed + record.windSpeedUnit }}</span>
|
<span class="result">{{ record.windSpeed + record.windSpeedUnit }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,6 +75,23 @@
|
|||||||
const device = computed(() => props.device);
|
const device = computed(() => props.device);
|
||||||
// 设备信息
|
// 设备信息
|
||||||
const record = computed(() => props.device.record);
|
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>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.icon-box {
|
.icon-box {
|
||||||
@@ -116,9 +133,29 @@
|
|||||||
width: 5em;
|
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-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
font-size: 12px;
|
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;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 60px;
|
left: 53px;
|
||||||
top: 13px;
|
top: 13px;
|
||||||
color: rgba(64, 255, 252, 1);
|
color: rgba(64, 255, 252, 1);
|
||||||
}
|
}
|
||||||
|
@@ -269,7 +269,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted } 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 } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
// 请求
|
// 请求
|
||||||
import { http } from '/nerv-lib/util/http';
|
import { http } from '/nerv-lib/util/http';
|
||||||
import { airConditionControl } from '/@/api/airConditionControlSystem';
|
import { airConditionControl } from '/@/api/airConditionControlSystem';
|
||||||
@@ -736,28 +736,23 @@
|
|||||||
if (!changeList.value.length && !lockList.value.length) {
|
if (!changeList.value.length && !lockList.value.length) {
|
||||||
return message.info('未产生任何修改');
|
return message.info('未产生任何修改');
|
||||||
}
|
}
|
||||||
|
state.setLoading(true);
|
||||||
http
|
http
|
||||||
.get(planManage.getRunningPlan, {
|
.get(planManage.getRunningPlan, {
|
||||||
deviceType: 2,
|
ctrlType: 2,
|
||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// 如果有计划正在执行
|
// 如果有计划正在执行
|
||||||
if (res.data && res.data.length) {
|
if (res.data && res.data.length) {
|
||||||
|
state.setLoading(false);
|
||||||
// 此处框架本身存在问题,弹出层在本地环境无法关闭,暂时使用浏览器自带的confirm方法
|
// 此处框架本身存在问题,弹出层在本地环境无法关闭,暂时使用浏览器自带的confirm方法
|
||||||
// Modal.confirm({
|
Modal.confirm({
|
||||||
// title: '提示信息',
|
title: '提示信息',
|
||||||
// content: '有计划正在执行,点击"确定"将暂停当前计划',
|
content: '有计划正在执行,点击"确定"将暂停当前计划',
|
||||||
// onOk() {
|
onOk() {
|
||||||
// return new Promise((resolve, reject) => {
|
state.setLoading(true);
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// onCancel() { },
|
|
||||||
// });
|
|
||||||
|
|
||||||
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
|
|
||||||
if (flag) {
|
|
||||||
// 如果点击了确定,将先终止所有进行中的计划
|
// 如果点击了确定,将先终止所有进行中的计划
|
||||||
http
|
http
|
||||||
.post(airConditionControl.submitChangeList, {
|
.post(airConditionControl.submitChangeList, {
|
||||||
@@ -767,16 +762,21 @@
|
|||||||
sceneList: [],
|
sceneList: [],
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res, '成功');
|
|
||||||
// 如果重置成功,则获取修改前后对比数据
|
// 如果重置成功,则获取修改前后对比数据
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
sendChangeList();
|
sendChangeList();
|
||||||
// 未成功提示
|
// 未成功提示
|
||||||
} else {
|
} else {
|
||||||
|
state.setLoading(false);
|
||||||
message.error('关闭进行中的任务操作失败,请重新尝试');
|
message.error('关闭进行中的任务操作失败,请重新尝试');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onCancel() {},
|
||||||
});
|
});
|
||||||
}
|
|
||||||
// 没有计划正在执行,则直接请求
|
// 没有计划正在执行,则直接请求
|
||||||
} else {
|
} else {
|
||||||
sendChangeList();
|
sendChangeList();
|
||||||
@@ -793,6 +793,7 @@
|
|||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
diffList.value = res.data;
|
diffList.value = res.data;
|
||||||
executeVisible.value = true;
|
executeVisible.value = true;
|
||||||
@@ -800,7 +801,9 @@
|
|||||||
message.warning('获取修改内容失败');
|
message.warning('获取修改内容失败');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// 通用取消
|
// 通用取消
|
||||||
const changeCancel = () => {};
|
const changeCancel = () => {};
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>{{ index + 1 }}</td>
|
||||||
<td>{{ row.startTime }}</td>
|
<td>{{ row.startTime }}</td>
|
||||||
<td>{{ row.planName }}</td>
|
<td>{{ row.planName }}</td>
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
||||||
deviceType: 2,
|
ctrlType: 2,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
dataSource.value = res.data;
|
dataSource.value = res.data;
|
||||||
@@ -184,6 +184,10 @@
|
|||||||
};
|
};
|
||||||
// 将对表格的修改统一发送
|
// 将对表格的修改统一发送
|
||||||
const sendTable = () => {
|
const sendTable = () => {
|
||||||
|
if (!dataSource.value.length) {
|
||||||
|
return message.info('没有任何数据可以提交');
|
||||||
|
}
|
||||||
|
state.setLoading(true);
|
||||||
http
|
http
|
||||||
.post(
|
.post(
|
||||||
airConditionControl.submitTableData +
|
airConditionControl.submitTableData +
|
||||||
@@ -191,6 +195,7 @@
|
|||||||
dataSource.value,
|
dataSource.value,
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
message.success('操作成功');
|
message.success('操作成功');
|
||||||
// 刷新数据
|
// 刷新数据
|
||||||
@@ -198,6 +203,9 @@
|
|||||||
} else {
|
} else {
|
||||||
message.info(res.msg);
|
message.info(res.msg);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -228,7 +236,7 @@
|
|||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
||||||
deviceType: 2,
|
ctrlType: 2,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let arr: Array<Object> = [];
|
let arr: Array<Object> = [];
|
||||||
|
@@ -55,16 +55,10 @@
|
|||||||
<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.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</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>{{
|
||||||
item.autoStatusAfter.label.indexOf('模式') != -1
|
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
|
||||||
? item.autoStatusAfter.label.replace('模式', '')
|
|
||||||
: item.autoStatusAfter.label
|
|
||||||
}}</span></div
|
}}</span></div
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -110,7 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%; height: 80px"></div>
|
<div style="width: 100%; height: 160px"></div>
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button class="cancel" @click="logModalVisible = false">关闭</button>
|
<button class="cancel" @click="logModalVisible = false">关闭</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -126,7 +120,8 @@
|
|||||||
import { Pagination } from 'ant-design-vue';
|
import { Pagination } from 'ant-design-vue';
|
||||||
import { http } from '/nerv-lib/util/http';
|
import { http } from '/nerv-lib/util/http';
|
||||||
import { airConditionControl } from '/@/api/airConditionControlSystem';
|
import { airConditionControl } from '/@/api/airConditionControlSystem';
|
||||||
|
// 全局变量
|
||||||
|
import { items } from '/@/store/item';
|
||||||
// 初始化 =======================================================
|
// 初始化 =======================================================
|
||||||
|
|
||||||
// 组件
|
// 组件
|
||||||
@@ -140,6 +135,9 @@
|
|||||||
getTable();
|
getTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 全局变量
|
||||||
|
const state = items();
|
||||||
|
|
||||||
// 日志业务 ======================================================
|
// 日志业务 ======================================================
|
||||||
|
|
||||||
// 分页设置
|
// 分页设置
|
||||||
@@ -154,6 +152,7 @@
|
|||||||
let trIndex = ref(-1);
|
let trIndex = ref(-1);
|
||||||
// 获得表格数据
|
// 获得表格数据
|
||||||
const getTable = (changePage = false) => {
|
const getTable = (changePage = false) => {
|
||||||
|
state.setLoading(true);
|
||||||
// 如果是切换页面,则清除当前序列、关闭弹窗
|
// 如果是切换页面,则清除当前序列、关闭弹窗
|
||||||
if (changePage) {
|
if (changePage) {
|
||||||
trIndex.value = -1;
|
trIndex.value = -1;
|
||||||
@@ -166,9 +165,13 @@
|
|||||||
pageNum: pagination.value.pageNum,
|
pageNum: pagination.value.pageNum,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
dataSource.value = data.records;
|
dataSource.value = data.records;
|
||||||
pagination.value.total = data.total;
|
pagination.value.total = data.total;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 刷新功能(右下角)
|
// 刷新功能(右下角)
|
||||||
@@ -193,8 +196,12 @@
|
|||||||
// 日志详情显隐
|
// 日志详情显隐
|
||||||
const logModalVisible = ref(false);
|
const logModalVisible = ref(false);
|
||||||
const getLogDetail = (id: any) => {
|
const getLogDetail = (id: any) => {
|
||||||
http.get(airConditionControl.getLogDetail, { logId: id }).then((res) => {
|
state.setLoading(true);
|
||||||
|
http
|
||||||
|
.get(airConditionControl.getLogDetail, { logId: id })
|
||||||
|
.then((res) => {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
|
state.setLoading(false);
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
// 显示模态框
|
// 显示模态框
|
||||||
logModalVisible.value = true;
|
logModalVisible.value = true;
|
||||||
@@ -202,6 +209,9 @@
|
|||||||
} else {
|
} else {
|
||||||
return message.info('返回值无效');
|
return message.info('返回值无效');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 日志详情
|
// 日志详情
|
||||||
|
@@ -3,18 +3,14 @@
|
|||||||
<div class="lighting-img-box" :class="{ lightingImgBox1: thisFloor == '2' }">
|
<div class="lighting-img-box" :class="{ lightingImgBox1: thisFloor == '2' }">
|
||||||
<!-- 左上角,区域切换 -->
|
<!-- 左上角,区域切换 -->
|
||||||
<div class="btn-box">
|
<div class="btn-box">
|
||||||
<a-popconfirm
|
<button
|
||||||
v-for="(item, index) in floorData"
|
v-for="(item, index) in floorData"
|
||||||
:key="index"
|
:key="index"
|
||||||
title="切换楼层将取消当前的所有修改项"
|
class="btn-item"
|
||||||
ok-text="确定"
|
:class="{ btnActive: item.dataCode == thisFloor }"
|
||||||
cancel-text="取消"
|
@click="changeFloor(item.childList, item.dataCode)"
|
||||||
placement="bottomLeft"
|
>{{ item.name }}</button
|
||||||
@confirm="changeFloor(item.childList, item.dataCode)">
|
>
|
||||||
<button class="btn-item" :class="{ btnActive: item.dataCode == thisFloor }">{{
|
|
||||||
item.name
|
|
||||||
}}</button>
|
|
||||||
</a-popconfirm>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 楼层区域 -->
|
<!-- 楼层区域 -->
|
||||||
<div class="area">
|
<div class="area">
|
||||||
@@ -84,6 +80,7 @@
|
|||||||
import { lightingManage } from '/@/api/IlluminationInfo';
|
import { lightingManage } from '/@/api/IlluminationInfo';
|
||||||
// ICON
|
// ICON
|
||||||
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons-vue';
|
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { message, Modal } from 'ant-design-vue';
|
||||||
// 全局变量
|
// 全局变量
|
||||||
import { items } from '/@/store/item';
|
import { items } from '/@/store/item';
|
||||||
|
|
||||||
@@ -110,8 +107,12 @@
|
|||||||
// 左上角分层切换
|
// 左上角分层切换
|
||||||
const changeFloor = (area: any, floor: string) => {
|
const changeFloor = (area: any, floor: string) => {
|
||||||
if (floor == thisFloor.value) {
|
if (floor == thisFloor.value) {
|
||||||
return;
|
return message.info('已选择此楼层');
|
||||||
}
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: '提示信息',
|
||||||
|
content: '切换楼层会放弃已保存的修改内容',
|
||||||
|
onOk() {
|
||||||
// 切换前还原修改内容
|
// 切换前还原修改内容
|
||||||
tabs1Ref.value.refresh(false);
|
tabs1Ref.value.refresh(false);
|
||||||
// 清空设备点阵
|
// 清空设备点阵
|
||||||
@@ -127,6 +128,9 @@
|
|||||||
// 默认选择第一项
|
// 默认选择第一项
|
||||||
treeData.value[0].selected = true;
|
treeData.value[0].selected = true;
|
||||||
tabs1Ref.value.changeArea(treeData.value[0]);
|
tabs1Ref.value.changeArea(treeData.value[0]);
|
||||||
|
},
|
||||||
|
onCancel() {},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 分区业务 =====================================================
|
// 分区业务 =====================================================
|
||||||
|
@@ -7,59 +7,65 @@
|
|||||||
<img src="/asset/image//bulbLogo/21962.png" alt="" />
|
<img src="/asset/image//bulbLogo/21962.png" alt="" />
|
||||||
<span class="tag-text">{{ blub.regionName + ' > ' + blub.deviceGroupName }}</span></div
|
<span class="tag-text">{{ blub.regionName + ' > ' + blub.deviceGroupName }}</span></div
|
||||||
>
|
>
|
||||||
<button class="right-button">{{
|
<button class="right-button" :class="getClass(record)">{{
|
||||||
record?.runStatus?.label ? record.runStatus.label : '--'
|
record.runStatus.value != 0 ? record.runStatus.label : record.switchStatus.label
|
||||||
}}</button>
|
}}</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-text">控制模式</span>
|
||||||
<span class="result">{{ record.autoStatus.label }}</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-text">亮度</span>
|
||||||
<span class="result">{{ record.brightness + record.brightnessUnit }}</span>
|
<span class="result">{{ record.brightness + record.brightnessUnit }}</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-text">控制场景</span>
|
||||||
<span class="result">{{ blub.scene.label }}</span>
|
<span class="result">{{ blub.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-text">色温</span>
|
||||||
<span class="result">{{ record.LwctemC + record.LwctemCUnit }}</span>
|
<span class="result">{{ record.LwctemC + record.LwctemCUnit }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="icon-box" :style="props.blub.styleText">
|
<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 -->
|
<!-- 故障=1 -->
|
||||||
<img
|
<img
|
||||||
v-if="record?.runStatus?.value == 1"
|
v-if="record.runStatus.value == 1"
|
||||||
class="icon-item"
|
class="icon-item"
|
||||||
src="/asset/image/bulbLogo/off.png"
|
src="/asset/image/bulbLogo/fault.png"
|
||||||
alt="" />
|
alt="" />
|
||||||
<!-- 维修=2 -->
|
<!-- 维修=2 -->
|
||||||
<img
|
<img
|
||||||
v-if="record?.runStatus?.value == 2"
|
v-if="record.runStatus.value == 2"
|
||||||
class="icon-item"
|
class="icon-item"
|
||||||
src="/asset/image/bulbLogo/repair.png"
|
src="/asset/image/bulbLogo/repair.png"
|
||||||
alt="" />
|
alt="" />
|
||||||
<!-- 警告=3 -->
|
<!-- 警告=3 -->
|
||||||
<img
|
<img
|
||||||
v-if="record?.runStatus?.value == 3"
|
v-if="record.runStatus.value == 3"
|
||||||
class="icon-item"
|
class="icon-item"
|
||||||
src="/asset/image/bulbLogo/alarm.png"
|
src="/asset/image/bulbLogo/alarm.png"
|
||||||
alt="" />
|
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>
|
</div>
|
||||||
</a-popover>
|
</a-popover>
|
||||||
</template>
|
</template>
|
||||||
@@ -73,13 +79,29 @@
|
|||||||
const blub = computed(() => props.blub);
|
const blub = computed(() => props.blub);
|
||||||
// 设备信息
|
// 设备信息
|
||||||
const record = computed(() => props.blub.record);
|
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>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.icon-box {
|
.icon-box {
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
.icon-item {
|
.icon-item {
|
||||||
width: 25px;
|
width: 25px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -115,9 +137,29 @@
|
|||||||
width: 5em;
|
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-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
font-size: 12px;
|
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;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 60px;
|
left: 53px;
|
||||||
top: 13px;
|
top: 13px;
|
||||||
color: rgba(64, 255, 252, 1);
|
color: rgba(64, 255, 252, 1);
|
||||||
}
|
}
|
||||||
|
@@ -1,51 +1,52 @@
|
|||||||
// 此文件只定义light(即俯视图小灯泡)的位置信息
|
// 此文件只定义light(即俯视图小灯泡)的位置信息
|
||||||
// 与显示状态和分组信息无关
|
// 与显示状态和分组信息无关
|
||||||
export const lightPosition = [
|
export const lightPosition = [
|
||||||
// 安检区A
|
// 走廊西
|
||||||
{ left: '160px', bottom: '270px' },
|
{ left: '160px', bottom: '270px' },
|
||||||
{ left: '185px', bottom: '230px' },
|
{ left: '185px', bottom: '230px' },
|
||||||
{ left: '220px', bottom: '180px' },
|
{ left: '220px', bottom: '180px' },
|
||||||
{ left: '250px', bottom: '130px' },
|
{ left: '250px', bottom: '130px' },
|
||||||
// 站厅区B 1组
|
// 办公西区 1组
|
||||||
{ left: '240px', bottom: '290px' },
|
{ left: '240px', bottom: '290px' },
|
||||||
{ left: '260px', bottom: '260px' },
|
{ left: '260px', bottom: '260px' },
|
||||||
{ left: '280px', bottom: '230px' },
|
{ left: '280px', bottom: '230px' },
|
||||||
{ left: '310px', bottom: '190px' },
|
{ left: '310px', bottom: '190px' },
|
||||||
{ left: '330px', bottom: '160px' },
|
{ left: '330px', bottom: '160px' },
|
||||||
// 站厅区B 2组
|
// 办公西区 2组
|
||||||
{ left: '300px', bottom: '305px' },
|
{ left: '300px', bottom: '305px' },
|
||||||
{ left: '325px', bottom: '275px' },
|
{ left: '325px', bottom: '275px' },
|
||||||
{ left: '350px', bottom: '245px' },
|
{ left: '350px', bottom: '245px' },
|
||||||
{ left: '375px', bottom: '215px' },
|
{ left: '375px', bottom: '215px' },
|
||||||
{ left: '400px', bottom: '180px' },
|
{ left: '400px', bottom: '180px' },
|
||||||
// 站台区A 1组
|
// 站厅西区 1组
|
||||||
{ left: '370px', bottom: '320px' },
|
{ left: '370px', bottom: '320px' },
|
||||||
{ left: '470px', bottom: '210px' },
|
{ left: '470px', bottom: '210px' },
|
||||||
// 站台区A 2组
|
// 站厅西区 2组
|
||||||
{ left: '425px', bottom: '335px' },
|
{ left: '425px', bottom: '335px' },
|
||||||
{ left: '530px', bottom: '230px' },
|
{ left: '530px', bottom: '230px' },
|
||||||
// 站台区A 3组
|
// 站厅西区 3组
|
||||||
{ left: '475px', bottom: '350px' },
|
{ left: '475px', bottom: '350px' },
|
||||||
{ left: '590px', bottom: '250px' },
|
{ left: '590px', bottom: '250px' },
|
||||||
// 站台区A 4组
|
// 站厅西区 4组
|
||||||
{ left: '530px', bottom: '365px' },
|
{ left: '530px', bottom: '365px' },
|
||||||
{ left: '640px', bottom: '270px' },
|
{ left: '640px', bottom: '270px' },
|
||||||
// 一楼办公区
|
// 临检区
|
||||||
{ left: '570px', bottom: '390px' },
|
{ left: '570px', bottom: '390px' },
|
||||||
{ left: '605px', bottom: '365px' },
|
{ left: '605px', bottom: '365px' },
|
||||||
{ left: '640px', bottom: '340px' },
|
{ left: '640px', bottom: '340px' },
|
||||||
{ left: '675px', bottom: '315px' },
|
{ left: '675px', bottom: '315px' },
|
||||||
{ left: '710px', bottom: '290px' },
|
{ left: '710px', bottom: '290px' },
|
||||||
// 安保区 4 分组
|
// 安检区
|
||||||
{ left: '670px', bottom: '370px' },
|
{ left: '635px', bottom: '405px' },
|
||||||
{ left: '720px', bottom: '385px' },
|
{ left: '675px', bottom: '375px' },
|
||||||
{ left: '770px', bottom: '400px' },
|
{ left: '725px', bottom: '340px' },
|
||||||
{ left: '820px', bottom: '415px' },
|
{ left: '780px', bottom: '305px' },
|
||||||
// 一楼男厕A
|
// 站厅东区 共4组
|
||||||
{ left: '810px', bottom: '455px' },
|
{ left: '690px', bottom: '420px' },
|
||||||
{ left: '970px', bottom: '370px' },
|
{ left: '835px', bottom: '330px' },
|
||||||
{ left: '850px', bottom: '465px' },
|
{ left: '800px', bottom: '390px' },
|
||||||
{ left: '1010px', bottom: '385px' },
|
{ left: '850px', bottom: '400px' },
|
||||||
|
{ left: '900px', bottom: '410px' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const lightPosition1 = [
|
export const lightPosition1 = [
|
||||||
|
@@ -249,7 +249,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%; height: 60px"></div>
|
<div style="width: 100%; height: 100px"></div>
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button class="cancel" @click="executeVisible = false">取消</button>
|
<button class="cancel" @click="executeVisible = false">取消</button>
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
@@ -736,28 +736,22 @@
|
|||||||
if (!changeList.value.length && !lockList.value.length) {
|
if (!changeList.value.length && !lockList.value.length) {
|
||||||
return message.info('未产生任何修改');
|
return message.info('未产生任何修改');
|
||||||
}
|
}
|
||||||
|
state.setLoading(true);
|
||||||
http
|
http
|
||||||
.get(planManage.getRunningPlan, {
|
.get(planManage.getRunningPlan, {
|
||||||
deviceType: 1,
|
ctrlType: 1,
|
||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// 如果有计划正在执行
|
// 如果有计划正在执行
|
||||||
if (res.data && res.data.length) {
|
if (res.data && res.data.length) {
|
||||||
// 此处框架本身存在问题,弹出层在本地环境无法关闭,暂时使用浏览器自带的confirm方法
|
state.setLoading(false);
|
||||||
// Modal.confirm({
|
Modal.confirm({
|
||||||
// title: '提示信息',
|
title: '提示信息',
|
||||||
// content: '有计划正在执行,点击"确定"将暂停当前计划',
|
content: '有计划正在执行,点击"确定"将暂停当前计划',
|
||||||
// onOk() {
|
onOk() {
|
||||||
// return new Promise((resolve, reject) => {
|
state.setLoading(true);
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// onCancel() { },
|
|
||||||
// });
|
|
||||||
|
|
||||||
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
|
|
||||||
if (flag) {
|
|
||||||
// 如果点击了确定,将先终止所有进行中的计划
|
// 如果点击了确定,将先终止所有进行中的计划
|
||||||
http
|
http
|
||||||
.post(lightingManage.submitChangeList, {
|
.post(lightingManage.submitChangeList, {
|
||||||
@@ -767,16 +761,21 @@
|
|||||||
sceneList: [],
|
sceneList: [],
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res, '成功');
|
|
||||||
// 如果重置成功,则获取修改前后对比数据
|
// 如果重置成功,则获取修改前后对比数据
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
sendChangeList();
|
sendChangeList();
|
||||||
// 未成功提示
|
// 未成功提示
|
||||||
} else {
|
} else {
|
||||||
|
state.setLoading(false);
|
||||||
message.error('关闭进行中的任务操作失败,请重新尝试');
|
message.error('关闭进行中的任务操作失败,请重新尝试');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onCancel() {},
|
||||||
});
|
});
|
||||||
}
|
|
||||||
// 没有计划正在执行,则直接请求
|
// 没有计划正在执行,则直接请求
|
||||||
} else {
|
} else {
|
||||||
sendChangeList();
|
sendChangeList();
|
||||||
@@ -793,6 +792,7 @@
|
|||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
diffList.value = res.data;
|
diffList.value = res.data;
|
||||||
executeVisible.value = true;
|
executeVisible.value = true;
|
||||||
@@ -800,7 +800,9 @@
|
|||||||
message.error('获取修改内容失败');
|
message.error('获取修改内容失败');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// 通用取消
|
// 通用取消
|
||||||
const changeCancel = () => {};
|
const changeCancel = () => {};
|
||||||
@@ -838,6 +840,7 @@
|
|||||||
};
|
};
|
||||||
// 提交本次修改
|
// 提交本次修改
|
||||||
const submitChangeList = () => {
|
const submitChangeList = () => {
|
||||||
|
state.setLoading(true);
|
||||||
http
|
http
|
||||||
.post(lightingManage.submitChangeList, {
|
.post(lightingManage.submitChangeList, {
|
||||||
sceneList: changeList.value,
|
sceneList: changeList.value,
|
||||||
@@ -846,6 +849,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) {
|
||||||
@@ -862,7 +866,9 @@
|
|||||||
refresh(true);
|
refresh(true);
|
||||||
emit('resetAll');
|
emit('resetAll');
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 其他业务 ========================================================================
|
// 其他业务 ========================================================================
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>{{ index + 1 }}</td>
|
||||||
<td>{{ row.startTime }}</td>
|
<td>{{ row.startTime }}</td>
|
||||||
<td>{{ row.planName }}</td>
|
<td>{{ row.planName }}</td>
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
||||||
deviceType: 1,
|
ctrlType: 1,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
dataSource.value = res.data;
|
dataSource.value = res.data;
|
||||||
@@ -185,6 +185,10 @@
|
|||||||
};
|
};
|
||||||
// 将对表格的修改统一发送
|
// 将对表格的修改统一发送
|
||||||
const sendTable = () => {
|
const sendTable = () => {
|
||||||
|
if (!dataSource.value.length) {
|
||||||
|
return message.info('没有任何数据可以提交');
|
||||||
|
}
|
||||||
|
state.setLoading(true);
|
||||||
http
|
http
|
||||||
.post(
|
.post(
|
||||||
lightingManage.submitTableData +
|
lightingManage.submitTableData +
|
||||||
@@ -192,6 +196,7 @@
|
|||||||
dataSource.value,
|
dataSource.value,
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
message.success('操作成功');
|
message.success('操作成功');
|
||||||
// 刷新数据
|
// 刷新数据
|
||||||
@@ -199,6 +204,9 @@
|
|||||||
} else {
|
} else {
|
||||||
message.info(res.msg);
|
message.info(res.msg);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -229,7 +237,7 @@
|
|||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
||||||
deviceType: 1,
|
ctrlType: 1,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let arr: Array<Object> = [];
|
let arr: Array<Object> = [];
|
||||||
|
@@ -55,16 +55,10 @@
|
|||||||
<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.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</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>{{
|
||||||
item.autoStatusAfter.label.indexOf('模式') != -1
|
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
|
||||||
? item.autoStatusAfter.label.replace('模式', '')
|
|
||||||
: item.autoStatusAfter.label
|
|
||||||
}}</span></div
|
}}</span></div
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%; height: 80px"></div>
|
<div style="width: 100%; height: 160px"></div>
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button class="cancel" @click="logModalVisible = false">关闭</button>
|
<button class="cancel" @click="logModalVisible = false">关闭</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,6 +119,8 @@
|
|||||||
import { Pagination } from 'ant-design-vue';
|
import { Pagination } from 'ant-design-vue';
|
||||||
import { http } from '/nerv-lib/util/http';
|
import { http } from '/nerv-lib/util/http';
|
||||||
import { lightingManage } from '/@/api/IlluminationInfo';
|
import { lightingManage } from '/@/api/IlluminationInfo';
|
||||||
|
// 全局变量
|
||||||
|
import { items } from '/@/store/item';
|
||||||
|
|
||||||
// 初始化 =======================================================
|
// 初始化 =======================================================
|
||||||
|
|
||||||
@@ -139,6 +135,9 @@
|
|||||||
getTable();
|
getTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 全局变量
|
||||||
|
const state = items();
|
||||||
|
|
||||||
// 日志业务 ======================================================
|
// 日志业务 ======================================================
|
||||||
|
|
||||||
// 分页设置
|
// 分页设置
|
||||||
@@ -153,6 +152,7 @@
|
|||||||
let trIndex = ref(-1);
|
let trIndex = ref(-1);
|
||||||
// 获得表格数据
|
// 获得表格数据
|
||||||
const getTable = (changePage = false) => {
|
const getTable = (changePage = false) => {
|
||||||
|
state.setLoading(true);
|
||||||
// 如果是切换页面,则清除当前序列、关闭弹窗
|
// 如果是切换页面,则清除当前序列、关闭弹窗
|
||||||
if (changePage) {
|
if (changePage) {
|
||||||
trIndex.value = -1;
|
trIndex.value = -1;
|
||||||
@@ -165,9 +165,13 @@
|
|||||||
pageNum: pagination.value.pageNum,
|
pageNum: pagination.value.pageNum,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
dataSource.value = data.records;
|
dataSource.value = data.records;
|
||||||
pagination.value.total = data.total;
|
pagination.value.total = data.total;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 刷新功能(右下角)
|
// 刷新功能(右下角)
|
||||||
@@ -192,7 +196,11 @@
|
|||||||
// 日志详情显隐
|
// 日志详情显隐
|
||||||
const logModalVisible = ref(false);
|
const logModalVisible = ref(false);
|
||||||
const getLogDetail = (id: any) => {
|
const getLogDetail = (id: any) => {
|
||||||
http.get(lightingManage.getLogDetail, { logId: id }).then((res) => {
|
state.setLoading(true);
|
||||||
|
http
|
||||||
|
.get(lightingManage.getLogDetail, { logId: id })
|
||||||
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
// 显示模态框
|
// 显示模态框
|
||||||
@@ -201,6 +209,9 @@
|
|||||||
} else {
|
} else {
|
||||||
return message.info('返回值无效');
|
return message.info('返回值无效');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 日志详情
|
// 日志详情
|
||||||
|
@@ -108,7 +108,7 @@
|
|||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
:first-child {
|
:first-child {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
padding: 0 5px;
|
padding: 0 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -215,7 +215,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%; height: 60px"></div>
|
<div style="width: 100%; height: 100px"></div>
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button class="cancel" @click="executeVisible = false">取消</button>
|
<button class="cancel" @click="executeVisible = false">取消</button>
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
@@ -686,28 +686,22 @@
|
|||||||
if (!changeList.value.length && !lockList.value.length) {
|
if (!changeList.value.length && !lockList.value.length) {
|
||||||
return message.info('未产生任何修改');
|
return message.info('未产生任何修改');
|
||||||
}
|
}
|
||||||
|
state.setLoading(true);
|
||||||
http
|
http
|
||||||
.get(planManage.getRunningPlan, {
|
.get(planManage.getRunningPlan, {
|
||||||
deviceType: url.deviceType,
|
ctrlType: url.deviceType,
|
||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// 如果有计划正在执行
|
// 如果有计划正在执行
|
||||||
if (res.data && res.data.length) {
|
if (res.data && res.data.length) {
|
||||||
// 此处框架本身存在问题,弹出层在本地环境无法关闭,暂时使用浏览器自带的confirm方法
|
state.setLoading(false);
|
||||||
// Modal.confirm({
|
Modal.confirm({
|
||||||
// title: '提示信息',
|
title: '提示信息',
|
||||||
// content: '有计划正在执行,点击"确定"将暂停当前计划',
|
content: '有计划正在执行,点击"确定"将暂停当前计划',
|
||||||
// onOk() {
|
onOk() {
|
||||||
// return new Promise((resolve, reject) => {
|
state.setLoading(false);
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// onCancel() { },
|
|
||||||
// });
|
|
||||||
|
|
||||||
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
|
|
||||||
if (flag) {
|
|
||||||
// 如果点击了确定,将先终止所有进行中的计划
|
// 如果点击了确定,将先终止所有进行中的计划
|
||||||
http
|
http
|
||||||
.post(url.getList, {
|
.post(url.getList, {
|
||||||
@@ -717,16 +711,22 @@
|
|||||||
sceneList: [],
|
sceneList: [],
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res, '成功');
|
|
||||||
// 如果重置成功,则获取修改前后对比数据
|
// 如果重置成功,则获取修改前后对比数据
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
sendChangeList();
|
sendChangeList();
|
||||||
// 未成功提示
|
// 未成功提示
|
||||||
} else {
|
} else {
|
||||||
|
state.setLoading(false);
|
||||||
message.error('关闭进行中的任务操作失败,请重新尝试');
|
message.error('关闭进行中的任务操作失败,请重新尝试');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
onCancel() {},
|
||||||
|
});
|
||||||
|
|
||||||
// 没有计划正在执行,则直接请求
|
// 没有计划正在执行,则直接请求
|
||||||
} else {
|
} else {
|
||||||
sendChangeList();
|
sendChangeList();
|
||||||
@@ -743,6 +743,7 @@
|
|||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
diffList.value = res.data;
|
diffList.value = res.data;
|
||||||
executeVisible.value = true;
|
executeVisible.value = true;
|
||||||
@@ -750,7 +751,9 @@
|
|||||||
message.error('获取修改内容失败');
|
message.error('获取修改内容失败');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// 通用取消
|
// 通用取消
|
||||||
const changeCancel = () => {};
|
const changeCancel = () => {};
|
||||||
|
@@ -55,16 +55,10 @@
|
|||||||
<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.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</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>{{
|
||||||
item.autoStatusAfter.label.indexOf('模式') != -1
|
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
|
||||||
? item.autoStatusAfter.label.replace('模式', '')
|
|
||||||
: item.autoStatusAfter.label
|
|
||||||
}}</span></div
|
}}</span></div
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%; height: 80px"></div>
|
<div style="width: 100%; height: 160px"></div>
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button class="cancel" @click="logModalVisible = false">关闭</button>
|
<button class="cancel" @click="logModalVisible = false">关闭</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,7 +119,6 @@
|
|||||||
import { Pagination } from 'ant-design-vue';
|
import { Pagination } from 'ant-design-vue';
|
||||||
import { http } from '/nerv-lib/util/http';
|
import { http } from '/nerv-lib/util/http';
|
||||||
import { ventilating } from '/@/api/ventilatingSystem';
|
import { ventilating } from '/@/api/ventilatingSystem';
|
||||||
|
|
||||||
// 全局变量
|
// 全局变量
|
||||||
import { items } from '/@/store/item';
|
import { items } from '/@/store/item';
|
||||||
|
|
||||||
@@ -183,6 +176,7 @@
|
|||||||
let trIndex = ref(-1);
|
let trIndex = ref(-1);
|
||||||
// 获得表格数据
|
// 获得表格数据
|
||||||
const getTable = (changePage = false) => {
|
const getTable = (changePage = false) => {
|
||||||
|
state.setLoading(true);
|
||||||
// 如果是切换页面,则清除当前序列、关闭弹窗
|
// 如果是切换页面,则清除当前序列、关闭弹窗
|
||||||
if (changePage) {
|
if (changePage) {
|
||||||
trIndex.value = -1;
|
trIndex.value = -1;
|
||||||
@@ -195,16 +189,19 @@
|
|||||||
pageNum: pagination.value.pageNum,
|
pageNum: pagination.value.pageNum,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
dataSource.value = data.records;
|
dataSource.value = data.records;
|
||||||
pagination.value.total = data.total;
|
pagination.value.total = data.total;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 刷新功能(右下角)
|
// 刷新功能(右下角)
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
trIndex.value = -1;
|
trIndex.value = -1;
|
||||||
logModalVisible.value = false;
|
logModalVisible.value = false;
|
||||||
// state.setLoading(true);
|
|
||||||
pagination.value = {
|
pagination.value = {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -223,7 +220,11 @@
|
|||||||
// 日志详情显隐
|
// 日志详情显隐
|
||||||
const logModalVisible = ref(false);
|
const logModalVisible = ref(false);
|
||||||
const getLogDetail = (id: any) => {
|
const getLogDetail = (id: any) => {
|
||||||
http.get(logDetail, { logId: id }).then((res) => {
|
state.setLoading(true);
|
||||||
|
http
|
||||||
|
.get(logDetail, { logId: id })
|
||||||
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
// 显示模态框
|
// 显示模态框
|
||||||
@@ -232,6 +233,9 @@
|
|||||||
} else {
|
} else {
|
||||||
return message.info('返回值无效');
|
return message.info('返回值无效');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const cxList = ref([]);
|
const cxList = ref([]);
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>{{ index + 1 }}</td>
|
||||||
<td>{{ row.startTime }}</td>
|
<td>{{ row.startTime }}</td>
|
||||||
<td>{{ row.planName }}</td>
|
<td>{{ row.planName }}</td>
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
||||||
deviceType: props.type,
|
ctrlType: props.type,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
dataSource.value = res.data;
|
dataSource.value = res.data;
|
||||||
@@ -199,12 +199,17 @@
|
|||||||
};
|
};
|
||||||
// 将对表格的修改统一发送
|
// 将对表格的修改统一发送
|
||||||
const sendTable = () => {
|
const sendTable = () => {
|
||||||
|
if (!dataSource.value.length) {
|
||||||
|
return message.info('没有任何数据可以提交');
|
||||||
|
}
|
||||||
|
state.setLoading(true);
|
||||||
http
|
http
|
||||||
.post(
|
.post(
|
||||||
url + `?projectId=${state.projectId}${state.siteId ? `&siteId=${state.siteId}` : ''}`,
|
url + `?projectId=${state.projectId}${state.siteId ? `&siteId=${state.siteId}` : ''}`,
|
||||||
dataSource.value,
|
dataSource.value,
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
state.setLoading(false);
|
||||||
if (res.retcode == 0) {
|
if (res.retcode == 0) {
|
||||||
message.success('操作成功');
|
message.success('操作成功');
|
||||||
// 刷新数据
|
// 刷新数据
|
||||||
@@ -212,6 +217,9 @@
|
|||||||
} else {
|
} else {
|
||||||
message.info(res.msg);
|
message.info(res.msg);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
state.setLoading(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -242,7 +250,7 @@
|
|||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
siteId: state.siteId,
|
siteId: state.siteId,
|
||||||
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
// 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
|
||||||
deviceType: props.type,
|
ctrlType: props.type,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let arr: Array<Object> = [];
|
let arr: Array<Object> = [];
|
||||||
|
Reference in New Issue
Block a user