修改样式

This commit is contained in:
lq
2025-09-25 14:31:39 +08:00
parent fe68319a23
commit 00a99b6512
3 changed files with 60 additions and 60 deletions

View File

@ -1,11 +1,8 @@
<template>
<a-drawer
title="创建任务"
cancel-text="取消"
ok-text="创建任务"
placement="right"
v-model:visible="showDriwer"
@after-visible-change="showDriwerChange"
@ok="handleCreateTask"
width="480px"
class="task-drawer"
@ -183,6 +180,16 @@
@confirm="handleProductConfirm"
@cancel="handleProductCancel"
/>
<!-- 底部操作栏 -->
<template #footer>
<div class="flex items-center justify-between">
<div class="flex items-center"></div>
<div class="flex justify-end">
<Button @click="handleCancel">取消</Button>
<Button class="ml-16px" type="primary" @click="handleCreateTask">创建任务</Button>
</div>
</div>
</template>
</a-drawer>
</template>
@ -415,21 +422,6 @@ const handleDateChange = (date) => {
// 日期处理逻辑
};
// 抽屉显示状态变化
const showDriwerChange = (visible: boolean) => {
console.log('Main Drawer visible: ', visible);
};
// 原料库抽屉显示状态变化
const handleMaterialDrawerVisibleChange = (visible: boolean) => {
console.log('Raw Material Drawer visible: ', visible);
};
// 成品库抽屉显示状态变化
const handleProductDrawerVisibleChange = (visible: boolean) => {
console.log('Finished Product Drawer visible: ', visible);
};
// 处理筛选条件变化
const handleChange = (field, value) => {
localQuery.value[field] = value;
@ -439,6 +431,10 @@ const handleChange = (field, value) => {
});
};
const handleCancel = () => {
showDriwer.value = false;
};
// 点击创建任务按钮时触发
const handleCreateTask = () => {
// 验证表单
@ -452,11 +448,6 @@ const handleCreateTask = () => {
message.error('请选择发布内容');
return;
}
if (isActive.value === 'ai' && selectedMaterials.value.keys.length === 0) {
// 可以添加错误提示:请选择发布内容
message.error('请选择发布内容');
return;
}
console.log('有问题已返回');
// 准备提交的数据
const taskData = {
@ -472,7 +463,6 @@ const handleCreateTask = () => {
};
// 发射创建任务事件
emit('create-task', taskData);
// 关闭抽屉
showDriwer.value = false;
};