forked from Gitlink/forgeplus-react
Merge branch 'newVersion_forge' into dev_military
This commit is contained in:
commit
ad3fe09cfb
|
@ -12,32 +12,25 @@ function ImageLayer2(props) {
|
||||||
setShowImage(false)
|
setShowImage(false)
|
||||||
setImageSrc('')
|
setImageSrc('')
|
||||||
}
|
}
|
||||||
const onDelegateClick = (event) => {
|
|
||||||
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
|
|
||||||
// 判断imageSrc是否是图片
|
|
||||||
const fileName = event.target.innerHTML.trim()
|
|
||||||
if (isImageExtension((imageSrc && imageSrc.trim())) || isImageExtension(fileName) || event.target.tagName == 'IMG' || (imageSrc && imageSrc.indexOf('base64,')) != -1) {
|
|
||||||
// 非回复里的头像图片; 非emoticons
|
|
||||||
if (imageSrc.indexOf('/images/avatars/User') === -1 &&
|
|
||||||
imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {
|
|
||||||
setShowImage(true)
|
|
||||||
setImageSrc(imageSrc)
|
|
||||||
}
|
|
||||||
event.stopPropagation()
|
|
||||||
event.preventDefault && event.preventDefault()
|
|
||||||
event.originalEvent.preventDefault()
|
|
||||||
// event.originalEvent.stopPropagation()
|
|
||||||
// event.originalEvent.cancelBubble = true
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
$(parentSel)
|
$(parentSel).delegate(childSel, "click", (event) => {
|
||||||
.delegate(childSel, "click", onDelegateClick);
|
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
|
||||||
|
// 判断imageSrc是否是图片
|
||||||
return () => {
|
const fileName = event.target.innerHTML.trim();
|
||||||
$(parentSel).undelegate(childSel, "click", onDelegateClick )
|
|
||||||
}
|
if (isImageExtension((imageSrc && imageSrc.trim())) || isImageExtension(fileName) || event.target.tagName == 'IMG' || (imageSrc && imageSrc.indexOf('base64,')) != -1) {
|
||||||
|
// 非回复里的头像图片; 非emoticons
|
||||||
|
if (imageSrc.indexOf('/images/avatars/User') === -1 &&
|
||||||
|
imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {
|
||||||
|
setShowImage(true)
|
||||||
|
setImageSrc(imageSrc)
|
||||||
|
}
|
||||||
|
event.stopPropagation()
|
||||||
|
event.preventDefault && event.preventDefault()
|
||||||
|
event.originalEvent.preventDefault()
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -31,7 +31,7 @@ class ActivityItem extends Component {
|
||||||
<span className="activity_type">{item.trend_type}</span>
|
<span className="activity_type">{item.trend_type}</span>
|
||||||
</p >
|
</p >
|
||||||
}
|
}
|
||||||
<p className="itemLine mt15">
|
<p className="itemLine mt10">
|
||||||
<Link to={`/users/${item && item.login}`} className="show-user-link">
|
<Link to={`/users/${item && item.login}`} className="show-user-link">
|
||||||
<img alt="" src={getImageUrl(`images/${item.user_avatar}`)} className="createImage" />
|
<img alt="" src={getImageUrl(`images/${item.user_avatar}`)} className="createImage" />
|
||||||
<span className="mr20">{item.user_name}</span>
|
<span className="mr20">{item.user_name}</span>
|
||||||
|
|
|
@ -66,6 +66,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
.activity_list .activity_item:last-child{
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
.prPercent > p{
|
.prPercent > p{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -289,7 +289,7 @@ class CoderRootDirectory extends Component {
|
||||||
<div className="commonBox-info">
|
<div className="commonBox-info">
|
||||||
{readMeContent[0].content ? (
|
{readMeContent[0].content ? (
|
||||||
<RenderHtml
|
<RenderHtml
|
||||||
className="break_word_comments"
|
className="break_word_comments imageLayerParent"
|
||||||
value={readMeContent[0].content}
|
value={readMeContent[0].content}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -136,7 +136,7 @@ class CoderRootFileDetail extends Component {
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.props.showNotification("删除成功!");
|
this.props.showNotification("删除成功!");
|
||||||
this.props.history.push(`/projects/${projectsId}`);
|
this.props.history.push(`/projects/${owner}/${projectsId}`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
@ -246,7 +246,7 @@ class CoderRootFileDetail extends Component {
|
||||||
) : (
|
) : (
|
||||||
md && readOnly ?
|
md && readOnly ?
|
||||||
<div className="files-md">
|
<div className="files-md">
|
||||||
<RenderHtml className="file-md" value={description} />
|
<RenderHtml className="file-md imageLayerParent" value={description} />
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<Meditor
|
<Meditor
|
||||||
|
|
|
@ -2,7 +2,8 @@ import React, { Component } from 'react';
|
||||||
import { Tooltip } from 'antd';
|
import { Tooltip } from 'antd';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import '../css/index.scss'
|
import '../css/index.scss';
|
||||||
|
import Nodata from '../Nodata';
|
||||||
import './list.css';
|
import './list.css';
|
||||||
import img_parise from '../Images/parise.png';
|
import img_parise from '../Images/parise.png';
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ class IndexItem extends Component {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}) : ""
|
}) : <Nodata _html="暂无数据~"></Nodata>
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
<div className="project-list minH-670">
|
<div className="project-list minH-670">
|
||||||
|
|
|
@ -98,9 +98,7 @@ class MergeItem extends Component {
|
||||||
<span className="ml15">
|
<span className="ml15">
|
||||||
<Tag className="pr-branch-tag">
|
<Tag className="pr-branch-tag">
|
||||||
<Link
|
<Link
|
||||||
to={`/projects/${
|
to={`/projects/${owner}/${ item.is_original ? item.fork_project_id : projectsId }/coders?branch=${item.pull_request_head}`}
|
||||||
item.is_original ? item.fork_project_id : projectsId
|
|
||||||
}/coders?branch=${item.pull_request_head}`}
|
|
||||||
className="maxW200px hide-1 ver-middle"
|
className="maxW200px hide-1 ver-middle"
|
||||||
>
|
>
|
||||||
{item.is_original
|
{item.is_original
|
||||||
|
|
|
@ -195,7 +195,7 @@ class MessageCount extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
commentCtx = (v) => {
|
commentCtx = (v) => {
|
||||||
return <RenderHtml className="break_word_comments" value={v} />;
|
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -359,7 +359,7 @@ class MessageCount extends Component {
|
||||||
<Button
|
<Button
|
||||||
type="success"
|
type="success"
|
||||||
ghost
|
ghost
|
||||||
href={`/projects/${owner}/${projectsId}/merge/${mergeId}/UpdateMerge`}
|
onClick={()=>{this.props.history.push(`/projects/${owner}/${projectsId}/pulls/${mergeId}/UpdateMerge`);}}
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -301,9 +301,6 @@ class NewMerge extends Component {
|
||||||
)}
|
)}
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
{/* <div className=" main">
|
|
||||||
<MergeFooter footer_type="new" {...this.props}></MergeFooter>
|
|
||||||
</div> */}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,7 +273,7 @@ class merge extends Component {
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div className="main">
|
<div className="main">
|
||||||
<div className="topWrapper">
|
<div className="topWrapper" style={{borderBottom:"1px solid #eee"}}>
|
||||||
<div className="target-detail-search">
|
<div className="target-detail-search">
|
||||||
<Search
|
<Search
|
||||||
placeholder="输入关键字搜索合并请求"
|
placeholder="输入关键字搜索合并请求"
|
||||||
|
@ -425,61 +425,6 @@ class merge extends Component {
|
||||||
) : (
|
) : (
|
||||||
<NoneData _html="暂时还没有相关数据哦!" projectsId={projectsId} owner={owner} />
|
<NoneData _html="暂时还没有相关数据哦!" projectsId={projectsId} owner={owner} />
|
||||||
)}
|
)}
|
||||||
{/* <div className="topWrapper" style={{ borderBottom: "none" }}>
|
|
||||||
<p className="topWrapper_type_infos">
|
|
||||||
<li className={status_type === "1" ? "active" : ""} onClick={() => this.openorder("1")}>{data && data.open_count ? data.open_count : 0}个开启中</li>
|
|
||||||
<li className={status_type === "2" ? "active" : ""} onClick={() => this.openorder("2")}>{data && data.close_count ? data.close_count : 0}个已关闭</li>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="topWrapper_select">
|
|
||||||
<div>
|
|
||||||
<Search
|
|
||||||
placeholder="搜索"
|
|
||||||
enterButton
|
|
||||||
onSearch={this.searchFunc}
|
|
||||||
style={{ width: 300 }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<a className="topWrapper_btn ml10" onClick={() => this.islogin()}>创建合并请求</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="f-wrap-between pb20" style={{borderBottom:"1px dashed #ddd"}}>
|
|
||||||
<div></div>
|
|
||||||
<ul className="topWrapper_select">
|
|
||||||
<li>
|
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag, '标签', 'issue_tag_id')} trigger={['click']} placement="bottomCenter">
|
|
||||||
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
|
|
||||||
</Dropdown>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_version, '里程碑', 'fixed_version_id')} trigger={['click']} placement="bottomCenter">
|
|
||||||
<span>{this.state.fixed_version_ids}<Icon type="caret-down" className="ml5" /></span>
|
|
||||||
</Dropdown>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '指派人', 'assigned_to_id')} trigger={['click']} placement="bottomCenter">
|
|
||||||
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
|
|
||||||
</Dropdown>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
|
|
||||||
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
|
|
||||||
</Dropdown>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{
|
|
||||||
data && data.search_count && data.search_count > 0 ?
|
|
||||||
<div>
|
|
||||||
<Spin spinning={isSpin}>
|
|
||||||
<OrderItem issues={issues} search_count={search_count} page={select_params.page} limit={select_params.limit} {...this.props} {...this.state}></OrderItem>
|
|
||||||
{Paginations}
|
|
||||||
</Spin>
|
|
||||||
</div>
|
|
||||||
:
|
|
||||||
<NoneData _html="暂时还没有相关数据哦!" />
|
|
||||||
} */}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,11 +282,9 @@ class MergeForm extends Component {
|
||||||
<Button
|
<Button
|
||||||
type="default"
|
type="default"
|
||||||
className="ml30"
|
className="ml30"
|
||||||
href={
|
onClick={()=>{
|
||||||
merge_type === "new"
|
this.props.history.push(merge_type === "new" ? `/projects/${owner}/${projectsId}/pulls` : `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`)
|
||||||
? `/projects/${owner}/${projectsId}/pulls`
|
}}
|
||||||
: `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<span className="plr10">取消</span>
|
<span className="plr10">取消</span>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -117,18 +117,12 @@ class UserSubmitComponent extends Component {
|
||||||
|
|
||||||
const { current_user, filepath, projectDetail } = this.props;
|
const { current_user, filepath, projectDetail } = this.props;
|
||||||
const { editor_type } = this.props;
|
const { editor_type } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<span className="df mt30" style={{ alignItems: "center" }}>
|
<span className="df mt30" style={{ alignItems: "center" }}>
|
||||||
<Link
|
<Link to={`/users/${current_user && current_user.login}`} className="show-user-link" >
|
||||||
to={`/users/${current_user && current_user.login}`}
|
|
||||||
className="show-user-link"
|
|
||||||
>
|
|
||||||
<img
|
<img
|
||||||
src={getImageUrl(
|
src={getImageUrl(`images/${current_user && current_user.image_url}`)}
|
||||||
`images/${current_user && current_user.image_url}`
|
|
||||||
)}
|
|
||||||
alt=""
|
alt=""
|
||||||
className="screwImg"
|
className="screwImg"
|
||||||
/>
|
/>
|
||||||
|
@ -136,7 +130,6 @@ class UserSubmitComponent extends Component {
|
||||||
{current_user && current_user.username}:
|
{current_user && current_user.username}:
|
||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<span className="color-grey-8">提交变更</span>
|
<span className="color-grey-8">提交变更</span>
|
||||||
</span>
|
</span>
|
||||||
<Spin spinning={isSpin}>
|
<Spin spinning={isSpin}>
|
||||||
|
@ -153,10 +146,8 @@ class UserSubmitComponent extends Component {
|
||||||
})(
|
})(
|
||||||
<div className="setInputAddon">
|
<div className="setInputAddon">
|
||||||
<Input
|
<Input
|
||||||
addonBefore={`/${
|
addonBefore={`/${ projectDetail && projectDetail.identifier }/`}
|
||||||
projectDetail && projectDetail.identifier
|
value={filename || filepath}
|
||||||
}/`}
|
|
||||||
value={filename ? filename : filepath}
|
|
||||||
onChange={this.changeFileName}
|
onChange={this.changeFileName}
|
||||||
placeholder="文件路径..."
|
placeholder="文件路径..."
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -27,7 +27,7 @@ class UploadFile extends Component {
|
||||||
const { pathname } = this.props.location;
|
const { pathname } = this.props.location;
|
||||||
const { filename, editorValue, attachment_clean } = this.state;
|
const { filename, editorValue, attachment_clean } = this.state;
|
||||||
const urlroot = pathname.split("uploadfile/")[1];
|
const urlroot = pathname.split("uploadfile/")[1];
|
||||||
const file_path = !urlroot ? `${filename}` : `${urlroot}/${filename}`;
|
const file_path = !urlroot ? filename : `${urlroot}/${filename}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { getImageUrl } from "educoder";
|
import { getImageUrl } from "educoder";
|
||||||
import { Form , Popconfirm , Tag , Spin } from "antd";
|
import { Form, Popconfirm, Tag, Spin } from "antd";
|
||||||
import Attachments from "../Upload/attachment";
|
import Attachments from "../Upload/attachment";
|
||||||
import RenderHtml from "../../components/render-html";
|
import RenderHtml from "../../components/render-html";
|
||||||
import Comments from "../comments/comments";
|
import Comments from "../comments/comments";
|
||||||
|
@ -44,7 +44,7 @@ class Detail extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
getDetail = () => {
|
getDetail = () => {
|
||||||
const { projectsId, orderId,owner } = this.props.match.params;
|
const { projectsId, orderId, owner } = this.props.match.params;
|
||||||
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;
|
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;
|
||||||
axios
|
axios
|
||||||
.get(url)
|
.get(url)
|
||||||
|
@ -52,7 +52,7 @@ class Detail extends Component {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.setState({
|
this.setState({
|
||||||
data: result.data,
|
data: result.data,
|
||||||
isSpins:false
|
isSpins: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -74,7 +74,7 @@ class Detail extends Component {
|
||||||
|
|
||||||
//删除任务信息
|
//删除任务信息
|
||||||
deletedetail = (id) => {
|
deletedetail = (id) => {
|
||||||
const { projectsId, orderId,owner } = this.props.match.params;
|
const { projectsId, orderId, owner } = this.props.match.params;
|
||||||
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;
|
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;
|
||||||
axios
|
axios
|
||||||
.delete(url, {
|
.delete(url, {
|
||||||
|
@ -85,7 +85,7 @@ class Detail extends Component {
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.props.history.push(`/projects/${projectsId}/issues`);
|
this.props.history.push(`/projects/${owner}/${projectsId}/issues`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
@ -95,7 +95,7 @@ class Detail extends Component {
|
||||||
|
|
||||||
//关闭任务
|
//关闭任务
|
||||||
closedetail = (id) => {
|
closedetail = (id) => {
|
||||||
const { projectsId, orderId , owner } = this.props.match.params;
|
const { projectsId, orderId, owner } = this.props.match.params;
|
||||||
const url = `/${owner}/${projectsId}/issues/${orderId}/close_issue.json`;
|
const url = `/${owner}/${projectsId}/issues/${orderId}/close_issue.json`;
|
||||||
axios
|
axios
|
||||||
.post(url, {
|
.post(url, {
|
||||||
|
@ -122,7 +122,7 @@ class Detail extends Component {
|
||||||
|
|
||||||
//复制
|
//复制
|
||||||
copydetail = () => {
|
copydetail = () => {
|
||||||
const { projectsId, orderId , owner} = this.props.match.params;
|
const { projectsId, orderId, owner } = this.props.match.params;
|
||||||
const url = `/${owner}/${projectsId}/issues/${orderId}/copy.json`;
|
const url = `/${owner}/${projectsId}/issues/${orderId}/copy.json`;
|
||||||
axios
|
axios
|
||||||
.post(url, {
|
.post(url, {
|
||||||
|
@ -182,12 +182,12 @@ class Detail extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
commentCtx = (v) => {
|
commentCtx = (v) => {
|
||||||
return <RenderHtml className="break_word_comments" value={v} />;
|
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { projectsId, orderId , owner } = this.props.match.params;
|
const { projectsId, orderId, owner } = this.props.match.params;
|
||||||
const { data , isSpins } = this.state;
|
const { data, isSpins } = this.state;
|
||||||
const get_color = (type) => {
|
const get_color = (type) => {
|
||||||
if (type === "高") {
|
if (type === "高") {
|
||||||
return "#e67e22";
|
return "#e67e22";
|
||||||
|
@ -276,8 +276,8 @@ class Detail extends Component {
|
||||||
</Link>
|
</Link>
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -286,8 +286,8 @@ class Detail extends Component {
|
||||||
{data && data.description && data.description.length > 0 ? (
|
{data && data.description && data.description.length > 0 ? (
|
||||||
this.commentCtx(data.description)
|
this.commentCtx(data.description)
|
||||||
) : (
|
) : (
|
||||||
<span className="color-grey-9 ml3 mr3">没有描述</span>
|
<span className="color-grey-9 ml3 mr3">暂无描述</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{data && data.attachments && data.attachments.length > 0 ? (
|
{data && data.attachments && data.attachments.length > 0 ? (
|
||||||
<Attachments
|
<Attachments
|
||||||
|
@ -295,8 +295,8 @@ class Detail extends Component {
|
||||||
showNotification={this.props.showNotification}
|
showNotification={this.props.showNotification}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -307,77 +307,66 @@ class Detail extends Component {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="list-left list-left-padding">
|
<div className="list-left list-left-padding">
|
||||||
<div className="list-right-item-padding background-f boder-4">
|
<div className="list-right-item-padding background-f boder-4">
|
||||||
<p className="grid-item-left pb15">
|
<p className="grid-item-left pb15">
|
||||||
<span className="issue_detail_info">分支:</span>
|
<span className="issue_detail_info">分支:</span>
|
||||||
<span>{data && data.branch_name ? data.branch_name : "--"}</span>
|
<span>{data && data.branch_name ? data.branch_name : "--"}</span>
|
||||||
</p>
|
</p>
|
||||||
{/* <p className="grid-item pb15">
|
<p className="grid-item-left pb15">
|
||||||
<span className="issue_detail_info">是否上链:</span>
|
<span className="issue_detail_info">标签:</span>
|
||||||
<span>{data && data.issue_type==="2" ? '是' : "--"}</span>
|
<span>
|
||||||
</p>
|
{data && data.issue_tags ? (
|
||||||
{
|
<span className="grid-item">
|
||||||
data && data.issue_type==="2" &&
|
<span
|
||||||
<p className="grid-item pb15">
|
className="tagColor"
|
||||||
<span className="issue_detail_info">token值:</span>
|
style={{ background: data.issue_tags[0].color }}
|
||||||
<span>{data && data.token ? data.token : "--"}</span>
|
></span>
|
||||||
</p>
|
{data.issue_tags[0].name}
|
||||||
} */}
|
</span>
|
||||||
<p className="grid-item-left pb15">
|
) : (
|
||||||
<span className="issue_detail_info">标签:</span>
|
"--"
|
||||||
<span>
|
)}
|
||||||
{data && data.issue_tags ? (
|
</span>
|
||||||
<span className="grid-item">
|
</p>
|
||||||
<span
|
<p className="grid-item-left pb15">
|
||||||
className="tagColor"
|
<span className="issue_detail_info">里程碑:</span>
|
||||||
style={{ background: data.issue_tags[0].color }}
|
<span className="title_overflow">
|
||||||
></span>
|
{data && data.version ? data.version : "--"}
|
||||||
{data.issue_tags[0].name}
|
</span>
|
||||||
</span>
|
</p>
|
||||||
) : (
|
<p className="grid-item-left pb15">
|
||||||
"--"
|
<span className="issue_detail_info">状态:</span>
|
||||||
)}
|
<span>
|
||||||
</span>
|
{data && data.issue_status ? data.issue_status : "--"}
|
||||||
</p>
|
</span>
|
||||||
<p className="grid-item-left pb15">
|
</p>
|
||||||
<span className="issue_detail_info">里程碑:</span>
|
<p className="grid-item-left pb15">
|
||||||
<span className="title_overflow">
|
<span className="issue_detail_info">分类:</span>
|
||||||
{data && data.version ? data.version : "--"}
|
<span>{data && data.tracker ? data.tracker : "--"}</span>
|
||||||
</span>
|
</p>
|
||||||
</p>
|
<p className="grid-item-left pb15">
|
||||||
<p className="grid-item-left pb15">
|
<span className="issue_detail_info">负责人:</span>
|
||||||
<span className="issue_detail_info">状态:</span>
|
<span>
|
||||||
<span>
|
{data && data.assign_user_name ? data.assign_user_name : "--"}
|
||||||
{data && data.issue_status ? data.issue_status : "--"}
|
</span>
|
||||||
</span>
|
</p>
|
||||||
</p>
|
<p className="grid-item-left pb15">
|
||||||
<p className="grid-item-left pb15">
|
<span className="issue_detail_info">开始日期:</span>
|
||||||
<span className="issue_detail_info">分类:</span>
|
<span>{data && data.start_date ? data.start_date : "--"}</span>
|
||||||
<span>{data && data.tracker ? data.tracker : "--"}</span>
|
</p>
|
||||||
</p>
|
<p className="grid-item-left pb15">
|
||||||
<p className="grid-item-left pb15">
|
<span className="issue_detail_info">结束日期:</span>
|
||||||
<span className="issue_detail_info">负责人:</span>
|
<span>{data && data.due_date ? data.due_date : "--"}</span>
|
||||||
<span>
|
</p>
|
||||||
{data && data.assign_user_name ? data.assign_user_name : "--"}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p className="grid-item-left pb15">
|
|
||||||
<span className="issue_detail_info">开始日期:</span>
|
|
||||||
<span>{data && data.start_date ? data.start_date : "--"}</span>
|
|
||||||
</p>
|
|
||||||
<p className="grid-item-left pb15">
|
|
||||||
<span className="issue_detail_info">结束日期:</span>
|
|
||||||
<span>{data && data.due_date ? data.due_date : "--"}</span>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p className="grid-item-left pb15">
|
<p className="grid-item-left pb15">
|
||||||
<span className="issue_detail_info">完成度:</span>
|
<span className="issue_detail_info">完成度:</span>
|
||||||
<span>{data && data.done_ratio ? data.done_ratio : "--"}</span>
|
<span>{data && data.done_ratio ? data.done_ratio : "--"}</span>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Spin>
|
||||||
</Spin>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ class Milepost extends Component {
|
||||||
<span>里程碑{data && data.issue_tags_count}已创建</span>
|
<span>里程碑{data && data.issue_tags_count}已创建</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="topWrapper">
|
<div className="topWrapper" style={{borderBottom:"1px solid #eee"}}>
|
||||||
<div className="topWrapper_type_infos">
|
<div className="topWrapper_type_infos">
|
||||||
<li className={openselect ? "active" : ""} onClick={() => this.opneMilelist(1)}>{data && data.open_count}个开启中</li>
|
<li className={openselect ? "active" : ""} onClick={() => this.opneMilelist(1)}>{data && data.open_count}个开启中</li>
|
||||||
<li className={closeselect ? "active" : ""} onClick={() => this.opneMilelist(2)}>{data && data.closed_count}个已关闭</li>
|
<li className={closeselect ? "active" : ""} onClick={() => this.opneMilelist(2)}>{data && data.closed_count}个已关闭</li>
|
||||||
|
@ -223,15 +223,15 @@ class Milepost extends Component {
|
||||||
{
|
{
|
||||||
data && data.user_admin_or_member ?
|
data && data.user_admin_or_member ?
|
||||||
<div className="milepostleft">
|
<div className="milepostleft">
|
||||||
<div className="grid-item mr15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
|
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-item mr15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
||||||
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
|
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-item mr15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-lajitong font-14 mr5" ></i>
|
<i className="iconfont icon-lajitong font-14 mr5" ></i>
|
||||||
<Popconfirm placement="bottom" title={'是否删除里程碑?'} okText="是" cancelText="否" onConfirm={() => this.closemile(item)}>
|
<Popconfirm placement="bottom" title={'是否删除里程碑?'} okText="是" cancelText="否" onConfirm={() => this.closemile(item)}>
|
||||||
<a className="color-grey-9">删除</a>
|
<a className="color-grey-9">删除</a>
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React, { Component } from "react";
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
|
import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
|
||||||
import './order.css';
|
import './order.css';
|
||||||
|
import { FlexAJ } from '../Component/layout'
|
||||||
|
|
||||||
import NoneData from '../Nodata';
|
import NoneData from '../Nodata';
|
||||||
import OrderItem from './OrderItem';
|
import OrderItem from './OrderItem';
|
||||||
|
@ -198,92 +199,94 @@ class MilepostDetail extends Component {
|
||||||
</Menu>
|
</Menu>
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
<div className="main">
|
<div className="main" style={{padding:"0px"}}>
|
||||||
<div className="miledetail mb20">
|
<div className="miledetail">
|
||||||
<div className="topmilepost">
|
<p className="font-20">{data && data.name}</p>
|
||||||
<p className="font-18">{data && data.name}</p>
|
<FlexAJ>
|
||||||
|
<span className="mt7">
|
||||||
|
<span className="mr10">
|
||||||
|
<i className="iconfont icon-rili font-14 mr5">
|
||||||
|
</i>
|
||||||
|
{
|
||||||
|
data && data.effective_date ?
|
||||||
|
<span >{data && data.effective_date}</span>
|
||||||
|
:
|
||||||
|
<span >暂无截止时间</span>
|
||||||
|
}
|
||||||
|
</span>
|
||||||
|
<span className="font-weight-bold">{data && data.percent && data.percent.toFixed(2)}%完成 </span>
|
||||||
|
</span>
|
||||||
<div className="milepostdiv">
|
<div className="milepostdiv">
|
||||||
<Link to={`/projects/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
<Link to={`/projects/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建任务</Link>
|
<Link to={`/projects/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建任务</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</FlexAJ>
|
||||||
<div className="grid-item mr10">
|
|
||||||
<span className="mr10">
|
|
||||||
<i className="iconfont icon-rili font-14 mr5">
|
|
||||||
</i>
|
|
||||||
{
|
|
||||||
data && data.effective_date ?
|
|
||||||
<span >{data && data.effective_date}</span>
|
|
||||||
:
|
|
||||||
<span >暂无截止时间</span>
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
<span className="font-weight-bold">
|
|
||||||
{data && data.percent && data.percent.toFixed(2)}%完成
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Spin spinning={isSpin}>
|
<Spin spinning={isSpin}>
|
||||||
<div className="f-wrap-between pb20 bor-bottom-greyE">
|
<div className="pl20 pr20">
|
||||||
<ul className="topWrapper_type_infos">
|
<div className="f-wrap-between pt15 pb15 bor-bottom-greyE">
|
||||||
<li className={status_type==="1" ? "active" : ""} onClick={() => this.openorder("1")}>{data && data.open_issues_count}个开启中</li>
|
<ul className="topWrapper_type_infos">
|
||||||
<li className={status_type==="2" ? "active" : ""} onClick={() => this.openorder("2")}>{data && data.close_issues_count}个已关闭</li>
|
<li className={status_type==="1" ? "active" : ""} onClick={() => this.openorder("1")}>{data && data.open_issues_count}个开启中</li>
|
||||||
</ul>
|
<li className={status_type==="2" ? "active" : ""} onClick={() => this.openorder("2")}>{data && data.close_issues_count}个已关闭</li>
|
||||||
<ul className="topWrapper_select">
|
</ul>
|
||||||
<li>
|
<ul className="topWrapper_select">
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag, '标签', 'issue_tag_id')} trigger={['click']} placement="bottomCenter">
|
<li>
|
||||||
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag, '标签', 'issue_tag_id')} trigger={['click']} placement="bottomCenter">
|
||||||
</Dropdown>
|
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
|
||||||
</li>
|
</Dropdown>
|
||||||
<li>
|
</li>
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '发布人', 'author_id')} trigger={['click']} placement="bottomCenter">
|
<li>
|
||||||
<span>{this.state.author_ids}<Icon type="caret-down" className="ml5" /></span>
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '发布人', 'author_id')} trigger={['click']} placement="bottomCenter">
|
||||||
</Dropdown>
|
<span>{this.state.author_ids}<Icon type="caret-down" className="ml5" /></span>
|
||||||
</li>
|
</Dropdown>
|
||||||
<li>
|
</li>
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '负责人', 'assigned_to_id')} trigger={['click']} placement="bottomCenter">
|
<li>
|
||||||
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '负责人', 'assigned_to_id')} trigger={['click']} placement="bottomCenter">
|
||||||
</Dropdown>
|
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
|
||||||
</li>
|
</Dropdown>
|
||||||
<li>
|
</li>
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.tracker, '类型', 'tracker_id')} trigger={['click']} placement="bottomCenter">
|
<li>
|
||||||
<span>{this.state.tracker_ids}<Icon type="caret-down" className="ml5" /></span>
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.tracker, '类型', 'tracker_id')} trigger={['click']} placement="bottomCenter">
|
||||||
</Dropdown>
|
<span>{this.state.tracker_ids}<Icon type="caret-down" className="ml5" /></span>
|
||||||
</li>
|
</Dropdown>
|
||||||
<li>
|
</li>
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_status, '状态', 'status_id')} trigger={['click']} placement="bottomCenter">
|
<li>
|
||||||
<span>{this.state.status_ids}<Icon type="caret-down" className="ml5" /></span>
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_status, '状态', 'status_id')} trigger={['click']} placement="bottomCenter">
|
||||||
</Dropdown>
|
<span>{this.state.status_ids}<Icon type="caret-down" className="ml5" /></span>
|
||||||
</li>
|
</Dropdown>
|
||||||
<li>
|
</li>
|
||||||
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.done_ratio, '完成度', 'done_ratio')} trigger={['click']} placement="bottomCenter">
|
<li>
|
||||||
<span>{this.state.done_ratios}<Icon type="caret-down" className="ml5" /></span>
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.done_ratio, '完成度', 'done_ratio')} trigger={['click']} placement="bottomCenter">
|
||||||
</Dropdown>
|
<span>{this.state.done_ratios}<Icon type="caret-down" className="ml5" /></span>
|
||||||
</li>
|
</Dropdown>
|
||||||
<li>
|
</li>
|
||||||
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
|
<li>
|
||||||
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
|
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
|
||||||
</Dropdown>
|
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
|
||||||
</li>
|
</Dropdown>
|
||||||
</ul>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div className="setItemStyle">
|
||||||
|
{
|
||||||
|
search_count === 0 ?
|
||||||
|
<NoneData _html="暂时还没有相关数据哦!" />
|
||||||
|
:
|
||||||
|
issues && issues.length>0 && issues.map((item,key)=>{
|
||||||
|
return(
|
||||||
|
<OrderItem key={key} mile item={item} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state}></OrderItem>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
{
|
||||||
|
search_count > limit?
|
||||||
|
<div className="mt30 mb50 edu-txt-center">
|
||||||
|
<Pagination simple current={page} total={search_count} pageSize={limit} onChange={this.ChangePage}></Pagination>
|
||||||
|
</div>:""
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
{
|
|
||||||
search_count === 0 ?
|
|
||||||
<NoneData _html="暂时还没有相关数据哦!" />
|
|
||||||
:
|
|
||||||
issues && issues.length>0 && issues.map((item,key)=>{
|
|
||||||
return(
|
|
||||||
<OrderItem key={key} mile item={item} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state}></OrderItem>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
{
|
|
||||||
search_count > limit?
|
|
||||||
<div className="mt30 mb50 edu-txt-center">
|
|
||||||
<Pagination simple current={page} total={search_count} pageSize={limit} onChange={this.ChangePage}></Pagination>
|
|
||||||
</div>:""
|
|
||||||
}
|
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,7 +37,6 @@ class OrderItem extends Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="milepostdiv" style={{ marginTop: 5 }}>
|
<div className="milepostdiv" style={{ marginTop: 5 }}>
|
||||||
<div className="milepostrighe">
|
<div className="milepostrighe">
|
||||||
|
|
||||||
<div className="grid-item mr10">
|
<div className="grid-item mr10">
|
||||||
<i className="iconfont icon-rili font-14 mr5">
|
<i className="iconfont icon-rili font-14 mr5">
|
||||||
</i>
|
</i>
|
||||||
|
@ -64,15 +63,15 @@ class OrderItem extends Component {
|
||||||
{
|
{
|
||||||
data.user_admin_or_member ?
|
data.user_admin_or_member ?
|
||||||
<div className="milepostleft">
|
<div className="milepostleft">
|
||||||
<div className="grid-item mr15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
|
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-item mr15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
||||||
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
|
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-item mr15 color-grey-9">
|
<div className="grid-item ml15 color-grey-9">
|
||||||
<i className="iconfont icon-lajitong font-14 mr5" ></i>
|
<i className="iconfont icon-lajitong font-14 mr5" ></i>
|
||||||
<Popconfirm placement="bottom" title={'是否删除里程碑?'} okText="是" cancelText="否" onConfirm={() => this.closemile(item)}>
|
<Popconfirm placement="bottom" title={'是否删除里程碑?'} okText="是" cancelText="否" onConfirm={() => this.closemile(item)}>
|
||||||
<a className="color-grey-9">删除</a>
|
<a className="color-grey-9">删除</a>
|
||||||
|
|
|
@ -53,7 +53,7 @@ class OrderItem extends Component {
|
||||||
<div className="issueItem">
|
<div className="issueItem">
|
||||||
{current_user && current_user.login && checkbox}
|
{current_user && current_user.login && checkbox}
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<p className="mb15 df" style={{alignItems:"center"}}>
|
<p className="mb10 df" style={{alignItems:"center"}}>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/detail`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"300px"}}>{item.name}</Link>
|
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/detail`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"300px"}}>{item.name}</Link>
|
||||||
{TagInfo(item.priority,"mr10")}
|
{TagInfo(item.priority,"mr10")}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -80,9 +80,9 @@ class Tags extends Component {
|
||||||
|
|
||||||
|
|
||||||
getList = (page, order_name, order_type) => {
|
getList = (page, order_name, order_type) => {
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId ,owner } = this.props.match.params;
|
||||||
const { limit } = this.state;
|
const { limit } = this.state;
|
||||||
const url = `/projects/${projectsId}/issue_tags.json`;
|
const url = `/projects/${owner}/${projectsId}/labels.json`;
|
||||||
axios.get(url, {
|
axios.get(url, {
|
||||||
params: {
|
params: {
|
||||||
page, limit, order_name, order_type
|
page, limit, order_name, order_type
|
||||||
|
@ -101,8 +101,8 @@ class Tags extends Component {
|
||||||
createtagpost = () => {
|
createtagpost = () => {
|
||||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
const url = `/projects/${projectsId}/issue_tags.json`;
|
const url = `/projects/${owner}/${projectsId}/labels.json`;
|
||||||
axios.post(url, {
|
axios.post(url, {
|
||||||
...values,
|
...values,
|
||||||
project_id: projectsId,
|
project_id: projectsId,
|
||||||
|
@ -183,9 +183,9 @@ class Tags extends Component {
|
||||||
this.updatetag();
|
this.updatetag();
|
||||||
}
|
}
|
||||||
updatetag = () => {
|
updatetag = () => {
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
let id = this.state.id;
|
let id = this.state.id;
|
||||||
const url = `/projects/${projectsId}/issue_tags/${id}.json`;
|
const url = `/projects/${owner}/${projectsId}/labels/${id}.json`;
|
||||||
let name = this.state.name;
|
let name = this.state.name;
|
||||||
let description = this.state.description;
|
let description = this.state.description;
|
||||||
let modalcolor = this.state.newcolor
|
let modalcolor = this.state.newcolor
|
||||||
|
@ -208,8 +208,8 @@ class Tags extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
deletetag = (id) => {
|
deletetag = (id) => {
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
const url = `/projects/${projectsId}/issue_tags/${id}.json`;
|
const url = `/projects/${owner}/${projectsId}/labels/${id}.json`;
|
||||||
axios.delete(url, {
|
axios.delete(url, {
|
||||||
data: {
|
data: {
|
||||||
project_id: projectsId,
|
project_id: projectsId,
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.topmilepost {
|
.topmilepost {
|
||||||
padding: 20px 0;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -27,7 +26,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.miledetail {
|
.miledetail {
|
||||||
padding-bottom: 20px;
|
padding:15px 20px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
@ -212,12 +211,18 @@
|
||||||
padding: 6px 30px;
|
padding: 6px 30px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.setItemStyle .issueItem{
|
||||||
|
padding:16px 0px;
|
||||||
|
}
|
||||||
.issueItem {
|
.issueItem {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
padding: 16px 0px 16px 20px;
|
padding: 16px 20px;
|
||||||
|
}
|
||||||
|
.issueItem:last-child{
|
||||||
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
.issueNo {
|
.issueNo {
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
|
@ -424,7 +429,7 @@
|
||||||
}
|
}
|
||||||
.milepostrighe {
|
.milepostrighe {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 80%;
|
flex:1;
|
||||||
}
|
}
|
||||||
.milepostleft {
|
.milepostleft {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -640,7 +645,7 @@ a.issue-type-button.active:hover {
|
||||||
|
|
||||||
.custom-comment-tabs .ant-tabs-top-bar{
|
.custom-comment-tabs .ant-tabs-top-bar{
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
padding: 15px 0;
|
padding-top:15px;
|
||||||
}
|
}
|
||||||
.custom-comment-tabs .search-count-button{
|
.custom-comment-tabs .search-count-button{
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
|
|
|
@ -316,8 +316,8 @@ class order extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
deletedetail = (id) => {
|
deletedetail = (id) => {
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
const url = `/projects/${projectsId}/issues/${id}.json`;
|
const url = `/projects/${owner}/${projectsId}/issues/${id}.json`;
|
||||||
axios.delete(url, {
|
axios.delete(url, {
|
||||||
data: {
|
data: {
|
||||||
project_id: projectsId,
|
project_id: projectsId,
|
||||||
|
@ -470,8 +470,8 @@ class order extends Component {
|
||||||
isSpin: true
|
isSpin: true
|
||||||
})
|
})
|
||||||
const { checkedValue } = this.state;
|
const { checkedValue } = this.state;
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
const url = `/projects/${projectsId}/issues/clean.json`;
|
const url = `/projects/${owner}/${projectsId}/issues/clean.json`;
|
||||||
axios.post(url, {
|
axios.post(url, {
|
||||||
ids: checkedValue
|
ids: checkedValue
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
|
|
|
@ -238,7 +238,7 @@ class Collaborator extends Component {
|
||||||
content: "确认将此成员从项目中移除?",
|
content: "确认将此成员从项目中移除?",
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const { project_id } = this.props;
|
const { project_id } = this.props;
|
||||||
const url = `/${owner}/${projectsId}/members/remove.json`;
|
const url = `/${owner}/${projectsId}/collaborators/remove.json`;
|
||||||
axios
|
axios
|
||||||
.delete(url, {
|
.delete(url, {
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -41,7 +41,7 @@ class Index extends Component {
|
||||||
const { projectsId , owner } = this.props.match.params;
|
const { projectsId , owner } = this.props.match.params;
|
||||||
const { pathname } = this.props.history.location;
|
const { pathname } = this.props.history.location;
|
||||||
|
|
||||||
const flag = pathname === `/projects/${projectsId}/setting`;
|
const flag = pathname === `/projects/${owner}/${projectsId}/setting`;
|
||||||
return (
|
return (
|
||||||
<Box className="ProjectListIndex">
|
<Box className="ProjectListIndex">
|
||||||
<Short>
|
<Short>
|
||||||
|
@ -49,9 +49,8 @@ class Index extends Component {
|
||||||
<li className={flag ? "active" : ""}>
|
<li className={flag ? "active" : ""}>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/projects/${owner}/${projectsId}/setting`} className="w-100">
|
<Link to={`/projects/${owner}/${projectsId}/setting`} className="w-100">
|
||||||
|
|
||||||
<i className="iconfont icon-huabanfuben font-18 mr10"></i>基本设置
|
<i className="iconfont icon-huabanfuben font-18 mr10"></i>基本设置
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
|
|
|
@ -86,7 +86,7 @@ class children_comments extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
commentCtx = (v) => {
|
commentCtx = (v) => {
|
||||||
return <RenderHtml className="break_word_comments" value={v} />;
|
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
Paginations =()=> {
|
Paginations =()=> {
|
||||||
|
|
|
@ -51,7 +51,7 @@ class children_journals extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
commentCtx = (v) => {
|
commentCtx = (v) => {
|
||||||
return <RenderHtml className="break_word_comments" value={v} />;
|
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
Paginations =()=> {
|
Paginations =()=> {
|
||||||
|
|
|
@ -263,7 +263,7 @@ class comments extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
commentCtx = (v) => {
|
commentCtx = (v) => {
|
||||||
return <RenderHtml className="break_word_comments" value={v} />;
|
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||||
};
|
};
|
||||||
Paginations = ()=>{
|
Paginations = ()=>{
|
||||||
const { page, limit, search_count } = this.state;
|
const { page, limit, search_count } = this.state;
|
||||||
|
|
|
@ -427,10 +427,6 @@ export function commentHOC(WrappedComponent) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------评论 End
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------评论 End
|
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
$(".commentsDelegateParent")
|
$(".commentsDelegateParent")
|
||||||
.delegate(".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img", "click", (event) => {
|
.delegate(".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img", "click", (event) => {
|
||||||
|
|
|
@ -16,6 +16,7 @@ export function ImageLayerOfCommentHOC(options = {}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelegateClick = (event) => {
|
onDelegateClick = (event) => {
|
||||||
|
console.log("imgclick",event);
|
||||||
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
|
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
|
||||||
// 判断imageSrc是否是图片
|
// 判断imageSrc是否是图片
|
||||||
const fileName = event.target.innerHTML.trim()
|
const fileName = event.target.innerHTML.trim()
|
||||||
|
@ -37,8 +38,8 @@ export function ImageLayerOfCommentHOC(options = {}) {
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.props.wrappedComponentRef && this.props.wrappedComponentRef(this.refs['wrappedComponentRef'])
|
this.props.wrappedComponentRef && this.props.wrappedComponentRef(this.refs['wrappedComponentRef'])
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$(options.parentSelector || ".commentsDelegateParent")
|
$(options.parentSelector || ".commentsDelegateParent")
|
||||||
.delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img", "click", this.onDelegateClick);
|
.delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img", "click", this.onDelegateClick);
|
||||||
}, 1200)
|
}, 1200)
|
||||||
|
|
Loading…
Reference in New Issue