Commit ea4049f4 by yuwei

项目初始化

parent 36c153b5
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
</div> </div>
</div> </div>
<chart-panel v-if="getChartItem(item.i).visible" :key="item.i" :ref="`charts${item.i}`" :chart-schema="getChartItem(item.i).chartConfig" :chart-data="getChartItem(item.i).data" :chart-style="{height: `${item.h * 30 + 10 * (item.h - 1) - 60}px`}" /> <chart-panel v-if="getChartItem(item.i).visible" :key="item.i" :ref="`charts${item.i}`" :chart-schema="getChartItem(item.i).chartConfig" :chart-data="getChartItem(item.i).data" :chart-style="{height: `${item.h * 30 + 10 * (item.h - 1) - 60}px`}" />
<div v-else :style="{height: `${item.h * 30 + 10 * (item.h - 1) - 60}px`}"></div>
</el-card> </el-card>
</grid-item> </grid-item>
</grid-layout> </grid-layout>
...@@ -219,7 +220,9 @@ export default { ...@@ -219,7 +220,9 @@ export default {
window.close() window.close()
}, },
handleResize(i, newH, newW, newHPx, newWPx) { handleResize(i, newH, newW, newHPx, newWPx) {
if (this.charts.find(chart => chart.id === i).visible) {
this.$refs[`charts${i}`][0].$children[0].$emit('resized') this.$refs[`charts${i}`][0].$children[0].$emit('resized')
}
}, },
generatorImage() { generatorImage() {
html2canvas(document.getElementById('boardWrapper')).then(canvas => { html2canvas(document.getElementById('boardWrapper')).then(canvas => {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-row> </el-row>
<el-divider /> <el-divider />
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6" class="box-card-col">
<el-card :body-style="{ padding: '0px' }" class="box-card-item"> <el-card :body-style="{ padding: '0px' }" class="box-card-item">
<div class="box-card-item-add" @click="handleAdd"> <div class="box-card-item-add" @click="handleAdd">
<div class="icon-block"> <div class="icon-block">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<el-col v-for="(item, index) in tableDataList" :key="item.id" :span="6"> <el-col v-for="(item, index) in tableDataList" :key="item.id" :span="6" class="box-card-col">
<el-card :body-style="{ padding: '0px' }" class="box-card-item"> <el-card :body-style="{ padding: '0px' }" class="box-card-item">
<div class="box-card-item-body" @mouseenter="mouseEnter(item)" @mouseleave="mouseLeave(item)"> <div class="box-card-item-body" @mouseenter="mouseEnter(item)" @mouseleave="mouseLeave(item)">
<el-image :src="item.boardThumbnail ? item.boardThumbnail : ''"> <el-image :src="item.boardThumbnail ? item.boardThumbnail : ''">
...@@ -160,10 +160,16 @@ export default { ...@@ -160,10 +160,16 @@ export default {
.el-pagination { .el-pagination {
text-align: center; text-align: center;
} }
.box-card-item { .box-card-col {
width: 260px;
height: 185px;
padding-left: 0px;
padding-right: 0px;
margin-right: 10px;
margin-bottom: 10px;
.box-card-item {
width: 260px; width: 260px;
height: 185px; height: 185px;
margin-bottom: 20px;
.box-card-item-body { .box-card-item-body {
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -221,5 +227,6 @@ export default { ...@@ -221,5 +227,6 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
}
} }
</style> </style>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
</div> </div>
</div> </div>
<chart-panel v-if="getChartItem(item.i).visible" :key="item.i" :ref="`charts${item.i}`" :chart-schema="getChartItem(item.i).chartConfig" :chart-data="getChartItem(item.i).data" :chart-style="{height: `${item.h * 30 + 10 * (item.h - 1) - 60}px`}" /> <chart-panel v-if="getChartItem(item.i).visible" :key="item.i" :ref="`charts${item.i}`" :chart-schema="getChartItem(item.i).chartConfig" :chart-data="getChartItem(item.i).data" :chart-style="{height: `${item.h * 30 + 10 * (item.h - 1) - 60}px`}" />
<div v-else :style="{height: `${item.h * 30 + 10 * (item.h - 1) - 60}px`}"></div>
</el-card> </el-card>
</grid-item> </grid-item>
</grid-layout> </grid-layout>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-row> </el-row>
<el-divider /> <el-divider />
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col class="box-card-col">
<el-card :body-style="{ padding: '0px' }" class="box-card-item"> <el-card :body-style="{ padding: '0px' }" class="box-card-item">
<div class="box-card-item-add" @click="handleAdd"> <div class="box-card-item-add" @click="handleAdd">
<div class="icon-block"> <div class="icon-block">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<el-col v-for="(item, index) in tableDataList" :key="item.id" :span="6"> <el-col v-for="(item, index) in tableDataList" :key="item.id" class="box-card-col">
<el-card :body-style="{ padding: '0px' }" class="box-card-item"> <el-card :body-style="{ padding: '0px' }" class="box-card-item">
<div class="box-card-item-body" @mouseenter="mouseEnter(item)" @mouseleave="mouseLeave(item)"> <div class="box-card-item-body" @mouseenter="mouseEnter(item)" @mouseleave="mouseLeave(item)">
<el-image :src="item.chartThumbnail ? item.chartThumbnail : ''"> <el-image :src="item.chartThumbnail ? item.chartThumbnail : ''">
...@@ -155,10 +155,16 @@ export default { ...@@ -155,10 +155,16 @@ export default {
.el-pagination { .el-pagination {
text-align: center; text-align: center;
} }
.box-card-item { .box-card-col {
width: 260px;
height: 185px;
padding-left: 0px;
padding-right: 0px;
margin-right: 10px;
margin-bottom: 10px;
.box-card-item {
width: 260px; width: 260px;
height: 185px; height: 185px;
margin-bottom: 20px;
.box-card-item-body { .box-card-item-body {
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -216,5 +222,6 @@ export default { ...@@ -216,5 +222,6 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
}
} }
</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