|
...
|
...
|
@@ -22,6 +22,7 @@ export enum FieldsEnum { |
|
22
|
22
|
TB_DEVICE_PROFILE_ID = 'tbDeviceProfileId',
|
|
23
|
23
|
IS_TCP_DEVICE_PROFILE = 'isTcpDeviceProfile',
|
|
24
|
24
|
TRANSPORT_TYPE = 'transportType',
|
|
|
25
|
+ PRODUCTION_NAME = 'productionName',
|
|
25
|
26
|
}
|
|
26
|
27
|
|
|
27
|
28
|
export enum DelimiterEnum {
|
|
...
|
...
|
@@ -171,7 +172,7 @@ export const basicInfoForm: FormSchema[] = [ |
|
171
|
172
|
placeholder: '请选择产品',
|
|
172
|
173
|
params: { deviceType },
|
|
173
|
174
|
getPopupContainer: () => document.body,
|
|
174
|
|
- onChange(value: string, options: DeviceRecord) {
|
|
|
175
|
+ onChange(value: string, options: DeviceRecord & Record<'label', string>) {
|
|
175
|
176
|
setFieldsValue({
|
|
176
|
177
|
[FieldsEnum.IS_TCP_DEVICE_PROFILE]: value
|
|
177
|
178
|
? options.transportType === TransportTypeEnum.TCP
|
|
...
|
...
|
@@ -179,6 +180,7 @@ export const basicInfoForm: FormSchema[] = [ |
|
179
|
180
|
[FieldsEnum.TB_DEVICE_PROFILE_ID]: value ? options.tbProfileId : null,
|
|
180
|
181
|
[FieldsEnum.GATEWAY_TB_DEVICE_ID]: null,
|
|
181
|
182
|
[FieldsEnum.TRANSPORT_TYPE]: options?.transportType,
|
|
|
183
|
+ [FieldsEnum.PRODUCTION_NAME]: options?.label,
|
|
182
|
184
|
});
|
|
183
|
185
|
},
|
|
184
|
186
|
showSearch: true,
|
|
...
|
...
|
@@ -195,6 +197,12 @@ export const basicInfoForm: FormSchema[] = [ |
|
195
|
197
|
show: false,
|
|
196
|
198
|
},
|
|
197
|
199
|
{
|
|
|
200
|
+ field: FieldsEnum.PRODUCTION_NAME,
|
|
|
201
|
+ label: '',
|
|
|
202
|
+ component: 'Input',
|
|
|
203
|
+ show: false,
|
|
|
204
|
+ },
|
|
|
205
|
+ {
|
|
198
|
206
|
field: FieldsEnum.GATEWAY_TB_DEVICE_ID,
|
|
199
|
207
|
component: 'ApiSelect',
|
|
200
|
208
|
label: '网关设备',
|
...
|
...
|
|