|
@@ -1137,7 +1137,14 @@ export default defineComponent({
|
|
|
} else {
|
|
|
formTimerArr.map((item: any) => {
|
|
|
if (item.type == "1") {
|
|
|
- sceneEquipList.concat(item.sceneEquipList)
|
|
|
+ item.sceneEquipList.map((scene: any) => {
|
|
|
+ let obj: any = {
|
|
|
+ projectId: scene.projectId, //类型:String 必有字段 备注:无
|
|
|
+ objectId: scene.objectId, //类型:String 必有字段 备注:设备id
|
|
|
+ type: scene.type,
|
|
|
+ };
|
|
|
+ sceneEquipList.push(obj);
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -1189,6 +1196,27 @@ export default defineComponent({
|
|
|
message: "确定删除当前时间吗?",
|
|
|
})
|
|
|
.then(() => {
|
|
|
+ console.log("====");
|
|
|
+ console.log(formTimeArr);
|
|
|
+ let sceneEquipList: any = [];
|
|
|
+ formTimeArr.map((item: any) => {
|
|
|
+ if (item.type == "1") {
|
|
|
+ item.sceneEquipList.map((scene: any) => {
|
|
|
+ let obj: any = {
|
|
|
+ projectId: scene.projectId, //类型:String 必有字段 备注:无
|
|
|
+ objectId: scene.objectId, //类型:String 必有字段 备注:设备id
|
|
|
+ type: scene.type,
|
|
|
+ };
|
|
|
+ sceneEquipList.push(obj);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ sceneEquipList = proxyData.removeDuplicateObj(sceneEquipList);
|
|
|
+ formTimeArr.map((item: any) => {
|
|
|
+ if (item.type !== "1") {
|
|
|
+ item.sceneEquipList = sceneEquipList;
|
|
|
+ }
|
|
|
+ });
|
|
|
proxyData.saveBatchCustomScene(formTimeArr, 2);
|
|
|
})
|
|
|
.catch(() => {
|