yanghao 2 napja
szülő
commit
098fcb822c
1 módosított fájl, 84 hozzáadás és 36 törlés
  1. 84 36
      src/views/flow/index.vue

+ 84 - 36
src/views/flow/index.vue

@@ -548,47 +548,95 @@ const go = async (item) => {
 
 const handleDetailClick = (task, categoryTitle) => {
   console.log(`点击了 ${categoryTitle} 中的 ${task.name}: ${task.value}`);
-  // 示例:根据类型跳转
-  if (task.name === "OA" && categoryTitle === "我的待办") {
-    router.push({
-      path: "/todo-list",
-      query: { type: task.name.toLowerCase() },
-    });
-  }
+  let ua2 = navigator.userAgent.toLowerCase();
+  let isMobile = ua2.indexOf("dingtalk") > -1;
+
+  if (isMobile) {
+    // 示例:根据类型跳转
+    if (task.name === "OA" && categoryTitle === "我的待办") {
+      router.push({
+        path: "/mobile-todo-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
 
-  if (task.name === "OA" && categoryTitle === "已办事项") {
-    router.push({
-      path: "/oa-done-list",
-      query: { type: task.name.toLowerCase() },
-    });
-  }
+    if (task.name === "OA" && categoryTitle === "已办事项") {
+      router.push({
+        path: "/oa-done-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
 
-  if (task.name === "CRM" && categoryTitle === "我的待办") {
-    router.push({
-      path: "/crm-todo-list",
-      query: { type: task.name.toLowerCase() },
-    });
-  }
+    if (task.name === "CRM" && categoryTitle === "我的待办") {
+      router.push({
+        path: "/mobile-crm-todo-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
 
-  if (task.name === "CRM" && categoryTitle === "已办事项") {
-    router.push({
-      path: "/crm-done-list",
-      query: { type: task.name.toLowerCase() },
-    });
-  }
+    if (task.name === "CRM" && categoryTitle === "已办事项") {
+      router.push({
+        path: "/crm-done-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
 
-  if (task.name === "SRM" && categoryTitle === "我的待办") {
-    router.push({
-      path: "/srm-todo-list",
-      query: { type: task.name.toLowerCase() },
-    });
-  }
+    if (task.name === "SRM" && categoryTitle === "我的待办") {
+      router.push({
+        path: "/mobile-srm-todo-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
 
-  if (task.name === "SRM" && categoryTitle === "已办事项") {
-    router.push({
-      path: "/srm-done-list",
-      query: { type: task.name.toLowerCase() },
-    });
+    if (task.name === "SRM" && categoryTitle === "已办事项") {
+      router.push({
+        path: "/srm-done-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
+  } else {
+    // 示例:根据类型跳转
+    if (task.name === "OA" && categoryTitle === "我的待办") {
+      router.push({
+        path: "/todo-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
+
+    if (task.name === "OA" && categoryTitle === "已办事项") {
+      router.push({
+        path: "/oa-done-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
+
+    if (task.name === "CRM" && categoryTitle === "我的待办") {
+      router.push({
+        path: "/crm-todo-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
+
+    if (task.name === "CRM" && categoryTitle === "已办事项") {
+      router.push({
+        path: "/crm-done-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
+
+    if (task.name === "SRM" && categoryTitle === "我的待办") {
+      router.push({
+        path: "/srm-todo-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
+
+    if (task.name === "SRM" && categoryTitle === "已办事项") {
+      router.push({
+        path: "/srm-done-list",
+        query: { type: task.name.toLowerCase() },
+      });
+    }
   }
 };