Mr. Robot 3 months ago
parent
commit
5aef95e563

+ 2 - 1
src/views/MaintenanceStrategyAssistance/his.vue

@@ -194,7 +194,8 @@ const toRpc=async (row:any)=>{
     query:{
       id:row.id,
       name:row.name,
-      source:routeType.value=='auto'?3:1
+      source:routeType.value=='auto'?3:1,
+      pageId: queryParams.value.id
     }
   })
 }

+ 12 - 3
src/views/OperationalReliabilityPrediction/index.vue

@@ -168,7 +168,7 @@ import LineChart from "@/components/LineChart/index.vue";
 import empty from "@/components/Empty/index.vue";
 import { downloadStrategy } from "@/api/index";
 import { downloadFile } from "@/utils/utils";
-import { evaluateHealthStatus } from "@/api/index";
+import { evaluateHealthStatus, devicesAndCategories } from "@/api/index";
 
 const { proxy } = getCurrentInstance()!;
 const router = useRouter();
@@ -194,9 +194,18 @@ const getAllDomElements = async () => {
   //   debugger
   //  })
 };
-const goAdvice = (name: string) => {
+const goAdvice = async (name: string) => {
   if (route.query.source == 3) {
-    router.back();
+    const idArr = route.query.pageId.split(",");
+    const dc = await devicesAndCategories({});
+    const devices = dc.data.devices;
+    const newOrder = devices.findIndex((item) => item == name);
+    idArr[2] = newOrder;
+    router.push({
+      id: idArr.join('|'),
+      path: "/repair/MaintenanceStrategyAssistanceViewHis",
+      type: 'auto',
+    });
   } else {
     router.push({
       path: "/repair/MaintenanceStrategyAssistanceViewHis",