修改官网governance和新闻,改从接口获取数据,并修改列表展示及分页、触底加载更多;处理滚动条美化

This commit is contained in:
wangyifeng 2025-06-13 12:06:12 +08:00
parent 0b000f2eb0
commit 9fb3db0ced
20 changed files with 1081 additions and 401 deletions

3
env/.env.prod vendored
View File

@ -5,3 +5,6 @@ VITE_DELETE_CONSOLE = true
# 是否开启sourcemap # 是否开启sourcemap
VITE_SHOW_SOURCEMAP = false VITE_SHOW_SOURCEMAP = false
VITE_BASEURL = '//appointteam.szjixun.cn' VITE_BASEURL = '//appointteam.szjixun.cn'
# 文档查看
VITE_PAGE_URL="http://172.16.100.22:8045"

4
env/.env.test vendored
View File

@ -3,3 +3,7 @@ NODE_ENV = 'test'
# 是否去除console 和 debugger # 是否去除console 和 debugger
VITE_DELETE_CONSOLE = false VITE_DELETE_CONSOLE = false
VITE_BASEURL = '//kid-art-test.szjixun.cn' VITE_BASEURL = '//kid-art-test.szjixun.cn'
# 文档查看
# VITE_PAGE_URL="http://172.16.100.22:8045"
VITE_PAGE_URL="http://192.168.88.50:5878"

View File

@ -12,6 +12,7 @@
}, },
"dependencies": { "dependencies": {
"@fingerprintjs/fingerprintjs": "^4.4.3", "@fingerprintjs/fingerprintjs": "^4.4.3",
"@onlyoffice/document-editor-vue": "^1.5.0",
"@unocss/reset": "^0.61.9", "@unocss/reset": "^0.61.9",
"@vicons/ionicons5": "^0.13.0", "@vicons/ionicons5": "^0.13.0",
"@vicons/utils": "^0.1.4", "@vicons/utils": "^0.1.4",

View File

@ -11,6 +11,9 @@ importers:
'@fingerprintjs/fingerprintjs': '@fingerprintjs/fingerprintjs':
specifier: ^4.4.3 specifier: ^4.4.3
version: 4.4.3 version: 4.4.3
'@onlyoffice/document-editor-vue':
specifier: ^1.5.0
version: 1.5.0(vue@3.4.35)
'@unocss/reset': '@unocss/reset':
specifier: ^0.61.9 specifier: ^0.61.9
version: 0.61.9 version: 0.61.9
@ -1279,6 +1282,11 @@ packages:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'} engines: {node: '>= 8'}
'@onlyoffice/document-editor-vue@1.5.0':
resolution: {integrity: sha512-HZEebUhBloP4LomspI5BddgoQdhtPq91h57yA9K/Lk70MMc1vgOTQ4Wq+N5TZYXNxdDTv+TSsEVFLnBCl1Y71A==}
peerDependencies:
vue: ^3.0.0
'@polka/url@1.0.0-next.25': '@polka/url@1.0.0-next.25':
resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==}
@ -5536,6 +5544,11 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5 '@nodelib/fs.scandir': 2.1.5
fastq: 1.17.1 fastq: 1.17.1
'@onlyoffice/document-editor-vue@1.5.0(vue@3.4.35)':
dependencies:
lodash: 4.17.21
vue: 3.4.35
'@polka/url@1.0.0-next.25': {} '@polka/url@1.0.0-next.25': {}
'@rollup/plugin-babel@6.0.4(@babel/core@7.25.2)(rollup@4.20.0)': '@rollup/plugin-babel@6.0.4(@babel/core@7.25.2)(rollup@4.20.0)':

View File

@ -143,6 +143,11 @@ const routes = [
}, },
], ],
}, },
{
path: '/office',
name: 'office',
component: () => import('@/views/office/index.vue'),
},
// { // {
// path: '/companyprofil', // path: '/companyprofil',

View File

