Parcourir la source

工时填报 工时审批 返回首页

XuZinan il y a 2 ans
Parent
commit
5ccda88ab1
3 fichiers modifiés avec 43 ajouts et 3 suppressions
  1. 28 2
      pages.json
  2. 9 1
      pages/WorkingHours/audit.vue
  3. 6 0
      pages/WorkingHours/index.vue

+ 28 - 2
pages.json

@@ -4,7 +4,20 @@
       "path": "pages/index/index"
     },
     {
-      "path": "pages/WorkingHours/index"
+      "path": "pages/WorkingHours/index",
+      "style": {
+        "app-plus": {
+          "titleNView": {
+            "buttons": [
+              {
+                "text": "返回首页",
+                "fontSize": "16px",
+                "width": "80px"
+              }
+            ]
+          }
+        }
+      }
     },
     {
       "path": "pages/login/login",
@@ -16,7 +29,20 @@
       "path": "pages/WorkingHours/add"
     },
     {
-      "path": "pages/WorkingHours/audit"
+      "path": "pages/WorkingHours/audit",
+      "style": {
+        "app-plus": {
+          "titleNView": {
+            "buttons": [
+              {
+                "text": "返回首页",
+                "fontSize": "16px",
+                "width": "80px"
+              }
+            ]
+          }
+        }
+      }
     },
     {
       "path": "pages/Project/list",

+ 9 - 1
pages/WorkingHours/audit.vue

@@ -14,7 +14,10 @@
       >
         <view class="content">
           <template v-for="(item, index) in collapse.children">
-            <uni-card :key="index" :title="allType[item.type_id] && allType[item.type_id].name">
+            <uni-card
+              :key="index"
+              :title="allType[item.type_id] && allType[item.type_id].name"
+            >
               <view class="uni-body">
                 <view class="detail-item">
                   <view class="detail-label">提交人</view>
@@ -162,6 +165,11 @@ export default {
       return allList;
     },
   },
+  onNavigationBarButtonTap() {
+    uni.reLaunch({
+      url: "/pages/index/index",
+    });
+  },
   methods: {
     async init() {
       await this.$store.dispatch("getType");

+ 6 - 0
pages/WorkingHours/index.vue

@@ -177,6 +177,11 @@ export default {
       }));
     },
   },
+  onNavigationBarButtonTap() {
+    uni.reLaunch({
+      url: "/pages/index/index",
+    });
+  },
   methods: {
     async init() {
       await this.$store.dispatch("getType");
@@ -248,6 +253,7 @@ export default {
         {
           type_id: Number(item.type_id),
           comment: "",
+          parent_type_id: this.allType[item.type_id].parent_id,
           data: [
             {
               id: item.id,