From 466f72cecc8ad08381275cefad96b8bf4615fcba Mon Sep 17 00:00:00 2001
From: xuhuajiao <13476289682@163.com>
Date: Fri, 12 Jul 2024 17:29:49 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9B=B4=E6=96=B0=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 3 +-
src/api/library.js | 20 ++++
src/components/echart/barEcharts.vue | 35 +++----
src/components/echart/lineChart.vue | 39 ++++----
src/components/echart/todayCircle.vue | 19 ++--
src/views/index.vue | 37 +++++--
src/views/map/index.vue | 89 ++++++++++-------
src/views/pageFour/index.vue | 9 ++
src/views/pageOne/index.vue | 139 ++++++++++++++------------
src/views/pageThree/index.vue | 126 +++++++++++++++--------
10 files changed, 309 insertions(+), 207 deletions(-)
diff --git a/.env.development b/.env.development
index 30c4513..dc5141a 100644
--- a/.env.development
+++ b/.env.development
@@ -3,7 +3,8 @@ ENV = 'development'
# 接口地址
# 许镇-本地服地址
-VUE_APP_BASE_API = 'http://192.168.99.67:8080'
+# VUE_APP_BASE_API = 'http://192.168.99.67:8080'
+VUE_APP_BASE_API = 'http://27.19.209.92:13244'
VUE_APP_LIB_API = 'http://118.253.150.248:8099'
# 是否启用 babel-plugin-dynamic-import-node插件
diff --git a/src/api/library.js b/src/api/library.js
index 4bebe9c..c3cdc47 100644
--- a/src/api/library.js
+++ b/src/api/library.js
@@ -64,6 +64,15 @@ export function FetchNewBook(params) {
})
}
+// 通过isbn获取图书详细信息
+export function FetchMarcByISBN(params) {
+ return request({
+ url: '/qyzt/marcByISBN' + '?' + qs.stringify(params, { indices: false }),
+ method: 'get',
+ urlType: 'local'
+ })
+}
+
// page2 获取分馆显示内容
export function FetchLibcodeDetails(params) {
return request({
@@ -73,6 +82,15 @@ export function FetchLibcodeDetails(params) {
})
}
+// 获取分馆图片资料
+export function FetchLibcodeResouceDetails(params) {
+ return request({
+ url: '/qyzt/getLibcodeResouceDetails' + '?' + qs.stringify(params, { indices: false }),
+ method: 'get',
+ urlType: 'local'
+ })
+}
+
// page2 读者借阅排行榜
export function FetchReadRanking(params) {
return request({
@@ -135,8 +153,10 @@ export default {
FetchInitSetting,
FetchHotSearch,
FetchNewBook,
+ FetchMarcByISBN,
FetchReadRanking,
FetchLibcodeDetails,
+ FetchLibcodeResouceDetails,
FetchNoticeList,
FetchSync36,
FetchTotalResource,
diff --git a/src/components/echart/barEcharts.vue b/src/components/echart/barEcharts.vue
index 2c1f4a4..cf6d714 100644
--- a/src/components/echart/barEcharts.vue
+++ b/src/components/echart/barEcharts.vue
@@ -152,29 +152,17 @@ export default {
name: {}
}
}
- // // 获取当前日期
- // var today = new Date()
- // // 获取当前周的第一天(如果周一为开始)
- // var startDayOfWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() - today.getDay() + 1)
- // // 创建一个日期数组,包含当天和接下来六天的日期
- // var xAxisData = []
- // for (var i = 0; i < 7; i++) {
- // xAxisData.push(new Date(startDayOfWeek.getFullYear(), startDayOfWeek.getMonth(), startDayOfWeek.getDate() + i).toLocaleDateString())
- // }
- // 计算日期数组的函数
- function getLastWeekDates() {
- var dates = []
- var today = new Date()
- for (var i = 0; i < 7; i++) {
- var day = new Date(today - i * 24 * 60 * 60 * 1000)
- var dayOfWeek = day.getDay()
- if (dayOfWeek === 0) {
- day.setTime(day.getTime() - 5 * 24 * 60 * 60 * 1000)
- }
- dates.unshift(day.toLocaleDateString())
- }
- return dates
+ // 获取当前日期
+ var today = new Date()
+ // 计算一周前的日期
+ var oneWeekAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
+
+ // 创建X轴的数据(使用过去一周的日期)
+ var xAxisData = []
+ for (var i = 0; i < 7; i++) {
+ var day = new Date(oneWeekAgo.getTime() + (i * 24 * 60 * 60 * 1000))
+ xAxisData.push(echarts.format.formatTime('yyyy-MM-dd', day))
}
option = {
@@ -223,7 +211,7 @@ export default {
xAxis: [{
type: 'category',
axisTick: { show: false },
- data: getLastWeekDates(),
+ data: this.chartWeeklyData.date,
axisLine: { // 轴线的颜色以及宽度
lineStyle: {
color: '#113D72'
@@ -231,6 +219,7 @@ export default {
},
axisLabel: { // x轴文字的配置
show: true,
+ interval: 0,
textStyle: {
color: '#79B8FF',
fontSize: 16,
diff --git a/src/components/echart/lineChart.vue b/src/components/echart/lineChart.vue
index 5e83618..d8246cf 100644
--- a/src/components/echart/lineChart.vue
+++ b/src/components/echart/lineChart.vue
@@ -1,5 +1,5 @@
-
+