feat: 文案修改&订阅计划字段修改

This commit is contained in:
2026-01-06 17:33:00 +08:00
parent 6fa5ade5b1
commit 38c0b88abf
4 changed files with 747 additions and 528 deletions

View File

@@ -1,352 +1,392 @@
<template> <template>
<div class="allUserPoerationModal" ref="allUserPoerationModal"></div> <div class="allUserPoerationModal" ref="allUserPoerationModal"></div>
<a-modal <a-modal
class="allUserPoeration_modal generalModel" class="allUserPoeration_modal generalModel"
v-model:visible="operationsModal" v-model:visible="operationsModal"
:footer="null" :footer="null"
:get-container="() => $refs.allUserPoerationModal" :get-container="() => $refs.allUserPoerationModal"
width="50%" width="50%"
:maskClosable="false" :maskClosable="false"
:centered="true" :centered="true"
:closable="false" :closable="false"
:mask="true" :mask="true"
wrapClassName="#app" wrapClassName="#app"
:keyboard="false" :keyboard="false"
> >
<div class="generalModel_btn"> <div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cancelDsign()"> <div class="generalModel_closeIcon" @click.stop="cancelDsign()">
<svg width="100%" height="100%" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg
<circle cx="23" cy="23" r="23" fill="#000" fill-opacity="0.3"/> width="100%"
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/> height="100%"
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/> viewBox="0 0 46 46"
</svg> fill="none"
xmlns="http://www.w3.org/2000/svg"
</div> >
</div> <circle cx="23" cy="23" r="23" fill="#000" fill-opacity="0.3" />
<div class="modal_title_text"> <rect
<div>{{ title }} User</div> x="32.5063"
</div> y="12"
<div class="allUserPoeration_center admin_page"> width="3"
<div class="admin_state_item"> height="29"
<span>User Name: <span>*</span></span> rx="1.5"
<input transform="rotate(45 32.5063 12)"
:disabled="title != 'Add'" fill="white"
:class="{active:title != 'Add'}" />
v-model="userName" <rect
placeholder="Please enter user name" x="34.6274"
type="text" y="32.5059"
style="width: 250px" width="3"
/> height="29"
</div> rx="1.5"
<div class="admin_state_item"> transform="rotate(135 34.6274 32.5059)"
<span>User Email: <span>*</span></span> fill="white"
<input />
:disabled="title != 'Add'" </svg>
:class="{active:title != 'Add'}" </div>
v-model="userEmail" </div>
placeholder="Please enter email" <div class="modal_title_text">
type="text" <div>{{ title }} User</div>
style="width: 250px" </div>
/> <div class="allUserPoeration_center admin_page">
</div> <div class="admin_state_item">
<div class="admin_state_item"> <span>
<span>Create Time: <span>*</span></span> User Name:
<a-date-picker :disabled="title != 'Add'" style="width: 250px" valueFormat="YYYY-MM-DDTHH:mm:ss" class="range_picker" show-time placeholder="Create Time" v-model:value="validStartTime"> <span>*</span>
<template #suffixIcon> </span>
<span <input
class="icon iconfont range_picker_icon icon-rili" :disabled="title != 'Add'"
></span> :class="{ active: title != 'Add' }"
</template> v-model="userName"
</a-date-picker> placeholder="Please enter user name"
</div> type="text"
<div class="admin_state_item"> style="width: 250px"
<span>End Time: <span>*</span></span> />
<a-date-picker style="width: 250px" valueFormat="YYYY-MM-DDTHH:mm:ss" class="range_picker" show-time placeholder="End Time" v-model:value="validEndTime"> </div>
<template #suffixIcon> <div class="admin_state_item">
<span <span>
class="icon iconfont range_picker_icon icon-rili" User Email:
></span> <span>*</span>
</template> </span>
</a-date-picker> <input
</div> :disabled="title != 'Add'"
<div class="admin_state_item"> :class="{ active: title != 'Add' }"
<span>User Type:<span>*</span></span> v-model="userEmail"
<a-select placeholder="Please enter email"
v-model:value="systemUser" type="text"
size="large" style="width: 250px"
style="width: 250px" />
optionFilterProp="label" </div>
:options="state" <div class="admin_state_item">
placeholder="Please select" <span>
allowClear Create Time:
show-search <span>*</span>
></a-select> </span>
</div> <a-date-picker
<div class="admin_state_item"> :disabled="title != 'Add'"
<span>Credits:</span> style="width: 250px"
<input valueFormat="YYYY-MM-DDTHH:mm:ss"
v-model="credits" class="range_picker"
placeholder="Please enter credits" show-time
type="text" placeholder="Create Time"
style="width: 250px" v-model:value="validStartTime"
/> >
</div> <template #suffixIcon>
<div class="admin_state_item"> <span class="icon iconfont range_picker_icon icon-rili"></span>
<span>Country or Region:</span> </template>
<input </a-date-picker>
</div>
<div class="admin_state_item">
<span>
End Time:
<span>*</span>
</span>
<a-date-picker
style="width: 250px"
valueFormat="YYYY-MM-DDTHH:mm:ss"
class="range_picker"
show-time
placeholder="End Time"
v-model:value="validEndTime"
>
<template #suffixIcon>
<span class="icon iconfont range_picker_icon icon-rili"></span>
</template>
</a-date-picker>
</div>
<div class="admin_state_item">
<span>
User Type:
<span>*</span>
</span>
<a-select
v-model:value="systemUser"
size="large"
style="width: 250px"
optionFilterProp="label"
:options="state"
placeholder="Please select"
allowClear
show-search
></a-select>
</div>
<div class="admin_state_item">
<span>Credits:</span>
<input
v-model="credits"
placeholder="Please enter credits"
type="text"
style="width: 250px"
/>
</div>
<div class="admin_state_item">
<span>Country or Region:</span>
<!-- <input
:disabled="title != 'Add'" :disabled="title != 'Add'"
:class="{active:title != 'Add'}" :class="{active:title != 'Add'}"
v-model="country" v-model="country"
placeholder="Please enter country" placeholder="Please enter country"
type="text" type="text"
style="width: 250px" style="width: 250px"
/> /> -->
</div> <a-select
<div class="admin_state_item"> v-model:value="country"
<span>Organization Name:</span> :disabled="title != 'Add'"
<input :class="{ active: title != 'Add' }"
:disabled="title != 'Add'" :allowClear="true"
:class="{active:title != 'Add'}" show-search
v-model="organizationName" style="width: 250px"
placeholder="Please enter Organization Name" :filter-option="filterOption"
type="text" placeholder="Select Country or Region"
style="width: 250px" max-tag-count="responsive"
/> :options="allCountry"
</div> />
<div class="admin_state_item"> </div>
<span>Sub Account Num:</span> </div>
<input <div class="allUserPoeration_btn admin_page">
:disabled="title != 'Add'" <div class="admin_search_item" @click="cancelDsign">Close</div>
:class="{active:title != 'Add'}" <div class="admin_search_item" @click="setOk">OK</div>
v-model="subAccountNum" </div>
placeholder="Please enter Sub Account Num" </a-modal>
type="number" <div class="mark_loading" v-show="loadingShow">
style="width: 250px" <a-spin size="large" />
/> </div>
</div>
</div>
<div class="allUserPoeration_btn admin_page">
<div class="admin_search_item" @click="cancelDsign">
Close
</div>
<div class="admin_search_item" @click="setOk">
OK
</div>
</div>
</a-modal>
<div class="mark_loading" v-show="loadingShow">
<a-spin size="large" />
</div>
</template> </template>
<script> <script>
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue"; import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from 'vue'
import { Https } from "@/tool/https"; import { Https } from '@/tool/https'
import { Modal, message } from "ant-design-vue"; import { Modal, message } from 'ant-design-vue'
import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
import { formatTime } from "@/tool/util"; import { formatTime } from '@/tool/util'
export default defineComponent({ export default defineComponent({
components: { components: {},
}, emits: ['searchHistoryList'],
emits: ['searchHistoryList'], setup(props, { emit }) {
setup(props,{emit}) { let operations = reactive({
let operations = reactive({ operationsModal: false,
operationsModal:false, operationsEdit: false,
operationsEdit:false, loadingShow: false,
loadingShow:false, title: ''
title:'' })
}) let operationsData = reactive({
let operationsData = reactive({ accountId: -1,
accountId:-1, userName: '',
userName:'', userEmail: '',
userEmail:'', validStartTime: '',
validStartTime:'', validEndTime: '',
validEndTime:'', systemUser: '',
systemUser:'', credits: '',
credits:'', country: ''
country:'', })
organizationName:'', let state = ref([
subAccountNum:0, {
}) label: 'visitor',
let state = ref([ value: '0'
{ },
label:'visitor', {
value:'0', label: 'yearly',
}, value: '1'
{ },
label:'yearly', {
value:'1', label: 'monthly',
}, value: '2'
{ },
label:'monthly', {
value:'2', label: 'trial',
}, value: '3'
{ },
label:'trial', {
value:'3', label: 'userInEvent',
}, value: '4'
{ },
label: "userInEvent", {
value: "4", label: 'Edu Admin',
}, value: '7'
{ }
label: "Edu Admin", ])
value: "7", let init = (funStr, data) => {
}, operations.operationsModal = true
]); operations.operationsEdit = true
let init = (funStr,data)=>{ operations.title = funStr
operations.operationsModal = true if (funStr == 'Add') operations.operationsEdit = false
operations.operationsEdit = true if (funStr == 'Edit') {
operations.title = funStr operationsData.organizationName = data.organizationName
if(funStr == 'Add') operations.operationsEdit = false operationsData.subAccountNum = data.subAccountNum ? data.subAccountNum : 0
if(funStr == 'Edit'){ let startTime = data.validStartTime
operationsData.organizationName = data.organizationName ? formatTime(data.validStartTime / 1000, 'YYYY-MM-DDThh:mm:ss')
operationsData.subAccountNum = data.subAccountNum?data.subAccountNum:0 : ''
let startTime = data.validStartTime?formatTime(data.validStartTime / 1000,"YYYY-MM-DDThh:mm:ss"):'' let endTime = data.validEndTime
let endTime = data.validEndTime?formatTime(data.validEndTime / 1000,"YYYY-MM-DDThh:mm:ss"):'' ? formatTime(data.validEndTime / 1000, 'YYYY-MM-DDThh:mm:ss')
operationsData.accountId=data.id : ''
operationsData.userName=data.userName operationsData.accountId = data.id
operationsData.userEmail=data.userEmail operationsData.userName = data.userName
// operationsData.validStartTime='2024-08-05T00:00:06' operationsData.userEmail = data.userEmail
// operationsData.validEndTime='2024-08-05T00:00:06' // operationsData.validStartTime='2024-08-05T00:00:06'
operationsData.validStartTime=startTime // operationsData.validEndTime='2024-08-05T00:00:06'
operationsData.validEndTime=endTime operationsData.validStartTime = startTime
operationsData.systemUser=String(data.systemUser) operationsData.validEndTime = endTime
operationsData.credits=data.credits operationsData.systemUser = String(data.systemUser)
operationsData.country=data.country operationsData.credits = data.credits
// operationsData.accountId = data.accountId operationsData.country = data.country
// operationsData.userName = data.userName // operationsData.accountId = data.accountId
// operationsData.userEmail = data.userEmail // operationsData.userName = data.userName
// operationsData.validStartTime = formatTime(data.validStartTime) // operationsData.userEmail = data.userEmail
// operationsData.validEndTime = formatTime(data.validEndTime) // operationsData.validStartTime = formatTime(data.validStartTime)
} // operationsData.validEndTime = formatTime(data.validEndTime)
}
}
let setTime = time => {
if (time) {
const date = new Date(time)
const timestamp = date.getTime() // 转换为秒数
return timestamp
} else {
return ''
}
}
let setAddData = () => {
return {
country: operationsData.country,
credits: operationsData.credits,
systemUser: operationsData.systemUser,
userEmail: operationsData.userEmail,
userName: operationsData.userName,
validEndTime: setTime(operationsData.validEndTime),
validStartTime: setTime(operationsData.validStartTime),
organizationName: operationsData.organizationName
? operationsData.organizationName
: null,
subAccountNum: operationsData.subAccountNum
}
}
let setEditData = () => {
return {
accountId: operationsData.accountId,
credits: operationsData.credits,
systemUser: operationsData.systemUser,
validEndTime: setTime(operationsData.validEndTime),
userName: operationsData.userName,
userEmail: operationsData.userEmail
}
}
let cancelDsign = () => {
operationsData.accountId = -1
operationsData.userName = ''
operationsData.userEmail = ''
operationsData.validStartTime = ''
operationsData.validEndTime = ''
operationsData.systemUser = ''
operationsData.credits = ''
operationsData.country = ''
operations.operationsModal = false
}
let setOk = () => {
let data
if (operations.title == 'Add') {
data = setAddData()
if (
!data.userName ||
!data.userEmail ||
!data.validStartTime ||
!data.validEndTime ||
!data.systemUser
)
return message.warning('Please check the input box marked with *')
Https.axiosPost(Https.httpUrls.adminAddUser, data).then(rv => {
if (rv) {
cancelDsign()
emit('searchHistoryList')
}
})
} else {
data = setEditData()
if (!data.userName || !data.userEmail || !data.validEndTime || !data.systemUser)
return message.warning('Please check the input box marked with *')
Https.axiosPost(Https.httpUrls.modifyUser, {}, { params: data }).then(rv => {
if (rv) {
cancelDsign()
emit('searchHistoryList')
}
})
}
}
} const allCountry = ref([])
let setTime = (time) =>{ const filterOption = (input, option) => {
if(time){ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
const date = new Date(time); }
const timestamp = date.getTime(); // 转换为秒数 onMounted(() => {
return timestamp const countryList = sessionStorage.getItem('allCountry')
}else{ if (countryList) {
return '' allCountry.value = JSON.parse(countryList)
} }
})
} return {
let setAddData = ()=>{ ...toRefs(operations),
return { ...toRefs(operationsData),
"country": operationsData.country, state,
"credits": operationsData.credits, cancelDsign,
"systemUser": operationsData.systemUser, init,
"userEmail": operationsData.userEmail, setOk,
"userName": operationsData.userName, allCountry,
"validEndTime": setTime(operationsData.validEndTime), filterOption
"validStartTime": setTime(operationsData.validStartTime), }
"organizationName": operationsData.organizationName?operationsData.organizationName:null, }
"subAccountNum": operationsData.subAccountNum, })
}
}
let setEditData = ()=>{
return {
"accountId": operationsData.accountId,
"credits": operationsData.credits,
"systemUser": operationsData.systemUser,
"validEndTime": setTime(operationsData.validEndTime),
"userName": operationsData.userName,
"userEmail": operationsData.userEmail,
}
}
let cancelDsign = ()=>{
operationsData.accountId=-1
operationsData.userName=''
operationsData.userEmail=''
operationsData.validStartTime=''
operationsData.validEndTime=''
operationsData.systemUser=''
operationsData.credits=''
operationsData.country=''
operations.operationsModal = false
}
let setOk = ()=>{
let data
if(operations.title == 'Add'){
data = setAddData()
if(!data.userName || !data.userEmail || !data.validStartTime || !data.validEndTime || !data.systemUser)return message.warning('Please check the input box marked with *')
Https.axiosPost(Https.httpUrls.adminAddUser, data).then(
(rv) => {
if (rv) {
cancelDsign()
emit('searchHistoryList')
}
}
);
}else{
data = setEditData()
if(!data.userName || !data.userEmail || !data.validEndTime || !data.systemUser)return message.warning('Please check the input box marked with *')
Https.axiosPost(Https.httpUrls.modifyUser,{},{params:data}).then(
(rv) => {
if (rv) {
cancelDsign()
emit('searchHistoryList')
}
}
);
}
}
return {
...toRefs(operations),
...toRefs(operationsData),
state,
cancelDsign,
init,
setOk,
};
},
data() {
return {
};
},
mounted() {},
methods: {
},
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.allUserPoeration_modal){ :deep(.allUserPoeration_modal) {
.ant-modal-body{ .ant-modal-body {
height: auto; height: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.allUserPoeration_modal { .allUserPoeration_modal {
.closeIcon { .closeIcon {
z-index: 2; z-index: 2;
}
> .admin_state_item {
> span {
width: 15rem;
} }
> .admin_state_item{ }
> span{ .allUserPoeration_btn {
width: 15rem; display: flex;
} flex-direction: row;
} height: auto;
.allUserPoeration_btn{ justify-content: flex-end;
display: flex; padding: 1rem 0;
flex-direction: row; .admin_search_item {
height: auto; margin-bottom: 0;
justify-content: flex-end; }
padding: 1rem 0; }
.admin_search_item{ .allUserPoeration_center {
margin-bottom: 0; flex: 1;
} overflow-y: auto;
} flex-direction: row;
.allUserPoeration_center{ flex-wrap: wrap;
flex: 1; }
overflow-y: auto;
flex-direction: row;
flex-wrap: wrap;
}
} }
</style> </style>

View File

@@ -48,7 +48,7 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="Admin Account"> <a-form-item label="Admin Account">
<a-select <!-- <a-select
v-model:value="searchForm.adminAccId" v-model:value="searchForm.adminAccId"
allow-clear allow-clear
show-search show-search
@@ -56,7 +56,8 @@
placeholder="Select Account" placeholder="Select Account"
style="width: 180px" style="width: 180px"
:options="allUserList" :options="allUserList"
></a-select> ></a-select> -->
<SelectUser v-model="testuser" />
</a-form-item> </a-form-item>
<a-form-item label="Status"> <a-form-item label="Status">
<a-select <a-select
@@ -68,6 +69,18 @@
:options="statusOption" :options="statusOption"
/> />
</a-form-item> </a-form-item>
<a-form-item label="Country or Region">
<a-select
v-model:value="searchForm.country"
:allowClear="true"
show-search
style="width: 250px"
:filter-option="filterOption"
placeholder="Select Item..."
max-tag-count="responsive"
:options="countryList"
/>
</a-form-item>
<a-form-item> <a-form-item>
<a-space> <a-space>
<a-button type="primary" @click="handleSearch">Search</a-button> <a-button type="primary" @click="handleSearch">Search</a-button>
@@ -279,7 +292,7 @@
</div> </div>
<div class="admin_state_item"> <div class="admin_state_item">
<span> <span>
Account Num: Sub-Account Num:
<span>*</span> <span>*</span>
</span> </span>
<a-input-number <a-input-number
@@ -386,6 +399,7 @@ import {
nextTick, nextTick,
useTemplateRef useTemplateRef
} from 'vue' } from 'vue'
import SelectUser from '@/component/common/SelectUser.vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { Https } from '@/tool/https' import { Https } from '@/tool/https'
import { formatTime } from '@/tool/util' import { formatTime } from '@/tool/util'
@@ -394,6 +408,8 @@ import type { FormInstance, Rule } from 'ant-design-vue/es/form'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import dayjs, { Dayjs } from 'dayjs' import dayjs, { Dayjs } from 'dayjs'
const testuser = ref('')
type PlanStatus = 'PENDING' | 'ACTIVE' | 'EXPIRED' type PlanStatus = 'PENDING' | 'ACTIVE' | 'EXPIRED'
interface SubscriptionPlan { interface SubscriptionPlan {
id: number id: number
@@ -413,6 +429,8 @@ const disabledDate = (current: Dayjs) => {
return current && current < dayjs().subtract(1, 'days').endOf('day') return current && current < dayjs().subtract(1, 'days').endOf('day')
} }
const countryList = ref([])
const searchForm = reactive({ const searchForm = reactive({
name: '', name: '',
startTime: '', startTime: '',
@@ -498,17 +516,19 @@ const columns = [
}, },
{ {
title: 'Admin Account', title: 'Admin Account',
dataIndex: 'adminAccId', dataIndex: 'adminAccEmail',
key: 'adminAccId', key: 'adminAccEmail',
align: 'center', align: 'center',
width: 180 width: 180,
ellipsis: true
}, },
{ {
title: 'Account Num', title: 'Sub-Account Num',
dataIndex: 'accountNum', dataIndex: 'accountNum',
key: 'accountNum', key: 'accountNum',
align: 'center', align: 'center',
width: 120 width: 120,
ellipsis: true
}, },
{ {
title: 'Start Time', title: 'Start Time',
@@ -558,6 +578,8 @@ onMounted(async () => {
await handleSearch() await handleSearch()
calculateTableHeight() calculateTableHeight()
window.addEventListener('resize', handleResize) window.addEventListener('resize', handleResize)
const list = sessionStorage.getItem('allCountry')
countryList.value = list ? JSON.parse(list) : []
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
@@ -949,9 +971,15 @@ const filterOption = (input: string, option: any) => {
} }
.subscriptionPlan_modal { .subscriptionPlan_modal {
> .admin_state_item { .form_content{
width: 100%;
display: flex;
flex-wrap: wrap;
row-gap: 2rem;
}
.admin_state_item {
> span { > span {
width: 15rem; width: 17rem !important;
} }
} }
.modal_title_text { .modal_title_text {

View File

@@ -0,0 +1,135 @@
<template>
<a-select
v-model:value="value"
:allowClear="true"
show-search
style="width: 250px"
:filter-option="false"
placeholder="Select Item..."
max-tag-count="responsive"
:options="options"
:loading="fetching"
@popupScroll="handleScrollUserList"
@search="onSearch"
@focus="handleFocus"
@change="onChange"
></a-select>
</template>
<script setup lang="ts">
import { computed, ref, reactive } from 'vue'
import { debounce } from 'lodash-es'
type OptionItem = { [k: string]: any }
const props = defineProps<{
modelValue?: any
}>()
const emit = defineEmits(['update:modelValue', 'change', 'search'])
const pager = reactive<{ page: number; size: number; total: number | null }>({
page: 1,
size: 20,
total: null
})
const fetching = ref(false)
const keyword = ref('')
const internalList = ref<OptionItem[]>([])
// page size is stored in pager.size
const value = computed({
get: () => props.modelValue,
set: v => emit('update:modelValue', v)
})
const getLabel = (it: OptionItem) => {
return String(it['label'] ?? '')
}
const getValue = (it: OptionItem, idx: number) => {
return it['value'] ?? String(idx)
}
const options = computed(() => {
return internalList.value.map((it, idx) => ({
label: getLabel(it),
value: getValue(it, idx),
raw: it
}))
})
const defaultFetch = async ({
page: p,
pageSize: ps,
keyword: kw
}: {
page: number
pageSize: number
keyword: string
}) => {
const raw = sessionStorage.getItem('allCountry') || '[]'
let list: OptionItem[] = []
try {
list = JSON.parse(raw)
if (!Array.isArray(list)) list = []
} catch (e) {
list = []
}
// Return the raw list from sessionStorage exactly as-is (no slicing/filtering/delay)
return { data: list, total: list.length }
}
const doFetch = async (reset = false) => {
if (reset) pager.page = 1
if (pager.total !== null && (pager.page - 1) * pager.size >= (pager.total ?? 0)) return
fetching.value = true
try {
const res = await defaultFetch({
page: pager.page,
pageSize: pager.size,
keyword: keyword.value
})
const data = res?.data ?? []
pager.total = res?.total ?? null
if (pager.page === 1) internalList.value = data
else internalList.value = internalList.value.concat(data)
pager.page += 1
} finally {
fetching.value = false
}
}
const debouncedSearch = debounce((val: string) => {
keyword.value = val
emit('search', val)
doFetch(true)
}, 300)
const onSearch = (val: string) => {
debouncedSearch(val)
}
const handleScrollUserList = (e: Event) => {
const target = e?.target as HTMLElement | null
if (!target) return
const nearBottom = target.scrollTop + target.clientHeight >= target.scrollHeight - 40
if (nearBottom && !fetching.value) {
doFetch(false)
}
}
const handleFocus = () => {
// When focused, load first page (or reload with current keyword)
doFetch(true)
}
const onChange = (val: any) => {
emit('change', val)
console.log('change---------', val)
}
</script>
<style lang="less" scoped></style>

View File

@@ -1,189 +1,205 @@
const all = (t)=>{ const all = (t)=>{
return[{ return [
name:'All User', {
route:'/administrator/allUser', name: 'All User',
icon:'yonghu', route: '/administrator/allUser',
expandIcon:'icon-xiala', icon: 'yonghu',
key:'sub1', expandIcon: 'icon-xiala',
isShow:true, key: 'sub1',
// children: [ isShow: true
// { // children: [
// name:'User Management', // {
// route:'/home/excil1', // name:'User Management',
// icon:'', // route:'/home/excil1',
// key:'/home/excil22', // icon:'',
// isShow:true, // key:'/home/excil22',
// }, // isShow:true,
// { // },
// code:'ROLE_MANAGER', // {
// name:'Access Permission', // code:'ROLE_MANAGER',
// route:'/home/excil2', // name:'Access Permission',
// icon:'', // route:'/home/excil2',
// key:'/home/excil33', // icon:'',
// isShow:true, // key:'/home/excil33',
// }, // isShow:true,
// ], // },
},{ // ],
name:'Design Frequency', },
route:'/administrator/testClickData', {
icon:'shenpi', name: 'Design Frequency',
expandIcon:'icon-xiala', route: '/administrator/testClickData',
key:'sub2', icon: 'shenpi',
isShow:true, expandIcon: 'icon-xiala',
},{ key: 'sub2',
name:'Trial User', isShow: true
icon:'usetime', },
expandIcon:'icon-xiala', {
key:'sub3', name: 'Trial User',
isShow:true, icon: 'usetime',
children:[ expandIcon: 'icon-xiala',
{ key: 'sub3',
name:'All Trial User', isShow: true,
route:'/administrator/trialAllUser', children: [
icon:'usetime', {
key:'sub3-1', name: 'All Trial User',
isShow:true, route: '/administrator/trialAllUser',
},{ icon: 'usetime',
name:'Trial User Approval', key: 'sub3-1',
route:'/administrator/trialApproval', isShow: true
icon:'usetime', },
key:'sub3-2', {
isShow:true, name: 'Trial User Approval',
},{ route: '/administrator/trialApproval',
name:'Trial User CHART', icon: 'usetime',
route:'/administrator/trialUserCountry', key: 'sub3-2',
icon:'', isShow: true
key:'sub3-3', },
isShow:true, {
},{ name: 'Trial User CHART',
name:'Conversion Rate', route: '/administrator/trialUserCountry',
route:'/administrator/trialUserConversionRateChart', icon: '',
icon:'', key: 'sub3-3',
key:'sub3-4', isShow: true
isShow:true, },
}, {
] name: 'Conversion Rate',
},{ route: '/administrator/trialUserConversionRateChart',
name:'Function Use CHART', icon: '',
route:'/administrator/recentActiveChart', key: 'sub3-4',
icon:'usetime', isShow: true
key:'sub4', }
isShow:true, ]
},{ },
name:'Active User', {
icon:'usetime', name: 'Function Use CHART',
route:'/administrator/recentActiveUser', route: '/administrator/recentActiveChart',
key:'sub5', icon: 'usetime',
isShow:true, key: 'sub4',
},{ isShow: true
name:'New User', },
icon:'usetime', {
expandIcon:'icon-xiala', name: 'Active User',
key:'sub6', icon: 'usetime',
isShow:true, route: '/administrator/recentActiveUser',
children:[ key: 'sub5',
{ isShow: true
name:'New User List', },
route:'/administrator/recentNewUser', {
icon:'', name: 'New User',
key:'sub6-1', icon: 'usetime',
isShow:true, expandIcon: 'icon-xiala',
},{ key: 'sub6',
name:'New User CHART', isShow: true,
route:'/administrator/recentNewUserChart', children: [
icon:'', {
key:'sub6-2', name: 'New User List',
isShow:true, route: '/administrator/recentNewUser',
}, icon: '',
] key: 'sub6-1',
},{ isShow: true
name:'Events', },
icon:'usetime', {
key:'sub9', name: 'New User CHART',
expandIcon:'icon-xiala', route: '/administrator/recentNewUserChart',
isShow:true, icon: '',
children: [ key: 'sub6-2',
{ isShow: true
name:'Questionnaire Survey', }
route:'/administrator/questionnaire', ]
icon:'', },
key:'sub9-1', {
isShow:true, name: 'Events',
}, icon: 'usetime',
// { key: 'sub9',
// code:'ROLE_MANAGER', expandIcon: 'icon-xiala',
// name:'Access Permission', isShow: true,
// route:'/home/excil2', children: [
// icon:'', {
// key:'/home/excil33', name: 'Questionnaire Survey',
// isShow:true, route: '/administrator/questionnaire',
// }, icon: '',
], key: 'sub9-1',
},{ isShow: true
name:'Affiliate', }
icon:'usetime', // {
expandIcon:'icon-xiala', // code:'ROLE_MANAGER',
key:'sub10', // name:'Access Permission',
isShow:true, // route:'/home/excil2',
children: [ // icon:'',
{ // key:'/home/excil33',
name:'Approval Affiliate', // isShow:true,
route:'/administrator/affiliateAudit', // },
icon:'', ]
key:'sub10-1', },
isShow:true, {
}, name: 'Affiliate',
{ icon: 'usetime',
name:'Affiliate Referral', expandIcon: 'icon-xiala',
route:'/administrator/affiliateReferral', key: 'sub10',
icon:'', isShow: true,
key:'sub10-2', children: [
isShow:true, {
}, name: 'Approval Affiliate',
], route: '/administrator/affiliateAudit',
},{ icon: '',
name:'Transaction', key: 'sub10-1',
icon:'usetime', isShow: true
expandIcon:'icon-xiala', },
key:'sub11', {
isShow:true, name: 'Affiliate Referral',
children: [ route: '/administrator/affiliateReferral',
{ icon: '',
name:'Transaction Record', key: 'sub10-2',
route:'/administrator/TransactionTable', isShow: true
icon:'', }
key:'sub11-1', ]
isShow:true, },
}, {
// { name: 'Transaction',
// code:'ROLE_MANAGER', icon: 'usetime',
// name:'Access Permission', expandIcon: 'icon-xiala',
// route:'/home/excil2', key: 'sub11',
// icon:'', isShow: true,
// key:'/home/excil33', children: [
// isShow:true, {
// }, name: 'Transaction Record',
], route: '/administrator/TransactionTable',
},{ icon: '',
name:'Promotion Code', key: 'sub11-1',
icon:'usetime', isShow: true
route:'/administrator/coupons', }
key:'sub12', // {
isShow:true, // code:'ROLE_MANAGER',
},{ // name:'Access Permission',
// route:'/home/excil2',
name:'Organization', // icon:'',
icon:'usetime', // key:'/home/excil33',
route:'/administrator/organization', // isShow:true,
key:'sub13', // },
isShow:true, ]
},{ },
name:'Subscription Plan', {
icon:'usetime', name: 'Promotion Code',
route:'/administrator/subscriptionPlan', icon: 'usetime',
key:'sub14', route: '/administrator/coupons',
isShow:true, key: 'sub12',
}] isShow: true
},
{
name: 'Organization',
icon: 'usetime',
route: '/administrator/organization',
key: 'sub13',
isShow: true
},
{
name: 'Organization Plan',
icon: 'usetime',
route: '/administrator/subscriptionPlan',
key: 'sub14',
isShow: true
}
]
} }
const schoolOrEnterprise = (t) =>{ const schoolOrEnterprise = (t) =>{
return[ return[