浏览代码

常用流程 按钮显示控制

liangyan0105 3 年之前
父节点
当前提交
a171080e1a
共有 2 个文件被更改,包括 10 次插入4 次删除
  1. 1 0
      src/assets/less/mytodo.less
  2. 9 4
      src/views/dashboard/MyToDo.vue

+ 1 - 0
src/assets/less/mytodo.less

@@ -42,6 +42,7 @@
         margin-bottom: 20px;
         width: calc((100% - 10px) / 3);
         h4 {
+          font-size: 12px;
           margin-top: 4px;
         }
       }

+ 9 - 4
src/views/dashboard/MyToDo.vue

@@ -45,7 +45,7 @@
       <a-col :xs="24" :sm="24" :md="24" :lg="6" :style="{ marginBottom: '8px' }">
         <!-- 等高设置 -->
         <a-card title="常用流程" :bordered="false" style="height: 264px;">
-          <div v-for="(item, index) in activeKeyAll" :key="index" class="oaBig">
+          <div v-for="(item, index) in activeKeyAll.slice(5, 10)" :key="index" class="oaBig">
             <a @click.prevent="aClick(item)" class="oaItem fl">
               <!-- 图标 -->
               <a-avatar shape="square" :size="36" :src="item.iconAddress" />
@@ -311,6 +311,11 @@ export default {
     this.getAnnList() //渲染公告(已发布的)
   },
   computed: {
+    //常用流程 按钮只显示 5个
+    //   activeKeyAll: function () {
+    //   return this.items.activeKeyAll(0, 2)
+    // },
+
     // 系统消息计算
     msgTotal() {
       return parseInt(this.msg1Count) + parseInt(this.msg2Count)
@@ -447,9 +452,9 @@ export default {
           var result = res.result || []
           if (result.length > 0) {
             this.activeKeyAll = result
-            // this.activeKeyAll.push.apply(this.activeKeyAll,result);
-            // console.log(this.activeKeyAll)
-            // console.log('OA 4个按钮被渲染')
+          }
+          if (result.length > 5) {
+            console.log('数据超过5条啦,需要隐藏')
           }
         }
       })