kuaifan 5 年之前
父节点
当前提交
7ea34c6822

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

@@ -54,31 +54,7 @@
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
-                    return this.renderTaskTitle(h, params, (act, detail) => {
-                        switch (act) {
-                            case "delete":      // 删除任务
-                            case "unarchived":  // 取消归档
-                                this.lists.some((task, i) => {
-                                    if (task.id == detail.id) {
-                                        this.lists.splice(i, 1);
-                                        return true;
-                                    }
-                                });
-                                break;
-
-                            case "archived":    // 归档
-                                let has = false;
-                                this.lists.some((task) => {
-                                    if (task.id == detail.id) {
-                                        return has = true;
-                                    }
-                                });
-                                if (!has) {
-                                    this.lists.unshift(detail);
-                                }
-                                break;
-                        }
-                    });
+                    return this.renderTaskTitle(h, params);
                 }
             }, {
                 "title": "创建人",
@@ -128,8 +104,9 @@
                                                 setTimeout(() => {
                                                     if (res.ret === 1) {
                                                         this.$Message.success(res.msg);
-                                                    }else{
-                                                        this.$Modal.error({title: this.$L('温馨提示'), content: res.msg });
+                                                        $A.triggerTaskInfoListener('unarchived', res.data);
+                                                    } else {
+                                                        this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
                                                     }
                                                 }, 350);
                                             }
@@ -147,6 +124,41 @@
                 this.loadYet = true;
                 this.getLists(true);
             }
+            $A.setOnTaskInfoListener((act, detail) => {
+                if (this.projectid > 0 && detail.projectid != this.projectid) {
+                    return;
+                }
+                this.lists.some((task, i) => {
+                    if (task.id == detail.id) {
+                        this.lists.splice(i, 1, detail);
+                        return true;
+                    }
+                });
+                //
+                switch (act) {
+                    case "delete":      // 删除任务
+                    case "unarchived":  // 取消归档
+                        this.lists.some((task, i) => {
+                            if (task.id == detail.id) {
+                                this.lists.splice(i, 1);
+                                return true;
+                            }
+                        });
+                        break;
+
+                    case "archived":    // 归档
+                        let has = false;
+                        this.lists.some((task) => {
+                            if (task.id == detail.id) {
+                                return has = true;
+                            }
+                        });
+                        if (!has) {
+                            this.lists.unshift(detail);
+                        }
+                        break;
+                }
+            });
         },
 
         watch: {

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

@@ -165,51 +165,7 @@
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
-                    return this.renderTaskTitle(h, params, (act, detail) => {
-                        switch (act) {
-                            case "delete":      // 删除任务
-                            case "archived":    // 归档
-                                this.lists.some((task, i) => {
-                                    if (task.id == detail.id) {
-                                        this.lists.splice(i, 1);
-                                        if (task.complete) {
-                                            this.statistics_complete--;
-                                        } else {
-                                            this.statistics_unfinished++;
-                                        }
-                                        return true;
-                                    }
-                                });
-                                break;
-
-                            case "unarchived":  // 取消归档
-                                let has = false;
-                                this.lists.some((task) => {
-                                    if (task.id == detail.id) {
-                                        if (task.complete) {
-                                            this.statistics_complete++;
-                                        } else {
-                                            this.statistics_unfinished--;
-                                        }
-                                        return has = true;
-                                    }
-                                });
-                                if (!has) {
-                                    this.lists.unshift(detail);
-                                }
-                                break;
-
-                            case "complete":    // 标记完成
-                                this.statistics_complete++;
-                                this.statistics_unfinished--;
-                                break;
-
-                            case "unfinished":  // 标记未完成
-                                this.statistics_complete--;
-                                this.statistics_unfinished++;
-                                break;
-                        }
-                    });
+                    return this.renderTaskTitle(h, params);
                 }
             }, {
                 "title": "创建人",
@@ -232,6 +188,61 @@
                 this.loadYet = true;
                 this.getLists(true);
             }
