初始化成果库

This commit is contained in:
何童崇 2022-12-08 14:52:50 +08:00
parent 1ec50c51b2
commit 72f77fb6b8
24 changed files with 2067 additions and 1 deletions

View File

@ -221,5 +221,8 @@
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.42.1",
"webpack-bundle-analyzer": "^3.7.0"
},
"volta": {
"node": "14.17.3"
}
}

View File

@ -59,6 +59,11 @@ const Notice = Loadable({
loader: () => import('./military/notice'),
loading: Loading,
})
// 成果库
const Achievement = Loadable({
loader: () => import('./military/achievement'),
loading: Loading,
})
//任务/需求
const Task = Loadable({
loader: () => import('./military/task'),
@ -156,7 +161,7 @@ const Managements = Loadable({
// })
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder","task","notice","managements","expert","competition","administration", "needs"];
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder","task","notice","achievement","managements","expert","competition","administration", "needs"];
class App extends Component {
constructor(props) {
@ -388,6 +393,15 @@ class App extends Component {
}
}>
</Route>
{/*成果*/}
<Route
path={"/achievement"}
render={
(props) => {
return (<Achievement {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/*任务*/}
<Route path="/task" component={Task} />
{/*专家评审*/}

View File

@ -0,0 +1,80 @@
import fetch from 'military/notice/fetch';
import showNotification from '../components/ShowNotification';
// 公告列表查询
export async function getNoticeList(params) {
let res = await fetch({
url: '/api/announcements/',
method: 'get',
params,
});
if (res.message === 'success') {
return res.data;
} else {
showNotification(res.message || '请求错误');
}
}
//新增公告
export function addNotice(data) {
return fetch({
url: '/api/announcements/add',
method: 'post',
data: data
});
}
//删除公告
export function deleteNotice(id) {
return fetch({
url: '/api/announcements/' + id,
method: 'DELETE',
});
}
//更新公告
export function editNotice(data) {
return fetch({
url: '/api/announcements/update',
method: 'put',
data: data
});
}
//审核公告
export function checkNotice(data) {
return fetch({
url: '/api/announcements/check',
method: 'put',
data: data
});
}
// 公告详情查询
export async function getNoticeDetail(id) {
let res = await fetch({
url: '/api/announcements/' + id,
method: 'get',
});
if (res.data) {
return res.data;
} else {
showNotification(res.message || '请求错误');
}
}
// 公告密文查看人详情
export async function getNoticeReader(params) {
let res = await fetch({
url: '/api/request_contact_reader_info/',
method: 'get',
params,
});
if (res.data) {
return res.data;
} else {
showNotification(res.message || '请求错误');
}
}

View File

@ -0,0 +1,42 @@
.notice-content {
min-height: 50vh;
margin: 1em;
background: #fff;
border-radius: 1em;
box-shadow: 0 1px 2px #d9d9d9;
padding-bottom: 1vh;
}
.notice-title {
padding: 0.75em;
border-bottom: 1px solid #e5e5e5;
}
.notice-form .edit-input{
max-width:450px;
}
.my-search-button{
margin-top:4px;
}
.encrypt-item{
margin-top: -24px;
}
.encrypt-item .ant-form-item-label{
visibility: hidden;
}
.ant-radio-checked .ant-radio-inner{
border-color: #4154f1;
}
.ant-radio-inner::after{
background-color: #4154f1;
}
.ant-radio-wrapper:hover .ant-radio, .ant-radio:hover .ant-radio-inner, .ant-radio-input:focus + .ant-radio-inner{
border-color: #4154f1;
}
.ant-radio-checked::after{
border: 1px solid #4154f1;
}

View File

@ -0,0 +1,67 @@
import React from "react";
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
const NoticeReader = Loadable({
loader: () => import("./noticeReader"),
loading: Loading,
});
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) => (
<NoticeReader {...propsF} {...props} />
)}
></Route>
</Switch>
)
}

View File

@ -0,0 +1,84 @@
import React, { useCallback, useEffect, useState } from 'react';
import { Button, Descriptions, Icon } from 'antd';
import ShowNotification from '../../components/ShowNotification';
import { noticeType, noticeChecked } from '../../common/static';
import { getNoticeDetail, checkNotice } from '../api';
import '../index.css';
import './index.scss';
const noticeTypeArr = [];
for (const item of noticeType) {
noticeTypeArr[item.code] = (item.name);
}
const noticeCheckedArr = [];
for (const item of noticeChecked) {
noticeCheckedArr[item.code] = (item.name);
}
const IndexPage = ({ match, history, current_user: { admin } }) => {
const [noticeData, setNoticeData] = useState({});
const id = match.params.noticeId;
useEffect(() => {
id && getNoticeDetail(id).then(data => {
setNoticeData(data || {});
})
}, [id]);
//
function checkItem(isChecked) {
checkNotice({
id: noticeData.id,
isChecked,
}).then(res => {
if (res && res.code == '1') {
ShowNotification("操作成功");
history.go(-1);
} else {
ShowNotification(res.message || "操作失败");
history.go(-1);
}
})
}
function download(url) {
if (window.location.href.indexOf('localhost') > -1) {
url = 'http://106.75.31.211:58088' + url;
}
window.open(url);
}
return (
<div className="notice-content">
<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="发布单位">{noticeData.publisher}</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="公告附件">
<div style={{ color: '#1890ff' }} onClick={() => { download(noticeData.fileDownloadPath) }}>{noticeData.fileName}</div>
</Descriptions.Item>
<Descriptions.Item label="创建时间">{noticeData.createdAt}</Descriptions.Item>
{noticeData.publishDate && <Descriptions.Item label="发布时间">{noticeData.publishDate}</Descriptions.Item>}
<Descriptions.Item label="截止时间">{noticeData.closingDate}</Descriptions.Item>
<Descriptions.Item label="">
{admin && noticeData.status == 1 && noticeData.isChecked == 2 &&
<React.Fragment>
<Button className="mr20" type="primary" onClick={() => { checkItem(1) }}>通过</Button>
<Button className="mr20" type="primary" onClick={() => { checkItem(0) }}>拒绝</Button>
<Button className="mr20" onClick={() => { history.go(-1) }}>取消</Button>
</React.Fragment>
}
</Descriptions.Item>
</Descriptions>
</div>
)
}
export default IndexPage;

View File

@ -0,0 +1,22 @@
.itemContent {
padding: 10px 10px 0 30px;
}
.statusColor{
color: #1890ff;
}
.alignTop{
display: flex;
align-items: flex-start;
}
.backList{
margin-right:1em;
&:hover{
color: #1890ff;
}
}
:global{
.ant-descriptions-item-label{
min-width: 5em;
}
}

View File

@ -0,0 +1,322 @@
import React, { forwardRef, Fragment, useCallback, useEffect, useState } from 'react';
import ReactWEditor from 'wangeditor-for-react';
import { Form, Input, Button, Radio, Checkbox, DatePicker } from 'antd';
import moment from 'moment';
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 '../index.css';
const format = "YYYY-MM-DD HH:mm:ss";
const { TextArea } = Input;
let actionUrl = httpUrl;
// if (window.location.href.indexOf('localhost') > -1) {
// actionUrl = httpUrl;
// } else {
// actionUrl = "https://info.osredm.com";
// }
const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
const [fileList, setFileList] = useState(null);
const [noticeHtml, setNoticeHtml] = useState('');
const id = match.params.noticeId;
const { getFieldDecorator, validateFields, setFieldsValue } = form;
const [typeValue, setTypeValue] = useState(4);
const [isSecret, setIsSecret] = useState();
useEffect(() => {
id && getNoticeDetail(id).then(data => {
const formValue = {
type: data.type,
title: data.title,
publisher: data.publisher,
text: data.text,
closingDate: data.closingDate && moment(data.closingDate),
contactInfo: data.contactInfo,
};
setFieldsValue(formValue);
setNoticeHtml(data.text || '');
setIsSecret(Boolean(data.isSecret));
if (data.fileName) {
setFileList([{
name: data.fileName,
fileName: data.fileName,
fileDownloadPath: data.fileDownloadPath,
uid: "rc-upload" + data.id
}])
}
})
}, [id]);
//
function UploadFunc(fileList) {
setFileList(fileList);
}
const helper = useCallback(
(label, name, rules, widget, initialValue) => (
<Form.Item label={label}>
{getFieldDecorator(name, { rules, initialValue, validateFirst: true })(widget)}
</Form.Item>
),
[]
);
const editor = useCallback(() => (
<Form.Item label={"公告描述:"} required={true}>
{(!id || (id && noticeHtml)) &&
<ReactWEditor
defaultValue={noticeHtml}
config={
{
placeholder: "请输入公告描述",
excludeMenus: [
'list',
'todo',
'emoticon',
'video'
],
uploadImgServer: actionUrl + '/busiAttachments/upload',
uploadFileName: 'file',
uploadImgHeaders: {
'X-Requested-With': 'XMLHttpRequest'
},
uploadImgHooks: {
//
customInsert: function (insertImgFn, result) {
// result
// insertImgFn src
if (result && result.data && result.data.id) {
insertImgFn(`${actionUrl}/busiAttachments/view/${result.data.id}`);
}
}
}
}
}
onChange={(html) => {
changeHtml(html);
}}
/>}
{getFieldDecorator('text', {
rules: [{ required: true, message: "请输入公告描述" }],
validateFirst: true
})(<Input style={{ display: 'none' }} />)}
</Form.Item>
), [noticeHtml])
const formItemLayout = {
labelCol: {
xs: { span: 10 },
sm: { span: 8 },
lg: { span: 3 },
},
wrapperCol: {
xs: { span: 14 },
sm: { span: 16 },
lg: { span: 16 },
},
};
const tailFormItemLayout = {
wrapperCol: {
xs: {
span: 20,
offset: 4,
},
sm: {
span: 20,
offset: 4,
},
},
};
//
function saveItem(status) {
validateFields((error, values) => {
if (!error) {
let params = {
...values,
status,
fileDownloadPath: '',
fileName: '',
templateUrl: '',
};
params.closingDate = params.closingDate.format(format);
params.isSecret = Number(params.isSecret);
if (fileList && fileList.length) {
params.fileName = fileList[0].fileName || fileList[0].response.data.fileName;
params.fileDownloadPath = fileList[0].fileDownloadPath || `${actionUrl}/busiAttachments/download/${fileList[0].response.data.id}`;
}
if (id) {
//
params.id = id;
editNotice(params).then(res => {
if (res.message === 'success') {
ShowNotification("操作成功!");
if (status == 1) {
history.push('/managements/notice/list/2');
} else {
history.push('/managements/notice/list/draft');
}
} else {
ShowNotification(res.message);
}
});
} else {
//
addNotice(params).then(res => {
if (res.message === 'success') {
ShowNotification("公告新增成功!");
if (status == 1) {
history.push('/managements/notice/list/2');
} else {
history.push('/managements/notice/list/draft');
}
} else {
ShowNotification(res.message);
}
});
}
}
})
}
function changeClosingDate(val) {
if (val) {
let nextTime = moment(new Date().setDate(new Date().getDate() + val)).format('YYYY-MM-DD');
nextTime += ' 23:59:59';
setFieldsValue({
closingDate: moment(nextTime)
});
}
}
function changeHtml(html) {
setFieldsValue({
text: html
});
// setNoticeHtml(html);
}
return (
<div className="notice-content">
<h4 className="notice-title">{id ? '修改' : '发布'}公告</h4>
<Form className="notice-form" {...formItemLayout}>
{helper(
"公告类型:",
"type",
[{ required: true, message: "请选择公告类型" }],
<Radio.Group
onChange={(e) => { setTypeValue(e.target.value) }}
>
{
noticeType.map(item => {
return <Radio key={item.code} value={item.code}>{item.name}</Radio>
})
}
</Radio.Group>,
4
)}
{helper(
"公告标题:",
"title",
[{ required: true, message: "请输入公告标题" },
{ max: 50, message: '长度不能超过50个字符' }],
<Input
className="edit-input"
placeholder="请输入公告标题"
/>
)}
{helper(
"发布单位:",
"publisher",
[{ required: true, message: "请输入发布单位" },
{ max: 50, message: '长度不能超过50个字符' }],
<Input
className="edit-input"
placeholder="请输入发布单位"
/>
)}
{editor()}
{[4, 5, 6].includes(typeValue) && <Fragment>
{helper(
"联系方式:",
"contactInfo",
[{ max: 5000, message: '长度不能超过5000个字符' }],
<TextArea
rows={4}
// className="edit-input"
placeholder="请输入联系方式"
/>
)}
<Form.Item className="encrypt-item" label="加密与否">
{/* <Checkbox checked={isSecret} onChange={e => { setIsSecret(e.target.checked) }}>设置联系方式为加密内容</Checkbox> */}
{getFieldDecorator('isSecret',
{
validateFirst: true
})(<Checkbox checked={isSecret} onChange={e => { setIsSecret(e.target.checked) }}>设置联系方式为加密内容</Checkbox>)}
</Form.Item>
</Fragment>}
<Form.Item label={"上传文件:"}>
<Upload
className="commentStyle"
load={UploadFunc}
size={100}
ShowNotification={ShowNotification}
actionUrl={actionUrl}
fileList={fileList}
number={1}
/>
{/* 用一个隐藏的input实现上传文件的必填校验 */}
{/* {getFieldDecorator('file_name', {
rules: [{ required: true, message: "请上传公告文件" }],
validateFirst: true
})(<Input style={{ display: 'none' }} />)} */}
</Form.Item>
<Form.Item label="截止时间:">
<Radio.Group onChange={(e) => { changeClosingDate(e.target.value) }}>
<Radio value={6}>一周内</Radio>
<Radio value={29}>一个月内</Radio>
<Radio value={90}>三个月内</Radio>
<Radio value={182}>半年内</Radio>
<Radio value={0}>自定义</Radio>
</Radio.Group>
{getFieldDecorator('closingDate',
{
rules: [{ required: true, message: "请选择截止时间" }],
validateFirst: true
})(<DatePicker
showTime
format={format}
placeholder="请选择截止时间"
/>)}
</Form.Item>
<Form.Item {...tailFormItemLayout}>
<Button className="mr20" type={"primary"} onClick={() => { saveItem(1) }}>发布</Button>
<Button className="mr20" type={"primary"} onClick={() => { saveItem(2) }}>保存</Button>
<Button onClick={() => { history.go(-1) }}>取消</Button>
</Form.Item>
</Form>
</div>
)
})
)
export default NoticeEdit;

View File

@ -0,0 +1,302 @@
import React, { forwardRef, useEffect, useState, useCallback } from 'react';
import { Button, Form, Modal, Input, Select, Radio, } from 'antd';
import PaginationTable from "../../../components/pagination-table";
import { noticeType } from '../../common/static';
import DelModal from '../../components/DelModal';
import ShowNotification from '../../components/ShowNotification';
import { getNoticeList, checkNotice, deleteNotice } from '../api';
import '../index.css';
import './index.scss';
const Option = Select.Option;
const noticeTypeArr = [];
for (const item of noticeType) {
noticeTypeArr[item.code] = (item.name);
}
const NoticeList = Form.create()(forwardRef(({ form, match, history, current_user: { admin } }, ref) => {
let status = 1;
let isChecked = match.params.isChecked;
if (history.location.pathname.indexOf('draft') > -1) {
status = 2;
isChecked ='';
}
const { getFieldDecorator, validateFields, setFieldsValue, } = form;
const [type, setType] = useState(undefined);
const [title, setTitle] = useState(undefined);
const [pageSize, setPageSize] = useState(10);
const [curPage, setCurPage] = useState(1);
const [total, setTotal] = useState(0);
const [orderBy, setOrderBy] = useState('');
const [dataList, setDataList] = useState([]);
const [loading, setLoading] = useState(false);
const [visible, setVisible] = useState(false);
const [currentId, setCurrentId] = useState('');
const [currentIsChecked, setCurrentIsChecked] = useState(1);
const [reload, setReload] = useState(0);
useEffect(() => {
//
console.log('useEffect --- ');
//
history.listen(historyLocation => {
//
// console.log('route history , ', history);
// console.log('route history location , ', historyLocation);
setCurPage(1);
setType(undefined);
setTitle(undefined);
setFieldsValue({
type: undefined,
title: undefined,
});
})
}, [history]);
useEffect(() => {
setLoading(true);
getNoticeList({
orderBy,
curPage,
isChecked,
pageSize,
status,
type,
title,
flag: 2, //21
}).then(data => {
setLoading(false);
if (data) {
setDataList(data.rows);
setTotal(data.total);
} else {
setTotal(0);
setDataList([]);
}
});
}, [curPage, type, title, isChecked, reload,pageSize]);
const columns = [
{
title: '公告标题',
dataIndex: 'title',
key: 'title',
width: '30%'
},
{
title: '公告类型',
key: 'type',
dataIndex: 'type',
render: (text, record) => {
return noticeTypeArr[text];
}
},
{
title: '创建时间',
key: 'createdAt',
dataIndex: 'createdAt',
},
{
title: '截止时间',
key: 'closingDate',
dataIndex: 'closingDate',
},
{
title: '操作',
key: 'action',
render: (text, record) => (
<span>
{record.status == 2 && <Button className="mr5 font-12" type="primary" size="small" onClick={() => { editItem(record.id) }}>修改</Button>}
<Button className="mr5 font-12" type="info" size="small" onClick={() => { detailItem(record.id) }}>详情</Button>
{admin && record.status == 1 && record.isChecked == 2 && <Button className="mr5 font-12" type="primary" size="small" onClick={() => { setCurrentId(record.id); setVisible(true); }}>审核</Button>}
{(admin || (record.isChecked != 1)) && < Button className="mr5 font-12" type="danger" size="small" onClick={() => { deletItem(record.id) }}>删除</Button>}
</span >
),
},
];
//
if (isChecked == 1) {
columns.splice(3, 0, {
title: '发布时间',
key: 'publishDate',
dataIndex: 'publishDate',
});
columns.splice(4, 0, {
title: '密文浏览数',
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>;
}
});
}
function detailItem(id) {
history.push(`/managements/notice/detail/${id}`);
}
//
function checkItem() {
checkNotice({
id: currentId,
isChecked: currentIsChecked,
}).then(res => {
if (res && res.code == '1') {
ShowNotification("操作成功");
setVisible(false);
setReload(reload + 1);
} else {
ShowNotification(res.message || "操作失败");
}
})
}
function editItem(id) {
history.push(`/managements/notice/edit/${id}`);
}
function deletItem(id) {
DelModal(() => {
deleteNotice(id).then(res => {
if (res.message === 'success') {
ShowNotification("删除成功");
if (dataList.length == 1 && curPage > 1) {
setCurPage(curPage - 1);
} else {
setReload(reload + 1);
}
} else {
ShowNotification("删除失败");
}
})
}, '此操作将删除该记录, 是否继续?');
}
function handleSearch() {
validateFields((error, values) => {
console.log(values);
if (!error) {
setType(values.type || "");
setTitle(values.title);
}
});
}
const helper = useCallback(
(label, name, rules, widget) => (
<Form.Item label={label} className='searchForm'>
{getFieldDecorator(name, { rules, validateFirst: true, })(widget)}
</Form.Item>
), []);
const formItemLayout = {
labelCol: {
xs: { span: 12 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 12 },
sm: { span: 18 },
},
};
function onShowSizeChange(current, pageSize) {
setCurPage(current);
setPageSize(pageSize);
}
return (
<div className="content">
<Form className="clearfix">
{helper(
"",
"type",
[],
<Select
placeholder="公告类型"
allowClear
showArrow
>
{
noticeType.map(item => {
return <Option key={item.code}>{item.name}</Option>
})
}
</Select>
)}
{helper(
"",
"title",
[{ max: 20, message: '关键字长度不能超过20个字符' }],
<Input
placeholder="输入标题关键字进行搜索"
/>
)}
<Button className="my-search-button" type="primary" onClick={handleSearch}>查询</Button>
</Form>
<div className="table-detail">
<PaginationTable
loading={loading}
dataSource={dataList}
columns={columns}
total={total}
setCurPage={setCurPage}
current={curPage}
onShowSizeChange={onShowSizeChange}
showSizeChanger
/>
{/* <Table
loading={loading}
rowKey={(row) => row.id}
dataSource={dataList}
columns={columns}
pagination={false}
/>
{dataList.length > 0 &&
<Pagination
onChange={(page) => { setCurPage(page) }}
current={curPage}
total={total}
/>} */}
</div>
<Modal
title="公告审核"
visible={visible}
onOk={checkItem}
onCancel={() => { setVisible(false) }}
className="form-edit-modal"
>
<Form {...formItemLayout}>
<Form.Item label={"审核意见:"} >
<Radio.Group defaultValue={currentIsChecked} onChange={(e) => { setCurrentIsChecked(e.target.value) }} >
<Radio className="columsRadio" value={1}>
通过
</Radio>
<Radio className="columsRadio" value={0}>
拒绝
</Radio>
</Radio.Group>
</Form.Item>
</Form>
</Modal>
</div>
);
})
)
export default NoticeList;

