Browse Source

弹出框取消操作修改

dev
deartibers 2 years ago
parent
commit
cd7205500f
  1. 226
      web/client/src/layout/components/header/index.jsx
  2. 3
      web/client/src/sections/install/components/adminModal.jsx
  3. 3
      web/client/src/sections/install/components/memberModal.jsx
  4. 3
      web/client/src/sections/install/components/systemModal.jsx
  5. 6
      web/client/src/sections/install/containers/roles.jsx
  6. 3
      web/client/src/sections/install/containers/system.jsx

226
web/client/src/layout/components/header/index.jsx

@ -5,121 +5,133 @@ import { Nav, Avatar, Dropdown } from "@douyinfe/semi-ui";
import "./index.less";
const Header = (props) => {
const { dispatch, history, user, actions, socket, headerItems, tochange } = props;
const { dispatch, history, user, actions, socket, headerItems, tochange } = props;
return (
<>
<div id="top-slider">
<Nav
mode={"horizontal"}
onClick={({ itemKey }) => {
if (itemKey == "logout") {
dispatch(actions.auth.logout(user));
if (socket) {
socket.disconnect();
}
history.push(`/signin`);
}
}}
style={{
height: 48,
minWidth: 520,
background: '#1D2343',
backgroundSize: "100% 100%",
color: "white",
}}
header={{
logo: (
<img
src="/assets/images/background/logo.png"
style={{ display: "inline-block", width: 280, height: 40 }}
/>
),
text: (
<div style={{ fontFamily: "YouSheBiaoTiHei", color: '#FFFFFF' }}>运维管理系统</div>
),
}}
footer={
<>
{headerItems.map((item, index) => {
if (item.hasOwnProperty('items')) {
return (
<Nav.Sub
key={index + 'a'}
itemKey={item.itemKey}
text={item.text}
dropdownStyle={{ color: '#F2F3F5' }}
>
{item.hasOwnProperty('items') && item.items.map((ite, idx) => (
<Nav.Item key={idx + 'd'} itemKey={ite.itemKey} text={ite.text} onClick={() => { tochange(ite); }} />
))}
</Nav.Sub>
)
return (
<>
<div id="top-slider">
<Nav
mode={"horizontal"}
onClick={({ itemKey }) => {
if (itemKey == "logout") {
dispatch(actions.auth.logout(user));
if (socket) {
socket.disconnect();
}
history.push(`/signin`);
}
else {
return (
<Nav.Item key={index + 'a'} itemKey={item.itemKey} text={item.text} onClick={() => { tochange(item) }} />
)
}
})}
<Nav.Sub
itemKey={"user"}
text={
<div
style={{
marginLeft: -8,
display: "inline-block",
color: "white",
}}
>
<Avatar size="extra-small" color="light-blue" style={{ marginRight: 4 }}>
{user?.name?.substr(0, 1)}
</Avatar>
<div style={{
display: "inline-block", position: "relative",
top: 10,
left: 4,
marginRight: 4,
}}
>
</div>
</div>
}
>
<div style={{ width: 200, padding: 16, background: '#c7bebeeb' }}>
<div style={{ display: "flex" }}>
<Avatar size="default" color="light-blue" style={{ marginRight: 4 }}>
{user?.name?.substr(0, 1)}
</Avatar>
<div style={{ fontSize: 12 }}>
{user.name}
<div title={user?.department?.map(v => v.name + '、')} style={{ width: 100, overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>{user?.department?.map(v => v.name + '、')}</div>
</div>
</div>
<div>用户中心</div>
<div>安全认证</div>
</div>
<Nav.Item itemKey={"logout"} text={"退出"} style={{ textAlign: "center" }} />
}}
style={{
height: 48,
minWidth: 520,
background: '#1D2343',
backgroundSize: "100% 100%",
color: "white",
}}
header={{
logo: (
<div style={{display:'flex',alignItems: 'center'}}>
<div>
<img
src="/assets/images/background/logo.png"
style={{ display: "inline-block", width: 24, height: 24 }}
/>
</div>
<div>
<div style={{ fontSize: 18, fontFamily: "YouSheBiaoTiHei", color: '#FFFFFF',letterSpacing: 3 }}>运维管理系统</div>
<div style={{ fontSize: 8, fontFamily: "YouSheBiaoTiHei", color: '#FFFFFF' }}>RUNNING MANAGEMENT SYSTEM</div>
</div>
</div>
// <img
// src="/assets/images/background/logo.png"
// style={{ display: "inline-block", width: 280, height: 40 }}
// />
),
// text: (
// <div style={{ fontFamily: "YouSheBiaoTiHei", color: '#FFFFFF' }}></div>
// ),
}}
footer={
<>
{headerItems.map((item, index) => {
if (item.hasOwnProperty('items')) {
return (
<Nav.Sub
key={index + 'a'}
itemKey={item.itemKey}
text={item.text}
dropdownStyle={{ color: '#F2F3F5' }}
>
{item.hasOwnProperty('items') && item.items.map((ite, idx) => (
<Nav.Item key={idx + 'd'} itemKey={ite.itemKey} text={ite.text} onClick={() => { tochange(ite); }} />
))}
</Nav.Sub>
)
}
else {
return (
<Nav.Item key={index + 'a'} itemKey={item.itemKey} text={item.text} onClick={() => { tochange(item) }} />
)
}
})}
<Nav.Sub
itemKey={"user"}
text={
<div
style={{
marginLeft: -8,
display: "inline-block",
color: "white",
}}
>
<Avatar size="extra-small" color="light-blue" style={{ marginRight: 4 }}>
{user?.name?.substr(0, 1)}
</Avatar>
<div style={{
display: "inline-block", position: "relative",
top: 10,
left: 4,
marginRight: 4,
}}
>
</div>
</div>
}
>
<div style={{ width: 200, padding: 16, background: '#c7bebeeb' }}>
<div style={{ display: "flex" }}>
<Avatar size="default" color="light-blue" style={{ marginRight: 4 }}>
{user?.name?.substr(0, 1)}
</Avatar>
<div style={{ fontSize: 12 }}>
{user.name}
<div title={user?.department?.map(v => v.name + '、')} style={{ width: 100, overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>{user?.department?.map(v => v.name + '、')}</div>
</div>
</div>
<div>用户中心</div>
<div>安全认证</div>
</div>
<Nav.Item itemKey={"logout"} text={"退出"} style={{ textAlign: "center" }} />
{/* collapseButton collapseText */}
{/* collapseButton collapseText */}
</Nav.Sub>
</>
}
/>
</div>
</>
);
</Nav.Sub>
</>
}
/>
</div>
</>
);
};
function mapStateToProps (state) {
const { global, auth, webSocket } = state;
return {
actions: global.actions,
user: auth.user,
socket: webSocket.socket,
};
const { global, auth, webSocket } = state;
return {
actions: global.actions,
user: auth.user,
socket: webSocket.socket,
};
}
export default connect(mapStateToProps)(Header);

3
web/client/src/sections/install/components/adminModal.jsx

@ -7,6 +7,7 @@ import { IconAlertCircle } from '@douyinfe/semi-icons';
function adminModal (props) {
const {
close,
cancel,
visible,
dispatch,
pepList,
@ -60,7 +61,7 @@ function adminModal (props) {
})
}
function handleCancel () {
close();
cancel();
//
}
return (

3
web/client/src/sections/install/components/memberModal.jsx

@ -7,6 +7,7 @@ import { IconAlertCircle } from '@douyinfe/semi-icons';
function memberModal (props) {
const {
close,
cancel,
visible,
dispatch,
pepList,
@ -82,7 +83,7 @@ function memberModal (props) {
})
}
function handleCancel () {
close();
cancel();
//
}
return (

3
web/client/src/sections/install/components/systemModal.jsx

@ -7,6 +7,7 @@ import { IconAlertCircle, IconAlertTriangle } from '@douyinfe/semi-icons';
function adminModal (props) {
const {
close,
cancel,
visible,
dispatch,
actions,
@ -67,7 +68,7 @@ function adminModal (props) {
})
}
function handleCancel () {
close();
cancel();
//
}
const renderMultipleWithCustomTag = (optionNode, { onClose }) => {

6
web/client/src/sections/install/containers/roles.jsx

@ -593,6 +593,9 @@ const Roles = (props) => {
pepList={pepList}
adminEdit={adminEdit}
editObj={editObj}
cancel={() => {
setAdminModal(false);
}}
close={() => {
setAdminModal(false);
getUserList()
@ -609,6 +612,9 @@ const Roles = (props) => {
pomsList={pomsList}
anxinDelete={anxinDelete}
anxincloudArr={anxincloudArr}
cancel={() => {
setMemberModal(false);
}}
close={() => {
setMemberModal(false);
getUserList()

3
web/client/src/sections/install/containers/system.jsx

@ -420,6 +420,9 @@ const Example = (props) => {
anxinDelete={anxinDelete}
appArr={appArr}
bindId={bindId}
cancel={() => {
setSystemModal(false);
}}
close={() => {
setSystemModal(false);
getProjectPomsList()

Loading…
Cancel
Save