+            $A.setOnTaskInfoListener((act, detail) => {
+                if (this.projectid > 0 && detail.projectid != this.projectid) {
+                    return;
+                }
+                this.lists.some((task, i) => {
+                    if (task.id == detail.id) {
+                        this.lists.splice(i, 1, detail);
+                        return true;
+                    }
+                });
+                //
+                switch (act) {
+                    case "delete":      // 删除任务
+                    case "archived":    // 归档
+                        this.lists.some((task, i) => {
+                            if (task.id == detail.id) {
+                                this.lists.splice(i, 1);
+                                if (task.complete) {
+                                    this.statistics_complete--;
+                                } else {
+                                    this.statistics_unfinished++;
+                                }
+                                return true;
+                            }
+                        });
+                        break;
+
+                    case "unarchived":  // 取消归档
+                        let has = false;
+                        this.lists.some((task) => {
+                            if (task.id == detail.id) {
+                                if (task.complete) {
+                                    this.statistics_complete++;
+                                } else {
+                                    this.statistics_unfinished--;
+                                }
+                                return has = true;
+                            }
+                        });
+                        if (!has) {
+                            this.lists.unshift(detail);
+                        }
+                        break;
+
+                    case "complete":    // 标记完成
+                        this.statistics_complete++;
+                        this.statistics_unfinished--;
+                        break;
+
+                    case "unfinished":  // 标记未完成
+                        this.statistics_complete--;
+                        this.statistics_unfinished++;
+                        break;
+                }
+            });
         },
 
         watch: {

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

@@ -108,7 +108,6 @@
             return {
                 taskid: 0,
                 detail: {},
-                callback: null,
 
                 visible: false,
 
@@ -435,9 +434,7 @@
                                 this.logType == '日志' && this.$refs.log.getLists(true, true);
                                 this.$Message.success(res.msg);
                             }
-                            if (typeof this.callback === "function") {
-                                this.callback(ajaxData.act, res.data, ajaxData);
-                            }
+                            $A.triggerTaskInfoListener(ajaxData.act, res.data);
                         } else {
                             ajaxCallback(0);
                             this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});

+ 1 - 7
resources/assets/js/main/components/project/task/detail/index.js

@@ -1,7 +1,7 @@
 import Vue from 'vue';
 import component from './detail.vue'
 
-const detailElement = (taskid, detail = {}, callback = null) => {
+const detailElement = (taskid, detail = {}) => {
     let cloneData = (myObj) => {
         if (typeof (myObj) !== 'object') return myObj;
         if (myObj === null) return myObj;
@@ -17,11 +17,6 @@ const detailElement = (taskid, detail = {}, callback = null) => {
     return new Promise(() => {
         let custom = Vue.extend(component);
 
-        if (typeof detail === "function") {
-            callback = detail;
-            detail = {};
-        }
-
         if (typeof taskid === 'object' && taskid !== null) {
             detail = cloneData(taskid);
             taskid = parseInt(taskid.id);
@@ -41,7 +36,6 @@ const detailElement = (taskid, detail = {}, callback = null) => {
         let data = {
             taskid: taskid,
             detail: detail,
-            callback: callback,
         };
 
         let instance = new custom({

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

@@ -218,6 +218,42 @@
                 this.loadYet = true;
                 this.getLists(true);
             }
+            $A.setOnTaskInfoListener((act, detail) => {
+                if (this.projectid > 0 && detail.projectid != this.projectid) {
+                    return;
+                }
+                this.lists.some((task, i) => {
+                    if (task.id == detail.id) {
+                        this.lists.splice(i, 1, detail);
+                        return true;
+                    }
+                });
+                //
+                switch (act) {
+                    case "username":    // 负责人
+                    case "delete":      // 删除任务
+                    case "archived":    // 归档
+                        this.lists.some((task, i) => {
+                            if (task.id == detail.id) {
+                                this.lists.splice(i, 1);
+                                return true;
+                            }
+                        });
+                        break;
+
+                    case "unarchived":  // 取消归档
+                        let has = false;
+                        this.lists.some((task) => {
+                            if (task.id == detail.id) {
+                                return has = true;
+                            }
+                        });
+                        if (!has) {
+                            this.lists.unshift(detail);
+                        }
+                        break;
+                }
+            });
         },
 
         watch: {

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

@@ -52,18 +52,7 @@
                 "key": 'title',
                 "minWidth": 120,
                 render: (h, params) => {
-                    return this.renderTaskTitle(h, params, (act, detail) => {
-                        switch (act) {
-                            case "delete":      // 删除任务
-                                this.lists.some((task, i) => {
-                                    if (task.id == detail.id) {
-                                        this.lists.splice(i, 1);
-                                        return true;
-                                    }
-                                });
-                                break;
-                        }
-                    });
+                    return this.renderTaskTitle(h, params);
                 }
             }, {
                 "title": "创建人",
@@ -98,6 +87,25 @@
                 this.loadYet = true;
                 this.getLists(true);
             }
+            $A.setOnTaskInfoListener((act, detail) => {
+                this.lists.some((task, i) => {
+                    if (task.id == detail.id) {
+                        this.lists.splice(i, 1, detail);
+                        return true;
+                    }
+                });
+                //
+                switch (act) {
+                    case "delete":      // 删除任务
+                        this.lists.some((task, i) => {
+                            if (task.id == detail.id) {
+                                this.lists.splice(i, 1);
+                                return true;
+                            }
+                        });
+                        break;
+                }
+            });
         },
 
         watch: {

+ 34 - 28
resources/assets/js/main/components/project/todo/calendar.vue

@@ -33,38 +33,44 @@
 
         },
         mounted() {
+            $A.setOnTaskInfoListener((act, detail) => {
+                detail = this.formatTaskData(detail);
+                this.lists.some((task, i) => {
+                    if (task.id == detail.id) {
+                        this.lists.splice(i, 1, detail);
+                        return true;
+                    }
+                });
+                //
+                switch (act) {
+                    case "username":    // 负责人
+                    case "delete":      // 删除任务
+                    case "archived":    // 归档
+                        this.lists.some((task, i) => {
+                            if (task.id == detail.id) {
+                                this.lists.splice(i, 1);
+                                return true;
+                            }
+                        });
+                        break;
 
+                    case "unarchived":  // 取消归档
+                        let has = false;
+                        this.lists.some((task) => {
+                            if (task.id == detail.id) {
+                                return has = true;
+                            }
+                        });
+                        if (!has) {
+                            this.lists.unshift(detail);
+                        }
+                        break;
+                }
+            });
         },
-
         methods: {
             clickEvent(event){
-                this.taskDetail(event.id, (act, detail) => {
-                    let data = this.formatTaskData(detail);
-                    for (let key in data) {
-                        if (data.hasOwnProperty(key)) {
-                            this.$set(event, key, data[key])
-                        }
-                    }
-                    //
-                    switch (act) {
-                        case "username":    // 负责人
-                        case "delete":      // 删除任务
-                        case "archived":    // 归档
-                            this.lists.some((task, i) => {
-                                if (task.id == detail.id) {
-                                    this.lists.splice(i, 1);
-                                    return true;
-                                }
-                            });
-                            break;
-
-                        case "unarchived":  // 取消归档
-                            this.lists.push(data);
-                            break;
-                    }
-                    //
-                    this.$emit("change", act, detail);
-                });
+                this.taskDetail(event.id);
             },
 
             changeDateRange(startdate, enddate){

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

@@ -75,6 +75,39 @@
                 this.loadYet = true;
                 this.getLists(true);
             }
+            $A.setOnTaskInfoListener((act, detail) => {
+                this.lists.some((task, i) => {
+                    if (task.id == detail.id) {
+                        this.lists.splice(i, 1, detail);
+                        return true;
+                    }
+                });
+                //
+                switch (act) {
+                    case "username":    // 负责人
+                    case "delete":      // 删除任务
+                    case "archived":    // 归档
+                        this.lists.some((task, i) => {
+                            if (task.id == detail.id) {
+                                this.lists.splice(i, 1);
+                                return true;
+                            }
+                        });
+                        break;
+
+                    case "unarchived":  // 取消归档
+                        let has = false;
+                        this.lists.some((task) => {
+                            if (task.id == detail.id) {
+                                return has = true;
+                            }
+                        });
+                        if (!has) {
+                            this.lists.unshift(detail);
+                        }
+                        break;
+                }
+            })
         },
 
         watch: {

+ 16 - 0
resources/assets/js/main/main.js

@@ -220,6 +220,22 @@ import '../../sass/main.scss';
         },
         __userInfoListener: [],
 
+        /**
+         * 监听任务发生变化
+         * @param callback
+         */
+        setOnTaskInfoListener(callback) {
+            if (typeof callback === "function") {
+                $A.__taskInfoListener.push(callback);
+            }
+        },
+        triggerTaskInfoListener(act, taskDetail) {
+            $A.__taskInfoListener.forEach((callback) => {
+                typeof callback === "function" && callback(act, taskDetail);
+            });
+        },
+        __taskInfoListener: [],
+
     });
 
     window.$A = $;

+ 7 - 48
resources/assets/js/main/mixins/task.js

@@ -1,6 +1,6 @@
 export default {
     methods: {
-        taskComplete(taskDetail, complete, callback = null) {
+        taskComplete(taskDetail, complete = null) {
             if (taskDetail['loadIng'] === true) {
                 return;
             }
@@ -22,7 +22,7 @@ export default {
                 success: (res) => {
                     if (res.ret === 1) {
                         this.$Message.success(res.msg);
-                        typeof callback === "function" && callback(res.data);
+                        $A.triggerTaskInfoListener(complete ? 'complete' : 'unfinished', res.data);
                     } else {
                         this.$set(taskDetail, 'complete', !complete);
                         this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
@@ -31,66 +31,25 @@ export default {
             });
         },
 
-        renderTaskTitle(h, params, callback) {
-            let taskDetail = params.row;
+        renderTaskTitle(h, params) {
             return h('div', [
                 h('Icon', {
                     props: { type: params.row.complete ? 'md-checkbox-outline' : 'md-square-outline' },
                     style: {marginRight: '4px', cursor: 'pointer', fontSize: '15px'},
                     on: {
                         click: () => {
-                            this.taskComplete(params.row, !params.row.complete, (detail) => {
-                                this.$emit("change", detail.complete ? 'complete' : 'unfinished', detail);
-                                typeof callback === "function" && callback(detail.complete ? 'complete' : 'unfinished', detail);
-                            });
+                            this.taskComplete(params.row, !params.row.complete);
                         }
                     }
                 }),
                 h('span', {
-                    style: {cursor: 'pointer'},
+                    style: {cursor: 'pointer', textDecoration: params.row.complete ? 'line-through' : ''},
                     on: {
                         click: () => {
-                            this.taskDetail(taskDetail, (act, detail) => {
-                                for (let key in detail) {
-                                    if (detail.hasOwnProperty(key)) {
-                                        this.$set(taskDetail, key, detail[key])
-                                    }
-                                }
-                                //
-                                if (typeof callback === "function") {
-                                    callback(act, detail);
-                                } else {
-                                    switch (act) {
-                                        case "username":    // 负责人
-                                        case "delete":      // 删除任务
-                                        case "archived":    // 归档
-                                            this.lists.some((task, i) => {
-                                                if (task.id == detail.id) {
-                                                    this.lists.splice(i, 1);
-                                                    return true;
-                                                }
-                                            });
-                                            break;
-
-                                        case "unarchived":  // 取消归档
-                                            let has = false;
-                                            this.lists.some((task) => {
-                                                if (task.id == detail.id) {
-                                                    return has = true;
-                                                }
-                                            });
-                                            if (!has) {
-                                                this.lists.unshift(detail);
-                                            }
-                                            break;
-                                    }
-                                }
-                                //
-                                this.$emit("change", act, detail);
-                            });
+                            this.taskDetail(params.row);
                         }
                     }
-                }, taskDetail.title)
+                }, params.row.title)
             ]);
         }
     }

+ 24 - 25
resources/assets/js/main/pages/project.vue

@@ -109,13 +109,13 @@
         <Drawer v-model="projectDrawerShow" width="75%">
             <Tabs v-if="projectDrawerShow" v-model="projectDrawerTab">
                 <TabPane :label="$L('已归档任务')" name="archived">
-                    <project-archived :canload="projectDrawerShow && projectDrawerTab == 'archived'" :projectid="handleProjectId" @change="changeTaskProcess"></project-archived>
+                    <project-archived :canload="projectDrawerShow && projectDrawerTab == 'archived'" :projectid="handleProjectId"></project-archived>
                 </TabPane>
                 <TabPane :label="$L('成员管理')" name="member">
                     <project-users :canload="projectDrawerShow && projectDrawerTab == 'member'" :projectid="handleProjectId"></project-users>
                 </TabPane>
                 <TabPane :label="$L('项目统计')" name="statistics">
-                    <project-statistics :canload="projectDrawerShow && projectDrawerTab == 'statistics'" :projectid="handleProjectId" @change="changeTaskProcess"></project-statistics>
+                    <project-statistics :canload="projectDrawerShow && projectDrawerTab == 'statistics'" :projectid="handleProjectId"></project-statistics>
                 </TabPane>
             </Tabs>
         </Drawer>
@@ -362,6 +362,28 @@
         },
         mounted() {
             this.getLists(true);
+            $A.setOnTaskInfoListener((act, detail) => {
+                switch (act) {
+                    case "complete":    // 标记完成
+                        this.lists.some((item) => {
+                            if (item.id == detail.projectid) {
+                                item.complete++;
+                                item.unfinished--;
+                                return true;
+                            }
+                        })
+                        break;
+                    case "unfinished":  // 标记未完成
+                        this.lists.some((item) => {
+                            if (item.id == detail.projectid) {
+                                item.complete--;
+                                item.unfinished++;
+                                return true;
+                            }
+                        })
+                        break;
+                }
+            });
         },
         deactivated() {
             this.addShow = false;
@@ -648,29 +670,6 @@
                     },
                 });
             },
-
-            changeTaskProcess(act, detail) {
-                switch (act) {
-                    case "complete":    // 标记完成
-                        this.lists.some((item) => {
-                            if (item.id == detail.projectid) {
-                                item.complete++;
-                                item.unfinished--;
-                                return true;
-                            }
-                        })
-                        break;
-                    case "unfinished":  // 标记未完成
-                        this.lists.some((item) => {
-                            if (item.id == detail.projectid) {
-                                item.complete--;
-                                item.unfinished++;
-                                return true;
-                            }
-                        })
-                        break;
-                }
-            }
         },
     }
 </script>

+ 74 - 81
resources/assets/js/main/pages/todo.vue

@@ -75,13 +75,13 @@
         <Drawer v-model="todoDrawerShow" width="75%">
             <Tabs v-if="todoDrawerShow" v-model="todoDrawerTab">
                 <TabPane :label="$L('待办日程')" name="calendar">
-                    <todo-calendar :canload="todoDrawerShow && todoDrawerTab == 'calendar'" @change="changeTaskProcess"></todo-calendar>
+                    <todo-calendar :canload="todoDrawerShow && todoDrawerTab == 'calendar'"></todo-calendar>
                 </TabPane>
                 <TabPane :label="$L('已完成的任务')" name="complete">
-                    <todo-complete :canload="todoDrawerShow && todoDrawerTab == 'complete'" @change="changeTaskProcess"></todo-complete>
+                    <todo-complete :canload="todoDrawerShow && todoDrawerTab == 'complete'"></todo-complete>
                 </TabPane>
                 <TabPane :label="$L('我关注的任务')" name="attention">
-                    <todo-attention :canload="todoDrawerShow && todoDrawerTab == 'attention'" @change="changeTaskProcess"></todo-attention>
+                    <todo-attention :canload="todoDrawerShow && todoDrawerTab == 'attention'"></todo-attention>
                 </TabPane>
             </Tabs>
         </Drawer>
@@ -372,6 +372,76 @@
                 this.userInfo = res;
                 this.refreshTask();
             });
