@@ -36,8 +36,11 @@
{{ item.description }}
-
- PDF Download
+
+ {{ t("financialinformation.quarterlyreports.pdfDownload") }}
-
Goto
+
{{
+ t("financialinformation.quarterlyreports.pagination.goto")
+ }}
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
-import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
-import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
-
+// import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
+// import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
+import axios from "axios";
const { t } = useI18n();
const searchQuery = ref("");
@@ -152,45 +170,77 @@ const state = reactive({
pageSize: 10,
total: 0,
gotoPage: 1,
+ listConfig: {
+ url: "http://114.218.158.24:9020/api/fiee/reports/quarterly/display",
+ // url: "https://erpapi.fiee.com/api/fiee/reports/quarterly/display",
+ params: {
+ filtrate: {
+ fileName: "", //文件名称
+ },
+ },
+ },
list: [
- {
- title: "2025 Q2 Quarterly Report",
- description: "Second Quarter 2025 Financial Results",
- url: quarterlyPdf2025Q2,
- },
- {
- title: "2025 Q1 Quarterly Report Amendment No.1",
- description: "First Quarter 2025 Financial Results",
- url: quarterlyPdf2025Q3N,
- },
+ // {
+ // title: "2025 Q2 Quarterly Report",
+ // description: "Second Quarter 2025 Financial Results",
+ // url: quarterlyPdf2025Q2,
+ // },
+ // {
+ // title: "2025 Q1 Quarterly Report Amendment No.1",
+ // description: "First Quarter 2025 Financial Results",
+ // url: quarterlyPdf2025Q3N,
+ // },
],
});
-
+watch(searchQuery, (newVal) => {
+ if (newVal === "" || newVal === null) {
+ state.listConfig.params.filtrate.fileName = newVal;
+ state.currentPage = 1;
+ getListData();
+ }
+});
const showPageSizeMenu = ref(false);
onMounted(() => {
document.addEventListener("click", handleClickOutside);
+ getListData();
});
onUnmounted(() => {
document.removeEventListener("click", handleClickOutside);
});
-const filteredList = computed(() => {
- if (!searchQuery.value) return state.list;
- const query = searchQuery.value.toLowerCase();
- return state.list.filter(
- (item) =>
- item.title.toLowerCase().includes(query) ||
- item.description.toLowerCase().includes(query)
- );
-});
+const getListData = async () => {
+ console.log(state.listConfig);
+ const res = await axios.post(state.listConfig.url, state.listConfig.params);
+ console.log(res);
+ if (res.data.code === 0) {
+ let resData = res.data.data.Item || [];
+ resData.forEach((item) => {
+ item.title = item.fileName;
+ item.description = item.fileIntroduce;
+ item.url = item.attachment;
+ item.attachmentName = item.attachmentName;
+ });
+ state.list = resData;
+ state.total = res.data.data.total || 0;
+ }
+};
+// const filteredList = computed(() => {
+// if (!searchQuery.value) return state.list;
+// const query = searchQuery.value.toLowerCase();
+// return state.list.filter(
+// (item) =>
+// item.title.toLowerCase().includes(query) ||
+// item.description.toLowerCase().includes(query)
+// );
+// });
// 分页后的列表
-const pagedList = computed(() => {
- const start = (state.currentPage - 1) * state.pageSize;
- const end = start + state.pageSize;
- return filteredList.value.slice(start, end);
-});
+// const pagedList = computed(() => {
+// const start = (state.currentPage - 1) * state.pageSize;
+// const end = start + state.pageSize;
+// return filteredList.value.slice(start, end);
+// });
// 总页数
const totalPages = computed(() => {
@@ -207,13 +257,19 @@ const displayRange = computed(() => {
const handleSearch = () => {
// 搜索处理逻辑
- // console.log("搜索:", searchQuery.value);
+ state.listConfig.params.filtrate.fileName = searchQuery.value;
+ state.currentPage = 1;
+ getListData();
};
const downloadPdf = async (pdfResource, filename = "") => {
try {
+ const isDev = import.meta.env.DEV;
+ const requestUrl = isDev
+ ? "/pdf-proxy/" + pdfResource.split("//")[1].split("/").slice(1).join("/")
+ : pdfResource;
// 获取PDF文件
- const response = await fetch(pdfResource);
+ const response = await fetch(requestUrl);
const blob = await response.blob();
// 创建Blob URL
@@ -232,7 +288,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
// 释放Blob URL
URL.revokeObjectURL(blobUrl);
} catch (error) {
- // console.error("下载PDF文件失败:", error);
+ console.error("下载PDF文件失败:", error);
}
};
@@ -322,14 +378,14 @@ watch(
}
);
-watch(
- () => filteredList.value,
- (newList) => {
- state.total = newList.length;
- state.currentPage = 1;
- },
- { immediate: true }
-);
+// watch(
+// () => filteredList.value,
+// (newList) => {
+// state.total = newList.length;
+// state.currentPage = 1;
+// },
+// { immediate: true }
+// );
// 点击外部关闭页面大小选择菜单
const handleClickOutside = (event) => {
diff --git a/src/views/financialinformation/quarterlyreports/size1920/index.vue b/src/views/financialinformation/quarterlyreports/size1920/index.vue
index 7628d7a..08e5dbb 100644
--- a/src/views/financialinformation/quarterlyreports/size1920/index.vue
+++ b/src/views/financialinformation/quarterlyreports/size1920/index.vue
@@ -26,7 +26,7 @@
-
+
@@ -36,8 +36,11 @@
{{ item.description }}
-
- PDF Download
+
+ {{ t("financialinformation.quarterlyreports.pdfDownload") }}
@@ -49,8 +52,13 @@
-
Goto
+
{{
+ t("financialinformation.quarterlyreports.pagination.goto")
+ }}
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
-import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
-import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
-
+// import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
+// import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
+import axios from "axios";
const { t } = useI18n();
const searchQuery = ref("");
@@ -152,45 +170,77 @@ const state = reactive({
pageSize: 10,
total: 0,
gotoPage: 1,
+ listConfig: {
+ url: "http://114.218.158.24:9020/api/fiee/reports/quarterly/display",
+ // url: "https://erpapi.fiee.com/api/fiee/reports/quarterly/display",
+ params: {
+ filtrate: {
+ fileName: "", //文件名称
+ },
+ },
+ },
list: [
- {
- title: "2025 Q2 Quarterly Report",
- description: "Second Quarter 2025 Financial Results",
- url: quarterlyPdf2025Q2,
- },
- {
- title: "2025 Q1 Quarterly Report Amendment No.1",
- description: "First Quarter 2025 Financial Results",
- url: quarterlyPdf2025Q3N,
- },
+ // {
+ // title: "2025 Q2 Quarterly Report",
+ // description: "Second Quarter 2025 Financial Results",
+ // url: quarterlyPdf2025Q2,
+ // },
+ // {
+ // title: "2025 Q1 Quarterly Report Amendment No.1",
+ // description: "First Quarter 2025 Financial Results",
+ // url: quarterlyPdf2025Q3N,
+ // },
],
});
-
+watch(searchQuery, (newVal) => {
+ if (newVal === "" || newVal === null) {
+ state.listConfig.params.filtrate.fileName = newVal;
+ state.currentPage = 1;
+ getListData();
+ }
+});
const showPageSizeMenu = ref(false);
onMounted(() => {
document.addEventListener("click", handleClickOutside);
+ getListData();
});
onUnmounted(() => {
document.removeEventListener("click", handleClickOutside);
});
-const filteredList = computed(() => {
- if (!searchQuery.value) return state.list;
- const query = searchQuery.value.toLowerCase();
- return state.list.filter(
- (item) =>
- item.title.toLowerCase().includes(query) ||
- item.description.toLowerCase().includes(query)
- );
-});
+const getListData = async () => {
+ console.log(state.listConfig);
+ const res = await axios.post(state.listConfig.url, state.listConfig.params);
+ console.log(res);
+ if (res.data.code === 0) {
+ let resData = res.data.data.Item || [];
+ resData.forEach((item) => {
+ item.title = item.fileName;
+ item.description = item.fileIntroduce;
+ item.url = item.attachment;
+ item.attachmentName = item.attachmentName;
+ });
+ state.list = resData;
+ state.total = res.data.data.total || 0;
+ }
+};
+// const filteredList = computed(() => {
+// if (!searchQuery.value) return state.list;
+// const query = searchQuery.value.toLowerCase();
+// return state.list.filter(
+// (item) =>
+// item.title.toLowerCase().includes(query) ||
+// item.description.toLowerCase().includes(query)
+// );
+// });
// 分页后的列表
-const pagedList = computed(() => {
- const start = (state.currentPage - 1) * state.pageSize;
- const end = start + state.pageSize;
- return filteredList.value.slice(start, end);
-});
+// const pagedList = computed(() => {
+// const start = (state.currentPage - 1) * state.pageSize;
+// const end = start + state.pageSize;
+// return filteredList.value.slice(start, end);
+// });
// 总页数
const totalPages = computed(() => {
@@ -207,13 +257,19 @@ const displayRange = computed(() => {
const handleSearch = () => {
// 搜索处理逻辑
- // console.log("搜索:", searchQuery.value);
+ state.listConfig.params.filtrate.fileName = searchQuery.value;
+ state.currentPage = 1;
+ getListData();
};
const downloadPdf = async (pdfResource, filename = "") => {
try {
+ const isDev = import.meta.env.DEV;
+ const requestUrl = isDev
+ ? "/pdf-proxy/" + pdfResource.split("//")[1].split("/").slice(1).join("/")
+ : pdfResource;
// 获取PDF文件
- const response = await fetch(pdfResource);
+ const response = await fetch(requestUrl);
const blob = await response.blob();
// 创建Blob URL
@@ -232,7 +288,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
// 释放Blob URL
URL.revokeObjectURL(blobUrl);
} catch (error) {
- // console.error("下载PDF文件失败:", error);
+ console.error("下载PDF文件失败:", error);
}
};
@@ -322,14 +378,14 @@ watch(
}
);
-watch(
- () => filteredList.value,
- (newList) => {
- state.total = newList.length;
- state.currentPage = 1;
- },
- { immediate: true }
-);
+// watch(
+// () => filteredList.value,
+// (newList) => {
+// state.total = newList.length;
+// state.currentPage = 1;
+// },
+// { immediate: true }
+// );
// 点击外部关闭页面大小选择菜单
const handleClickOutside = (event) => {
diff --git a/src/views/financialinformation/quarterlyreports/size375/index.vue b/src/views/financialinformation/quarterlyreports/size375/index.vue
index 59f5532..76015c6 100644
--- a/src/views/financialinformation/quarterlyreports/size375/index.vue
+++ b/src/views/financialinformation/quarterlyreports/size375/index.vue
@@ -27,7 +27,7 @@
-
+
@@ -35,8 +35,11 @@
{{ item.title }}
{{ item.description }}
-
- PDF Download
+
+ {{ t("financialinformation.quarterlyreports.pdfDownload") }}
@@ -94,7 +97,11 @@
-
{{ state.pageSize }}/page
+
{{
+ t("financialinformation.quarterlyreports.pagination.perPage", {
+ size: state.pageSize,
+ })
+ }}
@@ -10,21 +12,21 @@ getStockQuate();
-
Stock Quote
+
{{ t("stock_quote.title") }}
${{ stockQuote.price }}
-
NASDAQ: FIEE
+
{{ t("stock_quote.nasdaq") }}
{{ formatted }}
- Open
+ {{ t("stock_quote.open") }}
{{ stockQuote.open }}
- % Change
+ {{ t("stock_quote.change") }}
- Day's Range
+ {{ t("stock_quote.days_range") }}
{{ stockQuote.daysRange }}
- 52-Week Range
+ {{ t("stock_quote.week_range") }}
{{ stockQuote.week52Range }}
- Volume
+ {{ t("stock_quote.volume") }}
{{ stockQuote.volume }}
- Market Cap
+ {{ t("stock_quote.market_cap") }}
{{ stockQuote.marketCap }}
diff --git a/src/views/stock-quote/size1920/index.vue b/src/views/stock-quote/size1920/index.vue
index 5f3a69a..d07cf5b 100644
--- a/src/views/stock-quote/size1920/index.vue
+++ b/src/views/stock-quote/size1920/index.vue
@@ -1,5 +1,7 @@
@@ -11,33 +13,35 @@ getStockQuate();
-
Stock Quote
+
{{ t("stock_quote.title") }}
${{ stockQuote.price }}
-
NASDAQ: FIEE
+
{{ t("stock_quote.nasdaq") }}
{{ formatted }}
- Open
+ {{ t("stock_quote.open") }}
{{ stockQuote.open }}
- Day's Range
+ {{
+ t("stock_quote.days_range")
+ }}
{{ stockQuote.daysRange }}
- Volume
+ {{ t("stock_quote.volume") }}
{{ stockQuote.volume }}
- % Change
+ {{ t("stock_quote.change") }}
- 52-Week Range
+ {{
+ t("stock_quote.week_range")
+ }}
{{ stockQuote.week52Range }}
- Market Cap
+ {{
+ t("stock_quote.market_cap")
+ }}
{{ stockQuote.marketCap }}
diff --git a/vite.config.js b/vite.config.js
index d335207..6913cec 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -20,6 +20,11 @@ export default defineConfig({
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api')
},
+ '/pdf-proxy': {
+ target: 'https://cdn-test.szjixun.cn',
+ changeOrigin: true,
+ rewrite: (path) => path.replace(/^\/pdf-proxy/, '')
+ },
}
},
plugins: [