refactor(frontend): 统一 Element 语言注入并抽出全站皮肤
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a10ecc8073
commit
81d82a88d5
28 files changed
+144
-240
No files matched your search
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* features/admin/composables/useElementProvider.ts
|
||||
* 用途:管理端 Element Plus 试点的界面语言。
|
||||
* 用途:把当前界面语言映射成 Element Plus 语言包。
|
||||
* 依赖:element-plus locale、vue-i18n。
|
||||
* 逻辑:UsersPage、AgentsPage、KbAdminPanel 把 elementLocale 传给 ElConfigProvider;亮暗靠 html.dark 与 Element 暗色变量,不在这里重复切换。
|
||||
* 逻辑:只由 App.vue 根上的 ElConfigProvider 使用。页面和弹窗不要再包一层。
|
||||
* 亮暗靠 html.dark 与 Element 暗色变量,不在这里切换。
|
||||
*/
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@@ -20,8 +21,8 @@ const ELEMENT_LOCALES = {
|
||||
|
||||
/**
|
||||
* 取当前界面语言对应的 Element Plus 语言包。
|
||||
* 核心逻辑:未知语言回退简体中文。
|
||||
* @returns elementLocale,随 vue-i18n 语言变化
|
||||
* 核心逻辑:zh-CN、zh-TW、en、th 各用官方语言包,未知语言回退简体中文。
|
||||
* @returns elementLocale,随 vue-i18n 语言变化。交给 App.vue 的 ElConfigProvider。
|
||||
*/
|
||||
export function useElementProvider() {
|
||||
const { locale } = useI18n();
|
||||
|
||||
@@ -12,7 +12,6 @@ import { useI18n } from 'vue-i18n';
|
||||
import { Plus } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElEmpty,
|
||||
ElLoading,
|
||||
ElTable,
|
||||
@@ -22,7 +21,6 @@ import {
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import AgentFormModal from './components/AgentFormModal.vue';
|
||||
import AgentPermissionModal from './components/AgentPermissionModal.vue';
|
||||
import AgentTestModal from './components/AgentTestModal.vue';
|
||||
@@ -30,7 +28,6 @@ import { useAgentsAdmin } from './composables/useAgentsAdmin';
|
||||
import type { AgentRow } from '@/features/admin/types/agent.types';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const vLoading = ElLoading.directive;
|
||||
|
||||
const {
|
||||
@@ -183,7 +180,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<section class="admin-table-section min-h-64">
|
||||
<div class="admin-table-header admin-table-header--stacked">
|
||||
<div>
|
||||
@@ -298,7 +294,6 @@ onMounted(() => {
|
||||
@toggle-user="togglePermissionUser"
|
||||
/>
|
||||
</section>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
/**
|
||||
* features/admin/modules/announcements/AnnouncementsPage.vue
|
||||
* 用途:公告管理列表。一张卡片里放标题、发布按钮和表格。
|
||||
* 依赖:AdminListPage、useAnnouncementsAdmin、useElementProvider、element-plus、公告表单和详情对话框。
|
||||
* 依赖:AdminListPage、useAnnouncementsAdmin、element-plus、公告表单和详情对话框。
|
||||
* 逻辑:路由 /admin/announcements。骨架用 AdminListPage。发布、编辑、查看仍由本页的两个对话框完成。删除用 Element 确认框。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Plus } from '@element-plus/icons-vue';
|
||||
import { ElButton, ElConfigProvider, ElTable, ElTableColumn } from 'element-plus';
|
||||
import { ElButton, ElTable, ElTableColumn } from 'element-plus';
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import type { AdminAnnouncementRow } from '@/features/admin/types/admin.types';
|
||||
import AnnouncementDetailModal from './components/AnnouncementDetailModal.vue';
|
||||
import AnnouncementFormModal from './components/AnnouncementFormModal.vue';
|
||||
import { useAnnouncementsAdmin } from './composables/useAnnouncementsAdmin';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const {
|
||||
announcements,
|
||||
@@ -57,7 +55,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage :loading="isLoading">
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.announcement.title') }}</h2>
|
||||
@@ -113,7 +110,6 @@ onMounted(() => {
|
||||
@close="closeDetailModal"
|
||||
@edit="editFromDetail"
|
||||
/>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/**
|
||||
* features/admin/modules/approvals/ApprovalsPage.vue
|
||||
* 用途:用户注册审批列表。一张卡片里放标题和待审表格。
|
||||
* 依赖:AdminListPage、useApprovalsAdmin、useElementProvider、element-plus、roleLabel。
|
||||
* 依赖:AdminListPage、useApprovalsAdmin、element-plus、roleLabel。
|
||||
* 逻辑:路由未挂进当前菜单。通过和拒绝由 composable 弹出 Element 确认框后调接口。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { CircleCheck, Delete } from '@element-plus/icons-vue';
|
||||
import { ElButton, ElConfigProvider, ElTable, ElTableColumn, ElTag } from 'element-plus';
|
||||
import { ElButton, ElTable, ElTableColumn, ElTag } from 'element-plus';
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import { adminRoleLabel } from '@/features/admin/utils/roleLabel';
|
||||
import type { AdminUserRow } from '@/features/admin/types/admin.types';
|
||||
import { useApprovalsAdmin } from './composables/useApprovalsAdmin';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const {
|
||||
pendingUsers,
|
||||
@@ -35,7 +33,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage :loading="isLoading">
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.approval.title') }}</h2>
|
||||
@@ -90,5 +87,4 @@ onMounted(() => {
|
||||
</ElTableColumn>
|
||||
</ElTable>
|
||||
</AdminListPage>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/dashboard/DashboardPage.vue
|
||||
* 用途:管理后台仪表盘,四张可点击的统计卡。
|
||||
* 依赖:useDashboardAdmin、useElementProvider、element-plus。
|
||||
* 依赖:useDashboardAdmin、element-plus。
|
||||
* 逻辑:路由 /admin/dashboard。统计来自 useDashboardAdmin。点击分别进入应用配置、应用权限和数据报表。本页不是列表,不用 AdminListPage。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
@@ -9,17 +9,15 @@ import { onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ChatDotRound, DataAnalysis, Monitor, User } from '@element-plus/icons-vue';
|
||||
import { ElCard, ElConfigProvider, ElIcon, ElLoading, ElStatistic, ElTag } from 'element-plus';
|
||||
import { ElCard, ElIcon, ElLoading, ElStatistic, ElTag } from 'element-plus';
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import { useDashboardAdmin } from './composables/useDashboardAdmin';
|
||||
|
||||
const vLoading = ElLoading.directive;
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const {
|
||||
agentCount,
|
||||
@@ -49,7 +47,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<section v-loading="isLoading" class="admin-dash">
|
||||
<h2 class="section-title">{{ t('admin.nav.dashboard') }}</h2>
|
||||
<div v-if="!isLoading" class="admin-dash__grid">
|
||||
@@ -83,7 +80,6 @@ onMounted(() => {
|
||||
</ElCard>
|
||||
</div>
|
||||
</section>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/departments/DepartmentsPage.vue
|
||||
* 用途:部门管理列表。一张卡片里放标题、添加按钮、搜索、表格。
|
||||
* 依赖:AdminListPage、useDepartmentsAdmin、useElementProvider、element-plus、部门表单和员工名单弹窗。
|
||||
* 依赖:AdminListPage、useDepartmentsAdmin、element-plus、部门表单和员工名单弹窗。
|
||||
* 逻辑:路由 /admin/departments。骨架用 AdminListPage。筛选、列和两个弹窗留在本页。
|
||||
* 名称、编码、公司用表头排序,排的是当前过滤结果。删除用 Element 确认框。
|
||||
* 表格用 Element stripe 斑马纹。员工数、编辑、删除用 Element 链接按钮,悬停文案走 i18n title。
|
||||
@@ -12,7 +12,6 @@ import { useI18n } from 'vue-i18n';
|
||||
import { Delete, Edit, Plus, User } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElInput,
|
||||
ElLoading,
|
||||
ElTable,
|
||||
@@ -22,7 +21,6 @@ import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import type { AdminDepartmentMembersResponse, AdminDepartmentRow } from '@/features/admin/types/admin.types';
|
||||
import DepartmentFormModal from './components/DepartmentFormModal.vue';
|
||||
import DepartmentMembersModal from './components/DepartmentMembersModal.vue';
|
||||
@@ -34,7 +32,6 @@ const vLoading = ElLoading.directive;
|
||||
|
||||
const { t } = useI18n();
|
||||
const msg = useMessage();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const showMembersModal = ref(false);
|
||||
const departmentMembers = ref<AdminDepartmentMembersResponse | null>(null);
|
||||
|
||||
@@ -110,7 +107,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage :loading="isLoading">
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.dept.title') }}</h2>
|
||||
@@ -202,7 +198,6 @@ onMounted(() => {
|
||||
:data="departmentMembers"
|
||||
@close="showMembersModal = false"
|
||||
/>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -10,7 +10,6 @@ import { useI18n } from 'vue-i18n';
|
||||
import { Plus } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElSwitch,
|
||||
ElTable,
|
||||
ElTableColumn,
|
||||
@@ -21,7 +20,6 @@ import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import AdminListTabs from '@/features/admin/components/AdminListTabs.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import IntegrationConnectorFormDrawer from './components/IntegrationConnectorFormDrawer.vue';
|
||||
import IntegrationCapabilityCallModal from './components/IntegrationCapabilityCallModal.vue';
|
||||
import IntegrationCallLogsPanel from './components/IntegrationCallLogsPanel.vue';
|
||||
@@ -35,7 +33,6 @@ import type {
|
||||
} from './types/integration-connector.types';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const {
|
||||
clients, interfaces, bindings, credentials, capabilities, credentialTypes,
|
||||
@@ -207,7 +204,6 @@ function onListTab(name: string): void {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage :loading="isLoading">
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.integrationConnector.title') }}</h2>
|
||||
@@ -544,7 +540,6 @@ function onListTab(name: string): void {
|
||||
@close="closeCallModal"
|
||||
@run="runCall"
|
||||
/>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/linked-services/LinkedServicesPage.vue
|
||||
* 用途:关联服务列表。一张卡片里放标题、新增按钮和表格。
|
||||
* 依赖:AdminListPage、useLinkedServicesAdmin、useElementProvider、element-plus、关联服务表单对话框。
|
||||
* 依赖:AdminListPage、useLinkedServicesAdmin、element-plus、关联服务表单对话框。
|
||||
* 逻辑:路由 /admin/linked-services。启用项会出现在对话和工作台侧栏。删除用 Element 确认框。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
@@ -10,7 +10,6 @@ import { useI18n } from 'vue-i18n';
|
||||
import { Plus } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElSwitch,
|
||||
ElTable,
|
||||
ElTableColumn,
|
||||
@@ -19,13 +18,11 @@ import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import type { AdminLinkedServiceRow } from '@/features/admin/types/linked-service.types';
|
||||
import LinkedServiceFormModal from './components/LinkedServiceFormModal.vue';
|
||||
import { useLinkedServicesAdmin } from './composables/useLinkedServicesAdmin';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const {
|
||||
services,
|
||||
@@ -56,7 +53,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage :loading="isLoading">
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.linkedServices.title') }}</h2>
|
||||
@@ -110,7 +106,6 @@ onMounted(() => {
|
||||
@close="closeFormModal"
|
||||
@save="saveService"
|
||||
/>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/permissions/PermissionsPage.vue
|
||||
* 用途:应用权限页。已种子权限组时以角色包为主、矩阵只读;否则保留历史按人勾选。
|
||||
* 依赖:AdminListPage、AdminListTabs、usePermissionsAdmin、useElementProvider、element-plus、RoleEditModal、RoleMembersConfirmDialog、UserPickerDialog、BatchPermissionModal。
|
||||
* 依赖:AdminListPage、AdminListTabs、usePermissionsAdmin、element-plus、RoleEditModal、RoleMembersConfirmDialog、UserPickerDialog、BatchPermissionModal。
|
||||
* 逻辑:路由 /admin/permissions。骨架用 AdminListPage。角色/矩阵用 AdminListTabs。
|
||||
* 点人数打开选人弹窗,确定后必须确认增减才写库。删除和重写入口确认用 ElMessageBox。
|
||||
*/
|
||||
@@ -12,7 +12,6 @@ import { Download, Plus, Upload, User } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElCheckbox,
|
||||
ElConfigProvider,
|
||||
ElInput,
|
||||
ElLoading,
|
||||
ElOption,
|
||||
@@ -28,7 +27,6 @@ import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import AdminListTabs from '@/features/admin/components/AdminListTabs.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import BatchPermissionModal from '@/features/admin/modules/users/components/BatchPermissionModal.vue';
|
||||
import { getUserAvatarLabel } from '@/shared/utils/user-avatar';
|
||||
import UserPickerDialog from '@/shared/components/UserPickerDialog.vue';
|
||||
@@ -42,7 +40,6 @@ import { usePermissionsAdmin } from './composables/usePermissionsAdmin';
|
||||
const vLoading = ElLoading.directive;
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const csvInputRef = ref<HTMLInputElement | null>(null);
|
||||
|
||||
const {
|
||||
@@ -134,7 +131,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage :loading="isLoading">
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.perm.title') }}</h2>
|
||||
@@ -400,7 +396,6 @@ onMounted(() => {
|
||||
@cancel="cancelMembersConfirm"
|
||||
@confirm="applyMembers"
|
||||
/>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/platform-apps/PlatformAppsPage.vue
|
||||
* 用途:平台应用说明(新手指南)管理。按应用筛选指南,维护上传、启停与排序。
|
||||
* 依赖:AdminListPage、useElementProvider、element-plus、admin.api 指南 CRUD/上传、vue-i18n。
|
||||
* 依赖:AdminListPage、element-plus、admin.api 指南 CRUD/上传、vue-i18n。
|
||||
* 逻辑:Admin 路由挂载。选择应用后拉取指南列表。创建/编辑用对话框,删除用 Element 确认框。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
@@ -11,7 +11,6 @@ import { Plus } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElAlert,
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElDialog,
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
@@ -30,7 +29,6 @@ import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import {
|
||||
createAdminAgentGuide,
|
||||
deleteAdminAgentGuide,
|
||||
@@ -43,7 +41,6 @@ import {
|
||||
const vLoading = ElLoading.directive;
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const agents = ref<any[]>([]);
|
||||
const selectedAgentId = ref<number | ''>('');
|
||||
@@ -333,7 +330,6 @@ const formatSize = (bytes: number) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage>
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.nav.platformApps') }}</h2>
|
||||
@@ -499,7 +495,6 @@ const formatSize = (bytes: number) => {
|
||||
</ElButton>
|
||||
</template>
|
||||
</ElDialog>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
+1
-6
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/procurement-contract/ProcurementContractPage.vue
|
||||
* 用途:采购合同审查管理。一张卡片里放模板库、风险规则、审查历史三个页签。
|
||||
* 依赖:AdminListPage、AdminListTabs、useElementProvider、element-plus、procurement-contract.api、
|
||||
* 依赖:AdminListPage、AdminListTabs、element-plus、procurement-contract.api、
|
||||
* contract-ocr-match-tokens、ContractRiskRulesPanel、useMessage、vue-i18n。
|
||||
* 逻辑:Admin 路由挂载。页签用 AdminListTabs,筛选和表格走 AdminListPage。上传、区域配置、详情用对话框。
|
||||
* 删除用 Element 确认框。下载和保存仍走原有接口,参数不变。
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
ElButton,
|
||||
ElCheckbox,
|
||||
ElCheckboxGroup,
|
||||
ElConfigProvider,
|
||||
ElDescriptions,
|
||||
ElDescriptionsItem,
|
||||
ElDialog,
|
||||
@@ -37,7 +36,6 @@ import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import AdminListTabs from '@/features/admin/components/AdminListTabs.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import {
|
||||
createAdminContractTemplate,
|
||||
deleteAdminContractTemplate,
|
||||
@@ -65,7 +63,6 @@ const vLoading = ElLoading.directive;
|
||||
|
||||
const { t } = useI18n();
|
||||
const msg = useMessage();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
type ContractTab = 'templates' | 'rules' | 'reviews';
|
||||
type TagType = 'primary' | 'success' | 'warning' | 'info' | 'danger';
|
||||
@@ -701,7 +698,6 @@ function defaultLabel(isDefault: boolean): string {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage>
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.procurementContract.title') }}</h2>
|
||||
@@ -1135,7 +1131,6 @@ function defaultLabel(isDefault: boolean): string {
|
||||
</div>
|
||||
</template>
|
||||
</ElDialog>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/questions/QuestionsPage.vue
|
||||
* 用途:常用问题管理页。一张卡片里放标题、添加按钮、页签、筛选和表格。
|
||||
* 依赖:AdminListPage、AdminListTabs、useQuestionsAdmin、useElementProvider、element-plus、QuestionFormModal、HotFaqCandidatesPanel。
|
||||
* 依赖:AdminListPage、AdminListTabs、useQuestionsAdmin、element-plus、QuestionFormModal、HotFaqCandidatesPanel。
|
||||
* 逻辑:路由 /admin/questions。骨架用 AdminListPage,页签用 AdminListTabs。
|
||||
* 筛选、表格留在本页;热点候选由页签内容区的面板自己渲染。删除在 composable 里用 Element 确认框。
|
||||
*/
|
||||
@@ -12,7 +12,6 @@ import { Plus } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElCheckbox,
|
||||
ElConfigProvider,
|
||||
ElInput,
|
||||
ElLoading,
|
||||
ElOption,
|
||||
@@ -26,7 +25,6 @@ import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import AdminListTabs from '@/features/admin/components/AdminListTabs.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import type { AdminQuickQuestionRow } from '@/features/admin/types/question.types';
|
||||
import HotFaqCandidatesPanel from './components/HotFaqCandidatesPanel.vue';
|
||||
import QuestionFormModal from './components/QuestionFormModal.vue';
|
||||
@@ -35,7 +33,6 @@ import { useQuestionsAdmin } from './composables/useQuestionsAdmin';
|
||||
const vLoading = ElLoading.directive;
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const activeTab = ref<'manual' | 'hot'>('manual');
|
||||
|
||||
const {
|
||||
@@ -106,7 +103,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage>
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.question.title') }}</h2>
|
||||
@@ -242,7 +238,6 @@ onMounted(() => {
|
||||
@save="saveQuestion"
|
||||
@review="saveReviewQuestion"
|
||||
/>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/reports/ReportsPage.vue
|
||||
* 用途:管理后台数据报表。使用分析、运营总览是仪表盘;问题分析、应用运营、聊天日志和反馈是列表。
|
||||
* 依赖:useReportsAdmin、AdminListPage、AdminListTabs、useElementProvider、element-plus、@element-plus/icons-vue。
|
||||
* 依赖:useReportsAdmin、AdminListPage、AdminListTabs、element-plus、@element-plus/icons-vue。
|
||||
* 逻辑:路由 /admin/reports/:table?。看板块用 ElCard;有表格的页签用 AdminListPage。
|
||||
* 反馈页签用 AdminListTabs。筛选和分页沿用 composable 里的原状态。删除聊天日志用 Element 确认框。
|
||||
*/
|
||||
@@ -24,7 +24,6 @@ import {
|
||||
ElButton,
|
||||
ElCard,
|
||||
ElCheckbox,
|
||||
ElConfigProvider,
|
||||
ElDatePicker,
|
||||
ElDescriptions,
|
||||
ElDescriptionsItem,
|
||||
@@ -48,14 +47,12 @@ import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import AdminListTabs from '@/features/admin/components/AdminListTabs.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import type { ApplicationReportItem, ApplicationSortKey, ApplicationUsageFilter } from '@/features/admin/types/report.types';
|
||||
import { formatLocalDateTime } from '@/shared/utils/dateTime';
|
||||
import { useReportsAdmin } from './composables/useReportsAdmin';
|
||||
|
||||
const vLoading = ElLoading.directive;
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
/** 通用报表行。动态列,字段随当前表变化。 */
|
||||
interface ReportTableRow {
|
||||
@@ -857,7 +854,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<div v-loading="isLoading" class="report-page" :class="{ 'is-fullscreen': isFullScreen }">
|
||||
<template v-if="!isLoading">
|
||||
<section v-if="isUsageAnalysisTable" class="report-dash">
|
||||
@@ -1899,7 +1895,6 @@ onMounted(() => {
|
||||
<ElButton @click="closeChatLogDetail">{{ t('admin.report.chatLog.close') }}</ElButton>
|
||||
</template>
|
||||
</ElDialog>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
* features/admin/modules/schedules/SchedulesPage.vue
|
||||
* 用途:定时任务管理独立页面壳层。路由:/admin/schedules
|
||||
* 依赖:useSchedulesAdmin、schedules.context、Element Plus、子 panel/overlays。
|
||||
* 逻辑:reactive + provide admin;ElConfigProvider 包裹 admin-table-section;概览/工作台切换。
|
||||
* 逻辑:reactive + provide admin;概览/工作台切换。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { onMounted, provide, reactive } from 'vue';
|
||||
import { ElConfigProvider } from 'element-plus';
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import { useSchedulesAdmin } from './composables/useSchedulesAdmin';
|
||||
import {
|
||||
SCHEDULES_ADMIN_KEY,
|
||||
@@ -22,7 +20,6 @@ import ScheduleOverviewPanel from './components/ScheduleOverviewPanel.vue';
|
||||
import ScheduleWorkbenchPanel from './components/ScheduleWorkbenchPanel.vue';
|
||||
import SchedulesPageOverlays from './components/SchedulesPageOverlays.vue';
|
||||
|
||||
const { elementLocale } = useElementProvider();
|
||||
const adminApi = useSchedulesAdmin();
|
||||
const admin = reactive(adminApi) as SchedulesAdminContextProvided;
|
||||
provide(SCHEDULES_ADMIN_KEY, admin);
|
||||
@@ -36,12 +33,10 @@ onMounted(async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<section class="admin-table-section animate-fade-in-up">
|
||||
<SchedulePageHeader />
|
||||
<ScheduleOverviewPanel v-if="admin.scheduleViewMode === 'overview'" />
|
||||
<ScheduleWorkbenchPanel v-else />
|
||||
</section>
|
||||
<SchedulesPageOverlays />
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* features/admin/modules/training-config/TrainingConfigPage.vue
|
||||
* 用途:培训类型、资料、题库、复盘和精益周任务的后台配置界面。
|
||||
* 依赖:AdminListTabs、admin.api 培训配置接口、training-config.types、TrainingTypeFormModal、LeanTargetModal、useElementProvider、element-plus。
|
||||
* 依赖:AdminListTabs、admin.api 培训配置接口、training-config.types、TrainingTypeFormModal、LeanTargetModal、element-plus。
|
||||
* 逻辑:培训类型用 AdminListTabs 切换;分区单选只展示当前卡片,避免高亮和可见内容错位。保存条留在内容列底部,不盖住表单。本页是配置工作台,不是列表,不用 AdminListPage。删除用 Element 确认框。保存时仍把题目同步到 settings 与内嵌题目资源后提交既有 API。
|
||||
*/
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
@@ -27,7 +27,6 @@ import {
|
||||
ElButton,
|
||||
ElCard,
|
||||
ElCheckbox,
|
||||
ElConfigProvider,
|
||||
ElDatePicker,
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
@@ -49,7 +48,6 @@ import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListTabs from '@/features/admin/components/AdminListTabs.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import { useMessage } from '@/shared/composables/useMessage';
|
||||
import {
|
||||
createAdminTrainingConfig,
|
||||
@@ -85,7 +83,6 @@ import TrainingTypeFormModal from './components/TrainingTypeFormModal.vue';
|
||||
import LeanTargetModal from './components/LeanTargetModal.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const vLoading = ElLoading.directive;
|
||||
const msg = useMessage();
|
||||
const configs = ref<TrainingConfig[]>([]);
|
||||
@@ -929,7 +926,6 @@ onMounted(() => void load());
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<div v-loading="isLoading" class="training-page">
|
||||
<header class="training-page__head">
|
||||
<h2 class="section-title">{{ t('admin.trainingConfig.title') }}</h2>
|
||||
@@ -1502,7 +1498,6 @@ onMounted(() => void load());
|
||||
@save="handleLeanTargetSave"
|
||||
/>
|
||||
</div>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* features/admin/modules/users/UsersPage.vue
|
||||
* 用途:用户管理独立页面(服务端筛选分页、用户/部门列排序、批量操作)。
|
||||
* 依赖:useUsersAdmin、useElementProvider、element-plus、用户相关 Modal、adminRoleLabel、getUserAvatarLabel。
|
||||
* 依赖:useUsersAdmin、element-plus、用户相关 Modal、adminRoleLabel、getUserAvatarLabel。
|
||||
* 逻辑:路由 /admin/users。列表骨架用 AdminListPage;筛选、表格、分页和三个业务弹窗仍由本页组装。
|
||||
* 删除和改角色用 Element 确认框。列表经 listAdminUsersPage 按页拉取。
|
||||
*/
|
||||
@@ -11,7 +11,6 @@ import { useI18n } from 'vue-i18n';
|
||||
import { Delete, Edit, Plus, User } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElInput,
|
||||
ElLoading,
|
||||
ElOption,
|
||||
@@ -28,7 +27,6 @@ import '@/features/admin/styles/element-trial.css';
|
||||
import { adminRoleLabel } from '@/features/admin/utils/roleLabel';
|
||||
import { getUserAvatarLabel } from '@/shared/utils/user-avatar';
|
||||
import type { AdminUserRow } from '@/features/admin/types/admin.types';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import BatchEditUserModal from './components/BatchEditUserModal.vue';
|
||||
import BatchPermissionModal from './components/BatchPermissionModal.vue';
|
||||
@@ -38,7 +36,6 @@ import { useUsersAdmin } from './composables/useUsersAdmin';
|
||||
const vLoading = ElLoading.directive;
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
|
||||
const {
|
||||
agents,
|
||||
@@ -125,7 +122,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage :loading="isLoading">
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.user.title') }}</h2>
|
||||
@@ -277,7 +273,6 @@ onMounted(() => {
|
||||
@close="showBatchPermissionModal = false"
|
||||
@save="submitBatchPermission"
|
||||
/>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* features/admin/modules/wecom/WecomLayout.vue
|
||||
* 用途:企微管理壳层。注入共享数据,并提供 Element 语言与样式。
|
||||
* 依赖:useWecomAdmin、useElementProvider、element-plus、WECOM_ADMIN_KEY。
|
||||
* 用途:企微管理壳层。注入共享数据,并引入 Element 样式。
|
||||
* 依赖:useWecomAdmin、element-plus、WECOM_ADMIN_KEY。
|
||||
* 逻辑:路由 /admin/wecom 的父级。首屏等 loadAll 结束后再渲染子页。子页自己放页签和列表,解绑确认在 composable 里完成。
|
||||
*/
|
||||
import { onMounted, provide } from 'vue';
|
||||
import { ElConfigProvider, ElLoading } from 'element-plus';
|
||||
import { ElLoading } from 'element-plus';
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import { useWecomAdmin } from './composables/useWecomAdmin';
|
||||
import { WECOM_ADMIN_KEY } from './wecom.context';
|
||||
|
||||
const vLoading = ElLoading.directive;
|
||||
const { elementLocale } = useElementProvider();
|
||||
const wecomAdmin = useWecomAdmin();
|
||||
const { isLoading } = wecomAdmin;
|
||||
provide(WECOM_ADMIN_KEY, wecomAdmin);
|
||||
@@ -26,11 +24,9 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<div v-loading="isLoading" class="wecom-layout">
|
||||
<router-view v-if="!isLoading" />
|
||||
</div>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -10,7 +10,6 @@ import { useI18n } from 'vue-i18n';
|
||||
import { Download, Refresh } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElOption,
|
||||
ElPagination,
|
||||
ElSelect,
|
||||
@@ -24,14 +23,12 @@ import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import { formatLocalDateTime } from '@/shared/utils/dateTime';
|
||||
import type { WecomLoginAuditRow } from '@/features/admin/types/wecom.types';
|
||||
import WecomSubNav from '../components/WecomSubNav.vue';
|
||||
import { WECOM_ADMIN_KEY } from '../wecom.context';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const {
|
||||
wecomAuditSourceFilter,
|
||||
wecomAuditStatusFilter,
|
||||
@@ -65,7 +62,6 @@ function onAuditStatusChange(value: 'success' | 'failed' | '' | undefined): void
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage>
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.wecom.title') }}</h2>
|
||||
@@ -158,7 +154,6 @@ function onAuditStatusChange(value: 'success' | 'failed' | '' | undefined): void
|
||||
/>
|
||||
</template>
|
||||
</AdminListPage>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -11,7 +11,6 @@ import { Link, Refresh } from '@element-plus/icons-vue';
|
||||
import {
|
||||
ElButton,
|
||||
ElCheckbox,
|
||||
ElConfigProvider,
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
ElInput,
|
||||
@@ -27,7 +26,6 @@ import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import type { WecomBindingRow } from '@/features/admin/types/wecom.types';
|
||||
import WecomOverviewCards from '../components/WecomOverviewCards.vue';
|
||||
import WecomSyncPanel from '../components/WecomSyncPanel.vue';
|
||||
@@ -35,7 +33,6 @@ import WecomSubNav from '../components/WecomSubNav.vue';
|
||||
import { WECOM_ADMIN_KEY } from '../wecom.context';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const {
|
||||
wecomBindUserOptions,
|
||||
wecomBindUserQuery,
|
||||
@@ -78,7 +75,6 @@ function onBindUserChange(value: number | string | undefined): void {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<div class="wecom-bindings">
|
||||
<AdminListPage>
|
||||
<template #title>
|
||||
@@ -217,7 +213,6 @@ function onBindUserChange(value: number | string | undefined): void {
|
||||
</template>
|
||||
</AdminListPage>
|
||||
</div>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
ElCard,
|
||||
ElCollapse,
|
||||
ElCollapseItem,
|
||||
ElConfigProvider,
|
||||
ElForm,
|
||||
ElFormItem,
|
||||
ElIcon,
|
||||
@@ -30,13 +29,11 @@ import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import type { WecomIntegrationManifest } from '@/features/admin/types/wecom.types';
|
||||
import WecomSubNav from '../components/WecomSubNav.vue';
|
||||
import { WECOM_ADMIN_KEY } from '../wecom.context';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const {
|
||||
wecomSystemSettings,
|
||||
isSaving,
|
||||
@@ -77,7 +74,6 @@ const copyItems = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage>
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('admin.wecom.title') }}</h2>
|
||||
@@ -384,7 +380,6 @@ const copyItems = computed(() => {
|
||||
</section>
|
||||
</div>
|
||||
</AdminListPage>
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,89 +1,11 @@
|
||||
/**
|
||||
* features/admin/styles/element-trial.css
|
||||
* 用途:管理端 Element Plus 的字体、字号、颜色、圆角、控件高度,以及和 Tailwind 共存的修正。
|
||||
* 依赖:tokens.css 的 --text-* / --bg-* / --border-*,element-plus 暗色变量,Tailwind preflight。
|
||||
* 逻辑:由 UsersPage、AgentsPage、KbAdminPanel 在暗色 CSS 之后引入,所以 html.dark 能盖过 Element 默认暗色。
|
||||
* 字号和颜色以本文变量为准。页面不要再用 text-sm / text-muted 改表格和按钮。
|
||||
* 用途:管理端列表专用的表格内边距、分页条和表单补充说明。
|
||||
* 依赖:shared/styles/element-theme.css 的 Element 变量。
|
||||
* 逻辑:本文件先引入全站皮肤。管理页在暗色 CSS 之后引入本文件,变量才能盖过 Element 默认暗色。
|
||||
* 列宽、筛选框宽度不要写进这里。对话等非列表页只引 element-theme.css,不引本文件。
|
||||
*/
|
||||
|
||||
:root,
|
||||
html.dark {
|
||||
--el-color-primary: #0284c7;
|
||||
--el-color-primary-light-3: #4da3d6;
|
||||
--el-color-primary-light-5: #81c2e3;
|
||||
--el-color-primary-light-7: #b4daf0;
|
||||
--el-color-primary-light-8: #cde6f4;
|
||||
--el-color-primary-light-9: #e6f3fa;
|
||||
--el-color-primary-dark-2: #0269a0;
|
||||
--el-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
|
||||
--el-font-size-extra-large: 20px;
|
||||
--el-font-size-large: 18px;
|
||||
--el-font-size-medium: 16px;
|
||||
--el-font-size-base: 14px;
|
||||
--el-font-size-small: 13px;
|
||||
--el-font-size-extra-small: 12px;
|
||||
--el-text-color-primary: var(--text-primary);
|
||||
--el-text-color-regular: var(--text-secondary);
|
||||
--el-text-color-secondary: var(--text-muted);
|
||||
--el-text-color-placeholder: var(--text-muted);
|
||||
--el-text-color-disabled: var(--text-muted);
|
||||
--el-border-color: var(--border-default);
|
||||
--el-border-color-light: var(--border-subtle);
|
||||
--el-border-color-lighter: var(--border-subtle);
|
||||
--el-bg-color: var(--bg-surface);
|
||||
--el-bg-color-overlay: var(--bg-surface);
|
||||
--el-fill-color-blank: var(--bg-surface);
|
||||
--el-fill-color-light: var(--bg-surface-soft);
|
||||
--el-border-radius-base: 8px;
|
||||
--el-component-size: 32px;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-button .el-icon,
|
||||
.el-button svg {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* Tailwind forms 会给单行输入框内部的 input 加边框。聚焦时左右两边会多出两条蓝线。
|
||||
多行输入框的边框就画在 .el-textarea__inner 上,不能一起清掉。 */
|
||||
.el-input__inner,
|
||||
.el-select__input,
|
||||
.el-range-input,
|
||||
.el-input__inner:hover,
|
||||
.el-select__input:hover,
|
||||
.el-range-input:hover,
|
||||
.el-input__inner:focus,
|
||||
.el-select__input:focus,
|
||||
.el-range-input:focus {
|
||||
border: 0;
|
||||
outline: none;
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
}
|
||||
|
||||
.el-textarea__inner {
|
||||
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
||||
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
||||
}
|
||||
|
||||
.el-textarea__inner:hover {
|
||||
box-shadow: 0 0 0 1px var(--el-input-hover-border-color, var(--el-border-color-hover)) inset;
|
||||
}
|
||||
|
||||
.el-textarea__inner:focus {
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 1px var(--el-input-focus-border-color, var(--el-color-primary)) inset;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
}
|
||||
@import "../../../shared/styles/element-theme.css";
|
||||
|
||||
/* 列表首尾列与页头 32px 对齐;分页贴在表格下方 */
|
||||
.hx-admin-table .el-table__cell:first-child .cell {
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
/**
|
||||
* features/chat/views/ChatView.vue
|
||||
* 单个 Agent 对话页入口:provide 编排上下文,子组件 inject 消费。
|
||||
* 依赖:useChatPage、ChatViewContent/ChatViewOverlays。
|
||||
* 依赖:useChatPage、ChatViewContent/ChatViewOverlays、shared/styles/element-theme.css。
|
||||
* 逻辑:在途调拨业务面板(Transfer* 组件)已 EP 组件化(el-dialog/el-table/el-select),
|
||||
* EP 样式随本页入口全量引入(亮色 + 暗色变量,模式同 admin 页面内引入),
|
||||
* 保证 chat 直达时样式就绪、不依赖 admin 路由先行加载。
|
||||
* EP 官方样式和全站 element-theme.css 随本页入口引入,放在暗色变量之后。
|
||||
* 不引管理端 element-trial.css。保证 chat 直达时样式就绪、不依赖 admin 路由先行加载。
|
||||
*/
|
||||
import { provide, reactive } from 'vue';
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/shared/styles/element-theme.css';
|
||||
import { useChatPage } from '@/features/chat/composables/useChatPage';
|
||||
import { CHAT_PAGE_KEY, type ChatPageContextProvided } from '@/features/chat/composables/chat.context';
|
||||
import ChatViewContent from '@/features/chat/components/ChatViewContent.vue';
|
||||
|
||||
@@ -13,7 +13,6 @@ import { CircleCheck, Plus, Search, Setting, Tools } from '@element-plus/icons-v
|
||||
import {
|
||||
ElAlert,
|
||||
ElButton,
|
||||
ElConfigProvider,
|
||||
ElInput,
|
||||
ElLoading,
|
||||
ElMessageBox,
|
||||
@@ -25,7 +24,6 @@ import {
|
||||
import 'element-plus/dist/index.css';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
import '@/features/admin/styles/element-trial.css';
|
||||
import { useElementProvider } from '@/features/admin/composables/useElementProvider';
|
||||
import AdminListPage from '@/features/admin/components/AdminListPage.vue';
|
||||
import KbGroupDrawer, { type KbGroupFormValue } from './KbGroupDrawer.vue';
|
||||
import DifyHealthDialog from './DifyHealthDialog.vue';
|
||||
@@ -45,7 +43,6 @@ type GroupSortKey = 'name' | 'document_count' | 'updated_at';
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { elementLocale } = useElementProvider();
|
||||
const vLoading = ElLoading.directive;
|
||||
|
||||
const groups = ref<KbGroup[]>([]);
|
||||
@@ -269,7 +266,6 @@ defineExpose({ loadData });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElConfigProvider :locale="elementLocale">
|
||||
<AdminListPage>
|
||||
<template #title>
|
||||
<h2 class="section-title">{{ t('kbAdmin.groupsTitle') }}</h2>
|
||||
@@ -372,7 +368,6 @@ defineExpose({ loadData });
|
||||
|
||||
<DifySettingsDialog :open="settingsDialogOpen" @close="settingsDialogOpen = false" @saved="(message) => { feedback = message; feedbackType = 'success'; void loadData(); }" @error="(message) => { feedback = message; feedbackType = 'error'; }" />
|
||||
<DifyHealthDialog :open="healthDialogOpen" @close="healthDialogOpen = false" @error="(message) => { feedback = message; feedbackType = 'error'; }" />
|
||||
</ElConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in new issue
Block a user