Commit 0c678984 authored by jiangzijing's avatar jiangzijing

feat:查看日志修改

parent 74c3271e
...@@ -20,38 +20,72 @@ ...@@ -20,38 +20,72 @@
} }
.logViewTop { .logViewTop {
/* height: 30px; */ position: relative;
width: 100vw; width: 100vw;
background-color: #1d2126; background-color: #1d2126;
/* border-radius: 8px 8px 0 0; */
display: flex; display: flex;
font-size: 12px; font-size: 12px;
color: #8a9099; color: #8a9099;
/* overflow: overlay; */ overflow: hidden;
} }
.logViewTop::-webkit-scrollbar-track { .leftButton {
background-color: #282c34; width: 48px;
height: 32px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-right: 1px solid #10141A;
background-color: #1d2126;
}
.rightButton {
width: 48px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-left: 1px solid #10141A;
background-color: #1d2126;
}
.middleFixed {
width: calc(100vw - 98px);
position: relative;
overflow: hidden;
}
.middleDynamic{
display: flex;
position: absolute;
left: 0;
} }
.logTitle { .logTitle {
display: flex; display: flex;
/* width: 0; */
/* max-width: 200px; */
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
/* flex: 1; */ flex-shrink: 0;
align-items: center; align-items: center;
height: 32px; height: 32px;
line-height: 20px; line-height: 20px;
padding: 0 32px; padding: 0 20px;
cursor: pointer; cursor: pointer;
border-right: 1px solid #10141A; border-right: 1px solid #10141A;
} }
.logName {
max-width: 90px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.logTitleSelected { .logTitleSelected {
flex-shrink: 0;
background: #282c34; background: #282c34;
color: #ffffff; color: #ffffff;
} }
......
...@@ -8,17 +8,17 @@ import CloudEController from "@/api/fileserver/CloudEController"; ...@@ -8,17 +8,17 @@ import CloudEController from "@/api/fileserver/CloudEController";
import { useStores } from "@/store"; import { useStores } from "@/store";
import { toJS } from "mobx"; import { toJS } from "mobx";
import FullScreenDrawer from "@/components/CommonComponents/FullScreenDrawer"; import FullScreenDrawer from "@/components/CommonComponents/FullScreenDrawer";
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
type LogViewProps = { type LogViewProps = {
isshow: boolean;
handleClose: () => void;
logs: any[]; logs: any[];
setShowAddTemplate: any; setShowLogView: any;
}; };
const LogView = (props: LogViewProps) => { const LogView = (props: LogViewProps) => {
const { isshow, handleClose, logs, setShowAddTemplate } = props; const { logs, setShowLogView } = props;
const { currentProjectStore } = useStores(); const { currentProjectStore } = useStores();
const fileToken = toJS(currentProjectStore.currentProjectInfo.filetoken); const fileToken = toJS(currentProjectStore.currentProjectInfo.filetoken);
const projectId = toJS(currentProjectStore.currentProjectInfo.id); const projectId = toJS(currentProjectStore.currentProjectInfo.id);
...@@ -65,10 +65,13 @@ const LogView = (props: LogViewProps) => { ...@@ -65,10 +65,13 @@ const LogView = (props: LogViewProps) => {
} }
return ( return (
<FullScreenDrawer handleClose={setShowAddTemplate} zIndex={1002}> <FullScreenDrawer handleClose={setShowLogView} zIndex={1002}>
<div className={style.logViewBox}> <div className={style.logViewBox}>
<div className={style.logViewContentMask}></div> <div className={style.logViewContentMask}></div>
<div className={style.logViewTop}> <div className={style.logViewTop}>
<div className={style.leftButton}><ChevronLeftIcon /></div>
<div className={style.middleFixed}>
<div className={style.middleDynamic}>
{logs.map((item: any, index: number) => { {logs.map((item: any, index: number) => {
return <div return <div
key={index} key={index}
...@@ -78,10 +81,13 @@ const LogView = (props: LogViewProps) => { ...@@ -78,10 +81,13 @@ const LogView = (props: LogViewProps) => {
[style.logTitleSelected]: index === logCurrent, [style.logTitleSelected]: index === logCurrent,
})}> })}>
<InsertDriveFileOutlinedIcon className={style.fileIcon} /> <InsertDriveFileOutlinedIcon className={style.fileIcon} />
<span>{item.logName}</span> <span className={style.logName}>{item.logName}</span>
</div> </div>
})} })}
</div> </div>
</div>
<div className={style.rightButton}><ChevronRightIcon /></div>
</div>
<div className={style.logViewContent}> <div className={style.logViewContent}>
{logText} {logText}
</div> </div>
......
...@@ -780,10 +780,8 @@ const ProjectSubmitWork = observer(() => { ...@@ -780,10 +780,8 @@ const ProjectSubmitWork = observer(() => {
)} )}
{showLogView && ( {showLogView && (
<LogView <LogView
isshow={showLogView}
handleClose={handleClose}
logs={logs} logs={logs}
setShowAddTemplate={handleClose} setShowLogView={handleClose}
/> />
)} )}
</div> </div>
......
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