forked from Gitlink/forgeplus-react
成果库功能初版
This commit is contained in:
parent
72f77fb6b8
commit
c3b0737722
|
@ -181,7 +181,6 @@ class App extends Component {
|
|||
initAxiosInterceptors(this.props);
|
||||
let pathname = window.location.pathname ? window.location.pathname.split('/')[1] : '';
|
||||
pathname && this.getPathnameType(pathname);
|
||||
|
||||
// 添加路由监听,决定组织还是个人
|
||||
this.unlisten = this.props.history.listen((location,history) => {
|
||||
let newPathname = location.pathname.split('/')[1];
|
||||
|
@ -197,7 +196,7 @@ class App extends Component {
|
|||
return true;
|
||||
}
|
||||
// 阻止个人与组织切换时(组件渲染)请求导致的404
|
||||
if (nextProps.location.pathname.split('/')[1] !== this.props.location.pathname.split('/')[1] && nextState.pathType === this.state.pathType) {
|
||||
if (nextProps.location.pathname.split('/')[1] !== this.props.location.pathname.split('/')[1] && nextState.pathType === this.state.pathType &&!keyWord.includes( this.state.pathType)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
|
@ -25,7 +25,7 @@ if (isDev) {
|
|||
}
|
||||
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
||||
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug || ''
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug || 'admin'
|
||||
}
|
||||
window._debugType = debugType;
|
||||
export function initAxiosInterceptors(props) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import fetch from 'military/notice/fetch';
|
||||
import fetch from 'military/achievement/fetch';
|
||||
import showNotification from '../components/ShowNotification';
|
||||
|
||||
|
||||
// 公告列表查询
|
||||
// 成果列表查询
|
||||
export async function getNoticeList(params) {
|
||||
let res = await fetch({
|
||||
url: '/api/announcements/',
|
||||
|
@ -16,7 +16,7 @@ export async function getNoticeList(params) {
|
|||
}
|
||||
}
|
||||
|
||||
//新增公告
|
||||
//新增成果
|
||||
export function addNotice(data) {
|
||||
return fetch({
|
||||
url: '/api/announcements/add',
|
||||
|
@ -25,7 +25,7 @@ export function addNotice(data) {
|
|||
});
|
||||
}
|
||||
|
||||
//删除公告
|
||||
//删除成果
|
||||
export function deleteNotice(id) {
|
||||
return fetch({
|
||||
url: '/api/announcements/' + id,
|
||||
|
@ -33,7 +33,7 @@ export function deleteNotice(id) {
|
|||
});
|
||||
}
|
||||
|
||||
//更新公告
|
||||
//更新成果
|
||||
export function editNotice(data) {
|
||||
return fetch({
|
||||
url: '/api/announcements/update',
|
||||
|
@ -42,7 +42,7 @@ export function editNotice(data) {
|
|||
});
|
||||
}
|
||||
|
||||
//审核公告
|
||||
//审核成果
|
||||
export function checkNotice(data) {
|
||||
return fetch({
|
||||
url: '/api/announcements/check',
|
||||
|
@ -51,7 +51,7 @@ export function checkNotice(data) {
|
|||
});
|
||||
}
|
||||
|
||||
// 公告详情查询
|
||||
// 成果详情查询
|
||||
export async function getNoticeDetail(id) {
|
||||
let res = await fetch({
|
||||
url: '/api/announcements/' + id,
|
||||
|
@ -64,7 +64,7 @@ export async function getNoticeDetail(id) {
|
|||
}
|
||||
}
|
||||
|
||||
// 公告密文查看人详情
|
||||
// 成果密文查看人详情
|
||||
export async function getNoticeReader(params) {
|
||||
let res = await fetch({
|
||||
url: '/api/request_contact_reader_info/',
|
||||
|
|
|
@ -3,22 +3,22 @@ import { Route, Switch } from "react-router-dom";
|
|||
import Loadable from "react-loadable";
|
||||
import Loading from "../../Loading";
|
||||
|
||||
// 公告管理
|
||||
// 成果管理
|
||||
const NoticeList = Loadable({
|
||||
loader: () => import("./noticeList"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 公告管理详情
|
||||
// 成果管理详情
|
||||
const NoticeDetail = Loadable({
|
||||
loader: () => import("./noticeDetail"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 公告管理编辑
|
||||
// 成果管理编辑
|
||||
const NoticeEdit = Loadable({
|
||||
loader: () => import("./noticeEdit"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 公告reader
|
||||
// 成果reader
|
||||
const NoticeReader = Loadable({
|
||||
loader: () => import("./noticeReader"),
|
||||
loading: Loading,
|
||||
|
@ -27,35 +27,35 @@ const NoticeReader = Loadable({
|
|||
export default (propsF)=>{
|
||||
return (
|
||||
<Switch {...propsF}>
|
||||
{/* 公告列表 */}
|
||||
{/* 成果列表 */}
|
||||
<Route
|
||||
path="/managements/achievement/list/:isChecked"
|
||||
render={(props) => (
|
||||
<NoticeList {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
{/* 公告详情 */}
|
||||
{/* 成果详情 */}
|
||||
<Route
|
||||
path="/managements/achievement/detail/:noticeId"
|
||||
render={(props) => (
|
||||
<NoticeDetail {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
{/* 公告编辑 */}
|
||||
{/* 成果编辑 */}
|
||||
<Route
|
||||
path="/managements/achievement/edit/:noticeId"
|
||||
render={(props) => (
|
||||
<NoticeEdit {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
{/* 公告新增 */}
|
||||
{/* 成果新增 */}
|
||||
<Route
|
||||
path="/managements/achievement/edit"
|
||||
render={(props) => (
|
||||
<NoticeEdit {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
{/* 公告预览 */}
|
||||
{/* 成果预览 */}
|
||||
<Route
|
||||
path="/managements/achievement/reader/:noticeId"
|
||||
render={(props) => (
|
||||
|
|
|
@ -50,16 +50,16 @@ const IndexPage = ({ match, history, current_user: { admin } }) => {
|
|||
|
||||
return (
|
||||
<div className="notice-content">
|
||||
<h4 className="notice-title"><span className='backList' onClick={() => { history.go(-1) }}><Icon type="left" />返回</span>公告详情</h4>
|
||||
<h4 className="notice-title"><span className='backList' onClick={() => { history.go(-1) }}><Icon type="left" />返回</span>成果详情</h4>
|
||||
|
||||
<Descriptions className='itemContent' column={1}>
|
||||
<Descriptions.Item label="公告状态"><span className='statusColor'>{noticeData.status == 1 ? noticeCheckedArr[noticeData.isChecked] : '草稿'}</span></Descriptions.Item>
|
||||
<Descriptions.Item label="公告标题">{noticeData.title}</Descriptions.Item>
|
||||
<Descriptions.Item label="公告类型">{noticeTypeArr[noticeData.type]}</Descriptions.Item>
|
||||
<Descriptions.Item label="成果状态"><span className='statusColor'>{noticeData.status == 1 ? noticeCheckedArr[noticeData.isChecked] : '草稿'}</span></Descriptions.Item>
|
||||
<Descriptions.Item label="成果标题">{noticeData.title}</Descriptions.Item>
|
||||
<Descriptions.Item label="成果类型">{noticeTypeArr[noticeData.type]}</Descriptions.Item>
|
||||
<Descriptions.Item label="发布单位">{noticeData.publisher}</Descriptions.Item>
|
||||
<Descriptions.Item label="公告描述" className='alignTop'><div className="editor-w-text" dangerouslySetInnerHTML={{ __html: noticeData.text }}></div></Descriptions.Item>
|
||||
<Descriptions.Item label="成果描述" className='alignTop'><div className="editor-w-text" dangerouslySetInnerHTML={{ __html: noticeData.text }}></div></Descriptions.Item>
|
||||
{[4, 5, 6].includes(noticeData.type) && <Descriptions.Item label="联系方式" className='alignTop'><div className="editor-w-text" dangerouslySetInnerHTML={{ __html: noticeData.contactInfo && noticeData.contactInfo.replace(/\n/g, '</br>') }}></div></Descriptions.Item>}
|
||||
<Descriptions.Item label="公告附件">
|
||||
<Descriptions.Item label="成果附件">
|
||||
<div style={{ color: '#1890ff' }} onClick={() => { download(noticeData.fileDownloadPath) }}>{noticeData.fileName}</div>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="创建时间">{noticeData.createdAt}</Descriptions.Item>
|
||||
|
|
|
@ -6,7 +6,7 @@ import { noticeType } from '../../common/static';
|
|||
import Upload from '../../components/Upload';
|
||||
import ShowNotification from '../../components/ShowNotification';
|
||||
import { getNoticeDetail, addNotice, editNotice } from '../api';
|
||||
import { httpUrl } from 'military/notice/fetch';
|
||||
import { httpUrl } from 'military/achievement/fetch';
|
||||
|
||||
import '../index.css';
|
||||
const format = "YYYY-MM-DD HH:mm:ss";
|
||||
|
@ -67,13 +67,13 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
);
|
||||
|
||||
const editor = useCallback(() => (
|
||||
<Form.Item label={"公告描述:"} required={true}>
|
||||
<Form.Item label={"成果描述:"} required={true}>
|
||||
{(!id || (id && noticeHtml)) &&
|
||||
<ReactWEditor
|
||||
defaultValue={noticeHtml}
|
||||
config={
|
||||
{
|
||||
placeholder: "请输入公告描述",
|
||||
placeholder: "请输入成果描述",
|
||||
excludeMenus: [
|
||||
'list',
|
||||
'todo',
|
||||
|
@ -103,7 +103,7 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
/>}
|
||||
|
||||
{getFieldDecorator('text', {
|
||||
rules: [{ required: true, message: "请输入公告描述" }],
|
||||
rules: [{ required: true, message: "请输入成果描述" }],
|
||||
validateFirst: true
|
||||
})(<Input style={{ display: 'none' }} />)}
|
||||
</Form.Item>
|
||||
|
@ -147,7 +147,7 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
|
||||
templateUrl: '',
|
||||
};
|
||||
params.closingDate = params.closingDate.format(format);
|
||||
params.closingDate = moment('2030/12/31').format(format);//随便加的时间以防过期
|
||||
params.isSecret = Number(params.isSecret);
|
||||
if (fileList && fileList.length) {
|
||||
params.fileName = fileList[0].fileName || fileList[0].response.data.fileName;
|
||||
|
@ -160,9 +160,9 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
if (res.message === 'success') {
|
||||
ShowNotification("操作成功!");
|
||||
if (status == 1) {
|
||||
history.push('/managements/notice/list/2');
|
||||
history.push('/managements/achievement/list/1');
|
||||
} else {
|
||||
history.push('/managements/notice/list/draft');
|
||||
history.push('/managements/achievement/list/draft');
|
||||
}
|
||||
} else {
|
||||
ShowNotification(res.message);
|
||||
|
@ -172,11 +172,11 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
// 新增
|
||||
addNotice(params).then(res => {
|
||||
if (res.message === 'success') {
|
||||
ShowNotification("公告新增成功!");
|
||||
ShowNotification("成果新增成功!");
|
||||
if (status == 1) {
|
||||
history.push('/managements/notice/list/2');
|
||||
history.push('/managements/achievement/list/2');
|
||||
} else {
|
||||
history.push('/managements/notice/list/draft');
|
||||
history.push('/managements/achievement/list/draft');
|
||||
}
|
||||
} else {
|
||||
ShowNotification(res.message);
|
||||
|
@ -206,13 +206,13 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
|
||||
return (
|
||||
<div className="notice-content">
|
||||
<h4 className="notice-title">{id ? '修改' : '发布'}公告</h4>
|
||||
<h4 className="notice-title">{id ? '修改' : '发布'}成果</h4>
|
||||
<Form className="notice-form" {...formItemLayout}>
|
||||
|
||||
{helper(
|
||||
"公告类型:",
|
||||
"成果类型:",
|
||||
"type",
|
||||
[{ required: true, message: "请选择公告类型" }],
|
||||
[{ required: true, message: "请选择成果类型" }],
|
||||
<Radio.Group
|
||||
onChange={(e) => { setTypeValue(e.target.value) }}
|
||||
>
|
||||
|
@ -226,13 +226,13 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
)}
|
||||
|
||||
{helper(
|
||||
"公告标题:",
|
||||
"成果标题:",
|
||||
"title",
|
||||
[{ required: true, message: "请输入公告标题" },
|
||||
[{ required: true, message: "请输入成果标题" },
|
||||
{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<Input
|
||||
className="edit-input"
|
||||
placeholder="请输入公告标题"
|
||||
placeholder="请输入成果标题"
|
||||
/>
|
||||
)}
|
||||
|
||||
|
@ -249,7 +249,7 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
|
||||
{editor()}
|
||||
|
||||
{[4, 5, 6].includes(typeValue) && <Fragment>
|
||||
{/* {[4, 5, 6].includes(typeValue) && <Fragment> */}
|
||||
{helper(
|
||||
"联系方式:",
|
||||
"contactInfo",
|
||||
|
@ -268,7 +268,7 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
validateFirst: true
|
||||
})(<Checkbox checked={isSecret} onChange={e => { setIsSecret(e.target.checked) }}>设置联系方式为加密内容</Checkbox>)}
|
||||
</Form.Item>
|
||||
</Fragment>}
|
||||
{/* </Fragment>} */}
|
||||
|
||||
|
||||
<Form.Item label={"上传文件:"}>
|
||||
|
@ -283,12 +283,12 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
/>
|
||||
{/* 用一个隐藏的input实现上传文件的必填校验 */}
|
||||
{/* {getFieldDecorator('file_name', {
|
||||
rules: [{ required: true, message: "请上传公告文件" }],
|
||||
rules: [{ required: true, message: "请上传成果文件" }],
|
||||
validateFirst: true
|
||||
})(<Input style={{ display: 'none' }} />)} */}
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="截止时间:">
|
||||
{/* <Form.Item label="截止时间:">
|
||||
<Radio.Group onChange={(e) => { changeClosingDate(e.target.value) }}>
|
||||
<Radio value={6}>一周内</Radio>
|
||||
<Radio value={29}>一个月内</Radio>
|
||||
|
@ -305,7 +305,7 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
|||
format={format}
|
||||
placeholder="请选择截止时间"
|
||||
/>)}
|
||||
</Form.Item>
|
||||
</Form.Item> */}
|
||||
|
||||
<Form.Item {...tailFormItemLayout}>
|
||||
<Button className="mr20" type={"primary"} onClick={() => { saveItem(1) }}>发布</Button>
|
||||
|
|
|
@ -85,13 +85,13 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
|
||||
const columns = [
|
||||
{
|
||||
title: '公告标题',
|
||||
title: '成果标题',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
width: '30%'
|
||||
},
|
||||
{
|
||||
title: '公告类型',
|
||||
title: '成果类型',
|
||||
key: 'type',
|
||||
dataIndex: 'type',
|
||||
render: (text, record) => {
|
||||
|
@ -134,14 +134,14 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
key: 'requestViewCount',
|
||||
dataIndex: 'requestViewCount',
|
||||
render: (text, record) => {
|
||||
return <span className={`${text > 0 ? 'link' : ''}`} onClick={() => { text > 0 && history.push(`/managements/notice/reader/${record.id}`) }}>{text}</span>;
|
||||
return <span className={`${text > 0 ? 'link' : ''}`} onClick={() => { text > 0 && history.push(`/managements/achievement/reader/${record.id}`) }}>{text}</span>;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function detailItem(id) {
|
||||
history.push(`/managements/notice/detail/${id}`);
|
||||
history.push(`/managements/achievement/detail/${id}`);
|
||||
}
|
||||
|
||||
// 审核
|
||||
|
@ -161,7 +161,7 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
}
|
||||
|
||||
function editItem(id) {
|
||||
history.push(`/managements/notice/edit/${id}`);
|
||||
history.push(`/managements/achievement/edit/${id}`);
|
||||
}
|
||||
|
||||
function deletItem(id) {
|
||||
|
@ -223,7 +223,7 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
"type",
|
||||
[],
|
||||
<Select
|
||||
placeholder="公告类型"
|
||||
placeholder="成果类型"
|
||||
allowClear
|
||||
showArrow
|
||||
>
|
||||
|
@ -275,7 +275,7 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
</div>
|
||||
|
||||
<Modal
|
||||
title="公告审核"
|
||||
title="成果审核"
|
||||
visible={visible}
|
||||
onOk={checkItem}
|
||||
onCancel={() => { setVisible(false) }}
|
||||
|
|
|
@ -76,12 +76,12 @@ const NoticeReader = ({ match, history }) => {
|
|||
|
||||
return (
|
||||
<div className="notice-content">
|
||||
<h4 className="notice-title"><span className='backList' onClick={() => { history.go(-1) }}><Icon type="left" />返回</span>浏览过该公告加密内容的用户详情</h4>
|
||||
<h4 className="notice-title"><span className='backList' onClick={() => { history.go(-1) }}><Icon type="left" />返回</span>浏览过该成果加密内容的用户详情</h4>
|
||||
|
||||
<Descriptions className='itemContent' column={1}>
|
||||
<Descriptions.Item label="公告标题">{noticeData.title}</Descriptions.Item>
|
||||
<Descriptions.Item label="成果标题">{noticeData.title}</Descriptions.Item>
|
||||
<Descriptions.Item label="加密信息被浏览数">{total}</Descriptions.Item>
|
||||
<Descriptions.Item label="浏览过该公告加密内容的用户信息"></Descriptions.Item>
|
||||
<Descriptions.Item label="浏览过该成果加密内容的用户信息"></Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
<div className="table-detail">
|
||||
|
|
|
@ -6,12 +6,10 @@ export const noticeStatus = [
|
|||
];
|
||||
|
||||
export const noticeType = [
|
||||
{ code: 4, name: "招标" },
|
||||
{ code: 1, name: "更正" },
|
||||
{ code: 2, name: "中标" },
|
||||
{ code: 3, name: "废标" },
|
||||
{ code: 5, name: "技术资产" },
|
||||
{ code: 6, name: "成交" },
|
||||
{ code: 4, name: "开源项目", dicItemName: "招标" },
|
||||
{ code: 1, name: "创客任务", dicItemName: "更正" },
|
||||
{ code: 2, name: "开放竞赛", dicItemName: "中标" },
|
||||
{ code: 3, name: "科研成果", dicItemName: "废标" },
|
||||
];
|
||||
|
||||
export const noticeChecked = [
|
||||
|
|
|
@ -328,7 +328,7 @@ const Managements = (propsF) => {
|
|||
|
||||
{/* 成果库管理 */}
|
||||
<Route
|
||||
path="/managements/notice"
|
||||
path="/managements/achievement"
|
||||
render={(props) => (
|
||||
<Achievement {...propsF} {...props} />
|
||||
)}
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
import React, { Component } from "react";
|
||||
|
||||
import { Route, Switch } from "react-router-dom";
|
||||
import { withRouter } from "react-router";
|
||||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
|
||||
import Loadable from "react-loadable";
|
||||
import Loading from "../Loading";
|
||||
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
|
||||
import './index.scss';
|
||||
|
||||
const NoticeList = Loadable({
|
||||
loader: () => import("./achievement/noticeList"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
const NoticeDetail = Loadable({
|
||||
loader: () => import("./achievement/noticeDetail"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<Switch {...this.props}>
|
||||
|
||||
<Route
|
||||
path="/achievement/noticeDetail/:noticeId"
|
||||
render={(props) => (
|
||||
<NoticeDetail {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
|
||||
<Route
|
||||
path="/achievement"
|
||||
render={(props) => (
|
||||
<NoticeList {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
</Switch>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
export default withRouter(
|
||||
ImageLayerOfCommentHOC({
|
||||
imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
|
||||
parentSelector: ".newMain",
|
||||
})(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index))))
|
||||
);
|
|
@ -2,7 +2,7 @@ import fetch from './fetch';
|
|||
import { notification } from 'antd';
|
||||
|
||||
|
||||
// 公告列表查询
|
||||
// 成果列表查询
|
||||
export async function getNoticeList(params) {
|
||||
let res = await fetch({
|
||||
url: '/api/announcements/',
|
||||
|
@ -20,7 +20,7 @@ export async function getNoticeList(params) {
|
|||
}
|
||||
|
||||
|
||||
// 公告详情查询
|
||||
// 成果详情查询
|
||||
export async function getNoticeDetail(id) {
|
||||
let res = await fetch({
|
||||
url: '/api/announcements/' + id,
|
||||
|
@ -37,7 +37,7 @@ export async function getNoticeDetail(id) {
|
|||
}
|
||||
}
|
||||
|
||||
//新增加密公告申请人
|
||||
//新增加密成果申请人
|
||||
export function addReader(data) {
|
||||
return fetch({
|
||||
url: '/api/request_contact_reader_info/',
|
||||
|
|
|
@ -3,7 +3,8 @@ import javaFetch from '../javaFetch';
|
|||
|
||||
|
||||
let settings =localStorage.chromesetting && JSON.parse(localStorage.chromesetting);
|
||||
let actionUrl = settings && settings.api_urls ? settings.api_urls.notice : 'https://info.osredm.com';
|
||||
// let actionUrl = settings && settings.api_urls ? settings.api_urls.notice : 'https://info.osredm.com';
|
||||
let actionUrl = 'http://111.8.36.180:8089';
|
||||
|
||||
const service = javaFetch(actionUrl);
|
||||
export const httpUrl = actionUrl;
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 149 KiB |
|
@ -65,8 +65,8 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
<div className="centerbox notice-detail">
|
||||
<div className="head-navigation">
|
||||
<Link to="/">首页<span className="greater"> > </span></Link>
|
||||
<Link to="/notice">公告<span className="greater"> > </span></Link>
|
||||
<span>公告详情</span>
|
||||
<Link to="/achievement">成果库<span className="greater"> > </span></Link>
|
||||
<span>详情</span>
|
||||
</div>
|
||||
<div className="center-content">
|
||||
{/* <div className="notice-center-content"> */}
|
||||
|
@ -75,15 +75,15 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
</div>
|
||||
<div className="notice-detail-content">
|
||||
<div className="center-author">
|
||||
<p key={0}>公告类型:{noticeTypeArr[noticeData.type]}</p>
|
||||
<p key={0}>成果类型:{noticeTypeArr[noticeData.type]}</p>
|
||||
{noticeData.publisher && <p key={1}>发布单位:{noticeData.publisher}</p>}
|
||||
<p key={2}>发布时间:{noticeData.publishDate || noticeData.createdAt}</p>
|
||||
<p key={3}>截止时间:{noticeData.closingDate}</p>
|
||||
{/* <p key={3}>截止时间:{noticeData.closingDate}</p> */}
|
||||
<p key={4}>浏览:{noticeData.visits || 0}</p>
|
||||
</div>
|
||||
|
||||
<div className="content-text">
|
||||
<div className="notice-content-title"><Icon type="caret-right" />公告主要内容</div>
|
||||
<div className="notice-content-title"><Icon type="caret-right" />成果主要内容</div>
|
||||
<div className="editor-w-text" dangerouslySetInnerHTML={{ __html: noticeData.text }}>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -103,7 +103,7 @@ export default Form.create()(({ match, history, showNotification, form }) => {
|
|||
{
|
||||
noticeData.fileDownloadPath &&
|
||||
<React.Fragment>
|
||||
<div className="notice-content-title"><Icon type="caret-right" />公告附件</div>
|
||||
<div className="notice-content-title"><Icon type="caret-right" />成果附件</div>
|
||||
<p className="notice-content-download" >
|
||||
<span onClick={() => { window.open(noticeData.fileDownloadPath) }}>
|
||||
<i className="iconfont icon-fujian color-green font-14 mr3"></i>{noticeData.fileName}
|
||||
|
|
|
@ -88,7 +88,7 @@ export default (props) => {
|
|||
}
|
||||
|
||||
function noticeClick(id) {
|
||||
props.history.push(`/notice/noticeDetail/${id}`);
|
||||
props.history.push(`/achievement/noticeDetail/${id}`);
|
||||
}
|
||||
|
||||
function sortNav() {
|
||||
|
@ -150,23 +150,23 @@ export default (props) => {
|
|||
return <React.Fragment><Nodata _html="暂无数据" /></React.Fragment>
|
||||
}else{
|
||||
return <React.Fragment>
|
||||
{cont(callList, "招标公告", '4', "iconfont icon-zhaobiaogonggao")}
|
||||
{cont(changeList, "更正公告", '1', "iconfont icon-gengzhenggonggao")}
|
||||
{cont(checkList, "中标公告", '2', "iconfont icon-zhongbiaogonggao")}
|
||||
{cont(abandonList, "废标公告", '3', "iconfont icon-feibiaogonggao")}
|
||||
{cont(callList, "开源项目", '4', "iconfont icon-zhaobiaogonggao")}
|
||||
{cont(changeList, "创客任务", '1', "iconfont icon-gengzhenggonggao")}
|
||||
{cont(checkList, "开放竞赛", '2', "iconfont icon-zhongbiaogonggao")}
|
||||
{cont(abandonList, "科研成果", '3', "iconfont icon-feibiaogonggao")}
|
||||
</React.Fragment>
|
||||
}
|
||||
} else if (tab === '7') {
|
||||
{/* {technologyList.length <= 0 && dealList.length <= 0 ? <Nodata _html="暂无数据" /> : ""} */}
|
||||
{/* {technologyList.length > 0 && cont(technologyList, "技术资产", '5',"iconfont icon-jishuzichan")} */}
|
||||
if(technologyList.length === 0 && dealList.length === 0){
|
||||
return <React.Fragment><Nodata _html="暂无数据" /></React.Fragment>
|
||||
}else{
|
||||
return <React.Fragment>
|
||||
{cont(technologyList, "技术资产", '5', "iconfont icon-jishuzichan")}
|
||||
{cont(dealList, "成交公告", '6', "iconfont icon-chengjiaogonggao")}
|
||||
</React.Fragment>
|
||||
}
|
||||
// } else if (tab === '7') {
|
||||
// {/* {technologyList.length <= 0 && dealList.length <= 0 ? <Nodata _html="暂无数据" /> : ""} */}
|
||||
// {/* {technologyList.length > 0 && cont(technologyList, "技术资产", '5',"iconfont icon-jishuzichan")} */}
|
||||
// if(technologyList.length === 0 && dealList.length === 0){
|
||||
// return <React.Fragment><Nodata _html="暂无数据" /></React.Fragment>
|
||||
// }else{
|
||||
// return <React.Fragment>
|
||||
// {cont(technologyList, "技术资产", '5', "iconfont icon-jishuzichan")}
|
||||
// {cont(dealList, "成交成果", '6', "iconfont icon-chengjiaogonggao")}
|
||||
// </React.Fragment>
|
||||
// }
|
||||
} else if (tab === '8') {
|
||||
return <div></div>
|
||||
} else {
|
||||
|
@ -174,28 +174,28 @@ export default (props) => {
|
|||
let svgStr;
|
||||
switch (tab) {
|
||||
case '1':
|
||||
titleStr = "更正公告";
|
||||
titleStr = "创客任务";
|
||||
svgStr = "iconfont icon-gengzhenggonggao"
|
||||
break;
|
||||
case '2':
|
||||
titleStr = "中标公告";
|
||||
titleStr = "开放竞赛";
|
||||
svgStr = "iconfont icon-zhongbiaogonggao"
|
||||
break;
|
||||
case '3':
|
||||
titleStr = "废标公告";
|
||||
titleStr = "科研成果";
|
||||
svgStr = "iconfont icon-feibiaogonggao"
|
||||
break;
|
||||
case '4':
|
||||
titleStr = "招标公告";
|
||||
titleStr = "开源项目";
|
||||
svgStr = "iconfont icon-zhaobiaogonggao"
|
||||
break;
|
||||
case '5':
|
||||
titleStr = "技术资产";
|
||||
svgStr = "iconfont icon-jishuzichan"
|
||||
break;
|
||||
default:
|
||||
titleStr = "成交公告";
|
||||
svgStr = "iconfont icon-chengjiaogonggao"
|
||||
// case '5':
|
||||
// titleStr = "技术资产";
|
||||
// svgStr = "iconfont icon-jishuzichan"
|
||||
// break;
|
||||
// default:
|
||||
// titleStr = "成交成果";
|
||||
// svgStr = "iconfont icon-chengjiaogonggao"
|
||||
}
|
||||
return <React.Fragment>
|
||||
<div className="item-head-title">
|
||||
|
@ -236,24 +236,24 @@ export default (props) => {
|
|||
<div className="centerbox notice-list clearfix">
|
||||
{/* <div className="head-navigation">
|
||||
<Link to="/">首页<span className="greater"> > </span></Link>
|
||||
<span>公告</span>
|
||||
<span>成果</span>
|
||||
</div> */}
|
||||
<div className="body">
|
||||
<Affix className="affix-list-left" offsetTop={90}>
|
||||
{/* <div className="affix-list-content"> */}
|
||||
<div className="navigationMenu">
|
||||
<ul className="menu-ul">
|
||||
<li className="MenuTitle" onClick={()=>click('0')}><span><i className="iconfont icon-xiangmugonggao"></i>项目公告</span></li>
|
||||
<li className={tab === '4' ? "active" : ""} onClick={()=>click('4')}><span>招标公告</span></li>
|
||||
<li className={tab === '1' ? "active" : ""} onClick={()=>click('1')}><span>更正公告</span></li>
|
||||
<li className={tab === '2' ? "active" : ""} onClick={()=>click('2')}><span>中标公告</span></li>
|
||||
<li className={tab === '3' ? "active" : ""} onClick={()=>click('3')}><span>废标公告</span></li>
|
||||
<li className="MenuTitle" onClick={()=>click('0')}><span><i className="iconfont icon-xiangmugonggao"></i>成果类型</span></li>
|
||||
<li className={tab === '4' ? "active" : ""} onClick={()=>click('4')}><span>开源项目</span></li>
|
||||
<li className={tab === '1' ? "active" : ""} onClick={()=>click('1')}><span>创客任务</span></li>
|
||||
<li className={tab === '2' ? "active" : ""} onClick={()=>click('2')}><span>开放竞赛</span></li>
|
||||
<li className={tab === '3' ? "active" : ""} onClick={()=>click('3')}><span>科研成果</span></li>
|
||||
</ul>
|
||||
<ul className="menu-ul">
|
||||
{/* <ul className="menu-ul">
|
||||
<li className="MenuTitle" onClick={()=>click('7')}><span><i className="iconfont icon-chengguo"></i>成果转化</span></li>
|
||||
<li className={tab === '5' ? "active" : ""} onClick={()=>click('5')}><span>技术资产</span></li>
|
||||
<li className={tab === '6' ? "active" : ""} onClick={()=>click('6')}><span>成交公告</span></li>
|
||||
</ul>
|
||||
<li className={tab === '6' ? "active" : ""} onClick={()=>click('6')}><span>成交成果</span></li>
|
||||
</ul> */}
|
||||
</div>
|
||||
</Affix>
|
||||
<div className="notice-center-content">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 公告开始
|
||||
// 成果开始
|
||||
export const noticeStatus = [
|
||||
{ code: 0, name: "关闭", dicItemName: '关闭' },
|
||||
{ code: 1, name: "正常", dicItemName: '正常' },
|
||||
|
@ -6,12 +6,12 @@ export const noticeStatus = [
|
|||
];
|
||||
|
||||
export const noticeType = [
|
||||
{ code: 1, name: "更正公告", dicItemName: "更正" },
|
||||
{ code: 2, name: "中标公告", dicItemName: "中标" },
|
||||
{ code: 3, name: "废标公告", dicItemName: "废标" },
|
||||
{ code: 4, name: "招标公告", dicItemName: "招标" },
|
||||
{ code: 5, name: "技术资产", dicItemName: "技术" },
|
||||
{ code: 6, name: "成交公告", dicItemName: "成交" },
|
||||
{ code: 1, name: "创客任务", dicItemName: "更正" },
|
||||
{ code: 2, name: "开放竞赛", dicItemName: "中标" },
|
||||
{ code: 3, name: "科研成果", dicItemName: "废标" },
|
||||
{ code: 4, name: "开源项目", dicItemName: "招标" },
|
||||
// { code: 5, name: "技术资产", dicItemName: "技术" },
|
||||
// { code: 6, name: "成交成果", dicItemName: "成交" },
|
||||
];
|
||||
|
||||
export const noticeChecked = [
|
||||
|
@ -19,4 +19,4 @@ export const noticeChecked = [
|
|||
{ code: 1, name: "通过", dicItemName: "通过" },
|
||||
{ code: 2, name: "未处理", dicItemName: "未处理" },
|
||||
];
|
||||
//公告结束
|
||||
//成果结束
|
|
@ -593,6 +593,9 @@ class NewHeader extends Component {
|
|||
// 创客
|
||||
} else if (url.indexOf('/task') > -1 && match.path.indexOf('/task') > -1) {
|
||||
return true
|
||||
// 成果库
|
||||
} else if (url.indexOf('/achievement') > -1 && match.path.indexOf('/achievement') > -1) {
|
||||
return true
|
||||
// 管理
|
||||
} else if ((url.indexOf('/managements') > -1 && (match.path.indexOf('/managements') > -1 || match.path.indexOf('/administration') > -1 || match.path.indexOf('/admin') > -1))) {
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue