空状态不完全显示
This commit is contained in:
@ -216,7 +216,7 @@ import FinishedProductDrawer from './finished-product-drawer.vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { getMediaAccountList } from '@/api/all/propertyMarketing';
|
||||
// 导入任务详情API
|
||||
import { getWorkDetail,getTaskSchedulesDetail } from '@/api/all/assignment-management';
|
||||
import { getWorkDetail } from '@/api/all/assignment-management';
|
||||
// 平台图标
|
||||
import iconDy from '@/assets/img/platform/icon-dy.png';
|
||||
import iconXhs from '@/assets/img/platform/icon-xhs.png';
|
||||
@ -389,7 +389,7 @@ const handleMaterialCancel = () => {
|
||||
};
|
||||
|
||||
// 处理成品库选择确认
|
||||
const handleProductConfirm = (result) => {
|
||||
const handleProductConfirm = async (result) => {
|
||||
selectedProducts.value = {
|
||||
keys: result.selectedKeys,
|
||||
data: result.selectedData,
|
||||
@ -401,13 +401,29 @@ const handleProductConfirm = (result) => {
|
||||
hasChoseFinishedProducts.value = true;
|
||||
// 取第一个选中的项目
|
||||
const selectedProduct = result.selectedRows[0];
|
||||
|
||||
// 获取成品详情
|
||||
try {
|
||||
const res = await getWorkDetail(selectedProduct.id);
|
||||
if (res && res.code === 200) {
|
||||
const workDetail = res.data;
|
||||
selectedProducts.value = {
|
||||
keys: [workDetail.id],
|
||||
data: [workDetail],
|
||||
text: workDetail.title || '1个稿件',
|
||||
images: workDetail.files ? workDetail.files.filter(f => f.type === 0) : [], // 图片文件
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取成品详情失败:', error);
|
||||
// 如果获取详情失败,使用原始数据
|
||||
selectedProducts.value = {
|
||||
keys: [selectedProduct.id],
|
||||
data: [selectedProduct],
|
||||
text: '1个稿件',
|
||||
images: [selectedProduct],
|
||||
};
|
||||
fillTaskData(selectedProduct.id);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -490,7 +506,7 @@ const showDrawer = (accountInfo = null, selectedDate = null) => {
|
||||
|
||||
// 新增:编辑任务时的数据回填方法
|
||||
const fillTaskData = async (taskData) => {
|
||||
// 如果传入的数据包含完整信息,则直接使用,否则获取完整详情
|
||||
// 如果传入的数据包含完整信息,则直接使用,否则获取详情
|
||||
let fullTaskData = taskData;
|
||||
|
||||
// 如果没有work或raw_materials等详细信息,则需要获取完整详情
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
:bordered="{ cell: true }"
|
||||
:scroll="{ x: 'max-content', y: 600 }"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
style="width: 100%"
|
||||
:pagination="false"
|
||||
@change="handleTableChange"
|
||||
@ -33,7 +33,7 @@
|
||||
>
|
||||
<!-- 空数据显示 -->
|
||||
<template #empty>
|
||||
<div class="flex flex-col items-center justify-center">
|
||||
<div class="flex flex-col items-center justify-center" style="min-height: 400px;">
|
||||
<img :src="emptyIcon" class="img mt-20px" alt="暂无数据" width="106" height="72" />
|
||||
<div class="text mt-36px">暂无数据</div>
|
||||
<div class="mt-12px mb-12px">可通过账号管理添加账号,进行任务排期管理</div>
|
||||
@ -607,7 +607,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.no-task {
|
||||
height: 30px;
|
||||
min-height: 42px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -641,11 +641,7 @@ onMounted(() => {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
:deep(td.today-column) .arco-table-cell-wrap {
|
||||
color: white !important;
|
||||
min-height: 42px;
|
||||
}
|
||||
|
||||
/* 抽屉左侧圆角样式 */
|
||||
|
||||
Reference in New Issue
Block a user