-
+
{{
item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--'
}}
@@ -231,7 +231,7 @@
title="此操作将提交以上修改内容"
ok-text="确定"
cancel-text="取消"
- @click="submitChangeList"
+ @confirm="submitChangeList"
@cancel="changeCancel">
@@ -320,7 +320,7 @@
const togglePlan2 = () => {
// 如果未交互任何按钮
if (handleButton.value == '') {
- return message.info('请选择照明回路');
+ return message.info('请选择空调分组');
}
// 获取最近交互过的按钮
const btn: any = buttons2.value.find((button: any) => button.id === handleButton.value);
@@ -399,7 +399,6 @@
});
// 照明回路的按钮切换
const changeLine = (button: any) => {
- console.log(button, 'button2mmmm');
// 存储一次按钮ID,用于禁用/启用交互
handleButton.value = button.id;
// 根据按钮状态,展示禁用/启用按钮文本
@@ -482,7 +481,7 @@
// 操作线路总数
let sum = 0;
// 没有这个选项的线路
- let nofind = 0;
+ // let nofind = 0;
// 修改无效的数量
let checked = 0;
// 可修改的数量
@@ -515,19 +514,20 @@
return (checked += 1);
// 修改
} else {
- alert(v.treePid + '---' + before + '---' + after);
changed += 1;
- resetScene(item.childList);
- changeScene(v1, before, after);
+ changeScene(v1, before, after, item);
v1.executeStatus.value = 1;
}
+ // 不符合条件的全部重置
+ } else {
+ v1.executeStatus.value = 0;
}
});
}
});
}
});
- alert(`共修改${sum}条,${checked}条无需修改,${nofind}条不具有该选项,${changed}条生效`);
+ message.info(`共修改${sum}条数据,其中${checked}条无需修改,${changed}条修改有效`);
// 如果是单选模式
} else {
// 如果按钮已经被选择
@@ -565,15 +565,15 @@
/** 控制场景 - 按钮切换通用方法(单选 & 多选)
* @param button 当前被选中的场景(单选 & 多选)
* @param before 当前回路场景的初始值(撤回时需使用)
+ * @param after 修改后的值(修改时使用)
+ * @param anyButton 多选时使用
*/
- const changeScene = (button: any, before: string | undefined, after: string) => {
- console.log(changeList.value, 'vvvvvvvvvvvvvv-----', button, 'bbbbbbbb---------');
+ const changeScene = (button: any, before: string | undefined, after: string, line = null) => {
// 通过分组ID,查询之前是否修改过
const result = changeList.value.find((item: any, index: number) => {
item.index = index;
return item.deviceGroup == button.treePid.split('_')[0];
});
- console.log(result, 'rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr');
// 如果已产生过修改
if (result) {
// 改回了原有的值,则从数组中移除
@@ -587,12 +587,20 @@
}
// 如果未产生过修改
} else {
+ let nowButton;
+ // 多选,则使用第四个参数
+ if (line) {
+ nowButton = line;
+ // 如果是单选,则使用thisbotton2
+ } else {
+ nowButton = thisButton2.value;
+ }
changeList.value.push({
// 回路
- deviceGroup: thisButton2.value.dataCode,
- deviceGroupName: thisButton2.value.name,
+ deviceGroup: nowButton.dataCode,
+ deviceGroupName: nowButton.name,
// 分区
- region: thisButton2.value.treePid,
+ region: nowButton.treePid,
regionName: '',
// 修改前
before,
@@ -608,7 +616,7 @@
// 执行按钮loading
const buttonLoading = ref(false);
// 刷新
- const refresh = () => {
+ const refresh = (reload = false) => {
// 关闭执行弹窗
executeVisible.value = false;
// 设置当前选中的序列
@@ -616,10 +624,12 @@
// 重置选中样式 和 按钮选中状态
emit('changeArea', ['1']);
emit('reset');
- // 将所有修改改回
- changeList.value.forEach((item: any) => {
- resetChangeList(item);
- });
+ // 如果是中途刷新(对应提交后刷新),需要将所有修改改回
+ if (!reload) {
+ changeList.value.forEach((item: any) => {
+ resetChangeList(item);
+ });
+ }
changeList.value = [];
// 默认选择第一个楼层
let data = props.treeData[0];
@@ -644,6 +654,10 @@
if (item.scene == v3.dataCode) {
v3.executeStatus.value = 0;
}
+ if (!item.before) {
+ console.log(item, '没有这个选项');
+ v3.executeStatus.value = 0;
+ }
// 旧值选中
if (item.before == v3.dataCode) {
v3.executeStatus.value = 1;
@@ -695,6 +709,7 @@
const diffList = ref([]);
//撤销
const delBtn = (obj: any) => {
+ console.log(obj, '当前选择的修改内容');
// 将treeData对应回路的数据改回,数据以后端为准
obj.scene = obj.stateAfter.scene.value;
obj.before = obj.stateBefore.scene.value;
@@ -722,9 +737,9 @@
projectId: state.projectId,
siteId: state.siteId,
})
- .then((res) => {
+ .then(() => {
emit('reload');
- refresh();
+ refresh(true);
});
};
diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue
index 99a1949..d766a90 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue
+++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue
@@ -1,7 +1,9 @@
*以下修改需执行后生效
@@ -81,6 +83,7 @@
import { ref, onMounted } from 'vue';
// 请求
import { http } from '/nerv-lib/util/http';
+ import { planManage } from '/@/api/planManage';
import { airConditionControl } from '/@/api/airConditionControlSystem';
import { message } from 'ant-design-vue';
import { getEnum } from '/@/api';
@@ -138,7 +141,12 @@
// 获得表格数据
const getTable = () => {
http
- .get(airConditionControl.getTableData, { projectId: state.projectId, siteId: state.siteId })
+ .get(planManage.getTableData, {
+ projectId: state.projectId,
+ siteId: state.siteId,
+ // 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
+ deviceType: 2,
+ })
.then((res) => {
dataSource.value = res.data;
});
@@ -156,7 +164,7 @@
};
// 将对表格的修改统一发送
const sendTable = () => {
- http.post(airConditionControl.submitTableData, dataSource.value).then((res) => {
+ http.post(airConditionControl.submitTableData, dataSource.value).then(() => {
message.success('操作成功');
getTable();
getLeftPlan();
@@ -179,7 +187,12 @@
// 获得穿梭框原始数据
const getLeftPlan = () => {
http
- .get(airConditionControl.getTransData, { projectId: state.projectId, siteId: state.siteId })
+ .get(planManage.getTransData, {
+ projectId: state.projectId,
+ siteId: state.siteId,
+ // 设备类型(1照明,2空调,3排风扇,4风幕机,5电动窗,6进水阀,7排水泵)
+ deviceType: 2,
+ })
.then((res) => {
let arr = [];
res.data.forEach((item: any) => {
@@ -205,7 +218,7 @@
if (targetKeys.value.length < 1) {
return message.info('没有选择任何计划');
}
- http.post(airConditionControl.submitTransData, targetKeys.value).then(() => {
+ http.post(planManage.submitTransData, targetKeys.value).then(() => {
message.success('添加成功');
// 如果发送成功,则刷新表格
getTable();
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
index 35df6a3..a82d117 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
@@ -7,6 +7,7 @@
v-for="(item, index) in floorData"
:key="index"
class="btn-item"
+ :style="{ color: item.dataCode == thisFloor ? 'black' : 'white' }"
@click="changeFloor(item.childList, item.dataCode)"
>{{ item.name }}
@@ -56,7 +57,12 @@
:maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }">
-
+
@@ -103,9 +109,9 @@
// 所有楼层的数据
const floorData = ref([]);
// 当前选择的楼层
- const thisFloor = ref(1);
+ const thisFloor = ref('1');
// 左上角分层切换
- const changeFloor = (area: any, floor: number) => {
+ const changeFloor = (area: any, floor: string) => {
thisFloor.value = floor;
// 重置数据
reset();
@@ -115,6 +121,7 @@
treeData.value = area;
// 默认选择第一项
treeData.value[0].selected = true;
+ tabs1Ref.value.changeArea(treeData.value[0]);
};
// 分区业务 =====================================================
@@ -232,7 +239,7 @@
};
// 获得所有分区
- const getAllArea = () => {
+ const getAllArea = (realod = false) => {
http.get(lightingManage.getTree, { projectId: state.projectId }).then((res) => {
const data = res.data;
floorData.value = data;
@@ -254,12 +261,23 @@
});
});
});
- // 默认展示 线路 1-1
- treeData.value = data[0].childList;
+ // 默认展示 线路 1-1,重载则使用thisFloor当前选中的楼层数
+ let index = 0;
+ if (realod) {
+ data.find((item: any, i: number) => {
+ if (item.dataCode == thisFloor.value) {
+ return (index = i);
+ }
+ });
+ }
+ treeData.value = data[index].childList;
// 开始预加载
preload.value = true;
});
};
+ const reload = () => {
+ getAllArea(true);
+ };
// 设备业务 小灯泡 ==============================================
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
index b2017f6..108a086 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
@@ -5,12 +5,6 @@
照明区域
-
@@ -142,7 +136,7 @@
title="刷新将会取消已作出的修改"
ok-text="确定"
cancel-text="取消"
- @confirm="refresh"
+ @confirm="refresh(false)"
@cancel="changeCancel">
@@ -233,7 +227,14 @@
@@ -277,18 +278,12 @@
/** 向上传递方法
* @method changeArea 用于控制俯视图的选中状态
* @method reset 用于重置按钮区
+ * @method reload 用于刷新一次页面
*/
- const emit = defineEmits(['changeArea', 'reset']);
+ const emit = defineEmits(['changeArea', 'reset', 'reload']);
// 照明区域业务 =======================================================================
- // 计划启用状态
- const isPlanEnabled = ref(false);
- // 计划启用切换事件
- const togglePlan = () => {
- isPlanEnabled.value = !isPlanEnabled.value;
- };
-
// 按钮区展开与收起状态
const showAllButtonsArea = ref(false);
// 被选中的分区 默认为1 用于选中样式渲染
@@ -396,15 +391,9 @@
// 储存当前选中的回路
const thisButton2 = ref({
- code: '',
+ dataCode: '',
name: '',
- pcode: '',
- mode: {
- value: -1,
- },
- scene: {
- value: -1,
- },
+ treePid: '',
childList: [],
});
// 照明回路的按钮切换
@@ -443,11 +432,15 @@
// 发生了选中事件
thisButton2.value = button;
// 获得启动模式
- thisButton3.value = button.childList.find((item: any) => {
- if (item.selectAble) {
- return item.childList ? item.childList : [];
- }
- });
+ if (button.childList) {
+ thisButton3.value = button.childList.find((item: any) => {
+ if (item.selectAble) {
+ return item.childList ? item.childList : [];
+ }
+ });
+ } else {
+ thisButton3.value = { childList: [] };
+ }
} else {
// 未发生选中 或 多选的其中一个按钮被取消
resetMode();
@@ -479,52 +472,113 @@
// 控制场景业务 =====================================================================
// 控制场景 - 按钮切换
- const selectButton4 = (button4) => {
- // 当前选中的回路数据
- const data = thisButton2.value;
- // 修改前的数据
- let before = data.scene.value;
- // 修改后的数据
- let after = button4.value;
+ const selectButton4 = (button4: any) => {
+ const after = button4.dataCode;
+ let before = '';
// 如果是多选模式
if (!singleSelection.value) {
+ // 操作线路总数
+ let sum = 0;
+ // 没有这个选项的线路
+ // let nofind = 0;
+ // 修改无效的数量
+ let checked = 0;
+ // 可修改的数量
+ let changed = 0;
buttons2.value.forEach((item: any) => {
+ // 取出当前选中的值 before
+ if (item.childList) {
+ let mode = item.childList.find((lv3: any) => {
+ return lv3.selectAble;
+ });
+ if (mode.childList) {
+ mode.childList.forEach((mode: any) => {
+ // 取出当前选中的模式
+ if (mode.executeStatus.value == 1) {
+ before = mode.dataCode;
+ }
+ });
+ }
+ }
// 查看当前回路,哪些被选中
if (item.selected) {
- changeScene(item, item.scene.value, after);
- item.scene.value = after;
+ item.childList.forEach((v: any) => {
+ if (v.childList) {
+ v.childList.forEach((v1: any) => {
+ // 查看是否包含当前要修改的值
+ if (v1.dataCode == after) {
+ sum += 1;
+ // 已经被选中,无需修改的内容
+ if (before == after) {
+ return (checked += 1);
+ // 修改
+ } else {
+ changed += 1;
+ changeScene(v1, before, after, item);
+ v1.executeStatus.value = 1;
+ }
+ // 不符合条件的全部重置
+ } else {
+ v1.executeStatus.value = 0;
+ }
+ });
+ }
+ });
}
});
- thisButton2.value.scene.value = after;
- return message.info('已修改X项');
+ message.info(`共修改${sum}条数据,其中${checked}条无需修改,${changed}条修改有效`);
// 如果是单选模式
} else {
- // 如果没有产生实质性的修改(修改前后相同,则跳出)
- if (before === after) {
+ // 如果按钮已经被选择
+ if (button4.executeStatus.value == 1) {
return message.info('未产生实际修改');
- // 产生了修改
} else {
- changeScene(data, before, after);
+ // 获得线路当前的场景
+ let before;
+ thisButton2.value.childList.find((item: any) => {
+ if (item.childList) {
+ item.childList.forEach((i: any) => {
+ if (i.executeStatus.value == 1) {
+ return (before = i.dataCode);
+ }
+ });
+ }
+ });
+ // 移除选中场景
+ resetScene(thisButton2.value.childList);
+ changeScene(button4, before, after);
}
}
};
+ // 切换场景前,需要把其他场景移除
+ const resetScene = (list: any) => {
+ list.forEach((item: any) => {
+ if (item.childList) {
+ item.childList.forEach((i: any) => {
+ i.executeStatus.value = 0;
+ });
+ }
+ });
+ };
+
/** 控制场景 - 按钮切换通用方法(单选 & 多选)
* @param button 当前被选中的回路(单选 & 多选)
* @param before 回路场景的初始值(撤回时需使用)
* @param after 回路场景被修改后的值
+ * @param anyButton 多选时使用
*/
- const changeScene = (button: any, before: number, after: number) => {
- // 查询之前是否修改过
+ const changeScene = (button: any, before: string | undefined, after: string, line = null) => {
+ // 通过分组ID,查询之前是否修改过
const result = changeList.value.find((item: any, index: number) => {
item.index = index;
- return item.deviceGroup == button.dataCode;
+ return item.deviceGroup == button.treePid.split('_')[0];
});
// 如果已产生过修改
if (result) {
// 改回了原有的值,则从数组中移除
if (after == result.before) {
changeList.value.splice(result.index, 1);
- // 修改为新值,则只修改after
+ // 修改为新值,则只修改场景
} else {
result.scene = after;
// 临时flag,用后移除
@@ -532,20 +586,27 @@
}
// 如果未产生过修改
} else {
+ let nowButton;
+ // 多选,则使用第四个参数
+ if (line) {
+ nowButton = line;
+ // 如果是单选,则使用thisbotton2
+ } else {
+ nowButton = thisButton2.value;
+ }
changeList.value.push({
// 回路
- deviceGroup: button.dataCode,
- deviceGroupName: button.name,
+ deviceGroup: nowButton.dataCode,
+ deviceGroupName: nowButton.name,
// 分区
- region: button.pcode,
+ region: nowButton.treePid,
regionName: '',
// 修改前
- before: before,
- // 修改后
+ before,
scene: after,
});
}
- thisButton2.value.scene.value = after;
+ button.executeStatus.value = 1;
};
// 底部按钮区 ======================================================================
@@ -554,7 +615,7 @@
// 执行按钮loading
const buttonLoading = ref(false);
// 刷新
- const refresh = () => {
+ const refresh = (reload = false) => {
// 关闭执行弹窗
executeVisible.value = false;
// 设置当前选中的序列
@@ -562,16 +623,51 @@
// 重置选中样式 和 按钮选中状态
emit('changeArea', ['1']);
emit('reset');
+ // 如果是中途刷新,需要将所有修改改回
+ if (!reload) {
+ changeList.value.forEach((item: any) => {
+ resetChangeList(item);
+ });
+ }
+ changeList.value = [];
// 默认选择第一个楼层
let data = props.treeData[0];
- // 清空保存的修改
- changeList.value = [];
// 默认选中
data.selected = true;
// 默认选中 1-1 分区 回路
buttons2.value = data.childList;
resetMode();
};
+ // 刷新时,将已修改的值改回
+ const resetChangeList = (item: any) => {
+ props.treeData.find((v: any) => {
+ if (item.region == v.dataCode) {
+ v.childList.find((v1: any) => {
+ // 找到被修改过的线路
+ if (item.deviceGroup == v1.dataCode) {
+ v1.childList.forEach((v2: any) => {
+ if (v2.childList) {
+ v2.childList.forEach((v3: any) => {
+ // 将新值移除
+ if (item.scene == v3.dataCode) {
+ v3.executeStatus.value = 0;
+ }
+ if (!item.before) {
+ console.log(item, '没有这个选项');
+ v3.executeStatus.value = 0;
+ }
+ // 旧值选中
+ if (item.before == v3.dataCode) {
+ v3.executeStatus.value = 1;
+ }
+ });
+ }
+ });
+ }
+ });
+ }
+ });
+ };
// 右下角的执行事件
const showModal = () => {
if (!changeList.value.length) {
@@ -580,7 +676,8 @@
buttonLoading.value = true;
http
.post(lightingManage.getChangeList, {
- infoList: changeList.value,
+ sceneList: changeList.value,
+ lockList: [],
projectId: state.projectId,
siteId: state.siteId,
})
@@ -612,13 +709,9 @@
const delBtn = (obj: any) => {
console.log(obj, '当前选择的修改内容');
// 将treeData对应回路的数据改回,数据以后端为准
- const area = props.treeData.find((item: any) => {
- return item.code == obj.region;
- });
- const line = area.childList.find((item: any) => {
- return item.code == obj.deviceGroup;
- });
- line.scene.value = obj.stateBefore.scene.value;
+ obj.scene = obj.stateAfter.scene.value;
+ obj.before = obj.stateBefore.scene.value;
+ resetChangeList(obj);
// 将 changeList 与 diffList 中记录的修改移除 (排除极端情况)
changeList.value = changeList.value.filter((item: any) => {
return item.deviceGroup !== obj.deviceGroup;
@@ -633,22 +726,29 @@
executeVisible.value = false;
}
};
- const submitChangeList = () => {};
+ // 提交本次修改
+ const submitChangeList = () => {
+ http
+ .post(lightingManage.submitChangeList, {
+ sceneList: changeList.value,
+ lockList: [],
+ projectId: state.projectId,
+ siteId: state.siteId,
+ })
+ .then(() => {
+ emit('reload');
+ refresh(true);
+ });
+ };
// 其他业务 ========================================================================
// 将当前选择的回路置空
const resetMode = () => {
thisButton2.value = {
- code: '',
+ dataCode: '',
name: '',
- pcode: '',
- mode: {
- value: -1,
- },
- scene: {
- value: -1,
- },
+ treePid: '',
childList: [],
};
};
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue
index 05bb3c6..6bff15e 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue
@@ -1,6 +1,18 @@
+
@@ -17,35 +29,25 @@
{{ index + 1 }} |
{{ row.startTime }} |
{{ row.planName }} |
-
-
- |
-
+ |
|
- 重启
+ 启用
+ @confirm="deletePlan(row)">
删除
|
@@ -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 @@