wzh преди 3 години
родител
ревизия
2c5bd79327

+ 4 - 1
src/main.js

@@ -34,7 +34,10 @@ router.beforeEach(async (to, from, next) => {
         next(path);
       } else if (to.path == "/login" || to.path == "/") {
         next(path);
-      } else if (rolePermission?.indexOf(to.meta.code) == -1) {
+      } else if (
+        rolePermission?.indexOf(to.meta.code) == -1 ||
+        to.meta.code == "DEFAULT"
+      ) {
         next(path);
       } else {
         next();

+ 27 - 0
src/router/index.js

@@ -117,6 +117,15 @@ const router = createRouter({
       },
       component: () => import("../views/voyage/dailyList.vue"),
     },
+    {
+      path: "/voyage/dailyDetail",
+      name: "dailyDetail",
+      meta: {
+        title: "日报列表",
+        code: "DAYREPORTDETAIL",
+      },
+      component: () => import("../views/voyage/dailyDetail.vue"),
+    },
     {
       path: "/voyage/billList",
       name: "billList",
@@ -126,6 +135,15 @@ const router = createRouter({
       },
       component: () => import("../views/voyage/billList.vue"),
     },
+    {
+      path: "/voyage/billDetail",
+      name: "billDetail",
+      meta: {
+        title: "单据列表",
+        code: "BILLDETAIL",
+      },
+      component: () => import("../views/voyage/billDetail.vue"),
+    },
     {
       path: "/voyage/portDeclarationList",
       name: "portDeclarationList",
@@ -135,6 +153,15 @@ const router = createRouter({
       },
       component: () => import("../views/voyage/portDeclarationList.vue"),
     },
+    {
+      path: "/voyage/portDeclarationDetail",
+      name: "portDeclarationDetail",
+      meta: {
+        title: "报岗",
+        code: "DEFAULT",
+      },
+      component: () => import("../views/voyage/portDeclarationDetail.vue"),
+    },
   ],
 });
 

+ 14 - 0
src/views/voyage/billDetail.vue

@@ -0,0 +1,14 @@
+<template>
+  <div class="full-container-p24">单据详情</div>
+</template>
+<script setup>
+import { ref, h, reactive, toRefs, onMounted } from "vue";
+import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
+import store from "../../store";
+import router from "../../router";
+import md5 from "md5";
+import api from "../../apis/fetch";
+onMounted(() => {});
+</script>
+<style scoped>
+</style>

+ 4 - 4
src/views/voyage/billList.vue

@@ -64,7 +64,7 @@
         <el-table-column label="操作" min-width="80" align="center">
           <template v-slot="scope">
             <el-button
-              @click="shipOwnerDetail(scope.row.userId, tableData)"
+              @click="billDetail(scope.row.id)"
               type="text"
               size="small"
             >
@@ -112,11 +112,11 @@ async function getBillList(page) {
   }
 }
 
-async function shipOwnerDetail(userId) {
+async function billDetail(id) {
   router.push({
-    path: "/shipOwnerManage/shipOwnerDetail",
+    path: "/voyage/billDetail",
     query: {
-      userId,
+      id,
     },
   });
 }

+ 14 - 0
src/views/voyage/dailyDetail.vue

@@ -0,0 +1,14 @@
+<template>
+  <div class="full-container-p24">日报详情</div>
+</template>
+<script setup>
+import { ref, h, reactive, toRefs, onMounted } from "vue";
+import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
+import store from "../../store";
+import router from "../../router";
+import md5 from "md5";
+import api from "../../apis/fetch";
+onMounted(() => {});
+</script>
+<style scoped>
+</style>

+ 4 - 4
src/views/voyage/dailyList.vue

@@ -68,7 +68,7 @@
         <el-table-column label="操作" min-width="80" align="center">
           <template v-slot="scope">
             <el-button
-              @click="shipOwnerDetail(scope.row.userId, tableData)"
+              @click="dailyDetail(scope.row.id)"
               type="text"
               size="small"
             >
@@ -117,11 +117,11 @@ async function getDailyList(page) {
   }
 }
 
-async function shipOwnerDetail(userId) {
+async function dailyDetail(id) {
   router.push({
-    path: "/shipOwnerManage/shipOwnerDetail",
+    path: "/voyage/dailyDetail",
     query: {
-      userId,
+      id,
     },
   });
 }

+ 14 - 0
src/views/voyage/portDeclarationDetail.vue

@@ -0,0 +1,14 @@
+<template>
+  <div class="full-container-p24">报港详情</div>
+</template>
+<script setup>
+import { ref, h, reactive, toRefs, onMounted } from "vue";
+import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
+import store from "../../store";
+import router from "../../router";
+import md5 from "md5";
+import api from "../../apis/fetch";
+onMounted(() => {});
+</script>
+<style scoped>
+</style>

+ 4 - 4
src/views/voyage/portDeclarationList.vue

@@ -64,7 +64,7 @@
         <el-table-column label="操作" min-width="80" align="center">
           <template v-slot="scope">
             <el-button
-              @click="shipOwnerDetail(scope.row.userId, tableData)"
+              @click="portDeclarationDetail(scope.row.id)"
               type="text"
               size="small"
             >
@@ -113,11 +113,11 @@ async function getReportList(page) {
   }
 }
 
-async function shipOwnerDetail(userId) {
+async function portDeclarationDetail(id) {
   router.push({
-    path: "/shipOwnerManage/shipOwnerDetail",
+    path: "/voyage/portDeclarationDetail",
     query: {
-      userId,
+      id,
     },
   });
 }