远程管理错误修复

This commit is contained in:
yy 2024-06-17 17:23:08 +08:00
parent 822736c806
commit 6e27f4e6fe
3 changed files with 11 additions and 1 deletions

View File

@ -42,7 +42,7 @@
</div>
<div class="right-content">
<div class="week-calendar">
<WeekCalendar/>
<WeekCalendar @dataChange="planChange"/>
</div>
<div class="system-logs" v-if="showLogMod">
<div class="title">
@ -97,7 +97,12 @@ function init() {
loadMsg();
}
function planChange() {
getTodoCount()
}
function getTodoCount() {
console.log(111111)
dailyPlanApi.getTodoCountByDate(dateFormater("yyyy-MM-dd", new Date())).then((res: any) => {
if (res.code == 0) {
todoTotal.value = res.data;

View File

@ -76,6 +76,8 @@ const recordWeek = ref([] as any);
const record = ref([] as any);
const currentDate = ref<Date>(new Date());
const emits = defineEmits(["dataChange"])
onMounted(init)
function init() {
@ -173,6 +175,7 @@ const remoteRecord = (item: any, index: number) => {
if (res.code == 0) {
ElMessage.success('删除成功!');
setDate(item.date);
emits("dataChange")
} else {
ElMessage.error(res.msg);
}
@ -183,6 +186,7 @@ const remoteRecord = (item: any, index: number) => {
}
const saveData = (e: any) => {
setDate(new Date(e.date));
emits("dataChange")
}
const planRemoveEvent = () => {

View File

@ -373,6 +373,7 @@ function sliderSuccess() {
redirect: "/home"
})
router.replace('/home')
loading.value = false
}
})
}