增加项目title、个人tittle,修改成果导出、成果列表

This commit is contained in:
何童崇 2022-12-20 15:45:03 +08:00
parent bfab7c2c68
commit 35dfab775d
6 changed files with 108 additions and 54 deletions

View File

@ -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) => { })
}

View File

@ -136,6 +136,7 @@ class Infos extends Component {
isSpin: false,
undo_events:e
});
document.title = result.data.username+'('+ username +')';
})
.catch((error) => {
this.setState({

View File

@ -12,9 +12,7 @@
border-bottom: 1px solid #e5e5e5;
}
.notice-form .edit-input{
max-width:450px;
}
.my-search-button{
margin-top:4px;

View File

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

View File

@ -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',
@ -181,22 +186,61 @@ 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, {
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>
}
});
exportColumn.splice(exportColumn.length - 3, 3, {
},
{
title: '发布单位',
dataIndex: 'publisher',
key: 'publisher',
width: '20%'
},
{
title: '联系人',
dataIndex: 'achievementIntro',
key: 'achievementIntro',
@ -225,7 +269,18 @@ const NoticeList = Form.create()(forwardRef(({ form, match, history, current_use
render: (text) => {
return <Fragment><a href={text} target="_blank">{text}</a></Fragment>
}
})
}
];
if (isChecked == 1) {
exportColumn.splice(3, 1, {
title: '发布时间',
key: 'publishDate',
dataIndex: 'publishDate',
});
}

View File

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