diff --git a/src/api/library.js b/src/api/library.js index e24d867..2dfc318 100644 --- a/src/api/library.js +++ b/src/api/library.js @@ -163,6 +163,24 @@ export function FetchInitIntoNum(params) { }) } +// 获取本年四个季度的数据 +export function FetchQuarterJH(params) { + return request({ + url: '/qyzt/getQuarterJH' + '?' + qs.stringify(params, { indices: false }), + method: 'get', + urlType: 'local' + }) +} + +// 今年每个月的 +export function FetchMonthJH(params) { + return request({ + url: '/qyzt/getMonthJH' + '?' + qs.stringify(params, { indices: false }), + method: 'get', + urlType: 'local' + }) +} + export default { FetchInitToken, FetchLibBookTotal, @@ -181,5 +199,7 @@ export default { FetchTotalResource, FetchTodayJH, FetchWeekJH, - FetchInitIntoNum + FetchInitIntoNum, + FetchQuarterJH, + FetchMonthJH } diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 8b36524..de74ac5 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -1024,9 +1024,12 @@ padding-left: .35rem; margin-top: 0; line-height: 0; - background: url('~@/assets/images/title-middle.png') no-repeat left top; + background: url('~@/assets/images/title-middle.png') no-repeat left bottom; background-size: cover; font-weight: bold; + &.big-title{ + padding-bottom: .45rem; + } } } } diff --git a/src/components/echart/lineChart.vue b/src/components/echart/lineChart.vue index 08dd8c9..0e725db 100644 --- a/src/components/echart/lineChart.vue +++ b/src/components/echart/lineChart.vue @@ -34,7 +34,7 @@ export default { watch: { chartDayData: { deep: true, - mmediate: true, + immediate: true, handler(val) { setTimeout(() => { this.initChart() diff --git a/src/components/echart/lineChartMonth.vue b/src/components/echart/lineChartMonth.vue new file mode 100644 index 0000000..b2831d4 --- /dev/null +++ b/src/components/echart/lineChartMonth.vue @@ -0,0 +1,221 @@ + + + diff --git a/src/components/echart/lineChartQuarter.vue b/src/components/echart/lineChartQuarter.vue new file mode 100644 index 0000000..7ec9386 --- /dev/null +++ b/src/components/echart/lineChartQuarter.vue @@ -0,0 +1,267 @@ + + + diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 0e7fa9d..40f4fca 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -3,7 +3,7 @@
-
{{ libCurrent && libCurrent.name }}
+
{{ libCurrent && libCurrent.name }}
@@ -350,27 +350,38 @@ export default { 'DWSF': [114.664064, 30.478882], 'ZJWSF': [114.635376, 30.532215] } + console.log('this.libALLNum', this.libALLNum) + + const nameToLibcodeMap = { + '葛店城市书房·大湾分馆': 'DWSF', + '葛店城市书房·张家湾分馆': 'ZJWSF' + } + const libcodeToGclMap = { + 'DWSF': 9145, // 大湾分馆 + 'ZJWSF': 5582 // 张家湾分馆 + } + // const allowedLibcodes = ['DWSF', 'ZJWSF'] + const updatedLibraries = result.map(library => { - const matchingData = this.libALLNum.find(item => item.LIBCODE === library.tcId) - console.log('matchingData', matchingData) + console.log('', library) + // 通过图书馆名称获取对应的LIBCODE + const currentLibcode = nameToLibcodeMap[library.name] || '' + // 根据LIBCODE获取对应的GCL值 + const currentGcl = libcodeToGclMap[currentLibcode] || 10000 + + // 保留原有的countCard逻辑 const gdData = this.libALLNum.find(item => item.LIBCODE === 'GD') - if (matchingData) { - return { - ...library, - GCL: matchingData.GCL, - sort: Object.keys(libCode).indexOf(library.tcId) + 1, - coordinate: libCode[library.tcId], - countCard: matchingData.countCard ? matchingData.countCard : 0 - } - } else { - return { - ...library, - GCL: 10000, - sort: Object.keys(libCode).indexOf(library.tcId) + 1, - coordinate: libCode[library.tcId], - countCard: gdData?.countCard || 0 + // 根据当前LIBCODE获取排序值 + const sortIndex = Object.keys(libCode).indexOf(currentLibcode) + const sortValue = sortIndex > -1 ? sortIndex + 1 : 99 - } + return { + ...library, + GCL: currentGcl, // 按名称区分的GCL值 + // 直接使用result原始数据中的occupationArea,不再自定义覆盖 + sort: sortValue, // 按LIBCODE排序 + coordinate: libCode[currentLibcode] || [0, 0], // 匹配不到坐标时给默认值 + countCard: gdData?.countCard || 0 } }).sort((a, b) => a.sort - b.sort) diff --git a/src/views/pageOne/index.vue b/src/views/pageOne/index.vue index 0935681..9967b8c 100644 --- a/src/views/pageOne/index.vue +++ b/src/views/pageOne/index.vue @@ -1,6 +1,6 @@