+            $A.setOnTaskInfoListener((act, detail) => {
+                for (let level in this.taskDatas) {
+                    this.taskDatas[level].lists.some((task, i) => {
+                        if (task.id == detail.id) {
+                            this.taskDatas[level].lists.splice(i, 1, detail);
+                            return true;
+                        }
+                    });
+                }
+                //
+                switch (act) {
+                    case "title": // 标题
+                    case "desc": // 描述
+                    case "plannedtime": // 设置计划时间
+                    case "unplannedtime": // 取消计划时间
+                    case "complete": // 标记完成
+                    case "unfinished": // 标记未完成
+                    case "comment": // 评论
+                        // 这些都不用处理
+                        break;
+
+                    case "level":       // 优先级
+                        for (let level in this.taskDatas) {
+                            this.taskDatas[level].lists.some((task, i) => {
+                                if (task.id == detail.id) {
+                                    this.taskDatas[level].lists.splice(i, 1);
+                                    return true;
+                                }
+                            });
+                            if (level == detail.level) {
+                                this.taskDatas[level].lists.some((task, i) => {
+                                    if (detail.userorder > task.userorder || (detail.userorder == task.userorder && detail.id > task.id)) {
+                                        this.taskDatas[level].lists.splice(i, 0, detail);
+                                        return true;
+                                    }
+                                });
+                            }
+                        }
+                        this.taskSortData = this.getTaskSort();
+                        break;
+
+                    case "username":    // 负责人
+                    case "delete":      // 删除任务
+                    case "archived":    // 归档
+                        for (let level in this.taskDatas) {
+                            this.taskDatas[level].lists.some((task, i) => {
+                                if (task.id == detail.id) {
+                                    this.taskDatas[level].lists.splice(i, 1);
+                                    return true;
+                                }
+                            });
+                        }
+                        this.taskSortData = this.getTaskSort();
+                        break;
+
+                    case "unarchived":  // 取消归档
+                        for (let level in this.taskDatas) {
+                            if (level == detail.level) {
+                                this.taskDatas[level].lists.some((task, i) => {
+                                    if (detail.userorder > task.userorder || (detail.userorder == task.userorder && detail.id > task.id)) {
+                                        this.taskDatas[level].lists.splice(i, 0, detail);
+                                        return true;
+                                    }
+                                });
+                            }
+                        }
+                        this.taskSortData = this.getTaskSort();
+                        break;
+                }
+            });
         },
         computed: {
 
@@ -588,85 +658,8 @@
             },
 
             openTaskModal(taskDetail) {
-                this.taskDetail(taskDetail, (act, detail) => {
-                    this.changeTaskProcess(act, detail);
-                });
+                this.taskDetail(taskDetail);
             },
