Commit 3bb9a118e970f6d923254074e4ccd6e390f910b4

Authored by loveumiko
1 parent 3a4f3218

fix: 修改图表组件的表单获取

@@ -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