lrf402788946 4 年之前
父节点
当前提交
e9c623cb74
共有 2 个文件被更改,包括 12 次插入6 次删除
  1. 1 1
      src/store/topmessage.js
  2. 11 5
      src/views/service/parts/sign.vue

+ 1 - 1
src/store/topmessage.js

@@ -33,7 +33,7 @@ const actions = {
     return res;
   },
   async querytwo({ commit }, { skip = 0, limit = 15, ...info } = {}) {
-    const res = await this.$axios.$get(api.servenodeInfo, { ...info });
+    const res = await this.$axios.$get(api.servenodeInfo, { skip, limit, ...info });
     return res;
   },
 };

+ 11 - 5
src/views/service/parts/sign.vue

@@ -97,27 +97,33 @@ export default {
     let toDay = moment().format('YYYY-MM-DD HH:mm:ss');
     this.$set(this, `toDay`, toDay);
     await this.search();
+    await this.initNode();
   },
   mounted() {
     this.channel();
     if (this.serveTime) {
-      this.searchNode();
+      // this.searchNode();
       this.searchNode = false;
     }
   },
   methods: {
     ...topmessage(['query', 'querytwo']),
-    async search({ skip = 0, limit = 300, ...info } = {}) {
+    async search({ skip = 0, limit = 20, ...info } = {}) {
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `hyyh`, res.data);
         this.$set(this, `hyyy`, res.data.reverse());
       }
     },
-    // 页面一次性请求
-    async searchNode() {
-      let res = await this.querytwo();
+    async initNode() {
+      const time = moment(this.toDay).format('YYYY-MM-DD');
+      let res = await this.querytwo({ skip: 0, limit: 35, time });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'hyjd', res.data);
+      }
     },
+    // 页面一次性请求
+    async searchNode() {},
     channel() {
       this.$stomp({
         [`/exchange/service_count/nodes`]: this.onMessage,