This commit is contained in:
caishi 2020-06-29 16:32:39 +08:00
parent 7c85ff88a9
commit 10bf79843d
11 changed files with 186 additions and 46 deletions

View File

@ -14,7 +14,7 @@ li.ant-menu-item{
align-items: center;
padding:20px 34px;
background-color: #fff;
margin:18px 0px;
margin-bottom:18px;
.img{
margin-right: 20px;
width: 190px;

View File

@ -48,8 +48,8 @@ export const WhiteBack = styled.div`{
border-radius:5px;
}`
export const Blueline = styled.a`{
height:32px;
line-height:30px;
height:30px;
line-height:28px;
border-radius:2px;
border:1px solid rgba(80,145,255,1);
color:rgba(80,145,255,1);
@ -57,8 +57,8 @@ export const Blueline = styled.a`{
display:inline-block;
}`
export const Redline = styled.a`{
height:32px;
line-height:32px;
height:30px;
line-height:28px;
border-radius:2px;
border:1px solid #F73030;
color:#F73030;
@ -68,8 +68,8 @@ export const Redline = styled.a`{
text-align:center;
}`
export const Greenline = styled.a`{
height:32px;
line-height:32px;
height:30px;
line-height:28px;
border-radius:2px;
border:1px solid #28BD6C;
color:#28BD6C;
@ -78,6 +78,28 @@ export const Greenline = styled.a`{
min-width:80px;
text-align:center;
}`
export const Greenback = styled.a`{
height:30px;
line-height:30px;
border-radius:2px;
background-color:#28BD6C;
color:#fff;
padding:0px 12px;
display:inline-block;
min-width:80px;
text-align:center;
}`
export const Redback = styled.a`{
height:30px;
line-height:30px;
border-radius:2px;
background-color:#F73030;
color:#fff;
padding:0px 12px;
display:inline-block;
min-width:80px;
text-align:center;
}`
export const NumUl = styled.ul`{
padding-left: 20px;
& > li{

View File

@ -163,7 +163,7 @@ class NewMerge extends Component {
</div>
</div>
{show_message ? (
<div className="mb50 mt50">
<div className="mb10">
<Alert
description={withHtml(default_message)}
type="error"
@ -175,7 +175,7 @@ class NewMerge extends Component {
}
</Spin>
</div>
<div className=" main">
<div className="main" style={{paddingTop:"5px"}}>
<MergeFooter footer_type="new" {...this.props}></MergeFooter>
</div>

View File

@ -5,7 +5,7 @@
.setInputAddon .ant-input-group-addon{
height: 30px;
line-height: 30px;
border-left: 1px solid #d9d9d9!important;
border: 1px solid #d9d9d9!important;
border-right: none!important;
}

View File

@ -55,7 +55,6 @@ class order extends Component {
allValue: [],
all: false,
select_params: {
status_type: "1", //开启中和关闭中,全部,默认为全部
assigned_to_id: undefined, // 负责人
author_id: undefined, // 发布人
issue_tag_id: undefined, // 标签
@ -77,7 +76,7 @@ class order extends Component {
componentDidMount = () => {
this.getSelectList();
this.getIssueList();
this.getIssueList('1');
};
getSelectList = () => {
@ -101,7 +100,7 @@ class order extends Component {
};
// 获取列表数据
getIssueList = (begin, end) => {
getIssueList = (status_type , begin, end) => {
this.setState({
isSpin: true
})
@ -113,7 +112,8 @@ class order extends Component {
params: {
...select_params,
start_date: begin,
due_date: end
due_date: end,
status_type
}
})
.then((result) => {
@ -165,7 +165,8 @@ class order extends Component {
this.state.select_params.order_name = key_name[0];
this.state.select_params.order_type = e.item.props.value;
this.state.select_params.page = 1;
this.getIssueList();
const { status_type } = this.state;
this.getIssueList(status_type);
};
getOption = (e, id, name,toGet) => {
@ -192,7 +193,8 @@ class order extends Component {
assigned_to_id
});
if(!toGet){
this.getIssueList();
const { status_type } = this.state;
this.getIssueList(status_type);
}
};
@ -225,8 +227,10 @@ class order extends Component {
checkedValue: [],
all: false
});
const { status_type } = this.state;
this.state.select_params.page = page;
this.getIssueList();
this.getIssueList(status_type);
};
// 搜索
@ -235,9 +239,11 @@ class order extends Component {
search: value,
isSpin: true,
});
const { status_type } = this.state;
this.state.select_params.search = value;
this.state.select_params.page = 1;
this.getIssueList();
this.getIssueList(status_type);
};
openorder = (type) => {
@ -254,12 +260,11 @@ class order extends Component {
paix: "排序",
});
this.state.select_params = {
status_type: type,
search: undefined,
page: 1,
limit: 15,
};
this.getIssueList();
this.getIssueList(type);
};
// 筛选:全部、指派给我、由我创建
@ -269,7 +274,7 @@ class order extends Component {
isSpin: true,
});
if (type) {
if (current_user === undefined) {
if (!current_user) {
this.setState({
isSpin: false,
});
@ -304,8 +309,9 @@ class order extends Component {
this.state.select_params.assigned_to_id = undefined;
this.state.select_params.author_id = undefined;
}
const { status_type } = this.state;
this.getIssueList();
this.getIssueList(status_type);
};
deletedetail = (id) => {
@ -319,7 +325,9 @@ class order extends Component {
})
.then((result) => {
if (result) {
this.getIssueList();
const { status_type } = this.state;
this.getIssueList(status_type);
}
})
.catch((error) => {
@ -339,16 +347,18 @@ class order extends Component {
// 修改开始时间
changeBeginTime = (data, value) => {
const { status_type } = this.state;
this.setState({
begin: value
})
this.getIssueList(value, this.state.end);
this.getIssueList(status_type,value, this.state.end);
}
changeEndTime = (data, value) => {
const { status_type } = this.state;
this.setState({
end: value
})
this.getIssueList(this.state.begin, value);
this.getIssueList(status_type,this.state.begin, value);
}
// 选择列表里面的checkbox
@ -395,6 +405,11 @@ class order extends Component {
updateIssues=()=>{
const {checkedValue , select_params} = this.state;
const { projectsId } = this.props.match.params;
if(!select_params.update_author_id && !select_params.update_fixed_version_id &&!select_params.update_status_id ){
this.resetSelectParams();
return;
}
this.setState({
isSpin:true
})
@ -415,6 +430,12 @@ class order extends Component {
}
successFunc=()=>{
this.resetSelectParams();
const { status_type } = this.state;
this.getIssueList(status_type);
}
resetSelectParams=()=>{
let select_params = this.state.select_params;
select_params.update_author_id = undefined;
select_params.update_fixed_version_id = undefined;
@ -427,7 +448,6 @@ class order extends Component {
update_status_ids:"修改状态",
select_params
})
this.getIssueList();
}
// 批量删除

View File

@ -468,7 +468,7 @@ class Collaborator extends Component {
<Spin spinning={isSpin}>
<div className="collaboratorList baseForm">
{listData ? (
{listData && listData.length>0 ? (
<Table
pagination={false}
columns={columns}

View File

@ -25,6 +25,9 @@
.baseForm{
padding:15px 30px!important;
}
.collaboratorList{
min-height: 400px;
}
.iteminline{
display: flex;
align-items: center;
@ -172,6 +175,10 @@
}
.ant-table-tbody > tr > td{
border-bottom: none;
padding:15px 8px 15px 0px;
}
.ant-table-tbody > tr > td:last-child{
padding-right: 0px;
}
}

View File

@ -1,32 +1,35 @@
import React , { useState } from 'react';
import { Box , Long , Short , Gap , Banner , WhiteBack } from '../../Component/layout';
import { Box , Long , Short , Gap , WhiteBack } from '../../Component/layout';
import Title from '../../Component/Title';
import Setnav from '../../Component/Setnav';
import styled from 'styled-components';
const Div = styled.div`{
padding:18px 30px;
}`
import { Route, Switch } from "react-router-dom";
import Loadable from "react-loadable";
import Loading from "../../../Loading";
const Common = Loadable({
loader: () => import("./SettingCommon"),
loading: Loading,
});
export default (props)=>{
const pathname = props.location.pathname;
const organizeId = props.match.params.organizeId;
const memberId = props.match.params.memberId;
function returnActive (pathname){
let a = 0;
if(pathname === `/organize/${organizeId}/setting/member`){
if(pathname === `/organize/${organizeId}/member/${memberId}/setting/member`){
a = 1;
}else if(pathname === `/organize/${organizeId}/setting/group`){
}else if(pathname === `/organize/${organizeId}/member/${memberId}/setting/project`){
a = 2;
}else if(pathname === `/organize/${organizeId}/setting/hooks`){
a = 3;
}
return a;
}
const active = returnActive(pathname);
const array = {list:[
{name:'基本设置',icon:"icon-base",href:`/organize/${organizeId}/setting`},
{name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/organize/${organizeId}/setting/member`},
{name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/organize/${organizeId}/setting/group`},
{name:'基本设置',icon:"icon-base",href:`/organize/${organizeId}/member/${memberId}/setting`},
{name:'团队成员管理',icon:"icon-zuzhichengyuan",href:`/organize/${organizeId}/member/${memberId}/setting/member`},
{name:'团队项目管理',icon:"icon-zuzhixiangmu",href:`/organize/${organizeId}/member/${memberId}/setting/project`},
],
active
}
@ -38,10 +41,14 @@ export default (props)=>{
<Long>
<Gap>
<WhiteBack>
<Banner>团队项目管理</Banner>
<Div>
</Div>
<Switch>
<Route
path="/organize/:organizeId/member/:memberId/setting"
render={() => (
<Common {...props} />
)}
></Route>
</Switch>
</WhiteBack>
</Gap>
</Long>

View File

@ -0,0 +1,67 @@
import React , { useState } from 'react';
import { AutoComplete , Pagination } from 'antd';
import { Banner , Blueline , FlexAJ , Greenback , Redback } from '../../Component/layout';
import styled from 'styled-components';
const Option = AutoComplete.Option;
const Div = styled.div`{
padding:18px 30px;
}`;
const LIMIT = 15;
const demoData=[{name:"Python相关",id:1},{name:"Python相关",id:2}];
export default ()=>{
const [ searchKey , setSearchKey ] = useState(undefined);
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(0);
function changeInputUser(){}
function selectInputUser(){}
//
function ChangePage(page){
setPage(page);
}
const source = demoData && demoData.map((item,key)=>{
return(
<Option key={key} value={`${item.id}`}>{item.name}</Option>
)
})
return(
<div>
<Banner>团队项目管理</Banner>
<Div>
<FlexAJ className="actionNav">
<div>
<AutoComplete
dataSource={source}
value={searchKey}
style={{ width: 270 }}
onChange={changeInputUser}
onSelect={selectInputUser}
placeholder="搜索项目…"
/>
<Blueline className="ml30">+&nbsp;添加项目</Blueline>
</div>
<span>
<Greenback>添加所有</Greenback>
<Redback className="ml20">移除所有</Redback>
</span>
</FlexAJ>
<div className="GSlist">
<div>
<span>
caishi/前端v0.1
</span>
<a style={{color:"#F73030"}}>移除</a>
</div>
</div>
{
total > LIMIT ?
<div className="edu-txt-center mt30 mb20">
<Pagination simple defaultCurrent={page} total={total} pageSize={LIMIT} onChange={ChangePage}></Pagination>
</div>:""
}
</Div>
</div>
)
}

View File

@ -38,6 +38,7 @@
.teamDetail{
width: 1200px;
margin:0px auto;
padding-top:18px;
}
.list{
display: flex;
@ -322,3 +323,19 @@
}
}
// 组织团队设置
.actionNav{
padding:20px 30px;
background-color: #FAFAFA;
}
.GSlist{
padding-top:15px;
min-height: 400px;
&>div{
padding:20px 0px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
}
}

View File

@ -31,19 +31,19 @@ export default ((props)=>{
<Switch {...props}>
<Route
path="/organize/:organizeId/member/:memberId/setting"
render={(props) => {
render={() => {
return <GroupSetting {...props} />
}}
></Route>
<Route
path="/organize/:organizeId/setting"
render={(props) => {
render={() => {
return <Setting {...props} />
}}
></Route>
<Route
path="/organize/:organizeId"
render={(props) => {
render={() => {
return <DetailIndex {...props} />
}}
></Route>