+
+ 首页 >
+ 公告 >
+ 公告详情 >
+
+
+ {/*
*/}
+
+ {noticeData.title}
+
+
+
+
公告类型:{noticeTypeArr[noticeData.type]}
+ {noticeData.publisher &&
发布单位:{noticeData.publisher}
}
+
发布时间:{noticeData.publishDate || noticeData.createdAt}
+
截止时间:{noticeData.closingDate}
+
浏览:{noticeData.visits || 0}
+
+
+
+
+ {
+ noticeData.fileDownloadPath &&
+
+ 公告附件
+
+ { window.open(httpUrl + noticeData.fileDownloadPath) }}>
+ {noticeData.fileName}
+
+ { window.open(httpUrl + noticeData.fileDownloadPath) }}>下载
+
+
+ }
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/military/notice/noticeDetail/index.scss b/src/military/notice/noticeDetail/index.scss
new file mode 100644
index 00000000..073503a1
--- /dev/null
+++ b/src/military/notice/noticeDetail/index.scss
@@ -0,0 +1,75 @@
+.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;
+}
+
+.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;
+ padding: 0 1rem;
+ background: #f9f9f9;
+ span:hover{
+ cursor: pointer;
+ color: #1890ff;
+ }
+}
diff --git a/src/military/notice/noticeList/index.jsx b/src/military/notice/noticeList/index.jsx
new file mode 100644
index 00000000..46fa5848
--- /dev/null
+++ b/src/military/notice/noticeList/index.jsx
@@ -0,0 +1,333 @@
+import React, { useEffect, useState } from 'react';
+import classNames from 'classnames';
+import { Pagination, Icon, Input, Tabs } from 'antd';
+import { Link } from "react-router-dom";
+import ItemList from '../../components/itemList';
+import Nodata from '../../../forge/Nodata';
+import Loading from "../../../Loading";
+import { AbandonSvg, AllSvg, ChangeSvg, CheckSvg } from '../svg';
+import noticePng from '../image/banner.png';
+import { getNoticeList } from '../api';
+
+import './index.scss';
+const Search = Input.Search;
+const { TabPane } = Tabs;
+
+const defaultColor = '#1890ff';
+const activeColor = '#fff';
+
+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 [changeList, setChangeList] = useState([]);
+ const [checkList, setCheckList] = useState([]);
+ const [abandonList, setAbandonList] = useState([]);
+
+
+
+ useEffect(() => {
+ setLoading(true);
+ if (tab === '0') {
+ const params = {
+ orderBy,
+ curPage: 1,
+ isChecked: 1,
+ pageSize: 5,
+ status: 1,
+ type: 1,
+ title,
+ flag: 1, //后台管理查询:2;前台展示:1
+ };
+ getNoticeList(params).then(data => {
+ setChangeList(data.rows);
+ });
+ getNoticeList({ ...params, type: 2 }).then(data => {
+ setCheckList(data.rows);
+ });
+ getNoticeList({ ...params, type: 3 }).then(data => {
+ setAbandonList(data.rows);
+ setLoading(false);
+ });
+ } else {
+ const params = {
+ orderBy,
+ curPage,
+ isChecked: 1,
+ pageSize: 10,
+ status: 1,
+ title,
+ type: 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(`/notice/noticeDetail/${id}`);
+ }
+
+ function sortNav() {
+ return
+ {/*
*/}
+ 搜索}
+ onSearch={(value) => setTitle(value)} />
+ {/*
*/}
+
+
{ changeSort('publishDateDesc') }}>时间降序
+
|
+
{ changeSort('publishDateAsc') }}>时间升序
+
+
+ }
+
+ function changeTab(key) {
+ setTab(key);
+ setCurPage(1);
+ setTitle('');
+ setOrderBy('publishDateDesc');
+ }
+
+ return (
+
+
+
+
+ 首页 >
+ 公告 >
+
+
{ changeTab(key) }}>
+
+
+ 全部公告
+
+ }
+ key="0">
+
+
+
+ {
+ sortNav()
+ }
+
+ {
+ loading ?
:
+
+
+ {changeList.length > 0 &&
+
+
+
+ 更正公告
+
+ {changeList.length === 5 &&
{ changeTab('1') }}>查看更多 }
+
+
+
+ }
+
+ {checkList.length > 0 &&
+
+
+
+ 中标公告
+
+ {checkList.length === 5 &&
{ changeTab('2') }}>查看更多 }
+
+
+
+ }
+
+ {abandonList.length > 0 &&
+
+
+
+ 废标公告
+
+ {abandonList.length === 5 &&
{ changeTab('3') }}>查看更多 }
+
+
+
+ }
+
+ {changeList.length === 0 && checkList.length === 0 && abandonList.length === 0 && }
+
+
+ }
+
+
+
+
+
+
+
+ 更正公告
+
+ }
+ key="1">
+
+
+ {
+ sortNav()
+ }
+
+ {
+ loading ?
:
+
+
+
+ {noticeList.length > 0 ?
+
{ setCurPage(page) }}
+ current={curPage}
+ total={total}
+ showTotal={total => `共 ${total} 条`}
+ />
+ : }
+
+ }
+
+
+
+
+
+
+
+
+ 中标公告
+
+ }
+ key="2">
+
+
+
+ {
+ sortNav()
+ }
+
+ {
+ loading ?
:
+
+
+
+ {noticeList.length > 0 ?
+
{ setCurPage(page) }}
+ current={curPage}
+ total={total}
+ showTotal={total => `共 ${total} 条`}
+ />
+ : }
+
+ }
+
+
+
+
+
+
+
+ 废标公告
+
+ }
+ key="3">
+
+
+ {
+ sortNav()
+ }
+
+ {
+ loading ?
:
+
+
+
+ {noticeList.length > 0 ?
+
{ setCurPage(page) }}
+ current={curPage}
+ total={total}
+ showTotal={total => `共 ${total} 条`}
+ />
+ : }
+
+ }
+
+
+
+
+
+
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/military/notice/noticeList/index.scss b/src/military/notice/noticeList/index.scss
new file mode 100644
index 00000000..4fc4559e
--- /dev/null
+++ b/src/military/notice/noticeList/index.scss
@@ -0,0 +1,95 @@
+.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: .625rem 1rem .5rem;
+ background: #f5f5f5;
+ }
+
+ .notice-center-content{
+ padding:1.25rem;
+ background: #fff;
+
+
+ }
+
+ .item-head-title{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ // height: 3.75rem;
+ padding: 1.25rem 0 .6rem 0;
+ .item-head-title-content{
+ display: flex;
+ align-items: center;
+ font-size: 1rem;
+ font-weight: bold;
+ }
+ }
+
+
+ .ant-input-group-addon{
+ border: 0 !important;
+ }
+
+ .item-head-title{
+ border-bottom: 1px solid #E5E5E5;
+ }
+
+}
+
+.center-right-but{
+ .piece{
+ margin:0 .8rem;
+ color: #aaa;
+ }
+ .sortLink{
+ color: #333;
+ cursor: pointer;
+ &:hover{
+ color: #1890FF;
+ }
+ &.active{
+ color: #1890FF;
+ }
+ }
+}
+
diff --git a/src/military/notice/static.js b/src/military/notice/static.js
new file mode 100644
index 00000000..786a7880
--- /dev/null
+++ b/src/military/notice/static.js
@@ -0,0 +1,19 @@
+// 公告开始
+export const noticeStatus = [
+ { code: 0, name: "关闭", dicItemName: '关闭' },
+ { code: 1, name: "正常", dicItemName: '正常' },
+ { code: 2, name: "草稿", dicItemName: '草稿' },
+];
+
+export const noticeType = [
+ { code: 1, name: "更正公告", dicItemName: "更正" },
+ { code: 2, name: "中标公告", dicItemName: "中标" },
+ { code: 3, name: "废标公告", dicItemName: "废标" },
+];
+
+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/notice/svg.js b/src/military/notice/svg.js
new file mode 100644
index 00000000..2d208396
--- /dev/null
+++ b/src/military/notice/svg.js
@@ -0,0 +1,66 @@
+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() {
+ return
+}
\ No newline at end of file