songxy 1 рік тому
батько
коміт
b9d10aa7fa

+ 1 - 1
client_h5/src/App.vue

@@ -17,7 +17,7 @@ const initUserInfoHandler = async () => {
             }
             userStore.setUser(userInfo)
             localStorage.setItem("ACCESS_TOKEN", userIdResult?.data.accessToken)
-          localStorage.setItem("_userInfo", JSON.stringify(userInfo))
+            localStorage.setItem("_userInfo", JSON.stringify(userInfo))
             console.log(localStorage.getItem("ACCESS_TOKEN"))
         }
     }

+ 0 - 0
client_h5/src/pages/leave/index.scss


+ 32 - 0
client_h5/src/pages/leave/index.vue

@@ -0,0 +1,32 @@
+<script setup lang="ts">
+import { useRoute } from 'vue-router';
+import { FlowDTO, getNextActivity } from '@/service/flow';
+
+
+const route = useRoute();
+const { activityInstanceId, participantId } = route.query as {
+  activityInstanceId: string;
+  participantId: string;
+};
+const activityData: FlowDTO = {
+  activityInstanceId,
+  participantId,
+  flowOpinion: ''
+}
+const submitNextActivity = async () => {
+  const result = await getNextActivity(activityData)
+  // getNextActivity(activityData).then(result => {
+  //   console.log(result)
+  // }).catch((err) => {
+  //   console.error(err)
+  // })
+}
+</script>
+
+<template>
+  <div class="Leave_box"></div>
+</template>
+
+<style lang="scss" scoped>
+@import "./index.scss";
+</style>

+ 8 - 0
client_h5/src/router/routes.ts

@@ -13,6 +13,14 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import("@/pages/home/index.vue"),
       },
+      {
+        path: "leave",
+        name: "Leave",
+        meta: {
+          title: "请假",
+        },
+        component: () => import("@/pages/leave/index.vue"),
+      },
     ] as RouteRecordRaw[],
   },
 ] as RouteRecordRaw[];

+ 14 - 0
client_h5/src/service/flow.ts

@@ -0,0 +1,14 @@
+import reqest from "@/utils/request";
+
+export interface FlowDTO {
+    activityInstanceId: string
+    participantId: string
+    flowOpinion: string
+}
+
+/**
+ * 获取下一步活动
+ * **/
+export const getNextActivity = async (data: FlowDTO) => {
+  return await reqest.post(`/workflow/Transfer/getNextActivity`, data);
+}

+ 0 - 16
client_h5/src/utils/flow.ts

@@ -1,16 +0,0 @@
-import reqest from "@/utils/request";
-
-export interface FlowVO {
-    activityInstanceId: string
-    participantId: string
-    flowOpinion: string
-}
-
-/**
- * 获取下一步活动
- * **/
-export const getNextActivity = (data: FlowVO) => {
-     reqest.post(`/workflow/Transfer/getNextActivity`, data).then{
-        
-     }
-}