Zimo 6 өдөр өмнө
parent
commit
c55ce3e4ae
1 өөрчлөгдсөн 27 нэмэгдсэн , 19 устгасан
  1. 27 19
      utils/navigate.js

+ 27 - 19
utils/navigate.js

@@ -1,19 +1,19 @@
-import { getInspectOrderGet } from '@/api/inspection';
-import { getRepairDetail } from '@/api/repair';
+import { getInspectOrderGet } from "@/api/inspection";
+import { getRepairDetail } from "@/api/repair";
 
 /**
  * 根据不同类型的消息跳转目标页面
  * @param data
  */
 export const messageNavigate = async data => {
-  console.log('data :>> ', data);
+  console.log("data :>> ", data);
   if (!data.userId) {
-    data.userId = '';
+    data.userId = "";
   }
-  if (data.type === 'generateInspect') {
+  if (data.type === "generateInspect") {
     // 巡检工单填写页面
     const detail = (await getInspectOrderGet({ id: data.id })).data;
-    if (detail.status === 'finished') {
+    if (detail.status === "finished") {
       uni.navigateTo({
         url: `/pages/inspection/detail?id=${data.id}&reloginUserId=${data.userId}`,
       });
@@ -22,15 +22,15 @@ export const messageNavigate = async data => {
         url: `/pages/inspection/edit?id=${data.id}&reloginUserId=${data.userId}`,
       });
     }
-  } else if (data.type === 'failureReport') {
+  } else if (data.type === "failureReport") {
     // 故障上报审批页面
     uni.navigateTo({
       url: `/pages/message/detail/index?processInstanceId=${data.id}&reloginUserId=${data.userId}`,
     });
-  } else if (data.type === 'generateMaintain') {
+  } else if (data.type === "generateMaintain") {
     // 维修工单填写页面
     const detail = (await getRepairDetail({ id: data.id })).data;
-    if (detail.status !== 'tx') {
+    if (detail.status !== "tx") {
       uni.navigateTo({
         url: `/pages/repair/detail?id=${data.id}&reloginUserId=${data.userId}`,
       });
@@ -39,17 +39,17 @@ export const messageNavigate = async data => {
         url: `/pages/repair/edit?id=${data.id}&reloginUserId=${data.userId}`,
       });
     }
-  } else if (data.type === 'maintainOut') {
+  } else if (data.type === "maintainOut") {
     // 维修工单委外流程审批页面
     uni.navigateTo({
       url: `/pages/message/detail/index?processInstanceId=${data.id}&reloginUserId=${data.userId}`,
     });
-  } else if (data.type === 'generateMaintenance') {
+  } else if (data.type === "generateMaintenance") {
     // 保养工单填写页面
     uni.navigateTo({
       url: `/pages/maintenance/edit?id=${data.id}&reloginUserId=${data.userId}`,
     });
-  } else if (data.type === 'generateOperation') {
+  } else if (data.type === "generateOperation") {
     // 运行记录填写页面
     const json = JSON.stringify({
       deptId: data.deptId,
@@ -66,31 +66,39 @@ export const messageNavigate = async data => {
         data.userId
       }`,
     });
-  } else if (data.type === 'rdReportApproval') {
+  } else if (data.type === "rdDailyReport") {
+    uni.navigateTo({
+      url: `/pages/ruiDu/edit?id=${data.businessId}&istime=${false}`,
+    });
+  } else if (data.type === "rdReportApproval") {
     uni.navigateTo({
       url: `/pages/ruiDu/approval?id=${data.businessId}`,
     });
-  } else if (data.type === 'rhDailyReport') {
+  } else if (data.type === "rdReportDetail") {
+    uni.navigateTo({
+      url: `/pages/ruiDu/detail?id=${data.businessId}`,
+    });
+  } else if (data.type === "rhDailyReport") {
     uni.navigateTo({
       url: `/pages/ruihen/edit?id=${data.businessId}`,
     });
-  } else if (data.type === 'rhReportApproval') {
+  } else if (data.type === "rhReportApproval") {
     uni.navigateTo({
       url: `/pages/ruihen/approval?id=${data.businessId}`,
     });
-  } else if (data.type === 'ryDailyReport') {
+  } else if (data.type === "ryDailyReport") {
     uni.navigateTo({
       url: `/pages/ruiying/edit?id=${data.businessId}`,
     });
-  } else if (data.type === 'ryReportApproval') {
+  } else if (data.type === "ryReportApproval") {
     uni.navigateTo({
       url: `/pages/ruiying/approval?id=${data.businessId}`,
     });
-  } else if (data.type === 'ryXjDailyReport') {
+  } else if (data.type === "ryXjDailyReport") {
     uni.navigateTo({
       url: `/pages/ruiyingx/edit?id=${data.businessId}`,
     });
-  } else if (data.type === 'ryXjReportApproval') {
+  } else if (data.type === "ryXjReportApproval") {
     uni.navigateTo({
       url: `/pages/ruiyingx/approval?id=${data.businessId}`,
     });