Compare commits
No commits in common. "faac577341fb9cdb0349b487ae7f4d73f7b2b90b" and "bbc63346a16d42c59b093fca3927458e372b38a5" have entirely different histories.
faac577341
...
bbc63346a1
@ -2,7 +2,6 @@
|
||||
import { ref } from "vue";
|
||||
|
||||
import axios from "axios";
|
||||
import { message } from "@/utils/message.js";
|
||||
const form = ref({
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
@ -14,16 +13,6 @@ const submitted = ref(false);
|
||||
|
||||
async function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
Object.values(form.value).some((value) => value === "" || value === null)
|
||||
) {
|
||||
message.warning("请填写完整信息");
|
||||
return;
|
||||
}
|
||||
if (Object.values(form.value).some((value) => value.length > 50)) {
|
||||
message.warning("字段长度不能超过50个字符");
|
||||
return;
|
||||
}
|
||||
const res = await axios.post(
|
||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||
form.value
|
||||
@ -64,36 +53,26 @@ async function handleSubmit(e) {
|
||||
<label for="firstName">* First Name</label>
|
||||
<input
|
||||
id="firstName"
|
||||
v-model.trim="form.firstName"
|
||||
v-model="form.firstName"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastName">* Last Name</label>
|
||||
<input
|
||||
id="lastName"
|
||||
v-model.trim="form.lastName"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="lastName" v-model="form.lastName" type="text" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">* Email</label>
|
||||
<input id="email" v-model.trim="form.email" type="email" required />
|
||||
<input id="email" v-model="form.email" type="email" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="company">* Company</label>
|
||||
<input
|
||||
id="company"
|
||||
v-model.trim="form.company"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="company" v-model="form.company" type="text" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phone">* Phone</label>
|
||||
<input id="phone" v-model.trim="form.phone" type="tel" required />
|
||||
<input id="phone" v-model="form.phone" type="tel" required />
|
||||
</div>
|
||||
<button type="submit" class="submit-btn">Submit</button>
|
||||
</form>
|
||||
|
@ -2,7 +2,6 @@
|
||||
import { ref } from "vue";
|
||||
|
||||
import axios from "axios";
|
||||
import { message } from "@/utils/message.js";
|
||||
const form = ref({
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
@ -14,16 +13,6 @@ const submitted = ref(false);
|
||||
|
||||
async function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
Object.values(form.value).some((value) => value === "" || value === null)
|
||||
) {
|
||||
message.warning("请填写完整信息");
|
||||
return;
|
||||
}
|
||||
if (Object.values(form.value).some((value) => value.length > 50)) {
|
||||
message.warning("字段长度不能超过50个字符");
|
||||
return;
|
||||
}
|
||||
const res = await axios.post(
|
||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||
form.value
|
||||
@ -64,36 +53,26 @@ async function handleSubmit(e) {
|
||||
<label for="firstName">* First Name</label>
|
||||
<input
|
||||
id="firstName"
|
||||
v-model.trim="form.firstName"
|
||||
v-model="form.firstName"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastName">* Last Name</label>
|
||||
<input
|
||||
id="lastName"
|
||||
v-model.trim="form.lastName"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="lastName" v-model="form.lastName" type="text" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">* Email</label>
|
||||
<input id="email" v-model.trim="form.email" type="email" required />
|
||||
<input id="email" v-model="form.email" type="email" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="company">* Company</label>
|
||||
<input
|
||||
id="company"
|
||||
v-model.trim="form.company"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="company" v-model="form.company" type="text" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phone">* Phone</label>
|
||||
<input id="phone" v-model.trim="form.phone" type="tel" />
|
||||
<input id="phone" v-model="form.phone" type="tel" />
|
||||
</div>
|
||||
<button type="submit" class="submit-btn">Submit</button>
|
||||
</form>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import axios from "axios";
|
||||
import { message } from "@/utils/message.js";
|
||||
const form = ref({
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
@ -13,17 +12,6 @@ const form = ref({
|
||||
const submitted = ref(false);
|
||||
|
||||
async function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
Object.values(form.value).some((value) => value === "" || value === null)
|
||||
) {
|
||||
message.warning("请填写完整信息");
|
||||
return;
|
||||
}
|
||||
if (Object.values(form.value).some((value) => value.length > 50)) {
|
||||
message.warning("字段长度不能超过50个字符");
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
const res = await axios.post(
|
||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||
@ -50,23 +38,23 @@ async function handleSubmit(e) {
|
||||
<form class="form" @submit="handleSubmit">
|
||||
<div class="form-field">
|
||||
<label>* First Name</label>
|
||||
<input v-model.trim="form.firstName" type="text" />
|
||||
<input v-model="form.firstName" type="text" />
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label>* Last Name</label>
|
||||
<input v-model.trim="form.lastName" type="text" />
|
||||
<input v-model="form.lastName" type="text" />
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label>* Email</label>
|
||||
<input v-model.trim="form.email" type="email" />
|
||||
<input v-model="form.email" type="email" />
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label>* Company</label>
|
||||
<input v-model.trim="form.company" type="text" />
|
||||
<input v-model="form.company" type="text" />
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label>* Phone</label>
|
||||
<input v-model.trim="form.phone" type="tel" />
|
||||
<input v-model="form.phone" type="tel" />
|
||||
</div>
|
||||
<button type="submit" class="submit">Submit</button>
|
||||
</form>
|
||||
|
@ -2,7 +2,6 @@
|
||||
import { ref } from "vue";
|
||||
|
||||
import axios from "axios";
|
||||
import { message } from "@/utils/message.js";
|
||||
const form = ref({
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
@ -14,16 +13,6 @@ const submitted = ref(true);
|
||||
|
||||
async function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
if (
|
||||
Object.values(form.value).some((value) => value === "" || value === null)
|
||||
) {
|
||||
message.warning("请填写完整信息");
|
||||
return;
|
||||
}
|
||||
if (Object.values(form.value).some((value) => value.length > 50)) {
|
||||
message.warning("字段长度不能超过50个字符");
|
||||
return;
|
||||
}
|
||||
const res = await axios.post(
|
||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||
form.value
|
||||
@ -64,36 +53,26 @@ async function handleSubmit(e) {
|
||||
<label for="firstName">* First Name</label>
|
||||
<input
|
||||
id="firstName"
|
||||
v-model.trim="form.firstName"
|
||||
v-model="form.firstName"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastName">* Last Name</label>
|
||||
<input
|
||||
id="lastName"
|
||||
v-model.trim="form.lastName"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="lastName" v-model="form.lastName" type="text" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">* Email</label>
|
||||
<input id="email" v-model.trim="form.email" type="email" required />
|
||||
<input id="email" v-model="form.email" type="email" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="company">* Company</label>
|
||||
<input
|
||||
id="company"
|
||||
v-model.trim="form.company"
|
||||
type="text"
|
||||
required
|
||||
/>
|
||||
<input id="company" v-model="form.company" type="text" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phone">* Phone</label>
|
||||
<input id="phone" v-model.trim="form.phone" type="tel" />
|
||||
<input id="phone" v-model="form.phone" type="tel" />
|
||||
</div>
|
||||
<button type="submit" class="submit-btn">Submit</button>
|
||||
</form>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<!-- 报告列表 -->
|
||||
<div class="reports-table">
|
||||
<div class="reports-list">
|
||||
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
||||
<div class="content">
|
||||
<div class="file-content">
|
||||
<div class="file-info">
|
||||
@ -36,10 +36,7 @@
|
||||
<p class="file-description">{{ item.description }}</p>
|
||||
</div>
|
||||
<div class="download-section">
|
||||
<p
|
||||
class="download-text"
|
||||
@click="downloadPdf(item.url, item.attachmentName)"
|
||||
>
|
||||
<p class="download-text" @click="downloadPdf(item.url)">
|
||||
PDF Download
|
||||
</p>
|
||||
</div>
|
||||
@ -144,9 +141,9 @@
|
||||
<script setup>
|
||||
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 axios from "axios";
|
||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||
|
||||
const { t } = useI18n();
|
||||
const searchQuery = ref("");
|
||||
|
||||
@ -155,77 +152,45 @@ 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 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 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(() => {
|
||||
@ -242,19 +207,13 @@ const displayRange = computed(() => {
|
||||
|
||||
const handleSearch = () => {
|
||||
// 搜索处理逻辑
|
||||
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||
state.currentPage = 1;
|
||||
getListData();
|
||||
// console.log("搜索:", searchQuery.value);
|
||||
};
|
||||
|
||||
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(requestUrl);
|
||||
const response = await fetch(pdfResource);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 创建Blob URL
|
||||
@ -273,7 +232,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
||||
// 释放Blob URL
|
||||
URL.revokeObjectURL(blobUrl);
|
||||
} catch (error) {
|
||||
console.error("下载PDF文件失败:", error);
|
||||
// console.error("下载PDF文件失败:", error);
|
||||
}
|
||||
};
|
||||
|
||||
@ -363,14 +322,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) => {
|
||||
|
@ -26,7 +26,7 @@
|
||||
<!-- 报告列表 -->
|
||||
<div class="reports-table">
|
||||
<div class="reports-list">
|
||||
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
||||
<div class="content">
|
||||
<div class="file-content">
|
||||
<div class="file-info">
|
||||
@ -36,10 +36,7 @@
|
||||
<p class="file-description">{{ item.description }}</p>
|
||||
</div>
|
||||
<div class="download-section">
|
||||
<p
|
||||
class="download-text"
|
||||
@click="downloadPdf(item.url, item.attachmentName)"
|
||||
>
|
||||
<p class="download-text" @click="downloadPdf(item.url)">
|
||||
PDF Download
|
||||
</p>
|
||||
</div>
|
||||
@ -144,9 +141,9 @@
|
||||
<script setup>
|
||||
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 axios from "axios";
|
||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||
|
||||
const { t } = useI18n();
|
||||
const searchQuery = ref("");
|
||||
|
||||
@ -155,77 +152,45 @@ 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 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 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(() => {
|
||||
@ -242,19 +207,13 @@ const displayRange = computed(() => {
|
||||
|
||||
const handleSearch = () => {
|
||||
// 搜索处理逻辑
|
||||
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||
state.currentPage = 1;
|
||||
getListData();
|
||||
// console.log("搜索:", searchQuery.value);
|
||||
};
|
||||
|
||||
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(requestUrl);
|
||||
const response = await fetch(pdfResource);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 创建Blob URL
|
||||
@ -273,7 +232,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
||||
// 释放Blob URL
|
||||
URL.revokeObjectURL(blobUrl);
|
||||
} catch (error) {
|
||||
console.error("下载PDF文件失败:", error);
|
||||
// console.error("下载PDF文件失败:", error);
|
||||
}
|
||||
};
|
||||
|
||||
@ -363,14 +322,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) => {
|
||||
|
@ -27,7 +27,7 @@
|
||||
<!-- 报告列表 -->
|
||||
<div class="reports-table">
|
||||
<div class="reports-list">
|
||||
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
||||
<div class="content">
|
||||
<div class="file-content">
|
||||
<div class="file-info">
|
||||
@ -35,10 +35,7 @@
|
||||
<p class="file-title">{{ item.title }}</p>
|
||||
</div>
|
||||
<p class="file-description">{{ item.description }}</p>
|
||||
<p
|
||||
class="download-text"
|
||||
@click="downloadPdf(item.url, item.attachmentName)"
|
||||
>
|
||||
<p class="download-text" @click="downloadPdf(item.url)">
|
||||
PDF Download
|
||||
</p>
|
||||
</div>
|
||||
@ -130,9 +127,9 @@
|
||||
<script setup>
|
||||
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 axios from "axios";
|
||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||
|
||||
const { t } = useI18n();
|
||||
const searchQuery = ref("");
|
||||
|
||||
@ -141,77 +138,45 @@ 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 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 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(() => {
|
||||
@ -228,19 +193,13 @@ const displayRange = computed(() => {
|
||||
|
||||
const handleSearch = () => {
|
||||
// 搜索处理逻辑
|
||||
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||
state.currentPage = 1;
|
||||
getListData();
|
||||
// console.log("搜索:", searchQuery.value);
|
||||
};
|
||||
|
||||
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(requestUrl);
|
||||
const response = await fetch(pdfResource);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 创建Blob URL
|
||||
@ -259,7 +218,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
||||
// 释放Blob URL
|
||||
URL.revokeObjectURL(blobUrl);
|
||||
} catch (error) {
|
||||
console.error("下载PDF文件失败:", error);
|
||||
// console.error("下载PDF文件失败:", error);
|
||||
}
|
||||
};
|
||||
|
||||
@ -349,14 +308,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) => {
|
||||
|
@ -26,7 +26,7 @@
|
||||
<!-- 报告列表 -->
|
||||
<div class="reports-table">
|
||||
<div class="reports-list">
|
||||
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
||||
<div class="content">
|
||||
<div class="file-content">
|
||||
<div class="file-info">
|
||||
@ -36,10 +36,7 @@
|
||||
<p class="file-description">{{ item.description }}</p>
|
||||
</div>
|
||||
<div class="download-section">
|
||||
<p
|
||||
class="download-text"
|
||||
@click="downloadPdf(item.url, item.attachmentName)"
|
||||
>
|
||||
<p class="download-text" @click="downloadPdf(item.url)">
|
||||
PDF Download
|
||||
</p>
|
||||
</div>
|
||||
@ -142,9 +139,9 @@
|
||||
<script setup>
|
||||
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 axios from "axios";
|
||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||
|
||||
const { t } = useI18n();
|
||||
const searchQuery = ref("");
|
||||
|
||||
@ -153,77 +150,45 @@ 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 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 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(() => {
|
||||
@ -240,19 +205,13 @@ const displayRange = computed(() => {
|
||||
|
||||
const handleSearch = () => {
|
||||
// 搜索处理逻辑
|
||||
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||
state.currentPage = 1;
|
||||
getListData();
|
||||
// console.log("搜索:", searchQuery.value);
|
||||
};
|
||||
|
||||
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(requestUrl);
|
||||
const response = await fetch(pdfResource);
|
||||
const blob = await response.blob();
|
||||
|
||||
// 创建Blob URL
|
||||
@ -271,7 +230,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
||||
// 释放Blob URL
|
||||
URL.revokeObjectURL(blobUrl);
|
||||
} catch (error) {
|
||||
console.error("下载PDF文件失败:", error);
|
||||
// console.error("下载PDF文件失败:", error);
|
||||
}
|
||||
};
|
||||
|
||||
@ -361,14 +320,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) => {
|
||||
|
@ -20,11 +20,6 @@ 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: [
|
||||
|
Loading…
Reference in New Issue
Block a user