View File

@ -0,0 +1,7 @@
.searchForm{
float: left;
min-width: 260px;
margin-right:2em !important;
}

View File

@ -0,0 +1,105 @@
import React, { useCallback, useEffect, useState } from 'react';
import { Button, Descriptions, Pagination, Icon, Table } from 'antd';
import PaginationTable from "../../../components/pagination-table";
import { noticeType, noticeChecked } from '../../common/static';
import { getNoticeDetail, getNoticeReader } from '../api';
import '../index.css';
import './index.scss';
const noticeTypeArr = [];
for (const item of noticeType) {
noticeTypeArr[item.code] = (item.name);
}
const noticeCheckedArr = [];
for (const item of noticeChecked) {
noticeCheckedArr[item.code] = (item.name);
}
const NoticeReader = ({ match, history }) => {
const id = match.params.noticeId;
const [noticeData, setNoticeData] = useState({});
const [loading, setLoading] = useState(false);
const [dataList, setDataList] = useState([]);
const [pageSize, setPageSize] = useState(10);
const [curPage, setCurPage] = useState(1);
const [total, setTotal] = useState(0);
useEffect(() => {
id && getNoticeDetail(id).then(data => {
setNoticeData(data || {});
})
}, [id]);
useEffect(() => {
setLoading(true);
id && getNoticeReader({
currentPage: curPage,
annId: id,
pageSize,
}).then(data => {
setLoading(false);
if (data) {
setDataList(data.rows);
setTotal(data.total);
} else {
setTotal(0);
setDataList([]);
}
})
}, [id, curPage, pageSize]);
const columns = [
{
title: '用户姓名',
key: 'readerName',
dataIndex: 'readerName',
width: '20%',
},
{
title: '公司名称',
key: 'companyName',
dataIndex: 'companyName',
width: '40%',
},
{
title: '联系方式',
key: 'contactInfo',
dataIndex: 'contactInfo',
width: '40%',
},
];
function onShowSizeChange(current, pageSize) {
setCurPage(current);
setPageSize(pageSize);
}
return (
<div className="notice-content">
<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="加密信息被浏览数">{total}</Descriptions.Item>
<Descriptions.Item label="浏览过该公告加密内容的用户信息"></Descriptions.Item>
</Descriptions>
<div className="table-detail">
<PaginationTable
loading={loading}
dataSource={dataList}
columns={columns}
total={total}
setCurPage={setCurPage}
current={curPage}
onShowSizeChange={onShowSizeChange}
showSizeChanger
/>
</div>
</div>
)
}
export default NoticeReader;

