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