删除深色模式的样式
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
/* 自定义样式 */
|
/* 自定义样式 */
|
||||||
:root {
|
:root {
|
||||||
--sidebar-width: 200px;
|
--sidebar-width: 200px;
|
||||||
--color-bg-dark: #0f172a;
|
|
||||||
--color-bg-sidebar: #1e293b;
|
--color-bg-sidebar: #1e293b;
|
||||||
--color-accent: #38bdf8;
|
--color-accent: #38bdf8;
|
||||||
--color-text: #e2e8f0;
|
--color-text: #e2e8f0;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="h-full w-full overflow-y-auto bg-gray-50 p-6">
|
<div class="h-full w-full overflow-y-auto bg-gray-50 p-6">
|
||||||
<div class="bg-white dark:bg-slate-900 rounded-3xl shadow-sm border border-slate-100 dark:border-slate-800 p-6 h-full flex flex-col">
|
<div class="bg-white rounded-3xl shadow-sm border border-slate-100 p-6 h-full flex flex-col">
|
||||||
<!-- 顶部筛选区域 -->
|
<!-- 顶部筛选区域 -->
|
||||||
<div class="mb-6 space-y-4">
|
<div class="mb-6 space-y-4">
|
||||||
<!-- 第一行:主要筛选条件 -->
|
<!-- 第一行:主要筛选条件 -->
|
||||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||||
<div class="flex items-center flex-wrap gap-4">
|
<div class="flex items-center flex-wrap gap-4">
|
||||||
<el-checkbox v-model="queryFormData.isFilter" :label="$t('hostsList.filterPrivateUsers') || '过滤私密账号'" size="large"
|
<el-checkbox v-model="queryFormData.isFilter" :label="$t('hostsList.filterPrivateUsers') || '过滤私密账号'"
|
||||||
class="!mr-0" />
|
size="large" class="!mr-0" />
|
||||||
|
|
||||||
<!-- Coins Input -->
|
<!-- Coins Input -->
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
@@ -15,11 +15,11 @@
|
|||||||
<span>💰</span> {{ $t('hostsList.coins') || '金币' }}
|
<span>💰</span> {{ $t('hostsList.coins') || '金币' }}
|
||||||
</label>
|
</label>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<el-input v-model="queryFormData.coinMin" :placeholder="$t('hostsList.minCoins') || '最小'" style="width: 100px"
|
<el-input v-model="queryFormData.coinMin" :placeholder="$t('hostsList.minCoins') || '最小'"
|
||||||
type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
style="width: 100px" type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
||||||
<span class="text-slate-300">/</span>
|
<span class="text-slate-300">/</span>
|
||||||
<el-input v-model="queryFormData.coinMax" :placeholder="$t('hostsList.maxCoins') || '最大'" style="width: 100px"
|
<el-input v-model="queryFormData.coinMax" :placeholder="$t('hostsList.maxCoins') || '最大'"
|
||||||
type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
style="width: 100px" type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -29,20 +29,22 @@
|
|||||||
<span>📊</span> {{ $t('hostsList.level') || '等级' }}
|
<span>📊</span> {{ $t('hostsList.level') || '等级' }}
|
||||||
</label>
|
</label>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<el-input v-model="queryFormData.levelMin" :placeholder="$t('hostsList.minLevel') || '最小'" style="width: 100px"
|
<el-input v-model="queryFormData.levelMin" :placeholder="$t('hostsList.minLevel') || '最小'"
|
||||||
type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
style="width: 100px" type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
||||||
<span class="text-slate-300">/</span>
|
<span class="text-slate-300">/</span>
|
||||||
<el-input v-model="queryFormData.levelMax" :placeholder="$t('hostsList.maxLevel') || '最大'" style="width: 100px"
|
<el-input v-model="queryFormData.levelMax" :placeholder="$t('hostsList.maxLevel') || '最大'"
|
||||||
type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
style="width: 100px" type="number" :disabled="streamdialogVisibletext || isRunnings" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Info Pill -->
|
<!-- Info Pill -->
|
||||||
<div class="bg-white/60 border border-slate-200 rounded-full px-5 py-2 flex items-center gap-4 text-sm shadow-sm">
|
<div
|
||||||
|
class="bg-white/60 border border-slate-200 rounded-full px-5 py-2 flex items-center gap-4 text-sm shadow-sm">
|
||||||
<span class="font-medium text-slate-500">{{ $t('hostsList.runningTime') || '运行时间' }}:</span>
|
<span class="font-medium text-slate-500">{{ $t('hostsList.runningTime') || '运行时间' }}:</span>
|
||||||
<span class="font-mono font-bold text-slate-700">
|
<span class="font-mono font-bold text-slate-700">
|
||||||
{{ String(hourstuo).padStart(2, '0') }}:{{ String(minutestuo).padStart(2, '0') }}:{{ String(secondstuo).padStart(2, '0') }}
|
{{ String(hourstuo).padStart(2, '0') }}:{{ String(minutestuo).padStart(2, '0') }}:{{
|
||||||
|
String(secondstuo).padStart(2, '0') }}
|
||||||
</span>
|
</span>
|
||||||
<div class="w-px h-4 bg-slate-200"></div>
|
<div class="w-px h-4 bg-slate-200"></div>
|
||||||
<span class="font-medium text-slate-500">{{ $t('hostsList.total') || '总数' }}:</span>
|
<span class="font-medium text-slate-500">{{ $t('hostsList.total') || '总数' }}:</span>
|
||||||
@@ -57,7 +59,8 @@
|
|||||||
<el-button @click="streamdialogVisible = true" :disabled="isRunnings" type="primary"
|
<el-button @click="streamdialogVisible = true" :disabled="isRunnings" type="primary"
|
||||||
class="!rounded-xl !font-semibold shadow-lg shadow-blue-500/20">
|
class="!rounded-xl !font-semibold shadow-lg shadow-blue-500/20">
|
||||||
<span class="mr-1">📍</span>
|
<span class="mr-1">📍</span>
|
||||||
{{ streamdialogVisibletext ? ($t('hostsList.specifiedRooms') || '已指定') : ($t('hostsList.specifyRooms') || '指定直播间') }}
|
{{ streamdialogVisibletext ? ($t('hostsList.specifiedRooms') || '已指定') : ($t('hostsList.specifyRooms') ||
|
||||||
|
'指定直播间') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button v-show="!isRunnings" type="success" @click="getBigBrother"
|
<el-button v-show="!isRunnings" type="success" @click="getBigBrother"
|
||||||
@@ -77,11 +80,13 @@
|
|||||||
<!-- 第二行:搜索和操作 -->
|
<!-- 第二行:搜索和操作 -->
|
||||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<el-select v-model="searchForm.region" filterable :placeholder="$t('hostsList.selectCountry') || '选择国家'" style="width: 160px">
|
<el-select v-model="searchForm.region" filterable :placeholder="$t('hostsList.selectCountry') || '选择国家'"
|
||||||
|
style="width: 160px">
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-input v-model="searchForm.displayId" :placeholder="$t('hostsList.bigBrotherId') || '大哥ID'" style="width: 180px" clearable>
|
<el-input v-model="searchForm.displayId" :placeholder="$t('hostsList.bigBrotherId') || '大哥ID'"
|
||||||
|
style="width: 180px" clearable>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<span class="font-semibold text-slate-400">@</span>
|
<span class="font-semibold text-slate-400">@</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -120,7 +125,8 @@
|
|||||||
<button @click="refreshCountry" :disabled="isRefreshingCountry"
|
<button @click="refreshCountry" :disabled="isRefreshingCountry"
|
||||||
class="p-1 rounded-md hover:bg-slate-200 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
class="p-1 rounded-md hover:bg-slate-200 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
:title="$t('hostsList.refreshCountry') || '刷新国家'">
|
:title="$t('hostsList.refreshCountry') || '刷新国家'">
|
||||||
<span class="material-icons-round text-slate-500 text-base" :class="{ 'animate-spin': isRefreshingCountry }">refresh</span>
|
<span class="material-icons-round text-slate-500 text-base"
|
||||||
|
:class="{ 'animate-spin': isRefreshingCountry }">refresh</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,7 +138,8 @@
|
|||||||
@cell-dblclick="handleCellDbClick" @selection-change="handleSelectionChange">
|
@cell-dblclick="handleCellDbClick" @selection-change="handleSelectionChange">
|
||||||
<el-table-column fixed prop="displayId" :label="$t('hostsList.id') || 'ID'" min-width="120">
|
<el-table-column fixed prop="displayId" :label="$t('hostsList.id') || 'ID'" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="text-primary font-semibold cursor-pointer hover:underline" @click="openHTML(scope.row.displayId)">
|
<div class="text-primary font-semibold cursor-pointer hover:underline"
|
||||||
|
@click="openHTML(scope.row.displayId)">
|
||||||
{{ scope.row.displayId }}
|
{{ scope.row.displayId }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -140,7 +147,8 @@
|
|||||||
|
|
||||||
<el-table-column prop="hostDisplayId" :label="$t('hostsList.hostId') || '主播ID'" min-width="120">
|
<el-table-column prop="hostDisplayId" :label="$t('hostsList.hostId') || '主播ID'" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="text-primary font-semibold cursor-pointer hover:underline" @click.ctrl.exact="handleLongPress(scope.row.hostDisplayId)">
|
<div class="text-primary font-semibold cursor-pointer hover:underline"
|
||||||
|
@click.ctrl.exact="handleLongPress(scope.row.hostDisplayId)">
|
||||||
{{ scope.row.hostDisplayId }}
|
{{ scope.row.hostDisplayId }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -175,9 +183,11 @@
|
|||||||
<div v-for="(field, index) in fields" :key="index" class="grid grid-cols-12 gap-4 items-center">
|
<div v-for="(field, index) in fields" :key="index" class="grid grid-cols-12 gap-4 items-center">
|
||||||
<div class="col-span-3 text-right text-gray-600">{{ field.label }}</div>
|
<div class="col-span-3 text-right text-gray-600">{{ field.label }}</div>
|
||||||
<div class="col-span-9 flex gap-2 items-center">
|
<div class="col-span-9 flex gap-2 items-center">
|
||||||
<el-input type="number" v-model.number="searchForm[field.minModel]" :placeholder="$t('hostsList.minValue') || '最小值'" />
|
<el-input type="number" v-model.number="searchForm[field.minModel]"
|
||||||
<span>-</span>
|
:placeholder="$t('hostsList.minValue') || '最小值'" />
|
||||||
<el-input type="number" v-model.number="searchForm[field.maxModel]" :placeholder="$t('hostsList.maxValue') || '最大值'" />
|
<span>-</span>
|
||||||
|
<el-input type="number" v-model.number="searchForm[field.maxModel]"
|
||||||
|
:placeholder="$t('hostsList.maxValue') || '最大值'" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -188,8 +198,8 @@
|
|||||||
<el-option v-for="item in sortNameOptions" :key="item.type" :label="item.label" :value="item.type" />
|
<el-option v-for="item in sortNameOptions" :key="item.type" :label="item.label" :value="item.type" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select v-model="sortData.sort" class="w-full">
|
<el-select v-model="sortData.sort" class="w-full">
|
||||||
<el-option :label="$t('hostsList.ascending') || '升序'" value="asc" />
|
<el-option :label="$t('hostsList.ascending') || '升序'" value="asc" />
|
||||||
<el-option :label="$t('hostsList.descending') || '降序'" value="desc" />
|
<el-option :label="$t('hostsList.descending') || '降序'" value="desc" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,14 +217,14 @@
|
|||||||
<el-input v-model="textarea" :rows="10" type="textarea"
|
<el-input v-model="textarea" :rows="10" type="textarea"
|
||||||
:placeholder="$t('hostsList.enterRoomIds') || '请输入房间ID,每行一个'" @input="handleInput" />
|
:placeholder="$t('hostsList.enterRoomIds') || '请输入房间ID,每行一个'" @input="handleInput" />
|
||||||
<div class="mt-2 text-sm text-slate-500">
|
<div class="mt-2 text-sm text-slate-500">
|
||||||
{{ currentLineCount }} / {{ maxSpecifyLines }}
|
{{ currentLineCount }} / {{ maxSpecifyLines }}
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="flex justify-end gap-2">
|
<div class="flex justify-end gap-2">
|
||||||
<el-button @click="specifyCancel">{{ $t('hostsList.cancelSpecify') || '取消指定' }}</el-button>
|
<el-button @click="specifyCancel">{{ $t('hostsList.cancelSpecify') || '取消指定' }}</el-button>
|
||||||
<el-button @click="specifyreset">{{ $t('hostsList.specifyReset') || '重置' }}</el-button>
|
<el-button @click="specifyreset">{{ $t('hostsList.specifyReset') || '重置' }}</el-button>
|
||||||
<el-button type="primary" @click="specifyClick">{{ $t('hostsList.specifyConfirm') || '确认' }}</el-button>
|
<el-button type="primary" @click="specifyClick">{{ $t('hostsList.specifyConfirm') || '确认' }}</el-button>
|
||||||
<el-button type="success" @click="specifyClickStart">{{ $t('hostsList.specifyStart') || '确认并开始' }}</el-button>
|
<el-button type="success" @click="specifyClickStart">{{ $t('hostsList.specifyStart') || '确认并开始' }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -330,32 +340,32 @@ const timerId = ref(null);
|
|||||||
|
|
||||||
// Lifecycle
|
// Lifecycle
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
userInfo.value = getUser() || { tenantId: 0, id: 0 };
|
userInfo.value = getUser() || { tenantId: 0, id: 0 };
|
||||||
|
|
||||||
// 初始化独立的国家信息
|
// 初始化独立的国家信息
|
||||||
await initCountryInfo(t);
|
await initCountryInfo(t);
|
||||||
|
|
||||||
getCountry();
|
getCountry();
|
||||||
getlist();
|
getlist();
|
||||||
|
|
||||||
const savedSettings = await readSetInfos({ key: "UserSettings" });
|
const savedSettings = await readSetInfos({ key: "UserSettings" });
|
||||||
if (savedSettings) {
|
if (savedSettings) {
|
||||||
try {
|
try {
|
||||||
// savedSettings might be object already if backend returned object, or string
|
// savedSettings might be object already if backend returned object, or string
|
||||||
const data = typeof savedSettings === 'string' ? JSON.parse(savedSettings) : savedSettings;
|
const data = typeof savedSettings === 'string' ? JSON.parse(savedSettings) : savedSettings;
|
||||||
queryFormData.value = data;
|
queryFormData.value = data;
|
||||||
|
|
||||||
if (data.anchor_ids && data.anchor_ids.length > 0) {
|
if (data.anchor_ids && data.anchor_ids.length > 0) {
|
||||||
streamdialogVisibletext.value = true;
|
streamdialogVisibletext.value = true;
|
||||||
textarea.value = data.anchor_ids.join("\n");
|
textarea.value = data.anchor_ids.join("\n");
|
||||||
}
|
}
|
||||||
} catch(e) { console.error("Error parsing settings", e); }
|
} catch (e) { console.error("Error parsing settings", e); }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
stopTimerfun();
|
stopTimerfun();
|
||||||
if (timerId.value) clearInterval(timerId.value);
|
if (timerId.value) clearInterval(timerId.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
@@ -374,33 +384,33 @@ const getlist = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
// Use API if available, else mock
|
// Use API if available, else mock
|
||||||
if (typeof tkbigdata === 'function') {
|
if (typeof tkbigdata === 'function') {
|
||||||
tkbigdata({
|
tkbigdata({
|
||||||
tenantId: Number(userInfo.value.tenantId),
|
tenantId: Number(userInfo.value.tenantId),
|
||||||
sort: sortData.value.sort,
|
sort: sortData.value.sort,
|
||||||
sortName: sortData.value.sortName,
|
sortName: sortData.value.sortName,
|
||||||
current: page.value,
|
current: page.value,
|
||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
createTimeStart: createTimes.value[0],
|
createTimeStart: createTimes.value[0],
|
||||||
createTimeEnd: createTimes.value[1],
|
createTimeEnd: createTimes.value[1],
|
||||||
...searchForm.value,
|
...searchForm.value,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
loading.value = false;
|
|
||||||
if (res && res.records) {
|
|
||||||
total.value = Number(res.total);
|
|
||||||
tableData.value = res.records.map((item) => ({
|
|
||||||
...item,
|
|
||||||
createTime: formatDate(new Date(item.createTime)),
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
console.log("Mocking data due to error", e);
|
|
||||||
loading.value = false;
|
|
||||||
// Mock data
|
|
||||||
tableData.value = [];
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.warn("tkbigdata API not found");
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
if (res && res.records) {
|
||||||
|
total.value = Number(res.total);
|
||||||
|
tableData.value = res.records.map((item) => ({
|
||||||
|
...item,
|
||||||
|
createTime: formatDate(new Date(item.createTime)),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
console.log("Mocking data due to error", e);
|
||||||
|
loading.value = false;
|
||||||
|
// Mock data
|
||||||
|
tableData.value = [];
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.warn("tkbigdata API not found");
|
||||||
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -439,20 +449,20 @@ function getBigBrother() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function BigBrotherstop() {
|
function BigBrotherstop() {
|
||||||
stopTimerfun();
|
stopTimerfun();
|
||||||
isRunnings.value = false;
|
isRunnings.value = false;
|
||||||
queryFormData.value.isRunning = false;
|
queryFormData.value.isRunning = false;
|
||||||
queryFormData.value.tenantId = userInfo.value.tenantId;
|
queryFormData.value.tenantId = userInfo.value.tenantId;
|
||||||
queryFormData.value.region = countryData.value;
|
queryFormData.value.region = countryData.value;
|
||||||
|
|
||||||
controlTask(JSON.stringify(queryFormData.value)).then(() => {
|
controlTask(JSON.stringify(queryFormData.value)).then(() => {
|
||||||
clearInterval(timerId.value);
|
clearInterval(timerId.value);
|
||||||
timerId.value = null;
|
timerId.value = null;
|
||||||
});
|
});
|
||||||
Specifystreaming(JSON.stringify(queryFormData.value)).then(() => {
|
Specifystreaming(JSON.stringify(queryFormData.value)).then(() => {
|
||||||
clearInterval(timerId.value);
|
clearInterval(timerId.value);
|
||||||
timerId.value = null;
|
timerId.value = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -498,114 +508,114 @@ function handleInput(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function specifyClickStart() {
|
function specifyClickStart() {
|
||||||
if (!textarea.value.trim()) {
|
if (!textarea.value.trim()) {
|
||||||
ElMessage.error(t('hostsList.enterRoomId') || "请输入房间ID");
|
ElMessage.error(t('hostsList.enterRoomId') || "请输入房间ID");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
queryFormData.value.anchor_ids = textarea.value.split("\n").filter(id => id.trim());
|
queryFormData.value.anchor_ids = textarea.value.split("\n").filter(id => id.trim());
|
||||||
streamdialogVisible.value = false;
|
streamdialogVisible.value = false;
|
||||||
streamdialogVisibletext.value = true;
|
streamdialogVisibletext.value = true;
|
||||||
getBigBrother();
|
getBigBrother();
|
||||||
}
|
}
|
||||||
|
|
||||||
function specifyClick() {
|
function specifyClick() {
|
||||||
if (!textarea.value.trim()) {
|
if (!textarea.value.trim()) {
|
||||||
streamdialogVisibletext.value = false;
|
streamdialogVisibletext.value = false;
|
||||||
queryFormData.value.anchor_ids = [];
|
queryFormData.value.anchor_ids = [];
|
||||||
} else {
|
} else {
|
||||||
streamdialogVisibletext.value = true;
|
streamdialogVisibletext.value = true;
|
||||||
queryFormData.value.anchor_ids = textarea.value.split("\n").filter(id => id.trim());
|
queryFormData.value.anchor_ids = textarea.value.split("\n").filter(id => id.trim());
|
||||||
}
|
}
|
||||||
streamdialogVisible.value = false;
|
streamdialogVisible.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function specifyCancel() {
|
function specifyCancel() {
|
||||||
streamdialogVisible.value = false;
|
streamdialogVisible.value = false;
|
||||||
streamdialogVisibletext.value = false;
|
streamdialogVisibletext.value = false;
|
||||||
queryFormData.value.anchor_ids = [];
|
queryFormData.value.anchor_ids = [];
|
||||||
textarea.value = "";
|
textarea.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function specifyreset() {
|
function specifyreset() {
|
||||||
textarea.value = "";
|
textarea.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Table / Filter Logic
|
// Table / Filter Logic
|
||||||
function serch() {
|
function serch() {
|
||||||
page.value = 1;
|
page.value = 1;
|
||||||
getlist();
|
getlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
searchForm.value = {};
|
searchForm.value = {};
|
||||||
createTimes.value = [];
|
createTimes.value = [];
|
||||||
sortData.value = { sortName: "createTime", sort: "desc" };
|
sortData.value = { sortName: "createTime", sort: "desc" };
|
||||||
getlist();
|
getlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handelClick() {
|
function handelClick() {
|
||||||
filterdialogVisible.value = false;
|
filterdialogVisible.value = false;
|
||||||
getlist();
|
getlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSizeChange(val) {
|
function handleSizeChange(val) {
|
||||||
pageSize.value = val;
|
pageSize.value = val;
|
||||||
getlist();
|
getlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleCurrentChange(val) {
|
function handleCurrentChange(val) {
|
||||||
page.value = val;
|
page.value = val;
|
||||||
getlist();
|
getlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectionChange(val) {
|
function handleSelectionChange(val) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
function openHTML(id) {
|
function openHTML(id) {
|
||||||
givePyAnchorId(id);
|
givePyAnchorId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleLongPress(id) {
|
function handleLongPress(id) {
|
||||||
openAnchorIdRooms(id);
|
openAnchorIdRooms(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleCellDbClick(row, column, cell) {
|
function handleCellDbClick(row, column, cell) {
|
||||||
const text = cell?.textContent?.trim();
|
const text = cell?.textContent?.trim();
|
||||||
if (text) {
|
if (text) {
|
||||||
setClipboards(text).then(() => ElMessage.success("Copied"));
|
setClipboards(text).then(() => ElMessage.success("Copied"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportList() {
|
function exportList() {
|
||||||
exportToExcel(tableData.value);
|
exportToExcel(tableData.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function openTikTok() {
|
function openTikTok() {
|
||||||
loginBigTikTok();
|
loginBigTikTok();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑国家信息
|
// 编辑国家信息
|
||||||
const editCountry = () => {
|
const editCountry = () => {
|
||||||
showEditCountryDialog(t);
|
showEditCountryDialog(t);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 刷新国家信息
|
// 刷新国家信息
|
||||||
const refreshCountry = async () => {
|
const refreshCountry = async () => {
|
||||||
await refreshCountryInfo(t);
|
await refreshCountryInfo(t);
|
||||||
};
|
};
|
||||||
|
|
||||||
function getCountry() {
|
function getCountry() {
|
||||||
if (typeof getCountryinfo === 'function') {
|
if (typeof getCountryinfo === 'function') {
|
||||||
getCountryinfo({})
|
getCountryinfo({})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
if (item.countryGroupName) {
|
if (item.countryGroupName) {
|
||||||
options.value.push({ value: item.countryGroupName, label: item.countryGroupName });
|
options.value.push({ value: item.countryGroupName, label: item.countryGroupName });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bg-white dark:bg-slate-50 rounded-3xl shadow-2xl flex flex-col overflow-hidden h-full">
|
<div class="bg-white rounded-3xl shadow-2xl flex flex-col overflow-hidden h-full">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<header class="px-8 py-6 border-b border-slate-100 dark:border-slate-200/60 bg-white">
|
<header class="px-8 py-6 border-b border-slate-100 bg-white">
|
||||||
<div class="flex flex-wrap items-center gap-4">
|
<div class="flex flex-wrap items-center gap-4">
|
||||||
<div class="relative flex-1 min-w-[200px]">
|
<div class="relative flex-1 min-w-[200px]">
|
||||||
<select v-model="searchForm.country"
|
<select v-model="searchForm.country"
|
||||||
@@ -101,27 +101,25 @@
|
|||||||
|
|
||||||
<!-- Invitation Type -->
|
<!-- Invitation Type -->
|
||||||
<td class="py-4 px-2 border-b border-slate-50 group-last:border-none">
|
<td class="py-4 px-2 border-b border-slate-50 group-last:border-none">
|
||||||
<span class="px-3 py-1 text-[10px] font-bold uppercase rounded-full"
|
<span class="px-3 py-1 text-[10px] font-bold uppercase rounded-full" :class="{
|
||||||
:class="{
|
'bg-green-50 text-green-600': row.invitationType == 1,
|
||||||
'bg-green-50 text-green-600': row.invitationType == 1,
|
'bg-amber-50 text-amber-600': row.invitationType == 2,
|
||||||
'bg-amber-50 text-amber-600': row.invitationType == 2,
|
'bg-blue-50 text-blue-600': row.invitationType == 3
|
||||||
'bg-blue-50 text-blue-600': row.invitationType == 3
|
}">
|
||||||
}">
|
{{ row.invitationType == 1 ? $t('hostList.invitationType1') : row.invitationType == 2 ?
|
||||||
{{ row.invitationType == 1 ? $t('hostList.invitationType1') : row.invitationType == 2 ? $t('hostList.invitationType2') : $t('hostList.invitationType3') }}
|
$t('hostList.invitationType2') : $t('hostList.invitationType3') }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Data Buttons -->
|
<!-- Data Buttons -->
|
||||||
<td class="py-4 px-2 border-b border-slate-50 group-last:border-none">
|
<td class="py-4 px-2 border-b border-slate-50 group-last:border-none">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<button
|
<button @click="getliveHost(row.hostId)"
|
||||||
@click="getliveHost(row.hostId)"
|
class="px-3 py-1.5 bg-blue-50 text-blue-600 hover:bg-blue-600 hover:text-white rounded-lg text-xs font-medium transition-all">
|
||||||
class="px-3 py-1.5 bg-blue-50 text-blue-600 hover:bg-blue-600 hover:text-white rounded-lg text-xs font-medium transition-all"
|
|
||||||
>
|
|
||||||
{{ $t('hostList.viewSessions') }}
|
{{ $t('hostList.viewSessions') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Country -->
|
<!-- Country -->
|
||||||
<td class="py-4 px-2 border-b border-slate-50 group-last:border-none">
|
<td class="py-4 px-2 border-b border-slate-50 group-last:border-none">
|
||||||
@@ -174,8 +172,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Footer / Pagination -->
|
<!-- Footer / Pagination -->
|
||||||
<footer
|
<footer class="px-8 py-6 border-t border-slate-100 bg-white flex flex-wrap items-center justify-between gap-4">
|
||||||
class="px-8 py-6 border-t border-slate-100 dark:border-slate-200/60 bg-white flex flex-wrap items-center justify-between gap-4">
|
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<select v-model="pageSize" @change="handleSizeChange"
|
<select v-model="pageSize" @change="handleSizeChange"
|
||||||
@@ -249,7 +246,7 @@
|
|||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<div><label class="text-sm text-slate-500 mb-1 block">{{ $t('hostList.ascending') }}/{{
|
<div><label class="text-sm text-slate-500 mb-1 block">{{ $t('hostList.ascending') }}/{{
|
||||||
$t('hostList.descending')
|
$t('hostList.descending')
|
||||||
}}</label></div>
|
}}</label></div>
|
||||||
<el-select v-model="sortData.sortForm" filterable :placeholder="$t('hostList.selectPlaceholder')"
|
<el-select v-model="sortData.sortForm" filterable :placeholder="$t('hostList.selectPlaceholder')"
|
||||||
class="w-full">
|
class="w-full">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -403,7 +400,7 @@ const getlist = () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
// Fix: Check if userInfo is valid before call
|
// Fix: Check if userInfo is valid before call
|
||||||
const tenantId = userInfo.value ? Number(userInfo.value.tenantId) : 0
|
const tenantId = userInfo.value ? Number(userInfo.value.tenantId) : 0
|
||||||
|
|
||||||
tkhostdata({
|
tkhostdata({
|
||||||
tenantId: tenantId,
|
tenantId: tenantId,
|
||||||
sort: sortData.value.sortForm,
|
sort: sortData.value.sortForm,
|
||||||
@@ -478,12 +475,12 @@ function openHTML(id) {
|
|||||||
|
|
||||||
function getCountry() {
|
function getCountry() {
|
||||||
getCountryinfo({}).then(res => {
|
getCountryinfo({}).then(res => {
|
||||||
if(res) {
|
if (res) {
|
||||||
res.forEach(item => {
|
res.forEach(item => {
|
||||||
if (item.countryGroupName) {
|
if (item.countryGroupName) {
|
||||||
options.value.push({ value: item.countryGroupName, label: item.countryGroupName })
|
options.value.push({ value: item.countryGroupName, label: item.countryGroupName })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,33 +4,30 @@
|
|||||||
<div class="grid grid-cols-1 lg:grid-cols-12 gap-4 mb-4">
|
<div class="grid grid-cols-1 lg:grid-cols-12 gap-4 mb-4">
|
||||||
<!-- Stat Cards -->
|
<!-- Stat Cards -->
|
||||||
<!-- 总数量 (较小) -->
|
<!-- 总数量 (较小) -->
|
||||||
<div
|
<div class="lg:col-span-2 bg-white p-4 rounded-xl shadow-sm border border-slate-100">
|
||||||
class="lg:col-span-2 bg-white dark:bg-slate-900 p-4 rounded-xl shadow-sm border border-slate-100 dark:border-slate-800">
|
|
||||||
<div class="flex items-center justify-between mb-1">
|
<div class="flex items-center justify-between mb-1">
|
||||||
<span class="text-xs font-medium text-slate-500">{{ $t('workbenches.totalnumber') }}</span>
|
<span class="text-xs font-medium text-slate-500">{{ $t('workbenches.totalnumber') }}</span>
|
||||||
<span class="material-icons-round text-primary/40 text-lg">analytics</span>
|
<span class="material-icons-round text-primary/40 text-lg">analytics</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xl font-bold text-slate-900 dark:text-white">{{ hostData.totalCount }}</div>
|
<div class="text-xl font-bold text-slate-900">{{ hostData.totalCount }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 新建主播 (较小) -->
|
<!-- 新建主播 (较小) -->
|
||||||
<div
|
<div class="lg:col-span-2 bg-white p-4 rounded-xl shadow-sm border border-slate-100">
|
||||||
class="lg:col-span-2 bg-white dark:bg-slate-900 p-4 rounded-xl shadow-sm border border-slate-100 dark:border-slate-800">
|
|
||||||
<div class="flex items-center justify-between mb-1">
|
<div class="flex items-center justify-between mb-1">
|
||||||
<span class="text-xs font-medium text-slate-500">{{ $t('workbenches.createHost') }}</span>
|
<span class="text-xs font-medium text-slate-500">{{ $t('workbenches.createHost') }}</span>
|
||||||
<span class="material-icons-round text-secondary/40 text-lg">person_add</span>
|
<span class="material-icons-round text-secondary/40 text-lg">person_add</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xl font-bold text-slate-900 dark:text-white">{{ hostData.validAnchorsCount }}</div>
|
<div class="text-xl font-bold text-slate-900">{{ hostData.validAnchorsCount }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 查询 (较小) -->
|
<!-- 查询 (较小) -->
|
||||||
<div
|
<div class="lg:col-span-2 bg-white p-4 rounded-xl shadow-sm border border-slate-100">
|
||||||
class="lg:col-span-2 bg-white dark:bg-slate-900 p-4 rounded-xl shadow-sm border border-slate-100 dark:border-slate-800">
|
|
||||||
<div class="flex items-center justify-between mb-1">
|
<div class="flex items-center justify-between mb-1">
|
||||||
<span class="text-xs font-medium text-slate-500">{{ $t('workbenches.query') }}</span>
|
<span class="text-xs font-medium text-slate-500">{{ $t('workbenches.query') }}</span>
|
||||||
<span class="material-icons-round text-amber-400/60 text-lg">search</span>
|
<span class="material-icons-round text-amber-400/60 text-lg">search</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xl font-bold text-slate-900 dark:text-white">{{ hostData.checkedDataCount }}</div>
|
<div class="text-xl font-bold text-slate-900">{{ hostData.checkedDataCount }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 邀请 (较大,突出显示) -->
|
<!-- 邀请 (较大,突出显示) -->
|
||||||
@@ -48,7 +45,7 @@
|
|||||||
|
|
||||||
<!-- 运行时间 (较大) -->
|
<!-- 运行时间 (较大) -->
|
||||||
<div
|
<div
|
||||||
class="lg:col-span-3 bg-white dark:bg-slate-900 p-5 rounded-xl shadow-sm border border-slate-100 dark:border-slate-800 flex flex-col justify-center">
|
class="lg:col-span-3 bg-white p-5 rounded-xl shadow-sm border border-slate-100 flex flex-col justify-center">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<span class="text-xs font-semibold text-slate-400 uppercase tracking-wider block mb-1">{{
|
<span class="text-xs font-semibold text-slate-400 uppercase tracking-wider block mb-1">{{
|
||||||
@@ -68,13 +65,12 @@
|
|||||||
|
|
||||||
<!-- Guild Accounts -->
|
<!-- Guild Accounts -->
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
||||||
<div v-for="(item, index) in 2" :key="index"
|
<div v-for="(item, index) in 2" :key="index" class="bg-white border border-slate-100 p-5 rounded-xl shadow-sm">
|
||||||
class="bg-white border border-slate-100 p-5 rounded-xl shadow-sm">
|
|
||||||
<div class="flex justify-between items-center mb-6">
|
<div class="flex justify-between items-center mb-6">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span class="w-4 h-4 rounded-full"
|
<span class="w-4 h-4 rounded-full"
|
||||||
:class="tkData[index].code == 1 ? 'bg-emerald-500' : 'bg-red-500'"></span>
|
:class="tkData[index].code == 1 ? 'bg-emerald-500' : 'bg-red-500'"></span>
|
||||||
<h3 class="font-bold text-slate-800 dark:text-white">{{ $t('workbenches.guildAccount') }} {{ index === 0
|
<h3 class="font-bold text-slate-800">{{ $t('workbenches.guildAccount') }} {{ index === 0
|
||||||
? 'A'
|
? 'A'
|
||||||
: 'B' }}</h3>
|
: 'B' }}</h3>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,7 +81,7 @@
|
|||||||
<div class="grid grid-cols-2 gap-4">
|
<div class="grid grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="text-xs font-semibold text-slate-500 mb-1 block">{{ $t('workbenches.guildAccount')
|
<label class="text-xs font-semibold text-slate-500 mb-1 block">{{ $t('workbenches.guildAccount')
|
||||||
}}</label>
|
}}</label>
|
||||||
<el-input v-model="tkData[index].account" :placeholder="$t('workbenches.guildAccountPlace')"
|
<el-input v-model="tkData[index].account" :placeholder="$t('workbenches.guildAccountPlace')"
|
||||||
:disabled="!(tkData[index].code == 0 && !isLogin[index])" class="el-input-custom" />
|
:disabled="!(tkData[index].code == 0 && !isLogin[index])" class="el-input-custom" />
|
||||||
</div>
|
</div>
|
||||||
@@ -97,7 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button @click="loginTK(index)" :disabled="!(tkData[index].code == 0 && !isLogin[index])"
|
<button @click="loginTK(index)" :disabled="!(tkData[index].code == 0 && !isLogin[index])"
|
||||||
class="w-full bg-slate-900 dark:bg-slate-700 hover:bg-black text-white py-2.5 rounded-lg font-medium transition-all disabled:opacity-50 disabled:cursor-not-allowed">
|
class="w-full bg-slate-900 hover:bg-black text-white py-2.5 rounded-lg font-medium transition-all disabled:opacity-50 disabled:cursor-not-allowed">
|
||||||
{{ $t('workbenches.loginBackend') }}
|
{{ $t('workbenches.loginBackend') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -105,34 +101,34 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Configuration Panel -->
|
<!-- Configuration Panel -->
|
||||||
<div
|
<div class="bg-white rounded-2xl shadow-sm border border-slate-100 overflow-hidden">
|
||||||
class="bg-white dark:bg-slate-900 rounded-2xl shadow-sm border border-slate-100 dark:border-slate-800 overflow-hidden">
|
<div class="p-6 border-b border-slate-100 flex justify-between items-center">
|
||||||
<div class="p-6 border-b border-slate-100 dark:border-slate-800 flex justify-between items-center">
|
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<div class="w-8 h-8 bg-slate-100 dark:bg-slate-800 rounded-lg flex items-center justify-center">
|
<div class="w-8 h-8 bg-slate-100 rounded-lg flex items-center justify-center">
|
||||||
<span class="material-icons-round text-slate-600 dark:text-slate-400 text-lg">settings</span>
|
<span class="material-icons-round text-slate-600 text-lg">settings</span>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="font-bold text-slate-800 dark:text-white">{{ $t('workbenchesSetup.workbenches') }}</h2>
|
<h2 class="font-bold text-slate-800">{{ $t('workbenchesSetup.workbenches') }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-4 text-sm">
|
<div class="flex items-center gap-4 text-sm">
|
||||||
<div class="flex items-center gap-2 text-slate-500">
|
<div class="flex items-center gap-2 text-slate-500">
|
||||||
<span>{{ $t('workbenchesSetup.network') }}:</span>
|
<span>{{ $t('workbenchesSetup.network') }}:</span>
|
||||||
<span class="text-blue-600 font-bold">{{ locale == 'zh' ? countryData : countryDataEN }}</span>
|
<span class="text-blue-600 font-bold">{{ locale == 'zh' ? countryData : countryDataEN }}</span>
|
||||||
<button @click="editCountry" :disabled="isRefreshingCountry"
|
<button @click="editCountry" :disabled="isRefreshingCountry"
|
||||||
class="ml-1 p-1 rounded-md hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
class="ml-1 p-1 rounded-md hover:bg-slate-100 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
:title="$t('workbenchesSetup.editCountry') || '编辑国家'">
|
:title="$t('workbenchesSetup.editCountry') || '编辑国家'">
|
||||||
<span class="material-icons-round text-slate-500 text-base">edit</span>
|
<span class="material-icons-round text-slate-500 text-base">edit</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="refreshCountryFn" :disabled="isRefreshingCountry"
|
<button @click="refreshCountryFn" :disabled="isRefreshingCountry"
|
||||||
class="p-1 rounded-md hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
class="p-1 rounded-md hover:bg-slate-100 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
:title="$t('workbenchesSetup.refreshCountry') || '刷新国家'">
|
:title="$t('workbenchesSetup.refreshCountry') || '刷新国家'">
|
||||||
<span class="material-icons-round text-slate-500 text-base" :class="{ 'animate-spin': isRefreshingCountry }">refresh</span>
|
<span class="material-icons-round text-slate-500 text-base"
|
||||||
|
:class="{ 'animate-spin': isRefreshingCountry }">refresh</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span class="text-slate-500">指定国家:</span>
|
<span class="text-slate-500">指定国家:</span>
|
||||||
<select v-model="country_info"
|
<select v-model="country_info"
|
||||||
class="bg-slate-50 dark:bg-slate-800 border-none rounded-lg text-xs font-medium focus:ring-0">
|
class="bg-slate-50 border-none rounded-lg text-xs font-medium focus:ring-0">
|
||||||
<option value="全部">全部</option>
|
<option value="全部">全部</option>
|
||||||
<option v-for="(item, index) in country_Lst" :key="index" :value="item">{{ item }}</option>
|
<option v-for="(item, index) in country_Lst" :key="index" :value="item">{{ item }}</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -143,25 +139,25 @@
|
|||||||
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6 mb-6">
|
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6 mb-6">
|
||||||
<!-- Coins -->
|
<!-- Coins -->
|
||||||
<div>
|
<div>
|
||||||
<h4 class="text-sm font-bold text-slate-800 dark:text-white mb-4 flex items-center gap-2">
|
<h4 class="text-sm font-bold text-slate-800 mb-4 flex items-center gap-2">
|
||||||
<span class="w-1 h-4 bg-blue-600 rounded-full"></span>
|
<span class="w-1 h-4 bg-blue-600 rounded-full"></span>
|
||||||
{{ $t('workbenchesSetup.setCoinsNum') }}
|
{{ $t('workbenchesSetup.setCoinsNum') }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200">
|
||||||
<span
|
<span
|
||||||
class="bg-slate-50 dark:bg-slate-800 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200 dark:border-slate-700">{{
|
class="bg-slate-50 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200">{{
|
||||||
$t('workbenchesSetup.minCoinsNum') }}</span>
|
$t('workbenchesSetup.minCoinsNum') }}</span>
|
||||||
<input
|
<input
|
||||||
class="flex-1 px-4 py-2 text-sm bg-white dark:bg-slate-900 border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
class="flex-1 px-4 py-2 text-sm bg-white border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
||||||
type="number" v-model="pyData.gold.min" :disabled="!pyData.isStart" />
|
type="number" v-model="pyData.gold.min" :disabled="!pyData.isStart" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200">
|
||||||
<span
|
<span
|
||||||
class="bg-slate-50 dark:bg-slate-800 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200 dark:border-slate-700">{{
|
class="bg-slate-50 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200">{{
|
||||||
$t('workbenchesSetup.maxCoinsNum') }}</span>
|
$t('workbenchesSetup.maxCoinsNum') }}</span>
|
||||||
<input
|
<input
|
||||||
class="flex-1 px-4 py-2 text-sm bg-white dark:bg-slate-900 border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
class="flex-1 px-4 py-2 text-sm bg-white border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
||||||
type="number" v-model="pyData.gold.max" :disabled="!pyData.isStart" />
|
type="number" v-model="pyData.gold.max" :disabled="!pyData.isStart" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -169,25 +165,25 @@
|
|||||||
|
|
||||||
<!-- Fans -->
|
<!-- Fans -->
|
||||||
<div>
|
<div>
|
||||||
<h4 class="text-sm font-bold text-slate-800 dark:text-white mb-4 flex items-center gap-2">
|
<h4 class="text-sm font-bold text-slate-800 mb-4 flex items-center gap-2">
|
||||||
<span class="w-1 h-4 bg-secondary rounded-full"></span>
|
<span class="w-1 h-4 bg-secondary rounded-full"></span>
|
||||||
{{ $t('workbenchesSetup.setFansNum') }}
|
{{ $t('workbenchesSetup.setFansNum') }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200">
|
||||||
<span
|
<span
|
||||||
class="bg-slate-50 dark:bg-slate-800 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200 dark:border-slate-700">{{
|
class="bg-slate-50 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200">{{
|
||||||
$t('workbenchesSetup.minFansNum') }}</span>
|
$t('workbenchesSetup.minFansNum') }}</span>
|
||||||
<input
|
<input
|
||||||
class="flex-1 px-4 py-2 text-sm bg-white dark:bg-slate-900 border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
class="flex-1 px-4 py-2 text-sm bg-white border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
||||||
type="number" v-model="pyData.fans.min" :disabled="!pyData.isStart" />
|
type="number" v-model="pyData.fans.min" :disabled="!pyData.isStart" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200">
|
||||||
<span
|
<span
|
||||||
class="bg-slate-50 dark:bg-slate-800 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200 dark:border-slate-700">{{
|
class="bg-slate-50 px-3 py-2 text-xs font-medium text-slate-500 w-28 flex items-center border-r border-slate-200">{{
|
||||||
$t('workbenchesSetup.maxFansNum') }}</span>
|
$t('workbenchesSetup.maxFansNum') }}</span>
|
||||||
<input
|
<input
|
||||||
class="flex-1 px-4 py-2 text-sm bg-white dark:bg-slate-900 border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
class="flex-1 px-4 py-2 text-sm bg-white border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
||||||
type="number" v-model="pyData.fans.max" :disabled="!pyData.isStart" />
|
type="number" v-model="pyData.fans.max" :disabled="!pyData.isStart" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -195,33 +191,33 @@
|
|||||||
|
|
||||||
<!-- Frequency -->
|
<!-- Frequency -->
|
||||||
<div>
|
<div>
|
||||||
<h4 class="text-sm font-bold text-slate-800 dark:text-white mb-4 flex items-center gap-2">
|
<h4 class="text-sm font-bold text-slate-800 mb-4 flex items-center gap-2">
|
||||||
<span class="w-1 h-4 bg-emerald-500 rounded-full"></span>
|
<span class="w-1 h-4 bg-emerald-500 rounded-full"></span>
|
||||||
{{ $t('workbenchesSetup.setQuery') }}
|
{{ $t('workbenchesSetup.setQuery') }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200">
|
||||||
<input
|
<input
|
||||||
class="flex-1 px-4 py-2 text-sm bg-white dark:bg-slate-900 border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
class="flex-1 px-4 py-2 text-sm bg-white border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
||||||
type="number" v-model="pyData.frequency.hour" :disabled="!pyData.isStart" />
|
type="number" v-model="pyData.frequency.hour" :disabled="!pyData.isStart" />
|
||||||
<span
|
<span
|
||||||
class="bg-slate-100 dark:bg-slate-800 px-3 py-2 text-xs font-medium text-slate-500 w-24 flex items-center justify-center border-l border-slate-200 dark:border-slate-700">{{
|
class="bg-slate-100 px-3 py-2 text-xs font-medium text-slate-500 w-24 flex items-center justify-center border-l border-slate-200">{{
|
||||||
$t('workbenchesSetup.hour') }}</span>
|
$t('workbenchesSetup.hour') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
<div class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200">
|
||||||
<input
|
<input
|
||||||
class="flex-1 px-4 py-2 text-sm bg-white dark:bg-slate-900 border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
class="flex-1 px-4 py-2 text-sm bg-white border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
||||||
type="number" v-model="pyData.frequency.day" :disabled="!pyData.isStart" />
|
type="number" v-model="pyData.frequency.day" :disabled="!pyData.isStart" />
|
||||||
<span
|
<span
|
||||||
class="bg-slate-100 dark:bg-slate-800 px-3 py-2 text-xs font-medium text-slate-500 w-24 flex items-center justify-center border-l border-slate-200 dark:border-slate-700">{{
|
class="bg-slate-100 px-3 py-2 text-xs font-medium text-slate-500 w-24 flex items-center justify-center border-l border-slate-200">{{
|
||||||
$t('workbenchesSetup.hour24') }}</span>
|
$t('workbenchesSetup.hour24') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Quantity Limit -->
|
<!-- Quantity Limit -->
|
||||||
<div>
|
<div>
|
||||||
<h4 class="text-sm font-bold text-slate-800 dark:text-white mb-4 flex items-center gap-2">
|
<h4 class="text-sm font-bold text-slate-800 mb-4 flex items-center gap-2">
|
||||||
<span class="w-1 h-4 bg-orange-400 rounded-full"></span>
|
<span class="w-1 h-4 bg-orange-400 rounded-full"></span>
|
||||||
{{ $t('workbenchesSetup.setNum') }}
|
{{ $t('workbenchesSetup.setNum') }}
|
||||||
<span class="text-[10px] text-slate-400 font-normal ml-1">({{ $t('workbenchesSetup.prompt') }})</span>
|
<span class="text-[10px] text-slate-400 font-normal ml-1">({{ $t('workbenchesSetup.prompt') }})</span>
|
||||||
@@ -242,50 +238,46 @@
|
|||||||
<div v-if="isLimit"
|
<div v-if="isLimit"
|
||||||
class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
class="flex shadow-sm rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700">
|
||||||
<input
|
<input
|
||||||
class="flex-1 px-4 py-2 text-sm bg-white dark:bg-slate-900 border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
class="flex-1 px-4 py-2 text-sm bg-white border-none outline-none focus:ring-0 disabled:bg-slate-100"
|
||||||
type="number" v-model="hostNum" :disabled="!pyData.isStart" />
|
type="number" v-model="hostNum" :disabled="!pyData.isStart" />
|
||||||
<span
|
<span
|
||||||
class="bg-slate-100 dark:bg-slate-800 px-3 py-2 text-xs font-medium text-slate-500 w-16 flex items-center justify-center border-l border-slate-200 dark:border-slate-700">{{
|
class="bg-slate-100 px-3 py-2 text-xs font-medium text-slate-500 w-16 flex items-center justify-center border-l border-slate-200">{{
|
||||||
$t('workbenchesSetup.num') }}</span>
|
$t('workbenchesSetup.num') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="flex flex-col lg:flex-row items-center justify-between gap-6 pt-4 border-t border-slate-100">
|
||||||
class="flex flex-col lg:flex-row items-center justify-between gap-6 pt-4 border-t border-slate-100 dark:border-slate-800">
|
|
||||||
<div class="flex items-center gap-6">
|
<div class="flex items-center gap-6">
|
||||||
<div class="flex items-center gap-2 cursor-pointer group" @click="toggleFilter('filterGame')">
|
<div class="flex items-center gap-2 cursor-pointer group" @click="toggleFilter('filterGame')">
|
||||||
<span class="w-4 h-4 rounded border-2 flex items-center justify-center transition-all"
|
<span class="w-4 h-4 rounded border-2 flex items-center justify-center transition-all"
|
||||||
:class="pyData.filterGame ? 'bg-blue-600 border-blue-600' : 'bg-white border-slate-300'">
|
:class="pyData.filterGame ? 'bg-blue-600 border-blue-600' : 'bg-white border-slate-300'">
|
||||||
<span v-if="pyData.filterGame" class="material-icons-round text-white text-xs">check</span>
|
<span v-if="pyData.filterGame" class="material-icons-round text-white text-xs">check</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span class="text-sm text-slate-600 group-hover:text-blue-600 transition-colors">过滤游戏主播</span>
|
||||||
class="text-sm text-slate-600 dark:text-slate-400 group-hover:text-blue-600 transition-colors">过滤游戏主播</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2 cursor-pointer group" @click="toggleFilter('filterSelling')">
|
<div class="flex items-center gap-2 cursor-pointer group" @click="toggleFilter('filterSelling')">
|
||||||
<span class="w-4 h-4 rounded border-2 flex items-center justify-center transition-all"
|
<span class="w-4 h-4 rounded border-2 flex items-center justify-center transition-all"
|
||||||
:class="pyData.filterSelling ? 'bg-blue-600 border-blue-600' : 'bg-white border-slate-300'">
|
:class="pyData.filterSelling ? 'bg-blue-600 border-blue-600' : 'bg-white border-slate-300'">
|
||||||
<span v-if="pyData.filterSelling" class="material-icons-round text-white text-xs">check</span>
|
<span v-if="pyData.filterSelling" class="material-icons-round text-white text-xs">check</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span class="text-sm text-slate-600 group-hover:text-blue-600 transition-colors">过滤带货主播</span>
|
||||||
class="text-sm text-slate-600 dark:text-slate-400 group-hover:text-blue-600 transition-colors">过滤带货主播</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2 cursor-pointer group" @click="toggleFilter('rankingList')">
|
<div class="flex items-center gap-2 cursor-pointer group" @click="toggleFilter('rankingList')">
|
||||||
<span class="w-4 h-4 rounded border-2 flex items-center justify-center transition-all"
|
<span class="w-4 h-4 rounded border-2 flex items-center justify-center transition-all"
|
||||||
:class="pyData.rankingList ? 'bg-blue-600 border-blue-600' : 'bg-white border-slate-300'">
|
:class="pyData.rankingList ? 'bg-blue-600 border-blue-600' : 'bg-white border-slate-300'">
|
||||||
<span v-if="pyData.rankingList" class="material-icons-round text-white text-xs">check</span>
|
<span v-if="pyData.rankingList" class="material-icons-round text-white text-xs">check</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span class="text-sm text-slate-600 group-hover:text-blue-600 transition-colors">过滤排行榜单</span>
|
||||||
class="text-sm text-slate-600 dark:text-slate-400 group-hover:text-blue-600 transition-colors">过滤排行榜单</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-6 text-center">
|
<div class="mt-6 text-center">
|
||||||
<button v-if="pyData.isStart" @click="submit"
|
<button v-if="pyData.isStart" @click="submit"
|
||||||
class="bg-slate-900 dark:bg-blue-600 hover:scale-[1.02] active:scale-[0.98] text-white px-10 py-3 rounded-xl font-bold text-lg shadow-xl shadow-slate-900/10 dark:shadow-blue-600/20 transition-all flex items-center gap-2 mx-auto">
|
class="bg-slate-900 hover:scale-[1.02] active:scale-[0.98] text-white px-10 py-3 rounded-xl font-bold text-lg shadow-xl shadow-slate-900/10 transition-all flex items-center gap-2 mx-auto">
|
||||||
<span class="material-icons-round">bolt</span>
|
<span class="material-icons-round">bolt</span>
|
||||||
{{ $t('workbenchesSetup.start') }}
|
{{ $t('workbenchesSetup.start') }}
|
||||||
</button>
|
</button>
|
||||||
@@ -294,7 +286,7 @@
|
|||||||
<span class="material-icons-round">stop</span>
|
<span class="material-icons-round">stop</span>
|
||||||
{{ $t('workbenchesSetup.stop') }}
|
{{ $t('workbenchesSetup.stop') }}
|
||||||
</button>
|
</button>
|
||||||
<p class="mt-4 text-xs font-medium text-emerald-600 dark:text-emerald-400">
|
<p class="mt-4 text-xs font-medium text-emerald-600">
|
||||||
到期时间: {{ timestampToTime(expiredTime) }}
|
到期时间: {{ timestampToTime(expiredTime) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -430,10 +422,10 @@ onMounted(async () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// Check if user exists before calling getExpiredTime
|
// Check if user exists before calling getExpiredTime
|
||||||
if (getUser()?.tenantId) {
|
if (getUser()?.tenantId) {
|
||||||
getExpiredTime(getUser().tenantId).then((res) => {
|
getExpiredTime(getUser().tenantId).then((res) => {
|
||||||
console.log('time:', res);
|
console.log('time:', res);
|
||||||
expiredTime.value = res.expiredTime
|
expiredTime.value = res.expiredTime
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
@@ -666,7 +658,7 @@ function getloginStatus(account) {
|
|||||||
// 兼容新旧接口返回格式
|
// 兼容新旧接口返回格式
|
||||||
// 新格式: { status, account, loginStatus, message }
|
// 新格式: { status, account, loginStatus, message }
|
||||||
// 旧格式: { code, index, message }
|
// 旧格式: { code, index, message }
|
||||||
const isSuccess = data.message === "登录成功"
|
const isSuccess = data.message === "登录成功"
|
||||||
tkData.value[index].code = isSuccess ? 1 : 0;
|
tkData.value[index].code = isSuccess ? 1 : 0;
|
||||||
|
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
|
|||||||
Reference in New Issue
Block a user