feat : 新增echarts(折线图)下方滚动条型缩放组件
This commit is contained in:
@@ -295,25 +295,25 @@ body,
|
|||||||
|
|
||||||
#container {
|
#container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 1160px;
|
height: 1200px;
|
||||||
//width: 1300px;
|
//width: 1300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerFan {
|
#containerFan {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 1160px;
|
height: 1200px;
|
||||||
//width: 1300px;
|
//width: 1300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerBad {
|
#containerBad {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 1160px;
|
height: 1200px;
|
||||||
//width: 1300px;
|
//width: 1300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerWind {
|
#containerWind {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 1160px;
|
height: 1200px;
|
||||||
//width: 1300px;
|
//width: 1300px;
|
||||||
}
|
}
|
||||||
#containerWindDirection {
|
#containerWindDirection {
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ const initChart = (type, values) => {
|
|||||||
left: 0, // 左边距
|
left: 0, // 左边距
|
||||||
right: 20, // 右边距
|
right: 20, // 右边距
|
||||||
top: 80, // 顶边距
|
top: 80, // 顶边距
|
||||||
bottom: 0, // 底边距
|
bottom: 170, // 底边距
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
//提示框组件
|
//提示框组件
|
||||||
@@ -233,7 +233,17 @@ const initChart = (type, values) => {
|
|||||||
},
|
},
|
||||||
dataZoom: [{
|
dataZoom: [{
|
||||||
type: 'inside'
|
type: 'inside'
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
top: 1050,
|
||||||
|
height: 100,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 45,
|
||||||
|
color: '#fffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
//X轴
|
//X轴
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ const initChart = (type, values) => {
|
|||||||
left: 0, // 左边距
|
left: 0, // 左边距
|
||||||
right: 20, // 右边距
|
right: 20, // 右边距
|
||||||
top: 80, // 顶边距
|
top: 80, // 顶边距
|
||||||
bottom: 0, // 底边距
|
bottom: 170, // 底边距
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
//提示框组件
|
//提示框组件
|
||||||
@@ -218,7 +218,17 @@ const initChart = (type, values) => {
|
|||||||
},
|
},
|
||||||
dataZoom: [{
|
dataZoom: [{
|
||||||
type: 'inside'
|
type: 'inside'
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
top: 1050,
|
||||||
|
height: 100,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 45,
|
||||||
|
color: '#fffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
//X轴
|
//X轴
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category",
|
type: "category",
|
||||||
|
|||||||
@@ -55,8 +55,10 @@
|
|||||||
<!-- onchange="changeFrequency(item)"-->
|
<!-- onchange="changeFrequency(item)"-->
|
||||||
<!-- :disabled="item.autoMode"-->
|
<!-- :disabled="item.autoMode"-->
|
||||||
<!-- /></span>-->
|
<!-- /></span>-->
|
||||||
<el-input type="number" min="0" v-model="item.frequencySetting" :disabled="item.autoMode" title="输入完成后, 请回车进行修改"
|
<el-input type="number" min="0" v-model="item.frequencySetting" :disabled="item.autoMode"
|
||||||
@change="changeFrequency(item)" @focus="item.showTooltip=true" @blur="item.showTooltip=false" :class="{changeMargin: item.showTooltip}">
|
title="输入完成后, 请回车进行修改"
|
||||||
|
@change="changeFrequency(item)" @focus="item.showTooltip=true"
|
||||||
|
@blur="item.showTooltip=false" :class="{changeMargin: item.showTooltip}">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<span>Hz</span>
|
<span>Hz</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -506,7 +508,7 @@ const initChart = (type, valueA, valueB, valueC) => {
|
|||||||
left: 0, // 左边距
|
left: 0, // 左边距
|
||||||
right: 20, // 右边距
|
right: 20, // 右边距
|
||||||
top: 80, // 顶边距
|
top: 80, // 顶边距
|
||||||
bottom: 0, // 底边距
|
bottom: 170, // 底边距
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
//提示框组件
|
//提示框组件
|
||||||
@@ -528,22 +530,7 @@ const initChart = (type, valueA, valueB, valueC) => {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
||||||
// return content;
|
|
||||||
},
|
},
|
||||||
// formatter: function (params) {
|
|
||||||
// let content = `
|
|
||||||
// <div style="background: linear-gradient(180deg, #254062 0%, rgba(20,36,51,0.3) 100%);;border: 2px solid #6087BA;border-radius: 4px;padding: 8px 16px;">
|
|
||||||
// <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: 8px;">${params[0].name}</div>
|
|
||||||
// <div style="font-size: 52px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin-top: 20px"><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[0].value}</span></div>
|
|
||||||
// <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: 8px;">${params[1].name}</div>
|
|
||||||
// <div style="font-size: 52px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin-top: 20px"><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[1].value}</span></div>
|
|
||||||
// <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: 8px;">${params[2].name}</div>
|
|
||||||
// <div style="font-size: 52px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin-top: 20px"><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[2].value}</span></div>
|
|
||||||
//
|
|
||||||
// </div>`;
|
|
||||||
// return content;
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: false,
|
show: false,
|
||||||
@@ -555,8 +542,18 @@ const initChart = (type, valueA, valueB, valueC) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataZoom: [{
|
dataZoom: [{
|
||||||
type: 'inside'
|
type: 'inside',
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
top: 1050,
|
||||||
|
height: 100,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 45,
|
||||||
|
color: '#fffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
//X轴
|
//X轴
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
@@ -900,9 +897,11 @@ input[type="number"] {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.changeMargin {
|
.changeMargin {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> div:first-child {
|
> div:first-child {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@@ -910,12 +909,14 @@ input[type="number"] {
|
|||||||
white-space: pre;
|
white-space: pre;
|
||||||
margin-right: 14px;
|
margin-right: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.is-focus) {
|
:deep(.is-focus) {
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-input__wrapper) {
|
:deep(.el-input__wrapper) {
|
||||||
width: 160px;
|
width: 160px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ const initChart = (type, values) => {
|
|||||||
left: 0, // 左边距
|
left: 0, // 左边距
|
||||||
right: 20, // 右边距
|
right: 20, // 右边距
|
||||||
top: 80, // 顶边距
|
top: 80, // 顶边距
|
||||||
bottom: 0, // 底边距
|
bottom: 170, // 底边距
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
//提示框组件
|
//提示框组件
|
||||||
@@ -169,7 +169,17 @@ const initChart = (type, values) => {
|
|||||||
},
|
},
|
||||||
dataZoom: [{
|
dataZoom: [{
|
||||||
type: 'inside'
|
type: 'inside'
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
top: 1050,
|
||||||
|
height: 100,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 45,
|
||||||
|
color: '#fffff'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
//X轴
|
//X轴
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
|||||||
Reference in New Issue
Block a user