zx 1 gadu atpakaļ
vecāks
revīzija
0b4cd87abe

+ 9 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/groupView/groupView.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <van-nav-bar title="班组成员" left-text="返回"  @click-left="back" fixed left-arrow/>
+    <van-nav-bar  title="班组成员" left-text="返回"  @click-left="back" fixed left-arrow/>
     <div style="margin-top: 44px;">
       <van-list  :finished="true" >
       <van-cell v-for="item in list" :key="item.id" :id="item.id" :title="item.name" @click="onClick"/>
@@ -48,6 +48,14 @@ export default {
       })
     },
     onClick(e){
+      console.log(item, '点击的数据')
+      this.$router.push({
+        path: '/MemberInfo',
+        query: {
+          id: e.currentTarget.id
+        }
+      })
+
       console.log(e)
       console.log(e.currentTarget.id)
       console.log(e.currentTarget.innerText)

+ 54 - 0
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/groupView/info.vue

@@ -0,0 +1,54 @@
+<template>
+    <div>
+        <van-nav-bar title="班组成员" left-text="返回" @click-left="back" fixed left-arrow />
+        <div style="margin-top: 44px;">
+            <van-list :finished="true">
+                <van-cell v-for="item in list" :key="item.id" :id="item.id" :title="item.name" />
+            </van-list>
+        </div>
+
+    </div>
+</template>
+<script>
+export default {
+    props: {},
+    components: {},
+    data() {
+        return {
+            id: null,
+            user:{},
+            list: []
+        };
+    },
+    computed: {},
+    watch: {},
+    created() { },
+    mounted() {
+        this.id = this.$route.query.id,
+        this.getMemberInfo();
+    },
+    methods: {
+         
+        back() {
+            this.$router.go(-1);
+        },
+        getMemberInfo() {
+            this.$axios.post('/user/getUserInfo', { userId : this.id})
+                .then(res => {
+                    if (res.code == "ok") {
+                        this.user = res.data
+
+                    } else {
+                        this.$toast.clear();
+                        this.$toast.fail(res.msg);
+                    }
+                }).catch(err => {
+                    this.$toast.clear();
+                })
+        }
+
+    },
+};
+</script>
+
+<style scoped></style>