Commit 35d74a71d4b2d5e42e13c40c4555b71adc5f2f55
Merge branch 'ww' into 'main'
fix: BUG in teambition See merge request huang/yun-teng-iot-front!428
Showing
3 changed files
with
18 additions
and
10 deletions
... | ... | @@ -68,6 +68,7 @@ |
68 | 68 | ts: lng.ts, |
69 | 69 | }; |
70 | 70 | if (unref(trackList).length && isEqual(unref(trackList).at(-1), record)) return; |
71 | + marketPoint({ lat: lat.value, lng: lng.value }); | |
71 | 72 | trackList.value.push(record); |
72 | 73 | |
73 | 74 | randomAnimation(unref(trackList)); |
... | ... | @@ -75,13 +76,13 @@ |
75 | 76 | } |
76 | 77 | }); |
77 | 78 | |
78 | - // function marketPoint(params: Record<'lng' | 'lat', number>) { | |
79 | - // const { lng, lat } = params; | |
80 | - // const BMap = (window as any).BMapGL; | |
81 | - // const marker = new BMap.Marker(new BMap.Point(lng, lat)); | |
82 | - // unref(mapInstance)?.centerAndZoom(new BMap.Point(lng, lat)); | |
83 | - // unref(mapInstance)?.addOverlay(marker); | |
84 | - // } | |
79 | + function marketPoint(params: Record<'lng' | 'lat', number>) { | |
80 | + const { lng, lat } = params; | |
81 | + const BMap = (window as any).BMapGL; | |
82 | + const marker = new BMap.Marker(new BMap.Point(lng, lat)); | |
83 | + unref(mapInstance)?.centerAndZoom(new BMap.Point(lng, lat)); | |
84 | + unref(mapInstance)?.addOverlay(marker); | |
85 | + } | |
85 | 86 | |
86 | 87 | const prepare = ref(false); |
87 | 88 | async function initMap() { |
... | ... | @@ -141,15 +142,21 @@ |
141 | 142 | const pl = new BMapGL.Polyline(point); |
142 | 143 | const BMapGLLib = (window as any).BMapGLLib; |
143 | 144 | |
145 | + marketPoint({ lat: path.at(0)?.lat, lng: path.at(0)?.lng }); | |
144 | 146 | const dynamicPlayMethod = { |
145 | 147 | [startMethodName]() { |
148 | + const duration = 5000; | |
149 | + const delay = 300; | |
146 | 150 | trackAni.value = new BMapGLLib.TrackAnimation(unref(mapInstance), pl, { |
147 | 151 | overallView: true, |
148 | 152 | tilt: 30, |
149 | - duration: 5000, | |
150 | - delay: 300, | |
153 | + duration, | |
154 | + delay, | |
151 | 155 | }); |
152 | 156 | trackAni.value!.start(); |
157 | + setTimeout(() => { | |
158 | + marketPoint({ lat: path.at(-1)?.lat, lng: path.at(-1)?.lng }); | |
159 | + }, duration + delay); | |
153 | 160 | }, |
154 | 161 | }; |
155 | 162 | ... | ... |
... | ... | @@ -14,6 +14,7 @@ export const formSchema: FormSchema[] = [ |
14 | 14 | rules: [{ required: true, message: '请输入看板名称' }], |
15 | 15 | componentProps: { |
16 | 16 | placeholder: '请输入看板名称', |
17 | + maxLength: 32, | |
17 | 18 | }, |
18 | 19 | }, |
19 | 20 | { |
... | ... | @@ -55,6 +56,7 @@ export const formSchema: FormSchema[] = [ |
55 | 56 | component: 'InputTextArea', |
56 | 57 | componentProps: { |
57 | 58 | placeholder: '请输入看板备注', |
59 | + maxLength: 255, | |
58 | 60 | }, |
59 | 61 | }, |
60 | 62 | ]; | ... | ... |