|
@@ -10,11 +10,16 @@ import {
|
|
|
downloadPointsXLSL2,
|
|
|
} from "@/util/pc4xlsl";
|
|
|
|
|
|
-export const exportFile = async (points: ScenePoint[], type: number) => {
|
|
|
+export const exportFile = async (
|
|
|
+ points: ScenePoint[],
|
|
|
+ type: number,
|
|
|
+ name: string = ""
|
|
|
+) => {
|
|
|
if (!points.length) {
|
|
|
ElMessage.error("请选择要导出的点位");
|
|
|
return;
|
|
|
}
|
|
|
+ name = name ? name + "-" : "";
|
|
|
points = points.filter((point) => !!point.pos);
|
|
|
|
|
|
if (points.length === 0) {
|
|
@@ -25,13 +30,13 @@ export const exportFile = async (points: ScenePoint[], type: number) => {
|
|
|
await downloadPointsXLSL1(
|
|
|
points.map((point) => point.pos),
|
|
|
points.map((point) => ({ title: point.name, desc: point.name })),
|
|
|
- "绘制矢量数据"
|
|
|
+ name + "绘制矢量数据"
|
|
|
);
|
|
|
} else if (type === 2) {
|
|
|
await downloadPointsXLSL2(
|
|
|
points.map((point) => point.pos),
|
|
|
points.map((point) => ({ title: point.name, desc: "无" })),
|
|
|
- "本体边界坐标"
|
|
|
+ name + "本体边界坐标"
|
|
|
);
|
|
|
} else {
|
|
|
await downloadPointsXLSL(
|