Browse Source

no message

kuaifan 5 years ago
parent
commit
8304969bcc

+ 265 - 34
app/Http/Controllers/Api/ProjectController.php

@@ -27,6 +27,9 @@ class ProjectController extends Controller
 
     /**
      * 项目列表
+     *
+     * @apiParam {Number} [page]                当前页,默认:1
+     * @apiParam {Number} [pagesize]            每页显示数量,默认:20,最大:100
      */
     public function lists()
     {
@@ -55,6 +58,9 @@ class ProjectController extends Controller
 
     /**
      * 添加项目
+     *
+     * @apiParam {String} title     项目名称
+     * @apiParam {Array} labels     流程,格式[流程1, 流程2]
      */
     public function add()
     {
@@ -122,6 +128,12 @@ class ProjectController extends Controller
 
     /**
      * 收藏项目
+     *
+     * @apiParam {String} act
+     * - cancel: 取消收藏
+     * - else: 添加收藏
+     * @apiParam {Number} projectid     项目ID
+     *
      * @throws \Throwable
      */
     public function favor()
@@ -139,34 +151,58 @@ class ProjectController extends Controller
             return Base::retError('项目不存在或已被删除!');
         }
         return DB::transaction(function () use ($item, $user) {
-            $row = Base::DBC2A(DB::table('project_users')->where([
-                'type' => '收藏',
-                'projectid' => $item['id'],
-                'username' => $user['username'],
-            ])->lockForUpdate()->first());
-            if (empty($row)) {
-                DB::table('project_users')->insert([
-                    'type' => '收藏',
-                    'projectid' => $item['id'],
-                    'isowner' => $item['username'] == $user['username'] ? 1 : 0,
-                    'username' => $user['username'],
-                    'indate' => Base::time()
-                ]);
-                DB::table('project_log')->insert([
-                    'type' => '日志',
-                    'projectid' => $item['id'],
-                    'username' => $user['username'],
-                    'detail' => '收藏项目',
-                    'indate' => Base::time()
-                ]);
-                return Base::retSuccess('收藏成功');
+            switch (Request::input('act')) {
+                case 'cancel': {
+                    if (DB::table('project_users')->where([
+                        'type' => '收藏',
+                        'projectid' => $item['id'],
+                        'username' => $user['username'],
+                    ])->delete()) {
+                        DB::table('project_log')->insert([
+                            'type' => '日志',
+                            'projectid' => $item['id'],
+                            'username' => $user['username'],
+                            'detail' => '取消收藏',
+                            'indate' => Base::time()
+                        ]);
+                        return Base::retSuccess('取消成功');
+                    }
+                    return Base::retSuccess('已取消');
+                }
+                default: {
+                    $row = Base::DBC2A(DB::table('project_users')->where([
+                        'type' => '收藏',
+                        'projectid' => $item['id'],
+                        'username' => $user['username'],
+                    ])->lockForUpdate()->first());
+                    if (empty($row)) {
+                        DB::table('project_users')->insert([
+                            'type' => '收藏',
+                            'projectid' => $item['id'],
+                            'isowner' => $item['username'] == $user['username'] ? 1 : 0,
+                            'username' => $user['username'],
+                            'indate' => Base::time()
+                        ]);
+                        DB::table('project_log')->insert([
+                            'type' => '日志',
+                            'projectid' => $item['id'],
+                            'username' => $user['username'],
+                            'detail' => '收藏项目',
+                            'indate' => Base::time()
+                        ]);
+                        return Base::retSuccess('收藏成功');
+                    }
+                    return Base::retSuccess('已收藏');
+                }
             }
-            return Base::retSuccess('已收藏');
         });
     }
 
     /**
      * 重命名项目
+     *
+     * @apiParam {Number} projectid     项目ID
+     * @apiParam {String} title         项目新名称
      */
     public function rename()
     {
@@ -209,6 +245,10 @@ class ProjectController extends Controller
 
     /**
      * 移交项目
+     *
+     * @apiParam {Number} projectid     项目ID
+     * @apiParam {String} username      项目新负责人用户名
+     *
      * @throws \Throwable
      */
     public function transfer()
@@ -244,18 +284,18 @@ class ProjectController extends Controller
             'username' => $username,
         ])->count();
         if ($count <= 0) {
-            DB::table('project_log')->insert([
-                'type' => '日志',
+            DB::table('project_users')->insert([
+                'type' => '成员',
                 'projectid' => $item['id'],
+                'isowner' => 0,
                 'username' => $username,
-                'detail' => '加入项目',
                 'indate' => Base::time()
             ]);
-            DB::table('project_users')->insert([
-                'type' => '成员',
+            DB::table('project_log')->insert([
+                'type' => '日志',
                 'projectid' => $item['id'],
-                'isowner' => 0,
                 'username' => $username,
+                'detail' => '移交项目,自动加入项目',
                 'indate' => Base::time()
             ]);
         }
@@ -289,6 +329,8 @@ class ProjectController extends Controller
 
     /**
      * 删除项目
+     *
+     * @apiParam {Number} projectid     项目ID
      */
     public function delete()
     {
@@ -325,6 +367,8 @@ class ProjectController extends Controller
 
     /**
      * 退出项目
+     *
+     * @apiParam {Number} projectid     项目ID
      */
     public function out()
     {
@@ -345,7 +389,7 @@ class ProjectController extends Controller
         }
         $count = DB::table('project_users')->where([
             'type' => '成员',
-            'projectid' => $item['id'],
+            'projectid' => $projectid,
             'username' => $user['username'],
         ])->count();
         if ($count <= 0) {
@@ -369,9 +413,13 @@ class ProjectController extends Controller
     }
 
     /**
-     * 项目成员
+     * 项目成员-列表
+     *
+     * @apiParam {Number} projectid             项目ID
+     * @apiParam {Number} [page]                当前页,默认:1
+     * @apiParam {Number} [pagesize]            每页显示数量,默认:20,最大:100
      */
-    public function users()
+    public function users__lists()
     {
         $user = Users::authE();
         if (Base::isError($user)) {
@@ -413,7 +461,101 @@ class ProjectController extends Controller
     }
 
     /**
-     * 任务-列表
+     * 项目成员-添加、删除
+     *
+     * @apiParam {String} act
+     * - delete: 删除成员
+     * - else: 添加成员
+     * @apiParam {Number} projectid             项目ID
+     * @apiParam {Array|String} username        用户名(或用户名组)
+     */
+    public function users__join()
+    {
+        $user = Users::authE();
+        if (Base::isError($user)) {
+            return $user;
+        } else {
+            $user = $user['data'];
+        }
+        //
+        $projectid = trim(Request::input('projectid'));
+        $item = Base::DBC2A(DB::table('project_lists')->where('id', $projectid)->first());
+        if (empty($item)) {
+            return Base::retError('项目不存在或已被删除!');
+        }
+        if ($item['username'] != $user['username']) {
+            return Base::retError('你是不是项目负责人!');
+        }
+        $usernames = Request::input('username');
+        if (empty($usernames)) {
+            return Base::retError('参数错误!');
+        }
+        if (!is_array($usernames)) {
+            if (Base::strExists($usernames, ',')) {
+                $usernames = explode(',', $usernames);
+            } else {
+                $usernames = [$usernames];
+            }
+        }
+        //
+        $logArray = [];
+        foreach ($usernames AS $username) {
+            $count = DB::table('project_users')->where([
+                'type' => '成员',
+                'projectid' => $projectid,
+                'username' => $username,
+            ])->count();
+            switch (Request::input('act')) {
+                case 'delete': {
+                    if ($count > 0 && $item['username'] != $username) {
+                        DB::table('project_users')->where([
+                            'type' => '成员',
+                            'projectid' => $projectid,
+                            'username' => $username,
+                        ])->delete();
+                        $logArray[] = [
+                            'type' => '日志',
+                            'projectid' => $item['id'],
+                            'username' => $user['username'],
+                            'detail' => '将成员【' . $username . '】移出项目',
+                            'indate' => Base::time()
+                        ];
+                    }
+                    break;
+                }
+                default: {
+                    if ($count == 0) {
+                        DB::table('project_users')->insert([
+                            'type' => '成员',
+                            'projectid' => $projectid,
+                            'isowner' => 0,
+                            'username' => $username,
+                            'indate' => Base::time()
+                        ]);
+                        $logArray[] = [
+                            'type' => '日志',
+                            'projectid' => $item['id'],
+                            'username' => $username,
+                            'detail' => '将成员【' . $username . '】加入项目',
+                            'indate' => Base::time()
+                        ];
+                    }
+                    break;
+                }
+            }
+        }
+        return Base::retSuccess('操作完成');
+    }
+
+    /**
+     * 项目任务-列表
+     *
+     * @apiParam {Number} projectid             项目ID
+     * @apiParam {Number} [archived]            是否归档
+     * - 0: 未归档
+     * - 1: 已归档
+     * @apiParam {Number} [page]                当前页,默认:1
+     * @apiParam {Number} [pagesize]            每页显示数量,默认:20,最大:100
      */
     public function task__lists()
     {
@@ -424,10 +566,22 @@ class ProjectController extends Controller
             $user = $user['data'];
         }
         //
+        $projectid = intval(Request::input('projectid'));
+        $count = DB::table('project_users')->where([
+            'type' => '成员',
+            'projectid' => $projectid,
+            'username' => $user['username'],
+        ])->count();
+        if ($count <= 0) {
+            return Base::retError('你不在项目成员内!');
+        }
+        //
         $whereArray = [];
+        $whereArray[] = ['project_lists.id', '=', $projectid];
         $whereArray[] = ['project_lists.delete', '=', 0];
-        if (Request::input('projectid') > 0) $whereArray[] = ['project_lists.id', '=', intval(Request::input('projectid'))];
-        if (in_array(intval(Request::input('archived')), [0, 1])) $whereArray[] = ['project_task.archived', '=', Request::input('archived')];
+        if (in_array(intval(Request::input('archived')), [0, 1])) {
+            $whereArray[] = ['project_task.archived', '=', Request::input('archived')];
+        }
         //
         $orderBy = 'project_task.id';
         if (intval(Request::input('archived')) === 1) {
@@ -445,4 +599,81 @@ class ProjectController extends Controller
         }
         return Base::retSuccess('success', $lists);
     }
+
+    /**
+     * 项目任务-归档、取消归档
+     *
+     * @apiParam {String} act
+     * - cancel: 取消归档
+     * - else: 加入归档
+     * @apiParam {Number} taskid             任务ID
+     */
+    public function task__archived()
+    {
+        $user = Users::authE();
+        if (Base::isError($user)) {
+            return $user;
+        } else {
+            $user = $user['data'];
+        }
+        //
+        $taskid = intval(Request::input('taskid'));
+        $task = Base::DBC2A(DB::table('project_lists')
+            ->join('project_task', 'project_lists.id', '=', 'project_task.projectid')
+            ->select(['project_task.projectid', 'project_task.title', 'project_task.archived'])
+            ->where([
+                ['project_lists.delete', '=', 0],
+                ['project_task.id', '=', $taskid],
+            ])
+            ->first());
+        if (empty($task)) {
+            return Base::retError('任务不存在!');
+        }
+        $count = DB::table('project_users')->where([
+            'type' => '成员',
+            'projectid' => $task['projectid'],
+            'username' => $user['username'],
+        ])->count();
+        if ($count <= 0) {
+            return Base::retError('你不在项目成员内!');
+        }
+        //
+        switch (Request::input('act')) {
+            case 'cancel': {
+                if ($task['archived'] == 0) {
+                    return Base::retError('任务未归档!');
+                }
+                DB::table('project_task')->where('id', $taskid)->update([
+                    'archived' => 1,
+                    'archiveddate' => Base::time()
+                ]);
+                DB::table('project_log')->insert([
+                    'type' => '日志',
+                    'projectid' => $task['projectid'],
+                    'taskid' => $taskid,
+                    'username' => $user['username'],
+                    'detail' => '取消归档【' . $task['title'] . '】',
+                    'indate' => Base::time()
+                ]);
+                return Base::retSuccess('取消归档成功');
+            }
+            default: {
+                if ($task['archived'] == 1) {
+                    return Base::retError('任务已归档!');
+                }
+                DB::table('project_task')->where('id', $taskid)->update([
+                    'archived' => 0,
+                ]);
+                DB::table('project_log')->insert([
+                    'type' => '日志',
+                    'projectid' => $task['projectid'],
+                    'taskid' => $taskid,
+                    'username' => $user['username'],
+                    'detail' => '归档【' . $task['title'] . '】',
+                    'indate' => Base::time()
+                ]);
+                return Base::retSuccess('加入归档成功');
+            }
+        }
+    }
 }

+ 78 - 25
resources/assets/js/main/components/UseridInput.vue

@@ -1,5 +1,9 @@
 <template>
-    <div v-clickoutside="handleClose">
+    <div v-clickoutside="handleClose" @click="handleClose">
+        <div v-if="multipleLists.length > 0" class="user-id-multiple">
+            <Tag v-for="(item, index) in multipleLists" :key="index" @on-close="() => { multipleLists.splice(index, 1); callMultipleLists() }" closable>{{item.nickname || item.username}}</Tag>
+        </div>
+
         <div class="user-id-input" ref="reference">
             <Input v-model="nickName" :placeholder="placeholder" :disabled="disabled" icon="md-search" @on-click="searchEnter" @on-enter="searchEnter" @on-blur="searchEnter(true)">
                 <div v-if="$slots.prepend !== undefined" slot="prepend"><slot name="prepend"></slot></div>
@@ -30,6 +34,9 @@
     </div>
 </template>
 <style lang="scss" scoped>
+    .user-id-multiple {
+        margin-bottom: 4px;
+    }
     .user-id-input {
         display: inline-block;
         width: 100%;
@@ -133,10 +140,16 @@
             },
             loadstatus: {
                 default: false
-            }
+            },
+            multiple: {
+                type: Boolean,
+                default: false
+            },
         },
         data () {
             return {
+                multipleLists: [],
+
                 userName: '',
                 nickName: '',
                 nickName__: '',
@@ -149,12 +162,6 @@
 
                 columns: [
                     {
-                        "title": "用户名",
-                        "key": "username",
-                        "minWidth": 80,
-                        "ellipsis": true,
-                        "tooltip": true,
-                    }, {
                         "title": "昵称",
                         "key": "nickname",
                         "minWidth": 80,
@@ -163,6 +170,12 @@
                         render: (h, params) => {
                             return h('span', params.row.nickname || '-');
                         }
+                    }, {
+                        "title": "用户名",
+                        "key": "username",
+                        "minWidth": 80,
+                        "ellipsis": true,
+                        "tooltip": true,
                     },
                 ],
                 userLists: [],
@@ -171,6 +184,9 @@
         },
         watch: {
             value (val) {
+                if (this.multiple) {
+                    return;
+                }
                 this.userName = $A.clone(val)
             },
 
@@ -202,12 +218,16 @@
                             success: (res) => {
                                 if (res.ret === 1 && res.data.total > 0) {
                                     let tmpData = res.data.lists[0];
-                                    this.userName = tmpData.username;
-                                    this.seleName = tmpData.nickname || tmpData.username;
-                                    this.nickName = tmpData.nickname || tmpData.username;
-                                    this.nickName__ = tmpData.nickname || tmpData.username;
-                                    this.$emit('input', this.userName);
-                                    this.$emit('change', tmpData);
+                                    if (this.multiple) {
+                                        this.addMultipleLists(tmpData);
+                                    } else {
+                                        this.userName = tmpData.username;
+                                        this.seleName = tmpData.nickname || tmpData.username;
+                                        this.nickName = tmpData.nickname || tmpData.username;
+                                        this.nickName__ = tmpData.nickname || tmpData.username;
+                                        this.$emit('input', this.userName);
+                                        this.$emit('change', tmpData);
+                                    }
                                 }
                             }
                         });
@@ -218,8 +238,10 @@
             nickName(val) {
                 if (val != this.seleName || val == '') {
                     this.userName = '';
-                    this.$emit('input', this.userName);
-                    this.$emit('change', {});
+                    if (!this.multiple) {
+                        this.$emit('input', this.userName);
+                        this.$emit('change', {});
+                    }
                 }
             },
 
@@ -333,20 +355,51 @@
             },
 
             userChange(item) {
-                this.userName = item.username;
-                this.seleName = item.nickname || item.username;
-                this.nickName = item.nickname || item.username;
-                this.nickName__ = item.nickname || item.username;
-                this.skipSearch = true;
-                this.searchShow = false;
-                this.$emit('input', this.userName);
-                this.$emit('change', item);
+                if (this.multiple) {
+                    this.addMultipleLists(item);
+                } else {
+                    this.userName = item.username;
+                    this.seleName = item.nickname || item.username;
+                    this.nickName = item.nickname || item.username;
+                    this.nickName__ = item.nickname || item.username;
+                    this.skipSearch = true;
+                    this.searchShow = false;
+                    this.$emit('input', this.userName);
+                    this.$emit('change', item);
+                }
             },
 
-            handleClose() {
+            handleClose(e) {
+                if (this.multiple && $A(e.target).parents('.user-id-input-table').length > 0) {
+                    return;
+                }
                 if (this.searchShow === true) {
                     this.searchShow = false;
                 }
+            },
+
+            addMultipleLists(item) {
+                let inn = false;
+                this.multipleLists.some((tmp) => {
+                    if (tmp.username == item.username) {
+                        return inn = true;
+                    }
+                })
+                if (!inn) {
+                    this.multipleLists.push(item);
+                    this.callMultipleLists();
+                }
+            },
+
+            callMultipleLists() {
+                let val = '';
+                this.multipleLists.forEach((tmp) => {
+                    if (val) {
+                        val+= ",";
+                    }
+                    val+= tmp.username;
+                });
+                this.$emit('input', val);
             }
         },
         mounted() {

+ 31 - 3
resources/assets/js/main/components/project/complete.vue

@@ -10,7 +10,7 @@
 <style lang="scss" scoped>
     .project-complete {
         .tableFill {
-            margin: 20px;
+            margin: 12px 12px 20px;
         }
     }
 </style>
@@ -62,7 +62,7 @@
             }, {
                 "title": "操作",
                 "key": 'action',
-                "width": 80,
+                "width": 100,
                 "align": 'center',
                 render: (h, params) => {
                     return h('Button', {
@@ -72,7 +72,35 @@
                         },
                         on: {
                             click: () => {
-
+                                this.$Modal.confirm({
+                                    title: '取消归档',
+                                    content: '你确定要取消归档吗?',
+                                    loading: true,
+                                    onOk: () => {
+                                        $A.aAjax({
+                                            url: 'project/task/archived',
+                                            data: {
+                                                act: 'cancel',
+                                                taskid: params.row.id,
+                                            },
+                                            error: () => {
+                                                this.$Modal.remove();
+                                                this.$Message.error(this.$L('网络繁忙,请稍后再试!'));
+                                            },
+                                            success: (res) => {
+                                                this.$Modal.remove();
+                                                setTimeout(() => {
+                                                    if (res.ret === 1) {
+                                                        this.$Message.success(res.msg);
+                                                        this.getLists();
+                                                    }else{
+                                                        this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
+                                                    }
+                                                }, 350);
+                                            }
+                                        });
+                                    }
+                                });
                             }
                         }
                     }, '取消归档');

+ 96 - 4
resources/assets/js/main/components/project/users.vue

@@ -1,5 +1,7 @@
 <template>
     <div class="project-complete">
+        <!-- 按钮 -->
+        <Button :loading="loadIng > 0" type="primary" icon="md-add" @click="addUser">添加成员</Button>
         <!-- 列表 -->
         <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
         <!-- 分页 -->
@@ -9,8 +11,9 @@
 
 <style lang="scss" scoped>
     .project-complete {
+        padding: 0 12px;
         .tableFill {
-            margin: 20px;
+            margin: 12px 0 20px;
         }
     }
 </style>
@@ -43,7 +46,7 @@
         created() {
             this.columns = [{
                 "title": "头像",
-                "minWidth": 50,
+                "minWidth": 60,
                 "maxWidth": 100,
                 render: (h, params) => {
                     return h('img', {
@@ -103,7 +106,36 @@
                         },
                         on: {
                             click: () => {
-
+                                this.$Modal.confirm({
+                                    title: '移出成员',
+                                    content: '你确定要将此成员移出项目吗?',
+                                    loading: true,
+                                    onOk: () => {
+                                        $A.aAjax({
+                                            url: 'project/users/join',
+                                            data: {
+                                                act: 'delete',
+                                                projectid: params.row.projectid,
+                                                username: params.row.username,
+                                            },
+                                            error: () => {
+                                                this.$Modal.remove();
+                                                this.$Message.error(this.$L('网络繁忙,请稍后再试!'));
+                                            },
+                                            success: (res) => {
+                                                this.$Modal.remove();
+                                                setTimeout(() => {
+                                                    if (res.ret === 1) {
+                                                        this.$Message.success(res.msg);
+                                                        this.getLists();
+                                                    }else{
+                                                        this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
+                                                    }
+                                                }, 350);
+                                            }
+                                        });
+                                    }
+                                });
                             }
                         }
                     }, '删除');
@@ -157,7 +189,7 @@
                 }
                 this.loadIng++;
                 $A.aAjax({
-                    url: 'project/users',
+                    url: 'project/users/lists',
                     data: {
                         page: Math.max(this.listPage, 1),
                         pagesize: Math.max($A.runNum(this.listPageSize), 10),
@@ -178,6 +210,66 @@
                     }
                 });
             },
+
+            addUser() {
+                this.userValue = "";
+                this.$Modal.confirm({
+                    render: (h) => {
+                        return h('div', [
+                            h('div', {
+                                style: {
+                                    fontSize: '16px',
+                                    fontWeight: '500',
+                                    marginBottom: '20px',
+                                }
+                            }, '添加成员'),
+                            h('UseridInput', {
+                                props: {
+                                    value: this.userValue,
+                                    multiple: true,
+                                    placeholder: '请输入昵称/用户名搜索'
+                                },
+                                on: {
+                                    input: (val) => {
+                                        this.userValue = val;
+                                    }
+                                }
+                            })
+                        ])
+                    },
+                    loading: true,
+                    onOk: () => {
+                        if (this.userValue) {
+                            let username = this.userValue;
+                            $A.aAjax({
+                                url: 'project/users/join',
+                                data: {
+                                    act: 'join',
+                                    projectid: this.projectid,
+                                    username: username,
+                                },
+                                error: () => {
+                                    this.$Modal.remove();
+                                    this.$Message.error(this.$L('网络繁忙,请稍后再试!'));
+                                },
+                                success: (res) => {
+                                    this.$Modal.remove();
+                                    setTimeout(() => {
+                                        if (res.ret === 1) {
+                                            this.$Message.success(res.msg);
+                                            this.getLists();
+                                        } else {
+                                            this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
+                                        }
+                                    }, 350);
+                                }
+                            });
+                        } else {
+                            this.$Modal.remove();
+                        }
+                    },
+                });
+            }
         }
     }
 </script>

+ 22 - 9
resources/assets/js/main/pages/project.vue

@@ -12,9 +12,9 @@
                 </div>
                 <div class="w-nav-flex"></div>
                 <div class="w-nav-right">
-                    <span class="ft hover" @click="handleProject('myfavor')"><i class="ft icon">&#xE720;</i> {{$L('收藏的项目')}}</span>
-                    <span class="ft hover" @click="handleProject('myjoin')"><i class="ft icon">&#xE75E;</i> {{$L('参与的项目')}}</span>
-                    <span class="ft hover" @click="handleProject('mycreate')"><i class="ft icon">&#xE764;</i> {{$L('我创建的项目')}}</span>
+                    <span class="ft hover" @click="handleProject('myfavor', null)"><i class="ft icon">&#xE720;</i> {{$L('收藏的项目')}}</span>
+                    <span class="ft hover" @click="handleProject('myjoin', null)"><i class="ft icon">&#xE75E;</i> {{$L('参与的项目')}}</span>
+                    <span class="ft hover" @click="handleProject('mycreate', null)"><i class="ft icon">&#xE764;</i> {{$L('我创建的项目')}}</span>
                 </div>
             </div>
         </div>
@@ -110,6 +110,11 @@
                     <project-users :canload="projectDrawerShow && projectDrawerTab == 'member'" :projectid="handleProjectId"></project-users>
                 </TabPane>
                 <TabPane :label="$L('项目统计')" name="statistics"></TabPane>
+            </Tabs>
+        </Drawer>
+
+        <Drawer v-model="projectListDrawerShow" width="75%">
+            <Tabs v-model="projectListDrawerTab">
                 <TabPane :label="$L('收藏的项目')" name="myfavor"></TabPane>
                 <TabPane :label="$L('参与的项目')" name="myjoin"></TabPane>
                 <TabPane :label="$L('创建的项目')" name="mycreate"></TabPane>
@@ -283,6 +288,9 @@
                 projectDrawerShow: false,
                 projectDrawerTab: 'complete',
 
+                projectListDrawerShow: false,
+                projectListDrawerTab: 'myfavor',
+
                 handleProjectId: 0,
             }
         },
