+
+ 首页 >
+ 成果库 >
+ 成果详情
+
+
+ {/*
*/}
+
+ {noticeData.title}
+
+
+
+
成果来源:{noticeData.achievementSource}
+
成果类型:{noticeData.achievementCategory}
+ {noticeData.publisher &&
发布单位:{noticeData.publisher}
}
+
发布时间:{noticeData.publishDate || noticeData.createdAt}
+ {/*
截止时间:{noticeData.closingDate}
*/}
+
浏览:{noticeData.visits || 0}
+
+
+
+
+
+
+
+
联系人
+
{noticeData.achievementIntro}
+
+
+
+ {
+ noticeData.contactInfo ?
+ 联系方式
+ ') }}>
+
+ {
+ noticeData.blockedView &&
+ }
+ : ''
+ }
+
+
+ {
+ noticeData.fileDownloadPath &&
+
+ 成果附件
+
+ { window.open(noticeData.fileDownloadPath) }}>
+ {noticeData.fileName}
+
+ { window.open(noticeData.fileDownloadPath) }}>下载
+
+
+ }
+
+
+
+
+
+
{ setVisible(false) }}
+ className="form-edit-modal"
+ >
+
+ {
+ helper('用户姓名',
+ 'readerName',
+ [{ required: true, message: "请输入用户姓名" }, { max: 50, message: '不能超过50字符' }],
+
+ )
+ }
+
+ {
+ helper('公司名称',
+ 'companyName',
+ [{ required: true, message: "请输入公司名称" }, { max: 100, message: '不能超过100字符' }],
+
+ )
+ }
+
+ {
+ helper('联系方式',
+ 'contactInfo',
+ [{ required: true, message: "请输入联系方式" },
+ { max: 100, message: '不能超过100字符' },
+ { validator: (rule,val,callback) =>{
+ const pattern = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/;
+ if(pattern.test(val)){
+ callback();
+ }else {
+ callback('请输入正确的手机号码!');
+ }
+ }}],
+
+ )
+ }
+
+
+
+
+ )
+}
+)
diff --git a/src/military/achievement/noticeDetail/index.scss b/src/military/achievement/noticeDetail/index.scss
new file mode 100644
index 00000000..c43c4558
--- /dev/null
+++ b/src/military/achievement/noticeDetail/index.scss
@@ -0,0 +1,102 @@
+.centerbox {
+ position: relative;
+}
+.notice-detail {
+ margin-top: 3.5rem;
+ .head-navigation {
+ top: -2.5rem;
+ }
+ .center-content {
+ overflow: auto;
+ border: 0;
+ }
+}
+
+.notice-detail-content {
+ padding: 2rem 2.5rem 3rem;
+
+ .anticon-caret-right {
+ color: #1890ff;
+ font-size: 1rem;
+ }
+}
+
+.notice-title {
+ margin: 3rem auto 0;
+ text-align: center;
+ font-size: 1.375rem;
+ font-weight: bold;
+ line-height: 1.375rem;
+ color: #000000;
+}
+
+// 内容详情
+.item-content {
+ padding: 10px 10px 0 30px;
+}
+.content-notice {
+ padding: 20px;
+}
+
+.center-author {
+ display: flex;
+ flex-flow:row wrap-reverse;
+ justify-content: space-around;
+ align-items: center;
+ padding: .5rem;
+ background: #f9f9f9;
+ color: #333;
+ p {
+ padding: 0 .5rem;
+ }
+}
+
+.content-text {
+ margin: 1.25rem 0;
+ min-height: 30vh;
+}
+
+.content-secret{
+ min-height: 2em;
+}
+
+.notice-content-title {
+ margin: 0.5rem 0;
+ font-size: 1rem;
+ font-weight: bold;
+}
+
+.notice-content-download {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 2rem !important;
+ padding: 0 1rem;
+ background: #f9f9f9;
+ span:hover{
+ cursor: pointer;
+ color: #1890ff;
+ }
+}
+
+.form-edit-modal {
+ .ant-form-item{
+ display: flex;
+ }
+ .ant-form-item-label{
+ min-width: 5rem;
+ }
+ .ant-form-item-control-wrapper{
+ width: 75%;
+ display: inline-block;
+ }
+ .ant-input-number{
+ width: 50%;
+ }
+
+ .ant-modal-footer{
+ border-top: 0;
+ text-align: center;
+ }
+}
+
diff --git a/src/military/achievement/noticeList/index.jsx b/src/military/achievement/noticeList/index.jsx
new file mode 100644
index 00000000..c3d30fad
--- /dev/null
+++ b/src/military/achievement/noticeList/index.jsx
@@ -0,0 +1,224 @@
+import React, { useEffect, useState } from 'react';
+import classNames from 'classnames';
+import { Pagination, Icon, Input, Affix, } from 'antd';
+import ItemList from '../components/itemList';
+import { achieveSource } from '../static';
+import Nodata from '../../../forge/Nodata';
+import Loading from "../../../Loading";
+import noticePng from '../image/banner.png';
+import { getNoticeList } from '../api';
+
+import './index.scss';
+const Search = Input.Search;
+
+export default (props) => {
+
+ const [tab, setTab] = useState('0');
+ const [loading, setLoading] = useState(false);
+
+ const [title, setTitle] = useState(undefined);
+ const [orderBy, setOrderBy] = useState('publishDateDesc');
+
+ const [curPage, setCurPage] = useState(1);
+ const [total, setTotal] = useState(0);
+ const [noticeList, setNoticeList] = useState([]);
+
+ const [callList, setCallList] = useState([]);
+ const [changeList, setChangeList] = useState([]);
+ const [checkList, setCheckList] = useState([]);
+ const [abandonList, setAbandonList] = useState([]);
+ const [technologyList, setTechnologyList] = useState([]);
+ const [dealList, setDealList] = useState([]);
+
+ useEffect(() => {
+ setLoading(true);
+ if (tab === '0' || tab === '7') {
+ const params = {
+ orderBy,
+ curPage: 1,
+ isChecked: 1,
+ pageSize: 5,
+ status: 1,
+ type: 7,
+ title,
+ flag: 1, //后台管理查询:2;前台展示:1
+ };
+ getNoticeList({ ...params,achievementSource:'开源项目' }).then(data => {
+ setCallList(data.rows);
+ setLoading(false);
+ });
+ getNoticeList({...params,achievementSource:'创客任务'}).then(data => {
+ setChangeList(data.rows);
+ });
+ getNoticeList({ ...params,achievementSource:'科研成果' }).then(data => {
+ setCheckList(data.rows);
+ });
+ getNoticeList({ ...params,achievementSource:'其他' }).then(data => {
+ setAbandonList(data.rows);
+ setLoading(false);
+ });
+ } else {
+ const params = {
+ orderBy,
+ curPage,
+ isChecked: 1,
+ pageSize: 10,
+ status: 1,
+ title,
+ type: 7,
+ achievementSource:tab,
+ flag: 1, //后台管理查询:2;前台展示:1
+ };
+ getNoticeList(params).then(data => {
+ setNoticeList(data.rows);
+ setTotal(data.total);
+ setLoading(false);
+ })
+ }
+ }, [tab, title, orderBy, curPage]);
+
+ function changeSort(sortType) {
+ setOrderBy(sortType);
+ setCurPage(1);
+ }
+
+ function noticeClick(id) {
+ props.history.push(`/achievement/noticeDetail/${id}`);
+ }
+
+ function sortNav() {
+ return
+
搜索}
+ onSearch={(value) => setTitle(value)} />
+
+
{ changeSort('publishDateDesc') }}>时间降序
+
|
+
{ changeSort('publishDateAsc') }}>时间升序
+
+
+ }
+
+ function handleClick(e) {
+ setTab(e.key);
+ setCurPage(1);
+ setTitle('');
+ setOrderBy('publishDateDesc');
+ }
+
+ function click(e){
+ setTab(e);
+ setCurPage(1);
+ setTitle('');
+ setOrderBy('publishDateDesc');
+ }
+
+ function cont(param, titleStr, key, svgStr) {
+ return
+
+
+
+ {titleStr}
+
+ {param.length === 5 &&
{ handleClick({ key: key }) }}>查看更多 }
+
+ {param.length > 0 ? : }
+
+ }
+
+ function content() {
+ if (tab === '0') {
+ if(callList.length === 0 && changeList.length === 0 && checkList.length === 0 && abandonList.length === 0){
+ return
+ }else{
+ return
+ {cont(callList, "开源项目", '开源项目', "iconfont icon-zhaobiaogonggao")}
+ {cont(changeList, "创客任务", '创客任务', "iconfont icon-gengzhenggonggao")}
+ {cont(checkList, "科研成果", '科研成果', "iconfont icon-zhongbiaogonggao")}
+ {cont(abandonList, "其他", '其他', "iconfont icon-feibiaogonggao")}
+
+ }
+ } else if (tab === '8') {
+ return
+ } else {
+ let titleStr;
+ let svgStr;
+ switch (tab) {
+ case '开源项目':
+ titleStr = "开源项目";
+ svgStr = "iconfont icon-gengzhenggonggao"
+ break;
+ case '创客任务':
+ titleStr = "创客任务";
+ svgStr = "iconfont icon-zhongbiaogonggao"
+ break;
+ case '科研成果':
+ titleStr = "科研成果";
+ svgStr = "iconfont icon-feibiaogonggao"
+ break;
+ case '其他':
+ titleStr = "其他";
+ svgStr = "iconfont icon-zhaobiaogonggao"
+ break;
+ }
+ return
+
+
+ {total > 0 ? total> 10 ?
+
{ setCurPage(page) }}
+ current={curPage}
+ total={total}
+ showTotal={total => `共 ${total} 条`}
+ />
+ : "" : }
+
+ }
+ }
+
+ return (
+
+
+
+ {/*
+ 首页 >
+ 成果
+
*/}
+
+
+
+
+ - click('0')}>成果来源
+ {
+ achieveSource.map(item=>{
+ return - click(item.code)} key={item.code}>{item.name}
+ })
+ }
+
+
+
+
+ {sortNav()}
+ {loading ? : content()}
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/military/achievement/noticeList/index.scss b/src/military/achievement/noticeList/index.scss
new file mode 100644
index 00000000..2c2eabe9
--- /dev/null
+++ b/src/military/achievement/noticeList/index.scss
@@ -0,0 +1,215 @@
+.notice-list{
+ .ant-tabs {
+ .ant-tabs-left-bar{
+ border: 1px solid #E5E5E5;
+ .ant-tabs-nav-container{
+ margin-right: 0;
+ }
+ .ant-tabs-nav-wrap{
+ margin-right: 0;
+ }
+
+ svg{
+ margin-right:.75em;
+ }
+ }
+ .ant-tabs-tab{
+ display: flex;
+ justify-content: start;
+ align-items: center;
+ margin-bottom: 0.5rem;
+ width: 13.5rem;
+ height: 2.8125rem;
+ background: #fff;
+ font-size: 1.125rem;
+
+ }
+ .ant-tabs-left-content{
+ border: 0;
+ }
+ .ant-tabs-tab-active{
+ background: #1890FF;
+ color: #fff;
+ }
+ .ant-tabs-ink-bar{
+ display: none !important;
+ }
+ }
+
+ .notice-sort-nav{
+ display: flex;
+ justify-content: space-between;
+ padding: .3rem 2rem 1.5rem;
+ margin: 0px -1.25rem;
+ border-bottom: 1px solid #E0E0E0;
+ .ant-input:hover{
+ border-color: #4154f1;
+ }
+ .ant-btn-primary{
+ background-color: #4154f1;
+ &:hover{
+ opacity: 0.8;
+ }
+ }
+ }
+
+ .notice-center-content{
+ padding:1.25rem;
+ background: #fff;
+ flex: auto;
+ }
+
+ .item-head-title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1.25rem 0 .6rem 0;
+ .item-head-title-content{
+ display: flex;
+ align-items: center;
+ font-size: 1rem;
+ span{
+ font-weight: bold;
+ }
+ i{
+ margin-right: .25em;
+ color: #4154f1;
+ }
+ }
+ }
+
+ .ant-input-group-addon{
+ border: 0 !important;
+ }
+
+ .item-head-title{
+ border-bottom: 1px solid #E5E5E5;
+ }
+
+}
+
+.center-right-but{
+ caret-color: rgba(0, 0, 0, 0);
+ .piece{
+ margin:0 .8rem;
+ color: #aaa;
+ }
+ .sortLink{
+ color: #333;
+ cursor: pointer;
+ &:hover{
+ color: #4154f1;
+ }
+ &.active{
+ color: #4154f1;
+ }
+ }
+}
+
+.body{
+ display: flex;
+ justify-content: space-between;
+ margin-top: -20px;
+
+ .navigationMenu{
+ margin-right: 20px;
+ width: 20.8em;
+ caret-color: rgba(0, 0, 0, 0);
+ .menu-ul:last-child{
+ margin-top: 12px;
+ }
+ }
+
+ .none_p_title{
+ text-align: center;
+ }
+}
+
+.menu-ul{
+ background-color: white;
+ margin-bottom: 12px;
+ border-radius:2px;
+
+ .MenuTitle{
+ border-bottom: 1px solid #E0E0E0;
+
+ span{
+ display: block;
+ width: 50%;
+ height: 100%;
+ cursor: pointer;
+ border-bottom: 0px solid;
+ i{
+ color: #afaaae;
+ }
+ }
+
+ span:hover{
+ color: #4154f1;
+ .iconfont{
+ color: #4154f1 !important;
+ }
+ }
+ }
+
+ li{
+ padding:0px 0px 0px 20px;
+ position: relative;
+ height: 62px;
+ line-height: 62px;
+ font-size: 16px;
+ color: #333;
+ span{
+ display: block;
+ height: 62px;
+ cursor: pointer;
+ border-bottom: 1px solid #eee;
+ }
+
+ &:last-child > span{
+ border-bottom: none;
+ }
+ }
+
+ li:hover{
+ background: #fafafa;
+ }
+
+ .active{
+ background-color: #fafafa;
+ & ::before{
+ position: absolute;
+ left: 0px;
+ top: 15px;
+ width: 6px;
+ content: '';
+ height: 30px;
+ background: #4154f1;
+ }
+ }
+
+ & i{
+ margin-right: 5px;
+ }
+}
+
+.ant-input-group-addon .ant-btn-lg {
+ height: 40px;
+}
+
+.edu-txt-center .ant-pagination {
+ margin: 2rem auto;
+ text-align: center;
+ .ant-pagination-item:focus, .ant-pagination-item:hover, .ant-pagination-item-active, .ant-pagination-prev:hover a, .ant-pagination-next:hover a, .ant-pagination-options-quick-jumper input:focus, .ant-pagination-options-quick-jumper input:hover{
+ border-color: #4154f1;
+ }
+ .ant-pagination-disabled{
+ & a, & :hover a, & :focus a, & .ant-pagination-item-link, &:hover .ant-pagination-item-link , &:focus .ant-pagination-item-link {
+ color: rgba(0, 0, 0, 0.25) !important;
+ border-color: #d9d9d9;
+ }
+ }
+ .ant-pagination-item-active a{
+ color: #4154f1
+ }
+}
\ No newline at end of file
diff --git a/src/military/achievement/static.js b/src/military/achievement/static.js
new file mode 100644
index 00000000..d7337924
--- /dev/null
+++ b/src/military/achievement/static.js
@@ -0,0 +1,37 @@
+// 成果开始
+export const noticeStatus = [
+ { code: 0, name: "关闭", dicItemName: '关闭' },
+ { code: 1, name: "正常", dicItemName: '正常' },
+ { code: 2, name: "草稿", dicItemName: '草稿' },
+];
+
+export const achieveSource = [
+ // { code: "1", name: "开源项目" },
+ // { code: "2", name: "创客任务" },
+ // { code: "3", name: "科研成果" },
+ // { code: "4", name: "其他" },
+ { code: "开源项目", name: "开源项目" },
+ { code: "创客任务", name: "创客任务" },
+ { code: "科研成果", name: "科研成果" },
+ { code: "其他", name: "其他" },
+];
+
+export const achieveType = [
+ { code: "算法", name: "算法"},
+ { code: "理论", name: "理论"},
+ { code: "工具", name: "工具"},
+ { code: "软件", name: "软件"},
+ { code: "其他", name: "其他"},
+ // { code: "1", name: "算法"},
+ // { code: "2", name: "理论"},
+ // { code: "3", name: "工具"},
+ // { code: "4", name: "软件"},
+ // { code: "5", name: "其他"},
+];
+
+export const noticeChecked = [
+ { code: 0, name: "未通过", dicItemName: "未通过" },
+ { code: 1, name: "通过", dicItemName: "通过" },
+ { code: 2, name: "未处理", dicItemName: "未处理" },
+];
+//成果结束
\ No newline at end of file
diff --git a/src/military/achievement/svg.js b/src/military/achievement/svg.js
new file mode 100644
index 00000000..c4bc6b35
--- /dev/null
+++ b/src/military/achievement/svg.js
@@ -0,0 +1,73 @@
+import React from 'react';
+
+export function AbandonSvg({ color }) {
+ return
+}
+
+export function AllSvg({ color }) {
+ return
+}
+
+export function ChangeSvg({ color }) {
+ return
+}
+
+export function CheckSvg({ color }) {
+ return
+}
+
+export function NewSvg({ color }) {
+ return
+}
+
+export function CallSvg({ color }) {
+ return
+
+}
\ No newline at end of file
diff --git a/src/military/components/exportExcel.js b/src/military/components/exportExcel.js
index 59db8219..2cf549da 100644
--- a/src/military/components/exportExcel.js
+++ b/src/military/components/exportExcel.js
@@ -56,7 +56,6 @@ const display = (node, newTd) => {
const {type, checked, value} = node;
newSpan.innerText = value;
if (type === 'radio' || type === 'checkbox') {
- console.log("type", type)
newSpan.innerText = type === 'radio' ? (checked ? "●" : "○") : (checked ? "■" : "□");
newSpan.style.fontSize = '16px';
newSpan.style.paddingLeft = '15px';
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index 46c11ef7..e1220ce4 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -577,31 +577,60 @@ class NewHeader extends Component {
matchpaths = (url) => {
const { match } = this.props;
- let pathname=sessionStorage.pathname;
- if(url){
- if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) {
- return true
- // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断
- } else if (url.indexOf('explore') > -1 && match.path.indexOf('explore') > -1) {
- return true
- // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断
- } else if (url.indexOf('explore') > -1 && match.url.indexOf(pathname) > -1 && match.url.indexOf('/administration') === -1 && match.url.indexOf('/admin') === -1) {
- return true
- // 公告
- } else if (url.indexOf('/notice') > -1 && match.path.indexOf('/notice') > -1) {
- return true
- // 创客
- } else if (url.indexOf('/task') > -1 && match.path.indexOf('/task') > -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
- } else if (['http://117.50.100.12:8080','https://osredm.com','http://111.8.36.180:8000','http://localhost:3007'].includes(url) && match.path === '/') {
- return true
- } else {
- return false
+ const hostname = window.location.hostname;
+ const port = window.location.port;
+ const isDev = hostname == "localhost";
+ let isdev2= isDev ?'http://117.50.100.12:49999':`http://${hostname}`;
+ let str = "";
+ if(url.indexOf("http")>-1){
+ if(url.indexOf("https")>-1){
+ isdev2 = `https://${hostname}`;
}
+ if(!isDev && port){
+ isdev2+=`:${port}`;
+ }
+ str = isdev2+match.path;
+ }else{
+ str = match.path;
}
+
+ console.log(str,(url+"/"),url && str === url);
+ if (url && (str === url || str===(url+"/"))) {
+ return true
+ }else {
+ return false
+ }
+
+ // const { match } = this.props;
+ // let pathname=sessionStorage.pathname;
+ // console.log(url);
+ // if(url){
+ // if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) {
+ // return true
+ // // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断
+ // } else if (url.indexOf('explore') > -1 && match.path.indexOf('explore') > -1) {
+ // return true
+ // // 开源项目,路由改版后,比较麻烦,因此使用多个进行判断
+ // } else if (url.indexOf('explore') > -1 && match.url.indexOf(pathname) > -1 && match.url.indexOf('/administration') === -1 && match.url.indexOf('/admin') === -1) {
+ // return true
+ // // 公告
+ // } else if (url.indexOf('/notice') > -1 && match.path.indexOf('/notice') > -1) {
+ // return true
+ // // 创客
+ // } 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
+ // } else if (['http://117.50.100.12:8080','https://osredm.com','http://111.8.36.180:8000','http://localhost:3007'].includes(url) && match.path === '/') {
+ // return true
+ // } else {
+ // return false
+ // }
+ // }
}
handleVisibleChange = visible => {