超算会员改版+issue修改

This commit is contained in:
caishi 2026-05-08 09:32:11 +08:00
parent faec3b4ba5
commit 7225b59d08
17 changed files with 316 additions and 45 deletions

View File

@ -4,11 +4,11 @@ import './index.scss';
export const FlowBorderButton = ({
className = '',
children,
href = '/',
href ,
onClick,
...restProps
}) => {
return <a className={`flowBorderButton ${className}`} onClick={onClick}>
return <a className={`flowBorderButton ${className}`} href={href} onClick={onClick}>
<div class="flowBorder"></div>
{children}
</a>
@ -17,7 +17,7 @@ export const FlowBorderButton = ({
const GlowButton = ({
className = '',
children,
href = '/',
href,
onClick,
...restProps
}) => {

View File

@ -85,7 +85,7 @@ function AddProjects({id,visible,typeList,needAudit,role,onCancel,onFresh}){
zoneId:id
}
return item.isChoose ?
<Button size='small' disabled={true}>已添加</Button>
<Button size='small' disabled={true}>{item.isAudited ? "已添加":"审核中"}</Button>
:
<Button size='small' type="primary" onClick={()=>addProjectsFunc(item.id,id)}>+ 添加</Button>
}
@ -110,7 +110,7 @@ function AddProjects({id,visible,typeList,needAudit,role,onCancel,onFresh}){
}
const res = response.data;
if(res && res.code === 200){
message.success(needAudit === 1 ? "操作成功,请等待管理员审核" : "操作成功!");
message.success((needAudit === 1 && role && role.role !== "Manager") ? "操作成功,请等待管理员审核" : "操作成功!");
Init(page,searchValue);
onFresh();
}else{

View File

@ -8,7 +8,7 @@ import { Input } from 'antd';
const { Search } = Input;
function Member(props) {
const { vipLists, temp , deptId } = props;
const { vipLists, temp , deptId , headIcon , hoverIcon } = props;
const isUOS = deptId === "uos";//id===91:
const [ list , setList ] = useState(vipLists);
@ -37,7 +37,7 @@ function Member(props) {
return(
<div className="vip_list_card">
<div className="card_title">
<img src={Crown} alt="" width="37px" style={{marginBottom:5,marginRight:5}}/>
{ headIcon || <img src={Crown} alt="" width="37px" style={{marginBottom:5,marginRight:5}}/>}
<div>
<div>
{i.typeName}
@ -65,13 +65,17 @@ function Member(props) {
i.zoneMemberList.map((j,key)=>{
return(
<li className="card_u_li">
<div className="card_u_wrap">
<Link to={`/${j.login}`} className="card_u_wrap">
{ !(isUOS && i.id === 91) && <Link to={`/${j.login}`} ><img src={j.imageUrl} alt="" /></Link> }
<div className="card_u_info">
<div className="card_u_up"><span className="card_name task-hide">{j.name}</span>{j.memberLevel && <span className="card_tag">{j.memberLevel}</span> }</div>
<div className="card_u_up">
<span className="card_name task-hide">{j.name}</span>
{hoverIcon}
{j.memberLevel && <span className="card_tag">{j.memberLevel}</span> }
</div>
<p className="card_u_down task-hide-2">{j.introduction}</p>
</div>
</div>
</Link>
</li>
)
})

View File

@ -20,6 +20,7 @@ function PublicBanner(props) {
const [memberStatus, setMemberStatus] = useState(memberStatusEnum.notMember);
const [applyVisible, setApplyVisible] = useState(false);
const [ searchShow ,setSearchShow ] = useState(false);
const [ searchValue ,setSearchValue ] = useState(null);
const searchRef = useRef();
const showMenu = useMemo(() => {
@ -141,9 +142,11 @@ function PublicBanner(props) {
<Search
style={{width:"323px",height:"42px"}}
ref={searchRef}
value={searchValue}
onChange={(e)=>setSearchValue(e.target.value)}
onPressEnter={(e)=>{props.history.push(`/zone/${deptId}/search?s=${e.target.value}`)}}
prefix={<i className="iconfont icon-sousuo5 font-15" style={{color:"rgba(90, 253, 184, 1)"}}/>}
suffix={<i className='iconfont icon-shanchuicon2 font-12 color-white' onClick={(e)=>{e.stopPropagation();setSearchShow(false)}}/>}
suffix={<i className='iconfont icon-shanchuicon2 font-12 color-white' onClick={(e)=>{e.stopPropagation();setSearchShow(false);setSearchValue(null)}}/>}
/>
</div>
</div>}

View File

@ -0,0 +1,139 @@
.customvipBox{
font-family: 'alibaba PuHuiTi';
background-image: url(../../img/custom/bc.png);
background-size: 100%;
.project-cate-title {
font-family: "DouyinSans";
font-weight: 700;
font-size: 36px;
text-align: center;
padding:80px 0 20px;
}
.statistics-cards{
width: 80%;
margin: 25px auto;
text-align: center;
border: 2px solid #ffffff;
border-radius: 15px;
background: rgba(255, 255, 255, 0.2352941176);
backdrop-filter: blur(10px);
padding: 30px 0;
color:#091221;
font-size:15px;
}
.applyCards{
text-align: center;
margin-bottom: 45px;
a.glow-button{
width: 162px;
}
.tips{
color:#091221;
}
}
.vip_list{
margin-top: 15px;
padding-bottom: 80px;
.vip_list_card{
margin-top: 30px;
background-color: #fff;
border-radius: 14px 14px 0px 0px;
.card_title{
border-radius: 14px 14px 0px 0px;
background-image: url(../../img/custom/cardHeadbc.png);
background-size: 100% 100%;
padding:35px 30px;
font-family:Alibaba PuHuiTi;
color:#091221;
font-size:24px;
display: flex;
align-items: center;
height: 93px;
}
.card_desc{
background:rgba(9, 18, 33, 0.04);
border-radius:4px;
margin:20px 30px;
padding:20px 24px;
font-size: 15px;
color:#091221;
}
.card_ul{
padding-bottom: 30px;
.card_u_li{
padding:25px 40px 0px;
cursor: pointer;
&:hover{
background:linear-gradient(271.98deg,rgba(10, 145, 255, 0.08) 0.05%,rgba(43, 103, 238, 0.08) 55.23%,rgba(133, 110, 250, 0.08) 99.86%);
.card_tag{
opacity: 0;
transition: .3s;
}
.card_u_wrap{
.card_u_up{
.hovericon{
color: #05101a!important;
width: 15px;
top: 2px;
left: 0px;
opacity: 1;
transition: top 0.5s ease, left 0.5s ease, opacity 0.3s ease 0.1s,width .3s ease .1s;
}
}
}
}
.card_u_wrap{
display: flex;
>a>img{
width: 100px;
height: 100px;
border-radius: 50%;
margin-right: 22px;
margin-bottom: 15px;
}
.card_u_info{
border-bottom: 1px dashed rgba(76, 88, 118, .5);
flex: 1;
}
.card_u_up{
display: flex;
align-items: center;
.hovericon{
opacity: 0;
transition: top 0.5s ease, left 0.5s ease;
pointer-events: none;
position: relative;
top: 18px;
left: -18px;
width: 0px;
}
.card_name{
color:#091221;
font-size:18px;
}
.card_tag{
background-image: url(../../img/custom/schoolbc.png);
background-size: 100% 100%;
padding:0px 10px;
color:#ffffff;
font-size:12px;
text-align:center;
font-family: "DouyinSans";
height: 21px;
line-height: 20px;
display: block;
margin-top: 2px;
margin-left: 10px;
}
}
.card_u_down{
margin-top: 20px;
color:rgba(9, 18, 33,.8);
font-size:15px;
}
}
}
}
}
}
}

View File

@ -0,0 +1,128 @@
import React , {useEffect , useState } from 'react';
import "./index.less";
import "../../index.scss";
import Nodata from '../../../Nodata';
import { Spin, Button, Icon } from 'antd';
import { tempConfig, tempEnum } from '../../tempInfo'
import MemberApply from '../../Component/memberApply';
import { getVIPLists, getAuditStatus, applyJoin } from '../../api';
import nodata from '../../img/nodata.png';
import MemberList from '../../Component/memberList';
import {getUniqueIdentifier,getUserName,getBrowserPlatform,getBrowserBrand} from '../../utils';
import {setZoneVisits} from '../../api';
import GlowButton, { FlowBorderButton } from '../../../../components/button';
import HeadIcon from '../../img/custom/headIcon.png';
export const memberStatusEnum = {
applying: '0',
isMember: '1',
notMember: '2'
}
function CustomVip(props){
const { deptId } = props.match.params;
const [ vipLists , setVIPLists ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true);
const [ applyVisible , setApplyVisible ] = useState(false);
const [ memberStatus , setMemberStatus] = useState(memberStatusEnum.notMember);
const { id, showNotification, checkIfLogin, showLoginDialog, temp, sectionMemberTitle } = props;
const isNSCC = deptId === "NSCC";
useEffect(()=>{
let uuid = getUniqueIdentifier()
let url = props.location.pathname
let platform = getBrowserPlatform()
let browser = getBrowserBrand()
let username = getUserName(props.current_user)
// if(!username) uuid = getUniqueIdentifier()
let remark = ` 操作系统:${platform};浏览器:${browser};`
setZoneVisits({url,username,uuid,remark})
},[])
useEffect(()=>{
if(id){
setIsSpin(true);
getLists();
getMemberStatus();
}
},[id])
function getLists(){
getVIPLists(id).then(response=>{
if(response){
setVIPLists(response.data.rows);
setIsSpin(false);
}
}).catch(error=>{setIsSpin(false);})
}
function getMemberStatus() {
getAuditStatus(id).then(res => {
if (res && res.data && res.data.code === 200) {
setMemberStatus(res.data.data)
} else {
setMemberStatus(memberStatusEnum.notMember)
}
}).catch(() => { setMemberStatus(memberStatusEnum.notMember) })
}
function onOk(e) {
applyJoin(id, e).then(res => {
if (res && res.data) {
showNotification(res.data.msg)
setApplyVisible(!applyVisible)
if (res.data.code === 200) {
setMemberStatus(memberStatusEnum.applying)
}
}
})
}
function apply() {
if(checkIfLogin()===false){
showLoginDialog()
return false;
}
setApplyVisible(!applyVisible)
}
const nsccTitle = (title, delay=0.1, classname)=> <div className={`project-cate-title fadeInChar ${classname}`}>
{title && title.split("").map((char, index) => (
<span key={index} className="title-char" style={{ animationDelay: `${delay + index * 0.1}s` }}>
{char}
</span>
))}
</div>
return(
<div className='customvipBox'>
<MemberApply visible={applyVisible} onOk={ onOk } onCancel={() => setApplyVisible(!applyVisible)} current_user={props.current_user}/>
<div className={`width1600`}>
{ nsccTitle(sectionMemberTitle) }
<div className="statistics-cards">{tempConfig[temp].vipDesc}</div>
<div className='applyCards'>
{ memberStatus === memberStatusEnum.notMember && <GlowButton onClick={ apply } className="NSCC_project_btn blue_image font-15">申请加入<i className='iconfont icon-arrowRight font-16 ml5'></i></GlowButton>}
{ memberStatus === memberStatusEnum.applying && <div className="tips font-15"><Icon type="check-circle" theme="filled" className="mr5"/>您的申请已提交请耐心等待管理员审核!</div> }
</div>
<Spin spinning={isSpin}>
<div className={`width1600`} style={{minHeight:400}}>
{
vipLists && (vipLists.length > 0 ?
<MemberList
hoverIcon={<i className='iconfont icon-jiantou21 font-15 ml10 hovericon' />}
headIcon={<img src={HeadIcon} width={28} className='mr8'/>}
vipLists={vipLists}
temp={temp}
deptId={deptId}
/>
: <div style={{marginTop:30,padding:"20px"}}>
{ temp === tempEnum.zone1 ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" /> }
</div>)
}
</div>
</Spin>
</div>
</div>
)
}
export default CustomVip;

View File

@ -139,9 +139,9 @@ function Main(props){
<p className="in_title">{sectionCmsTitle}</p>
{role && role.role !== "None" &&
<div className='createButs mt10'>
<Button type="primary" ghost className='mr20'>
<Link to={`/zone/${deptId}/news/self`}>{role.role === "Member" ? "我的资讯" : "管理资讯"}</Link>
</Button>
{role.role === "Member" ? <Button type="primary" ghost className='mr20'>
<Link to={`/zone/${deptId}/news/self`}> 我的资讯</Link>
</Button>:""}
<Dropdown overlay={menu}><Button icon='plus' type="primary" ghost>新建</Button></Dropdown>
</div>
}

View File

@ -196,7 +196,7 @@ function ProjectCateList(props) {
))}
</div>
{role && role.role !== "None" && <div className='center pt20 needFadeUp'>
<GlowButton href={`/zone/NSCC/projects/self`} className="NSCC_project_btn blue_image font-15 mr50">{role.role === "Member" ? "我的项目" : "管理项目" }<i className='iconfont icon-arrowRight font-16 ml5'></i></GlowButton>
{role.role === "Member" ? <GlowButton href={`/zone/NSCC/projects/self`} className="NSCC_project_btn blue_image font-15 mr50">我的项目<i className='iconfont icon-arrowRight font-16 ml5'></i></GlowButton>:""}
<FlowBorderButton className='NSCC_project_btn font-15' onClick={(e)=>{
setVisible(true);
e.stopPropagation();
@ -227,7 +227,11 @@ function ProjectCateList(props) {
<div className="footer-section">
<div className="footer-content project-cate-1600">
<div className="footer-title">共同构建超算开源生态</div>
<a href="#" className="submit-project-btn">提交项目<i className='iconfont icon-arrowRight font-16 ml5'/></a>
{role && role.role !== "None" && <FlowBorderButton className='NSCC_project_btn font-15' onClick={(e)=>{
setVisible(true);
e.stopPropagation();
}}>添加项目<i className='iconfont icon-arrowRight font-16 ml5'></i></FlowBorderButton>
}
</div>
</div>
</div>

View File

@ -1,5 +1,7 @@
.project_cate_home {
background-color: #F6F8FE;
// 公共样式
.NSCC_project_btn {
border-radius: 8px;
@ -17,7 +19,6 @@
}
}
}
.hover_img_big {
padding: 25px;
background-image: url('../../../img/project/cate_page_img2.png');
@ -962,28 +963,10 @@
font-size: 32px;
font-weight: bold;
color: #ffffff;
margin-bottom: 40px;
}
.submit-project-btn {
display: inline-flex;
justify-content: center;
width: 160px;
height: 44px;
line-height: 44px;
text-align: center;
background-color: #ffffff;
color:#091221;
border-radius: 8px;
font-size: 15px;
text-decoration: none;
transition: all 0.3s ease;
&:hover {
.iconfont {
animation: arrow-move 1.2s ease-in-out infinite;
}
}
a{
margin-top: 40px;
}
}
}

View File

@ -195,11 +195,11 @@ function SelfList(props){
<Breadcrumb.Item><Link className="primaryColor" to={pathname.replace("/self","")}>{ source==="source"?sectionResourceTitle:source==="news"?sectionCmsTitle:sectionProjectTitle }</Link></Breadcrumb.Item>
<Breadcrumb.Item>我的{source==="source"?"资源":source==="news"?"资讯":"项目"}</Breadcrumb.Item>
</Breadcrumb>
<ul className={`selfMenu ${!needAudit ?"onlyFirst" :""}`}>
{ needAudit && <ul className={`selfMenu ${!needAudit ?"onlyFirst" :""}`}>
<li onClick={()=>setStatus(1)} className={status===1?"active":""}>已发布</li>
{ needAudit && <li onClick={()=>setStatus(0)} className={status===0?"active":""}>待审核</li> }
{ needAudit && <li onClick={()=>setStatus(2)} className={status===2?"active":""}>未通过</li>}
</ul>
<li onClick={()=>setStatus(0)} className={status===0?"active":""}>待审核</li>
<li onClick={()=>setStatus(2)} className={status===2?"active":""}>未通过</li>
</ul>}
<Spin spinning={isSpin}>
<div style={{backgroundColor:"#fff",borderRadius:"4px"}}>
<ul className="selfListPanel">

View File

@ -120,9 +120,9 @@ function Source(props){
enterButton={temp === "zone" ? <span><i className="iconfont icon-sousuo5 font-15"/>搜索</span> :undefined}
/>}
{role && role.role !== "None" && <div className='createButs ml20'>
<Button size='large' type="primary" ghost className='mr20'>
<Link to={`/zone/${deptId}/source/self`}>{role.role === "Member" ? '我的' : '管理'}资源</Link>
</Button>
{role.role === "Member" ? <Button size='large' type="primary" ghost className='mr20'>
<Link to={`/zone/${deptId}/source/self`}>我的资源</Link>
</Button>:""}
<Button size='large' icon={'plus'} type="primary" href={`/zone/${deptId}/source/add`} ghost>新建</Button>
</div>}
</div>

View File

@ -15,7 +15,7 @@ function beforeFetch(actionUrl){
service.interceptors.request.use(request => {
let deptId = sessionStorage.getItem('deptId');
// request.headers.Authorization = 'baf748d0570754d3126d1a3fc29b9c456becf93f'
// request.headers.Authorization = '880cad95bdb367e24d48f04a6cc2c4a362ee285c'
if (deptId) {
// 用于权限区分
request.headers['Dept-Id'] = deptId

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -20,6 +20,10 @@ import { setSeoMeta } from 'educoder';
import { configShareForCustom } from 'educoder';
const CustomVip = Loadable({
loader: () => import("./Pages/custom/vip"),
loading: Loading,
});
const SourceDetail = Loadable({
loader: () => import("./Pages/sourceDetail"),
loading: Loading,
@ -290,6 +294,12 @@ function Index(props){
<Source {...props} {...p} id={id} temp={ temp } role={role} sectionResourceTitle={data && data.sectionResourceTitle}/>
)}
></Route>
<Route
path="/zone/NSCC/VIP"
render={(p) => (
<CustomVip {...props} {...p} id={id} temp={ temp } sectionMemberTitle={data && data.sectionMemberTitle}/>
)}
></Route>
<Route
path="/zone/:deptId/VIP"
render={(p) => (