no message
This commit is contained in:
parent
7e1e311e68
commit
d626647156
@ -24,7 +24,7 @@
|
||||
<ul>
|
||||
<li @click="toggleRoute('dashboard')" :class="classNameRoute('dashboard')">
|
||||
<i class="iconfont"></i>
|
||||
<div class="menu-title">{{$L('仪表板')}}</div>
|
||||
<div class="menu-title">{{$L('仪表盘')}}</div>
|
||||
</li>
|
||||
<li @click="toggleRoute('calendar')" :class="classNameRoute('calendar')">
|
||||
<i class="iconfont"></i>
|
||||
|
@ -473,10 +473,9 @@ export default {
|
||||
if (a.p_level != b.p_level) {
|
||||
return a.p_level - b.p_level;
|
||||
}
|
||||
if (a.sort != b.sort) {
|
||||
return a.sort - b.sort;
|
||||
}
|
||||
return a.id - b.id;
|
||||
let at1 = new Date(a.end_at),
|
||||
at2 = new Date(b.end_at);
|
||||
return at1 - at2;
|
||||
});
|
||||
},
|
||||
|
||||
@ -502,10 +501,9 @@ export default {
|
||||
if (a.p_level != b.p_level) {
|
||||
return a.p_level - b.p_level;
|
||||
}
|
||||
if (a.sort != b.sort) {
|
||||
return a.sort - b.sort;
|
||||
}
|
||||
return a.id - b.id;
|
||||
let at1 = new Date(a.end_at),
|
||||
at2 = new Date(b.end_at);
|
||||
return at1 - at2;
|
||||
});
|
||||
},
|
||||
|
||||
@ -533,13 +531,9 @@ export default {
|
||||
return task.complete_at;
|
||||
});
|
||||
return array.sort((a, b) => {
|
||||
if (a.p_level != b.p_level) {
|
||||
return a.p_level - b.p_level;
|
||||
}
|
||||
if (a.sort != b.sort) {
|
||||
return a.sort - b.sort;
|
||||
}
|
||||
return a.id - b.id;
|
||||
let at1 = new Date(a.complete_at),
|
||||
at2 = new Date(b.complete_at);
|
||||
return at2 - at1;
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -663,8 +663,8 @@ export default {
|
||||
immediate: true,
|
||||
deep: true
|
||||
},
|
||||
'openTask._show' (show) {
|
||||
if (show) {
|
||||
taskId (id) {
|
||||
if (id > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.input.focus()
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-dashboard">
|
||||
<PageTitle>{{$L('仪表板')}}</PageTitle>
|
||||
<PageTitle>{{$L('仪表盘')}}</PageTitle>
|
||||
<div class="dashboard-wrapper">
|
||||
<div class="dashboard-hello">{{$L('欢迎您,' + userInfo.nickname)}}</div>
|
||||
<div class="dashboard-desc">{{$L('以下是你当前的任务统计数据')}}</div>
|
||||
@ -162,10 +162,7 @@ export default {
|
||||
}
|
||||
})
|
||||
return datas.sort((a, b) => {
|
||||
if (a._end_time != b._end_time) {
|
||||
return a._end_time - b._end_time;
|
||||
}
|
||||
return a.id - b.id;
|
||||
return a._end_time - b._end_time;
|
||||
});
|
||||
},
|
||||
|
||||
|
21
resources/assets/js/store/actions.js
vendored
21
resources/assets/js/store/actions.js
vendored
@ -591,7 +591,7 @@ export default {
|
||||
}
|
||||
//
|
||||
setTimeout(() => {
|
||||
if (data.parent_id > 0) {
|
||||
if (key == 'taskSubs') {
|
||||
state.method.setStorage("cacheTaskSubs", state.cacheTaskSubs = state[key]);
|
||||
} else {
|
||||
state.method.setStorage("cacheTasks", state.cacheTasks = state[key]);
|
||||
@ -608,16 +608,27 @@ export default {
|
||||
*/
|
||||
forgetTask({state, dispatch}, task_id) {
|
||||
let index = state.tasks.findIndex(({id}) => id == task_id);
|
||||
let key = 'tasks';
|
||||
if (index === -1) {
|
||||
index = state.taskSubs.findIndex(({id}) => id == task_id);
|
||||
key = 'taskSubs';
|
||||
}
|
||||
if (index > -1) {
|
||||
dispatch("getTaskOne", state.tasks[index].parent_id)
|
||||
dispatch('getProjectOne', state.tasks[index].project_id)
|
||||
state.tasks.splice(index, 1);
|
||||
dispatch("getTaskOne", state[key][index].parent_id)
|
||||
if (key == 'tasks') {
|
||||
dispatch('getProjectOne', state[key][index].project_id)
|
||||
}
|
||||
state[key].splice(index, 1);
|
||||
}
|
||||
if (state.taskId == task_id) {
|
||||
state.taskId = 0;
|
||||
}
|
||||
setTimeout(() => {
|
||||
state.method.setStorage("cacheTasks", state.cacheTasks = state.tasks);
|
||||
if (key == 'taskSubs') {
|
||||
state.method.setStorage("cacheTaskSubs", state.cacheTaskSubs = state[key]);
|
||||
} else {
|
||||
state.method.setStorage("cacheTasks", state.cacheTasks = state[key]);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user