优化达人工作台

This commit is contained in:
2026-04-28 17:33:39 +08:00
parent ff25bb3922
commit acb93c09f9
6 changed files with 511 additions and 33 deletions

View File

@@ -140,7 +140,7 @@
:class="configForm.dataPoolSource === 'brother_info' ? 'border-purple-500 bg-purple-50 text-purple-700' : 'border-gray-200 bg-gray-50 text-gray-700'">
<input v-model="configForm.dataPoolSource" :disabled="isConfigControlDisabled" type="radio"
value="brother_info" class="h-4 w-4 border-gray-300 text-purple-600 focus:ring-purple-500" />
<span>大哥池</span>
<span>{{ brotherFeatureLabels.poolName }}</span>
</label>
</div>
<!-- <div v-if="isBrotherInfoMode" class="mt-4">
@@ -218,14 +218,14 @@
<section class="rounded-xl border border-gray-200 bg-white p-5 shadow-sm">
<div class="flex items-start justify-between gap-3">
<div>
<div class="text-sm font-medium text-gray-900">大哥池</div>
<div class="text-sm font-medium text-gray-900">{{ brotherFeatureLabels.poolName }}</div>
</div>
<span
:class="['rounded-full px-3 py-1 text-xs font-medium', isBrotherInfoMode ? 'bg-fuchsia-100 text-fuchsia-700' : 'bg-gray-100 text-gray-600']">{{
isBrotherInfoMode ? '当前使用中' : '可切换' }}</span>
</div>
<button @click="showBrotherInfoDialog = true"
class="mt-4 w-full rounded-lg border border-fuchsia-200 bg-fuchsia-50 px-4 py-3 text-sm font-medium text-fuchsia-600 transition-colors hover:bg-fuchsia-100">打开大哥池</button>
class="mt-4 w-full rounded-lg border border-fuchsia-200 bg-fuchsia-50 px-4 py-3 text-sm font-medium text-fuchsia-600 transition-colors hover:bg-fuchsia-100">打开{{ brotherFeatureLabels.poolName }}</button>
</section>
<!-- <section class="rounded-xl bg-slate-950 p-5 shadow-sm">
@@ -317,7 +317,7 @@
<AIConfigDialog :visible="showAIDialog" :config="aiConfig" @close="showAIDialog = false" @save="handleSaveAIConfig"
@change="(key, value) => aiConfig[key] = value" />
<HostListDialog :visible="showHostDialog" @close="showHostDialog = false" @save="() => { }" />
<BrotherInfoDialog :visible="showBrotherInfoDialog" @close="showBrotherInfoDialog = false" />
<TenantBrotherInfoDialog :visible="showBrotherInfoDialog" @close="showBrotherInfoDialog = false" />
<GreetingDialog :visible="showGreetingDialog" @close="showGreetingDialog = false"
@confirm="handleGreetingConfirm" />
</div>
@@ -327,11 +327,12 @@
import { computed, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { isElectron } from '@/utils/electronBridge'
import { getCurrentBrotherFeatureLabels } from '@/utils/tenantFeature'
import ViewPlaceholder from '@/components/ViewPlaceholder.vue'
import HostListDialog from '@/components/HostListDialog.vue'
import AIConfigDialog from '@/components/AIConfigDialog.vue'
import GreetingDialog from '@/components/GreetingDialog.vue'
import BrotherInfoDialog from '@/components/BrotherInfoDialog.vue'
import TenantBrotherInfoDialog from '@/components/TenantBrotherInfoDialog.vue'
const props = defineProps({ navSidebarWidth: { type: Number, default: 144 } })
const TIKTOK_VIEW_IDS = Array.from({ length: 9 }, (_, index) => index + 10)
@@ -366,7 +367,8 @@ const replyMessageCount = computed(() => replyMessages.value.length)
const languageCount = computed(() => Object.keys(configForm.prologueList || {}).length)
const isBrotherInfoMode = computed(() => configForm.dataPoolSource === 'brother_info')
const effectiveReplyUnreadMessages = computed(() => !isBrotherInfoMode.value && Boolean(configForm.replyUnreadMessages))
const dataPoolLabel = computed(() => (isBrotherInfoMode.value ? '大哥池' : '主播池'))
const brotherFeatureLabels = getCurrentBrotherFeatureLabels()
const dataPoolLabel = computed(() => (isBrotherInfoMode.value ? brotherFeatureLabels.poolName : '主播池'))
const normalizedGroupSwitchMinutes = computed(() => clampMinutes(configForm.groupSwitchMinutes))
const normalizedGroupViewCounts = computed(() => normalizeGroupViewCounts(configForm.groupViewCounts))
const effectiveInitialFullGroupNumber = computed(() => resolveInitialFullGroupNumber(configForm.initialFullGroupNumber, normalizedGroupViewCounts.value))

View File

@@ -239,6 +239,7 @@ import { getCountryName } from "@/utils/countryUtil";
import { ElMessage, ElMessageBox, ElLoading } from "element-plus";
import { useI18n } from 'vue-i18n';
import { useCountryInfo } from '@/composables/useCountryInfo';
import { isExpertPoolTenant } from '@/utils/tenantFeature';
// Mock API calls if not present
// Ideally we should import these from api file, but for simplicity I will mock them or use empty callbacks
@@ -488,7 +489,7 @@ function stopTimerfun() {
// Specify Room Logic
// 动态计算最大行数限制tenantId=12741 为 5000 条,其他为 50 条
const maxSpecifyLines = computed(() => {
return userInfo.value.tenantId == 12384 || userInfo.value.tenantId == 12741 ? 5000 : 50;
return isExpertPoolTenant(userInfo.value.tenantId) || userInfo.value.tenantId == 12741 ? 5000 : 50;
});
// 当前行数