|
|
@@ -1,12 +1,10 @@
|
|
|
<template>
|
|
|
<div :class="prefixCls" class="relative flex h-full min-h-0 w-full flex-col overflow-hidden bg-light-400">
|
|
|
- <div class="case-header-bar flex items-center justify-between">
|
|
|
- <AppLogo :showTitle="true" />
|
|
|
- <div class="flex items-center gap-3">
|
|
|
- <span v-if="accountDisplayName" class="text-sm text-gray-600">{{ accountDisplayName }}</span>
|
|
|
- <Button type="text" size="small" @click="handleLogout">退出登录</Button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <AppHeader>
|
|
|
+ <template #actions>
|
|
|
+ <UserDropdown />
|
|
|
+ </template>
|
|
|
+ </AppHeader>
|
|
|
<div class="container relative mx-auto flex h-full min-h-0 flex-1 flex-col py-2">
|
|
|
<div class="flex h-full min-h-0 flex-col">
|
|
|
<div class="flex items-start justify-between gap-4">
|
|
|
@@ -139,40 +137,16 @@
|
|
|
import { useDesign } from '@/core/hooks/web/useDesign';
|
|
|
import { useMessage } from '@/core/hooks/web/useMessage';
|
|
|
import { useUserStore } from '@/core/store/modules/case';
|
|
|
- import { useAccountStore } from '@/core/store/modules/account';
|
|
|
- import { useRouter } from 'vue-router';
|
|
|
- import { PageEnum } from '@/core/enums/pageEnum';
|
|
|
import { useModal } from '@/core/components/Modal';
|
|
|
- import { AppLogo, AppSearch } from '@/core/components/Application';
|
|
|
+ import { AppHeader } from '@/core/components/Application';
|
|
|
+ import { UserDropdown } from '@/core/layouts/default/header/components';
|
|
|
import { list, deleteById } from '@/plat/api/case/caseApi';
|
|
|
import type { CaseInfo } from '@/plat/api/case/caseApi';
|
|
|
import CaseForm from './CaseForm.vue';
|
|
|
|
|
|
- const { showMessage, notification, createConfirm } = useMessage();
|
|
|
+ const { showMessage, notification } = useMessage();
|
|
|
const { prefixCls } = useDesign('case-list');
|
|
|
const userStore = useUserStore();
|
|
|
- const accountStore = useAccountStore();
|
|
|
- const router = useRouter();
|
|
|
- const accountDisplayName = computed(() => accountStore.getDisplayName);
|
|
|
-
|
|
|
- /**
|
|
|
- * 退出登录。
|
|
|
- *
|
|
|
- * <p>案件列表页没有 Layout Header,所以入口放在本页顶部。
|
|
|
- * 注意与「退出当前案件」(Header 里的 LogoutButton)语义不同:这里会注销 token。
|
|
|
- */
|
|
|
- function handleLogout() {
|
|
|
- createConfirm({
|
|
|
- iconType: 'warning',
|
|
|
- title: '提示',
|
|
|
- content: '确认退出登录?退出后需要重新输入账号密码。',
|
|
|
- onOk: async () => {
|
|
|
- userStore.resetState();
|
|
|
- await accountStore.logout();
|
|
|
- await router.replace({ path: PageEnum.BASE_AUTHORIZATION });
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
const caseList = ref<CaseInfo[]>([]);
|
|
|
const searchKeyword = ref('');
|
|
|
@@ -323,54 +297,6 @@
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
|
|
|
- .case-header-bar {
|
|
|
- height: 48px;
|
|
|
- padding: 0 12px 0 0;
|
|
|
- background: #fff;
|
|
|
- -webkit-app-region: drag;
|
|
|
-
|
|
|
- .jeesite-app-logo {
|
|
|
- -webkit-app-region: no-drag;
|
|
|
-
|
|
|
- &__title {
|
|
|
- display: inline-flex;
|
|
|
- align-items: baseline;
|
|
|
- gap: 6px;
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- color: #555;
|
|
|
- font-family: Arial, 'Microsoft YaHei', sans-serif;
|
|
|
- cursor: default;
|
|
|
- user-select: none;
|
|
|
- transition: all 0.5s;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .jeesite-app-logo img {
|
|
|
- width: 32px;
|
|
|
- height: 32px;
|
|
|
- margin-right: 2px;
|
|
|
- }
|
|
|
-
|
|
|
- .jeesite-header-action-button {
|
|
|
- display: inline-flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- width: 36px;
|
|
|
- height: 36px;
|
|
|
- border-radius: 10px;
|
|
|
- color: #333;
|
|
|
- font-size: 18px;
|
|
|
- cursor: pointer;
|
|
|
- transition: background-color 0.2s ease;
|
|
|
- -webkit-app-region: no-drag;
|
|
|
-
|
|
|
- &:hover {
|
|
|
- background-color: #f6f6f6;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
.case-card {
|
|
|
border-radius: 12px;
|
|
|
transition: all 0.3s ease;
|