开启数量 | -亮度(lux) | -色温 | -
---|---|---|
{{ row.num }} | -{{ row.light }} | -{{ row.tempruter }} | -
序号 | -执行时间 | -计划名称 | -状态 | -操作 | -|
---|---|---|---|---|---|
{{ row.key }} | -{{ row.data }} | -{{ row.planname }} | -- - | -- - | -- - - | -
序号 | -执行时间 | -操作内容 | -操作人 | -
---|---|---|---|
{{ row.key }} | -{{ row.data }} | -{{ row.planname }} | -{{ row.status }} | -
{{ index + 1 }} | {{ row.startTime }} | {{ row.planName }} | -- - | -+ |
- 重启
+ 启用
删除
|
@@ -82,39 +84,90 @@
// 请求
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
+ import { planManage } from '/@/api/planManage';
import { message } from 'ant-design-vue';
+ import { getEnum } from '/@/api';
+ // 全局变量
+ import { items } from '/@/store/item';
// 初始化 ===========================================================
onMounted(() => {
+ getStateEnum();
// 计划表格
getTable();
// 穿梭框原始数据
getLeftPlan();
});
+ // 全局变量
+ const state = items();
+ const getStateEnum = async () => {
+ let enumData = await getEnum({ params: { enumType: 'PlanExecuteStatus' } });
+ stateList.value = enumData.data;
+ };
// tab页部分 ========================================================
+ // 状态枚举
+ const stateList = ref([]);
+ // 设置枚举的颜色 与 文本
+ const setStateColor = (state: number) => {
+ if (state == 0) {
+ return '#ccc';
+ } else if (state == 1) {
+ return 'orange';
+ } else if (state == 2) {
+ return 'rgb(57, 215, 187)';
+ } else if (state == 3) {
+ return 'rgb(255, 0, 0)';
+ }
+ };
+ // 设置枚举的文本
+ const setStateText = (state: number) => {
+ const res = stateList.value.find((item) => {
+ return item.value == state;
+ });
+ return res.label;
+ };
+ // 计划启用/禁用事件
+ const togglePlan = (state: number) => {
+ dataSource.value.forEach((item: any) => {
+ item.executeStatus.value = state;
+ });
+ };
+
// 表格数据
const dataSource = ref([]);
// 获得表格数据
const getTable = () => {
- http.get(lightingManage.getPlanTable, {}).then((res) => {
- dataSource.value = res.data;
- });
+ http
+ .get(planManage.getTableData, {
+ projectId: state.projectId,
+ siteId: state.siteId,
+ // 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
+ deviceType: 1,
+ })
+ .then((res) => {
+ dataSource.value = res.data;
+ });
};
- // 删除表格中的计划
- const deletePlan = (id: String) => {
- http.delete(lightingManage.deletePlan, [id]).then(() => {
- message.success('操作成功');
- getTable();
- });
+ // 删除表格中的计划(将当前任意状态,修改为未启用 =0)
+ const deletePlan = (row: any) => {
+ row.executeStatus.value = 0;
+ };
+ // 重启表格中的计划(将当前任意状态,修改为待执行 = 1)
+ const startPlan = (row: any) => {
+ if (row.executeStatus.value == 1) {
+ return message.info('该数据已是待执行状态,无需再次修改');
+ }
+ row.executeStatus.value = 1;
};
- // 重启表格中的计划
- const restartPlan = (id: String) => {
- http.post(lightingManage.restartPlan, { planId: id }).then(() => {
+ // 将对表格的修改统一发送
+ const sendTable = () => {
+ http.post(lightingManage.submitTableData, dataSource.value).then((res) => {
message.success('操作成功');
getTable();
+ getLeftPlan();
});
};
@@ -133,16 +186,23 @@
const transferData = ref([]) as any;
// 获得穿梭框原始数据
const getLeftPlan = () => {
- http.get(lightingManage.getLeftPlan, {}).then((res) => {
- let arr = [];
- res.data.forEach((item: any) => {
- arr.push({
- key: item.id,
- title: item.planName,
+ http
+ .get(planManage.getTransData, {
+ projectId: state.projectId,
+ siteId: state.siteId,
+ // 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
+ deviceType: 1,
+ })
+ .then((res) => {
+ let arr = [];
+ res.data.forEach((item: any) => {
+ arr.push({
+ key: item.id,
+ title: item.planName,
+ });
});
+ transferData.value = arr;
});
- transferData.value = arr;
- });
};
const handleChange = (keys: string[], direction: string, moveKeys: string[]) => {
@@ -158,7 +218,7 @@
if (targetKeys.value.length < 1) {
return message.info('没有选择任何计划');
}
- http.post(lightingManage.submitLeftPlan, targetKeys.value).then(() => {
+ http.post(planManage.submitTransData, targetKeys.value).then(() => {
message.success('添加成功');
// 如果发送成功,则刷新表格
getTable();
@@ -172,7 +232,31 @@
diff --git a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less
new file mode 100644
index 0000000..26c41ae
--- /dev/null
+++ b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/dialogStyle.less
@@ -0,0 +1,168 @@
+.out-dialog {
+ position: fixed;
+ right: 496px;
+ width: 500px;
+ height: 100%;
+ z-index: 0;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ box-sizing: border-box;
+ color: rgb(255, 83, 0);
+ background: black;
+ display: flex;
+ padding: 25px;
+ flex-direction: column;
+ transition: all ease 0.5s;
+ .content {
+ overflow-y: scroll;
+ .div-operation {
+ display: inline-block;
+ width: 3px;
+ height: 13px;
+ opacity: 1;
+ border-radius: 1px;
+ background: rgba(67, 136, 251, 1);
+ }
+ .text-operation {
+ display: inline-block;
+ color: rgba(255, 255, 255, 1);
+ font-size: 16px;
+ font-weight: 700;
+ margin-left: 5px;
+ }
+ .j-box {
+ background-color: #000;
+ opacity: 1;
+ z-index: 99999;
+ overflow-y: scroll;
+ .journal {
+ padding: 1% 3%;
+ width: 100%;
+ height: 150px;
+ background-color: rgba(0, 0, 0);
+ border-radius: 12px;
+ border: 2px solid transparent;
+ border-image: linear-gradient(to bottom, #0077ff, #00f6ff, #000000) 1;
+ .title-img {
+ padding-top: 6px;
+ }
+ }
+ .imgText {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .ztzm {
+ display: flex;
+ align-items: center;
+ }
+
+ .cxbtn {
+ color: rgba(255, 255, 255, 1);
+ border: none;
+ border-radius: 6px;
+ width: 59.79px;
+ height: 32px;
+ opacity: 1;
+ background: linear-gradient(
+ 180deg,
+ rgba(255, 187, 0, 1) 0%,
+ rgba(255, 112, 3, 1) 91.21%,
+ rgba(255, 129, 3, 1) 100%
+ );
+ cursor: pointer;
+ }
+ }
+ .btn-box {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ grid-template-rows: 1fr 1fr;
+ grid-row-gap: 15px;
+ .btn-item {
+ text-align: center;
+ display: flex;
+ align-content: space-between;
+ .left {
+ width: 70px;
+ height: 35px;
+ line-height: 35px;
+ border-radius: 4px;
+ background: linear-gradient(
+ 180deg,
+ rgba(1, 206, 255, 1) 0%,
+ rgba(0, 150, 229, 1) 100%
+ );
+ color: rgba(255, 255, 255, 1);
+ font-size: 14px;
+ font-weight: 400;
+ }
+ .right {
+ width: 140px;
+ height: 35px;
+ line-height: 35px;
+ :first-child {
+ color: white;
+ }
+ span {
+ vertical-align: middle;
+ }
+ img {
+ padding: 0 5px;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .button-box {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 10px;
+ height: 60px;
+ position: absolute;
+ background-color: transparent;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ .execute {
+ margin-right: 10px;
+ width: 74px;
+ height: 40px;
+ opacity: 1;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 14px;
+ font-weight: 400;
+ border: 0;
+ margin-left: 10px;
+ }.cancel {
+ margin-right: 10px;
+ width: 74px;
+ height: 40px;
+ opacity: 1;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 14px;
+ font-weight: 400;
+ border: 0;
+ margin-left: 10px;
+ }
+ .execute {
+ background: rgb(67, 136, 251);
+ color: white;
+ }
+ .cancel {
+ background: white;
+ color: black;
+ }
+ }
+}
+
+.fade-enter-active, .fade-leave-active {
+ transform: translateX(0px);
+}
+.fade-enter-from, .fade-leave-to {
+ transform: translateX(496px);
+}
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue
new file mode 100644
index 0000000..dad0fa7
--- /dev/null
+++ b/hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue
@@ -0,0 +1,201 @@
+
+
序号 | +执行时间 | +计划名称 | +状态 | +操作 | +|
---|---|---|---|---|---|
{{ index + 1 }} | +{{ row.startTime }} | +{{ row.planName }} | ++ + | ++ + | +
+ 重启
+ 删除
+ |
+