commit
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
<div class="content-area">
|
||||
<div class="team-card">
|
||||
<div class="team-header">
|
||||
<!-- <div class="team-logo">-->
|
||||
<!-- <i class="bi bi-people-fill" v-if="!team.logoUrl"></i>-->
|
||||
<!-- <img :src="team.logoUrl" alt="团队logo" v-if="team.logoUrl">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="team-logo">-->
|
||||
<!-- <i class="bi bi-people-fill" v-if="!team.logoUrl"></i>-->
|
||||
<!-- <img :src="team.logoUrl" alt="团队logo" v-if="team.logoUrl">-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="team-basic-info">
|
||||
<div class="team-name">{{ team.groupName }}</div>
|
||||
@@ -24,23 +24,23 @@
|
||||
<div class="team-stats">
|
||||
<div class="stat-item">
|
||||
<div class="stat-icon">
|
||||
<!-- <i class="bi bi-people"></i>-->
|
||||
<!-- <i class="bi bi-people"></i>-->
|
||||
<t-icon name="chart-ring-1"></t-icon>
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">成员:{{ team.groupUsers?.length }}</div>
|
||||
<!-- <div class="stat-label">成员</div>-->
|
||||
<!-- <div class="stat-label">成员</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-divider"></div>
|
||||
<div class="stat-item" @click="queryRank">
|
||||
<div class="stat-icon">
|
||||
<!-- <i class="bi bi-trophy"></i>-->
|
||||
<!-- <i class="bi bi-trophy"></i>-->
|
||||
<t-icon name="chart-bar"></t-icon>
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">排名:{{ team.totalRank ? team.totalRank : '--' }}</div>
|
||||
<!-- <div class="stat-label">点击查看排行榜</div>-->
|
||||
<!-- <div class="stat-label">点击查看排行榜</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,19 +80,29 @@
|
||||
|
||||
<!-- 当前角色与申请队长 -->
|
||||
<div class="role-section">
|
||||
<div class="role-card" v-if="team.isSelfLeader">
|
||||
<div class="role-icon">
|
||||
<i class="bi bi-trophy"></i>
|
||||
</div>
|
||||
<div class="role-info">
|
||||
<div class="role-title">您是队长</div>
|
||||
<div class="role-desc">拥有团队所有管理权限</div>
|
||||
<div v-if="team.isSelfLeader">
|
||||
<div class="role-card">
|
||||
<div class="role-icon">
|
||||
<t-icon name="user-safety"></t-icon>
|
||||
</div>
|
||||
<div class="role-info">
|
||||
<div class="role-title">您是队长</div>
|
||||
<div class="role-desc">拥有团队所有管理权限</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<t-button block
|
||||
class="leader-apply-btn"
|
||||
theme="danger"
|
||||
variant="outline"
|
||||
@click="cancelLeader">
|
||||
取消成为队长
|
||||
</t-button>
|
||||
</div>
|
||||
<div v-if="team.teamIsLeader&&!team.isSelfLeader">
|
||||
<div class="role-card">
|
||||
<div class="role-icon">
|
||||
<i class="bi bi-person"></i>
|
||||
<t-icon name="face-retouching"></t-icon>
|
||||
</div>
|
||||
<div class="role-info">
|
||||
<div class="role-title">您是普通成员</div>
|
||||
@@ -104,7 +114,7 @@
|
||||
<div v-if="!team.teamIsLeader&&!team.isSelfLeader">
|
||||
<div class="role-card">
|
||||
<div class="role-icon">
|
||||
<i class="bi bi-person"></i>
|
||||
<t-icon name="face-retouching"></t-icon>
|
||||
</div>
|
||||
<div class="role-info">
|
||||
<div class="role-title">您是普通成员</div>
|
||||
@@ -125,7 +135,7 @@
|
||||
</view>
|
||||
<view v-else style="flex: 1;display: flex;justify-content: center;align-items: center">
|
||||
<t-empty image="/static/img/empty.png"
|
||||
description="活动还没未开始,请耐心等待!"
|
||||
description="活动还未开始,请耐心等待!"
|
||||
style="flex: 1">
|
||||
</t-empty>
|
||||
</view>
|
||||
@@ -161,10 +171,10 @@
|
||||
<view class="member-list">
|
||||
<t-cell-group bordered>
|
||||
<t-cell title="姓名" hover>{{ userInfo.userName }}</t-cell>
|
||||
<t-cell title="性别" hover>{{userInfo.sex}}</t-cell>
|
||||
<t-cell title="联系方式" hover>{{userInfo.phone}}</t-cell>
|
||||
<t-cell title="职务" hover>{{userInfo.position}}</t-cell>
|
||||
<t-cell title="所属单位" hover>{{userInfo.unitName}}</t-cell>
|
||||
<t-cell title="性别" hover>{{ userInfo.sex }}</t-cell>
|
||||
<t-cell title="联系方式" hover>{{ userInfo.phone }}</t-cell>
|
||||
<t-cell title="职务" hover>{{ userInfo.position }}</t-cell>
|
||||
<t-cell title="所属单位" hover>{{ userInfo.unitName }}</t-cell>
|
||||
</t-cell-group>
|
||||
</view>
|
||||
</view>
|
||||
@@ -214,6 +224,35 @@ const actChange = (val) => {
|
||||
getListAct()
|
||||
}
|
||||
|
||||
// 取消成为队长
|
||||
const cancelLeader = async () => {
|
||||
// 弹出确认框
|
||||
Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
content: '确定要取消队长身份吗?',
|
||||
confirmBtn: '确认取消',
|
||||
cancelBtn: '再想想',
|
||||
onConfirm: async () => {
|
||||
try {
|
||||
const {code, msg} = await useRequest().post('/client/group/cancel-leader/' + team.value.id);
|
||||
if (code === 0) {
|
||||
await getTeamInfo();
|
||||
Toast({message: '取消成功', theme: 'success'});
|
||||
} else {
|
||||
await getTeamInfo();
|
||||
Toast({message: msg, theme: 'error'});
|
||||
}
|
||||
} catch (e) {
|
||||
Toast({message: e.message || '操作失败', theme: 'error'});
|
||||
}
|
||||
},
|
||||
onCancel: () => {
|
||||
// 用户取消,可选提示或什么都不做
|
||||
// Toast({ message: '已取消操作', theme: 'warning' });
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 申请成为队长
|
||||
const onLeaderConfirm = async () => {
|
||||
try {
|
||||
@@ -224,6 +263,7 @@ const onLeaderConfirm = async () => {
|
||||
Toast({message: '申请成功', theme: 'success'});
|
||||
leaderConfirmVisible.value = false
|
||||
} else {
|
||||
await getTeamInfo();
|
||||
Toast({message: msg, theme: 'error'});
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -241,7 +281,7 @@ const getTeamInfo = async () => {
|
||||
try {
|
||||
const {code, msg, data} = await useRequest().post('/client/group/info/' + pageForm.actId);
|
||||
if (code === 0) {
|
||||
if(data){
|
||||
if (data) {
|
||||
team.value = data
|
||||
team.value.teamIsLeader = !!team.value.groupUsers.find(t => t.isLeader)
|
||||
}
|
||||
@@ -618,18 +658,16 @@ onLoad(() => {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 20px;
|
||||
background: linear-gradient(120deg, #ff5f5c, #ff8c8a);
|
||||
//background: linear-gradient(120deg, #ff5f5c, #ff8c8a);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 12px;
|
||||
box-shadow: 0 4px 12px rgba(255, 95, 92, 0.2);
|
||||
//box-shadow: 0 4px 12px rgba(255, 95, 92, 0.2);
|
||||
color: #ff5f5c;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.role-icon i {
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.role-info {
|
||||
flex: 1;
|
||||
|
||||
Reference in New Issue
Block a user