Parcourir la source

适配移动端

kuaifan il y a 5 ans
Parent
commit
e3cd568a87
26 fichiers modifiés avec 390 ajouts et 69 suppressions
  1. 46 0
      resources/assets/js/_modules/mixins/index.js
  2. 0 9
      resources/assets/js/common.js
  3. 2 0
      resources/assets/js/main/app.js
  4. 18 1
      resources/assets/js/main/components/UserImg.vue
  5. 9 9
      resources/assets/js/main/components/UserInput.vue
  6. 1 1
      resources/assets/js/main/components/docs/users.vue
  7. 1 1
      resources/assets/js/main/components/project/archived.vue
  8. 2 2
      resources/assets/js/main/components/project/gantt/index.vue
  9. 1 1
      resources/assets/js/main/components/project/header/archived.vue
  10. 1 1
      resources/assets/js/main/components/project/header/create.vue
  11. 1 1
      resources/assets/js/main/components/project/my/favor.vue
  12. 1 1
      resources/assets/js/main/components/project/my/join.vue
  13. 1 1
      resources/assets/js/main/components/project/my/manage.vue
  14. 1 1
      resources/assets/js/main/components/project/statistics.vue
  15. 1 1
      resources/assets/js/main/components/project/task/files.vue
  16. 1 1
      resources/assets/js/main/components/project/task/lists.vue
  17. 1 1
      resources/assets/js/main/components/project/todo/attention.vue
  18. 1 1
      resources/assets/js/main/components/project/todo/complete.vue
  19. 1 1
      resources/assets/js/main/components/project/users.vue
  20. 1 1
      resources/assets/js/main/components/report/my.vue
  21. 1 1
      resources/assets/js/main/components/report/receive.vue
  22. 1 1
      resources/assets/js/main/pages/project.vue
  23. 2 2
      resources/assets/js/main/pages/project/panel.vue
  24. 1 1
      resources/assets/js/main/pages/team.vue
  25. 1 1
      resources/assets/js/main/pages/todo.vue
  26. 293 28
      resources/assets/sass/main.scss

+ 46 - 0
resources/assets/js/_modules/mixins/index.js

@@ -0,0 +1,46 @@
+export default {
+    install(Vue) {
+        Vue.mixin({
+            data() {
+                return {
+                    //用户信息
+                    usrLogin: false,
+                    usrName: '',
+                    usrInfo: {},
+                    //浏览器宽度≤768返回true
+                    windowMax768: window.innerWidth <= 768,
+                }
+            },
+
+            mounted() {
+                this.usrInfo = $A.getUserInfo((data, isLogin) => {
+                    this.usrLogin = isLogin;
+                    this.usrInfo = data;
+                    this.usrName = this.usrInfo.username || '';
+                }, false);
+                this.usrLogin = $A.getToken() !== false;
+                this.usrName = this.usrInfo.username || '';
+                //
+                window.addEventListener('resize', this.windowMax768Listener);
+            },
+
+            beforeDestroy() {
+                window.removeEventListener('resize', this.windowMax768Listener);
+            },
+
+            methods: {
+                isArray(obj) {
+                    return typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == '[object array]' && typeof obj.length == "number";
+                },
+
+                isJson(obj) {
+                    return typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && typeof obj.length == "undefined";
+                },
+
+                windowMax768Listener() {
+                    this.windowMax768 = window.innerWidth <= 768
+                }
+            }
+        });
+    }
+}

+ 0 - 9
resources/assets/js/common.js

@@ -1555,15 +1555,6 @@
                 return '0 B';
             }
             return $A.runNum((bytes / Math.pow(k, i)), 2) + ' ' + sizes[i];
-        },
-
-        /**
-         * window宽度≤width参数返回true
-         * @param width
-         * @returns {boolean}
-         */
-        windowMaxWidth(width) {
-            return window.innerWidth <= width;
         }
     });
 

+ 2 - 0
resources/assets/js/main/app.js

@@ -4,6 +4,7 @@ import routes from './routes'
 import VueRouter from 'vue-router'
 import ViewUI from 'view-design';
 import Language from '../_modules/language'
+import Mixins from '../_modules/mixins'
 
 import '../common'
 import './main'
@@ -11,6 +12,7 @@ import './main'
 Vue.use(VueRouter);
 Vue.use(ViewUI);
 Vue.use(Language);
+Vue.use(Mixins);
 
 import Title from '../_components/Title.vue'
 import sreachTitle from '../_components/sreachTitle.vue'

+ 18 - 1
resources/assets/js/main/components/UserImg.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="userimg-container" @click="onClick">
         <template v-if="this.isJson(info)">
-            <img v-if="isShowImg(userImg)&&!imgError" class="userimg-container-img" :src="userImg" @error="imgError=true"/>
+            <img v-if="isShowImg(userImg)&&!imgError" class="userimg-container-img" :src="userImg" @error="loadError"/>
             <div v-else class="userimg-container-box" :style="textStyle">
                 <div class="usertext-container-text">{{userName}}</div>
             </div>
@@ -56,6 +56,7 @@
         data() {
             return {
                 imgError: false,
+                againUrl: '',
             }
         },
         computed: {
@@ -93,6 +94,9 @@
                 if (!this.isJson(this.info)) {
                     return '';
                 }
+                if (this.againUrl) {
+                    return this.againUrl;
+                }
                 return this.info.send_userimg || this.info.userimg;
             },
         },
@@ -109,6 +113,19 @@
                 return /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(text);
             },
 
+            loadError() {
+                if (!this.againUrl) {
+                    if ($A.rightExists(this.userImg, 'images/other/system-message.png')) {
+                        this.againUrl = $A.fillUrl('images/other/system-message.png');
+                        return;
+                    } else if ($A.rightExists(this.userImg, 'images/other/group.png')) {
+                        this.againUrl = $A.fillUrl('images/other/group.png');
+                        return;
+                    }
+                }
+                this.imgError = true
+            },
+
             onClick(e) {
                 this.$emit('click', e);
             }

+ 9 - 9
resources/assets/js/main/components/UserInput.vue

@@ -131,14 +131,6 @@
             cursor: pointer;
         }
 
-        .ivu-table-cell {
-            padding-left: 12px;
-            padding-right: 12px;
-            &.ivu-table-cell-with-selection {
-                padding-right: 2px;
-            }
-        }
-
         .user-id-input-bottom {
             padding: 8px;
             display: flex;
@@ -185,6 +177,9 @@
             nobookid: {
                 default: ''
             },
+            nogroupid: {
+                default: ''
+            },
             placeholder: {
                 default: ''
             },
@@ -312,6 +307,9 @@
                         if (this.nobookid) {
                             where['nobookid'] = this.nobookid;
                         }
+                        if (this.nogroupid) {
+                            where['nogroupid'] = this.nogroupid;
+                        }
                         this.noDataText = this.$L("数据加载中.....");
                         $A.apiAjax({
                             url: 'users/searchinfo',
@@ -479,6 +477,9 @@
                 if (this.nobookid) {
                     where['nobookid'] = this.nobookid;
                 }
+                if (this.nogroupid) {
+                    where['nogroupid'] = this.nogroupid;
+                }
                 this.tempName = where.username;
                 this.noDataText = this.$L("数据加载中.....");
                 $A.apiAjax({
@@ -512,7 +513,6 @@
                                     if (item.username == this.userName) {
                                         item._highlight = true;
                                     }
-
                                 }
                             });
                             this.searchShow = true;

+ 1 - 1
resources/assets/js/main/components/docs/users.vue

@@ -6,7 +6,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

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

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

+ 2 - 2
resources/assets/js/main/components/project/gantt/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="project-gstc-gantt">
-        <GanttView :lists="lists" :menuWidth="$A.windowMaxWidth(768) ? 180 : 260" :itemWidth="80" @on-change="updateTime" @on-click="clickItem"/>
-        <Dropdown class="project-gstc-dropdown-filtr" :style="$A.windowMaxWidth(768)?{left:'142px'}:{}" @on-click="tapProject">
+        <GanttView :lists="lists" :menuWidth="windowMax768 ? 180 : 260" :itemWidth="80" @on-change="updateTime" @on-click="clickItem"/>
+        <Dropdown class="project-gstc-dropdown-filtr" :style="windowMax768?{left:'142px'}:{}" @on-click="tapProject">
             <Icon class="project-gstc-dropdown-icon" :class="{filtr:filtrProjectId>0}" type="md-funnel" />
             <DropdownMenu slot="list">
                 <DropdownItem :name="0" :class="{'dropdown-active':filtrProjectId==0}">{{$L('全部')}}</DropdownItem>

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

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

+ 1 - 1
resources/assets/js/main/components/project/header/create.vue

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

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

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

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

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

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

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

+ 1 - 1
resources/assets/js/main/components/project/statistics.vue

@@ -25,7 +25,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

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

@@ -43,7 +43,7 @@
             <Table class="tableFill" ref="tableRef" :size="!simple?'default':'small'" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" @on-sort-change="sortChange" stripe></Table>
 
             <!-- 分页 -->
-            <Page v-if="lastPage > 1 || !simple" :simple="simple || $A.windowMaxWidth(768)" class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer></Page>
+            <Page v-if="lastPage > 1 || !simple" :simple="simple || windowMax768" class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer></Page>
 
         </div>
     </drawer-tabs-container>

+ 1 - 1
resources/assets/js/main/components/project/task/lists.vue

@@ -50,7 +50,7 @@
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" @on-sort-change="sortChange" stripe></Table>
 
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
 
         </div>
     </drawer-tabs-container>

+ 1 - 1
resources/assets/js/main/components/project/todo/attention.vue

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

+ 1 - 1
resources/assets/js/main/components/project/todo/complete.vue

@@ -4,7 +4,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

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

@@ -6,7 +6,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

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

@@ -29,7 +29,7 @@
             <!-- 列表 -->
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
         <WDrawer v-model="addDrawerShow" maxWidth="900">
             <report-add :canload="addDrawerShow" :id="addDrawerId" @on-success="addDrawerSuccess"></report-add>

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

@@ -31,7 +31,7 @@
             <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" @on-sort-change="sortChange" stripe></Table>
 
             <!-- 分页 -->
-            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="$A.windowMaxWidth(768)"></Page>
+            <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total transfer :simple="windowMax768"></Page>
         </div>
     </drawer-tabs-container>
 </template>

+ 1 - 1
resources/assets/js/main/pages/project.vue

@@ -78,7 +78,7 @@
                 </li>
             </ul>
             <!-- 分页 -->
-            <Page v-if="listTotal > 0" class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" :pageSize="listPageSize" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[20,40,60,100]" placement="top" transfer show-elevator show-sizer show-total :simple="$A.windowMaxWidth(768)"></Page>
+            <Page v-if="listTotal > 0" class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" :pageSize="listPageSize" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[20,40,60,100]" placement="top" transfer show-elevator show-sizer show-total :simple="windowMax768"></Page>
         </w-content>
 
         <Modal

+ 2 - 2
resources/assets/js/main/pages/project/panel.vue

@@ -55,7 +55,7 @@
                 draggable=".label-draggable"
                 :style="{visibility: projectGanttShow ? 'hidden' : 'visible'}"
                 :animation="150"
-                :disabled="projectSortDisabled || $A.windowMaxWidth(768)"
+                :disabled="projectSortDisabled || windowMax768"
                 @sort="projectSortUpdate(true)">
                 <div
                     v-if="projectLabel.length > 0"
@@ -90,7 +90,7 @@
                                 group="task"
                                 draggable=".task-draggable"
                                 :animation="150"
-                                :disabled="projectSortDisabled || $A.windowMaxWidth(768)"
+                                :disabled="projectSortDisabled || windowMax768"
                                 @sort="projectSortUpdate(false)"
                                 @remove="projectSortUpdate(false)">
                                 <div v-for="task in label.taskLists"

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

@@ -33,7 +33,7 @@
                     <!-- 列表 -->
                     <Table class="tableFill" ref="tableRef" :columns="columns" :data="lists" :loading="loadIng > 0" :no-data-text="noDataText" stripe></Table>
                     <!-- 分页 -->
-                    <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total :simple="$A.windowMaxWidth(768)"></Page>
+                    <Page class="pageBox" :total="listTotal" :current="listPage" :disabled="loadIng > 0" @on-change="setPage" @on-page-size-change="setPageSize" :page-size-opts="[10,20,30,50,100]" placement="top" show-elevator show-sizer show-total :simple="windowMax768"></Page>
                 </div>
             </div>
         </w-content>

+ 1 - 1
resources/assets/js/main/pages/todo.vue

@@ -59,7 +59,7 @@
                                     group="task"
                                     draggable=".task-draggable"
                                     :animation="150"
-                                    :disabled="taskSortDisabled || $A.windowMaxWidth(768)"
+                                    :disabled="taskSortDisabled || windowMax768"
                                     @sort="taskSortUpdate"
                                     @remove="taskSortUpdate">
                                     <div v-for="task in taskDatas[index].lists" class="content-li task-draggable" :key="task.id" :class="{complete:task.complete}" @click="openTaskModal(task)">

+ 293 - 28
resources/assets/sass/main.scss

@@ -1,3 +1,6 @@
+*[hidden="hidden"] {
+    display: none !important;
+}
 
 .z-row {
     text-rendering: optimizespeed;
@@ -67,6 +70,18 @@
     width: 87.5%
 }
 
+.f-12 {
+    font-size: 12px !important;
+}
+
+.f-14 {
+    font-size: 14px !important;
+}
+
+.f-16 {
+    font-size: 16px !important;
+}
+
 .w-box {
     -webkit-box-sizing: content-box;
     box-sizing: content-box;
@@ -92,11 +107,13 @@
         right: 0;
         top: 40px;
         font-size: 14px;
-        background-color: rgba(255, 255, 255, 0.9);
         z-index: 12;
         color: #606266;
         height: 32px;
         line-height: 34px;
+        background-color: rgba(255, 255, 255, 0.9);
+        box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
+
         .nav-row {
             margin: 0 32px;
             display: flex;
@@ -134,12 +151,65 @@
                 flex: 1;
             }
             .w-nav-right {
+                margin-top: -2px;
                 white-space: nowrap;
                 overflow: hidden;
                 overflow-x: auto;
                 -webkit-backface-visibility: hidden;
                 -webkit-overflow-scrolling: touch;
             }
+            .nav-sreach {
+                .ivu-input-wrapper {
+                    margin-top: -2px;
+                    width: auto;
+                    input {
+                        padding: 0 26px 0 6px;
+                        font-size: 14px;
+                        width: 140px;
+                        height: 24px;
+                        line-height: 24px;
+                        border: none;
+                        box-shadow: none;
+                        transition: all 0.2s;
+                        transform: translateZ(0);
+                        &:focus {
+                            width: 180px;
+                        }
+                    }
+                    &.substantial {
+                        input {
+                            width: 180px;
+                            background-color: #eeeeee;
+                        }
+                    }
+                    &.showclose {
+                        input {
+                            padding-right: 48px;
+                        }
+                    }
+                }
+                .ivu-input-suffix {
+                    display: flex;
+                    align-items: center;
+                    margin: 0 6px 0 0;
+                    width: auto;
+                    .nav-sreach-loading {
+                        display: flex;
+                        align-items: center;
+                        margin-right: 6px;
+                        .w-loading {
+                            width: 12px;
+                            height: 12px;
+                        }
+                    }
+                    i {
+                        font-size: 16px;
+                        &.suffix-close {
+                            font-size: 22px;
+                        }
+                    }
+                }
+            }
             .page-nav-left {
                 display: flex;
                 flex-direction: row;
@@ -193,6 +263,152 @@
                 .w-nav-left {
                     padding-right: 12px;
                 }
+                .nav-sreach {
+                    .ivu-input-wrapper {
+                        input {
+                            width: 140px;
+                            &:focus {
+                                width: 140px;
+                            }
+                        }
+                        &.substantial {
+                            input {
+                                width: 140px;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+.w-sreach-main {
+    position: fixed;
+    top: 76px;
+    right: 6px;
+    left: 0;
+    bottom: 0;
+    z-index: 20;
+
+    .w-sreach-box {
+        position: absolute;
+        top: 0;
+        right: 0;
+        left: 0;
+        bottom: 0;
+        display: flex;
+        flex-direction: column;
+        align-items: flex-end;
+    }
+
+    .sreach-none,
+    .sreach-ul {
+        background: #ffffff;
+        border-radius: 4px;
+        box-shadow: 0 1px 6px rgba(0,0,0,.2);
+    }
+
+    .sreach-none {
+        text-align: center;
+        color: #666;
+        padding: 16px 32px;
+    }
+
+    .sreach-ul {
+        width: 480px;
+        max-width: 96%;
+        max-height: 100%;
+        padding: 16px 12px;
+        margin: 0 0 6px 0;
+        overflow: auto;
+        opacity: 0;
+        transform: translate(50%, 0);
+        transition: all 0.2s;
+
+        &.sreach-enter {
+            opacity: 1;
+            transform: translate(0, 0);
+        }
+
+        > li {
+            list-style-type: none;
+            padding: 6px 12px;
+            margin: 0;
+
+            &.sreach-result {
+                font-size: 12px;
+                color: #999;
+            }
+
+            &:last-child {
+                border-bottom: 0;
+            }
+
+            .sreach-title {
+                font-size: 14px;
+                color: #555555;
+                font-weight: 400;
+                cursor: pointer;
+                border-bottom: 1px solid #eeeeee;
+                padding-bottom: 6px;
+
+                .sreach-tag {
+                    background-color: #cccccc;
+                    display: inline-block;
+                    padding: 0 3px;
+                    color: #ffffff;
+                    border-radius: 2px;
+                    transform: scale(0.96);
+                    font-size: 12px;
+                    &.p1 {
+                        background: rgba(248, 14, 21, 0.6);
+                    }
+                    &.p2 {
+                        background: rgba(236, 196, 2, 0.5);
+                    }
+                    &.p3 {
+                        background: rgba(0, 159, 227, 0.7);
+                    }
+                    &.p4 {
+                        background: rgba(121, 170, 28, 0.7);
+                    }
+                    &.overdue {
+                        background: #ff0000;
+                    }
+                }
+
+                &:hover {
+                    color: #333333;
+                }
+            }
+
+            .sreach-text {
+                font-size: 13px;
+                color: #888888;
+                font-weight: 400;
+                cursor: pointer;
+                padding-top: 4px;
+
+                &:hover {
+                    color: #333333;
+                }
+            }
+
+            > ul {
+                padding-top: 3px;
+                padding-left: 24px;
+
+                > li {
+                    padding: 6px 0;
+                    border-bottom: 1px dotted #eeeeee;
+
+                    .sreach-title {
+                        font-size: 13px;
+                        border-bottom: 0;
+                        padding-bottom: 0;
+                    }
+                }
             }
         }
     }
@@ -226,6 +442,30 @@
         }
     }
 }
+.tableFlex {
+    .ivu-table {
+        display: flex;
+        flex-direction: column;
+        .ivu-table-header {
+            flex-grow: 0;
+            flex-shrink: 0;
+        }
+        .ivu-table-body {
+            overflow-y: auto;
+        }
+    }
+}
+.tableSelection {
+    .ivu-table {
+        .ivu-table-cell {
+            padding-left: 12px;
+            padding-right: 12px;
+            &.ivu-table-cell-with-selection {
+                padding-right: 2px;
+            }
+        }
+    }
+}
 .pageBox {
     text-align: center;
     margin-bottom: 12px;
@@ -310,6 +550,41 @@
     }
 }
 
+.sreach-highlight {
+    color: #c00;
+}
+
+.drawer-tabs {
+    .ivu-tabs-tabpane {
+        position: relative;
+    }
+}
+
+.drawer-box {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    display: flex;
+    flex-direction: column;
+    .drawer-content {
+        flex: 1;
+        width: 100%;
+        overflow: auto;
+        padding: 16px;
+        position: relative;
+        transform: translateZ(0);
+    }
+    .drawer-footer{
+        width: 100%;
+        border-top: 1px solid #e8e8e8;
+        padding: 10px 16px;
+        text-align: right;
+        background: #fff;
+    }
+}
+
 .ivu-drawer-body {
     .ivu-tabs-bar {
         padding-right: 32px;
@@ -346,44 +621,34 @@
     to   { transform: rotate(360deg);}
 }
 
-.m768-show {
-    display: none;
-    @media (max-width: 768px) {
-        display: block;
-    }
-}
-
-.m768-show-i {
-    display: none;
-    @media (max-width: 768px) {
-        display: inline;
-    }
-}
-
+.m768-show,
+.m768-show-i,
 .m768-show-ib {
     display: none;
-    @media (max-width: 768px) {
-        display: inline-block;
-    }
 }
-
 .m768-hide {
     display: block;
-    @media (max-width: 768px) {
-        display: none;
-    }
 }
-
 .m768-hide-i {
     display: inline;
-    @media (max-width: 768px) {
-        display: none;
-    }
 }
-
 .m768-hide-ib {
     display: inline-block;
-    @media (max-width: 768px) {
+}
+
+@media (max-width: 768px) {
+    .m768-show {
+        display: block;
+    }
+    .m768-show-i {
+        display: inline;
+    }
+    .m768-show-ib {
+        display: inline-block;
+    }
+    .m768-hide,
+    .m768-hide-i,
+    .m768-hide-ib {
         display: none;
     }
 }