diff --git a/front/src/main.js b/front/src/main.js index 8cd80605..a24e5800 100644 --- a/front/src/main.js +++ b/front/src/main.js @@ -51,3 +51,9 @@ router.beforeEach((to, from, next) => { document.body.scrollTop = 0 next() }) +// 解决bug:页面/路由跳转后,滚动条消失,页面无法滚动 +router.afterEach((to, from, next) => { + document + .querySelector('body') + .setAttribute('style', 'overflow: auto !important;') +}) diff --git a/front/src/views/capabilityCloud/components/ComponentServices.vue b/front/src/views/capabilityCloud/components/ComponentServices.vue index 2c6dc034..ae100a9f 100644 --- a/front/src/views/capabilityCloud/components/ComponentServices.vue +++ b/front/src/views/capabilityCloud/components/ComponentServices.vue @@ -174,7 +174,7 @@ } else { for (let i = 0; i < 31; i++) { let time = moment() - .subtract('days', 30 - i) + .subtract('days', 29 - i) .format('MM-DD') callTheTrendData.value.time.push(time) console.log('time', callTheTrendData.value, name) @@ -186,14 +186,23 @@ if (!xinhaianIsShow) { callTheTrendPort(start, end, 86400).then((res) => { if (res.data.data.result) { - // res.data.data.result.splice(0, 1) callTheTrendData.value.snum = [] res.data.data.result[0].values.map((item) => { - callTheTrendData.value.snum.push( - moment(item[0] * 1000).format('MM-DD') - ) callTheTrendData.value.snum.push(parseInt(item[1])) }) + if (res.data.data.result[0].values.length < 30) { + for ( + let i = 0; + i < 30 - res.data.data.result[0].values.length; + i++ + ) { + callTheTrendData.value.snum.push(0) + } + } + console.log( + 'callTheTrendData.value.snum', + callTheTrendData.value.snum + ) callTheTrend(callTheTrendData.value) } else { for (let i = 0; i < 30; i++) { diff --git a/front/src/views/home/AbilityToApplyFor.vue b/front/src/views/home/AbilityToApplyFor.vue index 84b73888..57d4eabf 100644 --- a/front/src/views/home/AbilityToApplyFor.vue +++ b/front/src/views/home/AbilityToApplyFor.vue @@ -5,47 +5,44 @@ 展开 收起 -
+
{{ item.deptName }}
+ + + + +