forked from Gitlink/forgeplus-react
merge-conflicts
This commit is contained in:
commit
1292019aac
|
@ -528,7 +528,7 @@ function CoderDepot(props){
|
|||
<i onClick={()=>setOpenModal(true)} className="iconfont icon-a-shezhi color-grey-9 font-15"></i>
|
||||
}
|
||||
</FlexAJ>
|
||||
{desc && <p className="font-14 color-grey-3 mb15 task-hide-2" style={{lineHeight:"24px",WebkitLineClamp:"4",textAlign:"justify",wordBreak:"break-all"}}>{desc}</p>}
|
||||
{desc && <p className="font-14 color-grey-3 mb15 task-hide-2" style={{lineHeight:"24px",WebkitLineClamp:"4",textAlign:"justify",wordBreak:"break-all"}} title={desc}>{desc}</p>}
|
||||
{
|
||||
website &&
|
||||
<div className="color-grey-6 df pinfos mb5">
|
||||
|
|
|
@ -46,14 +46,14 @@ function UpdateDescModal({form , visible , onCancel , onOk,desc,website,lesson_u
|
|||
{getFieldDecorator("website",{
|
||||
rules:[]
|
||||
})(
|
||||
<Input placeholder="website链接"/>
|
||||
<Input placeholder="website链接" maxLength={200}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="实践课程">
|
||||
{getFieldDecorator("lesson_url",{
|
||||
rules:[]
|
||||
})(
|
||||
<Input placeholder="实践课程链接" />
|
||||
<Input placeholder="实践课程链接" maxLength={200}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
|
|
@ -6,9 +6,11 @@ import {truncateCommitId} from '../../common/util';
|
|||
import Empty from './Empty';
|
||||
import './version.scss';
|
||||
import axios from 'axios';
|
||||
import { Popconfirm } from 'antd'
|
||||
import Tree from '../img/tree-black.png';
|
||||
import RenderHtml from '../../../components/render-html';
|
||||
import User from "../../Component/User";
|
||||
import DeleteBox from "../../Component/DeleteModal/Index";
|
||||
|
||||
function version(props) {
|
||||
const [ data , setData ] = useState(undefined);
|
||||
|
@ -73,7 +75,17 @@ function version(props) {
|
|||
<Link to={`/${owner}/${projectsId}/tree/${item.tag_name}`} className="task-hide color-blue hover font-18">{item.name}</Link>
|
||||
<span>
|
||||
{data && data.user_admin_permission && type !== 2 && <Link to={{pathname:`/${owner}/${projectsId}/releases/${item.version_id}/update`,state:{"stable":item.draft==="稳定"}}} className="ml15"><i className="iconfont icon-a-bianji1 font-16 color-grey-6"></i></Link>}
|
||||
{data && data.user_admin_permission && type !== 2 && <i className ="iconfont icon-shanchuicon1 font-16 ml15" onClick={()=>{deleteRelease(item.version_id)}}></i>}
|
||||
{data && data.user_admin_permission && type !== 2 &&
|
||||
<Popconfirm
|
||||
placement="bottom"
|
||||
title={'您确定要删除当前易修吗?'}
|
||||
okText="是"
|
||||
cancelText="否"
|
||||
onConfirm={() =>{deleteRelease(item.version_id)}}
|
||||
>
|
||||
<i className ="iconfont icon-shanchuicon1 font-16 ml15"></i>
|
||||
</Popconfirm>
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
<span className="color-grey-3 mb15 version-user">
|
||||
|
|
|
@ -47,27 +47,29 @@ class order_form extends Component {
|
|||
}
|
||||
componentDidMount = () => {
|
||||
this.getSelectList();
|
||||
//如果是复制issue则需要将原内容中的@谁录入 @列表中 (在tpm-md-editor.js中其实有处理,但是当用户点击【复制】按钮之后迅速创建issue会有延迟导致@失效)
|
||||
if (this.state.form_type === "copy"){
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { description } = this.state;
|
||||
let allUser = undefined;
|
||||
axios.get(`/${owner}/${projectsId}/members.json`).then(response=>{
|
||||
};
|
||||
|
||||
copyIssueAtWhoInit = (description) =>{
|
||||
if (description.indexOf("@") !== -1){
|
||||
this.setState({isSpin: true});
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
axios.get(`/${owner}/${projectsId}/members.json`).then(response => {
|
||||
this.setState({ isSpin: false});
|
||||
if (response.data.total_count !== 0) {
|
||||
allUser = response.data.users
|
||||
const allUser = response.data.users;
|
||||
if (allUser && allUser.length !== 0 && description && description.indexOf("@") !== -1) {
|
||||
const list = new Set();
|
||||
allUser.map(item => {
|
||||
if (description.indexOf(`[@${item.username}](/${item.login})`) !== -1) {
|
||||
list.add(item.login);
|
||||
}
|
||||
})
|
||||
this.setState({ atWhoLoginList: Array.from(list) });
|
||||
}
|
||||
}
|
||||
})
|
||||
if (allUser && allUser.length !== 0 && description && description.indexOf("@") !== -1) {
|
||||
const list = new Set();
|
||||
allUser.map(item => {
|
||||
if (description.indexOf(`[@${item.username}](/${item.login})`) !== -1) {
|
||||
list.add(item.login);
|
||||
}
|
||||
})
|
||||
this.setState({ atWhoLoginList: Array.from(list)});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
get_detail = () => {
|
||||
this.setState({
|
||||
|
@ -99,6 +101,9 @@ class order_form extends Component {
|
|||
due_date: result.data.due_date,
|
||||
subject: result.data.subject,
|
||||
}
|
||||
if (this.props.form_type === "copy" && result.data.description){
|
||||
this.copyIssueAtWhoInit(result.data.description);
|
||||
}
|
||||
this.props.form.setFieldsValue({ ...data });
|
||||
this.setState({ ...data });
|
||||
}
|
||||
|
@ -263,8 +268,10 @@ class order_form extends Component {
|
|||
|
||||
//issue中at谁列表(存储:login)
|
||||
changeAtWhoLoginList = (loginList) =>{
|
||||
let list = new Set(this.state.atWhoLoginList);
|
||||
loginList.map(item => list.add(item));
|
||||
this.setState({
|
||||
atWhoLoginList:loginList,
|
||||
atWhoLoginList: Array.from(list),
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -376,7 +383,7 @@ class order_form extends Component {
|
|||
mdID={"order-new-description"}
|
||||
initValue={description}
|
||||
onChange={this.onContentChange}
|
||||
isCanAtme = {form_type}
|
||||
isCanAtme = {true}
|
||||
changeAtWhoLoginList = {this.changeAtWhoLoginList}
|
||||
owner = {owner}
|
||||
projectsId = {projectsId}
|
||||
|
|
|
@ -14,7 +14,7 @@ function Pie({data}) {
|
|||
var huan_val = document.getElementById("Pie");
|
||||
var chart = echarts.init(huan_val);
|
||||
let option = {
|
||||
color: ["#f8e367", "#5ea6ff", "#ff9e48", "#99dfff"],
|
||||
color: ["#ff9e48", "#5ea6ff", "#f8e367", "#99dfff"],
|
||||
title: {
|
||||
show:false
|
||||
},
|
||||
|
@ -51,9 +51,9 @@ function Pie({data}) {
|
|||
show: false
|
||||
},
|
||||
data: [
|
||||
{value: d.developer && d.developer.count, name: '开发者'},
|
||||
{value: d.manager && d.manager.count, name: '管理员'},
|
||||
{value: d.owner && d.owner.count, name: '创建者'},
|
||||
{value: d.manager && d.manager.count, name: '管理员'},
|
||||
{value: d.developer && d.developer.count, name: '开发者'},
|
||||
{value: d.reporter && d.reporter.count, name: '报告者'}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ function Index(props) {
|
|||
/>
|
||||
</FlexAJ>
|
||||
<div className="echartBox">
|
||||
<p>根据你在项目开发过程中的工作,对你在项目中扮演的角色进行定位,包括:创建者、管理者、开发者、测试者、文档工作者等。</p>
|
||||
<p>根据你在项目开发过程中的工作,对你在项目中扮演的角色进行定位,包括:创建者、管理员、开发者、报告者。</p>
|
||||
<Pie data={pieData}/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -106,20 +106,6 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
|
|||
})
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
//如果是复制issue则需要将原内容中的@谁录入 @列表中
|
||||
if (isCanAtme === "copy" && initValue && initValue.indexOf("@") !== -1) {
|
||||
allUsers.map(item=>{
|
||||
if (initValue.indexOf(`[@${item.username}](/${item.login})`) !== -1) {
|
||||
const list = new Set(atWhoLoginList.current);
|
||||
list.add(item.login);
|
||||
atWhoLoginList.current = Array.from(list);
|
||||
setAtWhoLoginListState(Array.from(list));
|
||||
}
|
||||
})
|
||||
}
|
||||
}, [initValue])
|
||||
|
||||
function onLayout() {
|
||||
let ro;
|
||||
if (editorEl.current) {
|
||||
|
@ -211,7 +197,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
|
|||
}
|
||||
|
||||
useEffect(()=>{
|
||||
changeAtWhoLoginList && changeAtWhoLoginList(atWhoLoginList.current);
|
||||
changeAtWhoLoginList && changeAtWhoLoginList(atWhoLoginListState);
|
||||
},[atWhoLoginListState])
|
||||
|
||||
const atWhoList = (
|
||||
|
|
Loading…
Reference in New Issue