增加项目title、个人tittle,修改成果导出、成果列表
This commit is contained in:
parent
bfab7c2c68
commit
35dfab775d
|
@ -395,6 +395,7 @@ class Detail extends Component {
|
|||
forked_count: result.data.forked_count,
|
||||
defaultBranch: result.data.default_branch
|
||||
})
|
||||
document.title = `${result.data.author.name}/${result.data.name}${result.data.description?':'+result.data.description:''}`;
|
||||
}
|
||||
}).catch((error) => { })
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ class Infos extends Component {
|
|||
isSpin: false,
|
||||
undo_events:e
|
||||
});
|
||||
document.title = result.data.username+'('+ username +')';
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.notice-form .edit-input{
|
||||
max-width:450px;
|
||||
}
|
||||
|
||||
|
||||
.my-search-button{
|
||||
margin-top:4px;
|
||||
|
|
|
@ -287,7 +287,7 @@ const NoticeEdit = Form.create()(({ form, match, history, showNotification }) =>
|
|||
"成果名称:",
|
||||
"title",
|
||||
[{ required: true, message: "请输入成果名称" },
|
||||
{ max: 50, message: '长度不能超过50个字符' }],
|
||||
{ max: 255, message: '长度不能超过255个字符' }],
|
||||
<Input
|
||||
className="edit-input"
|
||||
placeholder="请输入成果名称"
|
||||
|
@ -301,7 +301,7 @@ const NoticeEdit = Form.create()(({ form, match, history, showNotification }) =>
|
|||
"发布单位:",
|
||||
"publisher",
|
||||
[{ required: true, message: "请输入发布单位" },
|
||||
{ max: 50, message: '长度不能超过50个字符' }],
|
||||
{ max: 255, message: '长度不能超过255个字符' }],
|
||||
<Input
|
||||
className="edit-input"
|
||||
placeholder="请输入发布单位"
|
||||
|
@ -311,9 +311,9 @@ const NoticeEdit = Form.create()(({ form, match, history, showNotification }) =>
|
|||
{helper(
|
||||
"联系人:",
|
||||
"achievementIntro",
|
||||
[{ max: 50, message: '长度不能超过50个字符' }],
|
||||
<TextArea
|
||||
rows={4}
|
||||
[{ max: 255, message: '长度不能超过255个字符' }],
|
||||
<Input
|
||||
className="edit-input"
|
||||
placeholder="请输入联系人"
|
||||
/>
|
||||
)}
|
||||
|
@ -323,8 +323,8 @@ const NoticeEdit = Form.create()(({ form, match, history, showNotification }) =>
|
|||
"联系方式:",
|
||||
"contactInfo",
|
||||
[{ max: 5000, message: '长度不能超过5000个字符' }],
|
||||
<Input
|
||||
className="edit-input"
|
||||
<TextArea
|
||||
rows={4}
|
||||
placeholder="请输入联系方式"
|
||||
/>
|
||||
)}
|
||||
|
@ -343,7 +343,7 @@ const NoticeEdit = Form.create()(({ form, match, history, showNotification }) =>
|
|||
className="commentStyle"
|
||||
load={UploadFunc}
|
||||
size={100}
|
||||
ShowNotification={ShowNotification}
|
||||
showNotification={ShowNotification}
|
||||
actionUrl={actionUrl}
|
||||
fileList={fileList}
|
||||
number={1}
|
||||
|
|
|
@ -120,7 +120,13 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
|
||||
|
||||
const columns = [
|
||||
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: "index",
|
||||
render: (text, record, index) => {
|
||||
return index + 1 + (curPage - 1) * pageSize
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '成果来源',
|
||||
key: 'achievementSource',
|
||||
|
@ -149,7 +155,6 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
key: 'publisher',
|
||||
width: '20%'
|
||||
},
|
||||
|
||||
{
|
||||
title: '创建时间',
|
||||
key: 'createdAt',
|
||||
|
@ -161,7 +166,7 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
render: (text, record) => (
|
||||
<span>
|
||||
{record.status == 2 && <Button className="mr5 font-12" type="primary" size="small" onClick={() => { editItem(record.id) }}>修改</Button>}
|
||||
<Link className="mr10 mb5 font-12" size="small" to={`/managements/achievement/detail/${record.id}`}>详情</Link>
|
||||
<Link className="mr10 mb5 font-12" size="small" to={`/managements/achievement/detail/${record.id}`}>详情</Link>
|
||||
{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 >
|
||||
|
@ -181,51 +186,101 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
|
|||
key: 'requestViewCount',
|
||||
dataIndex: 'requestViewCount',
|
||||
render: (text, record) => {
|
||||
return <span className={`${text > 0 ? 'link' : ''}`} onClick={() => { text > 0 && history.push(`/managements/achievement/detail/${record.id}`) }}>{text}</span>;
|
||||
return <span className={`${text > 0 ? 'link' : ''}`} onClick={() => { text > 0 && history.push(`/managements/achievement/reader/${record.id}`) }}>{text}</span>;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let exportColumn = [...columns];
|
||||
exportColumn.splice(4, 0, {
|
||||
title: '成果描述',
|
||||
key: 'text',
|
||||
dataIndex: 'text',
|
||||
render: (text, record) => {
|
||||
return <div className="editor-w-text" dangerouslySetInnerHTML={{ __html: text && text.replace(/\n/g, '</br>') }}></div>
|
||||
let exportColumn = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: "index",
|
||||
render: (text, record, index) => {
|
||||
return index + 1 + (curPage - 1) * pageSize
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '成果来源',
|
||||
key: 'achievementSource',
|
||||
dataIndex: 'achievementSource',
|
||||
render: (text, record) => {
|
||||
return achieveSourceArr[text];
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '成果类型',
|
||||
key: 'achievementCategory',
|
||||
dataIndex: 'achievementCategory',
|
||||
render: (text, record) => {
|
||||
return achieveTypeArr[text];
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '成果名称',
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
width: '20%'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
key: 'createdAt',
|
||||
dataIndex: 'createdAt',
|
||||
},
|
||||
{
|
||||
title: '成果描述',
|
||||
key: 'text',
|
||||
dataIndex: 'text',
|
||||
render: (text, record) => {
|
||||
return <div className="editor-w-text" dangerouslySetInnerHTML={{ __html: text && text.replace(/\n/g, '</br>') }}></div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '发布单位',
|
||||
dataIndex: 'publisher',
|
||||
key: 'publisher',
|
||||
width: '20%'
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
dataIndex: 'achievementIntro',
|
||||
key: 'achievementIntro',
|
||||
}, {
|
||||
title: '联系方式',
|
||||
dataIndex: 'contactInfo',
|
||||
key: 'contactInfo',
|
||||
}, {
|
||||
title: '联系方式是否加密',
|
||||
dataIndex: 'isSecret',
|
||||
key: 'isSecret',
|
||||
render: (text, record) => {
|
||||
return text ? '加密' : "不加密"
|
||||
}
|
||||
}, {
|
||||
title: '可见性',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
render: (text, record) => {
|
||||
return text === 1 ? '已发布' : "草稿"
|
||||
}
|
||||
}, {
|
||||
title: '附件路径',
|
||||
dataIndex: 'fileDownloadPath',
|
||||
key: 'fileDownloadPath',
|
||||
render: (text) => {
|
||||
return <Fragment><a href={text} target="_blank">{text}</a></Fragment>
|
||||
}
|
||||
}
|
||||
});
|
||||
];
|
||||
|
||||
|
||||
if (isChecked == 1) {
|
||||
exportColumn.splice(3, 1, {
|
||||
title: '发布时间',
|
||||
key: 'publishDate',
|
||||
dataIndex: 'publishDate',
|
||||
});
|
||||
}
|
||||
|
||||
exportColumn.splice(exportColumn.length - 3, 3, {
|
||||
title: '联系人',
|
||||
dataIndex: 'achievementIntro',
|
||||
key: 'achievementIntro',
|
||||
}, {
|
||||
title: '联系方式',
|
||||
dataIndex: 'contactInfo',
|
||||
key: 'contactInfo',
|
||||
}, {
|
||||
title: '联系方式是否加密',
|
||||
dataIndex: 'isSecret',
|
||||
key: 'isSecret',
|
||||
render: (text, record) => {
|
||||
return text ? '加密' : "不加密"
|
||||
}
|
||||
}, {
|
||||
title: '可见性',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
render: (text, record) => {
|
||||
return text === 1 ? '已发布' : "草稿"
|
||||
}
|
||||
}, {
|
||||
title: '附件路径',
|
||||
dataIndex: 'fileDownloadPath',
|
||||
key: 'fileDownloadPath',
|
||||
render:(text)=>{
|
||||
return <Fragment><a href={text} target="_blank">{text}</a></Fragment>
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue