feat: 教育管理员订阅计划展示
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
@change="handleOrganizationChange"
|
||||
>
|
||||
<a-select-option value="ADD_ORGANIZATION" class="add-organization-option">
|
||||
+ 添加组织
|
||||
+ Create Organization
|
||||
</a-select-option>
|
||||
<a-select-option
|
||||
v-for="item in organizationOptions"
|
||||
@@ -213,7 +213,7 @@
|
||||
@change="handleOrganizationChange"
|
||||
>
|
||||
<a-select-option value="ADD_ORGANIZATION" class="add-organization-option">
|
||||
+ 添加组织
|
||||
+ Create Organization
|
||||
</a-select-option>
|
||||
<a-select-option
|
||||
v-for="item in organizationOptions"
|
||||
@@ -248,6 +248,7 @@
|
||||
v-model:value="formState.currentPeriodStart"
|
||||
value-format="X"
|
||||
style="width: 250px"
|
||||
:disabledDate="disabledDate"
|
||||
class="range_picker"
|
||||
placeholder="Select the start time"
|
||||
>
|
||||
@@ -373,13 +374,22 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, onBeforeUnmount, computed, nextTick, useTemplateRef } from 'vue'
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
onMounted,
|
||||
onBeforeUnmount,
|
||||
computed,
|
||||
nextTick,
|
||||
useTemplateRef
|
||||
} from 'vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { Https } from '@/tool/https'
|
||||
import { formatTime } from '@/tool/util'
|
||||
import store from '@/store'
|
||||
import type { FormInstance, Rule } from 'ant-design-vue/es/form'
|
||||
import { debounce } from 'lodash-es'
|
||||
import dayjs, { Dayjs } from 'dayjs'
|
||||
|
||||
type PlanStatus = 'PENDING' | 'ACTIVE' | 'EXPIRED'
|
||||
interface SubscriptionPlan {
|
||||
@@ -396,6 +406,10 @@ interface SubscriptionPlan {
|
||||
endStamp: number
|
||||
}
|
||||
|
||||
const disabledDate = (current: Dayjs) => {
|
||||
return current && current < dayjs().subtract(1, 'days').endOf('day')
|
||||
}
|
||||
|
||||
const searchForm = reactive({
|
||||
name: '',
|
||||
startTime: '',
|
||||
@@ -470,8 +484,8 @@ const getStatusColor = (status?: string) =>
|
||||
statusColorMap[normalizeStatus(status) as PlanStatus] || 'default'
|
||||
|
||||
const columns = [
|
||||
{ title: 'Name', dataIndex: 'name', key: 'name', align: 'center',width: 180 },
|
||||
{ title: 'ID', dataIndex: 'id', key: 'id', align: 'center' ,width: 80},
|
||||
{ title: 'Name', dataIndex: 'name', key: 'name', align: 'center', width: 180 },
|
||||
{ title: 'ID', dataIndex: 'id', key: 'id', align: 'center', width: 80 },
|
||||
{
|
||||
title: 'Organization',
|
||||
dataIndex: 'organizationName',
|
||||
@@ -479,23 +493,35 @@ const columns = [
|
||||
align: 'center',
|
||||
width: 180
|
||||
},
|
||||
{ title: 'Admin Account', dataIndex: 'adminAccId', key: 'adminAccId', align: 'center' ,width: 180},
|
||||
{ title: 'Account Num', dataIndex: 'accountNum', key: 'accountNum', align: 'center' ,width: 120},
|
||||
{
|
||||
title: 'Admin Account',
|
||||
dataIndex: 'adminAccId',
|
||||
key: 'adminAccId',
|
||||
align: 'center',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: 'Account Num',
|
||||
dataIndex: 'accountNum',
|
||||
key: 'accountNum',
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: 'Start Time',
|
||||
dataIndex: 'currentPeriodStart',
|
||||
key: 'currentPeriodStart',
|
||||
align: 'center',
|
||||
width:200
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: 'End Time',
|
||||
dataIndex: 'currentPeriodEnd',
|
||||
key: 'currentPeriodEnd',
|
||||
align: 'center',
|
||||
width:200
|
||||
width: 200
|
||||
},
|
||||
{ title: 'Status', dataIndex: 'status', key: 'status', align: 'center' ,width: 100},
|
||||
{ title: 'Status', dataIndex: 'status', key: 'status', align: 'center', width: 100 },
|
||||
{
|
||||
title: 'Credit Limit',
|
||||
dataIndex: 'creditLimit',
|
||||
|
||||
Reference in New Issue
Block a user