Merge branch 'gitlink_ssr_head' of https://gitlink.org.cn/Gitlink/forgeplus-react into gitlink_ssr_head
This commit is contained in:
commit
f3aa8af63e
|
|
@ -110,7 +110,7 @@ function AddProjects({id,visible,typeList,needAudit,role,onCancel,onFresh}){
|
||||||
}
|
}
|
||||||
const res = response.data;
|
const res = response.data;
|
||||||
if(res && res.code === 200){
|
if(res && res.code === 200){
|
||||||
message.success((needAudit === 1 && role && role.role !== "Manager") ? "操作成功,请等待管理员审核" : "操作成功!");
|
message.success((needAudit === 1 && role !== "Manager") ? "操作成功,请等待管理员审核" : "操作成功!");
|
||||||
Init(page,searchValue);
|
Init(page,searchValue);
|
||||||
onFresh();
|
onFresh();
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -130,11 +130,11 @@ function NewsIndex(props) {
|
||||||
mainList && mainList.length > 0 &&
|
mainList && mainList.length > 0 &&
|
||||||
<ul className='customMenus width1600'>
|
<ul className='customMenus width1600'>
|
||||||
<li className={!cateId ? "active" : ""}>
|
<li className={!cateId ? "active" : ""}>
|
||||||
<Link to={`/zone/${deptId}/news`}><img src={require(`../../img/1${!cateId ? "w" : "b"}.png`)} width={17} />全部新闻</Link>
|
<Link to={`/zone/${deptId}/news`} onClick={()=>{setPageNum(1)}}><img src={require(`../../img/1${!cateId ? "w" : "b"}.png`)} width={17} />全部新闻</Link>
|
||||||
</li>
|
</li>
|
||||||
{mainList.map((i, k) => {
|
{mainList.map((i, k) => {
|
||||||
return <li className={cateId && cateId === String(i.id) ? "active" : ""}>
|
return <li className={cateId && cateId === String(i.id) ? "active" : ""}>
|
||||||
<Link to={`/zone/${deptId}/news/${i.id}`}>
|
<Link to={`/zone/${deptId}/news/${i.id}`} onClick={()=>{setPageNum(1); setViewMode("default")}}>
|
||||||
<img src={cateId && cateId === String(i.id) ? require(`../../img/${(k % 7) + 2}w.png`) : require(`../../img/${(k % 7) + 2}b.png`)} width={17} />
|
<img src={cateId && cateId === String(i.id) ? require(`../../img/${(k % 7) + 2}w.png`) : require(`../../img/${(k % 7) + 2}b.png`)} width={17} />
|
||||||
{i.name}
|
{i.name}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { Fragment, useEffect, useRef, useState } from 'react';
|
import React, { Fragment, useEffect, useRef, useState } from 'react';
|
||||||
import { Spin, Pagination, Divider, message, Input } from 'antd';
|
import { Spin, Pagination, Divider, message, Input } from 'antd';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { getProjectsLists } from '../../../api';
|
import { getProjectsLists, getGlobal } from '../../../api';
|
||||||
import { projectCateConfig } from '../projectCateConfig';
|
import { projectCateConfig } from '../projectCateConfig';
|
||||||
import nodata from '../../../img/nodata.png';
|
import nodata from '../../../img/nodata.png';
|
||||||
import { getUniqueIdentifier, getUserName, getBrowserPlatform, getBrowserBrand } from '../../../utils';
|
import { getUniqueIdentifier, getUserName, getBrowserPlatform, getBrowserBrand } from '../../../utils';
|
||||||
|
|
@ -118,6 +118,32 @@ function ProjectCateDetail(props) {
|
||||||
}, [visibleSections.coreArea, visibleSections.projectList]);
|
}, [visibleSections.coreArea, visibleSections.projectList]);
|
||||||
|
|
||||||
function getLists() {
|
function getLists() {
|
||||||
|
if(searchName){
|
||||||
|
getGlobal({
|
||||||
|
extraSearchParam: {
|
||||||
|
projectTypeId: cateId
|
||||||
|
},
|
||||||
|
keyword: searchName || "",
|
||||||
|
pageNum: page,
|
||||||
|
pageSize: pageSize,
|
||||||
|
types: ["zone_project"],
|
||||||
|
zoneId: id
|
||||||
|
}).then(result => {
|
||||||
|
if (result && result.data) {
|
||||||
|
setLists(result.data.rows.map(item=>{
|
||||||
|
return{
|
||||||
|
...item,
|
||||||
|
projectProperties: item.extendData
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
setTotal(result.data.total);
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
getProjectsLists(id, {
|
getProjectsLists(id, {
|
||||||
pageNum: page,
|
pageNum: page,
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
|
|
@ -132,6 +158,7 @@ function ProjectCateDetail(props) {
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -243,7 +270,7 @@ function ProjectCateDetail(props) {
|
||||||
{lists.map((item, key) => (
|
{lists.map((item, key) => (
|
||||||
<div key={key} className='project-list-item'>
|
<div key={key} className='project-list-item'>
|
||||||
<div className='df-center mb40'>
|
<div className='df-center mb40'>
|
||||||
{item.projectProperties && item.projectProperties.authorImageUrl && <img src={item.projectProperties.authorImageUrl} width={40} className='mr15'/>}
|
{item.projectProperties && item.projectProperties.authorImageUrl && <img src={item.projectProperties.authorImageUrl} width={40} className='mr15' style={{borderRadius: '6px'}}/>}
|
||||||
<div className='font-18 font-bd project-list-item-title mrat'>
|
<div className='font-18 font-bd project-list-item-title mrat'>
|
||||||
{item.projectProperties && item.projectProperties.fromOwner}/{item.projectProperties && item.projectProperties.name && item.projectProperties.name.split("/").pop()}
|
{item.projectProperties && item.projectProperties.fromOwner}/{item.projectProperties && item.projectProperties.name && item.projectProperties.name.split("/").pop()}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -263,7 +290,7 @@ function ProjectCateDetail(props) {
|
||||||
)}
|
)}
|
||||||
<div className='df-center-between font-13 opacity8'>
|
<div className='df-center-between font-13 opacity8'>
|
||||||
<div>
|
<div>
|
||||||
{item.projectType && <span>{item.projectType}</span>}
|
<span>{item.projectType || name}</span>
|
||||||
{item.projectProperties && item.projectProperties.language && <Fragment>
|
{item.projectProperties && item.projectProperties.language && <Fragment>
|
||||||
<Divider type="vertical" style={{ height: '0.7em' }} />
|
<Divider type="vertical" style={{ height: '0.7em' }} />
|
||||||
<span>{item.projectProperties.language}</span>
|
<span>{item.projectProperties.language}</span>
|
||||||
|
|
@ -271,7 +298,7 @@ function ProjectCateDetail(props) {
|
||||||
</div>
|
</div>
|
||||||
{item.projectProperties && item.projectProperties.timeAgo && <span>更新于{item.projectProperties.timeAgo}</span>}
|
{item.projectProperties && item.projectProperties.timeAgo && <span>更新于{item.projectProperties.timeAgo}</span>}
|
||||||
</div>
|
</div>
|
||||||
<a className='font-15 project-list-item-btn' href={item.projectURL}>查看详情<i className='iconfont icon-zuojiantou1 ml5 font-12'></i></a>
|
<a className='font-15 project-list-item-btn' href={`/${item.projectProperties.fullName}`}>查看详情<i className='iconfont icon-zuojiantou1 ml5 font-12'></i></a>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ function ProjectSource(props){
|
||||||
const [ value , setValue ] = useState(undefined);
|
const [ value , setValue ] = useState(undefined);
|
||||||
const [ loading , setLoading ] = useState(false);
|
const [ loading , setLoading ] = useState(false);
|
||||||
const [ memberStatus , setMemberStatus] = useState(memberStatusEnum.notMember);
|
const [ memberStatus , setMemberStatus] = useState(memberStatusEnum.notMember);
|
||||||
const { id, temp, sectionProjectTitle , role } = props;
|
const { id, temp, sectionProjectTitle , role, data } = props;
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
let uuid = getUniqueIdentifier()
|
let uuid = getUniqueIdentifier()
|
||||||
|
|
@ -104,7 +104,7 @@ function ProjectSource(props){
|
||||||
}
|
}
|
||||||
return(
|
return(
|
||||||
<div className="in_pro">
|
<div className="in_pro">
|
||||||
<AddProjects id={id} visible={visible} typeList={typeList} onCancel={()=>setVisible(false)} role={role && role.role} onFresh={getLists}/>
|
<AddProjects needAudit={data && data.projectNeedAudit} id={id} visible={visible} typeList={typeList} onCancel={()=>setVisible(false)} role={role && role.role} onFresh={getLists}/>
|
||||||
<div className="boxmain" style={{paddingTop:"56px"}}>
|
<div className="boxmain" style={{paddingTop:"56px"}}>
|
||||||
<div className='titleButBox'>
|
<div className='titleButBox'>
|
||||||
<p className="in_title">{sectionProjectTitle}</p>
|
<p className="in_title">{sectionProjectTitle}</p>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React , { useState , useEffect } from 'react';
|
import React , { useState , useEffect } from 'react';
|
||||||
import { Tag , Pagination } from 'antd';
|
import { Tag , Pagination } from 'antd';
|
||||||
|
|
||||||
import { getMemberAccountDetail, getPointsAccountEvent } from '../api';
|
import { getMemberAccountDetail, getPointsTransaction } from '../api';
|
||||||
|
|
||||||
import '../indexUser.scss';
|
import '../indexUser.scss';
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@ const transactionTypeMap = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function getPointsShow(item) {
|
function getPointsShow(item) {
|
||||||
const config = transactionTypeMap[item.status];
|
const config = transactionTypeMap[item.transactionType];
|
||||||
if (!config) {
|
if (!config) {
|
||||||
return { className: '', pointsTxt: item.score, statusClass: '', status: '' };
|
return { className: '', pointsTxt: item.score, statusClass: '', status: '' };
|
||||||
}
|
}
|
||||||
|
|
@ -45,7 +45,7 @@ function scoreDetail(props){
|
||||||
},[id, page])
|
},[id, page])
|
||||||
|
|
||||||
function getDetail() {
|
function getDetail() {
|
||||||
getPointsAccountEvent(id, { pageNum: page, pageSize: limit }).then(res => {
|
getPointsTransaction(id, { pageNum: page, pageSize: limit }).then(res => {
|
||||||
if (res && res.data && res.data.code === 200) {
|
if (res && res.data && res.data.code === 200) {
|
||||||
const processedRows = (res.data.rows || []).map(item => ({
|
const processedRows = (res.data.rows || []).map(item => ({
|
||||||
...item,
|
...item,
|
||||||
|
|
|
||||||
|
|
@ -380,10 +380,10 @@ function ZoneUser(props){
|
||||||
onCancel={()=>setDocVisible(false)} onSure={() => { setDocVisible(false); setSuccessVisible(true);getInfo();}}
|
onCancel={()=>setDocVisible(false)} onSure={() => { setDocVisible(false); setSuccessVisible(true);getInfo();}}
|
||||||
/>
|
/>
|
||||||
<ApplyAcitvity visible={acitvityVisible} member={memberInfo} zoneName={zoneInfo?.name}
|
<ApplyAcitvity visible={acitvityVisible} member={memberInfo} zoneName={zoneInfo?.name}
|
||||||
onCancel={()=>setAcitvityVisible(false)} onSure={() => { showNotification(msg); setAcitvityVisible(false); getInfo();}}
|
onCancel={()=>setAcitvityVisible(false)} onSure={(msg) => { showNotification(msg); setAcitvityVisible(false); getInfo();}}
|
||||||
/>
|
/>
|
||||||
<ApplyQA visible={qaVisible} member={memberInfo} zoneName={zoneInfo?.name}
|
<ApplyQA visible={qaVisible} member={memberInfo} zoneName={zoneInfo?.name}
|
||||||
onCancel={()=>setQaVisible(false)} onSure={() => { showNotification(msg); setQaVisible(false); getInfo();}}
|
onCancel={()=>setQaVisible(false)} onSure={(msg) => { showNotification(msg); setQaVisible(false); getInfo();}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,13 @@ export function getPointsAccountEvent(id){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getPointsTransaction(id){
|
||||||
|
return fetch({
|
||||||
|
url:`/zone/points/transaction/currentUser/${id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function getMemberAccountDetail(id, params){
|
export function getMemberAccountDetail(id, params){
|
||||||
return fetch({
|
return fetch({
|
||||||
url:`/zone/points/transaction/my/${id}`,
|
url:`/zone/points/transaction/my/${id}`,
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ function Index(props){
|
||||||
<Route
|
<Route
|
||||||
path="/zone/:deptId/projects"
|
path="/zone/:deptId/projects"
|
||||||
render={(p) => (
|
render={(p) => (
|
||||||
<ProjectSource {...props} {...p} id={id} temp={ temp } role={role} sectionProjectTitle={data && data.sectionProjectTitle}/>
|
<ProjectSource {...props} {...p} id={id} temp={ temp } role={role} sectionProjectTitle={data && data.sectionProjectTitle} data={data}/>
|
||||||
)}
|
)}
|
||||||
></Route>
|
></Route>
|
||||||
<Route
|
<Route
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue