kuaifan 5 年之前
父节点
当前提交
0667ec40c6

+ 2 - 1
app/Http/Controllers/Api/ReportController.php

@@ -286,7 +286,7 @@ class ReportController extends Controller
      * - 日报
      * - 周报
      * @apiParam {Object} [sorts]               排序方式,格式:{key:'', order:''}
-     * - key: username|indate
+     * - key: title|username|indate
      * - order: asc|desc
      * @apiParam {Number} [page]                当前页,默认:1
      * @apiParam {Number} [pagesize]            每页显示数量,默认:20,最大:100
@@ -319,6 +319,7 @@ class ReportController extends Controller
         $sorts = Base::json2array(Request::input('sorts'));
         if (in_array($sorts['order'], ['asc', 'desc'])) {
             switch ($sorts['key']) {
+                case 'title':
                 case 'username':
                 case 'indate':
                     $orderBy = '`' . $sorts['key'] . '` ' . $sorts['order'] . ',`id` DESC';

+ 2 - 1
resources/assets/js/main/components/UseridInput.vue

@@ -37,6 +37,7 @@
     .user-id-multiple {
         margin-bottom: 4px;
         overflow: auto;
+        white-space: normal;
     }
     .user-id-input {
         display: inline-block;
@@ -457,7 +458,7 @@
                 arr.forEach((uname) => {
                     if (uname) {
                         let inn = false;
-                        this.multipleLists.some((tmp) => {
+                        narr.some((tmp) => {
                             if (tmp.username == uname) {
                                 return inn = true;
                             }

+ 3 - 0
resources/assets/js/main/components/project/archived.vue

@@ -92,6 +92,9 @@
                             type: 'primary',
                             size: 'small'
                         },
+                        style: {
+                            fontSize: '12px'
+                        },
                         on: {
                             click: () => {
                                 this.$Modal.confirm({

+ 3 - 0
resources/assets/js/main/components/project/header/archived.vue

@@ -89,6 +89,9 @@
                             type: 'primary',
                             size: 'small'
                         },
+                        style: {
+                            fontSize: '12px'
+                        },
                         on: {
                             click: () => {
                                 this.$Modal.confirm({

+ 3 - 0
resources/assets/js/main/components/project/my/favor.vue

@@ -80,6 +80,9 @@
                             type: 'primary',
                             size: 'small'
                         },
+                        style: {
+                            fontSize: '12px'
+                        },
                         on: {
                             click: () => {
                                 this.$Modal.confirm({

+ 3 - 0
resources/assets/js/main/components/project/my/join.vue

@@ -80,6 +80,9 @@
                             type: 'primary',
                             size: 'small'
                         },
+                        style: {
+                            fontSize: '12px'
+                        },
                         on: {
                             click: () => {
                                 this.outProject(params.row.id, () => {

+ 3 - 0
resources/assets/js/main/components/project/my/manage.vue

@@ -80,6 +80,9 @@
                             type: 'primary',
                             size: 'small'
                         },
+                        style: {
+                            fontSize: '12px'
+                        },
                         on: {
                             click: () => {
                                 this.deleteProject(params.row.id, () => {

+ 12 - 4
resources/assets/js/main/components/project/task/detail/detail.vue

@@ -72,7 +72,7 @@
                 <Poptip placement="bottom" class="block">
                     <Button :loading="!!loadData.username" icon="md-person" class="btn">负责人</Button>
                     <div slot="content">
-                        <div style="width:240px">
+                        <div style="width:280px">
                             选择负责人
                             <UseridInput :projectid="detail.projectid" :nousername="detail.username" :transfer="false" @change="handleTask('usernameb', $event)" placeholder="输入关键词搜索" style="margin:5px 0 3px"></UseridInput>
                         </div>
@@ -97,13 +97,13 @@
                     </div>
                 </Poptip>
                 <Button icon="md-attach" class="btn" @click="handleTask('fileupload')">添加附件</Button>
-                <Poptip ref="attentionRef" v-if="detail.username == myUsername" placement="bottom" class="block" @on-popper-show="() => {$set(detail, 'attentionLists', '')}">
+                <Poptip ref="attentionRef" v-if="detail.username == myUsername" placement="bottom" class="block" @on-popper-show="() => {$set(detail, 'attentionLists', followerToStr(detail.follower))}">
                     <Button :loading="!!loadData.attention" icon="md-at" class="btn">关注人</Button>
                     <div slot="content">
-                        <div style="width:240px">
+                        <div style="width:280px">
                             选择关注人
                             <UseridInput :multiple="true" :transfer="false" v-model="detail.attentionLists" placeholder="输入关键词搜索" style="margin:5px 0 3px"></UseridInput>
-                            <Button :loading="!!loadData.attention" :disabled="!detail.attentionLists" class="btn" type="primary" style="text-align:center;width:72px;height:28px" @click="handleTask('attention')">确 定</Button>
+                            <Button :loading="!!loadData.attention" :disabled="!detail.attentionLists" class="btn" type="primary" style="text-align:center;width:72px;height:28px;font-size:13px" @click="handleTask('attention')">确 定</Button>
                         </div>
                     </div>
                 </Poptip>
@@ -277,6 +277,14 @@
                 }
             },
 
+            followerToStr(follower) {
+                if (follower instanceof Array) {
+                    return follower.join(",");
+                } else {
+                    return '';
+                }
+            },
+
             haveAttention(follower) {
                 if (follower instanceof Array) {
                     return follower.filter((uname) => { return uname == this.myUsername }).length > 0

+ 4 - 4
resources/assets/js/main/components/project/task/files.vue

@@ -207,7 +207,7 @@
                             props: { content: '下载', transfer: true, delay: 600 },
                             style: { position: 'relative' },
                         }, [h('Icon', {
-                            props: { type: 'md-arrow-down' },
+                            props: { type: 'md-arrow-down', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
                         }), h('a', {
                             style: { position: 'absolute', top: '0', left: '0', right: '0', bottom: '0', 'zIndex': 1 },
@@ -225,7 +225,7 @@
                         h('Tooltip', {
                             props: { content: '重命名', transfer: true, delay: 600 }
                         }, [h('Icon', {
-                            props: { type: 'md-create' },
+                            props: { type: 'md-create', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
                             on: {
                                 click: () => {
@@ -236,7 +236,7 @@
                         h('Tooltip', {
                             props: { content: '复制链接', transfer: true, delay: 600 }
                         }, [h('Icon', {
-                            props: { type: 'md-link' },
+                            props: { type: 'md-link', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer', transform: 'rotate(-45deg)' },
                             on: {
                                 click: () => {
@@ -251,7 +251,7 @@
                         h('Tooltip', {
                             props: { content: '删除', transfer: true, delay: 600 }
                         }, [h('Icon', {
-                            props: { type: 'md-trash' },
+                            props: { type: 'md-trash', size: 16 },
                             style: { margin: '0 3px', cursor: 'pointer' },
                             on: {
                                 click: () => {

+ 3 - 0
resources/assets/js/main/components/project/users.vue

@@ -108,6 +108,9 @@
                             type: 'primary',
                             size: 'small'
                         },
+                        style: {
+                            fontSize: '12px'
+                        },
                         on: {
                             click: () => {
                                 this.$Modal.confirm({

+ 58 - 41
resources/assets/js/main/components/report/my.vue

@@ -100,67 +100,84 @@
                 "key": 'title',
                 "minWidth": 120,
             }, {
-                "title": "创建日期",
-                "width": 160,
-                "align": 'center',
-                "sortable": true,
-                render: (h, params) => {
-                    return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
-                }
-            }, {
                 "title": "类型",
                 "key": 'type',
-                "width": 80,
+                "minWidth": 80,
+                "maxWidth": 120,
                 "align": 'center',
             }, {
                 "title": "状态",
                 "key": 'status',
-                "width": 80,
+                "minWidth": 80,
+                "maxWidth": 120,
                 "align": 'center',
             }, {
-                "title": "操作",
-                "key": 'action',
-                "width": 140,
+                "title": "创建日期",
+                "minWidth": 160,
+                "maxWidth": 200,
                 "align": 'center',
+                "sortable": true,
                 render: (h, params) => {
-                    let arr = [];
-                    arr.push(h('a', {
-                        style: {padding: '0 2px', fontSize: '12px'},
-                        on: {
-                            click: () => {
-                                this.contentReport(params.row);
-                            }
-                        }
-                    }, '查看'));
-                    arr.push(h('a', {
-                        style: {padding: '0 2px', fontSize: '12px'},
-                        on: {
-                            click: () => {
-                                this.addDrawerId = params.row.id;
-                                this.addDrawerShow = true
+                    return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
+                }
+            }, {
+                "title": " ",
+                "key": 'action',
+                "align": 'right',
+                "width": 120,
+                render: (h, params) => {
+                    if (!params.row.id) {
+                        return null;
+                    }
+                    return h('div', [
+                        h('Tooltip', {
+                            props: { content: '查看', transfer: true, delay: 600 },
+                            style: { position: 'relative' },
+                        }, [h('Icon', {
+                            props: { type: 'md-eye', size: 16 },
+                            style: { margin: '0 3px', cursor: 'pointer' },
+                            on: {
+                                click: () => {
+                                    this.contentReport(params.row);
+                                }
                             }
-                        }
-                    }, '编辑'));
-                    if (params.row.status == '未发送') {
-                        arr.push(h('a', {
-                            style: {padding: '0 2px', fontSize: '12px'},
+                        })]),
+                        h('Tooltip', {
+                            props: { content: '编辑', transfer: true, delay: 600 }
+                        }, [h('Icon', {
+                            props: { type: 'md-create', size: 16 },
+                            style: { margin: '0 3px', cursor: 'pointer' },
                             on: {
                                 click: () => {
-                                    this.deleteReport(params.row);
+                                    this.addDrawerId = params.row.id;
+                                    this.addDrawerShow = true
                                 }
                             }
-                        }, '删除'));
-                        arr.push(h('a', {
-                            style: {padding: '0 2px', fontSize: '12px'},
+                        })]),
+                        h('Tooltip', {
+                            props: { content: '发送', transfer: true, delay: 600 }
+                        }, [h('Icon', {
+                            props: { type: 'md-send', size: 16 },
+                            style: { margin: '0 3px', cursor: 'pointer' },
                             on: {
                                 click: () => {
                                     this.sendReport(params.row);
                                 }
                             }
-                        }, '发送'));
-                    }
-                    return h('div', arr);
-                }
+                        })]),
+                        h('Tooltip', {
+                            props: { content: '删除', transfer: true, delay: 600 }
+                        }, [h('Icon', {
+                            props: { type: 'md-trash', size: 16 },
+                            style: { margin: '0 3px', cursor: 'pointer' },
+                            on: {
+                                click: () => {
+                                    this.deleteReport(params.row);
+                                }
+                            }
+                        })]),
+                    ]);
+                },
             }];
         },
         mounted() {

+ 25 - 16
resources/assets/js/main/components/report/receive.vue

@@ -97,40 +97,49 @@
             this.columns = [{
                 "title": "标题",
                 "key": 'title',
+                "sortable": true,
                 "minWidth": 120,
             }, {
                 "title": "发送人",
                 "key": 'username',
                 "sortable": true,
                 "minWidth": 80,
-                "maxWidth": 150,
+                "maxWidth": 130,
+            }, {
+                "title": "类型",
+                "key": 'type',
+                "minWidth": 80,
+                "maxWidth": 120,
+                "align": 'center',
             }, {
                 "title": "创建日期",
-                "width": 160,
+                "minWidth": 160,
+                "maxWidth": 200,
                 "align": 'center',
                 "sortable": true,
                 render: (h, params) => {
                     return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
                 }
             }, {
-                "title": "类型",
-                "key": 'type',
-                "width": 80,
-                "align": 'center',
-            }, {
-                "title": "操作",
+                "title": " ",
                 "key": 'action',
-                "width": 80,
+                "width": 70,
                 "align": 'center',
                 render: (h, params) => {
-                    return h('a', {
-                        style: {padding: '0 2px', fontSize: '12px'},
-                        on: {
-                            click: () => {
-                                this.contentReport(params.row);
+                    return h('div', [
+                        h('Tooltip', {
+                            props: { content: '查看', transfer: true, delay: 600 },
+                            style: { position: 'relative' },
+                        }, [h('Icon', {
+                            props: { type: 'md-eye', size: 16 },
+                            style: { margin: '0 3px', cursor: 'pointer' },
+                            on: {
+                                click: () => {
+                                    this.contentReport(params.row);
+                                }
                             }
-                        }
-                    }, '查看');
+                        })]),
+                    ]);
                 }
             }];
         },

+ 4 - 0
resources/assets/js/main/pages/team.vue

@@ -172,6 +172,9 @@
                             type: 'primary',
                             size: 'small'
                         },
+                        style: {
+                            fontSize: '12px'
+                        },
                         on: {
                             click: () => {
                                 this.$Modal.info({
@@ -188,6 +191,7 @@
                                 size: 'small'
                             },
                             style: {
+                                fontSize: '12px',
                                 marginLeft: '5px'
                             },
                             on: {