feat: open storage artifacts via admin preview
This commit is contained in:
@@ -264,6 +264,7 @@ export namespace SiteList {
|
|||||||
export interface DomainSeoCopyHistoryRollbackData {
|
export interface DomainSeoCopyHistoryRollbackData {
|
||||||
host?: string;
|
host?: string;
|
||||||
rollback_from_job_id?: string;
|
rollback_from_job_id?: string;
|
||||||
|
job?: DomainImportAsyncJobStatusData;
|
||||||
written_pages?: Array<{
|
written_pages?: Array<{
|
||||||
scene?: string;
|
scene?: string;
|
||||||
page_key?: string;
|
page_key?: string;
|
||||||
@@ -1518,6 +1519,7 @@ export namespace SiteList {
|
|||||||
run_id?: string;
|
run_id?: string;
|
||||||
generated_at?: string;
|
generated_at?: string;
|
||||||
status?: string;
|
status?: string;
|
||||||
|
mode?: string;
|
||||||
run_root?: string;
|
run_root?: string;
|
||||||
domain_count?: number;
|
domain_count?: number;
|
||||||
aggregate_count?: number;
|
aggregate_count?: number;
|
||||||
@@ -1897,6 +1899,7 @@ export namespace SiteList {
|
|||||||
generated_at?: string;
|
generated_at?: string;
|
||||||
mode?: string;
|
mode?: string;
|
||||||
note?: string;
|
note?: string;
|
||||||
|
hero_summary?: string;
|
||||||
real_external_metrics?: boolean;
|
real_external_metrics?: boolean;
|
||||||
host_count?: number;
|
host_count?: number;
|
||||||
ready_count?: number;
|
ready_count?: number;
|
||||||
@@ -1962,6 +1965,7 @@ export namespace SiteList {
|
|||||||
generated_at?: string;
|
generated_at?: string;
|
||||||
mode?: string;
|
mode?: string;
|
||||||
note?: string;
|
note?: string;
|
||||||
|
hero_summary?: string;
|
||||||
real_external_metrics?: boolean;
|
real_external_metrics?: boolean;
|
||||||
host_count?: number;
|
host_count?: number;
|
||||||
ready_count?: number;
|
ready_count?: number;
|
||||||
|
|||||||
54
src/utils/adminArtifact.ts
Normal file
54
src/utils/adminArtifact.ts
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import axios from "axios";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
|
|
||||||
|
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
||||||
|
|
||||||
|
const STORAGE_PREFIXES = ["external-seo/", "video-metadata-missing/"];
|
||||||
|
|
||||||
|
const buildDirectUrl = (path: string) => `${BASE_URL}/${String(path).replace(/^\/+/, "")}`;
|
||||||
|
|
||||||
|
const normalizePath = (path?: string) => String(path || "").replace(/^\/+/, "").trim();
|
||||||
|
|
||||||
|
const shouldReadByStorageProxy = (path: string) => {
|
||||||
|
return STORAGE_PREFIXES.some(prefix => path.startsWith(prefix));
|
||||||
|
};
|
||||||
|
|
||||||
|
const buildStoragePreviewUrl = (path: string) => {
|
||||||
|
const url = new URL(`${BASE_URL}/system/storage/file`);
|
||||||
|
url.searchParams.set("path", path);
|
||||||
|
return url.toString();
|
||||||
|
};
|
||||||
|
|
||||||
|
export const openAdminArtifact = async (path?: string) => {
|
||||||
|
const normalizedPath = normalizePath(path);
|
||||||
|
if (!normalizedPath) return;
|
||||||
|
|
||||||
|
if (!shouldReadByStorageProxy(normalizedPath)) {
|
||||||
|
window.open(buildDirectUrl(normalizedPath), "_blank", "noopener");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const token = String(userStore.token || "").trim();
|
||||||
|
if (!token) {
|
||||||
|
ElMessage.error("当前登录态已失效,请重新登录后再打开产物");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await axios.get(buildStoragePreviewUrl(normalizedPath), {
|
||||||
|
headers: {
|
||||||
|
"admin-token": token
|
||||||
|
},
|
||||||
|
responseType: "blob"
|
||||||
|
});
|
||||||
|
|
||||||
|
const blob = response.data instanceof Blob ? response.data : new Blob([response.data]);
|
||||||
|
const blobUrl = URL.createObjectURL(blob);
|
||||||
|
window.open(blobUrl, "_blank", "noopener");
|
||||||
|
window.setTimeout(() => URL.revokeObjectURL(blobUrl), 60_000);
|
||||||
|
} catch (_error) {
|
||||||
|
ElMessage.error("打开产物失败,请稍后重试");
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -55,15 +55,14 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoAizhanKeywordAttentionQueue } from "@/api/modules/site/list";
|
import { getDomainExternalSeoAizhanKeywordAttentionQueue } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const queue = ref<SiteList.DomainExternalSeoAizhanKeywordAttentionQueueData>({});
|
const queue = ref<SiteList.DomainExternalSeoAizhanKeywordAttentionQueueData>({});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadQueue = async () => {
|
const loadQueue = async () => {
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ import { computed, ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoAizhanKeywordProbeSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoAizhanKeywordProbeSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
import DomainExternalSeoAizhanKeywordAttentionDialog from "./domainExternalSeoAizhanKeywordAttentionDialog.vue";
|
import DomainExternalSeoAizhanKeywordAttentionDialog from "./domainExternalSeoAizhanKeywordAttentionDialog.vue";
|
||||||
import DomainExternalSeoAizhanKeywordTrendDialog from "./domainExternalSeoAizhanKeywordTrendDialog.vue";
|
import DomainExternalSeoAizhanKeywordTrendDialog from "./domainExternalSeoAizhanKeywordTrendDialog.vue";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoAizhanKeywordProbeData>({});
|
const summary = ref<SiteList.DomainExternalSeoAizhanKeywordProbeData>({});
|
||||||
@@ -80,8 +80,7 @@ const attentionDialogRef = ref();
|
|||||||
const trendDialogRef = ref();
|
const trendDialogRef = ref();
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const alertTitle = computed(() => {
|
const alertTitle = computed(() => {
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ import { computed, ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoAizhanKeywordTrendSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoAizhanKeywordTrendSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoAizhanKeywordTrendData>({});
|
const summary = ref<SiteList.DomainExternalSeoAizhanKeywordTrendData>({});
|
||||||
@@ -74,8 +74,7 @@ const alertType = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadSummary = async () => {
|
const loadSummary = async () => {
|
||||||
|
|||||||
@@ -65,15 +65,14 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoBaiduFeedbackSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoBaiduFeedbackSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoBaiduFeedbackSummaryData>({});
|
const summary = ref<SiteList.DomainExternalSeoBaiduFeedbackSummaryData>({});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadSummary = async () => {
|
const loadSummary = async () => {
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoBaiduProviderPlan } from "@/api/modules/site/list";
|
import { getDomainExternalSeoBaiduProviderPlan } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
import DomainExternalSeoBaiduPushDialog from "./domainExternalSeoBaiduPushDialog.vue";
|
import DomainExternalSeoBaiduPushDialog from "./domainExternalSeoBaiduPushDialog.vue";
|
||||||
import DomainExternalSeoBaiduFeedbackDialog from "./domainExternalSeoBaiduFeedbackDialog.vue";
|
import DomainExternalSeoBaiduFeedbackDialog from "./domainExternalSeoBaiduFeedbackDialog.vue";
|
||||||
import DomainExternalSeoSiteQueryDialog from "./domainExternalSeoSiteQueryDialog.vue";
|
import DomainExternalSeoSiteQueryDialog from "./domainExternalSeoSiteQueryDialog.vue";
|
||||||
@@ -68,7 +69,6 @@ import DomainExternalSeoBaiduPushTaskDialog from "./domainExternalSeoBaiduPushTa
|
|||||||
import DomainExternalSeoBaiduPushAttentionDialog from "./domainExternalSeoBaiduPushAttentionDialog.vue";
|
import DomainExternalSeoBaiduPushAttentionDialog from "./domainExternalSeoBaiduPushAttentionDialog.vue";
|
||||||
import DomainExternalSeoBaiduPushTrendDialog from "./domainExternalSeoBaiduPushTrendDialog.vue";
|
import DomainExternalSeoBaiduPushTrendDialog from "./domainExternalSeoBaiduPushTrendDialog.vue";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoBaiduProviderPlanData>({});
|
const summary = ref<SiteList.DomainExternalSeoBaiduProviderPlanData>({});
|
||||||
@@ -80,8 +80,7 @@ const attentionDialogRef = ref();
|
|||||||
const trendDialogRef = ref();
|
const trendDialogRef = ref();
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const openPushSummaryDialog = () => {
|
const openPushSummaryDialog = () => {
|
||||||
|
|||||||
@@ -68,15 +68,14 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoBaiduPushAttentionQueue } from "@/api/modules/site/list";
|
import { getDomainExternalSeoBaiduPushAttentionQueue } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const queue = ref<SiteList.DomainExternalSeoBaiduPushAttentionQueueData>({});
|
const queue = ref<SiteList.DomainExternalSeoBaiduPushAttentionQueueData>({});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadQueue = async () => {
|
const loadQueue = async () => {
|
||||||
|
|||||||
@@ -70,11 +70,11 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoBaiduPushSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoBaiduPushSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
import DomainExternalSeoBaiduPushTaskDialog from "./domainExternalSeoBaiduPushTaskDialog.vue";
|
import DomainExternalSeoBaiduPushTaskDialog from "./domainExternalSeoBaiduPushTaskDialog.vue";
|
||||||
import DomainExternalSeoBaiduPushAttentionDialog from "./domainExternalSeoBaiduPushAttentionDialog.vue";
|
import DomainExternalSeoBaiduPushAttentionDialog from "./domainExternalSeoBaiduPushAttentionDialog.vue";
|
||||||
import DomainExternalSeoBaiduPushTrendDialog from "./domainExternalSeoBaiduPushTrendDialog.vue";
|
import DomainExternalSeoBaiduPushTrendDialog from "./domainExternalSeoBaiduPushTrendDialog.vue";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoBaiduPushSummaryData>({});
|
const summary = ref<SiteList.DomainExternalSeoBaiduPushSummaryData>({});
|
||||||
@@ -83,8 +83,7 @@ const attentionDialogRef = ref();
|
|||||||
const trendDialogRef = ref();
|
const trendDialogRef = ref();
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadSummary = async () => {
|
const loadSummary = async () => {
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ import { computed, ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoBaiduPushTrendSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoBaiduPushTrendSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoBaiduPushTrendData>({});
|
const summary = ref<SiteList.DomainExternalSeoBaiduPushTrendData>({});
|
||||||
@@ -80,8 +80,7 @@ const alertType = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadSummary = async () => {
|
const loadSummary = async () => {
|
||||||
|
|||||||
@@ -43,16 +43,15 @@ import { ref } from "vue";
|
|||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoFailedQueue } from "@/api/modules/site/list";
|
import { getDomainExternalSeoFailedQueue } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const rows = ref<SiteList.DomainExternalSeoFailedQueueItem[]>([]);
|
const rows = ref<SiteList.DomainExternalSeoFailedQueueItem[]>([]);
|
||||||
const queue = ref<SiteList.DomainExternalSeoFailedQueueData>({});
|
const queue = ref<SiteList.DomainExternalSeoFailedQueueData>({});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showCommand = async (title: string, command?: string) => {
|
const showCommand = async (title: string, command?: string) => {
|
||||||
|
|||||||
@@ -39,17 +39,14 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoManualImportRuns } from "@/api/modules/site/list";
|
import { getDomainExternalSeoManualImportRuns } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const rows = ref<SiteList.DomainExternalSeoManualImportRunItem[]>([]);
|
const rows = ref<SiteList.DomainExternalSeoManualImportRunItem[]>([]);
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) {
|
void openAdminArtifact(path);
|
||||||
return;
|
|
||||||
}
|
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadRuns = async () => {
|
const loadRuns = async () => {
|
||||||
|
|||||||
@@ -370,6 +370,7 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { ElMessage, UploadRawFile } from "element-plus";
|
import { ElMessage, UploadRawFile } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
import {
|
import {
|
||||||
getDomainExternalSeoManualImportTemplate,
|
getDomainExternalSeoManualImportTemplate,
|
||||||
getDomainExternalSeoCnOverview,
|
getDomainExternalSeoCnOverview,
|
||||||
@@ -606,7 +607,7 @@ const downloadManualTemplate = async () => {
|
|||||||
ElMessage.warning("模板生成成功,但没有可打开的文件路径");
|
ElMessage.warning("模板生成成功,但没有可打开的文件路径");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.open(`${import.meta.env.VITE_API_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
await openAdminArtifact(path);
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
ElMessage.error("生成站外手工导入模板失败");
|
ElMessage.error("生成站外手工导入模板失败");
|
||||||
}
|
}
|
||||||
@@ -620,7 +621,7 @@ const downloadSearchConsolePropertyMapTemplate = async () => {
|
|||||||
ElMessage.warning("映射模板生成成功,但没有可打开的文件路径");
|
ElMessage.warning("映射模板生成成功,但没有可打开的文件路径");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.open(`${import.meta.env.VITE_API_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
await openAdminArtifact(path);
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
ElMessage.error("生成 Search Console 映射模板失败");
|
ElMessage.error("生成 Search Console 映射模板失败");
|
||||||
}
|
}
|
||||||
@@ -663,7 +664,7 @@ const uploadManualReport = async (param: any) => {
|
|||||||
ElMessage.success(`导入完成:共 ${res.data.rows_total || 0} 行,写入 ${res.data.imported_count || 0} 行`);
|
ElMessage.success(`导入完成:共 ${res.data.rows_total || 0} 行,写入 ${res.data.imported_count || 0} 行`);
|
||||||
const summaryHtmlPath = res.data.summary_html_path;
|
const summaryHtmlPath = res.data.summary_html_path;
|
||||||
if (summaryHtmlPath) {
|
if (summaryHtmlPath) {
|
||||||
window.open(`${import.meta.env.VITE_API_URL}/${String(summaryHtmlPath).replace(/^\/+/, "")}`, "_blank", "noopener");
|
await openAdminArtifact(summaryHtmlPath);
|
||||||
}
|
}
|
||||||
await loadSummary();
|
await loadSummary();
|
||||||
openRealSummaryDialog();
|
openRealSummaryDialog();
|
||||||
@@ -697,7 +698,7 @@ const uploadSearchConsolePropertyMap = async (param: any) => {
|
|||||||
ElMessage.success(`Search Console 映射上传完成:${res.data.mapped_hosts_count || 0} 个 host`);
|
ElMessage.success(`Search Console 映射上传完成:${res.data.mapped_hosts_count || 0} 个 host`);
|
||||||
const summaryHtmlPath = res.data.summary_html_path;
|
const summaryHtmlPath = res.data.summary_html_path;
|
||||||
if (summaryHtmlPath) {
|
if (summaryHtmlPath) {
|
||||||
window.open(`${import.meta.env.VITE_API_URL}/${String(summaryHtmlPath).replace(/^\/+/, "")}`, "_blank", "noopener");
|
await openAdminArtifact(summaryHtmlPath);
|
||||||
}
|
}
|
||||||
await loadSummary();
|
await loadSummary();
|
||||||
openRealSummaryDialog();
|
openRealSummaryDialog();
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import { computed, ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoRealSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoRealSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -90,8 +91,7 @@ const loadSummary = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const openSummaryFile = (path?: string) => {
|
const openSummaryFile = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${import.meta.env.VITE_API_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const statusLabel = (status?: string) => {
|
const statusLabel = (status?: string) => {
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ import { computed, ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoRealSummary, getDomainExternalSeoSnapshotRuns, getDomainExternalSeoSummary, getDomainExternalSeoTrendSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoRealSummary, getDomainExternalSeoSnapshotRuns, getDomainExternalSeoSummary, getDomainExternalSeoTrendSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
import DomainExternalSeoSnapshotRunDialog from "./domainExternalSeoSnapshotRunDialog.vue";
|
import DomainExternalSeoSnapshotRunDialog from "./domainExternalSeoSnapshotRunDialog.vue";
|
||||||
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
@@ -215,8 +216,7 @@ const formatDateTime = (value?: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const openSummaryFile = (path?: string) => {
|
const openSummaryFile = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${import.meta.env.VITE_API_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const openSnapshotRunsDialog = () => {
|
const openSnapshotRunsDialog = () => {
|
||||||
|
|||||||
@@ -71,15 +71,14 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoSearchConsoleFetchSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoSearchConsoleFetchSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoSearchConsoleFetchData>({});
|
const summary = ref<SiteList.DomainExternalSeoSearchConsoleFetchData>({});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadSummary = async () => {
|
const loadSummary = async () => {
|
||||||
|
|||||||
@@ -66,17 +66,16 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoSearchConsoleProviderPlan } from "@/api/modules/site/list";
|
import { getDomainExternalSeoSearchConsoleProviderPlan } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
import DomainExternalSeoSearchConsoleFetchDialog from "./domainExternalSeoSearchConsoleFetchDialog.vue";
|
import DomainExternalSeoSearchConsoleFetchDialog from "./domainExternalSeoSearchConsoleFetchDialog.vue";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoSearchConsoleProviderPlanData>({});
|
const summary = ref<SiteList.DomainExternalSeoSearchConsoleProviderPlanData>({});
|
||||||
const fetchDialogRef = ref();
|
const fetchDialogRef = ref();
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const openFetchDialog = () => {
|
const openFetchDialog = () => {
|
||||||
|
|||||||
@@ -62,15 +62,14 @@ import { computed, ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoSiteQueryProbeSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoSiteQueryProbeSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoSiteQueryProbeData>({});
|
const summary = ref<SiteList.DomainExternalSeoSiteQueryProbeData>({});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const alertTitle = computed(() => {
|
const alertTitle = computed(() => {
|
||||||
|
|||||||
@@ -130,16 +130,15 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoSnapshotRuns } from "@/api/modules/site/list";
|
import { getDomainExternalSeoSnapshotRuns } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const rows = ref<SiteList.DomainExternalSeoSnapshotRunItem[]>([]);
|
const rows = ref<SiteList.DomainExternalSeoSnapshotRunItem[]>([]);
|
||||||
const summary = ref<SiteList.DomainExternalSeoSnapshotRunData | null>(null);
|
const summary = ref<SiteList.DomainExternalSeoSnapshotRunData | null>(null);
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadRuns = async () => {
|
const loadRuns = async () => {
|
||||||
|
|||||||
@@ -137,16 +137,15 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoSnapshotValidateRuns } from "@/api/modules/site/list";
|
import { getDomainExternalSeoSnapshotValidateRuns } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const rows = ref<SiteList.DomainExternalSeoSnapshotValidateRunItem[]>([]);
|
const rows = ref<SiteList.DomainExternalSeoSnapshotValidateRunItem[]>([]);
|
||||||
const summary = ref<SiteList.DomainExternalSeoSnapshotValidateRunData | null>(null);
|
const summary = ref<SiteList.DomainExternalSeoSnapshotValidateRunData | null>(null);
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadRuns = async () => {
|
const loadRuns = async () => {
|
||||||
|
|||||||
@@ -81,13 +81,13 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
import DomainExternalSeoFailedQueueDialog from "./domainExternalSeoFailedQueueDialog.vue";
|
import DomainExternalSeoFailedQueueDialog from "./domainExternalSeoFailedQueueDialog.vue";
|
||||||
import DomainExternalSeoTrendDialog from "./domainExternalSeoTrendDialog.vue";
|
import DomainExternalSeoTrendDialog from "./domainExternalSeoTrendDialog.vue";
|
||||||
import DomainExternalSeoRealSummaryDialog from "./domainExternalSeoRealSummaryDialog.vue";
|
import DomainExternalSeoRealSummaryDialog from "./domainExternalSeoRealSummaryDialog.vue";
|
||||||
import DomainExternalSeoProviderDialog from "./domainExternalSeoProviderDialog.vue";
|
import DomainExternalSeoProviderDialog from "./domainExternalSeoProviderDialog.vue";
|
||||||
import DomainExternalSeoSearchConsolePlanDialog from "./domainExternalSeoSearchConsolePlanDialog.vue";
|
import DomainExternalSeoSearchConsolePlanDialog from "./domainExternalSeoSearchConsolePlanDialog.vue";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const rows = ref<SiteList.DomainExternalSeoHostItem[]>([]);
|
const rows = ref<SiteList.DomainExternalSeoHostItem[]>([]);
|
||||||
@@ -99,10 +99,7 @@ const providerDialogRef = ref();
|
|||||||
const searchConsolePlanDialogRef = ref();
|
const searchConsolePlanDialogRef = ref();
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) {
|
void openAdminArtifact(path);
|
||||||
return;
|
|
||||||
}
|
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const trendLabel = () => {
|
const trendLabel = () => {
|
||||||
|
|||||||
@@ -72,15 +72,14 @@ import { ref } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { SiteList } from "@/api/interface/site/list";
|
import { SiteList } from "@/api/interface/site/list";
|
||||||
import { getDomainExternalSeoTrendSummary } from "@/api/modules/site/list";
|
import { getDomainExternalSeoTrendSummary } from "@/api/modules/site/list";
|
||||||
|
import { openAdminArtifact } from "@/utils/adminArtifact";
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_API_URL as string;
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const summary = ref<SiteList.DomainExternalSeoTrendData>({});
|
const summary = ref<SiteList.DomainExternalSeoTrendData>({});
|
||||||
|
|
||||||
const openPublicPath = (path?: string) => {
|
const openPublicPath = (path?: string) => {
|
||||||
if (!path) return;
|
void openAdminArtifact(path);
|
||||||
window.open(`${BASE_URL}/${String(path).replace(/^\/+/, "")}`, "_blank", "noopener");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const trendLabel = () => {
|
const trendLabel = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user