feat: 教育管理员不可切换子账号订阅计划&Peding状态提示开始时间
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item" v-if="title?.value == 'Edit'">
|
||||
<!-- <div class="admin_state_item" v-if="title?.value == 'Edit'">
|
||||
<span>
|
||||
{{ $t('admin.SubscribePlan') }}:
|
||||
<span>*</span>
|
||||
@@ -108,7 +108,7 @@
|
||||
:field-names="{ label: 'name', value: 'id' }"
|
||||
:placeholder="$t('admin.SelectPlan')"
|
||||
></a-select>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="allUserPoeration_btn admin_page">
|
||||
<div class="admin_search_item" @click="cancelDsign">{{ $t('admin.Close') }}</div>
|
||||
|
||||
@@ -85,17 +85,24 @@
|
||||
v-for="plan in planFilterOptions"
|
||||
:key="plan.id"
|
||||
class="plan_item"
|
||||
:class="{
|
||||
: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="plan.status !== 'PENDING' && openPlanRenameModal(plan)"
|
||||
/>
|
||||
<a-tooltip v-if="plan.status === 'PENDING'">
|
||||
<template #title>{{ $t('admin.PlanStart') }} {{ plan.startTime }}</template>
|
||||
<span class="plan_name">{{ plan.name }}</span>
|
||||
<MoreOutlined class="plan_more_icon" />
|
||||
</a-tooltip>
|
||||
<template v-else>
|
||||
<span class="plan_name">{{ plan.name }}</span>
|
||||
<MoreOutlined
|
||||
class="plan_more_icon"
|
||||
@click.stop="plan.status !== 'PENDING' && openPlanRenameModal(plan)"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
@@ -435,8 +442,11 @@ export default defineComponent({
|
||||
if (!orgId) return
|
||||
Https.axiosPost(Https.httpUrls.searchSubscribeByOrg, {
|
||||
organizationId: orgId,
|
||||
status: ['ACTIVE','PENDING']
|
||||
status: ['ACTIVE', 'PENDING']
|
||||
}).then(res => {
|
||||
res.forEach(plan => {
|
||||
plan.startTime = formatTime(plan.currentPeriodStart, 'YYYY-MM-DD hh:mm:ss')
|
||||
})
|
||||
// 将与当前用户 subscriptionPlanId 相同的订阅计划放到第一个
|
||||
const userSubscriptionPlanId = store.state.UserHabit.userDetail.subscriptionPlanId
|
||||
if (userSubscriptionPlanId && Array.isArray(res)) {
|
||||
@@ -451,6 +461,7 @@ export default defineComponent({
|
||||
} else {
|
||||
planFilterOptions.value = res
|
||||
}
|
||||
console.log(planFilterOptions.value)
|
||||
})
|
||||
}
|
||||
// 监听组织ID,获取到值后再拉取订阅计划
|
||||
@@ -459,7 +470,8 @@ export default defineComponent({
|
||||
orgId => {
|
||||
if (orgId) {
|
||||
fetchSubscribePlanList()
|
||||
const userSubscriptionPlanId = store.state.UserHabit.userDetail.subscriptionPlanId
|
||||
const userSubscriptionPlanId =
|
||||
store.state.UserHabit.userDetail.subscriptionPlanId
|
||||
if (userSubscriptionPlanId) {
|
||||
selectPlanFilter(userSubscriptionPlanId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user