diff --git a/src/views/DataCollect/Dashboard/components/Card.vue b/src/views/DataCollect/Dashboard/components/Card.vue index 3f1d19eb..edb96cbe 100644 --- a/src/views/DataCollect/Dashboard/components/Card.vue +++ b/src/views/DataCollect/Dashboard/components/Card.vue @@ -52,6 +52,7 @@ const data: any = ref({ const pickerTimeChange = () => { data.value.time.type = undefined; + console.log(1); }; const getEcharts = async (val: any) => { @@ -108,6 +109,7 @@ const handleOptions = (x = [], y = []) => { watch( () => data.value.time.type, (value) => { + if (value === undefined) return; const date = getTimeByType(value); data.value.time.time = [dayjs(date), dayjs(new Date())]; }, diff --git a/src/views/link/DashBoard/components/Cpu.vue b/src/views/link/DashBoard/components/Cpu.vue index 41462cac..2b03f631 100644 --- a/src/views/link/DashBoard/components/Cpu.vue +++ b/src/views/link/DashBoard/components/Cpu.vue @@ -165,6 +165,7 @@ const handleCpuOptions = (optionsData: any, xAxis: any) => { watch( () => data.value.type, (value) => { + if (value === undefined) return; const date = getTimeByType(value); data.value.time = [dayjs(date), dayjs(new Date())]; }, diff --git a/src/views/link/DashBoard/components/Jvm.vue b/src/views/link/DashBoard/components/Jvm.vue index c9385bd9..d721b18e 100644 --- a/src/views/link/DashBoard/components/Jvm.vue +++ b/src/views/link/DashBoard/components/Jvm.vue @@ -169,6 +169,7 @@ const handleJVMOptions = (optionsData: any, xAxis: any) => { watch( () => data.value.type, (value) => { + if (value === undefined) return; const date = getTimeByType(value); data.value.time = [dayjs(date), dayjs(new Date())]; }, diff --git a/src/views/link/DashBoard/components/Network.vue b/src/views/link/DashBoard/components/Network.vue index 399c5410..73dc81ba 100644 --- a/src/views/link/DashBoard/components/Network.vue +++ b/src/views/link/DashBoard/components/Network.vue @@ -183,6 +183,7 @@ const handleNetworkOptions = (optionsData: any, xAxis: any) => { watch( () => data.value.time.type, (value) => { + if (value === undefined) return; const date = getTimeByType(value); data.value.time.time = [dayjs(date), dayjs(new Date())]; }, diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue index 5266196e..f48ed3d6 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue @@ -58,7 +58,7 @@ @change="propertySelect" > i?.expands?.type?.includes('read'), ) || []" :value="item?.id" diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue index b98f67dd..8ab6ad76 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue @@ -171,15 +171,12 @@ const handleClick = (_detail: any) => { } }; -watch(() => props.value?.[0]?.value, (newVal) => { - if(newVal){ - detail(newVal).then(resp => { +onMounted(() => { + if(props.value?.[0]?.value){ + detail(props.value?.[0]?.value).then(resp => { emit('change', resp.result); }) } -}, { - deep: true, - immediate: true }) watchEffect(() => { diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue b/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue index b49db279..d839f1bc 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue @@ -180,6 +180,11 @@ const onValueChange = () => { emits('update:value', [{ value: newValue, name: '标签' }]); emits('change', [{ value: newValue, name: '标签' }], _data); }; + +// onMounted(() => { +// // console.log(tagList.value, props.tagData, props.value) +// // emits('change', props.value, _data); +// })