@ -44,10 +44,10 @@
</div> </div>
<div class="mt-auto"> <div class="mt-auto">
<a <a
:href="item.url"
class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md" class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md"
target="_blank" target="_blank"
style="font-size: 16px" style="font-size: 16px; cursor: pointer;"
@click="handleViewDocument(item)"
> >
View Document View Document
<svg <svg
@ -72,46 +72,83 @@
</template> </template>
<script setup> <script setup>
import { reactive } from "vue"; import { reactive, onMounted } from 'vue'
import quarterlyPdfone from "@/assets/file/FiEE, Inc._Audit Committee Charter.pdf"; import axios from 'axios'
import quarterlyPdftwo from "@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf";
import quarterlyPdfthree from "@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf"; import quarterlyPdfone from '@/assets/file/FiEE, Inc._Audit Committee Charter.pdf'
import quarterlyPdftwo from '@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf'
import quarterlyPdffour from "@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf"; import quarterlyPdfthree from '@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf'
import quarterlyPdffour from '@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf'
const state = reactive({ const state = reactive({
list: [ list: [
{ // {
title: "AUDIT COMMITTEE CHARTER", // title: 'AUDIT COMMITTEE CHARTER',
description: // description:
"Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.", // 'Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.',
url: quarterlyPdfone, // url: quarterlyPdfone,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "CODE OF BUSINESS CONDUCT AND ETHICS", // title: 'CODE OF BUSINESS CONDUCT AND ETHICS',
description: // description:
"Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.", // 'Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.',
url: quarterlyPdftwo, // url: quarterlyPdftwo,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "COMPENSATION COMMITTEE CHARTER", // title: 'COMPENSATION COMMITTEE CHARTER',
description: // description:
"Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.", // 'Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.',
url: quarterlyPdfthree, // url: quarterlyPdfthree,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER", // title: 'NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER',
description: // description:
"Provides the framework for director nominations and corporate governance matters.", // 'Provides the framework for director nominations and corporate governance matters.',
url: quarterlyPdffour, // url: quarterlyPdffour,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
], ],
}); })
onMounted(() => {
getGovernanceDisplay()
})
//
const getGovernanceDisplay = () => {
// let url = 'https://common.szjixun.cn/api/fiee/governance/display'
let url = 'http://172.16.100.93:9020/api/fiee/governance/display'
let params = {}
axios
.get(url, { params })
.then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
state.list = res.data.data.data || []
}
}
})
.catch((err) => {
// console.log(err)
})
}
//
const handleViewDocument = (item) => {
// console.log(item)
window.open(
`${import.meta.env.VITE_PAGE_URL}/office?url=${
item.attachment
}&attachmentName=${item.attachmentName}`,
'_blank',
)
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -44,10 +44,10 @@
</div> </div>
<div class="mt-auto"> <div class="mt-auto">
<a <a
:href="item.url"
class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md" class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md"
target="_blank" target="_blank"
style="font-size: 16px" style="font-size: 16px; cursor: pointer;"
@click="handleViewDocument(item)"
> >
View Document View Document
<svg <svg
@ -72,46 +72,83 @@
</template> </template>
<script setup> <script setup>
import { reactive } from "vue"; import { reactive, onMounted } from 'vue'
import quarterlyPdfone from "@/assets/file/FiEE, Inc._Audit Committee Charter.pdf"; import axios from 'axios'
import quarterlyPdftwo from "@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf";
import quarterlyPdfthree from "@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf"; import quarterlyPdfone from '@/assets/file/FiEE, Inc._Audit Committee Charter.pdf'
import quarterlyPdftwo from '@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf'
import quarterlyPdffour from "@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf"; import quarterlyPdfthree from '@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf'
import quarterlyPdffour from '@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf'
const state = reactive({ const state = reactive({
list: [ list: [
{ // {
title: "AUDIT COMMITTEE CHARTER", // title: 'AUDIT COMMITTEE CHARTER',
description: // description:
"Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.", // 'Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.',
url: quarterlyPdfone, // url: quarterlyPdfone,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "CODE OF BUSINESS CONDUCT AND ETHICS", // title: 'CODE OF BUSINESS CONDUCT AND ETHICS',
description: // description:
"Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.", // 'Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.',
url: quarterlyPdftwo, // url: quarterlyPdftwo,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "COMPENSATION COMMITTEE CHARTER", // title: 'COMPENSATION COMMITTEE CHARTER',
description: // description:
"Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.", // 'Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.',
url: quarterlyPdfthree, // url: quarterlyPdfthree,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER", // title: 'NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER',
description: // description:
"Provides the framework for director nominations and corporate governance matters.", // 'Provides the framework for director nominations and corporate governance matters.',
url: quarterlyPdffour, // url: quarterlyPdffour,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
], ],
}); })
onMounted(() => {
getGovernanceDisplay()
})
//
const getGovernanceDisplay = () => {
// let url = 'https://common.szjixun.cn/api/fiee/governance/display'
let url = 'http://172.16.100.93:9020/api/fiee/governance/display'
let params = {}
axios
.get(url, { params })
.then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
state.list = res.data.data.data || []
}
}
})
.catch((err) => {
// console.log(err)
})
}
//
const handleViewDocument = (item) => {
// console.log(item)
window.open(
`${import.meta.env.VITE_PAGE_URL}/office?url=${
item.attachment
}&attachmentName=${item.attachmentName}`,
'_blank',
)
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -41,9 +41,10 @@
</div> </div>
<div class="mt-auto"> <div class="mt-auto">
<a <a
:href="item.url"
class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md" class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md"
target="_blank" target="_blank"
style="cursor: pointer;"
@click="handleViewDocument(item)"
> >
View Document View Document
<svg <svg
@ -68,46 +69,83 @@
</template> </template>
<script setup> <script setup>
import { reactive } from "vue"; import { reactive, onMounted } from 'vue'
import quarterlyPdfone from "@/assets/file/FiEE, Inc._Audit Committee Charter.pdf"; import axios from 'axios'
import quarterlyPdftwo from "@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf";
import quarterlyPdfthree from "@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf"; import quarterlyPdfone from '@/assets/file/FiEE, Inc._Audit Committee Charter.pdf'
import quarterlyPdftwo from '@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf'
import quarterlyPdffour from "@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf"; import quarterlyPdfthree from '@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf'
import quarterlyPdffour from '@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf'
const state = reactive({ const state = reactive({
list: [ list: [
{ // {
title: "AUDIT COMMITTEE CHARTER", // title: 'AUDIT COMMITTEE CHARTER',
description: // description:
"Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.", // 'Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.',
url: quarterlyPdfone, // url: quarterlyPdfone,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "CODE OF BUSINESS CONDUCT AND ETHICS", // title: 'CODE OF BUSINESS CONDUCT AND ETHICS',
description: // description:
"Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.", // 'Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.',
url: quarterlyPdftwo, // url: quarterlyPdftwo,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "COMPENSATION COMMITTEE CHARTER", // title: 'COMPENSATION COMMITTEE CHARTER',
description: // description:
"Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.", // 'Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.',
url: quarterlyPdfthree, // url: quarterlyPdfthree,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER", // title: 'NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER',
description: // description:
"Provides the framework for director nominations and corporate governance matters.", // 'Provides the framework for director nominations and corporate governance matters.',
url: quarterlyPdffour, // url: quarterlyPdffour,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
], ],
}); })
onMounted(() => {
getGovernanceDisplay()
})
//
const getGovernanceDisplay = () => {
// let url = 'https://common.szjixun.cn/api/fiee/governance/display'
let url = 'http://172.16.100.93:9020/api/fiee/governance/display'
let params = {}
axios
.get(url, { params })
.then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
state.list = res.data.data.data || []
}
}
})
.catch((err) => {
// console.log(err)
})
}
//
const handleViewDocument = (item) => {
// console.log(item)
window.open(
`${import.meta.env.VITE_PAGE_URL}/office?url=${
item.attachment
}&attachmentName=${item.attachmentName}`,
'_blank',
)
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -41,9 +41,10 @@
</div> </div>
<div class="mt-auto"> <div class="mt-auto">
<a <a
:href="item.url"
class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md" class="inline-flex items-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#895bff] hover:bg-[#7a4de6] transition-all duration-300 transform hover:scale-105 shadow-md"
target="_blank" target="_blank"
style="cursor: pointer;"
@click="handleViewDocument(item)"
> >
View Document View Document
<svg <svg
@ -68,46 +69,83 @@
</template> </template>
<script setup> <script setup>
import { reactive } from "vue"; import { reactive, onMounted } from 'vue'
import quarterlyPdfone from "@/assets/file/FiEE, Inc._Audit Committee Charter.pdf"; import axios from 'axios'
import quarterlyPdftwo from "@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf";
import quarterlyPdfthree from "@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf"; import quarterlyPdfone from '@/assets/file/FiEE, Inc._Audit Committee Charter.pdf'
import quarterlyPdftwo from '@/assets/file/FiEE, Inc. _Code of Business Conduct and Ethics.pdf'
import quarterlyPdffour from "@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf"; import quarterlyPdfthree from '@/assets/file/FiEE, Inc._Compensation Committee Charter.pdf'
import quarterlyPdffour from '@/assets/file/FiEE, Inc. _Nominating and Corporate Governance Committee Charter.pdf'
const state = reactive({ const state = reactive({
list: [ list: [
{ // {
title: "AUDIT COMMITTEE CHARTER", // title: 'AUDIT COMMITTEE CHARTER',
description: // description:
"Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.", // 'Defines the purpose, composition, and responsibilities of the Audit Committee in overseeing financial reporting and disclosure.',
url: quarterlyPdfone, // url: quarterlyPdfone,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "CODE OF BUSINESS CONDUCT AND ETHICS", // title: 'CODE OF BUSINESS CONDUCT AND ETHICS',
description: // description:
"Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.", // 'Establishes the ethical standards and legal compliance expectations for all directors, officers and employees.',
url: quarterlyPdftwo, // url: quarterlyPdftwo,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "COMPENSATION COMMITTEE CHARTER", // title: 'COMPENSATION COMMITTEE CHARTER',
description: // description:
"Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.", // 'Outlines the duties and responsibilities for overseeing executive compensation and benefit plans.',
url: quarterlyPdfthree, // url: quarterlyPdfthree,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
{ // {
title: "NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER", // title: 'NOMINATING AND CORPORATE GOVERNANCE COMMITTEE CHARTER',
description: // description:
"Provides the framework for director nominations and corporate governance matters.", // 'Provides the framework for director nominations and corporate governance matters.',
url: quarterlyPdffour, // url: quarterlyPdffour,
date: "May 30, 2025", // date: 'May 30, 2025',
}, // },
], ],
}); })
onMounted(() => {
getGovernanceDisplay()
})
//
const getGovernanceDisplay = () => {
// let url = 'https://common.szjixun.cn/api/fiee/governance/display'
let url = 'http://172.16.100.93:9020/api/fiee/governance/display'
let params = {}
axios
.get(url, { params })
.then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
state.list = res.data.data.data || []
}
}
})
.catch((err) => {
// console.log(err)
})
}
//
const handleViewDocument = (item) => {
// console.log(item)
window.open(
`${import.meta.env.VITE_PAGE_URL}/office?url=${
item.attachment
}&attachmentName=${item.attachmentName}`,
'_blank',
)
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -1,16 +1,17 @@
<script setup> <script setup>
import customHeader from '@/components/customHeader/index.vue' import customHeader from '@/components/customHeader/index.vue'
import customFooter from '@/components/customFooter/index.vue' import customFooter from '@/components/customFooter/index.vue'
import { NScrollbar } from 'naive-ui'
</script> </script>
<template> <template>
<div class="flex flex-col h-screen"> <div class="flex flex-col h-screen">
<customHeader></customHeader> <customHeader></customHeader>
<div <n-scrollbar class="bg-[url('@/assets/image/bg-pc.png')] bg-cover bg-center flex-1">
class="bg-[url('@/assets/image/bg-pc.png')] bg-cover bg-center flex-1 overflow-auto" <div>
> <router-view />
<router-view /> </div>
</div> </n-scrollbar>
<customFooter></customFooter> <customFooter></customFooter>
</div> </div>
</template> </template>

View File

@ -1,16 +1,19 @@
<script setup> <script setup>
import customHeader from '@/components/customHeader/index.vue' import customHeader from '@/components/customHeader/index.vue'
import customFooter from '@/components/customFooter/index.vue' import customFooter from '@/components/customFooter/index.vue'
import { NScrollbar } from 'naive-ui'
</script> </script>
<template> <template>
<div class="flex flex-col h-100svh"> <div class="flex flex-col h-100svh">
<customHeader /> <customHeader />
<div <n-scrollbar
class="bg-[url('@/assets/image/bg-mobile.png')] bg-cover bg-center flex-1 overflow-auto" class="bg-[url('@/assets/image/bg-mobile.png')] bg-cover bg-center flex-1"
> >
<router-view /> <div>
</div> <router-view />
</div>
</n-scrollbar>
<customFooter /> <customFooter />
</div> </div>
</template> </template>

View File

@ -83,7 +83,7 @@
<div <div
style="font-size: 18px" style="font-size: 18px"
class="cursor-pointer" class="cursor-pointer"
@click="handleLink(item.router, item.time)" @click="handleLink(item)"
> >
View Press Release<img View Press Release<img
class="ml-[10px]" class="ml-[10px]"
@ -205,6 +205,7 @@
import { onMounted, ref, onUnmounted, computed } from "vue"; import { onMounted, ref, onUnmounted, computed } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useStockQuote } from "@/store/stock-quote/index.js"; import { useStockQuote } from "@/store/stock-quote/index.js";
import axios from 'axios'
const { getStockQuate, stockQuote, formatted } = useStockQuote(); const { getStockQuate, stockQuote, formatted } = useStockQuote();
getStockQuate(); getStockQuate();
@ -214,17 +215,44 @@ const contentRef = ref(null);
const isInView = ref(false); const isInView = ref(false);
let observer = null; let observer = null;
const newList = ref([ const newList = ref([
{ // {
time: "June 3, 2025", // time: "June 3, 2025",
title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo", // title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo",
router: "/news", // router: "/news",
}, // },
{ // {
time: "June 2, 2025", // time: "June 2, 2025",
title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ", // title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ",
router: "/news", // router: "/news",
}, // },
]); ]);
// ()
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
page: 1,
pageSize: 10,
display: 2, // 1: 2:
}
console.log(params)
axios.post(url, params).then((res) => {
console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.time = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'long',
day: 'numeric',
year: 'numeric',
})
})
newList.value = res.data.data?.data || []
}
}
})
}
onMounted(() => { onMounted(() => {
if (contentRef.value && "IntersectionObserver" in window) { if (contentRef.value && "IntersectionObserver" in window) {
observer = new IntersectionObserver( observer = new IntersectionObserver(
@ -249,6 +277,7 @@ onMounted(() => {
// 退IntersectionObserver // 退IntersectionObserver
isInView.value = true; isInView.value = true;
} }
getPressReleasesDisplay()
}); });
onUnmounted(() => { onUnmounted(() => {
@ -258,11 +287,11 @@ onUnmounted(() => {
}); });
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
const handleLink = (routers, index) => { const handleLink = (item) => {
router.push({ router.push({
path: routers, path: "/news",
query: { query: {
date: index, id: item.id,
}, },
}); });
}; };

View File

@ -82,7 +82,7 @@
<div <div
style="font-size: 18px" style="font-size: 18px"
class="cursor-pointer" class="cursor-pointer"
@click="handleLink(item.router, item.time)" @click="handleLink(item)"
> >
View Press Release<img View Press Release<img
class="ml-[10px]" class="ml-[10px]"
@ -194,24 +194,51 @@
import { onMounted, ref, onUnmounted, computed } from "vue"; import { onMounted, ref, onUnmounted, computed } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useStockQuote } from "@/store/stock-quote/index.js"; import { useStockQuote } from "@/store/stock-quote/index.js";
import axios from 'axios'
const { getStockQuate, stockQuote, formatted } = useStockQuote(); const { getStockQuate, stockQuote, formatted } = useStockQuote();
getStockQuate(); getStockQuate();
// //
const sampleDate = ref(formatted); const sampleDate = ref(formatted);
const newList = ref([ const newList = ref([
{ // {
time: "June 3, 2025", // time: "June 3, 2025",
title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo", // title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo",
router: "/news", // router: "/news",
}, // },
{ // {
time: "June 2, 2025", // time: "June 2, 2025",
title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ", // title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ",
router: "/news", // router: "/news",
}, // },
]); ]);
// ()
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
page: 1,
pageSize: 10,
display: 2, // 1: 2:
}
console.log(params)
axios.post(url, params).then((res) => {
console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.time = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'long',
day: 'numeric',
year: 'numeric',
})
})
newList.value = res.data.data?.data || []
}
}
})
}
const { t: $t } = useI18n(); const { t: $t } = useI18n();
const contentRef = ref(null); const contentRef = ref(null);
const isInView = ref(false); const isInView = ref(false);
@ -240,6 +267,7 @@ onMounted(() => {
// 退IntersectionObserver // 退IntersectionObserver
isInView.value = true; isInView.value = true;
} }
getPressReleasesDisplay()
}); });
onUnmounted(() => { onUnmounted(() => {
@ -249,11 +277,11 @@ onUnmounted(() => {
}); });
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
const handleLink = (routers, index) => { const handleLink = (item) => {
router.push({ router.push({
path: routers, path: "/news",
query: { query: {
date: index, id: item.id,
}, },
}); });
}; };

View File

@ -83,7 +83,7 @@
<div <div
style="font-size: 18px" style="font-size: 18px"
class="cursor-pointer" class="cursor-pointer"
@click="handleLink(item.router, item.time)" @click="handleLink(item)"
> >
View Press Release<img View Press Release<img
class="ml-[10px]" class="ml-[10px]"
@ -205,6 +205,7 @@
import { onMounted, ref, onUnmounted, computed } from "vue"; import { onMounted, ref, onUnmounted, computed } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useStockQuote } from "@/store/stock-quote/index.js"; import { useStockQuote } from "@/store/stock-quote/index.js";
import axios from 'axios'
const { getStockQuate, stockQuote, formatted } = useStockQuote(); const { getStockQuate, stockQuote, formatted } = useStockQuote();
getStockQuate(); getStockQuate();
const { t: $t } = useI18n(); const { t: $t } = useI18n();
@ -212,17 +213,44 @@ const contentRef = ref(null);
const isInView = ref(false); const isInView = ref(false);
let observer = null; let observer = null;
const newList = ref([ const newList = ref([
{ // {
time: "June 3, 2025", // time: "June 3, 2025",
title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo", // title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo",
router: "/news", // router: "/news",
}, // },
{ // {
time: "June 2, 2025", // time: "June 2, 2025",
title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ", // title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ",
router: "/news", // router: "/news",
}, // },
]); ]);
// ()
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
page: 1,
pageSize: 10,
display: 2, // 1: 2:
}
console.log(params)
axios.post(url, params).then((res) => {
console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.time = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'long',
day: 'numeric',
year: 'numeric',
})
})
newList.value = res.data.data?.data || []
}
}
})
}
onMounted(() => { onMounted(() => {
if (contentRef.value && "IntersectionObserver" in window) { if (contentRef.value && "IntersectionObserver" in window) {
observer = new IntersectionObserver( observer = new IntersectionObserver(
@ -247,6 +275,7 @@ onMounted(() => {
// 退IntersectionObserver // 退IntersectionObserver
isInView.value = true; isInView.value = true;
} }
getPressReleasesDisplay()
}); });
onUnmounted(() => { onUnmounted(() => {
@ -256,11 +285,11 @@ onUnmounted(() => {
}); });
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
const handleLink = (routers, index) => { const handleLink = (item) => {
router.push({ router.push({
path: routers, path: "/news",
query: { query: {
date: index, id: item.id,
}, },
}); });
}; };

View File

@ -83,7 +83,7 @@
<div <div
style="font-size: 18px" style="font-size: 18px"
class="cursor-pointer" class="cursor-pointer"
@click="handleLink(item.router, item.time)" @click="handleLink(item)"
> >
View Press Release<img View Press Release<img
class="ml-[10px]" class="ml-[10px]"
@ -205,6 +205,7 @@
import { onMounted, ref, onUnmounted, computed } from "vue"; import { onMounted, ref, onUnmounted, computed } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useStockQuote } from "@/store/stock-quote/index.js"; import { useStockQuote } from "@/store/stock-quote/index.js";
import axios from 'axios'
const { getStockQuate, stockQuote, formatted } = useStockQuote(); const { getStockQuate, stockQuote, formatted } = useStockQuote();
getStockQuate(); getStockQuate();
@ -238,20 +239,47 @@ onMounted(() => {
// 退IntersectionObserver // 退IntersectionObserver
isInView.value = true; isInView.value = true;
} }
getPressReleasesDisplay()
}); });
const newList = ref([ const newList = ref([
{ // {
time: "June 3, 2025", // time: "June 3, 2025",
title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo", // title: "FiEE, Inc. seized market opportunities through 2025 Osaka Expo",
router: "/news", // router: "/news",
}, // },
{ // {
time: "June 2, 2025", // time: "June 2, 2025",
title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ", // title: "FiEE, Inc. Closes Its First Day of Trading on NASDAQ",
router: "/news", // router: "/news",
}, // },
]); ]);
// ()
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
page: 1,
pageSize: 10,
display: 2, // 1: 2:
}
console.log(params)
axios.post(url, params).then((res) => {
console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.time = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'long',
day: 'numeric',
year: 'numeric',
})
})
newList.value = res.data.data?.data || []
}
}
})
}
onUnmounted(() => { onUnmounted(() => {
if (observer) { if (observer) {
observer.disconnect(); observer.disconnect();
@ -259,11 +287,11 @@ onUnmounted(() => {
}); });
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
const handleLink = (routers, index) => { const handleLink = (item) => {
router.push({ router.push({
path: routers, path: "/news",
query: { query: {
date: index, id: item.id,
}, },
}); });
}; };

119
src/views/office/index.vue Normal file
View File

@ -0,0 +1,119 @@
<!-- 从chat-PC接入的文档查看 -->
<template>
<DocumentEditor
id="docEditor"
:documentServerUrl="documentServerUrl"
:config="config"
:events_onDocumentReady="onDocumentReady"
:onLoadComponentError="onLoadComponentError"
/>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { DocumentEditor } from "@onlyoffice/document-editor-vue"
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const documentServerUrl = 'https://onlyoffice.fontree.cn'
const route = useRoute()
onMounted(() => {
// Content-Security-Policy meta
if (!document.querySelector('meta[http-equiv="Content-Security-Policy"]')) {
const meta = document.createElement('meta')
meta.httpEquiv = 'Content-Security-Policy'
meta.content = 'upgrade-insecure-requests'
document.head.appendChild(meta)
}
})
//
function getDocumentTypes(url) {
const extension = url.split('.').pop().toLowerCase()
const types = {
'docx': { fileType: 'docx', documentType: 'word' },
'doc': { fileType: 'doc', documentType: 'word' },
'xlsx': { fileType: 'xlsx', documentType: 'cell' },
'xls': { fileType: 'xls', documentType: 'cell' },
'pptx': { fileType: 'pptx', documentType: 'slide' },
'ppt': { fileType: 'ppt', documentType: 'slide' },
'pdf': { fileType: 'pdf', documentType: 'word' }
}
return types[extension] || { fileType: 'docx', documentType: 'word' }
}
const url = route.query.url
if (!url) {
alert(t('PAGES.FiEEInfoManage.document.readFailed'))
}
let attachmentName = route.query.attachmentName
const fileName = attachmentName ? attachmentName : url ? url.split('/').pop() : ''
const { fileType, documentType } = getDocumentTypes(url || '')
const config = {
document: {
fileType,
key: 'doc_' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15),
title: fileName,
url
},
documentType,
editorConfig: {
mode: 'view',
lang: 'en-US',
user: {
id: 'user_' + new Date().getTime(),
name: 'Guest User'
},
customization: {
about: false, //
help: false, //
chat: false,
commentAuthorOnly: false,
compactToolbar: true,
hideRightMenu: false, //
compatibility: true,
showReviewChanges: false,
loaderLogo: '', // logo
logo: {
image: '', //
imageDark: '', //
url: '', //
visible: false // false logo
}
}
}
}
const onDocumentReady = () => {
console.log("文档加载完成")
}
const onLoadComponentError = (errorCode, errorDescription) => {
switch(errorCode) {
case -1: //
console.log(errorDescription)
break
case -2: // DocsAPI
console.log(errorDescription)
break
case -3: // DocsAPI
console.log(errorDescription)
break
}
}
</script>
<style>
iframe[name="frameEditor"] {
width: 100% !important;
height: 100vh !important;
min-height: 100vh !important;
border: none !important;
display: block;
}
</style>

View File

@ -1,56 +1,59 @@
<template> <template>
<div class="press-releases-page"> <div class="press-releases-page">
<main class="p-[35px] max-w-[1200px] mx-auto"> <n-infinite-scroll :distance="0" @load="doLoadMore">
<div class="title mb-[20px]"> <main class="p-[35px] max-w-[1200px] mx-auto">
{{ t("press_releases.title") }} <div class="title mb-[20px]">
</div> {{ t('press_releases.title') }}
<div class="search-container"> </div>
<n-select <div class="search-container">
:options="state.selectOptions" <n-select
v-model:value="state.selectedValue" :options="state.selectOptions"
class="search-select" v-model:value="state.selectedValue"
/> class="search-select"
<n-input />
v-model:value="state.inputValue" <n-input
type="text" v-model:value="state.inputValue"
:placeholder="t('press_releases.search.placeholder')" type="text"
class="search-input" :placeholder="t('press_releases.search.placeholder')"
/> class="search-input"
<n-button />
type="primary" <n-button
@click="handleSearch" type="primary"
class="search-button w-[80px]" @click="handleSearch"
> class="search-button w-[80px]"
{{ t("press_releases.search.button") }}
</n-button>
</div>
<div v-for="(item, idx) in state.filterNewsData" :key="idx">
<div class="news-item mt-[10px]">
<div class="news-item-date">{{ item.date }}</div>
<div
class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
> >
{{ item.title }} {{ t('press_releases.search.button') }}
</div> </n-button>
<div class="news-item-content"> </div>
{{ <div v-for="(item, idx) in state.filterNewsData" :key="idx">
item.content.length > 230 <div class="news-item mt-[10px]">
? item.content.substring(0, 230) + "..." <div class="news-item-date">{{ item.date }}</div>
: item.content <div
}} class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
>
{{ item.title }}
</div>
<div class="news-item-content" style="word-break: break-all;">
{{
item.summary?.length > 199
? item.summary.substring(0, 199) + '...'
: item.summary
}}
</div>
</div> </div>
</div> </div>
</div> </main>
</main> </n-infinite-scroll>
</div> </div>
</template> </template>
<script setup> <script setup>
import customDefaultPage from "@/components/customDefaultPage/index.vue"; import customDefaultPage from "@/components/customDefaultPage/index.vue";
import { reactive, onMounted, watch } from "vue"; import { reactive, onMounted, watch } from "vue";
import { NSelect, NInput, NButton } from "naive-ui"; import { NSelect, NInput, NButton, NInfiniteScroll } from "naive-ui";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import axios from 'axios'
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
@ -90,12 +93,59 @@ const state = reactive({
}, },
], ],
filterNewsData: [], filterNewsData: [],
loading: false, //
hasMore: true, //
currentPage: 1, //
}); });
onMounted(() => { onMounted(() => {
state.filterNewsData = state.newsData; // state.filterNewsData = state.newsData;
getPressReleasesDisplay()
}); });
//
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
query: state.inputValue,
page: state.currentPage,
pageSize: 10,
timeStart: state.selectedValue
? state.selectedValue === 'all_years'
? null
: new Date(state.selectedValue).getTime()
: null,
}
// console.log(params)
axios.post(url, params).then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.date = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
year: 'numeric',
})
})
if (state.currentPage === 1) {
state.filterNewsData = res.data.data?.data || []
} else {
state.filterNewsData = [
...state.filterNewsData,
...(res.data.data?.data || []),
]
}
if (state.filterNewsData.length < (res.data.data?.total || 0)) {
state.hasMore = true
} else {
state.hasMore = false
}
}
}
})
}
const handleFilter = () => { const handleFilter = () => {
// //
let filteredData = [...state.newsData]; let filteredData = [...state.newsData];
@ -130,14 +180,17 @@ const handleFilter = () => {
watch( watch(
() => [state.selectedValue, state.inputValue], () => [state.selectedValue, state.inputValue],
() => { () => {
handleFilter(); // handleFilter();
}, state.currentPage = 1
{ immediate: true } getPressReleasesDisplay()
}
); );
const handleSearch = () => { const handleSearch = () => {
// //
handleFilter(); // handleFilter();
state.currentPage = 1
getPressReleasesDisplay()
// console.log(":", state.filterNewsData); // console.log(":", state.filterNewsData);
}; };
@ -145,10 +198,23 @@ const handleNewClick = (item) => {
router.push({ router.push({
path: "/news", path: "/news",
query: { query: {
date: item.date, id: item.id,
}, },
}); });
}; };
//
const doLoadMore = () => {
if (!state.hasMore || state.loading) {
return
}
// console.log('')
state.loading = true
state.currentPage++
getPressReleasesDisplay().finally(() => {
state.loading = false
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -1,56 +1,59 @@
<template> <template>
<div class="press-releases-page"> <div class="press-releases-page">
<main class="p-[35px] max-w-[1200px] mx-auto"> <n-infinite-scroll :distance="0" @load="doLoadMore">
<div class="title mb-[20px]"> <main class="p-[35px] max-w-[1200px] mx-auto">
{{ t("press_releases.title") }} <div class="title mb-[20px]">
</div> {{ t('press_releases.title') }}
<div class="search-container"> </div>
<n-select <div class="search-container">
:options="state.selectOptions" <n-select
v-model:value="state.selectedValue" :options="state.selectOptions"
class="search-select" v-model:value="state.selectedValue"
/> class="search-select"
<n-input />
v-model:value="state.inputValue" <n-input
type="text" v-model:value="state.inputValue"
:placeholder="t('press_releases.search.placeholder')" type="text"
class="search-input" :placeholder="t('press_releases.search.placeholder')"
/> class="search-input"
<n-button />
type="primary" <n-button
@click="handleSearch" type="primary"
class="search-button w-[60px]" @click="handleSearch"
> class="search-button w-[60px]"
{{ t("press_releases.search.button") }}
</n-button>
</div>
<div v-for="(item, idx) in state.filterNewsData" :key="idx">
<div class="news-item mt-[10px]">
<div class="news-item-date">{{ item.date }}</div>
<div
class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
> >
{{ item.title }} {{ t('press_releases.search.button') }}
</div> </n-button>
<div class="news-item-content"> </div>
{{ <div v-for="(item, idx) in state.filterNewsData" :key="idx">
item.content.length > 230 <div class="news-item mt-[10px]">
? item.content.substring(0, 230) + "..." <div class="news-item-date">{{ item.date }}</div>
: item.content <div
}} class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
>
{{ item.title }}
</div>
<div class="news-item-content" style="word-break: break-all;">
{{
item.summary?.length > 199
? item.summary.substring(0, 199) + '...'
: item.summary
}}
</div>
</div> </div>
</div> </div>
</div> </main>
</main> </n-infinite-scroll>
</div> </div>
</template> </template>
<script setup> <script setup>
import customDefaultPage from "@/components/customDefaultPage/index.vue"; import customDefaultPage from "@/components/customDefaultPage/index.vue";
import { reactive, onMounted, watch } from "vue"; import { reactive, onMounted, watch } from "vue";
import { NSelect, NInput, NButton } from "naive-ui"; import { NSelect, NInput, NButton, NInfiniteScroll } from "naive-ui";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import axios from 'axios'
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
@ -90,12 +93,59 @@ const state = reactive({
}, },
], ],
filterNewsData: [], filterNewsData: [],
loading: false, //
hasMore: true, //
currentPage: 1, //
}); });
onMounted(() => { onMounted(() => {
state.filterNewsData = state.newsData; // state.filterNewsData = state.newsData;
getPressReleasesDisplay()
}); });
//
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
query: state.inputValue,
page: state.currentPage,
pageSize: 10,
timeStart: state.selectedValue
? state.selectedValue === 'all_years'
? null
: new Date(state.selectedValue).getTime()
: null,
}
// console.log(params)
axios.post(url, params).then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.date = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
year: 'numeric',
})
})
if (state.currentPage === 1) {
state.filterNewsData = res.data.data?.data || []
} else {
state.filterNewsData = [
...state.filterNewsData,
...(res.data.data?.data || []),
]
}
if (state.filterNewsData.length < (res.data.data?.total || 0)) {
state.hasMore = true
} else {
state.hasMore = false
}
}
}
})
}
const handleFilter = () => { const handleFilter = () => {
// //
let filteredData = [...state.newsData]; let filteredData = [...state.newsData];
@ -130,14 +180,17 @@ const handleFilter = () => {
watch( watch(
() => [state.selectedValue, state.inputValue], () => [state.selectedValue, state.inputValue],
() => { () => {
handleFilter(); // handleFilter();
}, state.currentPage = 1
{ immediate: true } getPressReleasesDisplay()
}
); );
const handleSearch = () => { const handleSearch = () => {
// //
handleFilter(); // handleFilter();
state.currentPage = 1
getPressReleasesDisplay()
// console.log(":", state.filterNewsData); // console.log(":", state.filterNewsData);
}; };
@ -145,10 +198,23 @@ const handleNewClick = (item) => {
router.push({ router.push({
path: "/news", path: "/news",
query: { query: {
date: item.date, id: item.id,
}, },
}); });
}; };
//
const doLoadMore = () => {
if (!state.hasMore || state.loading) {
return
}
// console.log('')
state.loading = true
state.currentPage++
getPressReleasesDisplay().finally(() => {
state.loading = false
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -1,62 +1,68 @@
<template> <template>
<div class="press-releases-page"> <div class="press-releases-page">
<main class="p-[80px] mx-auto" style="max-width: 100vw; min-width: 285px"> <n-infinite-scroll :distance="0" @load="doLoadMore">
<div class="title mb-[24px]"> <main
{{ t("press_releases.title") }} class="p-[80px] mx-auto"
</div> style="max-width: 100vw; min-width: 285px;"
<div class="search-container"> >
<n-select <div class="title mb-[24px]">
:options="state.selectOptions" {{ t('press_releases.title') }}
v-model:value="state.selectedValue" </div>
class="search-select" <div class="search-container">
:font-size="72" <n-select
/> :options="state.selectOptions"
<n-input v-model:value="state.selectedValue"
v-model:value="state.inputValue" class="search-select"
type="text" :font-size="72"
:placeholder="t('press_releases.search.placeholder')" />
class="search-input" <n-input
clearable v-model:value="state.inputValue"
:font-size="72" type="text"
/> :placeholder="t('press_releases.search.placeholder')"
<n-button class="search-input"
type="primary" clearable
@click="handleSearch" :font-size="72"
class="search-button" />
:font-size="72" <n-button
> type="primary"
{{ t("press_releases.search.button") }} @click="handleSearch"
</n-button> class="search-button"
</div> :font-size="72"
<div v-for="(item, idx) in state.filterNewsData" :key="idx">
<div class="news-item mt-[10px]">
<div class="news-item-date">{{ item.date }}</div>
<div
class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
> >
{{ item.title }} {{ t('press_releases.search.button') }}
</div> </n-button>
<div class="news-item-content"> </div>
{{ <div v-for="(item, idx) in state.filterNewsData" :key="idx">
item.content.length > 230 <div class="news-item mt-[10px]">
? item.content.substring(0, 230) + "..." <div class="news-item-date">{{ item.date }}</div>
: item.content <div
}} class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
>
{{ item.title }}
</div>
<div class="news-item-content" style="word-break: break-all;">
{{
item.summary?.length > 199
? item.summary.substring(0, 199) + '...'
: item.summary
}}
</div>
</div> </div>
</div> </div>
</div> </main>
</main> </n-infinite-scroll>
</div> </div>
</template> </template>
<script setup> <script setup>
import customDefaultPage from "@/components/customDefaultPage/index.vue"; import customDefaultPage from "@/components/customDefaultPage/index.vue";
import { reactive, onMounted, watch } from "vue"; import { reactive, onMounted, watch } from "vue";
import { NSelect, NInput, NButton } from "naive-ui"; import { NSelect, NInput, NButton, NInfiniteScroll } from "naive-ui";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router"; import axios from 'axios'
import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
@ -94,12 +100,59 @@ const state = reactive({
}, },
], ],
filterNewsData: [], filterNewsData: [],
loading: false, //
hasMore: true, //
currentPage: 1, //
}); });
onMounted(() => { onMounted(() => {
state.filterNewsData = state.newsData; // state.filterNewsData = state.newsData;
getPressReleasesDisplay()
}); });
//
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
query: state.inputValue,
page: state.currentPage,
pageSize: 10,
timeStart: state.selectedValue
? state.selectedValue === 'all_years'
? null
: new Date(state.selectedValue).getTime()
: null,
}
// console.log(params)
axios.post(url, params).then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.date = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
year: 'numeric',
})
})
if (state.currentPage === 1) {
state.filterNewsData = res.data.data?.data || []
} else {
state.filterNewsData = [
...state.filterNewsData,
...(res.data.data?.data || []),
]
}
if (state.filterNewsData.length < (res.data.data?.total || 0)) {
state.hasMore = true
} else {
state.hasMore = false
}
}
}
})
}
const handleFilter = () => { const handleFilter = () => {
// //
let filteredData = [...state.newsData]; let filteredData = [...state.newsData];
@ -134,14 +187,17 @@ const handleFilter = () => {
watch( watch(
() => [state.selectedValue, state.inputValue], () => [state.selectedValue, state.inputValue],
() => { () => {
handleFilter(); // handleFilter();
}, state.currentPage = 1
{ immediate: true } getPressReleasesDisplay()
}
); );
const handleSearch = () => { const handleSearch = () => {
// //
handleFilter(); // handleFilter();
state.currentPage = 1
getPressReleasesDisplay()
// console.log(":", state.filterNewsData); // console.log(":", state.filterNewsData);
}; };
@ -149,10 +205,23 @@ const handleNewClick = (item) => {
router.push({ router.push({
path: "/news", path: "/news",
query: { query: {
date: item.date, id: item.id,
}, },
}); });
}; };
//
const doLoadMore = () => {
if (!state.hasMore || state.loading) {
return
}
// console.log('')
state.loading = true
state.currentPage++
getPressReleasesDisplay().finally(() => {
state.loading = false
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -1,56 +1,59 @@
<template> <template>
<div class="press-releases-page"> <div class="press-releases-page">
<main class="p-[35px] mx-auto" style="max-width: calc(100% - 100px)"> <n-infinite-scroll :distance="0" @load="doLoadMore">
<div class="title mb-[20px]"> <main class="p-[35px] mx-auto" style="max-width: calc(100% - 100px);">
{{ t("press_releases.title") }} <div class="title mb-[20px]">
</div> {{ t('press_releases.title') }}
<div class="search-container"> </div>
<n-select <div class="search-container">
:options="state.selectOptions" <n-select
v-model:value="state.selectedValue" :options="state.selectOptions"
class="search-select" v-model:value="state.selectedValue"
/> class="search-select"
<n-input />
v-model:value="state.inputValue" <n-input
type="text" v-model:value="state.inputValue"
:placeholder="t('press_releases.search.placeholder')" type="text"
class="search-input" :placeholder="t('press_releases.search.placeholder')"
/> class="search-input"
<n-button />
type="primary" <n-button
@click="handleSearch" type="primary"
class="search-button w-[120px]" @click="handleSearch"
> class="search-button w-[120px]"
{{ t("press_releases.search.button") }}
</n-button>
</div>
<div v-for="(item, idx) in state.filterNewsData" :key="idx">
<div class="news-item mt-[10px]">
<div class="news-item-date">{{ item.date }}</div>
<div
class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
> >
{{ item.title }} {{ t('press_releases.search.button') }}
</div> </n-button>
<div class="news-item-content"> </div>
{{ <div v-for="(item, idx) in state.filterNewsData" :key="idx">
item.content.length > 230 <div class="news-item mt-[10px]">
? item.content.substring(0, 230) + "..." <div class="news-item-date">{{ item.date }}</div>
: item.content <div
}} class="news-item-title text-[#0078d7] overflow-hidden whitespace-nowrap text-ellipsis cursor-pointer"
@click="handleNewClick(item)"
>
{{ item.title }}
</div>
<div class="news-item-content" style="word-break: break-all;">
{{
item.summary?.length > 199
? item.summary.substring(0, 199) + '...'
: item.summary
}}
</div>
</div> </div>
</div> </div>
</div> </main>
</main> </n-infinite-scroll>
</div> </div>
</template> </template>
<script setup> <script setup>
import customDefaultPage from "@/components/customDefaultPage/index.vue"; import customDefaultPage from "@/components/customDefaultPage/index.vue";
import { reactive, onMounted, watch } from "vue"; import { reactive, onMounted, watch } from "vue";
import { NSelect, NInput, NButton } from "naive-ui"; import { NSelect, NInput, NButton, NInfiniteScroll } from "naive-ui";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import axios from 'axios'
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
const router = useRouter(); const router = useRouter();
@ -90,12 +93,59 @@ const state = reactive({
}, },
], ],
filterNewsData: [], filterNewsData: [],
loading: false, //
hasMore: true, //
currentPage: 1, //
}); });
onMounted(() => { onMounted(() => {
state.filterNewsData = state.newsData; // state.filterNewsData = state.newsData;
getPressReleasesDisplay()
}); });
//
const getPressReleasesDisplay = () => {
let url = 'http://172.16.100.93:9020/api/fiee/pressreleases/display'
let params = {
query: state.inputValue,
page: state.currentPage,
pageSize: 10,
timeStart: state.selectedValue
? state.selectedValue === 'all_years'
? null
: new Date(state.selectedValue).getTime()
: null,
}
// console.log(params)
axios.post(url, params).then((res) => {
// console.log(res)
if (res.status === 200) {
if (res.data.status === 0) {
res.data.data?.data?.forEach((item) => {
item.date = new Date(item.createdAt).toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
year: 'numeric',
})
})
if (state.currentPage === 1) {
state.filterNewsData = res.data.data?.data || []
} else {
state.filterNewsData = [
...state.filterNewsData,
...(res.data.data?.data || []),
]
}
if (state.filterNewsData.length < (res.data.data?.total || 0)) {
state.hasMore = true
} else {
state.hasMore = false
}
}
}
})
}
const handleFilter = () => { const handleFilter = () => {
// //
let filteredData = [...state.newsData]; let filteredData = [...state.newsData];
@ -130,14 +180,17 @@ const handleFilter = () => {
watch( watch(
() => [state.selectedValue, state.inputValue], () => [state.selectedValue, state.inputValue],
() => { () => {
handleFilter(); // handleFilter();
}, state.currentPage = 1
{ immediate: true } getPressReleasesDisplay()
}
); );
const handleSearch = () => { const handleSearch = () => {
// //
handleFilter(); // handleFilter();
state.currentPage = 1
getPressReleasesDisplay()
// console.log(":", state.filterNewsData); // console.log(":", state.filterNewsData);
}; };
@ -145,15 +198,28 @@ const handleNewClick = (item) => {
router.push({ router.push({
path: "/news", path: "/news",
query: { query: {
date: item.date, id: item.id,
}, },
}); });
}; };
//
const doLoadMore = () => {
if (!state.hasMore || state.loading) {
return
}
// console.log('')
state.loading = true
state.currentPage++
getPressReleasesDisplay().finally(() => {
state.loading = false
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.title { .title {
font-size: 40px; font-size: 63px;
color: #333; color: #333;
} }