里程碑详情及编辑页附件显示

This commit is contained in:
向明星 2024-08-08 11:43:48 +08:00
parent 70348f8355
commit b72889fa0e
3 changed files with 29 additions and 3 deletions

View File

@ -197,7 +197,7 @@ class Milepost extends Component {
</div>
<div className="target-detail-search" style={{marginBottom:20}}>
<Search
placeholder="输入关键字搜索疑修"
placeholder="输入关键字搜索里程碑"
enterButton
onSearch={this.searchFunc}
style={{ width: 300 }}

View File

@ -4,6 +4,8 @@ import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
import './order.css';
import { FlexAJ } from '../Component/layout';
import CheckProfile from '../Component/ProfileModal/Profile';
import Attachments from "../Upload/attachment";
import RenderHtml from "../../components/render-html";
import NoneData from '../Nodata';
import OrderItem from './OrderItem';
@ -34,6 +36,7 @@ class MilepostDetail extends Component {
author_id: undefined,
status_id: undefined,
assigned_to_id: undefined,
fileList: undefined,
limit: 15,
page: 1,
search_count: undefined,
@ -180,6 +183,9 @@ class MilepostDetail extends Component {
this.getIssueList(1,id,e.key);
}
}
commentCtx = (v) => {
return <RenderHtml className="break_word_comments imageLayerParent" value={v} url={this.props.history.location} />;
};
renderMenu = (array, name, id) => {
return (
@ -274,7 +280,23 @@ class MilepostDetail extends Component {
</div>
</FlexAJ>
</div>
<div className="pd20">
<div className="detail_p" style={{maxHeight:100,overflowY:'auto'}}>
{data && data.description && data.description.length > 0 ? (
this.commentCtx(data.description)
) : (
<span className="color-grey-9 ml3 mr3">暂无描述</span>
)}
</div>
{data && data.attachments && data.attachments.length > 0 ? (
<Attachments
attachments={data.attachments}
showNotification={this.props.showNotification}
/>
) : (
""
)}
</div>
<Spin spinning={isSpin}>
<div className="pl20 pr20">
<div className="f-wrap-between pt15 pb15 bor-bottom-greyE">

View File

@ -19,6 +19,7 @@ class UpdateMilepost extends Component {
selectedValue: moment('2020-2-12'),
isSpin: false,
get_attachments: undefined,
fileList: undefined,
}
}
@ -59,11 +60,13 @@ class UpdateMilepost extends Component {
data: result.data,
selectedValue: result.data.effective_date && moment(result.data.effective_date),
get_attachments: result.data.attachments,
fileList: undefined,
})
this.props.form.setFieldsValue({
name: result.data.name,
description: result.data.description,
get_attachments: result.data.attachments,
fileList: undefined,
});
}
@ -77,7 +80,7 @@ class UpdateMilepost extends Component {
this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) {
const { projectsId , owner } = this.props.match.params;
const { meilid } = this.props.match.params;
const { meilid,fileList } = this.props.match.params;
const url = `/${owner}/${projectsId}/milestones/${meilid}.json`;
let time = this.state.selectedValue && this.state.selectedValue.format("YYYY-MM-DD");
@ -87,6 +90,7 @@ class UpdateMilepost extends Component {
project_id: projectsId,
id: meilid,
effective_date: time,
attachment_ids: fileList,
status: 'open'
}).then(result => {
if (result) {