feat: 删除页眉下方的标题和说明内容

This commit is contained in:
TsMask
2023-10-20 10:44:43 +08:00
parent 08167b3d0a
commit 3a7d127033
47 changed files with 167 additions and 470 deletions

View File

@@ -1,6 +1,5 @@
<script setup lang="ts">
import { useRoute } from 'vue-router';
import { reactive, ref, onMounted, toRaw } from 'vue';
import { reactive, onMounted, toRaw } from 'vue';
import { PageContainer } from '@ant-design-vue/pro-layout';
import { message, Modal } from 'ant-design-vue/lib';
import { SizeType } from 'ant-design-vue/lib/config-provider';
@@ -11,10 +10,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listSession, logoutSession } from '@/api/monitor/session';
import { diffValue, parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const route = useRoute();
/**路由标题 */
let title = ref<string>((route.meta.title as string) ?? '标题');
/**查询参数 */
let queryParams = reactive({
@@ -108,9 +103,9 @@ let tableColumns: ColumnsType = [
align: 'center',
customRender(opt) {
if (opt.value === 'online') {
return t('views.monitor.session.online')
return t('views.monitor.session.online');
}
return t('views.monitor.session.offline')
return t('views.monitor.session.offline');
},
},
{
@@ -157,14 +152,16 @@ function fnTableSize({ key }: MenuInfo) {
function fnForceLogout(row: Record<string, string>) {
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.monitor.session.logoutTip', {num: row.accountId}),
content: t('views.monitor.session.logoutTip', { num: row.accountId }),
onOk() {
const hide = message.loading(t('common.loading'), 0);
logoutSession(row.id)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('views.monitor.session.logoutSuccess', {num: row.accountId}),
content: t('views.monitor.session.logoutSuccess', {
num: row.accountId,
}),
duration: 3,
});
} else {
@@ -201,7 +198,7 @@ onMounted(() => {
</script>
<template>
<PageContainer :title="title">
<PageContainer>
<a-card
v-show="tableState.seached"
:bordered="false"
@@ -211,7 +208,10 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.monitor.session.userName')" name="accountId ">
<a-form-item
:label="t('views.monitor.session.userName')"
name="accountId "
>
<a-input
v-model:value="queryParams.accountId"
allow-clear