Commit 232ce6f0 authored by cellee's avatar cellee

退出登录清除用户信息,公告图片问题,文案更改,分页样式统一,样式更改

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent a9d78365
......@@ -42,6 +42,7 @@ export default defineConfig({
name: 'login',
path: '/user/login',
component: './user/login',
title: 'login',
},
{
name: 'login',
......@@ -70,14 +71,14 @@ export default defineConfig({
},
{
path: '/',
redirect: '/runTest',
},
{
path: '/runTest',
name: 'monitoringcenter',
icon: 'PieChartOutlined',
component: './runTest/Template',
redirect: '/UserManagement/LIFEUserManagement',
},
// {
// path: '/runTest',
// name: 'monitoringcenter',
// icon: 'PieChartOutlined',
// component: './runTest/Template',
// },
{
path: '/UserManagement',
name: 'usemanagement',
......@@ -246,6 +247,7 @@ export default defineConfig({
{ path: './Detail', component: './ContractManagement/ContractDetail' },
{ path: './Edit', component: './ContractManagement/ContractContent' },
{ path: './Add', component: './ContractManagement/ContractContent' },
{ path: '*', component: '@/pages/404' },
],
},
{
......@@ -260,6 +262,7 @@ export default defineConfig({
{ path: './', component: './CommunityManagement/CellList/CellList' },
{ path: './Add', component: './CommunityManagement/CellList/Adds' },
{ path: './Detail', component: './CommunityManagement/CellList/Details' },
{ path: '*', component: '@/pages/404' },
],
},
{
......@@ -280,6 +283,7 @@ export default defineConfig({
path: './Detail',
component: './CommunityManagement/CommunityAnnouncement/Detail',
},
{ path: '*', component: '@/pages/404' },
],
},
{
......@@ -314,6 +318,7 @@ export default defineConfig({
path: './FacilityApply',
component: './CommunityManagement/FacilityBookings/Bookings',
},
{ path: '*', component: '@/pages/404' },
],
},
{
......@@ -321,8 +326,10 @@ export default defineConfig({
name: 'visitorrecord',
routes: [
{ path: './', component: './CommunityManagement/VisitorRecord/VisitorRecord' },
{ path: '*', component: '@/pages/404' },
],
},
{ path: '*', component: '@/pages/404' },
],
},
{
......@@ -347,6 +354,7 @@ export default defineConfig({
{ path: './Add', component: './AccountManagement/account/AccountAdds' },
{ path: './Detail', component: './AccountManagement/account/AccountDetail' },
{ path: './reset', component: './AccountManagement/account/AccountReset' },
{ path: '*', component: '@/pages/404' },
],
},
......@@ -360,20 +368,24 @@ export default defineConfig({
name: 'languagesettings',
component: './AccountManagement/LanguageSettings/LanguageSettings',
},
],
},
{
component: './404',
path: '*',
component: '@/pages/404',
},
],
},
{
component: './404',
path: '*',
component: '@/pages/404',
},
],
},
],
},
{
component: './404',
path: '*',
component: '@/pages/404',
},
{
component: './403',
......
import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
import { Avatar, Menu, Spin } from 'antd';
import { ClickParam } from 'antd/es/menu';
import { setCookie } from '@/utils/method';
import React from 'react';
import { history, ConnectProps, connect } from 'umi';
import { ConnectState } from '@/models/connect';
......@@ -27,21 +28,22 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
// 清掉所有localStorage缓存
localStorage.clear();
// 清掉本域名所有cookie
// let keys = document.cookie.match(/[^ =;]+(?==)/g);
// if (keys) {
// for (var i = keys.length; i--; ) {
// document.cookie = keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString(); // 清除当前域名下的,例如:m.ratingdog.cn
// document.cookie =
// keys[i] +
// '=0;path=/;domain=' +
// document.domain +
// ';expires=' +
// new Date(0).toUTCString(); // 清除当前域名下的,例如 .m.ratingdog.cn
// document.cookie =
// keys[i] + '=0;path=/;domain=ratingdog.cn;expires=' + new Date(0).toUTCString(); // 清除一级域名下的或指定的,例如 .ratingdog.cn
// }
// }
let keys = document.cookie.match(/[^ =;]+(?==)/g);
if (keys) {
for (var i = keys.length; i--; ) {
document.cookie = keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString();
document.cookie =
keys[i] +
'=0;path=/;domain=' +
document.domain +
';expires=' +
new Date(0).toUTCString();
document.cookie =
keys[i] + '=0;path=/;domain=ratingdog.cn;expires=' + new Date(0).toUTCString();
}
}
dispatch({
type: 'login/logout',
});
......
......@@ -403,7 +403,7 @@ class SelectOptions extends React.PureComponent {
options={this.state.checkedListOptions} // 所有数组
value={this.state.checkedList} // 选中的数组
onChange={this.onChangeValue}
style={{ marginLeft: 10 }}
style={{ marginLeft: 10, display: 'block' }}
/>
<div>
<h1> </h1>
......
......@@ -41,12 +41,14 @@ const Add = (props: any) => {
noticStartTime: day,
noticEndTime: day2,
});
// 发起请求图片
if (DataSave.noticImageName) {
// 如果存在图片 发起请求图片
let msg = {
type: 'tosCommunityNoticePreview',
fileName: DataSave.noticImageName,
};
RA(47, msg, module, dispatch);
}
// 解除结束时间不可选
settimeT(false);
......
......@@ -57,7 +57,7 @@ const CommunityAnnouncement = (props: any) => {
return <Tag color="green">Take Effect</Tag>; // 发布中
break;
case 2:
return <Tag color="red">Invalid</Tag>; // 已过期
return <Tag color="red">Expired</Tag>; // 已过期
break;
default:
return <Tag color="cyan">Waiting For Release</Tag>; // 等待发布
......
......@@ -52,7 +52,7 @@ const Detail = (props: any) => {
// <Tag color="green">Publishing</Tag>; // 发布中
break;
case 2:
return <Badge status="error" text="Invalid" />; // 已过期
return <Badge status="error" text="Expired" />; // 已过期
break;
default:
return <Badge status="processing" text="Waiting For Release" />; // 等待发布
......
......@@ -68,6 +68,8 @@ const VisitorRecord = (props: any) => {
total: Data != null ? Data.length : 0,
defaultPageSize: 12,
showSizeChanger: false,
showTitle: false,
showTotal: false,
size: 'default',
};
......@@ -252,8 +254,8 @@ const VisitorRecord = (props: any) => {
// pagination={{ current: 1, total: Data.total}}
search={false}
options={{
density: true,
fullScreen: true,
density: false,
fullScreen: false,
reload: () => {
onReset();
},
......
......@@ -68,6 +68,8 @@ const VisitorRecord = (props: any) => {
total: Data != null ? Data.length : 0,
defaultPageSize: 12,
showSizeChanger: false,
showTitle: false,
showTotal: false,
size: 'default',
};
......@@ -252,8 +254,8 @@ const VisitorRecord = (props: any) => {
// pagination={{ current: 1, total: Data.total}}
search={false}
options={{
density: true,
fullScreen: true,
density: false,
fullScreen: false,
reload: () => {
onReset();
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment