|
|
@@ -14,32 +14,37 @@
|
|
|
</view>
|
|
|
<text class="tipTxt">最多可添加10个用户,点击卡片切换用户</text>
|
|
|
<scroll-view class="userList" scroll-y="true">
|
|
|
- <view class="userCard" :class="{'curUserCard': item.id === currentUserId}"
|
|
|
+ <view class="listInner">
|
|
|
+ <view class="cardWrap" :class="{'curCardWrap': item.id === currentUserId}"
|
|
|
v-for="(item, index) in userList" :key="item.id" @click="switchUser(item)">
|
|
|
- <view class="userInfo">
|
|
|
- <view class="avatarWrap">
|
|
|
- <text class="avatarTxt">{{item.name ? item.name.substring(0,1) : '用'}}</text>
|
|
|
- </view>
|
|
|
- <view class="infoDetail">
|
|
|
- <view class="nameRow">
|
|
|
- <text class="userName">{{item.name}}</text>
|
|
|
- <text class="userGender">{{item.gender === 1 ? '男' : '女'}}</text>
|
|
|
- <text class="userAge" v-if="item.age">{{item.age}}岁</text>
|
|
|
+ <view class="userCard">
|
|
|
+ <view class="userInfo">
|
|
|
+ <view class="avatarWrap">
|
|
|
+ <text class="avatarTxt">{{item.name ? item.name.substring(0,1) : '用'}}</text>
|
|
|
</view>
|
|
|
- <view class="bodyRow">
|
|
|
- <text class="bodyTxt">肩高:{{item.shoulderHeight || '--'}}cm</text>
|
|
|
- <text class="bodyTxt">肩宽:{{item.shoulderWidth || '--'}}cm</text>
|
|
|
- <text class="bodyTxt">体重:{{item.weight || '--'}}kg</text>
|
|
|
+ <view class="infoDetail">
|
|
|
+ <view class="nameRow">
|
|
|
+ <text class="userName">{{item.name}}</text>
|
|
|
+ <text class="userGender">{{item.gender === 1 ? '男' : '女'}}</text>
|
|
|
+ <text class="userAge" v-if="item.age">{{item.age}}岁</text>
|
|
|
+ </view>
|
|
|
+ <view class="bodyRow">
|
|
|
+ <text class="bodyTxt">肩高:{{item.shoulderHeight || '--'}}cm</text>
|
|
|
+ <text class="bodyTxt">肩宽:{{item.shoulderWidth || '--'}}cm</text>
|
|
|
+ <text class="bodyTxt">体重:{{item.weight || '--'}}kg</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="cardBtns">
|
|
|
+ <text class="fingerBtn" @click.stop="enrollFingerprint(item)">录入指纹</text>
|
|
|
+ <text class="editBtn" @click.stop="editUser(item)">编辑</text>
|
|
|
+ <text class="deleteBtn" @click.stop="confirmDelete(item)">删除</text>
|
|
|
+ </view>
|
|
|
+ <view class="curTag" v-if="item.id === currentUserId">
|
|
|
+ <text class="curTagTxt">当前</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="cardBtns">
|
|
|
- <text class="editBtn" @click.stop="editUser(item)">编辑</text>
|
|
|
- <text class="deleteBtn" @click.stop="confirmDelete(item)">删除</text>
|
|
|
- </view>
|
|
|
- <view class="curTag" v-if="item.id === currentUserId">
|
|
|
- <text class="curTagTxt">当前</text>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
@@ -139,6 +144,11 @@ export default {
|
|
|
this.deleteTarget = item
|
|
|
this.showDeletePopup = true
|
|
|
},
|
|
|
+ /** 录入指纹 */
|
|
|
+ enrollFingerprint(item) {
|
|
|
+ this.$refs.ayToast.loading("指纹录入中", { mask: false })
|
|
|
+
|
|
|
+ },
|
|
|
/** 执行删除 */
|
|
|
doDelete() {
|
|
|
if (!this.deleteTarget) return
|
|
|
@@ -222,21 +232,28 @@ export default {
|
|
|
}
|
|
|
.userList {
|
|
|
flex: 1;
|
|
|
+}
|
|
|
+.listInner {
|
|
|
padding-left: 30rpx;
|
|
|
padding-right: 30rpx;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ padding-bottom: 30rpx;
|
|
|
+}
|
|
|
+.cardWrap {
|
|
|
+ border-radius: 20rpx;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+ background-color: #389588;
|
|
|
+}
|
|
|
+.curCardWrap {
|
|
|
+
|
|
|
+ border-radius: 20rpx;
|
|
|
}
|
|
|
.userCard {
|
|
|
background-color: #FFFFFF;
|
|
|
border-radius: 20rpx;
|
|
|
padding: 30rpx;
|
|
|
- margin-bottom: 24rpx;
|
|
|
position: relative;
|
|
|
- overflow: hidden;
|
|
|
-}
|
|
|
-.curUserCard {
|
|
|
- border-width: 2px;
|
|
|
- border-style: solid;
|
|
|
- border-color: #389588;
|
|
|
}
|
|
|
.userInfo {
|
|
|
flex-direction: row;
|
|
|
@@ -292,6 +309,17 @@ export default {
|
|
|
justify-content: flex-end;
|
|
|
margin-top: 20rpx;
|
|
|
}
|
|
|
+.fingerBtn {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #E6A23C;
|
|
|
+ padding-left: 24rpx;
|
|
|
+ padding-right: 24rpx;
|
|
|
+ padding-top: 10rpx;
|
|
|
+ padding-bottom: 10rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ background-color: #FDF6EC;
|
|
|
+ margin-right: 20rpx;
|
|
|
+}
|
|
|
.editBtn {
|
|
|
font-size: 26rpx;
|
|
|
color: #389588;
|
|
|
@@ -323,6 +351,8 @@ export default {
|
|
|
padding-top: 4rpx;
|
|
|
padding-bottom: 4rpx;
|
|
|
border-bottom-left-radius: 12rpx;
|
|
|
+ border-top-right-radius: 18rpx;
|
|
|
+
|
|
|
}
|
|
|
.curTagTxt {
|
|
|
font-size: 20rpx;
|