|
@@ -118,6 +118,7 @@
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { ref, onMounted, onUnmounted, onActivated, watch, markRaw, nextTick } from 'vue';
|
|
import { ref, onMounted, onUnmounted, onActivated, watch, markRaw, nextTick } from 'vue';
|
|
|
|
|
+import { useTaskQueueStore } from '@/stores/taskQueue';
|
|
|
import { User, VideoPlay, UserFilled, TrendCharts, Refresh } from '@element-plus/icons-vue';
|
|
import { User, VideoPlay, UserFilled, TrendCharts, Refresh } from '@element-plus/icons-vue';
|
|
|
import * as echarts from 'echarts';
|
|
import * as echarts from 'echarts';
|
|
|
import { accountsApi } from '@/api/accounts';
|
|
import { accountsApi } from '@/api/accounts';
|
|
@@ -131,6 +132,7 @@ import dayjs from 'dayjs';
|
|
|
|
|
|
|
|
const tabsStore = useTabsStore();
|
|
const tabsStore = useTabsStore();
|
|
|
const authStore = useAuthStore();
|
|
const authStore = useAuthStore();
|
|
|
|
|
+const taskStore = useTaskQueueStore();
|
|
|
const accounts = ref<PlatformAccount[]>([]);
|
|
const accounts = ref<PlatformAccount[]>([]);
|
|
|
const tasks = ref<PublishTask[]>([]);
|
|
const tasks = ref<PublishTask[]>([]);
|
|
|
const trendType = ref<'fansIncrease' | 'views' | 'likes' | 'comments'>('fansIncrease');
|
|
const trendType = ref<'fansIncrease' | 'views' | 'likes' | 'comments'>('fansIncrease');
|
|
@@ -456,6 +458,12 @@ onUnmounted(() => {
|
|
|
watch(trendType, () => {
|
|
watch(trendType, () => {
|
|
|
updateChart();
|
|
updateChart();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+// Bug #6070: 监听账号数据变更事件,新增/修改账号后自动刷新看板数据
|
|
|
|
|
+watch(() => taskStore.accountRefreshTrigger, () => {
|
|
|
|
|
+ console.log('[Dashboard] Account data changed, reloading...');
|
|
|
|
|
+ loadData();
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|