View File

@ -0,0 +1,25 @@
.itemContent {
padding: 10px 10px 0 30px;
}
.statusColor{
color: #1890ff;
}
.alignTop{
display: flex;
align-items: flex-start;
}
.backList{
margin-right:1em;
&:hover{
color: #1890ff;
}
}
:global{
.ant-descriptions-item-label{
min-width: 5em;
}
.ant-table-row-cell-break-word{
word-break: break-all;
}
}

View File

@ -115,6 +115,11 @@ const NoticeManage = Loadable({
loader: () => import("./notice"),
loading: Loading,
});
// 成果库管理
const Achievement = Loadable({
loader: () => import("./achievement"),
loading: Loading,
});
// 权限管理
// 非普通用户(管理员)列表
@ -321,6 +326,14 @@ const Managements = (propsF) => {
)}
></Route>
{/* 成果库管理 */}
<Route
path="/managements/notice"
render={(props) => (
<Achievement {...propsF} {...props} />
)}
></Route>
{/* 定制竞赛配置详情 */}
<Route
path="/managements/competition/customize/edit/:id"

View File

@ -0,0 +1,49 @@
import fetch from './fetch';
import { notification } from 'antd';
// 公告列表查询
export async function getNoticeList(params) {
let res = await fetch({
url: '/api/announcements/',
method: 'get',
params,
});
if (res.message === 'success') {
return res.data;
} else {
notification.open({
message: "提示",
description: res.message || '请求错误',
});
}
}
// 公告详情查询
export async function getNoticeDetail(id) {
let res = await fetch({
url: '/api/announcements/' + id,
method: 'get',
params:{flag:1}
});
if (res.data) {
return res.data;
} else {
notification.open({
message: "提示",
description: res.message || '请求错误',
});
}
}
//新增加密公告申请人
export function addReader(data) {
return fetch({
url: '/api/request_contact_reader_info/',
method: 'post',
data: data
});
}

