Commit 70b63efbd8dd54ecfc81b7e0dacd4adb2d34826d
Merge branch 'dev-fix-ww' into 'main_dev'
fix: 修复teambition BUG See merge request yunteng/thingskit-front!563
Showing
4 changed files
with
9 additions
and
7 deletions
@@ -133,7 +133,6 @@ | @@ -133,7 +133,6 @@ | ||
133 | } = props.schema; | 133 | } = props.schema; |
134 | 134 | ||
135 | if (isFunction(dynamicRules)) { | 135 | if (isFunction(dynamicRules)) { |
136 | - console.log(dynamicRules(unref(getValues))); | ||
137 | return dynamicRules(unref(getValues)) as ValidationRule[]; | 136 | return dynamicRules(unref(getValues)) as ValidationRule[]; |
138 | } | 137 | } |
139 | 138 |
@@ -140,9 +140,10 @@ | @@ -140,9 +140,10 @@ | ||
140 | confirmLoading: true, | 140 | confirmLoading: true, |
141 | }); | 141 | }); |
142 | if (unref(isUpdate)) { | 142 | if (unref(isUpdate)) { |
143 | + const stepRecord = unref(stepState); | ||
143 | const editData = { | 144 | const editData = { |
144 | - sn: 'XXXX', | ||
145 | - ...unref(stepState), | 145 | + ...stepRecord, |
146 | + sn: stepRecord.name, | ||
146 | customerId: currentDeviceData.customerId, | 147 | customerId: currentDeviceData.customerId, |
147 | deviceInfo: { | 148 | deviceInfo: { |
148 | avatar: DeviceStep1Ref.value?.devicePic, | 149 | avatar: DeviceStep1Ref.value?.devicePic, |
@@ -151,9 +152,10 @@ | @@ -151,9 +152,10 @@ | ||
151 | }; | 152 | }; |
152 | await createOrEditDevice(editData); | 153 | await createOrEditDevice(editData); |
153 | } else { | 154 | } else { |
155 | + const stepRecord = unref(stepState); | ||
154 | const createData = { | 156 | const createData = { |
155 | - sn: 'XXXX', | ||
156 | - ...unref(stepState), | 157 | + ...stepRecord, |
158 | + sn: stepRecord.name, | ||
157 | deviceInfo: { | 159 | deviceInfo: { |
158 | avatar: DeviceStep1Ref.value?.devicePic, | 160 | avatar: DeviceStep1Ref.value?.devicePic, |
159 | ...DeviceStep1Ref.value?.positionState, | 161 | ...DeviceStep1Ref.value?.positionState, |
@@ -305,6 +305,7 @@ | @@ -305,6 +305,7 @@ | ||
305 | const markerList: MarkerList[] = []; | 305 | const markerList: MarkerList[] = []; |
306 | data.forEach((item) => { | 306 | data.forEach((item) => { |
307 | const { | 307 | const { |
308 | + alias, | ||
308 | name, | 309 | name, |
309 | deviceState, | 310 | deviceState, |
310 | deviceInfo: { longitude, latitude }, | 311 | deviceInfo: { longitude, latitude }, |
@@ -313,7 +314,7 @@ | @@ -313,7 +314,7 @@ | ||
313 | const rivet = deviceState === 'INACTIVE' ? djx : deviceState === 'ONLINE' ? zx : lx; | 314 | const rivet = deviceState === 'INACTIVE' ? djx : deviceState === 'ONLINE' ? zx : lx; |
314 | const myIcon = new BMap.Icon(rivet, new BMap.Size(20, 30)); | 315 | const myIcon = new BMap.Icon(rivet, new BMap.Size(20, 30)); |
315 | const marker = new BMap.Marker(point, { icon: myIcon }); | 316 | const marker = new BMap.Marker(point, { icon: myIcon }); |
316 | - const label = new BMap.Label(name, { | 317 | + const label = new BMap.Label(alias || name, { |
317 | position: point, | 318 | position: point, |
318 | offset: new BMap.Size(-15, -45), | 319 | offset: new BMap.Size(-15, -45), |
319 | }); | 320 | }); |
@@ -148,7 +148,7 @@ export const parseData = (result: TaskRecordType): Required<FormValueType> => { | @@ -148,7 +148,7 @@ export const parseData = (result: TaskRecordType): Required<FormValueType> => { | ||
148 | period, | 148 | period, |
149 | periodType: executeTimeType === ExecuteTimeTypeEnum.CUSTOM ? periodType : null, | 149 | periodType: executeTimeType === ExecuteTimeTypeEnum.CUSTOM ? periodType : null, |
150 | time: executeTimeType === ExecuteTimeTypeEnum.CUSTOM ? time : null, | 150 | time: executeTimeType === ExecuteTimeTypeEnum.CUSTOM ? time : null, |
151 | - interval: executeTimeType === ExecuteTimeTypeEnum.POLL ? time : null, | 151 | + interval: executeTimeType === ExecuteTimeTypeEnum.POLL ? Number(time) : null, |
152 | pollUnit: executeTimeType === ExecuteTimeTypeEnum.POLL ? pollUnit : TimeUnitEnum.SECOND, | 152 | pollUnit: executeTimeType === ExecuteTimeTypeEnum.POLL ? pollUnit : TimeUnitEnum.SECOND, |
153 | }; | 153 | }; |
154 | }; | 154 | }; |