-
-            changeTaskProcess(act, detail) {
-                for (let level in this.taskDatas) {
-                    this.taskDatas[level].lists.some((task, i) => {
-                        if (task.id == detail.id) {
-                            for (let key in detail) {
-                                if (detail.hasOwnProperty(key)) {
-                                    this.$set(task, key, detail[key])
-                                }
-                            }
-                            return true;
-                        }
-                    });
-                }
-                //
-                switch (act) {
-                    case "title": // 标题
-                    case "desc": // 描述
-                    case "plannedtime": // 设置计划时间
-                    case "unplannedtime": // 取消计划时间
-                    case "complete": // 标记完成
-                    case "unfinished": // 标记未完成
-                    case "comment": // 评论
-                        // 这些都不用处理
-                        break;
-
-                    case "level":       // 优先级
-                        for (let level in this.taskDatas) {
-                            this.taskDatas[level].lists.some((task, i) => {
-                                if (task.id == detail.id) {
-                                    this.taskDatas[level].lists.splice(i, 1);
-                                    return true;
-                                }
-                            });
-                            if (level == detail.level) {
-                                this.taskDatas[level].lists.some((task, i) => {
-                                    if (detail.userorder > task.userorder || (detail.userorder == task.userorder && detail.id > task.id)) {
-                                        this.taskDatas[level].lists.splice(i, 0, detail);
-                                        return true;
-                                    }
-                                });
-                            }
-                        }
-                        this.taskSortData = this.getTaskSort();
-                        break;
-
-                    case "username":    // 负责人
-                    case "delete":      // 删除任务
-                    case "archived":    // 归档
-                        for (let level in this.taskDatas) {
-                            this.taskDatas[level].lists.some((task, i) => {
-                                if (task.id == detail.id) {
-                                    this.taskDatas[level].lists.splice(i, 1);
-                                    return true;
-                                }
-                            });
-                        }
-                        this.taskSortData = this.getTaskSort();
-                        break;
-
-                    case "unarchived":  // 取消归档
-                        for (let level in this.taskDatas) {
-                            if (level == detail.level) {
-                                this.taskDatas[level].lists.some((task, i) => {
-                                    if (detail.userorder > task.userorder || (detail.userorder == task.userorder && detail.id > task.id)) {
-                                        this.taskDatas[level].lists.splice(i, 0, detail);
-                                        return true;
-                                    }
-                                });
-                            }
-                        }
-                        this.taskSortData = this.getTaskSort();
-                        break;
-                }
-            }
         },
     }
 </script>