View File

@ -0,0 +1,23 @@
import React from 'react';
import { NewSvg } from '../../svg';
import './index.scss';
export default (props) => {
const { list, itemClick, } = props;
return (
list.map(item => {
return (
<div className="list-box" key={item.id}>
<div className="list-title" onClick={() => { itemClick(item.id) }}>
{item.achievementName || item.title} {item.new && <NewSvg color="#ffb300"/>}
</div>
<div className="list-other">
{item.publisher && <p>发布单位{item.publisher}</p>}
<p>发布时间{(item.publishDate && item.publishDate.split(' ')[0]) || (item.createTime && item.createTime.split(' ')[0])}</p>
<p><i className="iconfont icon-dianjiliang mr5 font-12" />{item.visits || 0}</p>
</div>
</div>
)
})
)
}

View File

@ -0,0 +1,47 @@
.list-box {
position: relative;
padding: 17px 20px;
background: #fff;
border-bottom: 1px dashed #dedede;
}
.list-title {
font-size: 1rem;
color: #000;
cursor: pointer;
display: flex;
align-items: center;
svg {
margin-left: 0.5rem;
}
}
.list-title:hover {
color: #4154f1;
}
.list-title span {
padding: 3px 5px;
margin-left: 0.5em;
background: #f8c753;
font-size: 13px;
color: #fff;
border-radius: 3px;
}
.list-other {
margin-top: 0.5rem;
display: flex;
align-items: center;
& > p {
display: inline-block;
font-size: 0.875rem;
color: #666;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
p:first-child{
width: 50%;
}
p:nth-child(2){
width: 40%;
}
}

View File

@ -0,0 +1,10 @@
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';
const service = javaFetch(actionUrl);
export const httpUrl = actionUrl;
export default service;

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@ -0,0 +1,172 @@
import React, { useEffect, useState, useCallback } from 'react';
import { Button, Icon, Form, Modal, Input } from 'antd';
import { Link } from "react-router-dom";
import { getNoticeDetail, addReader } from '../api';
import { noticeType } from '../static';
import './index.scss';
const noticeTypeArr = [];
for (const item of noticeType) {
noticeTypeArr[item.code] = item.name;
}
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];
}
setNoticeData(data || {});
})
}, [id, reload]);
// form
const helper = useCallback(
(label, name, rules, widget) => (
<Form.Item label={label}>
{getFieldDecorator(name, { rules, validateFirst: true ,getValueFromEvent: e=>e.target.value.replace(/(^\s*)|(\s*$)/g, "") })(widget)}
</Form.Item>
),
[]
);
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 (
<div className="centerbox notice-detail">
<div className="head-navigation">
<Link to="/">首页<span className="greater">&nbsp;&gt;&nbsp;</span></Link>
<Link to="/notice">公告<span className="greater">&nbsp;&gt;&nbsp;</span></Link>
<span>公告详情</span>
</div>
<div className="center-content">
{/* <div className="notice-center-content"> */}
<div className="notice-title">
{noticeData.title}
</div>
<div className="notice-detail-content">
<div className="center-author">
<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={4}>浏览{noticeData.visits || 0}</p>
</div>
<div className="content-text">
<div className="notice-content-title"><Icon type="caret-right" />公告主要内容</div>
<div className="editor-w-text" dangerouslySetInnerHTML={{ __html: noticeData.text }}>
</div>
</div>
{
noticeData.contactInfo ? <React.Fragment>
<div className="notice-content-title"><Icon type="caret-right" />联系方式</div>
<div className="content-secret" dangerouslySetInnerHTML={{ __html: noticeData.contactInfo && noticeData.contactInfo.replace(/\n/g, '</br>') }}>
</div>
{
noticeData.blockedView && <Button type="primary" onClick={() => { setVisible(true) }}>申请查看加密内容</Button>
}
</React.Fragment> : ''
}
{
noticeData.fileDownloadPath &&
<React.Fragment>
<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}
</span>
<span className="link" onClick={() => { window.open(noticeData.fileDownloadPath) }}>下载</span>
</p>
</React.Fragment>
}
</div>
</div>
<Modal
title="提交信息"
visible={visible}
onOk={pushInfo}
onCancel={() => { setVisible(false) }}
className="form-edit-modal"
>
{
helper('用户姓名',
'readerName',
[{ required: true, message: "请输入用户姓名" }, { max: 50, message: '不能超过50字符' }],
<Input
placeholder="请输入用户姓名"
/>
)
}
{
helper('公司名称',
'companyName',
[{ required: true, message: "请输入公司名称" }, { max: 100, message: '不能超过100字符' }],
<Input
placeholder="请输入公司名称"
/>
)
}
{
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('请输入正确的手机号码!');
}
}}],
<Input
placeholder="请输入联系方式"
/>
)
}
</Modal>
</div>
)
}
)

