Merge branch 'gitlink_ssr_head' into pre_gitlink_ssr

This commit is contained in:
caishi 2026-06-16 14:06:37 +08:00
commit 16f9915566
5 changed files with 24 additions and 18 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,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 (
<div className={"-task-sidebar"} >
{/* 超算智能助手 */}
{/* { location.pathname === "/zone/NSCC" &&
{ 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>
</div>
</Tooltip>
} */}
}
{/* 平台反馈 */}
<Tooltip title="意见反馈" placement={"left"} overlayClassName="tooltipBox">
<div className="consult" onClick={feedBackClick} style={{cursor: 'pointer'}}>

View File

@ -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
</div>
{currentRow && (
<div className="line dataline">
<span className="content">{currentRow.docName}</span>
<span className="content"><Link target="_blank" to={`/zone/${deptId}/newdetail/${currentRow.docId}`} onClick={()=>{window.scrollTo(0,450)}}>{currentRow.docName}</Link></span>
<span className="action">
<Button type="primary" shape="round" disabled style={{backgroundColor:'rgba(70, 106, 255, 0.43)', borderColor:'rgba(70, 106, 255, 0.43)', color:'#fff'}}>已置顶</Button>
</span>
@ -120,7 +121,7 @@ function PointsDoc({ visible , onCancel , onSure , type , username , choosed , h
)}
{list && list.map((item) => (
<div className="line dataline" key={item.id}>
<span className="content">{item.name}</span>
<span className="content"><Link target="_blank" to={`/zone/${deptId}/newdetail/${item.id}`} onClick={()=>{window.scrollTo(0,450)}}>{item.name}</Link></span>
<span className="action">
<Button type="primary" shape="round" disabled={!!currentRow} onClick={() => handlePin(item)}>置顶</Button>
</span>

View File

@ -112,7 +112,7 @@ function PointsDoc({ visible , onCancel , onSure , type , username , choosed , h
</div>
{currentRow && (
<div className="line dataline">
<span className="content">{currentRow.name}</span>
<span className="content"><a href={currentRow.projectURL} target="_blank" rel="noopener noreferrer">{currentRow.name}</a></span>
<span className="action">
<Button type="primary" shape="round" disabled style={{backgroundColor:'rgba(70, 106, 255, 0.43)', borderColor:'rgba(70, 106, 255, 0.43)', color:'#fff'}}>已置顶</Button>
</span>
@ -120,7 +120,7 @@ function PointsDoc({ visible , onCancel , onSure , type , username , choosed , h
)}
{list && list.map((item) => (
<div className="line dataline" key={item.id}>
<span className="content">{item.projectProperties?.name}</span>
<span className="content"><a href={item.projectURL} target="_blank" rel="noopener noreferrer">{item.projectProperties?.name}</a></span>
<span className="action">
<Button type="primary" shape="round" disabled={!!currentRow} onClick={() => handlePin(item)}>置顶</Button>
</span>

View File

@ -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){
<UserAward visible={awardVisible} member={memberInfo} id={id} onSure={(msg) => handleAwardSure(msg)}
onCancel={()=>setAwardVisible(false)}
/>
<PointsDoc visible={docVisible} member={memberInfo}
<PointsDoc visible={docVisible} member={memberInfo} deptId={deptId}
onCancel={()=>setDocVisible(false)} onSure={() => { setDocVisible(false); setMsg('首页新闻推荐'); setSuccessVisible(true);getInfo();}}
/>
<PointsProject visible={projectVisible} member={memberInfo}

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}