提交 58bf8b02 authored 作者: Your Name's avatar Your Name

fix(创新示范): 导航栏增加年度切换

上级 f71b7a56
...@@ -3,19 +3,7 @@ ...@@ -3,19 +3,7 @@
<div class="echarts-search"> <div class="echarts-search">
<div class="title">各市服务强军兴军创新指标情况</div> <div class="title">各市服务强军兴军创新指标情况</div>
<el-row class="" justify="space-between">
<div class="years" align="middle">
<span
v-for="(item, index) in years"
:key="item"
:class="{
active: index === curYearIndex,
}"
@click="yearHandle(index)"
>{{ item }}</span
>
</div>
</el-row>
</div> </div>
<div id="TargetBar" class="target-bar"></div> <div id="TargetBar" class="target-bar"></div>
...@@ -56,8 +44,6 @@ export default defineComponent({ ...@@ -56,8 +44,6 @@ export default defineComponent({
{ label: "规模以上企业收入及增长率", value: 3 }, { label: "规模以上企业收入及增长率", value: 3 },
{ label: "国防科工产值", value: 4 }, { label: "国防科工产值", value: 4 },
], ],
years: [2019, 2020, "2021上半"],
curYearIndex: 2,
mapEcharts: null, mapEcharts: null,
}; };
}, },
...@@ -116,9 +102,7 @@ export default defineComponent({ ...@@ -116,9 +102,7 @@ export default defineComponent({
mapEcharts.setOption(this.optionBar); mapEcharts.setOption(this.optionBar);
this.mapEcharts = mapEcharts; this.mapEcharts = mapEcharts;
}, },
yearHandle(index: number) {
this.curYearIndex = index;
},
}, },
unmounted() { unmounted() {
if (!this.mapEcharts) { if (!this.mapEcharts) {
...@@ -147,24 +131,7 @@ export default defineComponent({ ...@@ -147,24 +131,7 @@ export default defineComponent({
margin: 12px 0; margin: 12px 0;
font-size: 14px; font-size: 14px;
} }
.years {
display: flex;
align-items: center;
background: #f4f6f9;
border-radius: 5px;
overflow: hidden;
span {
padding: 0 12px;
height: 32px;
line-height: 32px;
font-size: 12px;
color: #333;
}
.active {
background-color: #4198ff;
color: #fff;
}
}
} }
.target-bar { .target-bar {
......
...@@ -3,29 +3,7 @@ ...@@ -3,29 +3,7 @@
<div class="echarts-search"> <div class="echarts-search">
<div class="title">各市产业融合创新指标情况</div> <div class="title">各市产业融合创新指标情况</div>
<el-row class="" justify="space-between">
<div class="years" align="middle">
<span
v-for="(item, index) in years"
:key="item"
:class="{
active: index === curYearIndex,
}"
@click="yearHandle(index)"
>{{ item }}</span
>
</div>
<!-- <el-select v-model="value" size="small" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> -->
</el-row>
</div> </div>
<div id="TargetBar" class="target-bar"></div> <div id="TargetBar" class="target-bar"></div>
...@@ -66,8 +44,7 @@ export default defineComponent({ ...@@ -66,8 +44,7 @@ export default defineComponent({
{ label: "规模以上企业收入及增长率", value: 3 }, { label: "规模以上企业收入及增长率", value: 3 },
{ label: "国防科工产值", value: 4 }, { label: "国防科工产值", value: 4 },
], ],
years: [2019, 2020, "2021上半"],
curYearIndex: 2,
mapEcharts: null, mapEcharts: null,
}; };
}, },
...@@ -129,9 +106,7 @@ export default defineComponent({ ...@@ -129,9 +106,7 @@ export default defineComponent({
mapEcharts.setOption(this.optionBar); mapEcharts.setOption(this.optionBar);
this.mapEcharts = mapEcharts; this.mapEcharts = mapEcharts;
}, },
yearHandle(index: number) {
this.curYearIndex = index;
},
}, },
unmounted() { unmounted() {
if (!this.mapEcharts) { if (!this.mapEcharts) {
...@@ -160,24 +135,7 @@ export default defineComponent({ ...@@ -160,24 +135,7 @@ export default defineComponent({
margin: 10px 0; margin: 10px 0;
font-size: 14px; font-size: 14px;
} }
.years {
display: flex;
align-items: center;
background: #f4f6f9;
border-radius: 5px;
overflow: hidden;
span {
padding: 0 12px;
height: 32px;
line-height: 32px;
font-size: 12px;
color: #333;
}
.active {
background-color: #4198ff;
color: #fff;
}
}
} }
.target-bar { .target-bar {
......
...@@ -3,19 +3,6 @@ ...@@ -3,19 +3,6 @@
<MapTitle text="军民协同创新总览" /> <MapTitle text="军民协同创新总览" />
<div class="describes"> <div class="describes">
<div class="text">各市军民协同创新指标情况</div> <div class="text">各市军民协同创新指标情况</div>
<el-row class="" justify="space-between">
<div class="years" align="middle">
<span
v-for="(item, index) in years"
:key="item"
:class="{
active: index === curYearIndex,
}"
@click="yearHandle(index)"
>{{ item }}</span
>
</div>
</el-row>
</div> </div>
<div id="synergyInnovation" class="line"></div> <div id="synergyInnovation" class="line"></div>
...@@ -52,8 +39,6 @@ export default defineComponent({ ...@@ -52,8 +39,6 @@ export default defineComponent({
setup() {}, setup() {},
data() { data() {
return { return {
years: [2019, 2020, "2021上半"],
curYearIndex: 2,
mapEcharts: null, mapEcharts: null,
}; };
}, },
...@@ -146,26 +131,7 @@ export default defineComponent({ ...@@ -146,26 +131,7 @@ export default defineComponent({
.describes { .describes {
margin: 0 10px 5px 0; margin: 0 10px 5px 0;
box-sizing: border-box; box-sizing: border-box;
.years {
margin-bottom: 15px;
display: flex;
align-items: center;
overflow: hidden;
span {
margin-right: 10px;
padding: 0 12px;
height: 32px;
line-height: 32px;
font-size: 12px;
color: #333;
background: #f4f6f9;
border-radius: 5px;
}
.active {
background-color: #4198ff;
color: #fff;
}
}
.text { .text {
color: #4198ff; color: #4198ff;
margin: 10px 0; margin: 10px 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论