|
@@ -28,8 +28,8 @@ const taskIds = ref({});
|
|
const dailySalesTime = ref(dayjs().subtract(1, 'day').format('YYYY-MM-DD'));
|
|
const dailySalesTime = ref(dayjs().subtract(1, 'day').format('YYYY-MM-DD'));
|
|
|
|
|
|
const weeklyEntryTime = ref(null);
|
|
const weeklyEntryTime = ref(null);
|
|
-// const weeklySalesTime = ref(null);
|
|
|
|
const weeklyAdTime = ref(null);
|
|
const weeklyAdTime = ref(null);
|
|
|
|
+let initialLoad = true;
|
|
|
|
|
|
const entryStartDate = ref('');
|
|
const entryStartDate = ref('');
|
|
const entryEndDate = ref('');
|
|
const entryEndDate = ref('');
|
|
@@ -76,13 +76,13 @@ const handleWeekChange = () => {
|
|
adStartDate.value = adDate.startOf('week').format('YYYY-MM-DD');
|
|
adStartDate.value = adDate.startOf('week').format('YYYY-MM-DD');
|
|
adEndDate.value = adDate.endOf('week').format('YYYY-MM-DD');
|
|
adEndDate.value = adDate.endOf('week').format('YYYY-MM-DD');
|
|
}
|
|
}
|
|
|
|
+ if (initialLoad) {
|
|
|
|
+ initialLoad = false; // 只在初次加载时避免多次调用
|
|
|
|
+ } else {
|
|
|
|
+ fetchCurrentTaskData();
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
-watch(() => weeklyEntryTime.value, () => {
|
|
|
|
- handleWeekChange();
|
|
|
|
- fetchCurrentTaskData();
|
|
|
|
-});
|
|
|
|
-
|
|
|
|
const handleMonthChange = (value) => {
|
|
const handleMonthChange = (value) => {
|
|
if (value) {
|
|
if (value) {
|
|
const date = new Date(value);
|
|
const date = new Date(value);
|
|
@@ -229,7 +229,7 @@ const gridOptions = reactive({
|
|
round: true,
|
|
round: true,
|
|
loading: false,
|
|
loading: false,
|
|
showHeaderOverflow: true,
|
|
showHeaderOverflow: true,
|
|
- showOverflow: true,
|
|
|
|
|
|
+ //showOverflow: true,
|
|
columnConfig: {
|
|
columnConfig: {
|
|
resizable: true
|
|
resizable: true
|
|
},
|
|
},
|
|
@@ -764,7 +764,7 @@ onMounted(() => {
|
|
</div>
|
|
</div>
|
|
<el-card class="mx-8">
|
|
<el-card class="mx-8">
|
|
<div style="position: relative">
|
|
<div style="position: relative">
|
|
- <vxe-grid ref="xGrid" v-bind="currentGridOptions" v-on="gridEvents" stripe>
|
|
|
|
|
|
+ <vxe-grid ref="xGrid" stripe v-bind="currentGridOptions" v-on="gridEvents">
|
|
<template #operate="{ row }">
|
|
<template #operate="{ row }">
|
|
<template v-if="hasActiveEditRow(row)">
|
|
<template v-if="hasActiveEditRow(row)">
|
|
<el-button link size="small" @click="clearRowEvent(row)">取消</el-button>
|
|
<el-button link size="small" @click="clearRowEvent(row)">取消</el-button>
|
|
@@ -823,7 +823,7 @@ onMounted(() => {
|
|
</vxe-grid>
|
|
</vxe-grid>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-card>
|
|
- <el-dialog v-model="dayFormVisible" title="创建任务" width="600">
|
|
|
|
|
|
+ <el-dialog v-model="dayFormVisible" style="border-radius: 10px;" title="创建任务" width="600">
|
|
<el-form
|
|
<el-form
|
|
ref="taskDataFormRef"
|
|
ref="taskDataFormRef"
|
|
:model="taskDataForm"
|
|
:model="taskDataForm"
|
|
@@ -832,7 +832,7 @@ onMounted(() => {
|
|
label-position="top"
|
|
label-position="top"
|
|
label-width="auto"
|
|
label-width="auto"
|
|
status-icon
|
|
status-icon
|
|
- style="max-width: 600px;border-radius: 10px;">
|
|
|
|
|
|
+ style="max-width: 600px;">
|
|
<div v-if="dateType === 'day'">
|
|
<div v-if="dateType === 'day'">
|
|
<el-form-item v-for="item in filteredDayColumns" :key="item.field" :label="item.title" :prop="item.field">
|
|
<el-form-item v-for="item in filteredDayColumns" :key="item.field" :label="item.title" :prop="item.field">
|
|
<el-input v-model="taskDataForm[item.field]" :placeholder="`请输入${item.title}`" />
|
|
<el-input v-model="taskDataForm[item.field]" :placeholder="`请输入${item.title}`" />
|