feat(userManagement): 已删除成员禁止编辑删除并优化展示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1ef5c5d834
commit
6069367b90
@@ -151,7 +151,7 @@ Page({
|
||||
gender: item.sex === 1 ? '男' : '女',
|
||||
age: calcAge(item.birthday),
|
||||
height: item.height,
|
||||
sync: item.delFlag === 1 ? '已删除' : (item.syncStatus === 1 ? '已同步' : '未同步'),
|
||||
sync: item.delFlag === 1 ? '已删除未同步' : (item.syncStatus === 1 ? '已同步' : '未同步'),
|
||||
syncClass: item.delFlag === 1 ? 'deleted' : (item.syncStatus === 1 ? 'done' : 'pending'),
|
||||
relationType: item.relationType,
|
||||
delFlag: item.delFlag,
|
||||
@@ -396,6 +396,7 @@ Page({
|
||||
/** 编辑成员:跳转 addUser 编辑模式 */
|
||||
onTapEdit(e: WechatMiniprogram.TouchEvent) {
|
||||
const item = e.currentTarget.dataset.item as MemberItem
|
||||
if (item.delFlag === 1) return
|
||||
const sn = targetDevice?.sn || ''
|
||||
wx.navigateTo({ url: `/pages/addUser/addUser?sn=${encodeURIComponent(sn)}&id=${encodeURIComponent(item.id)}` })
|
||||
},
|
||||
@@ -403,6 +404,7 @@ Page({
|
||||
/** 删除成员 */
|
||||
onTapDelete(e: WechatMiniprogram.TouchEvent) {
|
||||
const item = e.currentTarget.dataset.item as MemberItem
|
||||
if (item.delFlag === 1) return
|
||||
wx.showModal({
|
||||
title: '删除用户',
|
||||
content: `是否确认删除「${item.name}」?`,
|
||||
|
||||
Reference in New Issue
Block a user