diff --git a/src/forge/Component/ProfileModal/Profile.jsx b/src/forge/Component/ProfileModal/Profile.jsx index e63c1286d..15d51e575 100644 --- a/src/forge/Component/ProfileModal/Profile.jsx +++ b/src/forge/Component/ProfileModal/Profile.jsx @@ -1,8 +1,14 @@ import React from 'react'; -function Profile({children,sureFunc,showCompeleteDialog , completeProfile, className}) { - +function Profile({children,sureFunc,showCompeleteDialog , completeProfile, className,checkIfLogin,showLoginDialog,checklogin}) { + function checkProfile() { + if(checklogin){ + if(checkIfLogin()===false){ + showLoginDialog(); + return; + } + } if(!completeProfile){ showCompeleteDialog && showCompeleteDialog(); }else{ diff --git a/src/forge/Issues/Component/comments/list.jsx b/src/forge/Issues/Component/comments/list.jsx index 75adb96ed..bda51ae94 100644 --- a/src/forge/Issues/Component/comments/list.jsx +++ b/src/forge/Issues/Component/comments/list.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { Button, Popconfirm, Radio, Input, message } from 'antd'; +import { Button, Popconfirm, Radio, Input, message, Tooltip } from 'antd'; import axios from 'axios'; import { getImageUrl, timeAgo } from 'educoder'; import RenderHtml from '../../../../components/render-html'; @@ -121,7 +121,7 @@ function IssueCommentList(props){ {item.user.name} - + {item.user.name} }> {timeAgo(item.created_at)} {(item.closeAndSpan && item.id === item.start) && {setOpen(open === item.id ? undefined : item.id)}}>{open === item.id ? `点击收起操作日志` : `已折叠${item.numCount}条, 点击查看`}} diff --git a/src/forge/Issues/Component/datas.jsx b/src/forge/Issues/Component/datas.jsx index 61e7356f4..7ded85753 100644 --- a/src/forge/Issues/Component/datas.jsx +++ b/src/forge/Issues/Component/datas.jsx @@ -48,7 +48,7 @@ function Datas({checkbox ,item , projectsId,owner}){
- {item.author && item.author.name} + {item.author && item.author.name} {item.created_at} 发布 {item.updated_at}更新 {item.milestone_name && {item.milestone_name} } diff --git a/src/forge/Issues/Component/dropMenu.jsx b/src/forge/Issues/Component/dropMenu.jsx index 6d12418b9..98ddf9213 100644 --- a/src/forge/Issues/Component/dropMenu.jsx +++ b/src/forge/Issues/Component/dropMenu.jsx @@ -7,8 +7,8 @@ const { Search } = Input; /** * * @param {placeholder} placeholder:默认显示内容(为空时) - * @param {editFlag} editFlag:是否显示编辑按钮 - * @param {searchFlag} editFlag:是否显示搜索框 + * @param {editFlag} editFlag:是否有编辑权限 + * @param {searchFlag} searchFlag:是否显示搜索框 * @param {selectValueList} selectValueList:将选中的list保存 * @param {searchFunc} searchFunc:搜索方法 * @param {onAdd} onAdd:标记管理 @@ -16,6 +16,8 @@ const { Search } = Input; * @param {menus} menus:下拉列表 * @param {chooseFunc} chooseFunc:选择下拉列表 * @param {double} double:undefined为单选,有值就是最多选的数量 + * @param {colorFlag} colorFlag:选中值需根据颜色显示背景 + * @param {mustFlag} mustFlag:必须选择一个 * @returns */ function DropMenu({ @@ -27,7 +29,7 @@ function DropMenu({ onAdd, headImg, menus, - chooseFunc,double + chooseFunc,double,colorFlag,mustFlag }){ const [ visible , setVisible ] = useState(false); const [ searchValue , setSearchValue ]= useState(undefined); @@ -47,16 +49,11 @@ function DropMenu({ },[selectValueList]) function renderSelectList(list){ - console.log(list); - let a = list.map((i,k)=>{ - return i.id.toString() || i.name - }) - let n = list.map((i,k)=>{ - return i.name - }) - console.log("根据选中的列表循环出id数组:",a); - setValuesId(a); - setValuesName(n); + let a = list && list.length > 0 && list.map((i,k)=>{ + return i.id ? i.id.toString() : i.name + }) + setValuesId(a); + setValuesName(list); } useEffect(() => { @@ -85,20 +82,39 @@ function DropMenu({ let list = selectValueList; let re = []; re = list && list.length > 0 ? list:[]; - let filter = list.filter(j=>j.id === i.id); - + let filter = []; + if(i.id){ + filter = list.filter(j=>j.id === i.id); + }else{ + filter = list.filter(j=>j.name === i.name); + } if(filter && filter.length > 0){ - re = list.filter(j=>j.id !== i.id) ; + if(!mustFlag){ + if(i.id){ + re = list.filter(j=>j.id !== i.id); + }else{ + re = list.filter(j=>j.name !== i.name); + } + renderSelectList(re); + chooseFunc(re); + !double && setVisible(false); + }else{ + setVisible(false); + } }else{ if(double && (selectValueList && selectValueList.length >= double)){ message.info(`最多只能添加${double}个${placeholder}`); return; } - re.push(i); + if(double){ + re.push(i); + }else{ + re = [i]; + setVisible(false); + } + renderSelectList(re); + chooseFunc(re); } - console.log("选择后:",re); - renderSelectList(re); - chooseFunc(re); } function renderNames(nameArrs){ @@ -107,10 +123,13 @@ function DropMenu({ nameArrs && nameArrs.length>0? nameArrs.map((i,k)=>{ return( -

{i}

+

+ {i.image_url && } + {i.name} +

) }) - :"" + :{placeholder} } } @@ -159,12 +178,12 @@ function DropMenu({ :

{searchValue ? 暂无{placeholder}“{searchValue}”: `暂无${placeholder}`}

- { onAdd && {setVisible(false);onAdd()}}>标记管理}
} + { onAdd &&
{setVisible(false);onAdd()}}>标记管理
}
}> -
0 ? "operatevalue color-grey-3":"operatevalue"}>{renderNames(valuesName) || placeholder}
+
0 ? "operatevalue color-grey-3":"operatevalue"}>{renderNames(selectValueList)}
) diff --git a/src/forge/Issues/Pages/details.jsx b/src/forge/Issues/Pages/details.jsx index 9ad917bcd..7c6ff9070 100644 --- a/src/forge/Issues/Pages/details.jsx +++ b/src/forge/Issues/Pages/details.jsx @@ -5,6 +5,7 @@ import { Link } from 'react-router-dom'; import { Box , LongWidth } from '../../Component/layout'; import RenderHtml from "../../../components/render-html"; import EditMenus from '../Component/editMenus'; +import DropMenu from '../Component/dropMenu'; import NewPanel from '../Component/newPanel'; import Attachments from "../../Upload/attachment"; import AddTagsBox from '../Component/addTagsBox'; @@ -51,7 +52,14 @@ function Details(props){ const [ commentReload, setCommentReload] = useState(undefined); const [ assigner_choose , setAssigner_choose ] = useState([]); + const [ prioritie_choose , setPrioritie_choose ] = useState([]); + const [ status_choose , setStatus_choose ] = useState([]); + const [ tag_choose , setTag_choose ] = useState([]); + const [ millstone_choose , setMillstone_choose ] = useState([]); + const [ branch_choose , setBranch_choose ] = useState([]); const pathname = props.history.location.pathname; + const permission = props && props.projectDetail && props.projectDetail.permission; + let colors = ["#1abcb1","#28be6c","#db3d1d","#db3d1d"]; useEffect(()=>{ if(pathname === `/${owner}/${projectsId}/issues/${index}/copy`){ @@ -77,25 +85,16 @@ function Details(props){ setDetails(data); setAssigner_choose(data.assigners); - - let cIds = data.assigners && data.assigners.length>0 ? data.assigners.map((i)=>{return i.id.toString();}):undefined; - let cNames = data.assigners && data.assigners.length>0 ? data.assigners.map((i)=>{return i.name.toString();}):undefined; - setCharegeId(cIds); - setStatusId([`${data.status && data.status.id}`]); - setPrioritiesId([`${data.priority && data.priority.id}`]); - let tags = data.tags && data.tags.length>0 ? data.tags.map((i)=>{return i.id.toString();}):undefined; - let tagNames = data.tags && data.tags.length>0 ? data.tags.map((i)=>{return i.name.toString();}):undefined; - setTagId(tags); - setMillstoneId((data.milestone && data.milestone.id) ? [`${ data.milestone.id}`] :undefined) - setBranchId(data.branch_name && [data.branch_name]); - const n = { - issue_priorities_name:data.priority ? [`${data.priority.name}`]:undefined, - issue_tag_name:tagNames, - milestone_name:data.milestone ? [`${data.milestone.name}`]:undefined, - status_name:data.status ? [`${data.status.name}`]:undefined, - assigner_name:cNames + if(data.priority && data.priority.id){ + setPrioritie_choose([{...data.priority,color:colors[data.priority.id-1]}]); + }else{ + setPrioritie_choose([]); } - setNames(n); + setStatus_choose(data.status && data.status.id ? [data.status]:[]); + setTag_choose(data.tags); + setMillstone_choose(data.milestone && data.milestone.id ? [data.milestone]:[]); + setBranch_choose(data.branch_name ? [{name:data.branch_name}] : []); + data.start_date && setStartDate(moment(data.start_date).format('YYYY-MM-DD')); data.due_date && setDueDate(moment(data.due_date).format('YYYY-MM-DD')); @@ -143,19 +142,23 @@ function Details(props){ axios.get(url).then(result=>{ if(result && result.data){ let priorities = result.data.priorities; - let array =[]; - let colors = ["#1abcb1","#28be6c","#db3d1d","#db3d1d"]; - if(priorities && priorities.length>0){ - array = priorities.map((i,k)=>{ - let arr = {...i,color:colors[k]} - return arr; - }) - } + let array = addColorForPriorities(priorities); setPrioritiesList(array); } }) } + function addColorForPriorities(list){ + let array =[]; + if(list && list.length>0){ + array = list.map((i,k)=>{ + let arr = {...i,color:colors[k]} + return arr; + }) + } + return array; + } + // 获取负责人列表 useEffect(()=>{ getCharge(); @@ -334,7 +337,7 @@ function Details(props){ /> : - +
@@ -375,27 +378,75 @@ function Details(props){ : "" }
- + {setCommentReload(Math.random())}}/> +
} - {setCommentReload(Math.random())}}/>
- {/* {setCharge(value)}} headImg selectValueList={assigner_choose} - chooseFunc={(list)=>{setAssigner_choose(list)}} + editFlag={details && !details.user_permission} + chooseFunc={(list)=>{setAssigner_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(l);}} double={5} - /> */} + /> - {saveForeach(ids);let copyname = { ...names,assigner_name:name};setNames(copyname);setCharegeId(ids);}} list={chargeList} value={charegeId} searchFlag searchFunc={(value)=>{setCharge(value)}} double={5} editFlag={details && !details.user_permission}/> - {setStatusId(ids);saveForeach(undefined,ids);let copyname = { ...names,status_name:name};setNames(copyname);}} list={statusList} value={statusId} editFlag={details && !details.user_permission}/> - {setPrioritiesId(ids);saveForeach(undefined,undefined,ids);let copyname = { ...names,issue_priorities_name:name};setNames(copyname);}} list={prioritiesList} value={prioritiesId} editFlag={details && !details.user_permission}/> - {setTagId(ids);saveForeach(undefined,undefined,undefined,ids);let copyname = { ...names,issue_tag_name:name};setNames(copyname);}} list={tagList} value={tagId} onAdd={()=>setVisible(true)} searchFlag double={3} searchFunc={(value)=>setTag(value)} editFlag={details && !details.user_permission}/> - {setMillstoneId(ids);saveForeach(undefined,undefined,undefined,undefined,ids);let copyname = { ...names,milestone_name:name};setNames(copyname);}} value={millstoneId} list={millstoneList} searchFlag searchFunc={(value)=>setMillstone(value)} editFlag={details && !details.user_permission}/> - {setBranchId(ids);saveForeach(undefined,undefined,undefined,undefined,undefined,ids);}} value={branchId} list={branchList} searchFlag searchFunc={(value)=>setBranch(value)} editFlag={details && !details.user_permission}/> + {/* {saveForeach(ids);let copyname = { ...names,assigner_name:name};setNames(copyname);setCharegeId(ids);}} list={chargeList} value={charegeId} searchFlag searchFunc={(value)=>{setCharge(value)}} double={5} editFlag={details && !details.user_permission}/> */} + {/* {setStatusId(ids);saveForeach(undefined,ids);let copyname = { ...names,status_name:name};setNames(copyname);}} list={statusList} value={statusId} editFlag={details && !details.user_permission}/> */} + + {setStatus_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(undefined,l);}} + /> + + {setPrioritie_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(undefined,undefined,l);}} + /> + {/* {setPrioritiesId(ids);saveForeach(undefined,undefined,ids);let copyname = { ...names,issue_priorities_name:name};setNames(copyname);}} list={prioritiesList} value={prioritiesId} editFlag={details && !details.user_permission}/> */} + + {setCharge(value)}} + selectValueList={tag_choose} + chooseFunc={(list)=>{setTag_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(undefined,undefined,undefined,l);}} + double={3} + colorFlag + editFlag={details && !details.user_permission} + onAdd={permission && permission !== "Reporter" ? ()=>setVisible(true) :false} + /> + {/* {setTagId(ids);saveForeach(undefined,undefined,undefined,ids);let copyname = { ...names,issue_tag_name:name};setNames(copyname);}} list={tagList} value={tagId} onAdd={()=>setVisible(true)} searchFlag double={3} searchFunc={(value)=>setTag(value)} editFlag={details && !details.user_permission}/> */} + {/* {setMillstoneId(ids);saveForeach(undefined,undefined,undefined,undefined,ids);let copyname = { ...names,milestone_name:name};setNames(copyname);}} value={millstoneId} list={millstoneList} searchFlag searchFunc={(value)=>setMillstone(value)} editFlag={details && !details.user_permission}/> */} + + {setCharge(value)}} + selectValueList={millstone_choose} + chooseFunc={(list)=>{setMillstone_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(undefined,undefined,undefined,undefined,l);}} + /> + {setCharge(value)}} + selectValueList={branch_choose} + editFlag={details && !details.user_permission} + chooseFunc={(list)=>{setBranch_choose(list);let l = list && list.length>0 ?list.map(i=>{return i.id || i.name}):[];saveForeach(undefined,undefined,undefined,undefined,undefined,l);}} + /> + {/* {setBranchId(ids);saveForeach(undefined,undefined,undefined,undefined,undefined,ids);}} value={branchId} list={branchList} searchFlag searchFunc={(value)=>setBranch(value)} editFlag={details && !details.user_permission}/> */} {setStartDate(date);saveForeach(undefined,undefined,undefined,undefined,undefined,undefined,date)}} editFlag={details && !details.user_permission}/> {setDueDate(date);saveForeach(undefined,undefined,undefined,undefined,undefined,undefined,undefined,date)}} editFlag={details && !details.user_permission}/>
diff --git a/src/forge/Issues/Pages/list.jsx b/src/forge/Issues/Pages/list.jsx index 3d334c8f6..c9ac70849 100644 --- a/src/forge/Issues/Pages/list.jsx +++ b/src/forge/Issues/Pages/list.jsx @@ -5,7 +5,7 @@ import issueEmp from '../Img/issue-big.png'; import create from '../Img/create.png'; import { Link } from "react-router-dom"; import AllMenus from '../Component/allMenus'; -import CheckProfile from '../../Component/ProfileModal/Profile' +import CheckProfile from '../../Component/ProfileModal/Profile'; import Datas from '../Component/datas'; import DelBox from '../Component/delBox'; import axios from 'axios'; @@ -188,6 +188,7 @@ function List(props){ status_id: updateIds && updateIds.status_id }).then(result=>{ if(result){ + setUpdateIds(undefined); setAllValue([]); setTotal(undefined); Init(); @@ -248,6 +249,12 @@ function List(props){ } props.history.push(`/${owner}/${projectsId}/issues/new`); } + + function changeCategory(value){ + setCategory(value); + setPage(1); + setTotal(undefined); + } return(
@@ -276,24 +283,24 @@ function List(props){
{ - permission && permission !== "reporter" && + permission && permission !== "Reporter" && 标记管理 } - {props.history.push(`/${owner}/${projectsId}/issues/new`)}} className="operateButton ml20">创建疑修 + {props.history.push(`/${owner}/${projectsId}/issues/new`)}} checklogin className="operateButton ml20">创建疑修
- + { allValue && allValue.length>0 ? 选择{allValue.length}个issue :
    -
  • {setCategory("all");setPage(1)}}>全部{issueTotal}
  • -
  • {setCategory("opened");setPage(1)}}>开启中{openedCount}
  • -
  • {setCategory("closed");setPage(1)}}>已关闭{closedCount}
  • +
  • {changeCategory("all")}}>全部{issueTotal}
  • +
  • {changeCategory("opened")}}>开启中{openedCount}
  • +
  • {changeCategory("closed")}}>已关闭{closedCount}
}
@@ -324,7 +331,7 @@ function List(props){

欢迎使用疑修(Issue)

-

疑修用于记录与跟踪待办事项、项目bug、功能需求等。在使用之前,请您先{props.history.push(`/${owner}/${projectsId}/issues/new`)}} className="color-blue">创建一个疑修

