|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <el-button v-for="item in selectedDevices[0].deviceLoops" @click="selectItem(item)" :class="{ 'active': s === item }">{{item.name}}</el-button>
|
|
|
+ <el-button v-for="item in deepClone[0].deviceLoops" @click="selectItem(item)" :class="{ 'active': s.id === item.id }">{{item.name}}</el-button>
|
|
|
<div style="margin: 5px 0;"/>
|
|
|
<el-form ref="elFormRefTime" label-position="right" label-width="80px">
|
|
|
<el-row>
|
|
@@ -114,8 +114,9 @@ export default {
|
|
|
<script setup>
|
|
|
import { ref, reactive, onMounted, toRefs } from 'vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
+import {bloom} from "three/addons/tsl/display/BloomNode.js";
|
|
|
|
|
|
-const d = ref([1,2,3,4,5,6,7,8])
|
|
|
+// const d = ref([1,2,3,4,5,6,7,8])
|
|
|
|
|
|
const s = ref(0)
|
|
|
|
|
@@ -125,10 +126,13 @@ const selectItem = (item) => {
|
|
|
|
|
|
const props = defineProps({
|
|
|
selectedDevices: Array,
|
|
|
+ openLoopTiming: Boolean,
|
|
|
})
|
|
|
const emit = defineEmits(['save'])
|
|
|
|
|
|
-const { selectedDevices } = toRefs(props)
|
|
|
+const { selectedDevices,openLoopTiming } = toRefs(props)
|
|
|
+
|
|
|
+const deepClone = JSON.parse(JSON.stringify(props.selectedDevices));
|
|
|
|
|
|
// 批量定时
|
|
|
const enterDialogTime = async() => {
|
|
@@ -140,13 +144,13 @@ const enterDialogTime = async() => {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- selectedDevices.value[0].deviceLoops[s.value-1].timeCondition1OnTime = formDataTime.timeCondition1OnTime
|
|
|
- selectedDevices.value[0].deviceLoops[s.value-1].timeCondition1OffTime = formDataTime.timeCondition1OffTime
|
|
|
- selectedDevices.value[0].deviceLoops[s.value-1].timeCondition2OnTime = formDataTime.timeCondition2OnTime
|
|
|
- selectedDevices.value[0].deviceLoops[s.value-1].timeCondition2OffTime = formDataTime.timeCondition2OffTime
|
|
|
|
|
|
+ props.selectedDevices[0].deviceLoops[s.value.id-1].timeCondition1OnTime = formDataTime.timeCondition1OnTime
|
|
|
+ props.selectedDevices[0].deviceLoops[s.value.id-1].timeCondition1OffTime = formDataTime.timeCondition1OffTime
|
|
|
+ props.selectedDevices[0].deviceLoops[s.value.id-1].timeCondition2OnTime = formDataTime.timeCondition2OnTime
|
|
|
+ props.selectedDevices[0].deviceLoops[s.value.id-1].timeCondition2OffTime = formDataTime.timeCondition2OffTime
|
|
|
emit('save')
|
|
|
-
|
|
|
+ props.openLoopTiming = false
|
|
|
ElMessage({
|
|
|
message: '操作成功',
|
|
|
type: 'success'
|