diff --git a/src/component/Administrator/SE/allUser/index.vue b/src/component/Administrator/SE/allUser/index.vue
index dd4dfd4e..b514df07 100644
--- a/src/component/Administrator/SE/allUser/index.vue
+++ b/src/component/Administrator/SE/allUser/index.vue
@@ -18,7 +18,7 @@
{{ $t('admin.UserName') }}:
-
+
diff --git a/src/component/Administrator/SE/designDetailList/index.vue b/src/component/Administrator/SE/designDetailList/index.vue
index 91a8b1ed..2c6e4a9e 100644
--- a/src/component/Administrator/SE/designDetailList/index.vue
+++ b/src/component/Administrator/SE/designDetailList/index.vue
@@ -36,18 +36,9 @@
{{ $t("admin.Email") }}:
-
-
-
- {{ $t("admin.UserName") }}:
-
+
+
Organization Name:
{
if (rv) {
diff --git a/src/component/Administrator/SE/recentActiveChart.vue b/src/component/Administrator/SE/recentActiveChart.vue
index aacc3d22..baa1b143 100644
--- a/src/component/Administrator/SE/recentActiveChart.vue
+++ b/src/component/Administrator/SE/recentActiveChart.vue
@@ -25,15 +25,7 @@
{{ $t('admin.UserName') }}:
-
+
@@ -78,8 +70,10 @@ import { LabelLayout } from 'echarts/features';
import { useStore } from "vuex";
import { CanvasRenderer } from 'echarts/renderers';
import { useI18n } from 'vue-i18n'
+import SelectUser from '@/component/common/SelectUser.vue'
export default defineComponent({
components: {
+ SelectUser
},
setup() {
const {t} = useI18n()
diff --git a/src/component/Administrator/TestClickData.vue b/src/component/Administrator/TestClickData.vue
index 140dc115..b44bf828 100644
--- a/src/component/Administrator/TestClickData.vue
+++ b/src/component/Administrator/TestClickData.vue
@@ -32,18 +32,16 @@
Email:
-
-
-
- User Name:
-
+ /> -->
+
+
diff --git a/src/component/Administrator/subscriptionPlan.vue b/src/component/Administrator/subscriptionPlan.vue
index 78e3edac..2ba9f564 100644
--- a/src/component/Administrator/subscriptionPlan.vue
+++ b/src/component/Administrator/subscriptionPlan.vue
@@ -11,13 +11,13 @@
-
+
*
-
+
@@ -255,6 +255,7 @@
{
- return current && current < dayjs().subtract(1, 'days').endOf('day')
-}
-
const countryList = ref([])
+const userRef = ref(null)
const searchForm = reactive({
name: '',
@@ -493,6 +491,64 @@ const statusOption = ref([
}
])
+const disabledDate = (current: Dayjs) => {
+ return current && current < dayjs().subtract(1, 'days').endOf('day')
+}
+
+const disableEndDate = (current: Dayjs) => {
+ if (isEditMode.value) {
+ const specificTime = dayjs(formState.currentPeriodEnd)
+ return current && current < dayjs(formState.currentPeriodEnd * 1000).startOf('day')
+ }
+ return disabledDate(current)
+}
+const range = (start: number, end: number) => {
+ const result = []
+ for (let i = start; i < end; i++) {
+ result.push(i)
+ }
+ return result
+}
+const disableEndTime = date => {
+ if (!formState.currentPeriodEnd || !isEditMode.value)
+ return {
+ disabledHours: () => [],
+ disabledMinutes: () => [],
+ disabledSeconds: () => []
+ }
+
+ const specificTime = dayjs.unix(formState.currentPeriodEnd)
+
+ if (date && date.isSame(specificTime, 'day')) {
+ // 如果是指定日期当天,禁用时间戳之前的时间
+ const hour = specificTime.hour()
+ const minute = specificTime.minute()
+ const second = specificTime.second()
+
+ return {
+ disabledHours: () => Array.from({ length: hour }, (_, i) => i), // 禁用小时之前
+ disabledMinutes: selectedHour => {
+ if (selectedHour === hour) {
+ return Array.from({ length: minute }, (_, i) => i) // 同小时,禁用分钟之前
+ }
+ return []
+ },
+ disabledSeconds: (selectedHour, selectedMinute) => {
+ if (selectedHour === hour && selectedMinute === minute) {
+ return Array.from({ length: second }, (_, i) => i) // 同小时分钟,禁用秒之前
+ }
+ return []
+ }
+ }
+ }
+
+ return {
+ disabledHours: () => [],
+ disabledMinutes: () => [],
+ disabledSeconds: () => []
+ }
+}
+
const normalizeStatus = (status?: string): PlanStatus | undefined => {
if (!status) return undefined
const upper = status.toUpperCase() as PlanStatus
@@ -527,6 +583,14 @@ const columns = [
width: 120,
ellipsis: true
},
+ {
+ title: 'Country or Region',
+ dataIndex: 'countryOrRegion',
+ key: 'countryOrRegion',
+ align: 'center',
+ width: 120,
+ ellipsis: true
+ },
{
title: 'Start Time',
dataIndex: 'currentPeriodStart',
@@ -626,7 +690,7 @@ const handleReset = () => {
searchForm.adminAccId = undefined
searchForm.status = []
searchForm.id = ''
- searchForm.countryOrRegion = ''
+ searchForm.countryOrRegion = null
handleSearch()
}
@@ -649,6 +713,7 @@ const openEdit = (record: SubscriptionPlan) => {
formState.accountNum = (record as any).accountNum || null
formState.status = record.status
formState.id = record.id
+ formState.countryOrRegion = (record as any).countryOrRegion || null
// 检查组织ID是否在已加载的组织列表中,如果不在,则添加临时项
if (record.organizationId) {
@@ -658,7 +723,6 @@ const openEdit = (record: SubscriptionPlan) => {
String(org.id) === String(record.organizationId)
)
if (!orgExists) {
- // 从表格数据中获取组织名称,如果存在则添加临时项
const orgName = (record as any).organizationName
if (orgName) {
organizationOptions.value = [
@@ -671,8 +735,16 @@ const openEdit = (record: SubscriptionPlan) => {
}
}
}
-
modalVisible.value = true
+ if (record.adminAccId) {
+ nextTick(() => {
+ userRef.value.patchList({
+ label: record.name,
+ value: record.adminAccId,
+ email: record.adminAccEmail
+ })
+ })
+ }
}
const validateForm = (): boolean => {
diff --git a/src/component/Administrator/trialAllUser.vue b/src/component/Administrator/trialAllUser.vue
index 5af73f57..a6a98f5f 100644
--- a/src/component/Administrator/trialAllUser.vue
+++ b/src/component/Administrator/trialAllUser.vue
@@ -37,17 +37,7 @@
Email:
-
-
-
- User Name:
-
+
diff --git a/src/component/common/SelectUser.vue b/src/component/common/SelectUser.vue
index a9d4ccf5..5c2de832 100644
--- a/src/component/common/SelectUser.vue
+++ b/src/component/common/SelectUser.vue
@@ -18,7 +18,7 @@