+

疑修用于记录与跟踪待办事项、项目bug、功能需求等。在使用之前,请您先{props.history.push(`/${owner}/${projectsId}/issues/new`)}} className="color-blue">创建一个疑修

:
@@ -339,7 +346,7 @@ function List(props){ return( } + checkbox={(permission && permission !== "Reporter") && } item={item} owner={owner} projectsId={projectsId} diff --git a/src/forge/Issues/Pages/new.jsx b/src/forge/Issues/Pages/new.jsx index b6f1f33ef..e5dc66488 100644 --- a/src/forge/Issues/Pages/new.jsx +++ b/src/forge/Issues/Pages/new.jsx @@ -1,12 +1,11 @@ import React , { useEffect , useState , forwardRef } from 'react'; import { Form } from 'antd'; import { Box , LongWidth } from '../../Component/layout'; -import EditMenus from '../Component/editMenus'; +import DropMenu from '../Component/dropMenu'; import AddTagsBox from '../Component/addTagsBox'; import Date from '../Component/date'; import NewPanel from '../Component/newPanel'; import axios from 'axios'; -import moment from 'moment'; function New(props){ // 里程碑id @@ -25,13 +24,13 @@ function New(props){ const [ branchList , setBranchList ] = useState(undefined); const [ branch , setBranch ] = useState(undefined); - const [ charegeId , setCharegeId ] = useState([]); - const [ statusId , setStatusId ] = useState([`1`]); - const [ names , setNames ] = useState({author_name:undefined,issue_priorities_name:["正常"],issue_tag_name:undefined,milestone_name:undefined,sortby_name:undefined,status_name:['新增'],assigner_name:undefined}); - const [ prioritiesId , setPrioritiesId ] = useState([`2`]); - const [ tagId , setTagId ] = useState([]); - const [ millstoneId , setMillstoneId ] = useState([]); - const [ branchId , setBranchId ] = useState([]); + + const [ assigner_choose , setAssigner_choose ] = useState([]); + const [ prioritie_choose , setPrioritie_choose ] = useState([]); + const [ status_choose , setStatus_choose ] = useState([]); + const [ tag_choose , setTag_choose ] = useState([]); + const [ millstone_choose , setMillstone_choose ] = useState([]); + const [ branch_choose , setBranch_choose ] = useState([]); const [ start_date, setStartDate ] = useState("");//moment().format('YYYY-MM-DD') const [ due_date, setDueDate ] = useState(""); @@ -49,6 +48,12 @@ function New(props){ } },[]) + useEffect(()=>{ + if(milepostId){ + getMillstone(milepostId); + } + },[milepostId]) + // 获取状态列表 useEffect(()=>{ @@ -58,7 +63,11 @@ function New(props){ const url = `/v1/${owner}/${projectsId}/issue_statues`; axios.get(url).then(result=>{ if(result && result.data){ - setStatusList(result.data.statues); + let status = result.data.statues; + setStatusList(status); + if(status && status.length>0){ + setStatus_choose(status.filter(i=>i.id === 1)); + } } }) } @@ -81,6 +90,7 @@ function New(props){ }) } setPrioritiesList(array); + setPrioritie_choose(array.filter(i=>i.id === 2)); } }) } @@ -100,14 +110,19 @@ function New(props){ } // 获取里程碑列表 useEffect(()=>{ - getMillstone(); + getMillstone(millstone); },[millstone]) - function getMillstone(){ + function getMillstone(keyword){ const url = `/v1/${owner}/${projectsId}/milestones`; - axios.get(url,{params:{keyword:millstone,only_name:true}}).then(result=>{ + axios.get(url,{params:{keyword,only_name:true}}).then(result=>{ if(result && result.data){ - setMillstoneList(result.data.milestones); + let milestones = result.data.milestones; + if(milepostId === keyword){ + setMillstone_choose(milestones); + }else{ + setMillstoneList(milestones); + } } }) } @@ -154,14 +169,20 @@ function New(props){ function createFunc(values,fileList,receivers_login,description){ const { subject } = values; const url = `/v1/${owner}/${projectsId}/issues`; + let b = branch_choose && branch_choose.length>0 ? branch_choose.map(i=>{return i.name}) :undefined; + let t = tag_choose && tag_choose.length>0 ? tag_choose.map(i=>{return i.id}) :undefined; + let a = assigner_choose && assigner_choose.length>0 ? assigner_choose.map(i=>{return i.id}) :undefined; + let m = millstone_choose && millstone_choose.length>0 ? millstone_choose.map(i=>{return i.id}) :undefined; + let p = prioritie_choose && prioritie_choose.length>0 ? prioritie_choose.map(i=>{return i.id}) :undefined; + let s = status_choose && status_choose.length>0 ? status_choose.map(i=>{return i.id}) :undefined; axios.post(url,{ description,subject, - branch_name:branchId.join(","), - status_id:statusId.join(","), - priority_id:prioritiesId.join(","), - milestone_id:millstoneId.join(","), - issue_tag_ids:tagId, - assigner_ids:charegeId, + branch_name:b.join(","), + status_id:s.join(","), + priority_id:p.join(","), + milestone_id:m.join(","), + issue_tag_ids:t, + assigner_ids:a, attachment_ids:fileList, start_date,due_date,receivers_login }).then(result=>{ @@ -173,10 +194,6 @@ function New(props){ } - function onAdd(){ - setVisible(true); - } - return(
setVisible(false)} onSuccess={onSuccess} /> -

新建疑修

+

新建疑修

- {setCharegeId(ids);let copyname = { ...names,assigner_name:name};setNames(copyname);}} list={chargeList} searchFlag searchFunc={(value)=>setCharge(value)} double={5}/> - {setStatusId(ids);let copyname = { ...names,status_name:name};setNames(copyname);}} list={statusList} editFlag/> - {setPrioritiesId(ids);let copyname = { ...names,issue_priorities_name:name};setNames(copyname);}} list={prioritiesList}/> - {setTagId(ids);let copyname = { ...names,issue_tag_name:name};setNames(copyname);}} list={tagList} onAdd={onAdd} searchFlag double={3} searchFunc={(value)=>setTag(value)}/> - {setMillstoneId(ids);let copyname = { ...names,milestone_name:name};setNames(copyname);}} list={millstoneList} searchFlag searchFunc={(value)=>setMillstone(value)}/> - setBranchId(ids)} list={branchList} searchFlag searchFunc={(value)=>setBranch(value)}/> + {setCharge(value)}} + headImg + selectValueList={assigner_choose} + chooseFunc={(list)=>{setAssigner_choose(list);}} + double={5} + /> + {setStatus_choose(list);}} + /> + {setPrioritie_choose(list);}} + /> + {setCharge(value)}} + selectValueList={tag_choose} + chooseFunc={(list)=>{setTag_choose(list);}} + double={3} + colorFlag + onAdd={permission && permission !== "Reporter" ? ()=>setVisible(true) :false} + /> + {setCharge(value)}} + selectValueList={millstone_choose} + editFlag={milepostId ? true : false} + chooseFunc={(list)=>{setMillstone_choose(list);}} + /> + {setCharge(value)}} + selectValueList={branch_choose} + chooseFunc={(list)=>{setBranch_choose(list);}} + /> setStartDate(date)}/> setDueDate(date)}/>
diff --git a/src/forge/Issues/Pages/sign.jsx b/src/forge/Issues/Pages/sign.jsx index 75b2b4ba7..f8c5bbd96 100644 --- a/src/forge/Issues/Pages/sign.jsx +++ b/src/forge/Issues/Pages/sign.jsx @@ -27,6 +27,14 @@ function Sign(props){ const owner = props.match.params.owner; const projectsId = props.match.params.projectsId; const { projectDetail } = props; + const permission = projectDetail && props.projectDetail.permission; + + + useEffect(()=>{ + if(!permission || (permission && permission === "Reporter")){ + window.location.href = "/403"; + } + },[permission]) useEffect(()=>{ if(projectDetail){ diff --git a/src/forge/Issues/index.scss b/src/forge/Issues/index.scss index 8bb80a8e5..bc4bfdad6 100644 --- a/src/forge/Issues/index.scss +++ b/src/forge/Issues/index.scss @@ -39,7 +39,7 @@ height:32px; color: #fff!important; cursor: pointer; - line-height: 32px; + line-height: 30px; background-color:rgba(70, 106, 255, 1); border:1px solid rgba(70, 106, 255, 1); border-radius: 4px; @@ -159,8 +159,8 @@ align-items: center; cursor: pointer; &.active{ - color: #333; - font-weight: 500; + color: #466aff; + // font-weight: 500; &>span{ font-weight: normal; color: #466aff; @@ -211,10 +211,15 @@ .idetails{ display: flex; align-items: center; - &>p{ + &>a{ color: #40424a; margin-right: 10px; font-size: 16px; + display: block; + overflow: hidden; + text-overflow: ellipsis; + max-width: 600px; + white-space: nowrap; } } .infos{ @@ -291,7 +296,7 @@ background-color:#28be6c; } &.hight{ - background-color: #db7c1d; + background-color: #db3d1d; } &.urgent{ background-color: #db3d1d; @@ -437,6 +442,18 @@ line-height: 24px; color: #acb0bf; margin-top: 10px; + .colorsquare{ + padding: 0px 8px; + height: 20px; + line-height: 20px; + border-radius: 4px; + color: #fff; + text-align: center; + margin-top: 10px!important; + } + &>p:first-child .colorsquare{ + margin-top: 0px; + } } } } @@ -509,8 +526,8 @@ padding:12px 20px 0px 16px; } .ant-menu{ - padding:12px 16px 10px 16px; - max-height: 338px; + padding:10px 16px 10px 16px; + max-height: 324px; overflow-y: auto; li{ padding:0px 16px; @@ -536,13 +553,19 @@ } } //详情页面 -.detailbanner{ +.editpanel{ + padding:20px; margin-top: 25px; - // height:82px; - background-color:#fafcff; border:1px solid rgba(42, 97, 255, 0.23); - border-radius:4px; - padding:12px 25px 12px 20px; + border-radius: 2px; +} +.detailbanner{ + // margin-top: 25px; + // height:82px; + // background-color:#fafcff; + // border:1px solid rgba(42, 97, 255, 0.23); + // border-radius:4px; + // padding:12px 25px 12px 20px; display: flex; align-items: center; justify-content: space-between; @@ -572,11 +595,11 @@ } } .descPanel{ - margin-top:20px; - padding:20px; + margin-top:30px; + // padding:20px; // background-color: #f7f8fd; - border:1px solid #c9d8ff; - border-radius: 2px; + // border:1px solid #c9d8ff; + // border-radius: 2px; } // 新建页面 .explain{ diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 309535ae8..b5bd64832 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -476,7 +476,7 @@ function CoderDepot(props){ } { issuesFlag && - + 疑修 + + 疑修 }
diff --git a/src/forge/Order/MilepostDetail.jsx b/src/forge/Order/MilepostDetail.jsx index 4d064cb6e..aabc5677a 100644 --- a/src/forge/Order/MilepostDetail.jsx +++ b/src/forge/Order/MilepostDetail.jsx @@ -5,6 +5,7 @@ import AllMenus from './component/allMenus'; import Datas from '../Issues/Component/datas'; import axios from 'axios'; import { FlexAJ } from '../Component/layout'; +import CheckProfile from '../Component/ProfileModal/Profile'; import './milepost.scss'; import './order.scss'; import '../Issues/index.scss'; @@ -193,11 +194,12 @@ function MilepostDetail(props){ 编辑里程碑 :"" } - { + {/* { current_user && current_user.login ? : - } + } */} + {history.push(`/${owner}/${projectsId}/issues/${mileId}/new`)}} checklogin className="operateButton ml20">+ 创建疑修
}
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index 2a675fd6b..51d252060 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -4,6 +4,9 @@ ul,ol,dl{ .markdown-body{ overflow: inherit; } +.markdown-body .editormd-tex .katex-display>.katex{ + white-space: pre-wrap; +} .markdown-body a{ color: #466AFF; }