Commit 153e8bf79e708b0ff8370650a55c35f7d0a4a282
Merge branch 'fix/DEFECT-1477' into 'main_dev'
fix: 修改任务中心时modBUS轮询字段在列表不显示 See merge request yunteng/thingskit-front!791
Showing
4 changed files
with
9 additions
and
9 deletions
| ... | ... | @@ -89,7 +89,7 @@ export const step1Schemas: FormSchema[] = [ | 
| 89 | 89 | transportType, | 
| 90 | 90 | deviceProfileId: id, | 
| 91 | 91 | gatewayId: null, | 
| 92 | - codeType: transportType === TransportTypeEnum.TCP ? TaskTypeEnum.MODBUS : null, | |
| 92 | + codeType: transportType === TransportTypeEnum.TCP ? TaskTypeEnum.MODBUS_RTU : null, | |
| 93 | 93 | code: null, | 
| 94 | 94 | addressCode: null, | 
| 95 | 95 | }); | 
| ... | ... | @@ -140,7 +140,7 @@ export const step1Schemas: FormSchema[] = [ | 
| 140 | 140 | return { | 
| 141 | 141 | options: [ | 
| 142 | 142 | { label: '自定义', value: TaskTypeEnum.CUSTOM }, | 
| 143 | - { label: 'ModBus', value: TaskTypeEnum.MODBUS }, | |
| 143 | + { label: 'ModBus', value: TaskTypeEnum.MODBUS_RTU }, | |
| 144 | 144 | ], | 
| 145 | 145 | }; | 
| 146 | 146 | }, | 
| ... | ... | @@ -172,7 +172,7 @@ export const step1Schemas: FormSchema[] = [ | 
| 172 | 172 | values?.transportType === TransportTypeEnum.TCP && | 
| 173 | 173 | (values.deviceType === DeviceTypeEnum.SENSOR || | 
| 174 | 174 | values.deviceType === DeviceTypeEnum.GATEWAY) && | 
| 175 | - values?.codeType === TaskTypeEnum.MODBUS | |
| 175 | + values?.codeType === TaskTypeEnum.MODBUS_RTU | |
| 176 | 176 | ); | 
| 177 | 177 | }, | 
| 178 | 178 | }, | ... | ... | 
| ... | ... | @@ -60,7 +60,7 @@ | 
| 60 | 60 | |
| 61 | 61 | //是modBUS类型的就用另外的表单 | 
| 62 | 62 | //判断是否是TCP ==> modBus的下发命令 | 
| 63 | - if (codeType == TaskTypeEnum.MODBUS && transportType == 'TCP') { | |
| 63 | + if (codeType == TaskTypeEnum.MODBUS_RTU && transportType == 'TCP') { | |
| 64 | 64 | isShowModBUS.value = true; | 
| 65 | 65 | modBUSForm.value = { | 
| 66 | 66 | crc: 'CRC_16_LOWER', | ... | ... | 
| ... | ... | @@ -183,8 +183,8 @@ export const formSchemas: FormSchema[] = [ | 
| 183 | 183 | value: TaskTypeEnum.CUSTOM, | 
| 184 | 184 | }, | 
| 185 | 185 | { | 
| 186 | - label: TaskTypeNameEnum.MODBUS, | |
| 187 | - value: TaskTypeEnum.MODBUS, | |
| 186 | + label: TaskTypeNameEnum.MODBUS_RTU, | |
| 187 | + value: TaskTypeEnum.MODBUS_RTU, | |
| 188 | 188 | disabled: transportType ? transportType && transportType !== PushWayEnum.TCP : true, | 
| 189 | 189 | }, | 
| 190 | 190 | ], | 
| ... | ... | @@ -240,7 +240,7 @@ export const formSchemas: FormSchema[] = [ | 
| 240 | 240 | label: 'ModbusRTU轮询', | 
| 241 | 241 | rules: [{ required: true, message: '请输入Modbus RTU 轮询指令' }], | 
| 242 | 242 | ifShow: ({ model }) => | 
| 243 | - model[FormFieldsEnum.EXECUTE_CONTENT_TYPE] === TaskTypeEnum.MODBUS && | |
| 243 | + model[FormFieldsEnum.EXECUTE_CONTENT_TYPE] === TaskTypeEnum.MODBUS_RTU && | |
| 244 | 244 | model[FormFieldsEnum.PUSH_WAY] === PushWayEnum.TCP, | 
| 245 | 245 | valueField: 'value', | 
| 246 | 246 | changeEvent: 'update:value', | ... | ... | 
| ... | ... | @@ -27,11 +27,11 @@ export enum TaskTargetNameEnum { | 
| 27 | 27 | |
| 28 | 28 | export enum TaskTypeEnum { | 
| 29 | 29 | CUSTOM = 'CUSTOM', | 
| 30 | - MODBUS = 'MODBUS_RTU', | |
| 30 | + MODBUS_RTU = 'MODBUS_RTU', | |
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | 33 | export enum TaskTypeNameEnum { | 
| 34 | - MODBUS = 'MODBUS_RTU轮询', | |
| 34 | + MODBUS_RTU = 'MODBUS_RTU轮询', | |
| 35 | 35 | CUSTOM = '自定义数据下发', | 
| 36 | 36 | } | 
| 37 | 37 | ... | ... |