Procházet zdrojové kódy

feat: 去除测试

bill před 1 rokem
rodič
revize
c6dacb275a
2 změnil soubory, kde provedl 10 přidání a 9 odebrání
  1. 2 2
      src/view/login.vue
  2. 8 7
      src/view/map/map-right.vue

+ 2 - 2
src/view/login.vue

@@ -62,8 +62,8 @@ const PHONE = {
 const flag = ref(true);
 // 表单
 const form = reactive({
-  phone: "15915816041",
-  psw: "4DAge123456",
+  phone: import.meta.env.DEV ? "15915816041" : "",
+  psw: import.meta.env.DEV ? "4DAge123456" : "",
 });
 const verification = reactive({ phone: "", psw: "" });
 // 验证

+ 8 - 7
src/view/map/map-right.vue

@@ -167,19 +167,20 @@ const exportFile = async () => {
     .map((option: any) => option.raw);
   if (!points.length) {
     ElMessage.error("请选择要导出的点位");
+    return;
   }
   points = points.filter((point) => !!point.pos);
 
   if (points.length === 0) {
     ElMessage.error("当前选择点位没有gis信息");
-  } else {
-    await downloadPointsXLSL(
-      points.map((point) => point.pos),
-      points.map((point) => ({ title: point.name, desc: point.name })),
-      "test"
-    );
-    ElMessage.success("文件导出成功");
+    return;
   }
+  await downloadPointsXLSL(
+    points.map((point) => point.pos),
+    points.map((point) => ({ title: point.name, desc: point.name })),
+    "test"
+  );
+  ElMessage.success("文件导出成功");
 };
 </script>