Commit 0dfadf5d authored by W_Y's avatar W_Y

parent c3e65853
...@@ -82,11 +82,12 @@ ...@@ -82,11 +82,12 @@
<!-- 访客数据--> <!-- 访客数据-->
<div class="controlPlatform-footer"> <div class="controlPlatform-footer">
<el-row :gutter="10"> <el-row :gutter="10">
<!-- 库类型饼图 -->
<el-col :span="12"> <el-col :span="12">
<el-card style="height: 393px"> <el-card style="height: 393px">
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<div class="controlSpan_middle"> <div class="controlSpan_middle">
访客数据(今日) 库类型占比
</div> </div>
</div> </div>
<el-divider class="chosenOne-divider"/> <el-divider class="chosenOne-divider"/>
...@@ -95,16 +96,17 @@ ...@@ -95,16 +96,17 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<!-- 入库时间饼图 -->
<el-col :span="12"> <el-col :span="12">
<el-card style="height: 393px"> <el-card style="height: 393px">
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<div class="controlSpan_middle1"> <div class="controlSpan_middle">
访客数据(今日) 入库时间
</div> </div>
</div> </div>
<el-divider class="chosenOne-divider1"/> <el-divider class="chosenOne-divider"/>
<div id="echarts-visitor1" class="span_1" style="margin-top: -20px"> <div id="echarts-date" class="span_1" style="margin-top: -20px">
<div id="dataCharts_visitor1" ref="chart_data" style="height: 350px"/> <div id="dataCharts_date" ref="chart_data1" style="height: 350px"/>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
...@@ -113,6 +115,7 @@ ...@@ -113,6 +115,7 @@
<!-- 数据统计--> <!-- 数据统计-->
<div class="controlPlatform-body"> <div class="controlPlatform-body">
<el-row :gutter="10" style="margin-bottom: 10px"> <el-row :gutter="10" style="margin-bottom: 10px">
<!-- 折线图-->
<el-col :span="16"> <el-col :span="16">
<el-card> <el-card>
<el-row> <el-row>
...@@ -129,6 +132,7 @@ ...@@ -129,6 +132,7 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<!-- 柱状图-->
<el-col :span="8"> <el-col :span="8">
<el-card> <el-card>
<el-row> <el-row>
...@@ -167,6 +171,8 @@ export default { ...@@ -167,6 +171,8 @@ export default {
myChartAverage: undefined, myChartAverage: undefined,
// 饼图1 // 饼图1
myChartGender: undefined, myChartGender: undefined,
// 事件饼图
myChartGender1: undefined,
stopTimer: false, stopTimer: false,
sumUpdateList: [], sumUpdateList: [],
dataList: [], dataList: [],
...@@ -300,6 +306,16 @@ export default { ...@@ -300,6 +306,16 @@ export default {
echarts.init(document.getElementById('dataCharts_visitor')).resize() echarts.init(document.getElementById('dataCharts_visitor')).resize()
}) })
}) })
erd.listenTo(document.getElementById('echarts-date'), function(element) {
var width = element.offsetWidth
var height = element.offsetHeight
self.tableHeight = height // 将监听到的宽高进行赋值
self.tableWidth = width
that.$nextTick(function() {
// 使echarts尺寸重置
echarts.init(document.getElementById('dataCharts_date')).resize()
})
})
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
setTimeout(() => { setTimeout(() => {
...@@ -573,10 +589,10 @@ export default { ...@@ -573,10 +589,10 @@ export default {
} }
this.myChartGender.setOption(optionEnter) this.myChartGender.setOption(optionEnter)
}, },
/** 访客数据(饼状图)1 /** 时间(饼状图)1
* */ * */
getVisitorData1() { getVisitorData1() {
this.myChartGender = echarts.init(document.getElementById('dataCharts_visitor1')) this.myChartGender1 = echarts.init(document.getElementById('dataCharts_date'))
this.updateVisitorData1() this.updateVisitorData1()
}, },
updateVisitorData1() { updateVisitorData1() {
...@@ -619,7 +635,7 @@ export default { ...@@ -619,7 +635,7 @@ export default {
} }
] ]
} }
this.myChartGender.setOption(optionEnter) this.myChartGender1.setOption(optionEnter)
} }
} }
} }
...@@ -636,6 +652,7 @@ export default { ...@@ -636,6 +652,7 @@ export default {
} }
.controlPlatform-footer { .controlPlatform-footer {
margin-top: 10px !important;
.end_title { .end_title {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
...@@ -653,6 +670,10 @@ export default { ...@@ -653,6 +670,10 @@ export default {
margin-bottom: 0; margin-bottom: 0;
} }
.chosenOne-divider1 {
margin-bottom: 0;
}
.controlPlatform-top { .controlPlatform-top {
margin-top: 10px; margin-top: 10px;
......
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