|
|
@@ -36,8 +36,25 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="目标账号" min-width="160">
|
|
|
+
|
|
|
+ <!-- Bug #6066: 新增"平台/渠道"列,更清晰地展示任务目标平台 -->
|
|
|
+ <el-table-column label="平台/渠道" width="180">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div class="platform-tags">
|
|
|
+ <el-tag
|
|
|
+ v-for="platform in getTaskPlatforms(row)"
|
|
|
+ :key="platform"
|
|
|
+ size="small"
|
|
|
+ style="margin-right: 4px"
|
|
|
+ >
|
|
|
+ {{ getPlatformName(platform) }}
|
|
|
+ </el-tag>
|
|
|
+ <span v-if="getTaskPlatforms(row).length === 0" class="no-platform">-</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="目标账号" min-width="220">
|
|
|
<template #default="{ row }">
|
|
|
<span>{{ row.targetAccounts?.length || 0 }} 个</span>
|
|
|
<template v-if="row.successCount !== undefined || row.failCount !== undefined">
|
|
|
@@ -48,16 +65,11 @@
|
|
|
✗ {{ row.failCount }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="平台" min-width="140">
|
|
|
- <template #default="{ row }">
|
|
|
<el-tag
|
|
|
v-for="platform in getTaskPlatforms(row)"
|
|
|
:key="platform"
|
|
|
size="small"
|
|
|
- style="margin-right: 4px"
|
|
|
+ style="margin-left: 4px"
|
|
|
>
|
|
|
{{ getPlatformName(platform) }}
|
|
|
</el-tag>
|
|
|
@@ -274,11 +286,7 @@
|
|
|
<div v-if="taskDetail?.results?.length" class="publish-results">
|
|
|
<h4>发布结果</h4>
|
|
|
<el-table :data="taskDetail.results" size="small">
|
|
|
- <el-table-column label="账号" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- {{ getAccountName(row.accountId) }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="账号" prop="accountId" width="80" />
|
|
|
<el-table-column label="平台" width="100">
|
|
|
<template #default="{ row }">
|
|
|
{{ getPlatformName(row.platform) }}
|
|
|
@@ -550,20 +558,17 @@ const createDescMaxLength = computed(() => {
|
|
|
return max;
|
|
|
});
|
|
|
|
|
|
-// 平台提示文案 - Bug #6152: 每个平台单独展示其要求,避免看不出是哪个平台的要求
|
|
|
+// 平台提示文案
|
|
|
const createPlatformHint = computed(() => {
|
|
|
const platforms = createSelectedPlatforms.value;
|
|
|
if (!platforms.length) return '';
|
|
|
-
|
|
|
- return platforms.map(p => {
|
|
|
- const name = PLATFORMS[p]?.name || p;
|
|
|
- const tips: string[] = [];
|
|
|
- if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireTitle) tips.push('标题必填');
|
|
|
- if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireDescription) tips.push('正文必填');
|
|
|
- if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireVideo) tips.push('视频必填');
|
|
|
- if (PLATFORM_PUBLISH_REQUIREMENTS[p]?.requireImage) tips.push('图片或视频必填');
|
|
|
- return tips.length > 0 ? `${name}:${tips.join('、')}` : `${name}`;
|
|
|
- }).join(';');
|
|
|
+ const names = platforms.map(p => PLATFORMS[p]?.name || p).join('、');
|
|
|
+ const tips: string[] = [];
|
|
|
+ if (createRequireTitle.value) tips.push('标题必填');
|
|
|
+ if (createRequireDescription.value) tips.push('正文必填');
|
|
|
+ if (createRequireVideo.value) tips.push('视频必填');
|
|
|
+ if (createRequireImage.value) tips.push('图片或视频必填');
|
|
|
+ return `已选平台:${names}。要求:${tips.join('、')}`;
|
|
|
});
|
|
|
|
|
|
const pagination = reactive({
|
|
|
@@ -732,12 +737,6 @@ function getPlatformName(platform: PlatformType) {
|
|
|
return PLATFORMS[platform]?.name || platform;
|
|
|
}
|
|
|
|
|
|
-// Bug #6140: 账号列显示昵称而非ID
|
|
|
-function getAccountName(accountId: number | string) {
|
|
|
- const account = accounts.value.find(a => Number(a.id) === Number(accountId));
|
|
|
- return account?.accountName || `账号${accountId}`;
|
|
|
-}
|
|
|
-
|
|
|
// 根据 targetAccounts 获取关联的平台列表(Bug #6066: 显示渠道)
|
|
|
function getTaskPlatforms(task: PublishTask): PlatformType[] {
|
|
|
const ids = new Set(task.targetAccounts || []);
|
|
|
@@ -1213,7 +1212,7 @@ watch(showCreateDialog, (visible) => {
|
|
|
.video-title {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.video-file {
|
|
|
font-size: 12px;
|
|
|
color: $text-secondary;
|
|
|
@@ -1221,6 +1220,17 @@ watch(showCreateDialog, (visible) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.platform-tags {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 4px;
|
|
|
+
|
|
|
+ .no-platform {
|
|
|
+ color: $text-secondary;
|
|
|
+ font-size: 13px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.form-tip {
|
|
|
margin-left: 12px;
|
|
|
color: $text-secondary;
|