Commit 609935c686f4456bfd9c14b07028c92c7de134b9
1 parent
1710a222
fix: show device alias if device has alias
Showing
2 changed files
with
3 additions
and
4 deletions
@@ -14,9 +14,9 @@ VITE_PUBLIC_PATH = / | @@ -14,9 +14,9 @@ VITE_PUBLIC_PATH = / | ||
14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] | 14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] |
15 | # 线上测试环境 | 15 | # 线上测试环境 |
16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
17 | -# VITE_PROXY = [["/api","http://222.180.200.114:48080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 17 | +VITE_PROXY = [["/api","http://222.180.200.114:48080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
19 | -VITE_PROXY = [["/api","http://192.168.10.114:8080/api"],["/thingskit-drawio","http://192.168.10.136:8080/api"]] | 19 | +# VITE_PROXY = [["/api","http://192.168.10.103:8080/api"],["/thingskit-drawio","http://192.168.10.136:8080/api"]] |
20 | 20 | ||
21 | # 实时数据的ws地址 | 21 | # 实时数据的ws地址 |
22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= | 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= |
@@ -224,7 +224,7 @@ export const dataSourceSchema = (frontId?: FrontComponent): FormSchema[] => { | @@ -224,7 +224,7 @@ export const dataSourceSchema = (frontId?: FrontComponent): FormSchema[] => { | ||
224 | if (data) | 224 | if (data) |
225 | return data.map((item) => ({ | 225 | return data.map((item) => ({ |
226 | ...item, | 226 | ...item, |
227 | - label: item.name, | 227 | + label: item.alias || item.name, |
228 | value: item.id, | 228 | value: item.id, |
229 | deviceType: item.deviceType, | 229 | deviceType: item.deviceType, |
230 | })); | 230 | })); |
@@ -232,7 +232,6 @@ export const dataSourceSchema = (frontId?: FrontComponent): FormSchema[] => { | @@ -232,7 +232,6 @@ export const dataSourceSchema = (frontId?: FrontComponent): FormSchema[] => { | ||
232 | } | 232 | } |
233 | return []; | 233 | return []; |
234 | }, | 234 | }, |
235 | - | ||
236 | onChange(_value, record: MasterDeviceList) { | 235 | onChange(_value, record: MasterDeviceList) { |
237 | setFieldsValue({ | 236 | setFieldsValue({ |
238 | [DataSourceField.DEVICE_NAME]: record?.label, | 237 | [DataSourceField.DEVICE_NAME]: record?.label, |