feat: 教育管理员订阅计划展示

This commit is contained in:
2025-12-18 13:29:30 +08:00
parent c6f3a44b81
commit 81e230b79f
3 changed files with 70 additions and 16 deletions

View File

@@ -85,11 +85,17 @@
v-for="plan in planFilterOptions"
:key="plan.id"
class="plan_item"
:class="{ active: subscriptionPlanId === plan.id }"
@click="selectPlanFilter(plan.id)"
:class="{
active: subscriptionPlanId === plan.id,
disabled: plan.status === 'PENDING'
}"
@click="plan.status !== 'PENDING' && selectPlanFilter(plan.id)"
>
<span class="plan_name">{{ plan.name }}</span>
<MoreOutlined class="plan_more_icon" @click.stop="openPlanRenameModal(plan)" />
<MoreOutlined
class="plan_more_icon"
@click.stop="plan.status !== 'PENDING' && openPlanRenameModal(plan)"
/>
</div>
</div>
<a-table
@@ -430,7 +436,7 @@ export default defineComponent({
if (!orgId) return
Https.axiosPost(Https.httpUrls.searchSubscribeByOrg, {
organizationId: orgId,
status: ['ACTIVE']
status: ['ACTIVE','PENDING']
}).then(res => {
// 将与当前用户 subscriptionPlanId 相同的订阅计划放到第一个
const userSubscriptionPlanId = store.state.UserHabit.userDetail.subscriptionPlanId
@@ -698,6 +704,19 @@ export default defineComponent({
background: #ffffff;
color: #000000;
}
&.disabled {
opacity: 0.5;
cursor: not-allowed;
background-color: #d9d9d9;
border-color: #d9d9d9;
color: #999;
&:hover {
background-color: #d9d9d9;
color: #999;
}
}
}
.plan_item {