![]()
{{ record.name || '-' }}
@@ -248,7 +248,6 @@ const processTableData = (apiData: any[]) => {
// 创建任务
const handleAddTask = () => {
- console.log('handleAddTask');
drawerPopupRef.value?.showDrawer();
};
@@ -473,7 +472,7 @@ const handleCellClick = (record: any, rowIndex: any, column: any) => {
return;
}
- console.log('selectedDate', selectedDate);
+ console.log('selectedDate', selectedDate, accountInfo);
drawerPopupRef.value.showDrawer(accountInfo, selectedDate);
};
@@ -505,6 +504,25 @@ const handleTaskAction = async (action: string, task: any, ...args: any[]) => {
message.success(res.message);
}
break;
+ case 'edit-task':
+ console.log('edit-task', args[0], typeof args[0]);
+ const accountInfo = {
+ id: args[0].id,
+ name: args[0].name,
+ platform: args[0].platform,
+ };
+ const selectedDate = task.execution_time;
+ const date = new Date(selectedDate);
+
+ // 显示抽屉
+ drawerPopupRef.value.showDrawer(accountInfo, date);
+
+ // 等待抽屉打开后再填充数据
+ nextTick(() => {
+ // 将任务信息回填到draw-popup组件
+ drawerPopupRef.value.fillTaskData(task);
+ });
+ break;
}
};
@@ -589,7 +607,7 @@ onMounted(() => {
}
.no-task {
- height: 30px;
+ min-height: 42px;
display: flex;
align-items: center;
justify-content: center;
@@ -623,7 +641,12 @@ onMounted(() => {
display: flex;
flex-direction: column;
align-items: start;
- height: 42px;
+ min-height: 42px;
+}
+
+:deep(td .arco-table-cell:first-child) {
+ align-items: center;
+ justify-content: center;
}
:deep(td.today-column) .arco-table-cell-wrap {