forked from Gitlink/forgeplus-react
新增招标公告类型
This commit is contained in:
parent
7a59d43eec
commit
97bd7673e1
|
@ -3,9 +3,19 @@ import axios from 'axios';
|
|||
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";
|
||||
}else if(window.location.href.indexOf('osredm')>-1){
|
||||
actionUrl="https://info.osredm.com";
|
||||
}
|
||||
export const httpUrl=actionUrl;
|
||||
// export const httpUrl = 'http://106.75.31.211:58088'; //可视化
|
||||
// export const httpUrl = 'http://117.50.100.12:8008'; //测试环境
|
||||
export const httpUrl = 'https://info.osredm.com/'; //生产环境
|
||||
// export const httpUrl = 'https://info.osredm.com/'; //生产环境
|
||||
|
||||
const TokenKey = 'autologin_forge_military';
|
||||
axios.defaults.withCredentials = true;
|
||||
|
|
|
@ -9,7 +9,7 @@ export default (props) => {
|
|||
return (
|
||||
<div className="list-box" key={item.id}>
|
||||
<div className="list-title" onClick={() => { itemClick(item.id) }}>
|
||||
{item.achievementName || item.title} {item.new && <NewSvg />}
|
||||
{item.achievementName || item.title} {item.new && <NewSvg color="#ffb300"/>}
|
||||
</div>
|
||||
<div className="list-other">
|
||||
{item.publisher && <p>发布单位:{item.publisher}</p>}
|
||||
|
|
|
@ -5,7 +5,7 @@ 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 { AbandonSvg, AllSvg, ChangeSvg, CheckSvg, CallSvg } from '../svg';
|
||||
import noticePng from '../image/banner.png';
|
||||
import { getNoticeList } from '../api';
|
||||
|
||||
|
@ -28,6 +28,7 @@ export default (props) => {
|
|||
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([]);
|
||||
|
@ -50,6 +51,10 @@ export default (props) => {
|
|||
getNoticeList(params).then(data => {
|
||||
setChangeList(data.rows);
|
||||
});
|
||||
getNoticeList({ ...params, type: 4 }).then(data => {
|
||||
setCallList(data.rows);
|
||||
setLoading(false);
|
||||
});
|
||||
getNoticeList({ ...params, type: 2 }).then(data => {
|
||||
setCheckList(data.rows);
|
||||
});
|
||||
|
@ -89,17 +94,17 @@ export default (props) => {
|
|||
function sortNav() {
|
||||
return <div className="notice-sort-nav">
|
||||
{/* <div className="center-left-but"> */}
|
||||
<Search
|
||||
maxLength={20}
|
||||
style={{ width: "56%" }}
|
||||
placeholder="输入标题关键字,不能超过20字符"
|
||||
enterButton={<span><Icon type="search" className="mr5" /> 搜索</span>}
|
||||
onSearch={(value) => setTitle(value)} />
|
||||
<Search
|
||||
maxLength={20}
|
||||
style={{ width: "56%" }}
|
||||
placeholder="输入标题关键字,不能超过20字符"
|
||||
enterButton={<span><Icon type="search" className="mr5" /> 搜索</span>}
|
||||
onSearch={(value) => setTitle(value)} />
|
||||
{/* </div> */}
|
||||
<div className="center-right-but">
|
||||
<div className={classNames({sortLink:true,active:orderBy==='publishDateDesc'})} onClick={() => { changeSort('publishDateDesc') }}>时间降序<Icon type="arrow-down" /></div>
|
||||
<div className={classNames({ sortLink: true, active: orderBy === 'publishDateDesc' })} onClick={() => { changeSort('publishDateDesc') }}>时间降序<Icon type="arrow-down" /></div>
|
||||
<span className="piece">|</span>
|
||||
<div className={classNames({sortLink:true,active:orderBy==='publishDateAsc'})} onClick={() => { changeSort('publishDateAsc') }}>时间升序<Icon type="arrow-up" /></div>
|
||||
<div className={classNames({ sortLink: true, active: orderBy === 'publishDateAsc' })} onClick={() => { changeSort('publishDateAsc') }}>时间升序<Icon type="arrow-up" /></div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
@ -139,6 +144,21 @@ export default (props) => {
|
|||
loading ? <Loading /> :
|
||||
<React.Fragment>
|
||||
|
||||
{callList.length > 0 && <React.Fragment>
|
||||
<div className="item-head-title">
|
||||
<div className="item-head-title-content">
|
||||
<ChangeSvg color={defaultColor} />
|
||||
<span>招标公告</span>
|
||||
</div>
|
||||
{callList.length === 5 && <span className="link" onClick={() => { changeTab('4') }}>查看更多 <Icon type="arrow-right" /></span>}
|
||||
</div>
|
||||
<ItemList
|
||||
list={callList}
|
||||
itemClick={noticeClick}
|
||||
/>
|
||||
</React.Fragment>
|
||||
}
|
||||
|
||||
{changeList.length > 0 && <React.Fragment>
|
||||
<div className="item-head-title">
|
||||
<div className="item-head-title-content">
|
||||
|
@ -193,6 +213,49 @@ export default (props) => {
|
|||
</TabPane>
|
||||
|
||||
|
||||
<TabPane
|
||||
tab={
|
||||
<React.Fragment>
|
||||
<CallSvg color={tab === '4' ? activeColor : defaultColor} />
|
||||
<span>招标公告</span>
|
||||
</React.Fragment>
|
||||
}
|
||||
key="4">
|
||||
|
||||
<div className="notice-center-content">
|
||||
{
|
||||
sortNav()
|
||||
}
|
||||
|
||||
{
|
||||
loading ? <Loading /> :
|
||||
<React.Fragment>
|
||||
<div className="item-head-title">
|
||||
<div className="item-head-title-content">
|
||||
<CallSvg color={defaultColor} />
|
||||
<span>招标公告</span>
|
||||
</div>
|
||||
</div>
|
||||
<ItemList
|
||||
list={noticeList}
|
||||
itemClick={noticeClick}
|
||||
/>
|
||||
{noticeList.length > 0 ? <div className="edu-txt-center mt30 mb30">
|
||||
<Pagination
|
||||
showQuickJumper
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
current={curPage}
|
||||
total={total}
|
||||
showTotal={total => `共 ${total} 条`}
|
||||
/>
|
||||
</div> : <Nodata _html="暂无数据" />}
|
||||
</React.Fragment>
|
||||
}
|
||||
|
||||
</div>
|
||||
</TabPane>
|
||||
|
||||
|
||||
<TabPane
|
||||
tab={
|
||||
<React.Fragment>
|
||||
|
@ -300,7 +363,7 @@ export default (props) => {
|
|||
<React.Fragment>
|
||||
<div className="item-head-title">
|
||||
<div className="item-head-title-content">
|
||||
<ChangeSvg color={defaultColor} />
|
||||
<AbandonSvg color={defaultColor} />
|
||||
<span>废标公告</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,6 +9,7 @@ export const noticeType = [
|
|||
{ code: 1, name: "更正公告", dicItemName: "更正" },
|
||||
{ code: 2, name: "中标公告", dicItemName: "中标" },
|
||||
{ code: 3, name: "废标公告", dicItemName: "废标" },
|
||||
{ code: 4, name: "招标公告", dicItemName: "招标" },
|
||||
];
|
||||
|
||||
export const noticeChecked = [
|
||||
|
|
|
@ -57,10 +57,17 @@ export function CheckSvg({color}) {
|
|||
</svg>
|
||||
}
|
||||
|
||||
export function NewSvg() {
|
||||
export function NewSvg({color}) {
|
||||
return <svg width="33.091" height="14" viewBox="0 0 33.091 14">
|
||||
<g id="组_137" data-name="组 137" transform="translate(-294 -259)">
|
||||
<path id="路径_346" data-name="路径 346" d="M324.546,259h-28A2.553,2.553,0,0,0,294,261.545v8.909A2.553,2.553,0,0,0,296.545,273h28a2.553,2.553,0,0,0,2.545-2.545v-8.909A2.553,2.553,0,0,0,324.546,259ZM302.9,269.818a.642.642,0,0,1-.445.611.983.983,0,0,1-.191.025.664.664,0,0,1-.535-.28l-3.907-5.893v5.524a.636.636,0,1,1-1.273.013v-7.636a.632.632,0,0,1,1.158-.356l3.92,5.88v-5.524a.636.636,0,1,1,1.273,0Zm8.285-4.455a.636.636,0,1,1,0,1.273h-4.455v2.546h4.455a.636.636,0,1,1,0,1.273h-5.091a.63.63,0,0,1-.636-.636v-7.636a.63.63,0,0,1,.636-.636h5.091a.636.636,0,0,1,0,1.273h-4.455v2.545Zm13.211-3.029-2.52,7.522a.63.63,0,0,1-1.2,0l-1.922-5.74-1.922,5.74a.659.659,0,0,1-1.2,0l-2.52-7.522a.636.636,0,0,1,1.209-.395l1.922,5.74,1.922-5.74a.659.659,0,0,1,1.2,0l1.922,5.74,1.922-5.74a.624.624,0,1,1,1.184.395Zm0,0" fill="#ffb300"/>
|
||||
<path id="路径_346" data-name="路径 346" d="M324.546,259h-28A2.553,2.553,0,0,0,294,261.545v8.909A2.553,2.553,0,0,0,296.545,273h28a2.553,2.553,0,0,0,2.545-2.545v-8.909A2.553,2.553,0,0,0,324.546,259ZM302.9,269.818a.642.642,0,0,1-.445.611.983.983,0,0,1-.191.025.664.664,0,0,1-.535-.28l-3.907-5.893v5.524a.636.636,0,1,1-1.273.013v-7.636a.632.632,0,0,1,1.158-.356l3.92,5.88v-5.524a.636.636,0,1,1,1.273,0Zm8.285-4.455a.636.636,0,1,1,0,1.273h-4.455v2.546h4.455a.636.636,0,1,1,0,1.273h-5.091a.63.63,0,0,1-.636-.636v-7.636a.63.63,0,0,1,.636-.636h5.091a.636.636,0,0,1,0,1.273h-4.455v2.545Zm13.211-3.029-2.52,7.522a.63.63,0,0,1-1.2,0l-1.922-5.74-1.922,5.74a.659.659,0,0,1-1.2,0l-2.52-7.522a.636.636,0,0,1,1.209-.395l1.922,5.74,1.922-5.74a.659.659,0,0,1,1.2,0l1.922,5.74,1.922-5.74a.624.624,0,1,1,1.184.395Zm0,0" fill={color}/>
|
||||
</g>
|
||||
</svg>
|
||||
}
|
||||
|
||||
export function CallSvg({color}){
|
||||
return <svg width="13.925" height="16" viewBox="0 0 13.925 16">
|
||||
<path id="路径_350" data-name="路径 350" d="M1822.1,2425.528h-1.478a1.674,1.674,0,0,1-1.68,1.68h-5.371a1.674,1.674,0,0,1-1.68-1.68h-1.461a1.122,1.122,0,0,0-1.117,1.117v12.485a1.122,1.122,0,0,0,1.117,1.117h11.691a1.122,1.122,0,0,0,1.117-1.117v-12.481A1.155,1.155,0,0,0,1822.1,2425.528Zm-10.052,4.009h4.306a.77.77,0,1,1,0,1.539h-4.306a.77.77,0,1,1,0-1.539Zm0,3.463h4.306a.77.77,0,1,1,0,1.54h-4.306a.77.77,0,0,1,0-1.54Zm5.358,4.781h-5.382a.77.77,0,0,1,0-1.54h5.382a.77.77,0,0,1,0,1.54Zm2.92.052a.822.822,0,1,1,.822-.822A.822.822,0,0,1,1820.33,2437.833Zm.028-4.967-1.245.953v-3.9a.362.362,0,0,1,.331-.382h1.816a.362.362,0,0,1,.331.382l.01,3.9Zm-1.673-6.569h-4.871a1.034,1.034,0,0,1-1.025-1.025,1.045,1.045,0,0,1,1.025-1.025h4.871a1.025,1.025,0,0,1,0,2.049Zm0,0" transform="translate(-1809.317 -2424.247)" fill={color}/>
|
||||
</svg>
|
||||
|
||||
}
|
Loading…
Reference in New Issue