diff --git a/src/forge/Component/SiderBar.js b/src/forge/Component/SiderBar.js index f99414a36..c537b7a0d 100644 --- a/src/forge/Component/SiderBar.js +++ b/src/forge/Component/SiderBar.js @@ -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,27 +105,31 @@ function SiderBar(props) { } function loginAi(){ + if(!user.login){ + return props.showLoginDialog(); + } const url = `https://testai.trustie.net/login`; - axios.post(url,{username:"chaosuan",password:"12345678"}).then(res=>{ - if(res && res.data){ - window.open(`https://testai.trustie.net/chat`); - } - }).catch(error=>{ - console.error('loginAi请求失败:', error); - message.error('连接智能助手失败,请稍后重试'); - }) + const regurl = `https://testai.trustie.net/register`; + axios.post(regurl,{username:user.login,password:"12345678"}).then(res=>{ + axios.post(url,{username:user.login,password:"12345678"}).then(res=>{ + if(res && res.data){ + window.open(`https://testai.trustie.net/chat`); + } + }).catch(error=>{}) + }).catch(error=>{}) + } return (
{/* 超算智能助手 */} - {/* { location.pathname === "/zone/NSCC" && + { location.pathname.indexOf("/zone/NSCC")>-1 &&
- } */} + } {/* 平台反馈 */}
diff --git a/src/forge/Information/Component/pointsDoc.jsx b/src/forge/Information/Component/pointsDoc.jsx index 29b4d9edc..6752ad8ab 100644 --- a/src/forge/Information/Component/pointsDoc.jsx +++ b/src/forge/Information/Component/pointsDoc.jsx @@ -1,5 +1,6 @@ import React, { useEffect, useState } from 'react'; import { Modal, Form, Input, Button, Spin, Pagination } from 'antd'; +import { Link } from 'react-router-dom'; import Nodata from '../../Nodata'; @@ -13,7 +14,7 @@ import { getImageUrl } from 'educoder' import '../indexUser.scss'; -function PointsDoc({ visible , onCancel , onSure , type , username , choosed , history , showCompeleteDialog , member }) { +function PointsDoc({ visible , onCancel , onSure , type , username , choosed , history , showCompeleteDialog , member, deptId }) { const limit = 5; const [ page , setPage ] = useState(1); @@ -112,7 +113,7 @@ function PointsDoc({ visible , onCancel , onSure , type , username , choosed , h
{currentRow && (
- {currentRow.docName} + {window.scrollTo(0,450)}}>{currentRow.docName} @@ -120,7 +121,7 @@ function PointsDoc({ visible , onCancel , onSure , type , username , choosed , h )} {list && list.map((item) => (
- {item.name} + {window.scrollTo(0,450)}}>{item.name} diff --git a/src/forge/Information/Component/pointsProject.jsx b/src/forge/Information/Component/pointsProject.jsx index 699378286..41de46001 100644 --- a/src/forge/Information/Component/pointsProject.jsx +++ b/src/forge/Information/Component/pointsProject.jsx @@ -112,7 +112,7 @@ function PointsDoc({ visible , onCancel , onSure , type , username , choosed , h
{currentRow && (
- {currentRow.name} + {currentRow.name} @@ -120,7 +120,7 @@ function PointsDoc({ visible , onCancel , onSure , type , username , choosed , h )} {list && list.map((item) => (
- {item.projectProperties?.name} + {item.projectProperties?.name} diff --git a/src/forge/Information/Pages/zoneUser.jsx b/src/forge/Information/Pages/zoneUser.jsx index 7eba4e7ea..800b99a34 100644 --- a/src/forge/Information/Pages/zoneUser.jsx +++ b/src/forge/Information/Pages/zoneUser.jsx @@ -56,7 +56,7 @@ function ZoneUser(props){ const [ memberAccountInfo, setMemberAccountInfo ] = useState([]); const [msg, setMsg] = useState(''); - const { id, showNotification, checkIfLogin, showLoginDialog, temp, sectionMemberTitle } = props; + const { id, showNotification, checkIfLogin, showLoginDialog, temp, sectionMemberTitle} = props; useEffect(()=>{ let uuid = getUniqueIdentifier() @@ -399,7 +399,7 @@ function ZoneUser(props){ handleAwardSure(msg)} onCancel={()=>setAwardVisible(false)} /> - setDocVisible(false)} onSure={() => { setDocVisible(false); setMsg('首页新闻推荐'); setSuccessVisible(true);getInfo();}} /> - {(!path || (path && !path.includes('glcc') )) && } + {(!path || (path && !path.includes('glcc') )) && }