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