Compare commits
2 Commits
bbc63346a1
...
faac577341
Author | SHA1 | Date | |
---|---|---|---|
|
faac577341 | ||
|
ee596a518f |
@ -2,6 +2,7 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import { message } from "@/utils/message.js";
|
||||||
const form = ref({
|
const form = ref({
|
||||||
firstName: "",
|
firstName: "",
|
||||||
lastName: "",
|
lastName: "",
|
||||||
@ -13,6 +14,16 @@ const submitted = ref(false);
|
|||||||
|
|
||||||
async function handleSubmit(e) {
|
async function handleSubmit(e) {
|
||||||
e.preventDefault();
|
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(
|
const res = await axios.post(
|
||||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||||
form.value
|
form.value
|
||||||
@ -53,26 +64,36 @@ async function handleSubmit(e) {
|
|||||||
<label for="firstName">* First Name</label>
|
<label for="firstName">* First Name</label>
|
||||||
<input
|
<input
|
||||||
id="firstName"
|
id="firstName"
|
||||||
v-model="form.firstName"
|
v-model.trim="form.firstName"
|
||||||
type="text"
|
type="text"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="lastName">* Last Name</label>
|
<label for="lastName">* Last Name</label>
|
||||||
<input id="lastName" v-model="form.lastName" type="text" required />
|
<input
|
||||||
|
id="lastName"
|
||||||
|
v-model.trim="form.lastName"
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">* Email</label>
|
<label for="email">* Email</label>
|
||||||
<input id="email" v-model="form.email" type="email" required />
|
<input id="email" v-model.trim="form.email" type="email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="company">* Company</label>
|
<label for="company">* Company</label>
|
||||||
<input id="company" v-model="form.company" type="text" required />
|
<input
|
||||||
|
id="company"
|
||||||
|
v-model.trim="form.company"
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="phone">* Phone</label>
|
<label for="phone">* Phone</label>
|
||||||
<input id="phone" v-model="form.phone" type="tel" required />
|
<input id="phone" v-model.trim="form.phone" type="tel" required />
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="submit-btn">Submit</button>
|
<button type="submit" class="submit-btn">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import { message } from "@/utils/message.js";
|
||||||
const form = ref({
|
const form = ref({
|
||||||
firstName: "",
|
firstName: "",
|
||||||
lastName: "",
|
lastName: "",
|
||||||
@ -13,6 +14,16 @@ const submitted = ref(false);
|
|||||||
|
|
||||||
async function handleSubmit(e) {
|
async function handleSubmit(e) {
|
||||||
e.preventDefault();
|
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(
|
const res = await axios.post(
|
||||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||||
form.value
|
form.value
|
||||||
@ -53,26 +64,36 @@ async function handleSubmit(e) {
|
|||||||
<label for="firstName">* First Name</label>
|
<label for="firstName">* First Name</label>
|
||||||
<input
|
<input
|
||||||
id="firstName"
|
id="firstName"
|
||||||
v-model="form.firstName"
|
v-model.trim="form.firstName"
|
||||||
type="text"
|
type="text"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="lastName">* Last Name</label>
|
<label for="lastName">* Last Name</label>
|
||||||
<input id="lastName" v-model="form.lastName" type="text" required />
|
<input
|
||||||
|
id="lastName"
|
||||||
|
v-model.trim="form.lastName"
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">* Email</label>
|
<label for="email">* Email</label>
|
||||||
<input id="email" v-model="form.email" type="email" required />
|
<input id="email" v-model.trim="form.email" type="email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="company">* Company</label>
|
<label for="company">* Company</label>
|
||||||
<input id="company" v-model="form.company" type="text" required />
|
<input
|
||||||
|
id="company"
|
||||||
|
v-model.trim="form.company"
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="phone">* Phone</label>
|
<label for="phone">* Phone</label>
|
||||||
<input id="phone" v-model="form.phone" type="tel" />
|
<input id="phone" v-model.trim="form.phone" type="tel" />
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="submit-btn">Submit</button>
|
<button type="submit" class="submit-btn">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import { message } from "@/utils/message.js";
|
||||||
const form = ref({
|
const form = ref({
|
||||||
firstName: "",
|
firstName: "",
|
||||||
lastName: "",
|
lastName: "",
|
||||||
@ -12,6 +13,17 @@ const form = ref({
|
|||||||
const submitted = ref(false);
|
const submitted = ref(false);
|
||||||
|
|
||||||
async function handleSubmit(e) {
|
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();
|
e.preventDefault();
|
||||||
const res = await axios.post(
|
const res = await axios.post(
|
||||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||||
@ -38,23 +50,23 @@ async function handleSubmit(e) {
|
|||||||
<form class="form" @submit="handleSubmit">
|
<form class="form" @submit="handleSubmit">
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label>* First Name</label>
|
<label>* First Name</label>
|
||||||
<input v-model="form.firstName" type="text" />
|
<input v-model.trim="form.firstName" type="text" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label>* Last Name</label>
|
<label>* Last Name</label>
|
||||||
<input v-model="form.lastName" type="text" />
|
<input v-model.trim="form.lastName" type="text" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label>* Email</label>
|
<label>* Email</label>
|
||||||
<input v-model="form.email" type="email" />
|
<input v-model.trim="form.email" type="email" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label>* Company</label>
|
<label>* Company</label>
|
||||||
<input v-model="form.company" type="text" />
|
<input v-model.trim="form.company" type="text" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label>* Phone</label>
|
<label>* Phone</label>
|
||||||
<input v-model="form.phone" type="tel" />
|
<input v-model.trim="form.phone" type="tel" />
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="submit">Submit</button>
|
<button type="submit" class="submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import { message } from "@/utils/message.js";
|
||||||
const form = ref({
|
const form = ref({
|
||||||
firstName: "",
|
firstName: "",
|
||||||
lastName: "",
|
lastName: "",
|
||||||
@ -13,6 +14,16 @@ const submitted = ref(true);
|
|||||||
|
|
||||||
async function handleSubmit(e) {
|
async function handleSubmit(e) {
|
||||||
e.preventDefault();
|
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(
|
const res = await axios.post(
|
||||||
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
"https://erpapi-out.szjixun.cn/api/stock/submit/data",
|
||||||
form.value
|
form.value
|
||||||
@ -53,26 +64,36 @@ async function handleSubmit(e) {
|
|||||||
<label for="firstName">* First Name</label>
|
<label for="firstName">* First Name</label>
|
||||||
<input
|
<input
|
||||||
id="firstName"
|
id="firstName"
|
||||||
v-model="form.firstName"
|
v-model.trim="form.firstName"
|
||||||
type="text"
|
type="text"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="lastName">* Last Name</label>
|
<label for="lastName">* Last Name</label>
|
||||||
<input id="lastName" v-model="form.lastName" type="text" required />
|
<input
|
||||||
|
id="lastName"
|
||||||
|
v-model.trim="form.lastName"
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email">* Email</label>
|
<label for="email">* Email</label>
|
||||||
<input id="email" v-model="form.email" type="email" required />
|
<input id="email" v-model.trim="form.email" type="email" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="company">* Company</label>
|
<label for="company">* Company</label>
|
||||||
<input id="company" v-model="form.company" type="text" required />
|
<input
|
||||||
|
id="company"
|
||||||
|
v-model.trim="form.company"
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="phone">* Phone</label>
|
<label for="phone">* Phone</label>
|
||||||
<input id="phone" v-model="form.phone" type="tel" />
|
<input id="phone" v-model.trim="form.phone" type="tel" />
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="submit-btn">Submit</button>
|
<button type="submit" class="submit-btn">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<!-- 报告列表 -->
|
<!-- 报告列表 -->
|
||||||
<div class="reports-table">
|
<div class="reports-table">
|
||||||
<div class="reports-list">
|
<div class="reports-list">
|
||||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="file-content">
|
<div class="file-content">
|
||||||
<div class="file-info">
|
<div class="file-info">
|
||||||
@ -36,7 +36,10 @@
|
|||||||
<p class="file-description">{{ item.description }}</p>
|
<p class="file-description">{{ item.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="download-section">
|
<div class="download-section">
|
||||||
<p class="download-text" @click="downloadPdf(item.url)">
|
<p
|
||||||
|
class="download-text"
|
||||||
|
@click="downloadPdf(item.url, item.attachmentName)"
|
||||||
|
>
|
||||||
PDF Download
|
PDF Download
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -141,9 +144,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
// import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
// import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||||
|
import axios from "axios";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const searchQuery = ref("");
|
const searchQuery = ref("");
|
||||||
|
|
||||||
@ -152,45 +155,77 @@ const state = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
gotoPage: 1,
|
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: [
|
list: [
|
||||||
{
|
// {
|
||||||
title: "2025 Q2 Quarterly Report",
|
// title: "2025 Q2 Quarterly Report",
|
||||||
description: "Second Quarter 2025 Financial Results",
|
// description: "Second Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q2,
|
// url: quarterlyPdf2025Q2,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: "2025 Q1 Quarterly Report Amendment No.1",
|
// title: "2025 Q1 Quarterly Report Amendment No.1",
|
||||||
description: "First Quarter 2025 Financial Results",
|
// description: "First Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q3N,
|
// url: quarterlyPdf2025Q3N,
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
watch(searchQuery, (newVal) => {
|
||||||
|
if (newVal === "" || newVal === null) {
|
||||||
|
state.listConfig.params.filtrate.fileName = newVal;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
|
}
|
||||||
|
});
|
||||||
const showPageSizeMenu = ref(false);
|
const showPageSizeMenu = ref(false);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener("click", handleClickOutside);
|
document.addEventListener("click", handleClickOutside);
|
||||||
|
getListData();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener("click", handleClickOutside);
|
document.removeEventListener("click", handleClickOutside);
|
||||||
});
|
});
|
||||||
const filteredList = computed(() => {
|
const getListData = async () => {
|
||||||
if (!searchQuery.value) return state.list;
|
console.log(state.listConfig);
|
||||||
const query = searchQuery.value.toLowerCase();
|
const res = await axios.post(state.listConfig.url, state.listConfig.params);
|
||||||
return state.list.filter(
|
console.log(res);
|
||||||
(item) =>
|
if (res.data.code === 0) {
|
||||||
item.title.toLowerCase().includes(query) ||
|
let resData = res.data.data.Item || [];
|
||||||
item.description.toLowerCase().includes(query)
|
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 pagedList = computed(() => {
|
||||||
const start = (state.currentPage - 1) * state.pageSize;
|
// const start = (state.currentPage - 1) * state.pageSize;
|
||||||
const end = start + state.pageSize;
|
// const end = start + state.pageSize;
|
||||||
return filteredList.value.slice(start, end);
|
// return filteredList.value.slice(start, end);
|
||||||
});
|
// });
|
||||||
|
|
||||||
// 总页数
|
// 总页数
|
||||||
const totalPages = computed(() => {
|
const totalPages = computed(() => {
|
||||||
@ -207,13 +242,19 @@ const displayRange = computed(() => {
|
|||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
// 搜索处理逻辑
|
// 搜索处理逻辑
|
||||||
// console.log("搜索:", searchQuery.value);
|
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPdf = async (pdfResource, filename = "") => {
|
const downloadPdf = async (pdfResource, filename = "") => {
|
||||||
try {
|
try {
|
||||||
|
const isDev = import.meta.env.DEV;
|
||||||
|
const requestUrl = isDev
|
||||||
|
? "/pdf-proxy/" + pdfResource.split("//")[1].split("/").slice(1).join("/")
|
||||||
|
: pdfResource;
|
||||||
// 获取PDF文件
|
// 获取PDF文件
|
||||||
const response = await fetch(pdfResource);
|
const response = await fetch(requestUrl);
|
||||||
const blob = await response.blob();
|
const blob = await response.blob();
|
||||||
|
|
||||||
// 创建Blob URL
|
// 创建Blob URL
|
||||||
@ -232,7 +273,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
|||||||
// 释放Blob URL
|
// 释放Blob URL
|
||||||
URL.revokeObjectURL(blobUrl);
|
URL.revokeObjectURL(blobUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.error("下载PDF文件失败:", error);
|
console.error("下载PDF文件失败:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -322,14 +363,14 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
// watch(
|
||||||
() => filteredList.value,
|
// () => filteredList.value,
|
||||||
(newList) => {
|
// (newList) => {
|
||||||
state.total = newList.length;
|
// state.total = newList.length;
|
||||||
state.currentPage = 1;
|
// state.currentPage = 1;
|
||||||
},
|
// },
|
||||||
{ immediate: true }
|
// { immediate: true }
|
||||||
);
|
// );
|
||||||
|
|
||||||
// 点击外部关闭页面大小选择菜单
|
// 点击外部关闭页面大小选择菜单
|
||||||
const handleClickOutside = (event) => {
|
const handleClickOutside = (event) => {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<!-- 报告列表 -->
|
<!-- 报告列表 -->
|
||||||
<div class="reports-table">
|
<div class="reports-table">
|
||||||
<div class="reports-list">
|
<div class="reports-list">
|
||||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="file-content">
|
<div class="file-content">
|
||||||
<div class="file-info">
|
<div class="file-info">
|
||||||
@ -36,7 +36,10 @@
|
|||||||
<p class="file-description">{{ item.description }}</p>
|
<p class="file-description">{{ item.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="download-section">
|
<div class="download-section">
|
||||||
<p class="download-text" @click="downloadPdf(item.url)">
|
<p
|
||||||
|
class="download-text"
|
||||||
|
@click="downloadPdf(item.url, item.attachmentName)"
|
||||||
|
>
|
||||||
PDF Download
|
PDF Download
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -141,9 +144,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
// import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
// import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||||
|
import axios from "axios";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const searchQuery = ref("");
|
const searchQuery = ref("");
|
||||||
|
|
||||||
@ -152,45 +155,77 @@ const state = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
gotoPage: 1,
|
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: [
|
list: [
|
||||||
{
|
// {
|
||||||
title: "2025 Q2 Quarterly Report",
|
// title: "2025 Q2 Quarterly Report",
|
||||||
description: "Second Quarter 2025 Financial Results",
|
// description: "Second Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q2,
|
// url: quarterlyPdf2025Q2,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: "2025 Q1 Quarterly Report Amendment No.1",
|
// title: "2025 Q1 Quarterly Report Amendment No.1",
|
||||||
description: "First Quarter 2025 Financial Results",
|
// description: "First Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q3N,
|
// url: quarterlyPdf2025Q3N,
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
watch(searchQuery, (newVal) => {
|
||||||
|
if (newVal === "" || newVal === null) {
|
||||||
|
state.listConfig.params.filtrate.fileName = newVal;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
|
}
|
||||||
|
});
|
||||||
const showPageSizeMenu = ref(false);
|
const showPageSizeMenu = ref(false);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener("click", handleClickOutside);
|
document.addEventListener("click", handleClickOutside);
|
||||||
|
getListData();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener("click", handleClickOutside);
|
document.removeEventListener("click", handleClickOutside);
|
||||||
});
|
});
|
||||||
const filteredList = computed(() => {
|
const getListData = async () => {
|
||||||
if (!searchQuery.value) return state.list;
|
console.log(state.listConfig);
|
||||||
const query = searchQuery.value.toLowerCase();
|
const res = await axios.post(state.listConfig.url, state.listConfig.params);
|
||||||
return state.list.filter(
|
console.log(res);
|
||||||
(item) =>
|
if (res.data.code === 0) {
|
||||||
item.title.toLowerCase().includes(query) ||
|
let resData = res.data.data.Item || [];
|
||||||
item.description.toLowerCase().includes(query)
|
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 pagedList = computed(() => {
|
||||||
const start = (state.currentPage - 1) * state.pageSize;
|
// const start = (state.currentPage - 1) * state.pageSize;
|
||||||
const end = start + state.pageSize;
|
// const end = start + state.pageSize;
|
||||||
return filteredList.value.slice(start, end);
|
// return filteredList.value.slice(start, end);
|
||||||
});
|
// });
|
||||||
|
|
||||||
// 总页数
|
// 总页数
|
||||||
const totalPages = computed(() => {
|
const totalPages = computed(() => {
|
||||||
@ -207,13 +242,19 @@ const displayRange = computed(() => {
|
|||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
// 搜索处理逻辑
|
// 搜索处理逻辑
|
||||||
// console.log("搜索:", searchQuery.value);
|
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPdf = async (pdfResource, filename = "") => {
|
const downloadPdf = async (pdfResource, filename = "") => {
|
||||||
try {
|
try {
|
||||||
|
const isDev = import.meta.env.DEV;
|
||||||
|
const requestUrl = isDev
|
||||||
|
? "/pdf-proxy/" + pdfResource.split("//")[1].split("/").slice(1).join("/")
|
||||||
|
: pdfResource;
|
||||||
// 获取PDF文件
|
// 获取PDF文件
|
||||||
const response = await fetch(pdfResource);
|
const response = await fetch(requestUrl);
|
||||||
const blob = await response.blob();
|
const blob = await response.blob();
|
||||||
|
|
||||||
// 创建Blob URL
|
// 创建Blob URL
|
||||||
@ -232,7 +273,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
|||||||
// 释放Blob URL
|
// 释放Blob URL
|
||||||
URL.revokeObjectURL(blobUrl);
|
URL.revokeObjectURL(blobUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.error("下载PDF文件失败:", error);
|
console.error("下载PDF文件失败:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -322,14 +363,14 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
// watch(
|
||||||
() => filteredList.value,
|
// () => filteredList.value,
|
||||||
(newList) => {
|
// (newList) => {
|
||||||
state.total = newList.length;
|
// state.total = newList.length;
|
||||||
state.currentPage = 1;
|
// state.currentPage = 1;
|
||||||
},
|
// },
|
||||||
{ immediate: true }
|
// { immediate: true }
|
||||||
);
|
// );
|
||||||
|
|
||||||
// 点击外部关闭页面大小选择菜单
|
// 点击外部关闭页面大小选择菜单
|
||||||
const handleClickOutside = (event) => {
|
const handleClickOutside = (event) => {
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<!-- 报告列表 -->
|
<!-- 报告列表 -->
|
||||||
<div class="reports-table">
|
<div class="reports-table">
|
||||||
<div class="reports-list">
|
<div class="reports-list">
|
||||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="file-content">
|
<div class="file-content">
|
||||||
<div class="file-info">
|
<div class="file-info">
|
||||||
@ -35,7 +35,10 @@
|
|||||||
<p class="file-title">{{ item.title }}</p>
|
<p class="file-title">{{ item.title }}</p>
|
||||||
</div>
|
</div>
|
||||||
<p class="file-description">{{ item.description }}</p>
|
<p class="file-description">{{ item.description }}</p>
|
||||||
<p class="download-text" @click="downloadPdf(item.url)">
|
<p
|
||||||
|
class="download-text"
|
||||||
|
@click="downloadPdf(item.url, item.attachmentName)"
|
||||||
|
>
|
||||||
PDF Download
|
PDF Download
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -127,9 +130,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
// import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
// import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||||
|
import axios from "axios";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const searchQuery = ref("");
|
const searchQuery = ref("");
|
||||||
|
|
||||||
@ -138,45 +141,77 @@ const state = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
gotoPage: 1,
|
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: [
|
list: [
|
||||||
{
|
// {
|
||||||
title: "2025 Q2 Quarterly Report",
|
// title: "2025 Q2 Quarterly Report",
|
||||||
description: "Second Quarter 2025 Financial Results",
|
// description: "Second Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q2,
|
// url: quarterlyPdf2025Q2,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: "2025 Q1 Quarterly Report Amendment No.1",
|
// title: "2025 Q1 Quarterly Report Amendment No.1",
|
||||||
description: "First Quarter 2025 Financial Results",
|
// description: "First Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q3N,
|
// url: quarterlyPdf2025Q3N,
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
watch(searchQuery, (newVal) => {
|
||||||
|
if (newVal === "" || newVal === null) {
|
||||||
|
state.listConfig.params.filtrate.fileName = newVal;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
|
}
|
||||||
|
});
|
||||||
const showPageSizeMenu = ref(false);
|
const showPageSizeMenu = ref(false);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener("click", handleClickOutside);
|
document.addEventListener("click", handleClickOutside);
|
||||||
|
getListData();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener("click", handleClickOutside);
|
document.removeEventListener("click", handleClickOutside);
|
||||||
});
|
});
|
||||||
const filteredList = computed(() => {
|
const getListData = async () => {
|
||||||
if (!searchQuery.value) return state.list;
|
console.log(state.listConfig);
|
||||||
const query = searchQuery.value.toLowerCase();
|
const res = await axios.post(state.listConfig.url, state.listConfig.params);
|
||||||
return state.list.filter(
|
console.log(res);
|
||||||
(item) =>
|
if (res.data.code === 0) {
|
||||||
item.title.toLowerCase().includes(query) ||
|
let resData = res.data.data.Item || [];
|
||||||
item.description.toLowerCase().includes(query)
|
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 pagedList = computed(() => {
|
||||||
const start = (state.currentPage - 1) * state.pageSize;
|
// const start = (state.currentPage - 1) * state.pageSize;
|
||||||
const end = start + state.pageSize;
|
// const end = start + state.pageSize;
|
||||||
return filteredList.value.slice(start, end);
|
// return filteredList.value.slice(start, end);
|
||||||
});
|
// });
|
||||||
|
|
||||||
// 总页数
|
// 总页数
|
||||||
const totalPages = computed(() => {
|
const totalPages = computed(() => {
|
||||||
@ -193,13 +228,19 @@ const displayRange = computed(() => {
|
|||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
// 搜索处理逻辑
|
// 搜索处理逻辑
|
||||||
// console.log("搜索:", searchQuery.value);
|
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPdf = async (pdfResource, filename = "") => {
|
const downloadPdf = async (pdfResource, filename = "") => {
|
||||||
try {
|
try {
|
||||||
|
const isDev = import.meta.env.DEV;
|
||||||
|
const requestUrl = isDev
|
||||||
|
? "/pdf-proxy/" + pdfResource.split("//")[1].split("/").slice(1).join("/")
|
||||||
|
: pdfResource;
|
||||||
// 获取PDF文件
|
// 获取PDF文件
|
||||||
const response = await fetch(pdfResource);
|
const response = await fetch(requestUrl);
|
||||||
const blob = await response.blob();
|
const blob = await response.blob();
|
||||||
|
|
||||||
// 创建Blob URL
|
// 创建Blob URL
|
||||||
@ -218,7 +259,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
|||||||
// 释放Blob URL
|
// 释放Blob URL
|
||||||
URL.revokeObjectURL(blobUrl);
|
URL.revokeObjectURL(blobUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.error("下载PDF文件失败:", error);
|
console.error("下载PDF文件失败:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -308,14 +349,14 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
// watch(
|
||||||
() => filteredList.value,
|
// () => filteredList.value,
|
||||||
(newList) => {
|
// (newList) => {
|
||||||
state.total = newList.length;
|
// state.total = newList.length;
|
||||||
state.currentPage = 1;
|
// state.currentPage = 1;
|
||||||
},
|
// },
|
||||||
{ immediate: true }
|
// { immediate: true }
|
||||||
);
|
// );
|
||||||
|
|
||||||
// 点击外部关闭页面大小选择菜单
|
// 点击外部关闭页面大小选择菜单
|
||||||
const handleClickOutside = (event) => {
|
const handleClickOutside = (event) => {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<!-- 报告列表 -->
|
<!-- 报告列表 -->
|
||||||
<div class="reports-table">
|
<div class="reports-table">
|
||||||
<div class="reports-list">
|
<div class="reports-list">
|
||||||
<div v-for="(item, index) in pagedList" :key="index" class="table-row">
|
<div v-for="(item, index) in state.list" :key="index" class="table-row">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="file-content">
|
<div class="file-content">
|
||||||
<div class="file-info">
|
<div class="file-info">
|
||||||
@ -36,7 +36,10 @@
|
|||||||
<p class="file-description">{{ item.description }}</p>
|
<p class="file-description">{{ item.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="download-section">
|
<div class="download-section">
|
||||||
<p class="download-text" @click="downloadPdf(item.url)">
|
<p
|
||||||
|
class="download-text"
|
||||||
|
@click="downloadPdf(item.url, item.attachmentName)"
|
||||||
|
>
|
||||||
PDF Download
|
PDF Download
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -139,9 +142,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
import { ref, watch, onMounted, onUnmounted, computed, reactive } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
// import quarterlyPdf2025Q2 from "@/assets/file/quarterly/10Q 2025-Q2.pdf";
|
||||||
import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
// import quarterlyPdf2025Q3N from "@/assets/file/quarterly/10Q 2025-Q1-No1.pdf";
|
||||||
|
import axios from "axios";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const searchQuery = ref("");
|
const searchQuery = ref("");
|
||||||
|
|
||||||
@ -150,45 +153,77 @@ const state = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
gotoPage: 1,
|
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: [
|
list: [
|
||||||
{
|
// {
|
||||||
title: "2025 Q2 Quarterly Report",
|
// title: "2025 Q2 Quarterly Report",
|
||||||
description: "Second Quarter 2025 Financial Results",
|
// description: "Second Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q2,
|
// url: quarterlyPdf2025Q2,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: "2025 Q1 Quarterly Report Amendment No.1",
|
// title: "2025 Q1 Quarterly Report Amendment No.1",
|
||||||
description: "First Quarter 2025 Financial Results",
|
// description: "First Quarter 2025 Financial Results",
|
||||||
url: quarterlyPdf2025Q3N,
|
// url: quarterlyPdf2025Q3N,
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
watch(searchQuery, (newVal) => {
|
||||||
|
if (newVal === "" || newVal === null) {
|
||||||
|
state.listConfig.params.filtrate.fileName = newVal;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
|
}
|
||||||
|
});
|
||||||
const showPageSizeMenu = ref(false);
|
const showPageSizeMenu = ref(false);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener("click", handleClickOutside);
|
document.addEventListener("click", handleClickOutside);
|
||||||
|
getListData();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
document.removeEventListener("click", handleClickOutside);
|
document.removeEventListener("click", handleClickOutside);
|
||||||
});
|
});
|
||||||
const filteredList = computed(() => {
|
const getListData = async () => {
|
||||||
if (!searchQuery.value) return state.list;
|
console.log(state.listConfig);
|
||||||
const query = searchQuery.value.toLowerCase();
|
const res = await axios.post(state.listConfig.url, state.listConfig.params);
|
||||||
return state.list.filter(
|
console.log(res);
|
||||||
(item) =>
|
if (res.data.code === 0) {
|
||||||
item.title.toLowerCase().includes(query) ||
|
let resData = res.data.data.Item || [];
|
||||||
item.description.toLowerCase().includes(query)
|
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 pagedList = computed(() => {
|
||||||
const start = (state.currentPage - 1) * state.pageSize;
|
// const start = (state.currentPage - 1) * state.pageSize;
|
||||||
const end = start + state.pageSize;
|
// const end = start + state.pageSize;
|
||||||
return filteredList.value.slice(start, end);
|
// return filteredList.value.slice(start, end);
|
||||||
});
|
// });
|
||||||
|
|
||||||
// 总页数
|
// 总页数
|
||||||
const totalPages = computed(() => {
|
const totalPages = computed(() => {
|
||||||
@ -205,13 +240,19 @@ const displayRange = computed(() => {
|
|||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
// 搜索处理逻辑
|
// 搜索处理逻辑
|
||||||
// console.log("搜索:", searchQuery.value);
|
state.listConfig.params.filtrate.fileName = searchQuery.value;
|
||||||
|
state.currentPage = 1;
|
||||||
|
getListData();
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPdf = async (pdfResource, filename = "") => {
|
const downloadPdf = async (pdfResource, filename = "") => {
|
||||||
try {
|
try {
|
||||||
|
const isDev = import.meta.env.DEV;
|
||||||
|
const requestUrl = isDev
|
||||||
|
? "/pdf-proxy/" + pdfResource.split("//")[1].split("/").slice(1).join("/")
|
||||||
|
: pdfResource;
|
||||||
// 获取PDF文件
|
// 获取PDF文件
|
||||||
const response = await fetch(pdfResource);
|
const response = await fetch(requestUrl);
|
||||||
const blob = await response.blob();
|
const blob = await response.blob();
|
||||||
|
|
||||||
// 创建Blob URL
|
// 创建Blob URL
|
||||||
@ -230,7 +271,7 @@ const downloadPdf = async (pdfResource, filename = "") => {
|
|||||||
// 释放Blob URL
|
// 释放Blob URL
|
||||||
URL.revokeObjectURL(blobUrl);
|
URL.revokeObjectURL(blobUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.error("下载PDF文件失败:", error);
|
console.error("下载PDF文件失败:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -320,14 +361,14 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
// watch(
|
||||||
() => filteredList.value,
|
// () => filteredList.value,
|
||||||
(newList) => {
|
// (newList) => {
|
||||||
state.total = newList.length;
|
// state.total = newList.length;
|
||||||
state.currentPage = 1;
|
// state.currentPage = 1;
|
||||||
},
|
// },
|
||||||
{ immediate: true }
|
// { immediate: true }
|
||||||
);
|
// );
|
||||||
|
|
||||||
// 点击外部关闭页面大小选择菜单
|
// 点击外部关闭页面大小选择菜单
|
||||||
const handleClickOutside = (event) => {
|
const handleClickOutside = (event) => {
|
||||||
|
@ -20,6 +20,11 @@ export default defineConfig({
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '/api')
|
rewrite: (path) => path.replace(/^\/api/, '/api')
|
||||||
},
|
},
|
||||||
|
'/pdf-proxy': {
|
||||||
|
target: 'https://cdn-test.szjixun.cn',
|
||||||
|
changeOrigin: true,
|
||||||
|
rewrite: (path) => path.replace(/^\/pdf-proxy/, '')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
Loading…
Reference in New Issue
Block a user