Showing
3 changed files
with
6 additions
and
6 deletions
@@ -51,9 +51,9 @@ const handleSubmit = async () => { | @@ -51,9 +51,9 @@ const handleSubmit = async () => { | ||
51 | 51 | ||
52 | const handleSetFormValues = async () => { | 52 | const handleSetFormValues = async () => { |
53 | const { dataSourceJson } = unref(getNodeData) || {} | 53 | const { dataSourceJson } = unref(getNodeData) || {} |
54 | - const { deviceId, attr, chartOption, deviceProfileId, deviceProfileTemplateId, attrInfo } = dataSourceJson || {} | 54 | + const { deviceId, attr, chartOption, deviceProfileId, deviceProfileTemplateId, attrInfo, deviceInfo } = dataSourceJson || {} |
55 | await nextTick() | 55 | await nextTick() |
56 | - unref(dataSourceElRef)?.setFieldsValue({ deviceId, attr, deviceProfileId, attrInfo, deviceProfileTemplateId }) | 56 | + unref(dataSourceElRef)?.setFieldsValue({ deviceId, attr, deviceProfileId, attrInfo, deviceProfileTemplateId, deviceInfo }) |
57 | setFieldsValue({ ...chartOption }) | 57 | setFieldsValue({ ...chartOption }) |
58 | } | 58 | } |
59 | 59 |
@@ -55,9 +55,9 @@ const handleSubmit = async () => { | @@ -55,9 +55,9 @@ const handleSubmit = async () => { | ||
55 | 55 | ||
56 | const handleSetFormValues = async () => { | 56 | const handleSetFormValues = async () => { |
57 | const { dataSourceJson } = unref(getNodeData) || {} | 57 | const { dataSourceJson } = unref(getNodeData) || {} |
58 | - const { deviceId, attr, chartOption, deviceProfileId, attrInfo, deviceProfileTemplateId } = dataSourceJson || {} | 58 | + const { deviceId, attr, chartOption, deviceProfileId, attrInfo, deviceProfileTemplateId, deviceInfo } = dataSourceJson || {} |
59 | await nextTick() | 59 | await nextTick() |
60 | - unref(dataSourceElRef)?.setFieldsValue({ deviceId, attr, deviceProfileId, attrInfo, deviceProfileTemplateId }) | 60 | + unref(dataSourceElRef)?.setFieldsValue({ deviceId, attr, deviceProfileId, attrInfo, deviceInfo, deviceProfileTemplateId }) |
61 | setFieldsValue({ ...chartOption }) | 61 | setFieldsValue({ ...chartOption }) |
62 | } | 62 | } |
63 | 63 |
@@ -32,9 +32,9 @@ const dataSourceElRef = ref<Nullable<InstanceType<typeof DataSourceForm>>>() | @@ -32,9 +32,9 @@ const dataSourceElRef = ref<Nullable<InstanceType<typeof DataSourceForm>>>() | ||
32 | 32 | ||
33 | const handleSetFormValues = async () => { | 33 | const handleSetFormValues = async () => { |
34 | const { dataSourceJson } = unref(getNodeData) || {} | 34 | const { dataSourceJson } = unref(getNodeData) || {} |
35 | - const { deviceId, attr, chartOption, deviceProfileId, deviceProfileTemplateId, attrInfo } = dataSourceJson || {} | 35 | + const { deviceId, attr, chartOption, deviceProfileId, deviceProfileTemplateId, attrInfo, deviceInfo } = dataSourceJson || {} |
36 | await nextTick() | 36 | await nextTick() |
37 | - unref(dataSourceElRef)?.setFieldsValue({ deviceId, attr, deviceProfileId, deviceProfileTemplateId, attrInfo }) | 37 | + unref(dataSourceElRef)?.setFieldsValue({ deviceId, attr, deviceProfileId, deviceProfileTemplateId, attrInfo, deviceInfo }) |
38 | setFieldsValue({ ...chartOption }) | 38 | setFieldsValue({ ...chartOption }) |
39 | } | 39 | } |
40 | 40 |