| 
...
 | 
...
 | 
@@ -282,7 +282,7 @@ export const commonDataSourceSchemas = (): FormSchema[] => { | 
| 
282
 | 
282
 | 
       },
 | 
| 
283
 | 
283
 | 
       componentProps: ({ formActionType, formModel }) => {
 | 
| 
284
 | 
284
 | 
         const { setFieldsValue } = formActionType;
 | 
| 
285
 | 
 
 | 
-        const { codeType } = formModel || {};
 | 
| 
 
 | 
285
 | 
+        const { codeType, deviceType, transportType } = formModel || {};
 | 
| 
286
 | 
286
 | 
         return {
 | 
| 
287
 | 
287
 | 
           // api: findDictItemByCode,
 | 
| 
288
 | 
288
 | 
           api: async (params: Recordable) => {
 | 
| 
...
 | 
...
 | 
@@ -293,6 +293,14 @@ export const commonDataSourceSchemas = (): FormSchema[] => { | 
| 
293
 | 
293
 | 
                   (item) => item.itemValue == CommandTypeEnum.ATTRIBUTE.toString()
 | 
| 
294
 | 
294
 | 
                 );
 | 
| 
295
 | 
295
 | 
               }
 | 
| 
 
 | 
296
 | 
+
 | 
| 
 
 | 
297
 | 
+              // TCP网关子 --> 不能要服务命令类型
 | 
| 
 
 | 
298
 | 
+              if (deviceType == 'SENSOR' && transportType == 'TCP') {
 | 
| 
 
 | 
299
 | 
+                return record.filter(
 | 
| 
 
 | 
300
 | 
+                  (item) => item.itemValue == CommandTypeEnum.ATTRIBUTE.toString()
 | 
| 
 
 | 
301
 | 
+                );
 | 
| 
 
 | 
302
 | 
+              }
 | 
| 
 
 | 
303
 | 
+
 | 
| 
296
 | 
304
 | 
               if (codeType == TaskTypeEnum.MODBUS_RTU) {
 | 
| 
297
 | 
305
 | 
                 // setFieldsValue({ [DataSourceField.COMMAND_TYPE]: undefined });
 | 
| 
298
 | 
306
 | 
                 return record.filter(
 | 
| 
...
 | 
...
 | 
@@ -304,7 +312,6 @@ export const commonDataSourceSchemas = (): FormSchema[] => { | 
| 
304
 | 
312
 | 
                 );
 | 
| 
305
 | 
313
 | 
               }
 | 
| 
306
 | 
314
 | 
             } catch (error) {
 | 
| 
307
 | 
 
 | 
-              console.log(error);
 | 
| 
308
 | 
315
 | 
               return [];
 | 
| 
309
 | 
316
 | 
             }
 | 
| 
310
 | 
317
 | 
           },
 | 
...
 | 
...
 | 
 |