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