From 775434d856005234c76d359acfe313dd4d78ca36 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Tue, 30 Nov 2021 15:43:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=98=93=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Activity/activity.css | 9 +++++++++ src/forge/Main/CoderDepot.jsx | 2 +- src/forge/Main/sub/UpdateDescModal.jsx | 4 ++-- src/forge/Main/version/version.js | 14 +++++++++++++- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/forge/Activity/activity.css b/src/forge/Activity/activity.css index 2fada3c07..ee6fea5f2 100644 --- a/src/forge/Activity/activity.css +++ b/src/forge/Activity/activity.css @@ -57,6 +57,15 @@ padding:20px 0px; color: #4183c4; } +.percentBox li::after{ + content: ''; + width: 100%; + height: 3px; + border-radius: 4px; + display: block; + margin: 0 auto; + background: #4183c4; +} .percentBox > li:last-child{ border-right: none; } diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index db68d22a1..11521dc01 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -528,7 +528,7 @@ function CoderDepot(props){ setOpenModal(true)} className="iconfont icon-a-shezhi color-grey-9 font-15"> } - {desc &&

{desc}

} + {desc &&

{desc}

} { website &&
diff --git a/src/forge/Main/sub/UpdateDescModal.jsx b/src/forge/Main/sub/UpdateDescModal.jsx index b0291f347..902f2f150 100644 --- a/src/forge/Main/sub/UpdateDescModal.jsx +++ b/src/forge/Main/sub/UpdateDescModal.jsx @@ -46,14 +46,14 @@ function UpdateDescModal({form , visible , onCancel , onOk,desc,website,lesson_u {getFieldDecorator("website",{ rules:[] })( - + )} {getFieldDecorator("lesson_url",{ rules:[] })( - + )} diff --git a/src/forge/Main/version/version.js b/src/forge/Main/version/version.js index 2896899fc..0f570affe 100644 --- a/src/forge/Main/version/version.js +++ b/src/forge/Main/version/version.js @@ -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) { {item.name} {data && data.user_admin_permission && type !== 2 && } - {data && data.user_admin_permission && type !== 2 && {deleteRelease(item.version_id)}}>} + {data && data.user_admin_permission && type !== 2 && + {deleteRelease(item.version_id)}} + > + + + }
From 3151314529d323d9b27d553118bfe6e2aca9eafe Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Tue, 30 Nov 2021 16:27:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=98=93=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Activity/activity.css | 9 --------- src/forge/users/Echart/Pie.jsx | 6 +++--- src/forge/users/Statistics/Index.jsx | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/forge/Activity/activity.css b/src/forge/Activity/activity.css index ee6fea5f2..2fada3c07 100644 --- a/src/forge/Activity/activity.css +++ b/src/forge/Activity/activity.css @@ -57,15 +57,6 @@ padding:20px 0px; color: #4183c4; } -.percentBox li::after{ - content: ''; - width: 100%; - height: 3px; - border-radius: 4px; - display: block; - margin: 0 auto; - background: #4183c4; -} .percentBox > li:last-child{ border-right: none; } diff --git a/src/forge/users/Echart/Pie.jsx b/src/forge/users/Echart/Pie.jsx index d5489b981..db23234cc 100644 --- a/src/forge/users/Echart/Pie.jsx +++ b/src/forge/users/Echart/Pie.jsx @@ -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: '报告者'} ] } diff --git a/src/forge/users/Statistics/Index.jsx b/src/forge/users/Statistics/Index.jsx index 91118a672..64986c524 100644 --- a/src/forge/users/Statistics/Index.jsx +++ b/src/forge/users/Statistics/Index.jsx @@ -186,7 +186,7 @@ function Index(props) { />
-

根据你在项目开发过程中的工作,对你在项目中扮演的角色进行定位,包括:创建者、管理者、开发者、测试者、文档工作者等。

+

根据你在项目开发过程中的工作,对你在项目中扮演的角色进行定位,包括:创建者、管理员、开发者、报告者。

From f6c84e4fad158973cad8cfb1248dd9860f965f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 30 Nov 2021 16:52:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=8D=E5=88=B6issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Order/order_form.js | 43 +++++++++++-------- .../tpm/challengesnew/tpm-md-editor.js | 16 +------ 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 19a0eaeb0..2eb5e4299 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -47,25 +47,29 @@ class order_form extends Component { } componentDidMount = () => { this.getSelectList(); - //如果是复制issue则需要将原内容中的@谁录入 @列表中 (在tpm-md-editor.js中其实有处理,但是当用户点击【复制】按钮之后迅速创建issue会有延迟导致@失效) - if (this.state.form_type === "copy"){ - 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({ @@ -97,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 }); } @@ -261,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), }); }; @@ -374,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} diff --git a/src/modules/tpm/challengesnew/tpm-md-editor.js b/src/modules/tpm/challengesnew/tpm-md-editor.js index 9065c6c29..46c01ec37 100644 --- a/src/modules/tpm/challengesnew/tpm-md-editor.js +++ b/src/modules/tpm/challengesnew/tpm-md-editor.js @@ -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 = (