智能助手点击登录+超算所有页面都显示

This commit is contained in:
caishi 2026-06-16 14:04:42 +08:00
parent c9c9bac022
commit 5dfef69aeb
2 changed files with 6 additions and 2 deletions

View File

@ -29,6 +29,7 @@ function SiderBar(props) {
const [ feedBackModal, setFeedBackModal] = useState(false);
const [ feedBackValue, setFeedBackValue] = useState(undefined);
const [ failApply, setFailApply] = useState(undefined);
console.log(props);
useEffect(()=>{
user && setLogin(user.login);
@ -104,6 +105,9 @@ function SiderBar(props) {
}
function loginAi(){
if(!user.login){
return props.showLoginDialog();
}
const url = `https://testai.trustie.net/login`;
const regurl = `https://testai.trustie.net/register`;
axios.post(regurl,{username:user.login,password:"12345678"}).then(res=>{
@ -119,7 +123,7 @@ function SiderBar(props) {
return (
<div className={"-task-sidebar"} >
{/* 超算智能助手 */}
{ location.pathname === "/zone/NSCC" && user && user.login &&
{ location.pathname.indexOf("/zone/NSCC")>-1 &&
<Tooltip title="智能助手" placement={"left"} overlayClassName="tooltipBox">
<div className="consult" onClick={loginAi} style={{cursor: 'pointer'}}>
<i className="iconfont icon-zhinengzhushou font-34" ></i>

View File

@ -299,7 +299,7 @@ export function TPMIndexHOC(WrappedComponent) {
let notFullPage = !path.includes('softwareFactory')
return (
<div className="indexHOC">
{(!path || (path && !path.includes('glcc') )) && <SiderBar {...this.props} {...this.state}/>}
{(!path || (path && !path.includes('glcc') )) && <SiderBar {...this.props} {...this.state} {...common}/>}
<SystemNotice
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}
history={this.props.history}