Commit 91d13d3d by 潘际乾

首页

parent bea0a5dc
<template> <template>
<el-row v-on="$attrs" v-bind="$listeners"> <el-row v-bind="$attrs" v-on="$listeners">
<slot></slot> <slot></slot>
</el-row> </el-row>
</template> </template>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<span class="el-icon-more" title="操作"></span> <span class="el-icon-more" title="操作"></span>
</CellHeaderVue> </CellHeaderVue>
<el-scrollbar :style="{ height: scrollbarHeight + 'px' }"> <el-scrollbar :style="{ height: cellScrollHeight + 'px' }">
<div class="cell-content"> <div class="cell-content">
<div class="notice-item" v-for="(item, idx) in noticeList" :key="idx"> <div class="notice-item" v-for="(item, idx) in noticeList" :key="idx">
<div class="notice-title" :class="{ active: idx === 0 }"> <div class="notice-title" :class="{ active: idx === 0 }">
...@@ -34,11 +34,6 @@ export default { ...@@ -34,11 +34,6 @@ export default {
required: true, required: true,
}, },
}, },
computed: {
scrollbarHeight() {
return window.document.body.clientHeight - this.cellScrollHeight;
},
},
data() { data() {
return { return {
noticeList: [ noticeList: [
......
<template> <template>
<div class="home-cell" id="quickSearch"> <div class="home-cell" id="quickSearch">
<CellHeaderVue title="快速查询"> </CellHeaderVue> <CellHeaderVue title="快速查询"> </CellHeaderVue>
<el-scrollbar :style="{ height: scrollbarHeight + 'px' }"> <el-scrollbar :style="{ height: cellScrollHeight + 'px' }">
<div class="cell-content"> <div class="cell-content">
<div <div
class="content-wrapper" class="content-wrapper"
v-for="(item, index) in options" v-for="(item, index) in options"
:key="index" :key="index"
:style="{ height: Math.floor(scrollbarHeight * 0.3) + 'px' }" :style="{ height: Math.floor(cellScrollHeight * 0.3) + 'px' }"
> >
<div class="search-item-wrapper"> <div class="search-item-wrapper">
<div class="search-item"> <div class="search-item">
<!-- <i class="el-icon-set-up"></i> -->
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
...@@ -35,11 +34,6 @@ export default { ...@@ -35,11 +34,6 @@ export default {
required: true, required: true,
}, },
}, },
computed: {
scrollbarHeight() {
return window.document.body.clientHeight - this.cellScrollHeight;
},
},
data() { data() {
return { return {
options: [ options: [
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
<div class="home-cell" id="quickVisit"> <div class="home-cell" id="quickVisit">
<CellHeaderVue title="快速访问"> </CellHeaderVue> <CellHeaderVue title="快速访问"> </CellHeaderVue>
<el-scrollbar :style="{ height: scrollbarHeight + 'px' }"> <el-scrollbar :style="{ height: cellScrollHeight + 'px' }">
<div class="cell-content"> <div class="cell-content">
<div <div
class="content-wrapper" class="content-wrapper"
v-for="(item, index) in quickVisitItem" v-for="(item, index) in quickVisitItem"
:key="index" :key="index"
:style="{ height: Math.floor(scrollbarHeight * 0.3) + 'px' }" :style="{ height: Math.floor(cellScrollHeight * 0.3) + 'px' }"
> >
<div class="visit-item-wrapper"> <div class="visit-item-wrapper">
<div class="visit-item"> <div class="visit-item">
<!-- <i class="el-icon-set-up"></i> -->
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
...@@ -35,11 +34,6 @@ export default { ...@@ -35,11 +34,6 @@ export default {
required: true, required: true,
}, },
}, },
computed: {
scrollbarHeight() {
return window.document.body.clientHeight - this.cellScrollHeight;
},
},
data() { data() {
return { return {
quickVisitItem: [ quickVisitItem: [
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="eContainer-home"> <div class="eContainer-home">
<QuickVisitVue :cellScrollHeight="cellScrollHeight"></QuickVisitVue> <QuickVisitVue :cellScrollHeight="cellScrollHeight"></QuickVisitVue>
<TaskStatisticsVue></TaskStatisticsVue> <TaskStatisticsVue></TaskStatisticsVue>
<NoticeAnnouncementVue :cellScrollHeight="cellScrollHeight"></NoticeAnnouncementVue> <NoticeAnnouncementVue :cellScrollHeight="cellScrollHeight" ></NoticeAnnouncementVue>
<HallVue></HallVue> <HallVue></HallVue>
<CustomerAnalyseVue></CustomerAnalyseVue> <CustomerAnalyseVue></CustomerAnalyseVue>
<QuickSearchVue :cellScrollHeight="cellScrollHeight"></QuickSearchVue> <QuickSearchVue :cellScrollHeight="cellScrollHeight"></QuickSearchVue>
...@@ -27,24 +27,24 @@ export default { ...@@ -27,24 +27,24 @@ export default {
CustomerAnalyseVue, CustomerAnalyseVue,
QuickSearchVue, QuickSearchVue,
}, },
created() { mounted() {
this.calcCellScrollHeight(); this.calcCellScrollHeight();
this.calcCellScrollHeightBind = this.calcCellScrollHeight.bind(this) this.calcCellScrollHeightBind = this.calcCellScrollHeight.bind(this);
window.addEventListener("resize", this.calcCellScrollHeightBind) window.addEventListener("resize", this.calcCellScrollHeightBind);
}, },
data() { data() {
return { return {
cellScrollHeight: null, cellScrollHeight: 0,
}; };
}, },
methods: { methods: {
calcCellScrollHeight() { calcCellScrollHeight() {
this.cellScrollHeight = window.document.body.clientHeight - (window.document.body.clientHeight - 110 - 52 * 2 - 10) / 2; this.cellScrollHeight = this.$el.clientHeight * 0.49 - 52;
} },
}, },
destroyed() { destroyed() {
window.removeEventListener("resize", this.calcCellScrollHeightBind) window.removeEventListener("resize", this.calcCellScrollHeightBind);
} },
}; };
</script> </script>
...@@ -70,8 +70,8 @@ export default { ...@@ -70,8 +70,8 @@ export default {
height: calc(100% - 52px); height: calc(100% - 52px);
overflow: auto; overflow: auto;
} }
.home-cell >>> .el-scrollbar__wrap{ .home-cell >>> .el-scrollbar__wrap {
overflow-y: scroll; overflow-y: scroll;
overflow-x: auto; overflow-x: auto;
} }
</style> </style>
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
<style scoped> <style scoped>
.eContainer-taskList { .eContainer-taskList {
padding: 3px 15px; /* padding: 3px 15px; */
} }
</style> </style>
<style> <style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment