Prechádzať zdrojové kódy

Merge branch 'master' of http://119.23.210.103:3000/wy/lh_firm_former

cfort 2 rokov pred
rodič
commit
35dc468bbc

+ 9 - 6
src/components/ibps-crud/mixin/base.js

@@ -100,10 +100,10 @@ export default {
      * @description 所有列表已选择的数据id
      * 
      */
-    selection_all:{
-      type: Array,
-      default: ()=>[]
-    }
+    selectionAll: {
+      type: Object,
+      default: null
+  }
   },
   methods: {
     /* 表格換颜色*/
@@ -263,8 +263,11 @@ export default {
       const buttonKey = action.key
       let selection = null// 选中数据
       if (position === 'toolbar') { // 工具栏
-        // selection = this.getSelectedIds()
-        selection = this.selection_all.map(i=>i.id_) // 默认给所有已选择的数据id
+        if (this.selectionAll) {
+          selection = this.selectionAll.map(i => i.id_) // 默认给所有已选择的数据id
+      } else {
+          selection = this.getSelectedIds()
+      }
       } else { // 管理列
         selection = data ? this.getPkValue(data) : null
       }

+ 7 - 3
src/views/system/dashboard/page.vue

@@ -8,7 +8,7 @@
         class="ibps-desktop-page"
         @scroll="({ x, y }) => { scrollTop = y }"
     >
-        <newHome v-if="cronTask" :plan="cronTask" @handleApprove="handleApprove" @handleUnreadMessage="handleUnreadMessage">
+        <newHome v-if="cronTask&& scheduledTask" :plan="cronTask" @handleApprove="handleApprove" @handleUnreadMessage="handleUnreadMessage">
             <template slot="myslot">
                 <el-upload
                     style="display: inline-block"
@@ -224,7 +224,8 @@
                 alias: '',
                 headers: {
                     'X-Authorization-access_token': getToken()
-                }
+                },
+                scheduledTask:false
             }
         },
         computed: {
@@ -264,6 +265,7 @@
                 this.getPeriodTask()
             }
             StatisticsData().then(data => {
+              this.scheduledTask = true
                 // 将参数替换成对应参数
                 // if (data.state === 200 && data.variables.data.length > 0) {
                 //     const h = this.$createElement
@@ -295,7 +297,9 @@
                 //         }, 0)
                 //     }
                 // }
-            })
+            }).catch(() => {
+            this.scheduledTask = true
+        })
         },
         beforeDestroy() {
             for (let i = 0; i < this.infoMessage.length; i++) {