feat: 教育管理员操作订阅计划& 刷新页面保持当前页面
This commit is contained in:
@@ -86,6 +86,16 @@
|
|||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="admin_state_item" v-if="title?.value == 'Edit'">
|
||||||
|
<span>{{ $t('admin.SubscribePlan') }}: <span>*</span></span>
|
||||||
|
<a-select
|
||||||
|
v-model:value="subscriptionPlanId"
|
||||||
|
style="width: 250px"
|
||||||
|
:options="planOptions"
|
||||||
|
:field-names="{ label: 'name', value: 'id' }"
|
||||||
|
:placeholder="$t('admin.SelectPlan')"
|
||||||
|
></a-select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="allUserPoeration_btn admin_page">
|
<div class="allUserPoeration_btn admin_page">
|
||||||
<div class="admin_search_item" @click="cancelDsign">{{ $t('admin.Close') }}</div>
|
<div class="admin_search_item" @click="cancelDsign">{{ $t('admin.Close') }}</div>
|
||||||
@@ -114,9 +124,16 @@ import md5 from "md5";
|
|||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {},
|
components: {},
|
||||||
|
props: {
|
||||||
|
planOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
},
|
||||||
emits: ["searchHistoryList"],
|
emits: ["searchHistoryList"],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const {t} = useI18n()
|
const {t} = useI18n()
|
||||||
|
const { planOptions } = toRefs(props)
|
||||||
let operations = reactive({
|
let operations = reactive({
|
||||||
operationsModal: false,
|
operationsModal: false,
|
||||||
operationsEdit: false,
|
operationsEdit: false,
|
||||||
@@ -130,6 +147,8 @@ export default defineComponent({
|
|||||||
password: "",
|
password: "",
|
||||||
oldPassword: "",
|
oldPassword: "",
|
||||||
credits: "",
|
credits: "",
|
||||||
|
subscriptionPlanId: "",
|
||||||
|
oldSubscriptionPlanId: ""
|
||||||
});
|
});
|
||||||
let state = ref([
|
let state = ref([
|
||||||
{
|
{
|
||||||
@@ -163,12 +182,18 @@ export default defineComponent({
|
|||||||
// operationsData.validStartTime='2024-08-05T00:00:06'
|
// operationsData.validStartTime='2024-08-05T00:00:06'
|
||||||
// operationsData.validEndTime='2024-08-05T00:00:06'
|
// operationsData.validEndTime='2024-08-05T00:00:06'
|
||||||
operationsData.credits = data.creditsUsageLimit;
|
operationsData.credits = data.creditsUsageLimit;
|
||||||
|
operationsData.subscriptionPlanId = data.subscriptionPlanId || "";
|
||||||
|
operationsData.oldSubscriptionPlanId = data.subscriptionPlanId || "";
|
||||||
// operationsData.accountId = data.accountId
|
// operationsData.accountId = data.accountId
|
||||||
// operationsData.userName = data.userName
|
// operationsData.userName = data.userName
|
||||||
// operationsData.userEmail = data.userEmail
|
// operationsData.userEmail = data.userEmail
|
||||||
// operationsData.validStartTime = formatTime(data.validStartTime)
|
// operationsData.validStartTime = formatTime(data.validStartTime)
|
||||||
// operationsData.validEndTime = formatTime(data.validEndTime)
|
// operationsData.validEndTime = formatTime(data.validEndTime)
|
||||||
}
|
}
|
||||||
|
if (funStr.value == "Add") {
|
||||||
|
operationsData.subscriptionPlanId = "";
|
||||||
|
operationsData.oldSubscriptionPlanId = "";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
let focus = (event) => {
|
let focus = (event) => {
|
||||||
if (operationsData.password == operationsData.oldPassword) {
|
if (operationsData.password == operationsData.oldPassword) {
|
||||||
@@ -187,6 +212,7 @@ export default defineComponent({
|
|||||||
userEmail: operationsData.userEmail,
|
userEmail: operationsData.userEmail,
|
||||||
userPassword: operationsData.password?md5(operationsData.password + "abc"):'',
|
userPassword: operationsData.password?md5(operationsData.password + "abc"):'',
|
||||||
userName: operationsData.userName,
|
userName: operationsData.userName,
|
||||||
|
subscriptionPlanId: operationsData.subscriptionPlanId
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
let setEditData = () => {
|
let setEditData = () => {
|
||||||
@@ -199,6 +225,7 @@ export default defineComponent({
|
|||||||
operationsData.password == operationsData.oldPassword
|
operationsData.password == operationsData.oldPassword
|
||||||
? null
|
? null
|
||||||
: md5(operationsData.password + "abc"),
|
: md5(operationsData.password + "abc"),
|
||||||
|
subscriptionPlanId: operationsData.subscriptionPlanId
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
let cancelDsign = () => {
|
let cancelDsign = () => {
|
||||||
@@ -207,6 +234,8 @@ export default defineComponent({
|
|||||||
operationsData.userEmail = "";
|
operationsData.userEmail = "";
|
||||||
operationsData.password = "";
|
operationsData.password = "";
|
||||||
operationsData.credits = "";
|
operationsData.credits = "";
|
||||||
|
operationsData.subscriptionPlanId = "";
|
||||||
|
operationsData.oldSubscriptionPlanId = "";
|
||||||
operations.operationsModal = false;
|
operations.operationsModal = false;
|
||||||
};
|
};
|
||||||
let setOk = () => {
|
let setOk = () => {
|
||||||
@@ -237,11 +266,26 @@ export default defineComponent({
|
|||||||
message.info("The email format is incorrect");
|
message.info("The email format is incorrect");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!data.userName || !data.userEmail)
|
if (!data.userName || !data.userEmail || !data.subscriptionPlanId)
|
||||||
return message.warning("Please check the input box marked with *");
|
return message.warning("Please check the input box marked with *");
|
||||||
|
const needSwitchPlan =
|
||||||
|
operationsData.subscriptionPlanId &&
|
||||||
|
operationsData.subscriptionPlanId !==
|
||||||
|
operationsData.oldSubscriptionPlanId;
|
||||||
Https.axiosPost(Https.httpUrls.addOrUpdateSubAccount, data).then(
|
Https.axiosPost(Https.httpUrls.addOrUpdateSubAccount, data).then(
|
||||||
(rv) => {
|
(rv) => {
|
||||||
if (rv) {
|
if (rv) {
|
||||||
|
if (needSwitchPlan) {
|
||||||
|
Https.axiosGet(
|
||||||
|
Https.httpUrls.switchSubAccountSubscribePlan,
|
||||||
|
{
|
||||||
|
params: {
|
||||||
|
targetSubscriptionPlanId: operationsData.subscriptionPlanId,
|
||||||
|
subAccId: operationsData.accountId,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
cancelDsign();
|
cancelDsign();
|
||||||
emit("searchHistoryList");
|
emit("searchHistoryList");
|
||||||
}
|
}
|
||||||
@@ -258,6 +302,7 @@ export default defineComponent({
|
|||||||
focus,
|
focus,
|
||||||
blur,
|
blur,
|
||||||
setOk,
|
setOk,
|
||||||
|
planOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -8,42 +8,14 @@
|
|||||||
style="width: 230px"
|
style="width: 230px"
|
||||||
class="range_picker"
|
class="range_picker"
|
||||||
v-model:value="rangePickerValue"
|
v-model:value="rangePickerValue"
|
||||||
:placeholder="[
|
:placeholder="[$t('HistoryPage.StartDate'), $t('HistoryPage.EndDate')]"
|
||||||
$t('HistoryPage.StartDate'),
|
|
||||||
$t('HistoryPage.EndDate'),
|
|
||||||
]"
|
|
||||||
valueFormat="YYYY-MM-DD"
|
valueFormat="YYYY-MM-DD"
|
||||||
>
|
>
|
||||||
<template #suffixIcon>
|
<template #suffixIcon>
|
||||||
<span
|
<span class="icon iconfont range_picker_icon icon-rili"></span>
|
||||||
class="icon iconfont range_picker_icon icon-rili"
|
|
||||||
></span>
|
|
||||||
</template>
|
</template>
|
||||||
</a-range-picker>
|
</a-range-picker>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="admin_state_item">
|
|
||||||
<span>Country or Region:</span>
|
|
||||||
<a-select
|
|
||||||
v-model:value="country"
|
|
||||||
:allowClear="true"
|
|
||||||
show-search
|
|
||||||
style="width: 230px"
|
|
||||||
:filter-option="filterOption"
|
|
||||||
placeholder="Select Item..."
|
|
||||||
max-tag-count="responsive"
|
|
||||||
:options="allCountry"
|
|
||||||
></a-select>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="admin_state_item">
|
|
||||||
<span>Email:</span>
|
|
||||||
<input
|
|
||||||
v-model="email"
|
|
||||||
placeholder="Please enter email"
|
|
||||||
@keydown.enter="gettrialList"
|
|
||||||
type="text"
|
|
||||||
style="width: 230px"
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
<div class="admin_state_item">
|
<div class="admin_state_item">
|
||||||
<span>{{ $t('admin.UserName') }}:</span>
|
<span>{{ $t('admin.UserName') }}:</span>
|
||||||
<a-select
|
<a-select
|
||||||
@@ -58,19 +30,6 @@
|
|||||||
@keydown.enter="gettrialList"
|
@keydown.enter="gettrialList"
|
||||||
></a-select>
|
></a-select>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="admin_state_item">
|
|
||||||
<span>User Type:</span>
|
|
||||||
<a-select
|
|
||||||
v-model:value="systemUser"
|
|
||||||
size="large"
|
|
||||||
style="width: 230px"
|
|
||||||
optionFilterProp="label"
|
|
||||||
:options="state"
|
|
||||||
placeholder="Please select"
|
|
||||||
allowClear
|
|
||||||
show-search
|
|
||||||
></a-select>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_search">
|
<div class="admin_search">
|
||||||
<div class="admin_search_item" @click="searchHistoryList">
|
<div class="admin_search_item" @click="searchHistoryList">
|
||||||
@@ -79,41 +38,60 @@
|
|||||||
<div class="admin_search_item" @click="addhHistoryList">
|
<div class="admin_search_item" @click="addhHistoryList">
|
||||||
{{ $t('admin.add') }}
|
{{ $t('admin.add') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_search_item" style="width: auto;padding: 0 2rem;" @click="downloadTemplate">
|
<div
|
||||||
|
class="admin_search_item"
|
||||||
|
style="width: auto; padding: 0 2rem"
|
||||||
|
@click="downloadTemplate"
|
||||||
|
>
|
||||||
{{ $t('admin.DownloadTemplate') }}
|
{{ $t('admin.DownloadTemplate') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_search_item" style="width: auto;padding: 0 2rem;" @click="uploadTemplate">
|
<div
|
||||||
|
class="admin_search_item"
|
||||||
|
style="width: auto; padding: 0 2rem"
|
||||||
|
@click="uploadTemplate"
|
||||||
|
>
|
||||||
{{ $t('admin.UploadTemplate') }}
|
{{ $t('admin.UploadTemplate') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_search_item" style="width: auto;padding: 0 2rem;" @click="ExportAccountData">
|
<div
|
||||||
|
class="admin_search_item"
|
||||||
|
style="width: auto; padding: 0 2rem"
|
||||||
|
@click="ExportAccountData"
|
||||||
|
>
|
||||||
{{ $t('admin.ExportAccountData') }}
|
{{ $t('admin.ExportAccountData') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_search_item" style="width: auto;padding: 0 2rem;" @click="deleteList">
|
<div
|
||||||
|
class="admin_search_item"
|
||||||
|
style="width: auto; padding: 0 2rem"
|
||||||
|
@click="deleteList"
|
||||||
|
>
|
||||||
{{ $t('admin.Delete') }}
|
{{ $t('admin.Delete') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_state_list">
|
<div class="admin_state_list">
|
||||||
<div
|
<div class="admin_state_list_item" @click="lastGeTrialList('year')">
|
||||||
class="admin_state_list_item"
|
|
||||||
@click="lastGeTrialList('year')"
|
|
||||||
>
|
|
||||||
{{ $t('admin.NearlyAYear') }}
|
{{ $t('admin.NearlyAYear') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="admin_state_list_item" @click="lastGeTrialList('month')">
|
||||||
class="admin_state_list_item"
|
|
||||||
@click="lastGeTrialList('month')"
|
|
||||||
>
|
|
||||||
{{ $t('admin.LastMonth') }}
|
{{ $t('admin.LastMonth') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="admin_state_list_item" @click="lastGeTrialList('week')">
|
||||||
class="admin_state_list_item"
|
|
||||||
@click="lastGeTrialList('week')"
|
|
||||||
>
|
|
||||||
{{ $t('admin.LastWeek') }}
|
{{ $t('admin.LastWeek') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin_table_content" ref="historyTable">
|
<div class="admin_table_content" ref="historyTable">
|
||||||
|
<div class="admin_state_list plan_list">
|
||||||
|
<div
|
||||||
|
v-for="plan in planFilterOptions"
|
||||||
|
:key="plan.id"
|
||||||
|
class="plan_item"
|
||||||
|
:class="{ active: subscriptionPlanId === plan.id }"
|
||||||
|
@click="selectPlanFilter(plan.id)"
|
||||||
|
>
|
||||||
|
<span class="plan_name">{{ plan.name }}</span>
|
||||||
|
<MoreOutlined class="plan_more_icon" @click.stop="openPlanRenameModal(plan)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<a-table
|
<a-table
|
||||||
@resizeColumn="handleResizeColumn"
|
@resizeColumn="handleResizeColumn"
|
||||||
:loading="tableLoading"
|
:loading="tableLoading"
|
||||||
@@ -123,14 +101,14 @@
|
|||||||
rowKey="id"
|
rowKey="id"
|
||||||
:scroll="{ y: historyTableHeight }"
|
:scroll="{ y: historyTableHeight }"
|
||||||
@change="changePage"
|
@change="changePage"
|
||||||
:showSorterTooltip='false'
|
:showSorterTooltip="false"
|
||||||
:pagination="{
|
:pagination="{
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
current: currentPage,
|
current: currentPage,
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
total: total,
|
total: total,
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
bordered: false,
|
bordered: false
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, text, record, index }">
|
<template #bodyCell="{ column, text, record, index }">
|
||||||
@@ -138,27 +116,45 @@
|
|||||||
<div
|
<div
|
||||||
class="operate_item"
|
class="operate_item"
|
||||||
@click="setAagree(record)"
|
@click="setAagree(record)"
|
||||||
style="margin-right: 2rem;"
|
style="margin-right: 2rem"
|
||||||
>
|
>
|
||||||
{{ $t('admin.Edit') }}
|
{{ $t('admin.Edit') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="operate_item" @click="deleteAagree(record)">
|
||||||
class="operate_item"
|
|
||||||
@click="deleteAagree(record)"
|
|
||||||
>
|
|
||||||
{{ $t('admin.Delete') }}
|
{{ $t('admin.Delete') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div
|
|
||||||
class="operate_item"
|
|
||||||
@click="deleteGroup(record, index)"
|
|
||||||
>
|
|
||||||
Delete
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<allUserPoerationsVue ref="allUserPoerationsVue" @searchHistoryList="searchHistoryList"></allUserPoerationsVue>
|
<allUserPoerationsVue
|
||||||
|
ref="allUserPoerationsVue"
|
||||||
|
@searchHistoryList="searchHistoryList"
|
||||||
|
:plan-options="planFilterOptions"
|
||||||
|
></allUserPoerationsVue>
|
||||||
|
<div class="renamePlanModal" ref="renamePlanModal"></div>
|
||||||
|
<!-- 重命名订阅计划弹窗 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="renamePlanModalVisible"
|
||||||
|
:title="$t('admin.RenamePlan')"
|
||||||
|
@ok="confirmRenamePlan"
|
||||||
|
@cancel="cancelRenamePlan"
|
||||||
|
:ok-text="$t('admin.OK')"
|
||||||
|
:cancel-text="$t('admin.Cancel')"
|
||||||
|
:get-container="() => $refs.renamePlanModal"
|
||||||
|
>
|
||||||
|
<div class="rename-plan-form">
|
||||||
|
<div class="admin_state_item">
|
||||||
|
<span>{{ $t('admin.PlanName') }}:</span>
|
||||||
|
<a-input
|
||||||
|
v-model:value="renamePlanForm.planName"
|
||||||
|
:placeholder="$t('admin.InputPlanName')"
|
||||||
|
style="width: 250px"
|
||||||
|
@pressEnter="confirmRenamePlan"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -170,196 +166,197 @@ import {
|
|||||||
reactive,
|
reactive,
|
||||||
toRefs,
|
toRefs,
|
||||||
onMounted,
|
onMounted,
|
||||||
} from "vue";
|
unref,
|
||||||
import { formatTime } from "@/tool/util";
|
watch
|
||||||
import { useStore } from "vuex";
|
} from 'vue'
|
||||||
import { Https } from "@/tool/https";
|
import { formatTime } from '@/tool/util'
|
||||||
import { Modal,message } from 'ant-design-vue';
|
import { useStore } from 'vuex'
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { Https } from '@/tool/https'
|
||||||
import allUserPoerationsVue from "./addAllUser.vue";
|
import { Modal, message, Input } from 'ant-design-vue'
|
||||||
|
import { ExclamationCircleOutlined, MoreOutlined } from '@ant-design/icons-vue'
|
||||||
|
import allUserPoerationsVue from './addAllUser.vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {allUserPoerationsVue,},
|
components: { allUserPoerationsVue, MoreOutlined },
|
||||||
setup() {
|
setup() {
|
||||||
const store:any = useStore()
|
const store: any = useStore()
|
||||||
const selectedRowKeys = ref([]) as any;
|
const currentOrganizationId = computed(
|
||||||
|
() => store.state.UserHabit.userDetail.organizationId
|
||||||
|
)
|
||||||
|
const selectedRowKeys = ref([]) as any
|
||||||
const onSelectChange = (changableRowKeys: string[]) => {
|
const onSelectChange = (changableRowKeys: string[]) => {
|
||||||
selectedRowKeys.value = changableRowKeys;
|
selectedRowKeys.value = changableRowKeys
|
||||||
};
|
}
|
||||||
let filter: any = reactive({
|
let filter: any = reactive({
|
||||||
dataList: [],
|
dataList: [],
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
allUserList: computed(()=>{
|
allUserList: computed(() => {
|
||||||
return store.state.adminPage.allUserList
|
return store.state.adminPage.allUserList
|
||||||
}),
|
}),
|
||||||
allCountry:[],
|
allCountry: [],
|
||||||
rowSelection:computed(() => {
|
rowSelection: computed(() => {
|
||||||
return {
|
return {
|
||||||
selectedRowKeys: unref(selectedRowKeys),
|
selectedRowKeys: unref(selectedRowKeys),
|
||||||
onChange: onSelectChange,
|
onChange: onSelectChange
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
const {t} = useI18n()
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
let filterData: any = reactive({
|
let filterData: any = reactive({
|
||||||
rangePickerValue: [],
|
rangePickerValue: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
country: "",
|
country: '',
|
||||||
email: "",
|
email: '',
|
||||||
userType: "",
|
userType: '',
|
||||||
ids: [],
|
ids: [],
|
||||||
occupation: "",
|
occupation: '',
|
||||||
systemUser: "",
|
systemUser: '',
|
||||||
order: "", //'Ascending 升序 Descending 降序'
|
order: '', //'Ascending 升序 Descending 降序'
|
||||||
orderBy:'',
|
orderBy: '',
|
||||||
userName: "",
|
userName: '',
|
||||||
});
|
subscriptionPlanId: ''
|
||||||
|
})
|
||||||
|
|
||||||
let renameData: any = ref({}); //修改名字选中的数据
|
let renameData: any = ref({}) //修改名字选中的数据
|
||||||
|
const renamePlanModalVisible = ref(false)
|
||||||
|
const renamePlanForm = reactive({
|
||||||
|
planId: null as number | null,
|
||||||
|
planName: ''
|
||||||
|
})
|
||||||
const columns: any = computed(() => {
|
const columns: any = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
title: t("admin.UserId"),
|
title: t('admin.UserId'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: "id",
|
dataIndex: 'id',
|
||||||
key: "id",
|
key: 'id',
|
||||||
width:100,
|
width: 100,
|
||||||
fixed: "left",
|
fixed: 'left',
|
||||||
sorter: true,
|
sorter: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.Email"),
|
title: t('admin.Email'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: "userEmail",
|
dataIndex: 'userEmail',
|
||||||
key: "userEmail",
|
key: 'userEmail',
|
||||||
width:200,
|
width: 200,
|
||||||
ellipsis:true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.UserName"),
|
title: t('admin.UserName'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: "userName",
|
dataIndex: 'userName',
|
||||||
key: "userName",
|
key: 'userName',
|
||||||
width:150,
|
width: 150,
|
||||||
ellipsis:true
|
ellipsis: true
|
||||||
// customRender: (record: any) => {
|
|
||||||
// let time = formatTime(
|
|
||||||
// record.text / 1000,
|
|
||||||
// "YYYY-MM-DD hh:mm:ss"
|
|
||||||
// );
|
|
||||||
// return time;
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.language"),
|
title: t('admin.language'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: "language",
|
dataIndex: 'language',
|
||||||
key: "language",
|
key: 'language',
|
||||||
width:100,
|
width: 100,
|
||||||
ellipsis:true,
|
ellipsis: true,
|
||||||
customRender: (record: any) => {
|
customRender: (record: any) => {
|
||||||
return t(`admin.${record.text}`);
|
return t(`admin.${record.text}`)
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.CreateDate"),
|
title: t('admin.CreateDate'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: "createDate",
|
dataIndex: 'createDate',
|
||||||
key: "createDate",
|
key: 'createDate',
|
||||||
width:200,
|
width: 200,
|
||||||
sorter: true,
|
sorter: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.Credits"),
|
title: t('admin.Credits'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
// width: 150,
|
dataIndex: 'credits',
|
||||||
// minWidth: 100,
|
key: 'credits',
|
||||||
// maxWidth: 200,
|
width: 100,
|
||||||
// resizable: true,
|
sorter: true
|
||||||
dataIndex: "credits",
|
|
||||||
key: "credits",
|
|
||||||
width:100,
|
|
||||||
sorter: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.CreditsUsage"),
|
title: t('admin.CreditsUsage'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: "creditsUsage",
|
dataIndex: 'creditsUsage',
|
||||||
key: "creditsUsage",
|
key: 'creditsUsage',
|
||||||
width:150,
|
width: 150,
|
||||||
sorter: true,
|
sorter: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.CreditsUsageLimit"),
|
title: t('admin.CreditsUsageLimit'),
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: "creditsUsageLimit",
|
dataIndex: 'creditsUsageLimit',
|
||||||
key: "creditsUsageLimit",
|
key: 'creditsUsageLimit',
|
||||||
width:200,
|
width: 200,
|
||||||
sorter: true,
|
sorter: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("admin.Operations"),
|
title: t('admin.Operations'),
|
||||||
key: "operation",
|
key: 'operation',
|
||||||
width:120,
|
width: 120,
|
||||||
align: "center",
|
align: 'center',
|
||||||
fixed: "right",
|
fixed: 'right',
|
||||||
// slots:{customRender:'action'}
|
Operations: true
|
||||||
Operations: true,
|
}
|
||||||
},
|
]
|
||||||
];
|
})
|
||||||
});
|
|
||||||
//改变页码
|
//改变页码
|
||||||
let changePage = (e: any, filters:any, sorter:any) => {
|
let changePage = (e: any, filters: any, sorter: any) => {
|
||||||
filterData.currentPage = e.current;
|
filterData.currentPage = e.current
|
||||||
filterData.pageSize = e.pageSize;
|
filterData.pageSize = e.pageSize
|
||||||
if(sorter.order){
|
if (sorter.order) {
|
||||||
if(sorter.columnKey == 'id'){
|
if (sorter.columnKey == 'id') {
|
||||||
filterData.orderBy = 'id'
|
filterData.orderBy = 'id'
|
||||||
}else if(sorter.columnKey == "createDate"){
|
} else if (sorter.columnKey == 'createDate') {
|
||||||
filterData.orderBy = 'time'
|
filterData.orderBy = 'time'
|
||||||
}else if(sorter.columnKey == "credits"){
|
} else if (sorter.columnKey == 'credits') {
|
||||||
filterData.orderBy = 'credits'
|
filterData.orderBy = 'credits'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(sorter.order){
|
if (sorter.order) {
|
||||||
filterData.order = sorter.order == "descend" ? "Descending" : "Ascending";
|
filterData.order = sorter.order == 'descend' ? 'Descending' : 'Ascending'
|
||||||
}else{
|
} else {
|
||||||
filterData.order = ''
|
filterData.order = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
gettrialList();
|
gettrialList()
|
||||||
};
|
}
|
||||||
|
|
||||||
//查询列表
|
//查询列表
|
||||||
let searchHistoryList = () => {
|
let searchHistoryList = () => {
|
||||||
filterData.currentPage = 1;
|
filterData.currentPage = 1
|
||||||
gettrialList();
|
gettrialList()
|
||||||
};
|
}
|
||||||
let clearHistoryList = () => {
|
let clearHistoryList = () => {
|
||||||
filterData.rangePickerValue = [],
|
;(filterData.rangePickerValue = []),
|
||||||
filterData.currentPage = 1,
|
(filterData.currentPage = 1),
|
||||||
filterData.pageSize = 10,
|
(filterData.pageSize = 10),
|
||||||
filterData.total = 0,
|
(filterData.total = 0),
|
||||||
filterData.country = "",
|
(filterData.country = ''),
|
||||||
filterData.email = "",
|
(filterData.email = ''),
|
||||||
filterData.userType = "",
|
(filterData.userType = ''),
|
||||||
filterData.ids = [],
|
(filterData.ids = []),
|
||||||
filterData.occupation = "",
|
(filterData.occupation = ''),
|
||||||
filterData.order = "", //'Ascending 升序 Descending 降序'
|
(filterData.order = ''), //'Ascending 升序 Descending 降序'
|
||||||
filterData.orderBy = "", //'Ascending 升序 Descending 降序'
|
(filterData.orderBy = ''), //'Ascending 升序 Descending 降序'
|
||||||
filterData.systemUser = "",
|
(filterData.systemUser = ''),
|
||||||
filterData.userName = "";
|
(filterData.userName = ''),
|
||||||
};
|
(filterData.subscriptionPlanId = '')
|
||||||
|
}
|
||||||
let setHistoryListData = () => {
|
let setHistoryListData = () => {
|
||||||
let startDate: any = filterData.rangePickerValue?.[0]
|
let startDate: any = filterData.rangePickerValue?.[0]
|
||||||
? filterData.rangePickerValue[0] + " " + "00:00:00"
|
? filterData.rangePickerValue[0] + ' ' + '00:00:00'
|
||||||
: "";
|
: ''
|
||||||
let endDate: any = filterData.rangePickerValue?.[1]
|
let endDate: any = filterData.rangePickerValue?.[1]
|
||||||
? filterData.rangePickerValue[1] + " " + "23:59:59"
|
? filterData.rangePickerValue[1] + ' ' + '23:59:59'
|
||||||
: "";
|
: ''
|
||||||
let data = {
|
let data = {
|
||||||
endTime: endDate,
|
endTime: endDate,
|
||||||
startTime: startDate,
|
startTime: startDate,
|
||||||
@@ -375,150 +372,241 @@ export default defineComponent({
|
|||||||
orderBy: filterData.orderBy,
|
orderBy: filterData.orderBy,
|
||||||
// userName: filterData.userName,
|
// userName: filterData.userName,
|
||||||
userName: filterData.ids,
|
userName: filterData.ids,
|
||||||
|
subscriptionPlanId: filterData.subscriptionPlanId
|
||||||
};
|
}
|
||||||
return data;
|
return data
|
||||||
};
|
}
|
||||||
//获取列表
|
//获取列表
|
||||||
let gettrialList = () => {
|
const gettrialList = () => {
|
||||||
filter.tableLoading = true;
|
filter.tableLoading = true
|
||||||
let data = setHistoryListData();
|
let data = setHistoryListData()
|
||||||
Https.axiosPost(Https.httpUrls.subAccountList, data).then(
|
Https.axiosPost(Https.httpUrls.subAccountList, data).then((rv: any) => {
|
||||||
(rv: any) => {
|
|
||||||
if (rv) {
|
if (rv) {
|
||||||
console.log(rv)
|
filter.dataList = rv.content
|
||||||
// this.dataList = rv
|
filterData.total = rv.total
|
||||||
filter.dataList = rv.content;
|
filter.tableLoading = false
|
||||||
filterData.total = rv.total;
|
|
||||||
filter.tableLoading = false;
|
|
||||||
|
|
||||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
);
|
|
||||||
};
|
|
||||||
let lastGeTrialList = (str: string) => {
|
let lastGeTrialList = (str: string) => {
|
||||||
clearHistoryList();
|
clearHistoryList()
|
||||||
let currentDate = new Date();
|
let currentDate = new Date()
|
||||||
let currentTimestamp = Math.floor(currentDate.getTime() / 1000);
|
let currentTimestamp = Math.floor(currentDate.getTime() / 1000)
|
||||||
// 计算30天前的时间戳
|
// 计算30天前的时间戳
|
||||||
let thirtyDaysAgoTimestamp;
|
let thirtyDaysAgoTimestamp
|
||||||
if (str == "year") {
|
if (str == 'year') {
|
||||||
thirtyDaysAgoTimestamp = currentTimestamp - 360 * 24 * 60 * 60;
|
thirtyDaysAgoTimestamp = currentTimestamp - 360 * 24 * 60 * 60
|
||||||
} else if (str == "month") {
|
} else if (str == 'month') {
|
||||||
thirtyDaysAgoTimestamp = currentTimestamp - 30 * 24 * 60 * 60;
|
thirtyDaysAgoTimestamp = currentTimestamp - 30 * 24 * 60 * 60
|
||||||
} else if (str == "week") {
|
} else if (str == 'week') {
|
||||||
thirtyDaysAgoTimestamp = currentTimestamp - 7 * 24 * 60 * 60;
|
thirtyDaysAgoTimestamp = currentTimestamp - 7 * 24 * 60 * 60
|
||||||
|
}
|
||||||
|
filterData.rangePickerValue[0] = formatTime(thirtyDaysAgoTimestamp, 'YYYY-MM-DD')
|
||||||
|
gettrialList()
|
||||||
}
|
}
|
||||||
filterData.rangePickerValue[0] = formatTime(
|
|
||||||
thirtyDaysAgoTimestamp,
|
|
||||||
"YYYY-MM-DD"
|
|
||||||
);
|
|
||||||
gettrialList();
|
|
||||||
};
|
|
||||||
let filterOption = (input: any, option: any) => {
|
let filterOption = (input: any, option: any) => {
|
||||||
// 使用 option.label 进行搜索
|
// 使用 option.label 进行搜索
|
||||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
};
|
}
|
||||||
|
// 订阅计划筛选(按钮点击)
|
||||||
|
const selectPlanFilter = async (planId: string) => {
|
||||||
|
filterData.subscriptionPlanId = planId
|
||||||
|
// 切换管理员订阅计划
|
||||||
|
Https.axiosGet(Https.httpUrls.switchSubscribePlan, {
|
||||||
|
params: {
|
||||||
|
targetSubscriptionPlanId: planId,
|
||||||
|
adminAccId: store.state.UserHabit.userDetail.id
|
||||||
|
}
|
||||||
|
}).then((res: any) => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
searchHistoryList()
|
||||||
|
}
|
||||||
|
const planFilterOptions = ref([])
|
||||||
|
const fetchSubscribePlanList = () => {
|
||||||
|
const orgId = currentOrganizationId.value
|
||||||
|
if (!orgId) return
|
||||||
|
Https.axiosPost(Https.httpUrls.searchSubscribeByOrg, {
|
||||||
|
organizationId: orgId,
|
||||||
|
status: ['PENDING', 'ACTIVE']
|
||||||
|
}).then(res => {
|
||||||
|
// 将与当前用户 subscriptionPlanId 相同的订阅计划放到第一个
|
||||||
|
const userSubscriptionPlanId = store.state.UserHabit.userDetail.subscriptionPlanId
|
||||||
|
if (userSubscriptionPlanId && Array.isArray(res)) {
|
||||||
|
const sortedList = [...res].sort((a: any, b: any) => {
|
||||||
|
const isAUserPlan = a.id == userSubscriptionPlanId
|
||||||
|
const isBUserPlan = b.id == userSubscriptionPlanId
|
||||||
|
if (isAUserPlan && !isBUserPlan) return -1
|
||||||
|
if (!isAUserPlan && isBUserPlan) return 1
|
||||||
|
return 0
|
||||||
|
})
|
||||||
|
planFilterOptions.value = sortedList
|
||||||
|
} else {
|
||||||
|
planFilterOptions.value = res
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 监听组织ID,获取到值后再拉取订阅计划
|
||||||
|
watch(
|
||||||
|
() => currentOrganizationId.value,
|
||||||
|
orgId => {
|
||||||
|
if (orgId) {
|
||||||
|
fetchSubscribePlanList()
|
||||||
|
const userSubscriptionPlanId = store.state.UserHabit.userDetail.subscriptionPlanId
|
||||||
|
if (userSubscriptionPlanId) {
|
||||||
|
selectPlanFilter(userSubscriptionPlanId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
// 打开重命名弹窗(基于当前点击的计划)
|
||||||
|
const openPlanRenameModal = plan => {
|
||||||
|
renamePlanForm.planId = plan.id
|
||||||
|
renamePlanForm.planName = plan?.name || ''
|
||||||
|
renamePlanModalVisible.value = true
|
||||||
|
console.log(renamePlanForm)
|
||||||
|
}
|
||||||
let addhHistoryList = () => {
|
let addhHistoryList = () => {
|
||||||
allUserPoerationsVue.value.init({value:'Add',label:t('admin.add')},'')
|
allUserPoerationsVue.value.init({ value: 'Add', label: t('admin.add') }, '')
|
||||||
};
|
}
|
||||||
let allUserPoerationsVue = ref()
|
let allUserPoerationsVue = ref()
|
||||||
let setAagree = (data:any) =>{
|
let setAagree = (data: any) => {
|
||||||
allUserPoerationsVue.value.init({value:'Edit',label:t('admin.Edit')},data)
|
allUserPoerationsVue.value.init({ value: 'Edit', label: t('admin.Edit') }, data)
|
||||||
}
|
}
|
||||||
const downloadTemplate = ()=>{
|
const downloadTemplate = () => {
|
||||||
Https.axiosGet(Https.httpUrls.subAccountImportExcelDownload,{responseType: 'blob',env:{binary:true}}).then((rv:any)=>{
|
Https.axiosGet(Https.httpUrls.subAccountImportExcelDownload, {
|
||||||
const link = document.createElement('a');
|
responseType: 'blob',
|
||||||
link.href = rv.url;
|
env: { binary: true }
|
||||||
link.download = 'file.xlsx'; // 设置正确的文件扩展名
|
}).then((rv: any) => {
|
||||||
document.body.appendChild(link);
|
const link = document.createElement('a')
|
||||||
link.click();
|
link.href = rv.url
|
||||||
document.body.removeChild(link);
|
link.download = 'file.xlsx' // 设置正确的文件扩展名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
// 释放 URL 对象
|
// 释放 URL 对象
|
||||||
URL.revokeObjectURL(link.href);
|
URL.revokeObjectURL(link.href)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const ExportAccountData = ()=>{
|
const ExportAccountData = () => {
|
||||||
Https.axiosGet(Https.httpUrls.exportAccountsToExcel,{headers:{responseType: 'blob',},env:{binary:true,binaryType:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'}}).then((rv:any)=>{
|
Https.axiosGet(Https.httpUrls.exportAccountsToExcel, {
|
||||||
const link = document.createElement('a');
|
headers: { responseType: 'blob' },
|
||||||
link.href = rv.url;
|
env: {
|
||||||
link.download = 'file.xlsx'; // 设置正确的文件扩展名
|
binary: true,
|
||||||
document.body.appendChild(link);
|
binaryType:
|
||||||
link.click();
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'
|
||||||
document.body.removeChild(link);
|
}
|
||||||
|
}).then((rv: any) => {
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = rv.url
|
||||||
|
link.download = 'file.xlsx' // 设置正确的文件扩展名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
// 释放 URL 对象
|
// 释放 URL 对象
|
||||||
URL.revokeObjectURL(link.href);
|
URL.revokeObjectURL(link.href)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const uploadTemplate = ()=>{
|
const uploadTemplate = () => {
|
||||||
const fileInput = document.createElement('input');
|
const fileInput = document.createElement('input')
|
||||||
fileInput.type = 'file';
|
fileInput.type = 'file'
|
||||||
fileInput.accept = '.xlsx'; // 只接受 .xlsx 文件
|
fileInput.accept = '.xlsx' // 只接受 .xlsx 文件
|
||||||
fileInput.onchange = (event:any) => {
|
fileInput.onchange = (event: any) => {
|
||||||
const file = event.target.files[0]; // 获取选择的文件
|
const file = event.target.files[0] // 获取选择的文件
|
||||||
if (file) {
|
if (file) {
|
||||||
let param = new FormData();
|
let param = new FormData()
|
||||||
param.append('file',file);
|
param.append('file', file)
|
||||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
let config: any = {
|
||||||
Https.axiosPost(Https.httpUrls.subAccountImport,param,config)
|
headers: { 'Content-Type': 'multipart/form-data', 'Accept': '*/*' }
|
||||||
.then((rv:any)=>{
|
|
||||||
gettrialList();
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
};
|
Https.axiosPost(Https.httpUrls.subAccountImport, param, config).then(
|
||||||
fileInput.click();
|
(rv: any) => {
|
||||||
|
gettrialList()
|
||||||
}
|
}
|
||||||
const confirmDelete = ()=>{
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileInput.click()
|
||||||
|
}
|
||||||
|
const confirmDelete = () => {
|
||||||
return new Promise<void>((resolve, reject) => {
|
return new Promise<void>((resolve, reject) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('admin.jsDelete'),
|
title: t('admin.jsDelete'),
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
okText: 'Yes',
|
okText: 'Yes',
|
||||||
cancelText: 'No',
|
cancelText: 'No',
|
||||||
centered:true,
|
centered: true,
|
||||||
onOk() {
|
onOk() {
|
||||||
resolve(true)
|
resolve(true)
|
||||||
},
|
},
|
||||||
onCancel(){
|
onCancel() {
|
||||||
resolve(false)
|
resolve(false)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const deleteList = async ()=>{
|
const deleteList = async () => {
|
||||||
console.log(selectedRowKeys.value)
|
console.log(selectedRowKeys.value)
|
||||||
if(selectedRowKeys.value.length == 0)return
|
if (selectedRowKeys.value.length == 0) return
|
||||||
let boolean:any = await confirmDelete()
|
let boolean: any = await confirmDelete()
|
||||||
if(!boolean){
|
if (!boolean) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Https.axiosPost(Https.httpUrls.deleteSubAccount,{deleteIdList:selectedRowKeys.value})
|
Https.axiosPost(Https.httpUrls.deleteSubAccount, {
|
||||||
.then((rv:any)=>{
|
deleteIdList: selectedRowKeys.value
|
||||||
gettrialList();
|
}).then((rv: any) => {
|
||||||
|
gettrialList()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const deleteAagree = async (event:any)=>{
|
const deleteAagree = async (event: any) => {
|
||||||
let boolean:any = await confirmDelete()
|
let boolean: any = await confirmDelete()
|
||||||
if(!boolean){
|
if (!boolean) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const value = {
|
const value = {
|
||||||
deleteIdList:[event.id]
|
deleteIdList: [event.id]
|
||||||
}
|
}
|
||||||
Https.axiosPost(Https.httpUrls.deleteSubAccount,value)
|
Https.axiosPost(Https.httpUrls.deleteSubAccount, value).then((rv: any) => {
|
||||||
.then((rv:any)=>{
|
gettrialList()
|
||||||
gettrialList();
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
|
||||||
let allCountry: any = sessionStorage.getItem("allCountry");
|
// 确认重命名
|
||||||
if (allCountry) {
|
const confirmRenamePlan = () => {
|
||||||
filter.allCountry = JSON.parse(allCountry);
|
if (!renamePlanForm.planName || !renamePlanForm.planName.trim()) {
|
||||||
|
message.warning(t('admin.PlanNameRequired'))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
gettrialList();
|
|
||||||
});
|
Https.axiosPost(Https.httpUrls.updateSubscribePlan, {
|
||||||
|
id: renamePlanForm.planId,
|
||||||
|
name: renamePlanForm.planName.trim()
|
||||||
|
})
|
||||||
|
.then((rv: any) => {
|
||||||
|
message.success(t('admin.RenamePlanSuccess'))
|
||||||
|
renamePlanModalVisible.value = false
|
||||||
|
fetchSubscribePlanList()
|
||||||
|
})
|
||||||
|
.catch((error: any) => {
|
||||||
|
message.error(error.message || t('admin.RenamePlanFailed'))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 取消重命名
|
||||||
|
const cancelRenamePlan = () => {
|
||||||
|
renamePlanModalVisible.value = false
|
||||||
|
renamePlanForm.planId = null
|
||||||
|
renamePlanForm.planName = ''
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
let allCountry: any = sessionStorage.getItem('allCountry')
|
||||||
|
if (allCountry) {
|
||||||
|
filter.allCountry = JSON.parse(allCountry)
|
||||||
|
}
|
||||||
|
gettrialList()
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
...toRefs(filter),
|
...toRefs(filter),
|
||||||
...toRefs(filterData),
|
...toRefs(filterData),
|
||||||
@@ -537,22 +625,29 @@ export default defineComponent({
|
|||||||
uploadTemplate,
|
uploadTemplate,
|
||||||
deleteList,
|
deleteList,
|
||||||
deleteAagree,
|
deleteAagree,
|
||||||
};
|
planFilterOptions,
|
||||||
|
selectPlanFilter,
|
||||||
|
openPlanRenameModal,
|
||||||
|
renamePlanModalVisible,
|
||||||
|
renamePlanForm,
|
||||||
|
confirmRenamePlan,
|
||||||
|
cancelRenamePlan,
|
||||||
|
fetchSubscribePlanList
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
historyTableHeight: 0,
|
historyTableHeight: 0,
|
||||||
handleResizeColumn: (w: any, col: any) => {
|
handleResizeColumn: (w: any, col: any) => {
|
||||||
col.width = w;
|
col.width = w
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let historyTable: any = this.$refs.historyTable;
|
let historyTable: any = this.$refs.historyTable
|
||||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
this.historyTableHeight = historyTable.clientHeight - 200
|
||||||
},
|
}
|
||||||
methods: {},
|
})
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.admin_page .admin_table_search .admin_state {
|
.admin_page .admin_table_search .admin_state {
|
||||||
@@ -565,9 +660,69 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
> .admin_search_item{
|
> .admin_search_item {
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.plan_list {
|
||||||
|
margin-top: 1rem;
|
||||||
|
display: flex;
|
||||||
|
// flex-wrap: wrap;
|
||||||
|
padding-left: 2.8rem;
|
||||||
|
column-gap: 0.6rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
.plan_item {
|
||||||
|
height: 4rem;
|
||||||
|
width: auto;
|
||||||
|
min-width: 10rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
// font-size: 1.8rem;
|
||||||
|
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: 1.3rem;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 1.8px solid #000;
|
||||||
|
background-color: #000;
|
||||||
|
padding: 0 1rem 0 2rem;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #000;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.plan_item {
|
||||||
|
column-gap: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plan_more_icon {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.subscription-plan-cell {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.rename-plan-form {
|
||||||
|
padding: 2rem 0;
|
||||||
|
.admin_state_item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> span {
|
||||||
|
width: 10rem;
|
||||||
|
margin-right: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -58,6 +58,16 @@
|
|||||||
:options="allUserList"
|
:options="allUserList"
|
||||||
></a-select>
|
></a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item label="Status">
|
||||||
|
<a-select
|
||||||
|
v-model:value="searchForm.status"
|
||||||
|
mode="multiple"
|
||||||
|
allow-clear
|
||||||
|
placeholder="Select Status"
|
||||||
|
style="width: 220px"
|
||||||
|
:options="statusOption"
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
@@ -94,13 +104,10 @@
|
|||||||
>
|
>
|
||||||
{{ formatTime(record[column.key], 'YYYY-MM-DD hh:mm:ss') }}
|
{{ formatTime(record[column.key], 'YYYY-MM-DD hh:mm:ss') }}
|
||||||
</template>
|
</template>
|
||||||
<!-- <template v-if="column.key === 'organizationId'">
|
|
||||||
{{ organizationOptions.find(item => item.id === record[column.key]).name }}
|
|
||||||
</template> -->
|
|
||||||
|
|
||||||
<template v-if="column.key === 'status'">
|
<template v-if="column.key === 'status'">
|
||||||
<a-tag :color="statusColorMap[record.status]">
|
<a-tag :color="getStatusColor(record.status)">
|
||||||
{{ statusLabelMap[record.status] }}
|
{{ record.status }}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'adminAccId'">
|
<template v-if="column.key === 'adminAccId'">
|
||||||
@@ -200,7 +207,6 @@
|
|||||||
@popupScroll="handleOrganizationScroll"
|
@popupScroll="handleOrganizationScroll"
|
||||||
@select="handleOrganizationSelect"
|
@select="handleOrganizationSelect"
|
||||||
@change="handleOrganizationChange"
|
@change="handleOrganizationChange"
|
||||||
:disabled="isEditMode"
|
|
||||||
>
|
>
|
||||||
<a-select-option value="ADD_ORGANIZATION" class="add-organization-option">
|
<a-select-option value="ADD_ORGANIZATION" class="add-organization-option">
|
||||||
+ 添加组织
|
+ 添加组织
|
||||||
@@ -291,7 +297,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="subscriptionPlan_btn admin_page">
|
<div class="subscriptionPlan_btn admin_page">
|
||||||
<div class="admin_search_item" @click="cancelModal">Close</div>
|
<div class="admin_search_item" @click="cancelModal">Close</div>
|
||||||
<div class="admin_search_item" @click="handleSubmit">OK</div>
|
<div class="admin_search_item" @click="handleSubmitDebounced">OK</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
@@ -359,8 +365,9 @@ import { Https } from '@/tool/https'
|
|||||||
import { formatTime } from '@/tool/util'
|
import { formatTime } from '@/tool/util'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import type { FormInstance, Rule } from 'ant-design-vue/es/form'
|
import type { FormInstance, Rule } from 'ant-design-vue/es/form'
|
||||||
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
type PlanStatus = 'active' | 'paused' | 'ended'
|
type PlanStatus = 'PENDING' | 'ACTIVE' | 'EXPIRED'
|
||||||
interface SubscriptionPlan {
|
interface SubscriptionPlan {
|
||||||
id: number
|
id: number
|
||||||
name: string
|
name: string
|
||||||
@@ -381,6 +388,7 @@ const searchForm = reactive({
|
|||||||
endTime: '',
|
endTime: '',
|
||||||
organizationId: undefined as string | undefined,
|
organizationId: undefined as string | undefined,
|
||||||
adminAccId: undefined as string | undefined,
|
adminAccId: undefined as string | undefined,
|
||||||
|
status: [] as PlanStatus[] | [],
|
||||||
id: '',
|
id: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
@@ -413,16 +421,39 @@ const organizationForm = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const statusLabelMap: Record<PlanStatus, string> = {
|
const statusLabelMap: Record<PlanStatus, string> = {
|
||||||
active: 'Active',
|
PENDING: 'Pending',
|
||||||
paused: 'Paused',
|
ACTIVE: 'Active',
|
||||||
ended: 'Ended'
|
EXPIRED: 'Expired'
|
||||||
}
|
}
|
||||||
const statusColorMap: Record<PlanStatus, string> = {
|
const statusColorMap: Record<PlanStatus, string> = {
|
||||||
active: 'green',
|
PENDING: 'blue',
|
||||||
paused: 'orange',
|
ACTIVE: 'green',
|
||||||
ended: 'red'
|
EXPIRED: 'red'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const statusOption = ref([
|
||||||
|
{
|
||||||
|
label: 'Pending',
|
||||||
|
value: 'PENDING'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Active',
|
||||||
|
value: 'ACTIVE'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Expired',
|
||||||
|
value: 'EXPIRED'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const normalizeStatus = (status?: string): PlanStatus | undefined => {
|
||||||
|
if (!status) return undefined
|
||||||
|
const upper = status.toUpperCase() as PlanStatus
|
||||||
|
return upper
|
||||||
|
}
|
||||||
|
const getStatusColor = (status?: string) =>
|
||||||
|
statusColorMap[normalizeStatus(status) as PlanStatus] || 'default'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: 'Name', dataIndex: 'name', key: 'name' },
|
{ title: 'Name', dataIndex: 'name', key: 'name' },
|
||||||
{ title: 'ID', dataIndex: 'id', key: 'id' },
|
{ title: 'ID', dataIndex: 'id', key: 'id' },
|
||||||
@@ -452,16 +483,7 @@ const handleFetchTableData = async () => {
|
|||||||
tableLoading.value = true
|
tableLoading.value = true
|
||||||
return Https.axiosPost(Https.httpUrls.searchAllSubscribePlan, searchForm)
|
return Https.axiosPost(Https.httpUrls.searchAllSubscribePlan, searchForm)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
tableData.value = res.records.map(item => {
|
tableData.value = res.records
|
||||||
const organization = organizationOptions.value.find(
|
|
||||||
el => el.id === item.organizationId
|
|
||||||
) || { name: '' }
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
organizationName: organization.name || ''
|
|
||||||
}
|
|
||||||
debugger
|
|
||||||
})
|
|
||||||
searchForm.total = res.total
|
searchForm.total = res.total
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -490,6 +512,7 @@ const handleReset = () => {
|
|||||||
searchForm.endTime = ''
|
searchForm.endTime = ''
|
||||||
searchForm.organizationId = undefined
|
searchForm.organizationId = undefined
|
||||||
searchForm.adminAccId = undefined
|
searchForm.adminAccId = undefined
|
||||||
|
searchForm.status = []
|
||||||
searchForm.id = ''
|
searchForm.id = ''
|
||||||
handleSearch()
|
handleSearch()
|
||||||
}
|
}
|
||||||
@@ -508,8 +531,8 @@ const openEdit = (record: SubscriptionPlan) => {
|
|||||||
modalTitle.value = 'Edit Subscription Plan'
|
modalTitle.value = 'Edit Subscription Plan'
|
||||||
isEditMode.value = true
|
isEditMode.value = true
|
||||||
formState.name = record.name
|
formState.name = record.name
|
||||||
formState.currentPeriodStart = record.currentPeriodStart
|
formState.currentPeriodStart = String(record.currentPeriodStart)
|
||||||
formState.currentPeriodEnd = record.currentPeriodEnd
|
formState.currentPeriodEnd = String(record.currentPeriodEnd)
|
||||||
formState.organizationId = record.organizationId
|
formState.organizationId = record.organizationId
|
||||||
formState.adminAccId = record.adminAccId
|
formState.adminAccId = record.adminAccId
|
||||||
formState.creditLimit = record.creditLimit
|
formState.creditLimit = record.creditLimit
|
||||||
@@ -590,6 +613,12 @@ const handleSubmit = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 防抖包装,避免重复点击
|
||||||
|
const handleSubmitDebounced = debounce(handleSubmit, 500, {
|
||||||
|
leading: true,
|
||||||
|
trailing: false
|
||||||
|
})
|
||||||
|
|
||||||
const cancelModal = () => {
|
const cancelModal = () => {
|
||||||
modalVisible.value = false
|
modalVisible.value = false
|
||||||
resetFormState()
|
resetFormState()
|
||||||
|
|||||||
@@ -1530,7 +1530,22 @@ export default {
|
|||||||
Relight: '打光',
|
Relight: '打光',
|
||||||
ChatRobot: '对话生成',
|
ChatRobot: '对话生成',
|
||||||
Yes: '是',
|
Yes: '是',
|
||||||
No: '否'
|
No: '否',
|
||||||
|
SubscribePlan: '订阅计划',
|
||||||
|
SwitchPlanSuccess: '切换订阅计划成功',
|
||||||
|
SwitchPlanFailed: '切换订阅计划失败',
|
||||||
|
NoPlanSelected: '请先选择订阅计划',
|
||||||
|
PlanNameRequired: '请输入计划名称',
|
||||||
|
PlanNotFound: '计划不存在',
|
||||||
|
RenamePlanSuccess: '重命名成功',
|
||||||
|
RenamePlanFailed: '重命名失败',
|
||||||
|
RenamePlan: '重命名订阅计划',
|
||||||
|
PlanName: '计划名称',
|
||||||
|
InputPlanName: '请输入计划名称',
|
||||||
|
OK: '确定',
|
||||||
|
Cancel: '取消',
|
||||||
|
SelectPlan: '选择计划',
|
||||||
|
AllPlan: '全部'
|
||||||
},
|
},
|
||||||
Login: {
|
Login: {
|
||||||
Login: '登录',
|
Login: '登录',
|
||||||
|
|||||||
@@ -1574,7 +1574,22 @@ export default {
|
|||||||
Relight: 'Relight',
|
Relight: 'Relight',
|
||||||
ChatRobot: 'ChatRobot',
|
ChatRobot: 'ChatRobot',
|
||||||
Yes: 'Yes',
|
Yes: 'Yes',
|
||||||
No: 'No'
|
No: 'No',
|
||||||
|
SubscribePlan:'Subscribe Plan',
|
||||||
|
SwitchPlanSuccess: 'Switch subscription plan successfully',
|
||||||
|
SwitchPlanFailed: 'Failed to switch subscription plan',
|
||||||
|
NoPlanSelected: 'Please select a subscription plan first',
|
||||||
|
PlanNameRequired: 'Please enter plan name',
|
||||||
|
PlanNotFound: 'Plan not found',
|
||||||
|
RenamePlanSuccess: 'Rename successfully',
|
||||||
|
RenamePlanFailed: 'Failed to rename',
|
||||||
|
RenamePlan: 'Rename Subscription Plan',
|
||||||
|
PlanName: 'Plan Name',
|
||||||
|
InputPlanName: 'Please enter plan name',
|
||||||
|
OK: 'OK',
|
||||||
|
Cancel: 'Cancel',
|
||||||
|
SelectPlan: 'Select Plan',
|
||||||
|
AllPlan:'All'
|
||||||
},
|
},
|
||||||
Login: {
|
Login: {
|
||||||
Login: 'Login',
|
Login: 'Login',
|
||||||
|
|||||||
@@ -80,12 +80,14 @@ const userHabit : Module<UserHabit,RootState> = {
|
|||||||
systemList:[],
|
systemList:[],
|
||||||
expireTime:null,
|
expireTime:null,
|
||||||
language:'',
|
language:'',
|
||||||
|
organizationId: null,
|
||||||
timeData:{
|
timeData:{
|
||||||
isExpiration:false,
|
isExpiration:false,
|
||||||
text:''
|
text:''
|
||||||
},
|
},
|
||||||
subscriptionType:null,
|
subscriptionType:null,
|
||||||
subscriptionId:null,
|
subscriptionId:null,
|
||||||
|
subscriptionPlanId:null,
|
||||||
usernameModify:0,
|
usernameModify:0,
|
||||||
occupation:'',//职业
|
occupation:'',//职业
|
||||||
country:'',//国家
|
country:'',//国家
|
||||||
@@ -195,12 +197,14 @@ const userHabit : Module<UserHabit,RootState> = {
|
|||||||
systemList:[],
|
systemList:[],
|
||||||
expireTime:null,
|
expireTime:null,
|
||||||
language:'',
|
language:'',
|
||||||
|
organizationId: null,
|
||||||
timeData:{
|
timeData:{
|
||||||
isExpiration:false,
|
isExpiration:false,
|
||||||
text:''
|
text:''
|
||||||
},
|
},
|
||||||
subscriptionType:null,
|
subscriptionType:null,
|
||||||
subscriptionId:null,
|
subscriptionId:null,
|
||||||
|
subscriptionPlanId:null,
|
||||||
//是否是affiliate用户
|
//是否是affiliate用户
|
||||||
affiliate:false,
|
affiliate:false,
|
||||||
usernameModify:0,
|
usernameModify:0,
|
||||||
@@ -230,6 +234,7 @@ const userHabit : Module<UserHabit,RootState> = {
|
|||||||
state.userDetail.avatar = data.avatar//头像
|
state.userDetail.avatar = data.avatar//头像
|
||||||
state.userDetail.country = data.country//头像
|
state.userDetail.country = data.country//头像
|
||||||
state.userDetail.occupation = data.occupation//头像
|
state.userDetail.occupation = data.occupation//头像
|
||||||
|
state.userDetail.organizationId = data.organizationId //所属组织
|
||||||
state.userDetail.usernameModify = data.usernameModify//当月剩余修改次数
|
state.userDetail.usernameModify = data.usernameModify//当月剩余修改次数
|
||||||
state.userDetail.isBeginner = data.isBeginner == 1 ? true : false;//是否完成新手指引
|
state.userDetail.isBeginner = data.isBeginner == 1 ? true : false;//是否完成新手指引
|
||||||
state.userDetail.title = data.title//当月剩余修改次数
|
state.userDetail.title = data.title//当月剩余修改次数
|
||||||
@@ -315,6 +320,7 @@ const userHabit : Module<UserHabit,RootState> = {
|
|||||||
state.userDetail.status = data.status//当前订阅类型
|
state.userDetail.status = data.status//当前订阅类型
|
||||||
// state.userDetail.status = data.status || 'active'//当前订阅类型
|
// state.userDetail.status = data.status || 'active'//当前订阅类型
|
||||||
state.userDetail.subscriptionId = data.subscriptionId//最新订阅id
|
state.userDetail.subscriptionId = data.subscriptionId//最新订阅id
|
||||||
|
state.userDetail.subscriptionPlanId = data.subscriptionPlanId//最新订阅计划id
|
||||||
},
|
},
|
||||||
setUpgradePlan(state,data){
|
setUpgradePlan(state,data){
|
||||||
state.upgradePlan.value = data
|
state.upgradePlan.value = data
|
||||||
|
|||||||
@@ -132,380 +132,382 @@ axios.interceptors.response.use((res) =>{
|
|||||||
export const Https = {
|
export const Https = {
|
||||||
httpUrls: {
|
httpUrls: {
|
||||||
interfaceUrl: '',
|
interfaceUrl: '',
|
||||||
parseGoogleCredential:'/api/third/party/parseGoogleCredential',//谷歌登录注册
|
parseGoogleCredential: '/api/third/party/parseGoogleCredential', //谷歌登录注册
|
||||||
parseWeChatCode:'/api/third/party/parseWeChatCode',//微信登录
|
parseWeChatCode: '/api/third/party/parseWeChatCode', //微信登录
|
||||||
accountIsLogin:'/api/account/isLogin', //判断用户是否登录
|
accountIsLogin: '/api/account/isLogin', //判断用户是否登录
|
||||||
accountLogin:`/api/account/login`, //账号密码登录接口
|
accountLogin: `/api/account/login`, //账号密码登录接口
|
||||||
organizationNameSearch:`/api/account/organizationNameSearch`, //查询学校或者企业版名字
|
organizationNameSearch: `/api/account/organizationNameSearch`, //查询学校或者企业版名字
|
||||||
getUserLanguage:`/api/account/getUserLanguage`, //获取当前用户语言
|
getUserLanguage: `/api/account/getUserLanguage`, //获取当前用户语言
|
||||||
changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
|
changeUserLanguage: `/api/account/changeUserLanguage`, //切换用户当前语言
|
||||||
uploadAvatar:`/api/account/uploadAvatar`, //修改头像
|
uploadAvatar: `/api/account/uploadAvatar`, //修改头像
|
||||||
editUserName:`/api/account/editUserName`, //修改用户名
|
editUserName: `/api/account/editUserName`, //修改用户名
|
||||||
updateUserInfo:`/api/account/updateUserInfo`, //修改国家职业
|
updateUserInfo: `/api/account/updateUserInfo`, //修改国家职业
|
||||||
accountDetail:`/api/account/getAccountDetail`, //用户详细信息
|
accountDetail: `/api/account/getAccountDetail`, //用户详细信息
|
||||||
|
|
||||||
trialUserLogout:`/api/account/trialUserLogout`, //试用用户退出登录接口
|
trialUserLogout: `/api/account/trialUserLogout`, //试用用户退出登录接口
|
||||||
completeGuidancet:`/api/account/completeGuidance`, //用户指引结束
|
completeGuidancet: `/api/account/completeGuidance`, //用户指引结束
|
||||||
|
|
||||||
getExpiredTime:`/api/account/getExpiredTime`, //获取用户到期时间
|
getExpiredTime: `/api/account/getExpiredTime`, //获取用户到期时间
|
||||||
|
|
||||||
addNoLoginRequired:`/api/third/party/addNoLoginRequired`, //机房用户注册
|
addNoLoginRequired: `/api/third/party/addNoLoginRequired`, //机房用户注册
|
||||||
deleteNoLoginRequired:`/api/third/party/deleteNoLoginRequired`, //机房用户注销
|
deleteNoLoginRequired: `/api/third/party/deleteNoLoginRequired`, //机房用户注销
|
||||||
noLoginRequired:`api/account/noLoginRequired`, //机房用户登录
|
noLoginRequired: `api/account/noLoginRequired`, //机房用户登录
|
||||||
existNoLoginRequired:`/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在
|
existNoLoginRequired: `/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在
|
||||||
|
|
||||||
deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
|
deleteNoLoginRequiredNew: `/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
|
||||||
addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册
|
addNoLoginRequiredNew: `api/third/party/addNoLoginRequiredNew`, //机房用户注册
|
||||||
updateNoLoginRequiredNew:`api/third/party/updateNoLoginRequiredNew`, //机房用户更新
|
updateNoLoginRequiredNew: `api/third/party/updateNoLoginRequiredNew`, //机房用户更新
|
||||||
|
|
||||||
endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
|
endpoint: `api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
|
||||||
|
|
||||||
|
designWorksRegister: '/api/account/designWorksRegister', //注册
|
||||||
|
designWorksRegisterCode: '/api/account/designWorksRegisterCode', //注册
|
||||||
|
|
||||||
designWorksRegister:'/api/account/designWorksRegister', //注册
|
preLogin: '/api/account/preLogin', //预先登入
|
||||||
designWorksRegisterCode:'/api/account/designWorksRegisterCode', //注册
|
schoolLogin: '/api/account/schoolLogin', //学校管理员登录
|
||||||
|
enterpriseLogin: '/api/account/enterpriseLogin', //企业管理员登录
|
||||||
|
accountSendEmail: `/api/account/sendEmail`, //发送邮件
|
||||||
|
accountResetPwd: '/api/account/resetPwd', //忘记密码修改
|
||||||
|
accountLogout: '/api/account/logout', //登出
|
||||||
|
accountBindEmail: '/api/account/bindEmail', //绑定邮箱
|
||||||
|
bindGoogle: '/api/account/bindGoogle', //绑定谷歌
|
||||||
|
bindWeChat: '/api/account/bindWeChat', //绑定微信
|
||||||
|
unbindGoogle: `/api/account/unbindGoogle`, //取消绑定谷歌
|
||||||
|
unbindWeChat: '/api/account/unbindWeChat', //取消绑定微信
|
||||||
|
elementGeneratePrint: '/api/element/generatePrint', //生成印花
|
||||||
|
elementSavePrint: '/api/element/savePrint', //保存印花
|
||||||
|
getRgbByTcx: '/api/element/getRgbByTcx', // 通过hsv值获取潘通信息
|
||||||
|
getRgbByHsv: '/api/element/getRgbByHsv', //通过hsv值获取潘通信息
|
||||||
|
elementDelete: '/api/element/delete', //删除上传的图片
|
||||||
|
designCollection: `/api/design/designCollection`, //设计 Conllection
|
||||||
|
reDesignCollection: `/api/design/reDesignCollection`, //重新设计 Conllection
|
||||||
|
countDesignProcess: '/api/design/countDesignProcess', //统计design进度
|
||||||
|
getDesignResult: '/api/design/getDesignResult', //查询design结果
|
||||||
|
designSort: `/api/design/sort`, //design排序
|
||||||
|
collectionLikeUpdate: `/api/history/collectionLikeUpdate`, //赋值排序
|
||||||
|
|
||||||
|
designProcess: `/api/design/designProcess`, //统计design进度
|
||||||
preLogin:'/api/account/preLogin',//预先登入
|
designGetModel: `/api/design/getModel`, //导出获取模特链接
|
||||||
schoolLogin:'/api/account/schoolLogin',//学校管理员登录
|
|
||||||
enterpriseLogin:'/api/account/enterpriseLogin',//企业管理员登录
|
|
||||||
accountSendEmail:`/api/account/sendEmail`, //发送邮件
|
|
||||||
accountResetPwd:'/api/account/resetPwd', //忘记密码修改
|
|
||||||
accountLogout:'/api/account/logout',//登出
|
|
||||||
accountBindEmail:'/api/account/bindEmail', //绑定邮箱
|
|
||||||
bindGoogle:'/api/account/bindGoogle', //绑定谷歌
|
|
||||||
bindWeChat:'/api/account/bindWeChat', //绑定微信
|
|
||||||
unbindGoogle:`/api/account/unbindGoogle`, //取消绑定谷歌
|
|
||||||
unbindWeChat:'/api/account/unbindWeChat', //取消绑定微信
|
|
||||||
elementGeneratePrint:'/api/element/generatePrint', //生成印花
|
|
||||||
elementSavePrint:'/api/element/savePrint',//保存印花
|
|
||||||
getRgbByTcx:'/api/element/getRgbByTcx', // 通过hsv值获取潘通信息
|
|
||||||
getRgbByHsv:'/api/element/getRgbByHsv', //通过hsv值获取潘通信息
|
|
||||||
elementDelete:'/api/element/delete', //删除上传的图片
|
|
||||||
designCollection:`/api/design/designCollection`, //设计 Conllection
|
|
||||||
reDesignCollection:`/api/design/reDesignCollection`,//重新设计 Conllection
|
|
||||||
countDesignProcess:'/api/design/countDesignProcess', //统计design进度
|
|
||||||
getDesignResult:'/api/design/getDesignResult', //查询design结果
|
|
||||||
designSort:`/api/design/sort`, //design排序
|
|
||||||
collectionLikeUpdate:`/api/history/collectionLikeUpdate`, //赋值排序
|
|
||||||
|
|
||||||
designProcess:`/api/design/designProcess`, //统计design进度
|
|
||||||
designGetModel:`/api/design/getModel`, //导出获取模特链接
|
|
||||||
|
|
||||||
//充值相关
|
//充值相关
|
||||||
productList:`/api/product/list`, //获取商品列表
|
productList: `/api/product/list`, //获取商品列表
|
||||||
payAlipay:`/api/ali-pay/trade/page/pay`, //支付宝确认支付
|
payAlipay: `/api/ali-pay/trade/page/pay`, //支付宝确认支付
|
||||||
payAlipayHK:`/api/alipay-hk/createOrder`, //香港支付宝确认支付
|
payAlipayHK: `/api/alipay-hk/createOrder`, //香港支付宝确认支付
|
||||||
payStripe:`/api/stripe/createOrder`, //Stripe支付
|
payStripe: `/api/stripe/createOrder`, //Stripe支付
|
||||||
payPaypal:`/api/paypal/trade`, //paypal确认支付
|
payPaypal: `/api/paypal/trade`, //paypal确认支付
|
||||||
getCredits:`/api/credits/getCredits`, //查询用户积分
|
getCredits: `/api/credits/getCredits`, //查询用户积分
|
||||||
|
|
||||||
cancelSubscription:`/api/stripe/cancelSubscription`, //取消订阅
|
cancelSubscription: `/api/stripe/cancelSubscription`, //取消订阅
|
||||||
|
|
||||||
orderInfoList:`/api/order-info/list`, //查询订单列表
|
orderInfoList: `/api/order-info/list`, //查询订单列表
|
||||||
getCreditsDetail:`/api/credits/getCreditsDetail`, //查询积分列表
|
getCreditsDetail: `/api/credits/getCreditsDetail`, //查询积分列表
|
||||||
tradeRefundAlipay:`/api/ali-pay/trade/refund`, //支付宝退款
|
tradeRefundAlipay: `/api/ali-pay/trade/refund`, //支付宝退款
|
||||||
tradeRefundPaypal:`/api/paypal/trade/refund`, //paypal退款
|
tradeRefundPaypal: `/api/paypal/trade/refund`, //paypal退款
|
||||||
|
|
||||||
tradeQuery:`/api/ali-pay/trade/query/{orderNo}`, //查询订单状态
|
tradeQuery: `/api/ali-pay/trade/query/{orderNo}`, //查询订单状态
|
||||||
|
|
||||||
getRgbByHsvBatch:`/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息
|
getRgbByHsvBatch: `/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息
|
||||||
designLike:`/api/design/like`, //Design Like
|
designLike: `/api/design/like`, //Design Like
|
||||||
designDislike: `/api/design/dislike`, //Design Dislike
|
designDislike: `/api/design/dislike`, //Design Dislike
|
||||||
queryUserGroup:`/api/history/queryUserGroup`, //History用户分页分组列表
|
queryUserGroup: `/api/history/queryUserGroup`, //History用户分页分组列表
|
||||||
deleteUserGroup:`/api/history/deleteUserGroup`, //History删除用户分组
|
deleteUserGroup: `/api/history/deleteUserGroup`, //History删除用户分组
|
||||||
updateUserGroupName:`/api/history/updateUserGroupName`, //History修改用户分组名
|
updateUserGroupName: `/api/history/updateUserGroupName`, //History修改用户分组名
|
||||||
projectSaveOrUpdate:`/api/project/saveOrUpdate`, //History修改用户分组名
|
projectSaveOrUpdate: `/api/project/saveOrUpdate`, //History修改用户分组名
|
||||||
historyChoose:`/api/history/choose`, //History choose
|
historyChoose: `/api/history/choose`, //History choose
|
||||||
getDesignDetail:`/api/design/detail/getDetail`,//查询design详情
|
getDesignDetail: `/api/design/detail/getDetail`, //查询design详情
|
||||||
addSysSketchToLibrary:`/api/library/addSysSketchToLibrary`,//把系统衣服添加的library
|
addSysSketchToLibrary: `/api/library/addSysSketchToLibrary`, //把系统衣服添加的library
|
||||||
designSingleWithGradient:`/api/design/detail/designSingleWithGradient`,//查询需要更新mask列表
|
designSingleWithGradient: `/api/design/detail/designSingleWithGradient`, //查询需要更新mask列表
|
||||||
getNextSysElement:'/api/design/detail/getNextSysElement',//切换系统的element
|
getNextSysElement: '/api/design/detail/getNextSysElement', //切换系统的element
|
||||||
detailPrintDot:'/api/design/detail/printDot',//print打点预览
|
detailPrintDot: '/api/design/detail/printDot', //print打点预览
|
||||||
designSingle:`/api/design/detail/designSingle`,//单个design
|
designSingle: `/api/design/detail/designSingle`, //单个design
|
||||||
queryLibraryPage:`/api/library/queryLibraryPage`,//Library分页列表
|
queryLibraryPage: `/api/library/queryLibraryPage`, //Library分页列表
|
||||||
libraryUpload:`/api/library/upload`, // Library文件上传
|
libraryUpload: `/api/library/upload`, // Library文件上传
|
||||||
setSketchLibrary:`/api/library/updateLibraryLevel2Type`, // 修改图片类型
|
setSketchLibrary: `/api/library/updateLibraryLevel2Type`, // 修改图片类型
|
||||||
updateElementLevel2Type:`/api/element/updateElementLevel2Type`, // 修改拼贴上传的衣服类型
|
updateElementLevel2Type: `/api/element/updateElementLevel2Type`, // 修改拼贴上传的衣服类型
|
||||||
|
|
||||||
queryClassification:`/api/classification/queryClassification`,//标签类别查询
|
queryClassification: `/api/classification/queryClassification`, //标签类别查询
|
||||||
classificationSaveOrUpdate:`/api/classification/saveOrUpdate`,//标签类别新增修改
|
classificationSaveOrUpdate: `/api/classification/saveOrUpdate`, //标签类别新增修改
|
||||||
classificationDelete:`/api/classification/delete`,//标签类别新增修改
|
classificationDelete: `/api/classification/delete`, //标签类别新增修改
|
||||||
relationLibrary:`/api/classification/relationLibrary`,//标签类别新增修改
|
relationLibrary: `/api/classification/relationLibrary`, //标签类别新增修改
|
||||||
getRelClassificationIdList:`/api/classification/getRelClassificationIdList`,//标签类别新增修改
|
getRelClassificationIdList: `/api/classification/getRelClassificationIdList`, //标签类别新增修改
|
||||||
getRelPublicClassificationIdList:`/api/classification/getRelPublicClassificationIdList`,//多选获取公共标签
|
getRelPublicClassificationIdList: `/api/classification/getRelPublicClassificationIdList`, //多选获取公共标签
|
||||||
editRelPublicClassificationIdList:`/api/classification/editRelPublicClassificationIdList`,//多选修改公共标签
|
editRelPublicClassificationIdList: `/api/classification/editRelPublicClassificationIdList`, //多选修改公共标签
|
||||||
|
|
||||||
//模块化
|
//模块化
|
||||||
llmStream:`/api/llm/streamNew`,//聊天
|
llmStream: `/api/llm/streamNew`, //聊天
|
||||||
// llmStream:`/api/llm/stream`,//聊天
|
// llmStream:`/api/llm/stream`,//聊天
|
||||||
chatCreateProject:`/api/llm/chatCreateProject`,//聊天创建项目
|
chatCreateProject: `/api/llm/chatCreateProject`, //聊天创建项目
|
||||||
getChatHistory:`/api/llm/getChatHistory`,//获取聊天历史记录
|
getChatHistory: `/api/llm/getChatHistory`, //获取聊天历史记录
|
||||||
llmUploadFile:`/api/llm/uploadFile`,//聊天上传文件
|
llmUploadFile: `/api/llm/uploadFile`, //聊天上传文件
|
||||||
|
|
||||||
saveOrUpdate:`/api/project/saveOrUpdate`,//模块化新增修改
|
saveOrUpdate: `/api/project/saveOrUpdate`, //模块化新增修改
|
||||||
getModuleContent:`/api/project/getModuleContent`,//获取模块内容
|
getModuleContent: `/api/project/getModuleContent`, //获取模块内容
|
||||||
saveModuleContent:`/api/project/saveModuleContent`,//储存模块内容
|
saveModuleContent: `/api/project/saveModuleContent`, //储存模块内容
|
||||||
historyProject:`/api/project/page`,//项目记录
|
historyProject: `/api/project/page`, //项目记录
|
||||||
projectDetail:`/api/project/delete`,//删除项目
|
projectDetail: `/api/project/delete`, //删除项目
|
||||||
//3d
|
//3d
|
||||||
threeDPage:`/api/project/threeDPage`,
|
threeDPage: `/api/project/threeDPage`,
|
||||||
downloadZip:`/api/project/downloadZip`,//下载zip
|
downloadZip: `/api/project/downloadZip`, //下载zip
|
||||||
getThreeDSize:`/api/project/getThreeDSize`,//下载列表
|
getThreeDSize: `/api/project/getThreeDSize`, //下载列表
|
||||||
getLayoutDetail:`/api/project/getLayoutDetail`,//获取3d详情
|
getLayoutDetail: `/api/project/getLayoutDetail`, //获取3d详情
|
||||||
getThreeDGlb:`/api/project/getThreeDGlb`,
|
getThreeDGlb: `/api/project/getThreeDGlb`,
|
||||||
selectHistoryProject:`/api/project/choose`,//选择项目
|
selectHistoryProject: `/api/project/choose`, //选择项目
|
||||||
getMannequinDetail:`/api/project/getMannequinDetail`,//模块化查看模特点位
|
getMannequinDetail: `/api/project/getMannequinDetail`, //模块化查看模特点位
|
||||||
modifyProportion:`/api/generate/modifyProportion`,//模特拉伸
|
modifyProportion: `/api/generate/modifyProportion`, //模特拉伸
|
||||||
addSysModelToLib:`/api/library/addSysModelToLib`,
|
addSysModelToLib: `/api/library/addSysModelToLib`,
|
||||||
poselikeOrDisike:`/api/generate/likeOrDislike`,//postTransform like
|
poselikeOrDisike: `/api/generate/likeOrDislike`, //postTransform like
|
||||||
getAllPose:`/api/generate/getAllPose`,//获取动作
|
getAllPose: `/api/generate/getAllPose`, //获取动作
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//拼贴
|
//拼贴
|
||||||
genSketchRecon:`/api/generate/genSketchRecon`,
|
genSketchRecon: `/api/generate/genSketchRecon`,
|
||||||
saveReconCanvas:`/api/generate/saveReconCanvas`,
|
saveReconCanvas: `/api/generate/saveReconCanvas`,
|
||||||
|
|
||||||
//动作变换
|
//动作变换
|
||||||
poseTransform:`/api/generate/poseTransform`,
|
poseTransform: `/api/generate/poseTransform`,
|
||||||
poseTransformResult:`/api/generate/poseTransformResult`,
|
poseTransformResult: `/api/generate/poseTransformResult`,
|
||||||
|
|
||||||
batchUpdateLibraryName:'/api/library/batchUpdateLibraryName',//Library修改用户文件名
|
batchUpdateLibraryName: '/api/library/batchUpdateLibraryName', //Library修改用户文件名
|
||||||
batchDeleteLibrary:'/api/library/batchDeleteLibrary',//删除library
|
batchDeleteLibrary: '/api/library/batchDeleteLibrary', //删除library
|
||||||
queryLibraryTopAndBottomPage:'/api/library/queryLibraryTopAndBottomPage',//Library分页列表(查询top和bottom)
|
queryLibraryTopAndBottomPage: '/api/library/queryLibraryTopAndBottomPage', //Library分页列表(查询top和bottom)
|
||||||
saveOrEditTemplatePoint:'/api/library/saveOrEditTemplatePoint',//保存或者编辑template打点
|
saveOrEditTemplatePoint: '/api/library/saveOrEditTemplatePoint', //保存或者编辑template打点
|
||||||
libraryModelsDot:'/api/library/modelsDot',//Models打点预览
|
libraryModelsDot: '/api/library/modelsDot', //Models打点预览
|
||||||
chatStreamTest:`/api/python/chatStream`,//机器人助力
|
chatStreamTest: `/api/python/chatStream`, //机器人助力
|
||||||
pictureLikeOrUnLike:`/api/python/pictureLikeOrUnLike`,//机器人生成图喜欢
|
pictureLikeOrUnLike: `/api/python/pictureLikeOrUnLike`, //机器人生成图喜欢
|
||||||
getBloodBars:`/api/python/getBloodBars`,//机器人血条
|
getBloodBars: `/api/python/getBloodBars`, //机器人血条
|
||||||
//工作空间
|
//工作空间
|
||||||
workspaceDetail:`/api/workspace/detail`,//用户习惯详情
|
workspaceDetail: `/api/workspace/detail`, //用户习惯详情
|
||||||
workspaceenumValues:`/api/workspace/enumValues`,//getSex
|
workspaceenumValues: `/api/workspace/enumValues`, //getSex
|
||||||
|
|
||||||
workspaceRemove:`/api/workspace/remove`,//删除用户习惯详情
|
workspaceRemove: `/api/workspace/remove`, //删除用户习惯详情
|
||||||
workspacesaveOrUpdate:`/api/workspace/saveOrUpdate`,//修改用户习惯详情
|
workspacesaveOrUpdate: `/api/workspace/saveOrUpdate`, //修改用户习惯详情
|
||||||
getMannequins:`/api/workspace/getMannequins`,//模特
|
getMannequins: `/api/workspace/getMannequins`, //模特
|
||||||
getStyleList:`/api/workspace/styleList`,//获取所有风格列表
|
getStyleList: `/api/workspace/styleList`, //获取所有风格列表
|
||||||
|
|
||||||
workspaceList:`/api/workspace/list`,
|
workspaceList: `/api/workspace/list`,
|
||||||
sketchAndPrintGenerate:'/api/generate/sketchAndPrint',//sketchGenerate生成图片
|
sketchAndPrintGenerate: '/api/generate/sketchAndPrint', //sketchGenerate生成图片
|
||||||
|
|
||||||
generatePrepare:'/api/generate/prepare',//开始生成generate图片
|
generatePrepare: '/api/generate/prepare', //开始生成generate图片
|
||||||
generateStopWaiting:'/api/generate/stopWaiting',//取消生成
|
generateStopWaiting: '/api/generate/stopWaiting', //取消生成
|
||||||
generateResult:'/api/generate/result',//获取生成结果
|
generateResult: '/api/generate/result', //获取生成结果
|
||||||
generateLike:'/api/generate/like',//喜欢ganerate图片
|
generateLike: '/api/generate/like', //喜欢ganerate图片
|
||||||
generateDislike:'/api/generate/dislike',//喜欢ganerate图片
|
generateDislike: '/api/generate/dislike', //喜欢ganerate图片
|
||||||
imageToSketch:'/api/generate/imageToSketch',//成品图转为线稿
|
imageToSketch: '/api/generate/imageToSketch', //成品图转为线稿
|
||||||
modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存
|
modifySketch: '/api/generate/modifySketch', //修改画布内容并且储存
|
||||||
|
|
||||||
elementUpload:`/api/element/upload`,//上传图片
|
elementUpload: `/api/element/upload`, //上传图片
|
||||||
imageSegmentation:`/api/element/imageSegmentation`,//分割衣服
|
imageSegmentation: `/api/element/imageSegmentation`, //分割衣服
|
||||||
convertRelightElement:`/api/history/convertRelightElement`,//toproduct复制到上传图片位置
|
convertRelightElement: `/api/history/convertRelightElement`, //toproduct复制到上传图片位置
|
||||||
|
|
||||||
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片
|
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片
|
||||||
sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片
|
sketchBoardsBoundingBox: `/api/design/sketchBoardsBoundingBox`, //裁剪sketch图片
|
||||||
|
|
||||||
trialOrderList:`/api/account/trialOrderList`,//获取审批列表
|
trialOrderList: `/api/account/trialOrderList`, //获取审批列表
|
||||||
switchIsAutoApproval:`/api/account/switchIsAutoApproval`,//切换是否自动审批
|
switchIsAutoApproval: `/api/account/switchIsAutoApproval`, //切换是否自动审批
|
||||||
getIsAutoApproval:`/api/account/getIsAutoApproval`,//获取是否自动审批
|
getIsAutoApproval: `/api/account/getIsAutoApproval`, //获取是否自动审批
|
||||||
trialOrderApproval:`/api/account/trialOrderApproval`,//通过审批
|
trialOrderApproval: `/api/account/trialOrderApproval`, //通过审批
|
||||||
trialOrderRefuse:`/api/account/trialOrderRefuse`,//拒绝审批
|
trialOrderRefuse: `/api/account/trialOrderRefuse`, //拒绝审批
|
||||||
|
|
||||||
//管理员接口
|
//管理员接口
|
||||||
//查询所有试用用户
|
//查询所有试用用户
|
||||||
inquiryGetTrial:`/api/inquiry/getTrial`,//查询所有试用用户
|
inquiryGetTrial: `/api/inquiry/getTrial`, //查询所有试用用户
|
||||||
getCities:`/api/inquiry/getCities`,//获取所有付款订单使用的国家
|
getCities: `/api/inquiry/getCities`, //获取所有付款订单使用的国家
|
||||||
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
getUserInfo: `/api/inquiry/getUserInfo`, //查询所有用户
|
||||||
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
queryTransaction: `/api/inquiry/queryTransaction`, //查询交易记录
|
||||||
queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
|
queryTransactionDownload: `/api/inquiry/queryTransaction/download`, //导出交易记录
|
||||||
createCoupon:`/api/stripe/createCoupon`,//创建优惠码
|
createCoupon: `/api/stripe/createCoupon`, //创建优惠码
|
||||||
updatePromCodeInfo:`/api/stripe/updatePromCodeInfo`,//修改优惠码
|
updatePromCodeInfo: `/api/stripe/updatePromCodeInfo`, //修改优惠码
|
||||||
getAllCoupons:`/api/stripe/getAllCoupons`,//查询优惠码列表
|
getAllCoupons: `/api/stripe/getAllCoupons`, //查询优惠码列表
|
||||||
checkCoupon:`/api/stripe/checkCoupon`,//根据优惠码获取结算后的金额
|
checkCoupon: `/api/stripe/checkCoupon`, //根据优惠码获取结算后的金额
|
||||||
deletePromCode:`/api/stripe/deletePromCode`,//删除优惠券
|
deletePromCode: `/api/stripe/deletePromCode`, //删除优惠券
|
||||||
addOrganization:`/api/inquiry/addOrganization`,//添加企业版或者教育版
|
addOrganization: `/api/inquiry/addOrganization`, //添加企业版或者教育版
|
||||||
queryOrganization:`/api/inquiry/queryOrganization`,//查询企业版或者教育版
|
queryOrganization: `/api/inquiry/queryOrganization`, //查询企业版或者教育版
|
||||||
createSubscribePlan:'/api/subscription_plan/createPlan', // 创建订阅计划
|
createSubscribePlan: '/api/subscription_plan/createPlan', // 创建订阅计划
|
||||||
deleteSubscribePlan: '/api/subscription_plan/deletePlan', // 删除订阅计划
|
deleteSubscribePlan: '/api/subscription_plan/deletePlan', // 删除订阅计划
|
||||||
updateSubscribePlan: '/api/subscription_plan/updatePlan', // 修改订阅计划
|
updateSubscribePlan: '/api/subscription_plan/updatePlan', // 修改订阅计划
|
||||||
searchAllSubscribePlan: '/api/subscription_plan/searchByPage', // 查询所有订阅计划
|
searchAllSubscribePlan: '/api/subscription_plan/searchByPage', // 分页查询所有订阅计划
|
||||||
switchSubscribePlan:'/api/subscription_plan/switchSubscriptionPlan', // 切换订阅计划
|
searchSubscribeByOrg: '/api/subscription_plan/searchByOrganizationIdAndStatus', // 不分页查询
|
||||||
|
switchSubscribePlan: '/api/subscription_plan/switchSubscriptionPlan', // 切换管理员订阅计划
|
||||||
|
switchSubAccountSubscribePlan: '/api/subscription_plan/switchSubAccSubscriptionPlan', // 切换子账号订阅计划
|
||||||
|
|
||||||
//云生成
|
//云生成
|
||||||
designCloud:`/api/design/designCloud`,//创建云生成
|
designCloud: `/api/design/designCloud`, //创建云生成
|
||||||
cloudPage:`/api/design/cloudPage`,//创建云生成
|
cloudPage: `/api/design/cloudPage`, //创建云生成
|
||||||
cloudTaskDelete:`/api/design/cloudTaskDelete`,//删除云生成
|
cloudTaskDelete: `/api/design/cloudTaskDelete`, //删除云生成
|
||||||
cloudTaskNameUpdate:`/api/design/cloudTaskNameUpdate`,//修改云生成名字
|
cloudTaskNameUpdate: `/api/design/cloudTaskNameUpdate`, //修改云生成名字
|
||||||
getDesignCloudResult:`/api/design/getDesignCloudResult`,//查询这条云生成记录的所有内容
|
getDesignCloudResult: `/api/design/getDesignCloudResult`, //查询这条云生成记录的所有内容
|
||||||
|
|
||||||
//企业版教育版管理员页面
|
//企业版教育版管理员页面
|
||||||
subAccountList:`/api/account/subAccountList`,//查询子账号
|
subAccountList: `/api/account/subAccountList`, //查询子账号
|
||||||
addOrUpdateSubAccount:`/api/account/addOrUpdateSubAccount`,//添加子账号
|
addOrUpdateSubAccount: `/api/account/addOrUpdateSubAccount`, //添加子账号
|
||||||
deleteSubAccount:`/api/account/deleteSubAccount`,//删除子账号
|
deleteSubAccount: `/api/account/deleteSubAccount`, //删除子账号
|
||||||
subAccountImportExcelDownload:`/api/account/subAccountImportExcelDownload`,//批量添加模板下载模板
|
subAccountImportExcelDownload: `/api/account/subAccountImportExcelDownload`, //批量添加模板下载模板
|
||||||
exportAccountsToExcel:`/api/account/exportAccountsToExcel`,//教育版导出用户数据
|
exportAccountsToExcel: `/api/account/exportAccountsToExcel`, //教育版导出用户数据
|
||||||
getNextSequence:`/api/project/getNextSequence`,//批量添加模板下载模板
|
getNextSequence: `/api/project/getNextSequence`, //批量添加模板下载模板
|
||||||
subAccountImport:`/api/account/subAccountImport`,//模板导入
|
subAccountImport: `/api/account/subAccountImport`, //模板导入
|
||||||
getGenerateFrequency:`/api/inquiry/getGenerateFrequency`,//积分使用详情
|
getGenerateFrequency: `/api/inquiry/getGenerateFrequency`, //积分使用详情
|
||||||
getAllGenerateFuncName:`/api/inquiry/getAllGenerateFuncName`,//获取所有generate类型
|
getAllGenerateFuncName: `/api/inquiry/getAllGenerateFuncName`, //获取所有generate类型
|
||||||
|
|
||||||
//查询某个时间内design点击次数
|
//查询某个时间内design点击次数
|
||||||
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
getDesignStatistic: `/api/inquiry/getDesignStatistic`, //拒绝审批
|
||||||
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
getAllQuestionnaire: `/api/inquiry/getAllQuestionnaire`, //拒绝审批
|
||||||
getActiveUserFunc:`/api/inquiry/getActiveUserFunc`,//获取各模块功能
|
getActiveUserFunc: `/api/inquiry/getActiveUserFunc`, //获取各模块功能
|
||||||
toProductImageElementDelete:`/api/history/toProductImageElementDelete`,//删除指定模块上传的内容
|
toProductImageElementDelete: `/api/history/toProductImageElementDelete`, //删除指定模块上传的内容
|
||||||
recentActiveUser:`/api/inquiry/recentActiveUser`,//获取近期活跃用户
|
recentActiveUser: `/api/inquiry/recentActiveUser`, //获取近期活跃用户
|
||||||
recentActiveUserChart:`/api/inquiry/recentActiveUserChart`,//获取近期活跃用户图表数据
|
recentActiveUserChart: `/api/inquiry/recentActiveUserChart`, //获取近期活跃用户图表数据
|
||||||
recentNewUser:`/api/inquiry/recentNewUser`,//获取近期新增用户
|
recentNewUser: `/api/inquiry/recentNewUser`, //获取近期新增用户
|
||||||
recentNewUserChart:`/api/inquiry/recentNewUserChart`,//获取新增用户图表
|
recentNewUserChart: `/api/inquiry/recentNewUserChart`, //获取新增用户图表
|
||||||
trialUserCountry:`/api/inquiry/trialUserCountry`,//试用用户国家-城市分布
|
trialUserCountry: `/api/inquiry/trialUserCountry`, //试用用户国家-城市分布
|
||||||
conversionRate:`/api/inquiry/conversionRate`,//试用用户国家-城市分布
|
conversionRate: `/api/inquiry/conversionRate`, //试用用户国家-城市分布
|
||||||
getAllUserId:`/api/inquiry/getAllUserId`,//获取所有用户id和Name
|
getAllUserId: `/api/inquiry/getAllUserId`, //获取所有用户id和Name
|
||||||
adminAddUser:`/api/inquiry/addUser`,//添加用户
|
adminAddUser: `/api/inquiry/addUser`, //添加用户
|
||||||
modifyUser:`/api/inquiry/modifyUser`,//修改用户
|
modifyUser: `/api/inquiry/modifyUser`, //修改用户
|
||||||
publishSysMessage:`/api/message/publishSysMessage`,//发布系统任务
|
publishSysMessage: `/api/message/publishSysMessage`, //发布系统任务
|
||||||
//affiliate接口
|
//affiliate接口
|
||||||
viewsIncrease:`/api/affiliate/viewsIncrease`,//增加访问量
|
viewsIncrease: `/api/affiliate/viewsIncrease`, //增加访问量
|
||||||
affiliateRegistration:`/api/affiliate/registration`,//affiliate注册
|
affiliateRegistration: `/api/affiliate/registration`, //affiliate注册
|
||||||
personalCenter:`/api/affiliate/personalCenter`,//affiliate个人中心
|
personalCenter: `/api/affiliate/personalCenter`, //affiliate个人中心
|
||||||
affiliateList:`/api/affiliate/list`,//affiliate审批列表
|
affiliateList: `/api/affiliate/list`, //affiliate审批列表
|
||||||
updateCommission:`/api/affiliate/updateCommission`,//编辑佣金比例
|
updateCommission: `/api/affiliate/updateCommission`, //编辑佣金比例
|
||||||
editAffiliate:`/api/affiliate/editAffiliate`,//编辑affiliate
|
editAffiliate: `/api/affiliate/editAffiliate`, //编辑affiliate
|
||||||
getEachAffiliateGeneratedRevenue:`/api/affiliate/getEachAffiliateGeneratedRevenue`,//affiliate每个用户根据日期查询收益
|
getEachAffiliateGeneratedRevenue: `/api/affiliate/getEachAffiliateGeneratedRevenue`, //affiliate每个用户根据日期查询收益
|
||||||
affiliateApproval:`/api/affiliate/approval`,//affiliate同意 审批
|
affiliateApproval: `/api/affiliate/approval`, //affiliate同意 审批
|
||||||
getPersonalMonthlyIncome:`/api/affiliate/getPersonalMonthlyIncome`,//affiliate图表接口
|
getPersonalMonthlyIncome: `/api/affiliate/getPersonalMonthlyIncome`, //affiliate图表接口
|
||||||
getReferrals:`/api/affiliate/getReferrals`,//affiliate Referral列表
|
getReferrals: `/api/affiliate/getReferrals`, //affiliate Referral列表
|
||||||
editReferral:`/api/affiliate/editReferral`,//affiliate编辑referral
|
editReferral: `/api/affiliate/editReferral`, //affiliate编辑referral
|
||||||
batchDeleteReferral:`/api/affiliate/batchDeleteReferral`,//affiliate删除referral
|
batchDeleteReferral: `/api/affiliate/batchDeleteReferral`, //affiliate删除referral
|
||||||
// batchDeleteReferral:`/api/affiliate/batchDeleteReferral`,//affiliate删除referral
|
// batchDeleteReferral:`/api/affiliate/batchDeleteReferral`,//affiliate删除referral
|
||||||
|
|
||||||
getTasksList:`/api/tasks/getList`,//获取w为执行完的所有任务
|
getTasksList: `/api/tasks/getList`, //获取w为执行完的所有任务
|
||||||
getTasksHistory:`/api/tasks/getAllTask`,//获取所有任务列表
|
getTasksHistory: `/api/tasks/getAllTask`, //获取所有任务列表
|
||||||
prepareForSR:`/api/python/prepareForSR`,//超分
|
prepareForSR: `/api/python/prepareForSR`, //超分
|
||||||
|
|
||||||
|
|
||||||
//作品广场
|
//作品广场
|
||||||
publish:`/api/portfolio/publish`,//发布作品到作品广场
|
publish: `/api/portfolio/publish`, //发布作品到作品广场
|
||||||
getPorfolio:`/api/portfolio/page`,//查询作品广场
|
getPorfolio: `/api/portfolio/page`, //查询作品广场
|
||||||
getPorfolioDetail:`/api/portfolio/detail`,//查询作品广场作品详情
|
getPorfolioDetail: `/api/portfolio/detail`, //查询作品广场作品详情
|
||||||
setPorfolioChoose:`/api/portfolio/choose`,//二次创作
|
setPorfolioChoose: `/api/portfolio/choose`, //二次创作
|
||||||
portfolioLike:`/api/portfolio/like`,//作品广场点赞
|
portfolioLike: `/api/portfolio/like`, //作品广场点赞
|
||||||
portfolioNoLike:`/api/portfolio/unlike`,//作品广场取消点赞
|
portfolioNoLike: `/api/portfolio/unlike`, //作品广场取消点赞
|
||||||
portfolioComment:`/api/portfolio/comment`,//作品广场评论
|
portfolioComment: `/api/portfolio/comment`, //作品广场评论
|
||||||
portfolioCommentPage:`/api/portfolio/commentPage`,//作品广场评论列表
|
portfolioCommentPage: `/api/portfolio/commentPage`, //作品广场评论列表
|
||||||
commentDelete:`/api/portfolio/commentDelete`,//删除评论
|
commentDelete: `/api/portfolio/commentDelete`, //删除评论
|
||||||
porfolioDelete:`/api/portfolio/delete`,//删除作品
|
porfolioDelete: `/api/portfolio/delete`, //删除作品
|
||||||
porfolioFollow:`/api/portfolio/follow`,//删除作品
|
porfolioFollow: `/api/portfolio/follow`, //删除作品
|
||||||
porfolioFollow:`/api/portfolio/follow`,//关注
|
porfolioFollow: `/api/portfolio/follow`, //关注
|
||||||
porfolioCancelFollow:`/api/portfolio/cancelFollow`,//取消关注
|
porfolioCancelFollow: `/api/portfolio/cancelFollow`, //取消关注
|
||||||
porfolioGetFolloweeList:`/api/portfolio/getFolloweeList`,//获取关注列表
|
porfolioGetFolloweeList: `/api/portfolio/getFolloweeList`, //获取关注列表
|
||||||
porfolioGetFollowerList:`/api/portfolio/getFollowerList`,//获取粉丝列表
|
porfolioGetFollowerList: `/api/portfolio/getFollowerList`, //获取粉丝列表
|
||||||
|
|
||||||
//product生成
|
//product生成
|
||||||
toProduct:`/api/history/toProduct`,//开始生成
|
toProduct: `/api/history/toProduct`, //开始生成
|
||||||
toProductImageResult:`/api/history/toProductImageResult`,//获取结果
|
toProductImageResult: `/api/history/toProductImageResult`, //获取结果
|
||||||
toProductImageElementUpload:`/api/history/toProductImageElementUpload`,//上传
|
toProductImageElementUpload: `/api/history/toProductImageElementUpload`, //上传
|
||||||
historyDeleteResult:`/api/history/deleteResult`,//relight toproduct删除
|
historyDeleteResult: `/api/history/deleteResult`, //relight toproduct删除
|
||||||
generateDeleteResult:`/api/generate/deleteResult`,//pose删除
|
generateDeleteResult: `/api/generate/deleteResult`, //pose删除
|
||||||
|
|
||||||
productImageLike:`/api/history/productImageLike`,//like生成结果
|
productImageLike: `/api/history/productImageLike`, //like生成结果
|
||||||
productImageUnLike:`/api/history/productImageUnLike`,//取消like生成结果
|
productImageUnLike: `/api/history/productImageUnLike`, //取消like生成结果
|
||||||
productImageLikeList:`/api/history/productImageLikeList`,//like生成结果
|
productImageLikeList: `/api/history/productImageLikeList`, //like生成结果
|
||||||
|
|
||||||
//打光
|
//打光
|
||||||
relight:`/api/history/relight`,//开始生成
|
relight: `/api/history/relight`, //开始生成
|
||||||
relightResult:`/api/history/relightResult`,//开始生成
|
relightResult: `/api/history/relightResult`, //开始生成
|
||||||
|
|
||||||
//保存画布
|
//保存画布
|
||||||
canvasElementUpload:`/api/history/canvasElementUpload`,//画布上传临时图片
|
canvasElementUpload: `/api/history/canvasElementUpload`, //画布上传临时图片
|
||||||
exportSave:`/api/history/exportSave`,//保存画布
|
exportSave: `/api/history/exportSave`, //保存画布
|
||||||
exportSearch:`/api/history/exportSearch`,//保存画布
|
exportSearch: `/api/history/exportSearch`, //保存画布
|
||||||
|
|
||||||
//活动
|
//活动
|
||||||
activity:`/api/account/activity`,
|
activity: `/api/account/activity`,
|
||||||
|
|
||||||
//bradDNA
|
//bradDNA
|
||||||
brandLogoUpload:`/api/history/brandLogoUpload`,//上传bradDNA
|
brandLogoUpload: `/api/history/brandLogoUpload`, //上传bradDNA
|
||||||
brandDNAGenerate:`/api/history/brandDNAGenerate`,//上传bradDNA
|
brandDNAGenerate: `/api/history/brandDNAGenerate`, //上传bradDNA
|
||||||
brandDNAUpload:`/api/history/brandDNAUpload`,//上传DNA图片
|
brandDNAUpload: `/api/history/brandDNAUpload`, //上传DNA图片
|
||||||
getInitializeProgress:`/api/history/getInitializeProgress`,//获取brand进度
|
getInitializeProgress: `/api/history/getInitializeProgress`, //获取brand进度
|
||||||
brandDNADelete:`/api/history/brandDNADelete`,//删除brandDna
|
brandDNADelete: `/api/history/brandDNADelete`, //删除brandDna
|
||||||
|
|
||||||
brandDNAPage:`/api/history/brandDNAPage`,//brand列表
|
brandDNAPage: `/api/history/brandDNAPage`, //brand列表
|
||||||
brandDNASaveOrUpdate:`/api/history/brandDNASaveOrUpdate`,//提交个人信息
|
brandDNASaveOrUpdate: `/api/history/brandDNASaveOrUpdate`, //提交个人信息
|
||||||
productImageInitialize:`/api/history/productImageInitialize`,//产品识别
|
productImageInitialize: `/api/history/productImageInitialize`, //产品识别
|
||||||
//调查问卷
|
//调查问卷
|
||||||
questionnaire:`/api/account/questionnaire`,//保存画布
|
questionnaire: `/api/account/questionnaire`, //保存画布
|
||||||
|
|
||||||
//消息系统
|
//消息系统
|
||||||
getUnreadCount:`/api/message/getUnreadCount`,//获取未读消息
|
getUnreadCount: `/api/message/getUnreadCount`, //获取未读消息
|
||||||
setReadStatus:`/api/message/setReadStatus`,//设置消息已读
|
setReadStatus: `/api/message/setReadStatus`, //设置消息已读
|
||||||
getHistoryNotification:`/api/message/getHistoryNotification`,//获取历史消息
|
getHistoryNotification: `/api/message/getHistoryNotification`, //获取历史消息
|
||||||
oneClickRead:`/api/message/oneClickRead`,//全部设为已读
|
oneClickRead: `/api/message/oneClickRead`, //全部设为已读
|
||||||
personalHomepage:`/api/account/personalHomepage`,//获取个人主页信息
|
personalHomepage: `/api/account/personalHomepage`, //获取个人主页信息
|
||||||
refreshMinioUrl:`/api/third/party/refreshMinioUrl`,//获取可以使用的minio地址
|
refreshMinioUrl: `/api/third/party/refreshMinioUrl` //获取可以使用的minio地址
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
axiosGet(url,config) {
|
axiosGet(url, config) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if(isLoginTime && url != '/api/portfolio/page') {
|
if (isLoginTime && url != '/api/portfolio/page') {
|
||||||
resolve('')
|
resolve('')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
axios.get(url,config).then(response => {
|
axios
|
||||||
|
.get(url, config)
|
||||||
|
.then(response => {
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch((error) => {
|
})
|
||||||
|
.catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
axiosPut(url, data) {
|
axiosPut(url, data) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if(isLoginTime && url != '/api/portfolio/page') {
|
if (isLoginTime && url != '/api/portfolio/page') {
|
||||||
resolve('')
|
resolve('')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
axios.put(url, data).then(response => {
|
axios
|
||||||
|
.put(url, data)
|
||||||
|
.then(response => {
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch((error) => {
|
})
|
||||||
|
.catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
axiosPost(url, data,config) {
|
axiosPost(url, data, config) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if(isLoginTime && url != '/api/portfolio/page') {
|
if (isLoginTime && url != '/api/portfolio/page') {
|
||||||
resolve('')
|
resolve('')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
axios.post(url, data,config).then(response => {
|
axios
|
||||||
|
.post(url, data, config)
|
||||||
|
.then(response => {
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch((error) => {
|
})
|
||||||
|
.catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
axiosDelete(url, newData) {
|
axiosDelete(url, newData) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if(isLoginTime && url != '/api/portfolio/page') {
|
if (isLoginTime && url != '/api/portfolio/page') {
|
||||||
resolve('')
|
resolve('')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
axios.delete(url,{data:newData}).then(response => {
|
axios
|
||||||
|
.delete(url, { data: newData })
|
||||||
|
.then(response => {
|
||||||
resolve(response)
|
resolve(response)
|
||||||
}).catch((error) => {
|
})
|
||||||
|
.catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,14 +17,14 @@
|
|||||||
mode="inline"
|
mode="inline"
|
||||||
@click="handleClick"
|
@click="handleClick"
|
||||||
>
|
>
|
||||||
<div v-for="(menu) in rootSubmenuKeys" :key="menu.key" >
|
<div v-for="(menu) in rootSubmenuKeys" :key="`menu-${menu.key}`" >
|
||||||
<a-menu-item :key="menu.key" :name="menu.name" :route="menu.route" v-if="!menu.children">
|
<a-menu-item :key="`item-${menu.key}`" :name="menu.name" :route="menu.route" v-if="!menu.children">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<span :class="['icon','iconfont', 'menu_icon', menu.icon]"></span>
|
<span :class="['icon','iconfont', 'menu_icon', menu.icon]"></span>
|
||||||
</template>
|
</template>
|
||||||
<span class="menu_title" :title="menu.name">{{menu.name}}</span>
|
<span class="menu_title" :title="menu.name">{{menu.name}}</span>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-sub-menu :key="menu.key" v-else>
|
<a-sub-menu :key="`sub-${menu.key}`" v-else>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<span :class="['icon','iconfont', 'menu_icon', menu.icon]"></span>
|
<span :class="['icon','iconfont', 'menu_icon', menu.icon]"></span>
|
||||||
</template>
|
</template>
|
||||||
@@ -150,10 +150,10 @@ export default defineComponent({
|
|||||||
state.rootSubmenuKeys = adminRouter.all(t);
|
state.rootSubmenuKeys = adminRouter.all(t);
|
||||||
}
|
}
|
||||||
const route = router.currentRoute.value
|
const route = router.currentRoute.value
|
||||||
if(state.rootSubmenuKeys.some((item:any) => item.route === route.path) || route.path == "/administrator"){
|
const isMenuRoute = state.rootSubmenuKeys.some((item:any) => item.route === route.path)
|
||||||
|
// 如果是管理员首页或未匹配菜单,才重定向到首个菜单;否则保持当前路由,避免刷新回到 allUser
|
||||||
|
if (route.path === "/administrator" || !isMenuRoute) {
|
||||||
router.push(state.rootSubmenuKeys[0].route)
|
router.push(state.rootSubmenuKeys[0].route)
|
||||||
}else{
|
|
||||||
router.push('/administrator')
|
|
||||||
}
|
}
|
||||||
// state.rootSubmenuKeys.forEach((item:any) => {
|
// state.rootSubmenuKeys.forEach((item:any) => {
|
||||||
// if(item.children){
|
// if(item.children){
|
||||||
|
|||||||
Reference in New Issue
Block a user