2024-02-26 17:16:31 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="header">
|
|
|
|
|
|
<div class="leftheader">
|
|
|
|
|
|
<div class="item" v-for="(item, index) in categorylist" :key="item.id" @click="clickcategory(item, index)"
|
|
|
|
|
|
:class="index == categoryindex ? 'selectitem' : ''">
|
|
|
|
|
|
<div class="name">
|
|
|
|
|
|
{{ item.title }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="rightheader">
|
2024-02-26 17:27:52 +08:00
|
|
|
|
<div id="main"></div>
|
2024-02-26 17:16:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import * as echarts from 'echarts';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
2024-02-28 17:17:16 +08:00
|
|
|
|
name: "indicatorMonitoring",
|
2024-02-26 17:16:31 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
//左侧类型选中
|
|
|
|
|
|
categoryindex: 0,
|
|
|
|
|
|
//左侧选中的item
|
|
|
|
|
|
categoryItem: {},
|
|
|
|
|
|
//左侧list
|
|
|
|
|
|
categorylist: [{
|
|
|
|
|
|
id: 1,
|
|
|
|
|
|
title: '冠状动脉粥样硬化性心脏病',
|
|
|
|
|
|
}, {
|
|
|
|
|
|
id: 2,
|
|
|
|
|
|
title: '冠状动脉粥样硬化性心脏病冠状动脉粥样硬化性心脏病',
|
|
|
|
|
|
}]
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
this.categoryItem = this.categorylist[0]
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
this.info();
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
clickcategory(item, index) {
|
|
|
|
|
|
this.categoryindex = index
|
|
|
|
|
|
this.categoryItem = item
|
|
|
|
|
|
},
|
|
|
|
|
|
info() {
|
|
|
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
|
|
|
|
var myChart = echarts.init(document.getElementById('main'));
|
|
|
|
|
|
// 绘制图表
|
|
|
|
|
|
myChart.setOption({
|
|
|
|
|
|
title: {
|
2024-02-26 17:27:52 +08:00
|
|
|
|
text: '运动监测'
|
2024-02-26 17:16:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
tooltip: {},
|
|
|
|
|
|
xAxis: {
|
2024-02-26 17:27:52 +08:00
|
|
|
|
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子', '衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
|
2024-02-26 17:16:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
yAxis: {},
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '销量',
|
|
|
|
|
|
type: 'bar',
|
2024-02-26 17:27:52 +08:00
|
|
|
|
data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 20]
|
2024-02-26 17:16:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.header {
|
|
|
|
|
|
background-color: #fff !important;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
|
|
.rightheader {
|
|
|
|
|
|
width: 75%;
|
|
|
|
|
|
padding-top: 20px;
|
|
|
|
|
|
border-left: 3px solid #DFE4ED;
|
|
|
|
|
|
|
2024-02-26 17:27:52 +08:00
|
|
|
|
#main {
|
|
|
|
|
|
width: 1000px;
|
2024-02-26 17:16:31 +08:00
|
|
|
|
height: 450px;
|
2024-02-26 17:27:52 +08:00
|
|
|
|
margin: 0 auto;
|
2024-02-26 17:16:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.leftheader {
|
|
|
|
|
|
width: 20%;
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
height: 450px;
|
|
|
|
|
|
overflow: scroll;
|
|
|
|
|
|
// 隐藏表头的滚动条
|
|
|
|
|
|
overflow-x: hidden !important;
|
|
|
|
|
|
|
|
|
|
|
|
.selectitem {
|
|
|
|
|
|
background-color: #D2E9FC;
|
|
|
|
|
|
border-left: 2px solid #1890ff !important;
|
|
|
|
|
|
border-bottom: 1px solid #fff !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.item {
|
|
|
|
|
|
padding: 25px 10px;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
border-left: 2px solid #fff;
|
|
|
|
|
|
border-bottom: 1px solid #E7E7E7;
|
|
|
|
|
|
|
|
|
|
|
|
.name {
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|