瀏覽代碼

待办事项注释

guhongwei 2 年之前
父節點
當前提交
8a640ff99c
共有 1 個文件被更改,包括 33 次插入33 次删除
  1. 33 33
      components/mission-icon.vue

+ 33 - 33
components/mission-icon.vue

@@ -53,39 +53,39 @@ export default {
   methods: {
     ...mission(['query', 'update']),
     async search() {
-      const res = await this.query({ dot: true });
-      if (this.$checkRes(res)) {
-        let newData = _.cloneDeep(res.data);
-        const oldData = _.cloneDeep(this.list);
-        if (oldData.length !== 0) {
-          // 非初始化提示,初始化不提示
-          for (const nd of newData) {
-            const sr = oldData.find(f => nd.id === f.id && nd.status === '2' && f.status === '1');
-            let ntitle, type, message;
-            if (sr) {
-              const { title } = sr;
-              ntitle = title;
-              type = 'success';
-              message = '已完成,请在 菜单-待办事项 中查看结果';
-            }
-            const er = oldData.find(f => nd.id === f.id && nd.status === '3' && f.status === '1');
-            if (er) {
-              const { title } = er;
-              ntitle = title;
-              type = 'error';
-              message = '任务失败,请在 菜单-待办事项 中重新执行任务.若多次执行仍错误,请联系开发人员!';
-            }
-            if (ntitle && message && type) {
-              this.$notify({
-                title: ntitle,
-                message,
-                type,
-              });
-            }
-          }
-        }
-        this.$set(this, `list`, newData);
-      }
+      // const res = await this.query({ dot: true });
+      // if (this.$checkRes(res)) {
+      //   let newData = _.cloneDeep(res.data);
+      //   const oldData = _.cloneDeep(this.list);
+      //   if (oldData.length !== 0) {
+      //     // 非初始化提示,初始化不提示
+      //     for (const nd of newData) {
+      //       const sr = oldData.find(f => nd.id === f.id && nd.status === '2' && f.status === '1');
+      //       let ntitle, type, message;
+      //       if (sr) {
+      //         const { title } = sr;
+      //         ntitle = title;
+      //         type = 'success';
+      //         message = '已完成,请在 菜单-待办事项 中查看结果';
+      //       }
+      //       const er = oldData.find(f => nd.id === f.id && nd.status === '3' && f.status === '1');
+      //       if (er) {
+      //         const { title } = er;
+      //         ntitle = title;
+      //         type = 'error';
+      //         message = '任务失败,请在 菜单-待办事项 中重新执行任务.若多次执行仍错误,请联系开发人员!';
+      //       }
+      //       if (ntitle && message && type) {
+      //         this.$notify({
+      //           title: ntitle,
+      //           message,
+      //           type,
+      //         });
+      //       }
+      //     }
+      //   }
+      //   this.$set(this, `list`, newData);
+      // }
     },
     async noDot(data) {
       data.dot = false;