diff --git a/src/forge/Information/Pages/headerPagebyCCF.jsx b/src/forge/Information/Pages/headerPagebyCCF.jsx
index ddc3f0bc4..919320e57 100644
--- a/src/forge/Information/Pages/headerPagebyCCF.jsx
+++ b/src/forge/Information/Pages/headerPagebyCCF.jsx
@@ -16,20 +16,6 @@ import Slider from 'react-slick';
import Left from '../../../home/Img/left.png';
import Right from '../../../home/Img/right.png';
-const setting = {
- dots: true,
- infinite: true,
- speed: 2000,
- slidesToShow: 1,
- slidesToScroll: 1,
- pauseOnDotsHover: true,
- autoplaySpeed: 5000,
- pauseOnFocus: true,
- autoplay: true,
- arrows: true,
- prevArrow:

,
- nextArrow:

-}
function HeaderPageCCF(props) {
const [projectList, setProjectList] = useState(undefined);
@@ -39,6 +25,22 @@ function HeaderPageCCF(props) {
const { deptId, cateId } = props.match.params;
const { data, id, temp } = props;
const [mainList, setMainList] = useState(undefined);
+ const [tag,setTag] = useState(0);
+ const setting = {
+ dots: true,
+ infinite: true,
+ speed: 2000,
+ slidesToShow: 1,
+ slidesToScroll: 1,
+ pauseOnDotsHover: true,
+ autoplaySpeed: 5000,
+ pauseOnFocus: true,
+ autoplay: true,
+ arrows: true,
+ prevArrow:

,
+ nextArrow:

,
+ afterChange: (index)=> setTag(index)
+ }
useEffect(() => {
if (id||cateId) {
@@ -140,7 +142,7 @@ function HeaderPageCCF(props) {
newsList.map((i, k) => {
return (
- {i.name}
+ {i.name}
@@ -165,7 +167,7 @@ function HeaderPageCCF(props) {
{i.name}
- {window.location.href=`/zone/${deptId}/news/${i.id}`}}>
+
{
i.cmsDocList && i.cmsDocList.length > 0 ?
i.cmsDocList.map((j, k) => {
@@ -243,23 +245,29 @@ function HeaderPageCCF(props) {
// 核心贡献者
data && data.memberShow === 1 && personList && personList.length > 0 &&
-
{data.homepageMemberTitle}
-
- {/* {
-
}
diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx
index 9fe9137f0..d4a306f5c 100644
--- a/src/forge/Information/Pages/main.jsx
+++ b/src/forge/Information/Pages/main.jsx
@@ -122,14 +122,14 @@ function Main(props){
{tempConfig[temp].mainTitle}
- {role && role.role !== "None" &&
+ {/* {role && role.role !== "None" &&
{role.role === "Member" && }
{role.role === "Member" ?
: }
-
}
+
} */}
{
mainList && mainList.length>0 &&
diff --git a/src/forge/Information/Pages/newsCreate.jsx b/src/forge/Information/Pages/newsCreate.jsx
index 84483c794..b4e283848 100644
--- a/src/forge/Information/Pages/newsCreate.jsx
+++ b/src/forge/Information/Pages/newsCreate.jsx
@@ -90,22 +90,26 @@ function NewsCreate(props){
const {data:{code, msg}} = res;
setLoading(false);
if(code === 200){
- message.success("更新成功");
- history.push(`/zone/${deptId}/news/self`);
+ message.success("提交成功");
+ history.push(`/zone/${deptId}/newdetail/${newsId}`);
}else{
- message.error(msg || '更新失败,请联系管理员!')
+ message.error(msg || '提交失败,请联系管理员!')
}
+ }).catch(e=>{
+ setLoading(false);
})
}
addNewsByDirId(fieldsValue.dirId, params).then(res=>{
- const {data:{code, msg}} = res;
+ const {data:{code, msg, data}} = res;
setLoading(false);
if(code === 200){
- message.success("新增成功");
- history.push(`/zone/${deptId}/news/self`);
+ message.success("提交成功");
+ history.push(`/zone/${deptId}/newdetail/${data}`);
}else{
- message.error(msg || '新增失败,请联系管理员!')
+ message.error(msg || '提交失败,请联系管理员!')
}
+ }).catch(e=>{
+ setLoading(false);
})
})
}
@@ -153,7 +157,7 @@ function NewsCreate(props){
type === "richEditor" ?
{setFieldsValue({"content": value})}}/> : {setFieldsValue({"content": value})}}
imageExpand={false}
diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx
index 025f16591..e625080bc 100644
--- a/src/forge/Information/Pages/newsDetail.jsx
+++ b/src/forge/Information/Pages/newsDetail.jsx
@@ -1,5 +1,5 @@
import React,{ useState , useEffect } from 'react';
-import { Breadcrumb , Divider, Spin } from 'antd';
+import { Badge, Breadcrumb , Divider, Spin } from 'antd';
import liulan from '../img/liulan.png';
import RenderHtml from '../../../components/render-html';
import { Base64 } from 'js-base64';
@@ -107,7 +107,9 @@ function NewsDetail(props){
{ cmsDir &&
{ detail.publishUserNickname } }
{ cmsDir && - { detail.isFirstPublish ? '创建于' : '更新于' }{detail.publishTime}
}
- { detail.visits &&
{detail.visits} }
+ { !!detail.visits &&
{detail.visits} }
+ { detail.auditStatus === '2' && }
+ { detail.auditStatus === '0' && }
{ !IsPC() && }
diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx
index dbce4ccdf..9f87a96d1 100644
--- a/src/forge/Information/Pages/selfList.jsx
+++ b/src/forge/Information/Pages/selfList.jsx
@@ -4,6 +4,8 @@ import { Link } from 'react-router-dom';
import { getNewsMyList , getSourceMyList , delNewsMyList , delSourceMyList } from '../api';
import moment from 'moment';
import nodata from '../img/nodata.png';
+import { tempEnum } from '../tempInfo';
+import emptydata from '../../Images/nodata.png';
import '../index.scss';
@@ -19,22 +21,35 @@ function SelfList(props){
const [ deleId , setDeleId] = useState(undefined);
const pathname = props.location.pathname;
const { deptId} = props.match.params;
- const { id , temp } = props;
+ const { id , temp , data } = props;
const limit = 15;
useEffect(()=>{
if(id){
setIsSpin(true);
- if(source===true){
- getSource();
- }
- if(source===false){
- getNew();
- }
+ getFunc(source);
}
- },[status, page , id,source])
+ },[id,source,page])
+ useEffect(()=>{
+ if(page===1){
+ setIsSpin(true);
+ getFunc(source);
+ }else{
+ setPage(1);
+ }
+ },[status])
+
+ function getFunc(s){
+ if(s===true){
+ getSource();
+ }
+ if(s===false){
+ getNew();
+ }
+ }
+
useEffect(()=>{
if(pathname){
if(pathname.indexOf("/source/self")>-1){
@@ -85,8 +100,7 @@ function SelfList(props){
delNewsMyList(deleId).then(response=>{
setVisible(false);
if(status ===1){
- props.history.push(`/zone/${deptId}/newdetail/${deleId}`);
- props.showNotification("已提交删除申请,待管理员审核通过后改文章将被删除");
+ props.showNotification("提交成功!");
}else{
props.showNotification("删除成功!");
getNew();
@@ -109,16 +123,16 @@ function SelfList(props){
确定删除该{source?"资源":"文章"}?
- {(source || (!source && status === 1)) &&
{source?"删除后所有资源文件将被清除,请谨慎操作":"此操作将提交删除申请,管理员同意申请后该文章将被删除"}
}
+ {(source || (!source && status === 1 && (data && data.docNeedAudit===1))) &&
{source?"删除后所有资源文件将被清除,请谨慎操作":"此操作将提交删除申请,管理员同意申请后该文章将被删除"}
}
@@ -132,7 +146,7 @@ function SelfList(props){
{
list && list.length === 0 &&
-

+
暂无数据~
}
diff --git a/src/forge/Information/Pages/source.jsx b/src/forge/Information/Pages/source.jsx
index eed911c1d..74341f61e 100644
--- a/src/forge/Information/Pages/source.jsx
+++ b/src/forge/Information/Pages/source.jsx
@@ -91,12 +91,12 @@ function Source(props){
allowClear
enterButton={temp === "zone" ? 搜索 :undefined}
/>
- {role && role.role !== "None" &&
+ {/* {role && role.role !== "None" &&
{role.role === "Member" && }
-
}
+
} */}
diff --git a/src/forge/Information/Pages/sourceCreate.jsx b/src/forge/Information/Pages/sourceCreate.jsx
index 526df0e12..14c630333 100644
--- a/src/forge/Information/Pages/sourceCreate.jsx
+++ b/src/forge/Information/Pages/sourceCreate.jsx
@@ -68,7 +68,7 @@ function SourceCreate(props){
}).catch(error=>{})
}
- // 新建文章
+ // 新建/编辑资源
function submit(e){
e.preventDefault();
validateFields((err, fieldsValue)=>{
@@ -89,21 +89,21 @@ function SourceCreate(props){
updateMyResource(params).then((res)=>{
const {data:{code, msg}} = res;
if(code === 200){
- message.success("编辑成功");
- history.push(`/zone/${deptId}/source/self`);
+ message.success("提交成功");
+ history.push(`/zone/${deptId}/source/${sourceid}`);
}else{
- message.error(msg || '编辑失败,请联系管理员!')
+ message.error(msg || '提交失败,请联系管理员!')
}
})
return;
}
addResource(params).then((res)=>{
- const {data:{code, msg}} = res;
+ const {data:{code, msg, data}} = res;
if(code === 200){
- message.success("新增成功");
- history.push(`/zone/${deptId}/source/self`);
+ message.success("提交成功");
+ history.push(`/zone/${deptId}/source/${data.id}`);
}else{
- message.error(msg || '新增失败,请联系管理员!')
+ message.error(msg || '提交失败,请联系管理员!')
}
})
})
@@ -203,8 +203,8 @@ function SourceCreate(props){
{getFieldDecorator("fileList", {
rules:[{ required:true,message:"请上传资源附件!" }]
})(
-
-
{detail.summary}
{
diff --git a/src/forge/Information/api.js b/src/forge/Information/api.js
index 2496268cc..1dcdea4d7 100644
--- a/src/forge/Information/api.js
+++ b/src/forge/Information/api.js
@@ -172,6 +172,8 @@ export function delSourceMyList(id){
export function postCreateZone(data) {
return fetch({
url: `/zone/application`,
+ method: 'post',
+ data: data
})
}
diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js
index ddb0df2b7..c9057bca0 100644
--- a/src/forge/Information/fetch.js
+++ b/src/forge/Information/fetch.js
@@ -7,7 +7,7 @@ function beforeFetch(actionUrl){
}
const service = axios.create({
- headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"},
+ headers:{Authorization:"fb55fcaae60bb0c341078dade4b37c965e285394"},
baseURL: actionUrl,
timeout: 1800000, // 请求超时时间
});
diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx
index e8b70855e..e82f0c35f 100644
--- a/src/forge/Information/index.jsx
+++ b/src/forge/Information/index.jsx
@@ -159,7 +159,7 @@ function Index(props){
(
-
+
)}
>
(
-
+
)}
>
{state && build_state ? {window.open(url)}}>{item.site_name} : {item.site_name}}
- {state ? build_state ? "已部署" : "未部署" : '被关闭'}
+ {state ? build_state!== null ? build_state ? "已部署" : "部署失败" : "未部署" : '被关闭'}
主题: {item.theme}
|
diff --git a/src/forge/Team/Component/UploadImage.jsx b/src/forge/Team/Component/UploadImage.jsx
index eb1d4a68e..8db17f100 100644
--- a/src/forge/Team/Component/UploadImage.jsx
+++ b/src/forge/Team/Component/UploadImage.jsx
@@ -30,11 +30,11 @@ function UploadImage({ getImage , url, getImageId, maxSize = 2, action = getUplo
if (!isLt2M) {
message.error(`上传的图片不能超过${maxSize}MB!`);
}
+ isJpgOrPng && isLt2M && setLoading(true);
return isJpgOrPng && isLt2M;
}
// 上传完成后
function handleChange(info){
- setLoading(true);
if(info && info.file && info.file.status === "done"){
setLoading(false);
getImageId && getImageId(info.file.response.id);