|
@@ -259,16 +259,22 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 分配轨迹点到对应的裁切图
|
|
|
- const allTracks = [
|
|
|
- ...(this.taskDetail.trackList || []).map((t) => ({
|
|
|
- ...t,
|
|
|
- type: "normal",
|
|
|
- })),
|
|
|
- ...(this.taskDetail.headerTrackList || []).map((t) => ({
|
|
|
- ...t,
|
|
|
- type: "header",
|
|
|
- })),
|
|
|
- ];
|
|
|
+ const allTracks = [];
|
|
|
+ if (this.taskDetail.headerTrackList?.length) {
|
|
|
+ allTracks.push(
|
|
|
+ ...this.taskDetail.headerTrackList.map((t) => ({
|
|
|
+ ...t,
|
|
|
+ type: "header",
|
|
|
+ }))
|
|
|
+ );
|
|
|
+ } else if (this.taskDetail.trackList?.length) {
|
|
|
+ allTracks.push(
|
|
|
+ ...this.taskDetail.trackList.map((t) => ({
|
|
|
+ ...t,
|
|
|
+ type: "normal",
|
|
|
+ }))
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
for (const track of allTracks) {
|
|
|
const targetCropIndex = crops.findIndex(
|