Zimo 15 timmar sedan
förälder
incheckning
7cb288ee97

+ 14 - 8
src/layout/components/Message/src/Message.vue

@@ -64,13 +64,18 @@ const routerDetail = (item) => {
     })
   } else if (item.businessType === 'rdDailyReport') {
     push({
-      name: 'FillDailyReportForm',
-      params: { id: id, mode: 'fill' }
+      path: '/iotdayilyreport/FillDailyReport',
+      query: { id: id, mode: 'edit' }
     })
   } else if (item.businessType === 'rdReportApproval') {
     push({
-      name: 'FillDailyReportForm',
-      params: { id: id, mode: 'approval' }
+      path: '/iotdayilyreport/IotRdDailyReport',
+      query: { id: id, mode: 'approval' }
+    })
+  } else if (item.businessType === 'rdReportDetail') {
+    push({
+      path: '/iotdayilyreport/IotRdDailyReport',
+      query: { id: id, mode: 'detail' }
     })
   } else if (item.businessType === 'generateOperation') {
     const param = item.templateParams
@@ -176,10 +181,10 @@ onMounted(() => {
 
   .message-item {
     display: flex;
-    align-items: center;
     padding: 20px 0;
-    border-bottom: 1px solid var(--el-border-color-light);
     cursor: pointer;
+    border-bottom: 1px solid var(--el-border-color-light);
+    align-items: center;
 
     &:last-child {
       border: none;
@@ -205,10 +210,11 @@ onMounted(() => {
       }
     }
   }
+
   .message-item:hover {
-    transform: scale(0.95);
     background-color: #dcf8e4;
-    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
+    transform: scale(0.95);
+    box-shadow: 0 2px 5px rgb(0 0 0 / 20%);
   }
 }
 </style>

+ 17 - 4
src/views/pms/dingding.vue

@@ -50,6 +50,8 @@ const businessRoutes: Record<string, string> = {
   generateOperation: '',
   generateMaintenance: '',
   generateMaintain: '',
+  rdDailyReport: 'rdDailyReport',
+  rdReportDetail: 'rdReportDetail',
   rdReportApproval: 'rdReportApproval',
   rhDailyReport: 'rhDailyReport',
   rhReportApproval: 'rhReportApproval',
@@ -103,6 +105,12 @@ onMounted(async () => {
     } else if (type === 'rdReportApproval') {
       window.location.href =
         import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiDu/approval?id=' + id
+    } else if (type === 'rdReportDetail') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiDu/detail?id=' + id
+    } else if (type === 'rdDailyReport') {
+      window.location.href =
+        import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruiDu/edit?id=' + id + '&istime=false'
     } else if (type === 'rhDailyReport') {
       window.location.href = import.meta.env.VITE_BASE_URL + '/deepoil/#/pages/ruihen/edit?id=' + id
     } else if (type === 'rhReportApproval') {
@@ -183,13 +191,18 @@ onMounted(async () => {
       })
     } else if (type === 'rdDailyReport') {
       push({
-        name: 'FillDailyReportForm',
-        params: { id: id, mode: 'fill' }
+        path: '/iotdayilyreport/FillDailyReport',
+        query: { id: id, mode: 'edit' }
       })
     } else if (type === 'rdReportApproval') {
       push({
-        name: 'DailyReportApprovalForm',
-        params: { id }
+        path: '/iotdayilyreport/IotRdDailyReport',
+        query: { id: id, mode: 'approval' }
+      })
+    } else if (type === 'rdReportDetail') {
+      push({
+        path: '/iotdayilyreport/IotRdDailyReport',
+        query: { id: id, mode: 'detail' }
       })
     } else if (type === 'rhDailyReport') {
       push({ path: '/iotdayilyreport/IotRhDailyReport/fill', query: { id: id } })

+ 11 - 0
src/views/pms/iotrddailyreport/fillDailyReport.vue

@@ -131,6 +131,17 @@ function handleOpenForm(id: number, type: 'edit' | 'detail' | 'approval' | 'time
   }
 }
 
+const route = useRoute()
+
+onMounted(() => {
+  if (route.query.mode) {
+    handleOpenForm(
+      Number(route.query.id),
+      route.query.mode as 'edit' | 'detail' | 'approval' | 'time'
+    )
+  }
+})
+
 const { ZmTable, ZmTableColumn } = useTableComponents<ListItem>()
 
 function formCreateTime(row: ListItem) {

+ 9 - 0
src/views/pms/iotrddailyreport/index.vue

@@ -203,6 +203,15 @@ function handleOpenForm(id: number, type: 'edit' | 'detail' | 'approval' | 'time
     formRef.value.handleOpenForm(id, type)
   }
 }
+
+onMounted(() => {
+  if (route.query.mode) {
+    handleOpenForm(
+      Number(route.query.id),
+      route.query.mode as 'edit' | 'detail' | 'approval' | 'time'
+    )
+  }
+})
 </script>
 
 <template>