diff --git a/package.json b/package.json index f73c457..9f3b2dd 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "echarts": "^5.4.3", "echarts-liquidfill": "^3.1.0", "element-plus": "^2.6.2", + "lodash-es": "^4.17.21", "lottie-web": "^5.12.2", "naive-ui": "^2.34.4", "pinia": "^2.0.32", diff --git a/src/api/daikin/base.ts b/src/api/daikin/base.ts index 011fade..a5022ba 100755 --- a/src/api/daikin/base.ts +++ b/src/api/daikin/base.ts @@ -1246,6 +1246,14 @@ export async function getPieChartData(params: any) { export async function getDepartChart(params: any) { return http.get(`/moduleStat/getDepartChart`, { params }) } +// 内部访问人数 +export async function fetchInsideToday(params: any) { + return http.get(`/moduleStat/getToDayVisitList`, { params }) +} +// 更新数量专项统计列表 +export async function fetchModuleList(params: any) { + return http.get(`/app/moduleList`, { params }) +} /** * csr供应商月份列表 https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=5e2e22e5-fab5-4c46-8a93-8f0c3a3675cb diff --git a/src/assets/images/jjllt-1.jpg b/src/assets/images/jjllt-1.jpg new file mode 100644 index 0000000..a34deae Binary files /dev/null and b/src/assets/images/jjllt-1.jpg differ diff --git a/src/assets/images/jjllt-right.jpg b/src/assets/images/jjllt-right.jpg new file mode 100644 index 0000000..e3a7ffc Binary files /dev/null and b/src/assets/images/jjllt-right.jpg differ diff --git a/src/assets/images/jjllt.jpg b/src/assets/images/jjllt.jpg index a34deae..4a58083 100644 Binary files a/src/assets/images/jjllt.jpg and b/src/assets/images/jjllt.jpg differ diff --git a/src/router/index.ts b/src/router/index.ts index 0a69ba8..b158c58 100755 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -129,7 +129,7 @@ const router = createRouter({ { path: '/Home/latest', name: 'Latest', - meta: { title: '最新更新列表' }, + meta: { title: '最进更新列表' }, component: () => import('@/views/home/news/news.vue') }, // 搜索 diff --git a/src/views/home/components/New.vue b/src/views/home/components/New.vue index bc9e226..98e593e 100755 --- a/src/views/home/components/New.vue +++ b/src/views/home/components/New.vue @@ -22,14 +22,14 @@ async function getPageList() { // console.log(rows) // for (let index = 0; index < 50; index++) { listData.value = rows - // } console.log(listData.value.length) } const fetchNewDataList = async () => { - const res = await newDataList({ pageNum: 1, pageSize: 10 }) - const data = groupDatesByWeek(res.rows || []) + const res = await newDataList({ pageNum: 1, pageSize: 8 }) + // const data = groupDatesByWeek(res.rows || []) + const data = res.rows || [] newsData.value = data firstItem.value = Object.keys(data)[0] } @@ -67,11 +67,50 @@ const toDetail2 = (n: any) => { console.log(n) if (n.id === 0) return if (n.isSelect === 1) { + if (n.moduleCode === 'App_Database') { + return push('/DataBase?id=' + n.cateId) + } + if (n.moduleCode === 'App_Article') { + return push('/Home/intelligence/' + n.id) + } push(`/intelligence/${n.type == 2 ? 'within' : 'outside'}/` + n.id) } else { message.error('没有访问权限') } } + +const downloads = (data: any = {}) => { + const { fileCommon, filePath } = data + if ((fileCommon?.fileSize || 0) > 25 * 1024 * 1024) { + message.info('正在下载中,请稍等~') + downloadFile(filePath) + return + } + if (filePath) { + window.open(filePath, '_blank') + } else { + message.info('没有可预览文件!') + } +} +function downloadFile(url: any) { + fetch(url) + .then((response) => response.blob()) + .then((blob) => { + const downloadUrl = URL.createObjectURL(blob) + const link = document.createElement('a') + link.href = downloadUrl + link.download = getFileNameFromUrl(url) + link.click() + }) +} +function getFileNameFromUrl(url: string) { + const lastSlashIndex = url.lastIndexOf('/') + if (lastSlashIndex !== -1) { + return url.substring(lastSlashIndex + 1) + } else { + return 'Invalid URL' + } +} const modules = [Autoplay, Pagination, Navigation, A11y] const files = ref({}) @@ -105,7 +144,7 @@ fetchNewDataList() :class="[{ 'text-#fff': curTab == 1 }]" @click="curTab = 0" > - 最新更新 + 最近更新
@@ -168,32 +207,33 @@ fetchNewDataList() style="height: 280px" > --> -
-
-
- {{ index }} +
+ +
+
+ {{ index }} 更多
- +
+
+ + + + + + +
+
+ +
+
+
@@ -905,10 +991,10 @@ getdeptTree() height: '60px' }" > - -