Skip to content

Commit

Permalink
Merge pull request #30 from a54552239/dev
Browse files Browse the repository at this point in the history
v2.8.8
  • Loading branch information
a54552239 authored Feb 22, 2020
2 parents c7fa9ea + e382942 commit e3f07f1
Show file tree
Hide file tree
Showing 13 changed files with 312 additions and 65 deletions.
Binary file modified public/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions src/api/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ export function analysis(data) {
export function _projectStats(data) {
return $http.post('project/project/_projectStats', data);
}
export function _getProjectReport(data) {
return $http.post('project/project/_getProjectReport', data);
}
17 changes: 17 additions & 0 deletions src/api/projectInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import $http from '@/assets/js/http'

export function list(data) {
return $http.post('project/project_info', data);
}

export function doData(data) {
let url = 'project/project_info/save';
if (data.infoCode) {
url = 'project/project_info/edit';
}
return $http.post(url, data);
}

export function del(data) {
return $http.post('project/project_info/delete', data);
}
3 changes: 3 additions & 0 deletions src/api/projectMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ export function removeMember(memberCode, code) {
export function list(data) {
return $http.post('project/project_member/index', data);
}
export function _listForInvite(data) {
return $http.post('project/project_member/_listForInvite', data);
}
3 changes: 3 additions & 0 deletions src/api/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export function read(code) {
return $http.post('project/account/read', {code: code});
}

export function syncDetail(data) {
return $http.post('project/account/_syncDetail', data);
}
export function editAccount(data) {
return $http.post('project/account/edit', data);
}
Expand Down
58 changes: 36 additions & 22 deletions src/components/project/inviteProjectMember.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<a-modal
class="invite-project-member"
:width="360"
:width="500"
v-model="actionInfo.modalStatus"
:title="actionInfo.modalTitle"
:footer="null"
Expand All @@ -12,20 +12,21 @@
<span>账号邀请</span>
<a @click="createInviteLink">通过链接邀请</a>
</div>
<div class="search-content">
<div class="search-content m-b">
<a-input v-model="keyword" placeholder="输入昵称或邮箱查找">
<a-icon slot="prefix" type="search"/>
</a-input>
</div>
<div class="member-list">
<a-list
class="project-list"
itemLayout="horizontal"
:loading="searching"
:dataSource="list"
:locale="{emptyText: (keyword && keyword.length > 1) ? '没有搜索到相关成员' : ''}"
>
<a-list-item slot="renderItem" slot-scope="item">
<vue-scroll>
<div class="member-list">
<a-list
class="project-list"
itemLayout="horizontal"
:loading="searching"
:dataSource="list"
:locale="{emptyText: (keyword && keyword.length > 1) ? '没有搜索到相关成员' : ''}"
>
<a-list-item slot="renderItem" slot-scope="item">
<span slot="actions">
<a-button size="small" type="dashed" icon="user-add"
v-if="!item.joined"
Expand All @@ -36,15 +37,16 @@
<span> 已加入</span>
</template>
</span>
<a-list-item-meta
:description="item.email"
>
<span slot="title">{{item.name}}</span>
<a-avatar slot="avatar" icon="user" :src="item.avatar"/>
</a-list-item-meta>
</a-list-item>
</a-list>
</div>
<a-list-item-meta
:description="item.email"
>
<span slot="title">{{item.name}}</span>
<a-avatar slot="avatar" icon="user" :src="item.avatar"/>
</a-list-item-meta>
</a-list-item>
</a-list>
</div>
</vue-scroll>
</a-modal>
<a-modal
class="invite-link"
Expand All @@ -70,7 +72,7 @@
<script>
import _ from 'lodash'
import moment from 'moment';
import {inviteMember, searchInviteMember} from "../../api/projectMember";
import {inviteMember, searchInviteMember, _listForInvite} from "../../api/projectMember";
import {checkResponse} from "../../assets/js/utils";
import {createInviteLink} from "../../api/common/common";
Expand Down Expand Up @@ -119,7 +121,16 @@
this.search();
}
},
created() {
this.getMembers();
},
methods: {
getMembers() {
let app = this;
_listForInvite({projectCode: app.projectCode}).then(res=>{
app.list = res.data;
});
},
invite(item) {
inviteMember(item.memberCode, this.projectCode).then((res) => {
const success = checkResponse(res);
Expand Down Expand Up @@ -148,6 +159,7 @@
this.list = [];
}
if (this.keyword.length <= 1) {
this.getMembers();
return false;
}
this.searching = true;
Expand All @@ -169,6 +181,7 @@
.invite-project-member {
.ant-modal-body {
padding-top: 0;
padding-right: 12px;
padding-bottom: 24px;
min-height: 40vh;
}
Expand All @@ -181,7 +194,8 @@
}
.member-list {
padding-top: 12px;
padding-right: 12px;
max-height: 400px;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/project/projectConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@
this.project.open_prefix = !!res.data.open_prefix;
this.project.open_begin_time = !!res.data.open_begin_time;
this.project.open_task_private = !!res.data.open_task_private;
this.project.auto_update_schedule = !!res.data.auto_update_schedule;
});
},
getTaskWorkflowList() {
Expand Down
2 changes: 1 addition & 1 deletion src/config/version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
VERSION: '2.8.6',
VERSION: '2.8.8',
};
17 changes: 15 additions & 2 deletions src/views/members/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
<div class="mail muted">
<a-icon type="mail"></a-icon>
{{member.email}}
<a-tooltip>
<template slot="title">
<span>更新基础资料</span>
</template>
<a class="muted m-l-sm" @click="syncDetail">
<a-icon type="reload"/>
</a>
</a-tooltip>
</div>
</template>
</div>
Expand Down Expand Up @@ -148,7 +156,7 @@
</div>
<div slot="description">
<span class="m-l-sm">{{item.description}}</span>
<!-- <a-progress :strokeWidth="5" :percent="item.schedule"/>-->
<!-- <a-progress :strokeWidth="5" :percent="item.schedule"/>-->
</div>
</a-list-item-meta>
</a-list-item>
Expand Down Expand Up @@ -249,7 +257,7 @@
import taskDetail from '@/components/project/taskDetail'
import pagination from "../../mixins/pagination";
import {checkResponse} from "../../assets/js/utils";
import {editAccount, read} from "../../api/user";
import {editAccount, read, syncDetail} from "../../api/user";
import {selfList} from "../../api/task";
import {selfList as getProjectList} from "../../api/project";
import {formatTaskTime} from "../../assets/js/dateTime";
Expand Down Expand Up @@ -314,6 +322,11 @@
this.member = res.data;
});
},
syncDetail() {
syncDetail({code: this.code}).then(res => {
this.getMember();
});
},
getTasks() {
this.task.loading = true;
selfList({
Expand Down
8 changes: 4 additions & 4 deletions src/views/project/space/features.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
<section class="nav-body">
<ul class="nav-wrapper nav nav-underscore pull-left">
<li><a class="app" data-app="tasks"
@click="$router.push('/project/space/task/' + project.code)">任务</a></li>
@click="$router.push('/project/space/task/' + code)">任务</a></li>
<li class=""><a class="app" data-app="works"
@click="$router.push('/project/space/files/' + project.code)">
@click="$router.push('/project/space/files/' + code)">
文件</a>
<li><a class="app" data-app="build"
@click="$router.push('/project/space/overview/' + project.code)">
@click="$router.push('/project/space/overview/' + code)">
概览</a>
</li>
<li class="actives"><a class="app" data-app="build"
@click="$router.push('/project/space/features/' + project.code)">
@click="$router.push('/project/space/features/' + code)">
版本</a>
</li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions src/views/project/space/files.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
<section class="nav-body">
<ul class="nav-wrapper nav nav-underscore pull-left">
<li><a class="app" data-app="tasks"
@click="$router.push('/project/space/task/' + project.code)">任务</a></li>
@click="$router.push('/project/space/task/' + code)">任务</a></li>
<li class="actives"><a class="app" data-app="works"
@click="$router.push('/project/space/files/' + project.code)">
@click="$router.push('/project/space/files/' + code)">
文件</a>
<li><a class="app" data-app="build"
@click="$router.push('/project/space/overview/' + project.code)">
@click="$router.push('/project/space/overview/' + code)">
概览</a>
</li>
<li class=""><a class="app" data-app="build"
@click="$router.push('/project/space/features/' + project.code)">
@click="$router.push('/project/space/features/' + code)">
版本</a>
</li>
</ul>
Expand Down
Loading

0 comments on commit e3f07f1

Please sign in to comment.