2024-06-16 00:20:02 +08:00
|
|
|
<template>
|
|
|
|
|
<fs-page class="page-sys-settings">
|
2024-11-28 17:36:45 +08:00
|
|
|
<!-- <template #header>-->
|
|
|
|
|
<!-- <div class="title">系统设置</div>-->
|
|
|
|
|
<!-- </template>-->
|
2025-03-11 22:25:14 +08:00
|
|
|
<div class="sys-settings-body md:p-5">
|
2024-11-30 01:57:09 +08:00
|
|
|
<a-tabs :active-key="activeKey" type="card" class="sys-settings-tabs" @update:active-key="onChange">
|
2025-09-13 23:33:18 +08:00
|
|
|
<a-tab-pane key="base" :tab="t('certd.sys.setting.baseSetting')">
|
2025-04-14 17:40:23 +08:00
|
|
|
<SettingBase v-if="activeKey === 'base'" />
|
2024-11-28 17:36:45 +08:00
|
|
|
</a-tab-pane>
|
2025-09-13 23:33:18 +08:00
|
|
|
<a-tab-pane key="register" :tab="t('certd.sys.setting.registerSetting')">
|
2024-11-30 01:57:09 +08:00
|
|
|
<SettingRegister v-if="activeKey === 'register'" />
|
2024-11-28 17:36:45 +08:00
|
|
|
</a-tab-pane>
|
2025-09-13 23:33:18 +08:00
|
|
|
<a-tab-pane v-if="settingsStore.isComm" key="payment" :tab="t('certd.sys.setting.paymentSetting')">
|
2024-12-22 14:00:46 +08:00
|
|
|
<SettingPayment v-if="activeKey === 'payment'" />
|
|
|
|
|
</a-tab-pane>
|
2025-09-13 23:33:18 +08:00
|
|
|
<a-tab-pane key="safe" :tab="t('certd.sys.setting.safeSetting')">
|
|
|
|
|
<SettingSafe v-if="activeKey === 'safe'" />
|
2025-04-14 17:40:23 +08:00
|
|
|
</a-tab-pane>
|
2025-09-27 01:19:32 +08:00
|
|
|
<a-tab-pane key="captcha" :tab="t('certd.sys.setting.captchaSetting')">
|
|
|
|
|
<SettingCaptcha v-if="activeKey === 'captcha'" />
|
|
|
|
|
</a-tab-pane>
|
2024-11-28 17:36:45 +08:00
|
|
|
</a-tabs>
|
2024-06-16 00:20:02 +08:00
|
|
|
</div>
|
|
|
|
|
</fs-page>
|
|
|
|
|
</template>
|
|
|
|
|
|
2024-11-13 22:42:11 +08:00
|
|
|
<script setup lang="tsx">
|
2024-11-28 17:36:45 +08:00
|
|
|
import SettingBase from "/@/views/sys/settings/tabs/base.vue";
|
|
|
|
|
import SettingRegister from "/@/views/sys/settings/tabs/register.vue";
|
2024-12-22 14:00:46 +08:00
|
|
|
import SettingPayment from "/@/views/sys/settings/tabs/payment.vue";
|
2025-04-14 17:40:23 +08:00
|
|
|
import SettingSafe from "/@/views/sys/settings/tabs/safe.vue";
|
2025-09-27 01:19:32 +08:00
|
|
|
import SettingCaptcha from "/@/views/sys/settings/tabs/captcha.vue";
|
|
|
|
|
|
2024-11-30 01:57:09 +08:00
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
|
|
import { ref } from "vue";
|
2025-04-12 23:59:03 +08:00
|
|
|
import { useSettingStore } from "/@/store/settings";
|
2025-09-13 23:33:18 +08:00
|
|
|
import { useI18n } from "/@/locales";
|
2024-10-07 03:21:16 +08:00
|
|
|
defineOptions({
|
2025-04-08 23:36:50 +08:00
|
|
|
name: "SysSettings",
|
2024-10-07 03:21:16 +08:00
|
|
|
});
|
2025-09-13 23:33:18 +08:00
|
|
|
const { t } = useI18n();
|
2024-12-24 01:12:12 +08:00
|
|
|
const settingsStore = useSettingStore();
|
2025-04-14 17:40:23 +08:00
|
|
|
const activeKey = ref("base");
|
2024-11-30 01:57:09 +08:00
|
|
|
const route = useRoute();
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
if (route.query.tab) {
|
2025-04-14 17:40:23 +08:00
|
|
|
activeKey.value = (route.query.tab as string) || "base";
|
2024-11-30 01:57:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onChange(value: string) {
|
|
|
|
|
// activeKey.value = value;
|
|
|
|
|
// 创建一个新的查询参数对象
|
|
|
|
|
const query: any = {};
|
|
|
|
|
if (value !== "") {
|
|
|
|
|
query.tab = value;
|
|
|
|
|
}
|
|
|
|
|
// 使用`push`方法更新路由,保留其他查询参数不变
|
|
|
|
|
router.push({ path: route.path, query });
|
|
|
|
|
}
|
2024-06-16 00:20:02 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.page-sys-settings {
|
|
|
|
|
.sys-settings-form {
|
2025-09-26 01:21:01 +08:00
|
|
|
width: 800px;
|
2025-03-11 22:25:14 +08:00
|
|
|
max-width: 100%;
|
|
|
|
|
padding: 20px;
|
2024-06-16 00:20:02 +08:00
|
|
|
}
|
2024-11-28 17:36:45 +08:00
|
|
|
|
|
|
|
|
.sys-settings-body {
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding-top: 20px;
|
|
|
|
|
.sys-settings-tabs {
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
.ant-tabs-content-holder {
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-06-16 00:20:02 +08:00
|
|
|
}
|
|
|
|
|
</style>
|