xiaohaizhao 1 vuosi sitten
vanhempi
commit
e622365abc
2 muutettua tiedostoa jossa 101 lisäystä ja 2 poistoa
  1. 92 0
      team/team/modules/userList.vue
  2. 9 2
      team/team/modules/users.vue

+ 92 - 0
team/team/modules/userList.vue

@@ -0,0 +1,92 @@
+<template>
+    <view>
+        <view class="item" v-for="item in list" :key="item.userid" hover-class="navigator-hover" @click="itemClick(item)">
+            <u--image
+                :src="item.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
+                :width="tovw(44)" :height="tovw(44)" shape="circle">
+                <template v-slot:loading>
+                    <u-loading-icon color="red"></u-loading-icon>
+                </template>
+            </u--image>
+            <view class="content">
+                <view class="title u-line-1">
+                    {{ item.name }}
+                </view>
+                <view class="row u-line-1">
+                    {{ item.rolenames }}
+                </view>
+                <view class="row">
+                    <text class="iconfont icon-dianhua-hui" />
+                    {{ item.phonenumber }}
+                </view>
+                <view class="row u-line-1">
+                    <text class="iconfont icon-morenmendian" />
+                    {{ item.storenames || '--' }}
+                </view>
+                <view class="row">
+                    状态:
+                    <text :style="{ color: item.status == '启用' ? '#009270' : '#E3041F' }">
+                        {{ item.status }}
+                    </text>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    props: {
+        list: {
+            type: Array,
+            default: []
+        },
+        onClick: {
+            type: Function
+        }
+    },
+    methods: {
+        itemClick(item) {
+            this.$emit("onClick", item)
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.item {
+    width: 355px;
+    background: #FFFFFF;
+    border-radius: 8px;
+    padding: 10px;
+    box-sizing: border-box;
+    background: #fff;
+    margin: 0 auto 10px;
+    display: flex;
+
+    .content {
+        margin-left: 10px;
+
+        .title {
+            line-height: 24px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-weight: bold;
+            font-size: 16px;
+            color: #333333;
+
+        }
+
+        .row {
+            margin-top: 5px;
+            font-family: Source Han Sans SC, Source Han Sans SC;
+            font-size: 12px;
+            color: #888888;
+
+            .iconfont {
+                margin-right: 5px;
+            }
+        }
+    }
+
+}
+</style>

+ 9 - 2
team/team/modules/users.vue

@@ -13,8 +13,7 @@
         </view>
 
         <My_listbox ref="List" @getlist="getList" bottomHeight="70">
-
-
+            <user-list :list="list" @onClick="onClick" />
         </My_listbox>
 
         <view class="footer">
@@ -29,7 +28,9 @@
 </template>
 
 <script>
+import userList from "./userList.vue"
 export default {
+    components: { userList },
     data() {
         return {
             "content": {
@@ -38,6 +39,7 @@ export default {
                 }
             },
             total: 0,
+            list: []
         }
     },
     created() {
@@ -65,6 +67,11 @@ export default {
                 this.content = this.$refs.List.paging(this.content, res)
             })
         },
+        onClick(item) {
+            uni.navigateTo({
+                url: '/team/userCenter/personal?id=' + item.userid
+            });
+        },
         onSearch(condition) {
             this.content.where.condition = condition;
             this.getList(true)