|
@@ -128,14 +128,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tubiao" id="echarts">
|
|
|
- <el-switch
|
|
|
- v-model="ratioShow"
|
|
|
- inactive-text="比例"
|
|
|
- :width="26"
|
|
|
- style="margin-left: 24px"
|
|
|
- @change="changeratioShow"
|
|
|
- >
|
|
|
- </el-switch>
|
|
|
+ <template v-if="chartIndex != 3">
|
|
|
+ <el-switch
|
|
|
+ v-model="ratioShow"
|
|
|
+ inactive-text="比例"
|
|
|
+ :width="26"
|
|
|
+ style="margin-left: 24px"
|
|
|
+ @change="changeratioShow"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+
|
|
|
<div id="main_echarts" class="main_echarts"></div>
|
|
|
<div class="cut_download">
|
|
|
<span
|
|
@@ -953,6 +956,13 @@ export default {
|
|
|
axisPointer: {
|
|
|
type: "shadow",
|
|
|
},
|
|
|
+ formatter: function (params) {
|
|
|
+ if (that.ratioShow) {
|
|
|
+ return `${params[0].name} ${params[0].value}%`;
|
|
|
+ } else {
|
|
|
+ return `${params[0].name} ${params[0].value}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
@@ -999,6 +1009,13 @@ export default {
|
|
|
option = {
|
|
|
tooltip: {
|
|
|
trigger: "axis",
|
|
|
+ formatter: function (params) {
|
|
|
+ if (that.ratioShow) {
|
|
|
+ return `${params[0].name} ${params[0].value}%`;
|
|
|
+ } else {
|
|
|
+ return `${params[0].name} ${params[0].value}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
@@ -1064,7 +1081,18 @@ export default {
|
|
|
show: index === 0 ? false : true,
|
|
|
formatter: function () {
|
|
|
that.leiDaDataIndex = index - 1;
|
|
|
- return leidaList[index - 1].name + ":" + value[index - 1];
|
|
|
+ if (that.ratioShow) {
|
|
|
+ return (
|
|
|
+ leidaList[index - 1].name +
|
|
|
+ ":" +
|
|
|
+ value[index - 1] +
|
|
|
+ "%"
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return (
|
|
|
+ leidaList[index - 1].name + ":" + value[index - 1]
|
|
|
+ );
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
z: index === 0 ? 1 : 2,
|