View File

@ -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;
}
}

View File

@ -0,0 +1,267 @@
import React, { useEffect, useState } from 'react';
import classNames from 'classnames';
import { Pagination, Icon, Input, Affix, } from 'antd';
import ItemList from '../components/itemList';
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: 1,
title,
flag: 1, //21
};
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);
});
getNoticeList({ ...params, type: 3 }).then(data => {
setAbandonList(data.rows);
setLoading(false);
});
getNoticeList({ ...params, type: 5 }).then(data => {
setTechnologyList(data.rows);
});
getNoticeList({ ...params, type: 6 }).then(data => {
setDealList(data.rows);
setLoading(false);
});
} else {
const params = {
orderBy,
curPage,
isChecked: 1,
pageSize: 10,
status: 1,
title,
type: tab,
flag: 1, //21
};
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 <div className="notice-sort-nav">
<Search
size="large"
maxLength={20}
style={{ width: "56%" }}
placeholder="输入标题关键字不能超过20字符"
enterButton={<span><Icon type="search" className="mr5" /> 搜索</span>}
onSearch={(value) => setTitle(value)} />
<div className="center-right-but">
<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>
</div>
}
function handleClick(e) {
setTab(e.key);
setCurPage(1);
setTitle('');
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 <React.Fragment>
<div className="item-head-title">
<div className="item-head-title-content">
<i className={svgStr}></i>
<span>{titleStr}</span>
</div>
{param.length === 5 && <span className="link" onClick={() => { handleClick({ key: key }) }}>查看更多 <Icon type="arrow-right" /></span>}
</div>
{param.length > 0 ? <ItemList
list={param}
itemClick={noticeClick}
/> : <Nodata _html="暂无数据" />}
{/* <ItemList
list={param}
itemClick={noticeClick}
/> */}
</React.Fragment>
}
function content() {
if (tab === '0') {
if(callList.length === 0 && changeList.length === 0 && checkList.length === 0 && abandonList.length === 0){
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")}
</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 {
let titleStr;
let svgStr;
switch (tab) {
case '1':
titleStr = "更正公告";
svgStr = "iconfont icon-gengzhenggonggao"
break;
case '2':
titleStr = "中标公告";
svgStr = "iconfont icon-zhongbiaogonggao"
break;
case '3':
titleStr = "废标公告";
svgStr = "iconfont icon-feibiaogonggao"
break;
case '4':
titleStr = "招标公告";
svgStr = "iconfont icon-zhaobiaogonggao"
break;
case '5':
titleStr = "技术资产";
svgStr = "iconfont icon-jishuzichan"
break;
default:
titleStr = "成交公告";
svgStr = "iconfont icon-chengjiaogonggao"
}
return <React.Fragment>
<div className="item-head-title">
<div className="item-head-title-content">
<i className={svgStr}></i>
<span>{titleStr}</span>
</div>
</div>
<ItemList
list={noticeList}
itemClick={noticeClick}
/>
{/* {noticeList.length === 10 && <div className="edu-txt-center mt30 mb30">
<Pagination
showQuickJumper
onChange={(page) => { setCurPage(page) }}
current={curPage}
total={total}
showTotal={total => `${total}`}
/>
</div>} */}
{total > 0 ? total> 10 ? <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>
}
}
return (
<React.Fragment>
<img alt="图片加载失败" src={noticePng} width="100%"></img>
<div className="centerbox notice-list clearfix">
{/* <div className="head-navigation">
<Link to="/">首页<span className="greater">&nbsp;&gt;&nbsp;</span></Link>
<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>
</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>
</div>
</Affix>
<div className="notice-center-content">
{sortNav()}
{loading ? <Loading /> : content()}
</div>
</div>
</div>
</React.Fragment>
)
}

View File

@ -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
}
}

View File

@ -0,0 +1,22 @@
// 公告开始
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: "废标" },
{ code: 4, name: "招标公告", dicItemName: "招标" },
{ code: 5, name: "技术资产", dicItemName: "技术" },
{ code: 6, name: "成交公告", dicItemName: "成交" },
];
export const noticeChecked = [
{ code: 0, name: "未通过", dicItemName: "未通过" },
{ code: 1, name: "通过", dicItemName: "通过" },
{ code: 2, name: "未处理", dicItemName: "未处理" },
];
//公告结束

View File

@ -0,0 +1,73 @@
import React from 'react';
export function AbandonSvg({ color }) {
return <svg width="16" height="15.198" viewBox="0 0 16 15.198">
<g id="组_96" data-name="组 96" transform="translate(-54.703 -1778.755)">
<g id="组_87" data-name="组 87" transform="translate(63.014 1786.264)">
<path id="路径_334" data-name="路径 334" d="M365.033,2110.025H361.89a.591.591,0,1,1,0-1.183h3.143a.591.591,0,1,1,0,1.183Z" transform="translate(-359.618 -2105.589)" fill={color} />
<path id="路径_335" data-name="路径 335" d="M316.429,2010.462a3.844,3.844,0,1,0,1.126,2.718A3.819,3.819,0,0,0,316.429,2010.462Zm-.739,4.7a2.8,2.8,0,1,1,0-3.959A2.79,2.79,0,0,1,315.69,2015.16Z" transform="translate(-309.866 -2009.336)" fill={color} />
</g>
<g id="组_88" data-name="组 88" transform="translate(54.703 1778.755)">
<path id="路径_336" data-name="路径 336" d="M61.441,1790.478a5.6,5.6,0,0,1,5.545-5.651,5.476,5.476,0,0,1,1.02.1v-4.368a1.808,1.808,0,0,0-1.8-1.8H56.507a1.808,1.808,0,0,0-1.8,1.8v11.02a1.808,1.808,0,0,0,1.8,1.8h5.718A5.705,5.705,0,0,1,61.441,1790.478Zm-4.155-8.229a.7.7,0,0,1,.728-.666h6.692a.7.7,0,0,1,.728.666h0a.7.7,0,0,1-.728.666H58.014a.7.7,0,0,1-.728-.666Zm3.077,7.351h-2.5a.673.673,0,0,1,0-1.332h2.5a.673.673,0,0,1,0,1.332Zm-2.349-3.44a.7.7,0,0,1-.728-.666h0a.7.7,0,0,1,.728-.666h3.18a.7.7,0,0,1,.728.666h0a.7.7,0,0,1-.728.666Z" transform="translate(-54.703 -1778.755)" fill={color} />
</g>
</g>
</svg>
}
export function AllSvg({ color }) {
return <svg width="16" height="15.198" viewBox="0 0 16 15.198">
<g id="组_93" data-name="组 93" transform="translate(696.223 -1778.755)">
<path id="路径_337" data-name="路径 337" d="M-365.778,2071.537l-1.4.948h-.467a.313.313,0,0,0-.311.315v1.263a.314.314,0,0,0,.311.316h.467l1.4.947a.315.315,0,0,0,.221-.094.314.314,0,0,0,.09-.222v-3.157A.314.314,0,0,0-365.778,2071.537Z" transform="translate(-317.611 -283.396)" fill={color} />
<g id="组_90" data-name="组 90" transform="translate(-688.125 1786.051)">
<path id="路径_338" data-name="路径 338" d="M-434.315,2010.493a3.925,3.925,0,0,0-2.794-1.157,3.925,3.925,0,0,0-2.794,1.157,3.925,3.925,0,0,0-1.157,2.794,3.925,3.925,0,0,0,1.157,2.794,3.926,3.926,0,0,0,2.794,1.157,3.926,3.926,0,0,0,2.794-1.157,3.925,3.925,0,0,0,1.157-2.794A3.925,3.925,0,0,0-434.315,2010.493Zm-.76,4.828a2.867,2.867,0,0,1-2.034.841,2.868,2.868,0,0,1-2.034-.841,2.858,2.858,0,0,1-.843-2.034,2.858,2.858,0,0,1,.843-2.034,2.858,2.858,0,0,1,2.034-.843,2.858,2.858,0,0,1,2.034.843A2.88,2.88,0,0,1-435.075,2015.321Z" transform="translate(441.06 -2009.336)" fill={color} />
</g>
<g id="组_91" data-name="组 91" transform="translate(-696.223 1778.755)">
<path id="路径_339" data-name="路径 339" d="M-689.3,1790.466a5.672,5.672,0,0,1,5.7-5.645,5.79,5.79,0,0,1,1.048.1v-4.363a1.832,1.832,0,0,0-1.854-1.8h-9.964a1.832,1.832,0,0,0-1.854,1.8v11.008a1.833,1.833,0,0,0,1.854,1.8h5.877A5.577,5.577,0,0,1-689.3,1790.466Zm-4.27-8.22a.712.712,0,0,1,.748-.665h6.878a.713.713,0,0,1,.748.665h0a.713.713,0,0,1-.748.665h-6.878a.713.713,0,0,1-.748-.665Zm3.163,7.343h-2.573a.633.633,0,0,1-.589-.665.633.633,0,0,1,.589-.665h2.573a.633.633,0,0,1,.589.665A.632.632,0,0,1-690.406,1789.588Zm-2.414-3.437a.713.713,0,0,1-.748-.665h0a.713.713,0,0,1,.748-.665h3.268a.713.713,0,0,1,.748.665h0a.713.713,0,0,1-.748.665Z" transform="translate(696.223 -1778.755)" fill={color} />
</g>
</g>
</svg>
}
export function ChangeSvg({ color }) {
return <svg width="16" height="15.176" viewBox="0 0 16 15.176">
<g id="组_94" data-name="组 94" transform="translate(-703.372 -1778.755)">
<path id="路径_331" data-name="路径 331" d="M1034.307,2069.547a1.2,1.2,0,0,0-1.2.934,1.17,1.17,0,0,0,.707,1.326c.044.219.063.475-.073.573a1.129,1.129,0,0,0-.885.486v.422h2.865v-.393a1.414,1.414,0,0,0-.949-.523.751.751,0,0,1-.032-.554,1.172,1.172,0,0,0,.739-1.309,1.2,1.2,0,0,0-1.175-.961Z" transform="translate(-318.75 -281.318)" fill={color} />
<path id="路径_332" data-name="路径 332" d="M965.772,2010.458a3.832,3.832,0,1,0,1.122,2.709A3.807,3.807,0,0,0,965.772,2010.458Zm-.737,4.682a2.79,2.79,0,1,1,0-3.946A2.781,2.781,0,0,1,965.035,2015.141Z" transform="translate(-247.522 -223.068)" fill={color} />
<g id="组_85" data-name="组 85" transform="translate(703.372 1778.755)">
<path id="路径_333" data-name="路径 333" d="M710.088,1790.463a5.586,5.586,0,0,1,5.527-5.643,5.441,5.441,0,0,1,1.017.1v-4.362a1.8,1.8,0,0,0-1.8-1.8H705.17a1.8,1.8,0,0,0-1.8,1.8v11.005a1.8,1.8,0,0,0,1.8,1.8h5.7A5.705,5.705,0,0,1,710.088,1790.463Zm-4.141-8.218a.7.7,0,0,1,.726-.665h6.67a.7.7,0,0,1,.726.665h0a.7.7,0,0,1-.726.665h-6.67a.7.7,0,0,1-.726-.665Zm3.067,7.341h-2.5a.673.673,0,0,1,0-1.33h2.5a.673.673,0,0,1,0,1.33Zm-2.341-3.436a.7.7,0,0,1-.726-.665h0a.7.7,0,0,1,.726-.665h3.169a.7.7,0,0,1,.726.665h0a.7.7,0,0,1-.726.665Z" transform="translate(-703.372 -1778.755)" fill={color} />
</g>
</g>
</svg>
}
export function CheckSvg({ color }) {
return <svg width="16" height="14.548" viewBox="0 0 16 14.548">
<g id="组_95" data-name="组 95" transform="translate(-1325.073 -1778.755)">
<path id="路径_325" data-name="路径 325" d="M1655.311,1844.214" transform="translate(-319.943 -63.419)" fill={color} />
<path id="路径_326" data-name="路径 326" d="M1680.948,2109.083a.659.659,0,1,0-.407.609.659.659,0,0,0,.407-.609Z" transform="translate(-343.504 -319.392)" fill={color} />
<g id="组_82" data-name="组 82" transform="translate(1333.053 1785.974)">
<path id="路径_327" data-name="路径 327" d="M1587.227,2013.456a2.664,2.664,0,1,1-1.177-1.812l.058-.378.585-.39a3.665,3.665,0,1,0,1.565,3,3.7,3.7,0,0,0-.064-.686l-.541.361Z" transform="translate(-1580.931 -2010.216)" fill={color} />
<path id="路径_328" data-name="路径 328" d="M1645.528,2074.812a1.261,1.261,0,1,1-.58-2.115l.479-.319a1.734,1.734,0,1,0,.941,1.542c0-.008,0-.016,0-.023l-.514.349A1.254,1.254,0,0,1,1645.528,2074.812Z" transform="translate(-1640.971 -2070.255)" fill={color} />
</g>
<g id="组_83" data-name="组 83" transform="translate(1337.198 1786.341)">
<path id="路径_329" data-name="路径 329" d="M1717.735,2023.462h-.009l-.741-.124h0a.373.373,0,0,1-.271-.406v0l.186-.693,0-.01a.092.092,0,0,0-.05-.125l-.01,0-.009-.006a.132.132,0,0,0-.074-.023.134.134,0,0,0-.075.023l-1.335.89-.133.628-1.246.831.005,0a1.024,1.024,0,0,1,.608.916l1.238-.84.628.121,1.34-.893.005,0c.04-.02.049-.053.05-.148C1717.805,2023.516,1717.773,2023.462,1717.735,2023.462Z" transform="translate(-1713.97 -2022.066)" fill={color} />
</g>
<path id="路径_330" data-name="路径 330" d="M1331.495,1789.957a5.343,5.343,0,0,1,5.285-5.4,5.206,5.206,0,0,1,.972.091v-4.174a1.725,1.725,0,0,0-1.719-1.72h-9.24a1.725,1.725,0,0,0-1.719,1.72v10.53a1.725,1.725,0,0,0,1.719,1.72h5.45A5.462,5.462,0,0,1,1331.495,1789.957Zm-3.96-7.863a.669.669,0,0,1,.694-.636h6.378a.669.669,0,0,1,.694.636h0a.669.669,0,0,1-.694.636h-6.378a.669.669,0,0,1-.694-.636Zm2.933,7.024h-2.386a.644.644,0,0,1,0-1.272h2.386a.644.644,0,0,1,0,1.272Zm-2.239-3.287a.669.669,0,0,1-.694-.636h0a.669.669,0,0,1,.694-.636h3.031a.669.669,0,0,1,.694.636h0a.669.669,0,0,1-.694.636Z" transform="translate(0 0)" fill={color} />
</g>
</svg>
}
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={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>
}