Commit 70b63efbd8dd54ecfc81b7e0dacd4adb2d34826d

Authored by xp.Huang
2 parents 7f2df5aa ff45d141

Merge branch 'dev-fix-ww' into 'main_dev'

fix: 修复teambition BUG

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