...
|
...
|
@@ -74,7 +74,7 @@ |
74
|
74
|
</div>
|
75
|
75
|
</template>
|
76
|
76
|
<script lang="ts">
|
77
|
|
- import { defineComponent, ref, nextTick, unref, reactive, watch } from 'vue';
|
|
77
|
+ import { defineComponent, ref, nextTick, unref, reactive } from 'vue';
|
78
|
78
|
import { BasicForm, useForm } from '/@/components/Form';
|
79
|
79
|
import { step1Schemas } from '../../config/data';
|
80
|
80
|
import { useScript } from '/@/hooks/web/useScript';
|
...
|
...
|
@@ -101,10 +101,6 @@ |
101
|
101
|
Col,
|
102
|
102
|
},
|
103
|
103
|
props: {
|
104
|
|
- deviceInfo: {
|
105
|
|
- type: Object,
|
106
|
|
- default: () => ({}),
|
107
|
|
- },
|
108
|
104
|
isUpdate: {
|
109
|
105
|
type: Boolean,
|
110
|
106
|
},
|
...
|
...
|
@@ -298,6 +294,11 @@ |
298
|
294
|
};
|
299
|
295
|
// 父组件调用更新字段值的方法
|
300
|
296
|
function parentSetFieldsValue(data) {
|
|
297
|
+ const { deviceInfo } = data;
|
|
298
|
+ positionState.longitude = deviceInfo.longitude;
|
|
299
|
+ positionState.latitude = deviceInfo.latitude;
|
|
300
|
+ positionState.address = deviceInfo.address;
|
|
301
|
+ devicePic.value = deviceInfo.avatar;
|
301
|
302
|
setFieldsValue(data);
|
302
|
303
|
}
|
303
|
304
|
// 父组件调用获取字段值的方法
|
...
|
...
|
@@ -330,17 +331,6 @@ |
330
|
331
|
},
|
331
|
332
|
});
|
332
|
333
|
}
|
333
|
|
-
|
334
|
|
- watch(
|
335
|
|
- () => props.deviceInfo,
|
336
|
|
- (newValue) => {
|
337
|
|
- positionState.longitude = newValue.longitude;
|
338
|
|
- positionState.latitude = newValue.latitude;
|
339
|
|
- positionState.address = newValue.address;
|
340
|
|
- devicePic.value = newValue.avatar;
|
341
|
|
- }
|
342
|
|
- );
|
343
|
|
-
|
344
|
334
|
return {
|
345
|
335
|
resetFields,
|
346
|
336
|
positionState,
|
...
|
...
|
@@ -370,36 +360,8 @@ |
370
|
360
|
});
|
371
|
361
|
</script>
|
372
|
362
|
<style lang="less" scoped>
|
373
|
|
- .step1 {
|
374
|
|
- &-form {
|
375
|
|
- width: 450px;
|
376
|
|
- margin: 0 auto;
|
377
|
|
- }
|
378
|
|
-
|
379
|
|
- h3 {
|
380
|
|
- margin: 0 0 12px;
|
381
|
|
- font-size: 16px;
|
382
|
|
- line-height: 32px;
|
383
|
|
- color: @text-color;
|
384
|
|
- }
|
385
|
|
-
|
386
|
|
- h4 {
|
387
|
|
- margin: 0 0 4px;
|
388
|
|
- font-size: 14px;
|
389
|
|
- line-height: 22px;
|
390
|
|
- color: @text-color;
|
391
|
|
- }
|
392
|
|
-
|
393
|
|
- p {
|
394
|
|
- color: @text-color;
|
395
|
|
- }
|
396
|
|
- }
|
397
|
|
-
|
398
|
|
- .pay-select {
|
399
|
|
- width: 20%;
|
400
|
|
- }
|
401
|
|
-
|
402
|
|
- .pay-input {
|
403
|
|
- width: 70%;
|
|
363
|
+ .step1-form {
|
|
364
|
+ width: 450px;
|
|
365
|
+ margin: 0 auto;
|
404
|
366
|
}
|
405
|
367
|
</style> |
...
|
...
|
|