diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js
index ade074a0..25419402 100644
--- a/src/forge/Main/Index.js
+++ b/src/forge/Main/Index.js
@@ -276,12 +276,14 @@ class Index extends Component {
- -
- 语言
+ - {this.getType();this.changeType(undefined, this.state.typeList);}}>
+
+ 语言
{typeList}
- - 项目类别
+ - {this.getCategory();this.changeCategory(undefined, this.state.categoryList);}}>
+ 项目类别
{categoryList}
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss
index 913312ff..e91504ac 100644
--- a/src/forge/css/index.scss
+++ b/src/forge/css/index.scss
@@ -168,7 +168,7 @@ form{
background-color: #fff;
.list-affix{
min-height: 20px;
- max-height: 180px;
+ max-height: 240px;
overflow-y: auto;
}
& li{
@@ -210,7 +210,7 @@ form{
width: 6px;
content: '';
height: 33px;
- background: #4CACFF;
+ background: #1484EF;
}
.MenuTitle{
font-size: 16px;
@@ -220,6 +220,21 @@ form{
line-height: 62px;
border-bottom: 1px solid #E0E0E0;
font-weight: 400;
+
+ span{
+ display: block;
+ width: 50%;
+ height: 100%;
+ cursor: pointer;
+ }
+
+ span:hover{
+ color: #1484EF;
+
+ .iconfont{
+ color: #1484EF !important;
+ }
+ }
}
.ant-menu-inline{
border:none;
diff --git a/src/military/fetch.js b/src/military/fetch.js
index 7d037a3d..ef9154d9 100644
--- a/src/military/fetch.js
+++ b/src/military/fetch.js
@@ -6,12 +6,13 @@ import cookie from 'react-cookies';
let actionUrl = '';
if (window.location.href.indexOf('localhost') > -1) {
- actionUrl='http://117.50.100.12:8008';
-}else if(window.location.href.indexOf('117.50.100.12') > -1){
- actionUrl="http://117.50.100.12:8008";
+ actionUrl='https://taskapi.osredm.com';
+ // actionUrl='http://192.168.31.47:8081';
}else if(window.location.href.indexOf('192.168.31.48') > -1){
- actionUrl="http://117.50.100.12:8008";
-}else if(window.location.href.indexOf('osredm')>-1){
+ actionUrl='https://taskapi.osredm.com';
+}else if(window.location.href.indexOf('noticeweb.osredm') > -1){
+ actionUrl="https://taskapi.osredm.com";
+}else if(window.location.href.indexOf('forge.osredm.com')>-1){
actionUrl="https://info.osredm.com";
}
export const httpUrl=actionUrl;
diff --git a/src/military/notice/api.js b/src/military/notice/api.js
index b397f779..1f80ba34 100644
--- a/src/military/notice/api.js
+++ b/src/military/notice/api.js
@@ -27,7 +27,7 @@ export async function getNoticeDetail(id) {
method: 'get',
params:{flag:1}
});
- if (res.message === 'success') {
+ if (res.data) {
return res.data;
} else {
notification.open({
@@ -37,3 +37,13 @@ export async function getNoticeDetail(id) {
}
}
+//新增加密公告申请人
+export function addReader(data) {
+ return fetch({
+ url: '/api/request_contact_reader_info/',
+ method: 'post',
+ data: data
+ });
+}
+
+
diff --git a/src/military/notice/image/banner.png b/src/military/notice/image/banner.png
index 3f969834..ef365f97 100644
Binary files a/src/military/notice/image/banner.png and b/src/military/notice/image/banner.png differ
diff --git a/src/military/notice/noticeDetail/index.jsx b/src/military/notice/noticeDetail/index.jsx
index 21f4c638..3843ded8 100644
--- a/src/military/notice/noticeDetail/index.jsx
+++ b/src/military/notice/noticeDetail/index.jsx
@@ -1,77 +1,163 @@
-import React, { useEffect, useState } from 'react';
-import { Icon, } from 'antd';
+import React, { useEffect, useState, useCallback } from 'react';
+import { Button, Icon, Form, Modal, Input } from 'antd';
import { Link } from "react-router-dom";
-import { getNoticeDetail } from '../api';
+import { getNoticeDetail, addReader } from '../api';
import { noticeType } from '../static';
import './index.scss';
const noticeTypeArr = [];
for (const item of noticeType) {
- noticeTypeArr[item.code]=item.name;
+ noticeTypeArr[item.code] = item.name;
}
-export default ({ match, history, showNotification }) => {
+export default Form.create()(({ match, history, showNotification, form }) => {
+ const { getFieldDecorator, validateFields, setFieldsValue } = form;
+
+ const [reload, setReload] = useState(0);
const [noticeData, setNoticeData] = useState({});
+ const [visible, setVisible] = useState(false);
+
+ const [readerName,setReaderName]=useState('');
+
const id = match.params.noticeId;
useEffect(() => {
id && getNoticeDetail(id).then(data => {
- if(data){
- data.publishDate=data.publishDate.split(' ')[0];
- data.createdAt=data.createdAt.split(' ')[0];
- data.closingDate=data.closingDate.split(' ')[0];
+ if (data) {
+ data.publishDate = data.publishDate.split(' ')[0];
+ data.createdAt = data.createdAt.split(' ')[0];
+ data.closingDate = data.closingDate.split(' ')[0];
}
setNoticeData(data || {});
})
- }, [id]);
+ }, [id, reload]);
+
+ // form表单公共处理函数
+ const helper = useCallback(
+ (label, name, rules, widget) => (
+
+ {getFieldDecorator(name, { rules, validateFirst: true ,getValueFromEvent: e=>e.target.value.replace(/(^\s*)|(\s*$)/g, "") })(widget)}
+
+ ),
+ []
+ );
+
+ function pushInfo() {
+ validateFields((err, values) => {
+ if (!err) {
+ addReader({
+ ...values,
+ annId: noticeData.id,
+ }).then(res => {
+ if (res.message === "success") {
+ setVisible(false);
+ setReload(Math.random());
+ } else {
+ res && Modal.error({ content: res.message });
+ }
+ })
+ }
+ });
+ }
+
return (
-
-
-
-
- 首页 >
- 公告 >
- 公告详情
-
-
- {/*
*/}
-
- {noticeData.title}
-
-
-
-
公告类型:{noticeTypeArr[noticeData.type]}
- {noticeData.publisher &&
发布单位:{noticeData.publisher}
}
-
发布时间:{noticeData.publishDate || noticeData.createdAt}
-
截止时间:{noticeData.closingDate}
-
浏览:{noticeData.visits || 0}
-
-
-
-
- {
- noticeData.fileDownloadPath &&
-
- 公告附件
-
- { window.open( noticeData.fileDownloadPath) }}>
- {noticeData.fileName}
-
- { window.open( noticeData.fileDownloadPath) }}>下载
-
-
- }
-
-
-
-
+
+
+ 首页 >
+ 公告 >
+ 公告详情
-
+
+ {/*
*/}
+
+ {noticeData.title}
+
+
+
+
公告类型:{noticeTypeArr[noticeData.type]}
+ {noticeData.publisher &&
发布单位:{noticeData.publisher}
}
+
发布时间:{noticeData.publishDate || noticeData.createdAt}
+
截止时间:{noticeData.closingDate}
+
浏览:{noticeData.visits || 0}
+
+
+
+
+ {
+ 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字符' }],
+
+ )
+ }
+
+
+
)
}
+)
diff --git a/src/military/notice/noticeDetail/index.scss b/src/military/notice/noticeDetail/index.scss
index 073503a1..c43c4558 100644
--- a/src/military/notice/noticeDetail/index.scss
+++ b/src/military/notice/noticeDetail/index.scss
@@ -56,6 +56,10 @@
min-height: 30vh;
}
+.content-secret{
+ min-height: 2em;
+}
+
.notice-content-title {
margin: 0.5rem 0;
font-size: 1rem;
@@ -66,6 +70,7 @@
display: flex;
justify-content: space-between;
align-items: center;
+ margin-bottom: 2rem !important;
padding: 0 1rem;
background: #f9f9f9;
span:hover{
@@ -73,3 +78,25 @@
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/notice/noticeList/index.jsx b/src/military/notice/noticeList/index.jsx
index 19dea876..344dc1d0 100644
--- a/src/military/notice/noticeList/index.jsx
+++ b/src/military/notice/noticeList/index.jsx
@@ -1,21 +1,14 @@
import React, { useEffect, useState } from 'react';
import classNames from 'classnames';
-import { Menu, Pagination, Icon, Input } from 'antd';
-import { Link } from "react-router-dom";
+import { Pagination, Icon, Input } from 'antd';
import ItemList from '../components/itemList';
import Nodata from '../../../forge/Nodata';
import Loading from "../../../Loading";
-// import { AbandonSvg, AllSvg, ChangeSvg, CallSvg, CheckSvg } from '../svg';
import noticePng from '../image/banner.png';
import { getNoticeList } from '../api';
import './index.scss';
const Search = Input.Search;
-// const { SubMenu } = Menu;
-
-// const defaultColor = '#848684';
-// const activeColor = '#ffffff';
-// const svgColor = '#1890ff';
export default (props) => {
@@ -101,6 +94,7 @@ export default (props) => {
function sortNav() {
return
{
}
- // function onOpenChange(e) {
- // if(e.length===2){
- // if(e[1]==='sub1'){
- // setTab('0');
- // }else{
- // setTab('7');
- // }
- // }else{
- // if(e[0]==='sub1'){
- // setTab('0');
- // } else if (e[0] == 'sub2') {
- // setTab('7');
- // } else {
- // setTab('8');
- // }
- // }
- // setCurPage(1);
- // setTitle('');
- // setOrderBy('publishDateDesc');
- // }
-
function handleClick(e) {
setTab(e.key);
setCurPage(1);
@@ -142,6 +115,15 @@ export default (props) => {
setOrderBy('publishDateDesc');
}
+ function click(e){
+ console.log("aa");
+ console.log(e);
+ setTab(e);
+ setCurPage(1);
+ setTitle('');
+ setOrderBy('publishDateDesc');
+ }
+
function cont(param, titleStr, key, svgStr) {
return
@@ -252,33 +234,24 @@ export default (props) => {
-
*/}
-
+
+ - click('0')}>项目公告
+ - click('4')}>招标公告
+ - click('1')}>更正公告
+ - click('2')}>中标公告
+ - click('3')}>废标公告
+
+
+ - click('7')}>成果转化
+ - click('5')}>技术资产
+ - click('6')}>成交公告
+
{sortNav()}
diff --git a/src/military/notice/noticeList/index.scss b/src/military/notice/noticeList/index.scss
index a0a02574..d4b58f5f 100644
--- a/src/military/notice/noticeList/index.scss
+++ b/src/military/notice/noticeList/index.scss
@@ -39,8 +39,11 @@
.notice-sort-nav{
display: flex;
justify-content: space-between;
- padding: .625rem 1rem .5rem;
- background: #f5f5f5;
+ padding: .3rem 2rem 1.5rem;
+ margin: 0px -1.25rem;
+ // border: 1px solid;
+ border-bottom: 1px solid #E0E0E0;
+ // background: #f5f5f5;
}
.notice-center-content{
@@ -68,7 +71,6 @@
}
}
-
.ant-input-group-addon{
border: 0 !important;
}
@@ -100,10 +102,11 @@
.body{
display: flex;
justify-content: space-between;
+ margin-top: -20px;
.navigationMenu{
- margin-right: 24px;
- width: 15.4em;
+ margin-right: 20px;
+ width: 20.8em;
caret-color: rgba(0, 0, 0, 0);
}
@@ -112,50 +115,74 @@
}
}
-#menu-selected{
- background-color: #1890FF;
- color: #fff;
- .subMenuspan{
- color: #fff;
+.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: #1484EF;
+ .iconfont{
+ color: #1484EF !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: #1484EF;
+ }
+ }
+
+ & i{
+ margin-right: 5px;
}
}
-// #menu-selected>div>.itemClass>.iconfont{
-// color: #fff;
-// }
-
-#menu-selected>.itemClass>.iconfont{
- color: #fff;
-}
-
-#menu-selected .ant-menu-submenu-arrow::after,#menu-selected .ant-menu-submenu-arrow::before,#menu-selected .ant-menu-submenu-arrow:after,#menu-selected .ant-menu-submenu-arrow:before{
- background: #fff;
-}
-
-.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{
- background-color: #fff;
- color: #595959;
-}
-
-.ant-menu-item-active{
- color: #1890FF;
-}
-
-.ant-menu-submenu-selected{
- color: #595959;
-}
-
-.itemClass{
- display: flex;
- align-items: center;
- font-size: 18px;
- .iconfont{
- margin-right:.75em;
- color: #1890FF;
- }
-}
-
-.ant-menu-vertical .ant-menu-item, .ant-menu-vertical-left .ant-menu-item, .ant-menu-vertical-right .ant-menu-item, .ant-menu-inline .ant-menu-item, .ant-menu-vertical .ant-menu-submenu-title, .ant-menu-vertical-left .ant-menu-submenu-title, .ant-menu-vertical-right .ant-menu-submenu-title, .ant-menu-inline .ant-menu-submenu-title{
- margin-top: 0px;
- margin-bottom: 0px;
+.ant-input-group-addon .ant-btn-lg {
+ height: 40px;
}
\ No newline at end of file
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index 4f373fcb..726117e0 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -580,7 +580,9 @@ class NewHeader extends Component {
return true
} else if (url.indexOf('projects') > -1 && match.path.indexOf('projects') > -1) {
return true
- } else if (url.indexOf('notice') > -1 && match.path.indexOf('notice') > -1) {
+ } else if (url.indexOf('.com/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('users') > -1 && match.path.indexOf('users') > -1) {
return true