@@ -358,7 +366,7 @@
                                 props: {
                                     value: this.labelsValue,
                                     autofocus: true,
-                                    placeholder: '请输入流程名称,多个用空格分隔。'
+                                    placeholder: '请输入流程名称,多个用空格分隔。'
                                 },
                                 on: {
                                     input: (val) => {
@@ -409,7 +417,9 @@
             },
 
             handleProject(event, item) {
-                this.handleProjectId = item.id;
+                if (item) {
+                    this.handleProjectId = item.id;
+                }
                 switch (event) {
                     case 'favor': {
                         this.favorProject(item);
@@ -437,12 +447,16 @@
                     }
                     case 'complete':
                     case 'member':
-                    case 'statistics':
+                    case 'statistics': {
+                        this.projectDrawerShow = true;
+                        this.projectDrawerTab = event;
+                        break;
+                    }
                     case 'myfavor':
                     case 'myjoin':
                     case 'mycreate': {
-                        this.projectDrawerShow = true;
-                        this.projectDrawerTab = event;
+                        this.projectListDrawerShow = true;
+                        this.projectListDrawerTab = event;
                         break;
                     }
                 }
@@ -546,7 +560,6 @@
                             h('UseridInput', {
                                 props: {
                                     value: this.transferValue,
-                                    autofocus: true,
                                     placeholder: '请输入昵称/用户名搜索'
                                 },
                                 on: {

+ 1 - 2
resources/assets/js/main/pages/team.vue

@@ -115,7 +115,7 @@
             let isAdmin = $A.identity('admin');
             this.columns = [{
                 "title": "头像",
-                "minWidth": 50,
+                "minWidth": 60,
                 "maxWidth": 100,
                 render: (h, params) => {
                     return h('img', {
@@ -204,7 +204,6 @@
                                                     setTimeout(() => {
                                                         if (res.ret === 1) {
                                                             this.$Message.success(res.msg);
-                                                            //
                                                             this.getLists();
                                                         }else{
                                                             this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });

+ 4 - 0
resources/assets/sass/main.scss

@@ -163,8 +163,12 @@
                 }
             }
         }
+        &:before {
+            background-color: #efefef;
+        }
     }
 }
 .pageBox {
     text-align: center;
+    margin-bottom: 12px;
 }