<template>
|
<!-- 性能曲线 -->
|
<div id="chartBox" style="width: 100%; height: 100%" class="performanceCurveBox">
|
<div class="queryChartData" @click.stop="btnClickChartQuery">
|
<van-icon style="font-size:28px" name="search" />
|
</div>
|
<!-- 图表区域 -->
|
<div style="overflow: hidden; width: 100%" :style="'height:641px'">
|
<div class="tubiao">
|
<div style="width: 100%; height: 639px" id="lxbChart"></div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import $ from "@/assets/js/jquery-3.4.1.min";
|
import LxpChartDiagram from "@/components/chart/LxpChartDiagram.js";
|
import ConstParas from "@/utils/constParas.js";
|
|
export default {
|
name: "",
|
data() {
|
return {
|
m_chartDiagram: null //图表对象
|
};
|
},
|
components: {},
|
mounted() {},
|
watch: {},
|
methods: {
|
// 初始化获取泵的数据
|
initPumpInfoData(pumpInfoData) {
|
if (pumpInfoData == null) return;
|
// console.log(pumpInfoData, 276);
|
if (pumpInfoData.BaseInfo.PumpStyle != ConstParas.PumpStyle.LXP) {
|
return;
|
}
|
this.initChart(pumpInfoData);
|
},
|
|
initChart(pumpInfoData) {
|
let _this = this;
|
//console.log(this.pumpInfoData, 404);
|
if (pumpInfoData == null) {
|
return;
|
}
|
|
$("#lxbChart").empty();
|
|
// console.log(document.body.clientHeight, document.documentElement.clientHeight)
|
var diagramContentWidth = document.querySelector("#lxbChart").clientWidth;
|
var diagramContentHeight = document.querySelector("#lxbChart")
|
.clientHeight;
|
|
var chartDiagram = new LxpChartDiagram();
|
//设置语言
|
chartDiagram.setLocalizationType(0);
|
//设置容器
|
chartDiagram.setContainerDiv(
|
"lxbChart", //Div名称
|
diagramContentWidth,
|
diagramContentHeight
|
);
|
//设置提示框Name
|
// chartDiagram.setToolTipName("featCurveTip");
|
// //查询
|
chartDiagram.setChangeQueryDataCb(function(data) {
|
// console.log("setChangeQueryDataCb",data);
|
_this.$emit("cbChangeChartQueryData", data); //回调父窗体事件
|
});
|
//初始化
|
pumpInfoData.SettingInfo.IsOnlyDispWrkCurve = true; //屏幕过小, 默认只显示工作曲线
|
chartDiagram.initialChart(pumpInfoData, window.pageConfig.ChartStyle);
|
|
_this.m_chartDiagram = chartDiagram;
|
},
|
refreshByDp(val) {
|
//console.log(val, 602);
|
this.m_chartDiagram.refreshByDp(val);
|
},
|
//修改了区域参数的流量
|
refreshRegionByFlow(std_unit_flow, tag) {
|
// console.log(std_unit_flow, tag,535)
|
|
if (this.m_chartDiagram == null) return;
|
//console.log(flow,tag,373)
|
//var _this = this;
|
|
/*var std_unit_flow = UnitHelper.ConvertQ_toM3H(
|
this.unitSetting.Q,
|
custom_unit_flow
|
);*/
|
|
return this.m_chartDiagram.refreshRegionByFlow(std_unit_flow, tag);
|
},
|
|
btnClickChartQuery() {
|
//查询线的显/隐
|
if (this.m_chartDiagram != null) {
|
//console.log('查询线显示')
|
var isChartQueryStatus = this.m_chartDiagram.getQueryIndicatVertLineVisible();
|
isChartQueryStatus = !isChartQueryStatus;
|
this.m_chartDiagram.setQueryIndicatVertLineVisible(isChartQueryStatus);
|
|
this.$emit("cbChangeChartQueryStatus", isChartQueryStatus); //回调父窗体事件
|
}
|
},
|
//
|
outputChartToCAD() {
|
this.$message({
|
showClose: true,
|
message: "请下载客户端,客户端才能导出CAD格式文件"
|
});
|
}
|
}
|
};
|
</script>
|
<style lang="scss" >
|
.performanceCurveBox {
|
position: relative;
|
.chartBar {
|
background-color: white;
|
border-bottom: 0.01rem solid #cecece;
|
height: 0.35rem;
|
line-height: 0.35rem;
|
}
|
.el-dialog__header {
|
display: none;
|
}
|
.el-dialog--center .el-dialog__body {
|
padding: 0.25rem 0.25rem 0.15rem;
|
}
|
.el-dialog__footer {
|
padding: 0.05rem 0.05rem;
|
.el-button {
|
padding: 0.06rem 0.12rem;
|
min-height: 0.3rem;
|
}
|
}
|
.diagram {
|
cursor: pointer;
|
font-size: 0.12rem;
|
margin-top: 0;
|
margin-bottom: 0.03rem;
|
padding-top: 0.05rem;
|
height: 0.27rem;
|
& > span {
|
font-size: 0.12rem;
|
}
|
}
|
.btn {
|
border-width: 0;
|
padding: 0.07rem 0.14rem;
|
font-size: 0.12rem;
|
outline: none !important;
|
background-image: none !important;
|
filter: none;
|
border-radius: 0;
|
box-shadow: none;
|
text-shadow: none;
|
&.default {
|
color: #333333;
|
background-color: #e5e5e5;
|
&:hover {
|
background-color: #aaaaaa;
|
}
|
}
|
&.blue-stripe {
|
border-left: 0.03rem solid #4b8df8;
|
}
|
}
|
.rightFilterBox {
|
position: absolute;
|
right: 0rem;
|
top: 0rem;
|
width: auto;
|
background-color: white;
|
float: right;
|
.showChartInfoDiv {
|
width: 2rem;
|
display: block;
|
}
|
.boxHead {
|
height: 0.34rem;
|
border-left: none;
|
border-right: none;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
background-color: white;
|
border: 0.01rem solid transparent;
|
color: #3c763d;
|
border-color: #d6e9c6;
|
font-size: 0.14rem;
|
i {
|
font-size: 0.14rem;
|
}
|
}
|
.panel-heading {
|
background-color: #f5f5f5;
|
border-color: #ddd;
|
margin-bottom: 0.01rem;
|
.panel-title {
|
margin-top: 0;
|
padding: 0;
|
height: 0.23rem;
|
margin-bottom: 0;
|
font-size: 0.14rem;
|
background-color: #388cd4 !important;
|
color: white;
|
|
.right {
|
transform: rotate(-90deg);
|
transition: 0.2s;
|
}
|
.down {
|
transition: 0.2s;
|
transform: rotate(0deg);
|
}
|
}
|
.accordion-toggle {
|
padding: 0.1rem 0.15rem;
|
}
|
}
|
.panel-collapse {
|
height: auto;
|
.panel-body {
|
background-color: #545196 !important;
|
.el-checkbox {
|
color: #fff;
|
}
|
.el-checkbox,
|
.el-radio {
|
margin-right: 0.1rem;
|
}
|
.el-checkbox__label {
|
font-size: 0.12rem;
|
}
|
.el-checkbox__input.is-checked + .el-checkbox__label {
|
color: #fff;
|
font-size: 0.12rem;
|
}
|
.col-md-12 {
|
width: 100%;
|
margin-top: 0.03rem;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
.spectrumLeftParaLabelName {
|
line-height: 0.25rem;
|
margin-right: 0.05rem;
|
font-size: 0.12rem;
|
float: left;
|
width: 31%;
|
color: white;
|
background-color: #545196 !important;
|
}
|
.spectrumLeftParaLabelUnit {
|
line-height: 0.25rem;
|
margin-right: 0.05rem;
|
font-size: 0.12rem;
|
float: left;
|
width: 0.3rem;
|
color: white;
|
background-color: #545196 !important;
|
}
|
.el-input {
|
width: unset;
|
line-height: 0.3rem;
|
.el-input__inner {
|
height: 0.25rem;
|
line-height: 0.25rem;
|
width: 0.65rem;
|
text-align: right;
|
}
|
}
|
.pointShow {
|
.el-input__inner {
|
height: 0.25rem;
|
line-height: 0.25rem;
|
width: 100%;
|
text-align: center;
|
}
|
.el-input__prefix,
|
.el-input__suffix {
|
top: -0.07rem;
|
}
|
}
|
.chartInfoParaInput {
|
float: left;
|
line-height: 0.15rem;
|
width: 0.48rem !important;
|
text-align: right;
|
}
|
.form-control {
|
height: 0.08rem;
|
padding: 0.06rem 0.12rem;
|
font-size: 0.14rem;
|
font-weight: normal;
|
color: #333333;
|
background-color: white;
|
border: 0.01rem solid #b4afaf;
|
border-radius: 0;
|
box-shadow: none;
|
transition: border-color ease-in-out 0.15s,
|
box-shadow ease-in-out 0.15s;
|
}
|
}
|
}
|
}
|
}
|
.searchbtn {
|
border-radius: 0;
|
border-width: 0;
|
padding: 0.02rem 0.14rem;
|
font-size: 0.14rem;
|
outline: none !important;
|
background-image: none !important;
|
filter: none;
|
box-shadow: none;
|
text-shadow: none;
|
display: inline-block;
|
font-weight: 400;
|
text-align: center;
|
vertical-align: middle;
|
cursor: pointer;
|
white-space: nowrap;
|
line-height: 0.2rem;
|
user-select: none;
|
margin-top: 0.08rem;
|
margin-left: 0.2rem;
|
height: 0.2rem;
|
margin-bottom: 0.02rem;
|
width: 0.6rem;
|
padding-top: 0.02rem;
|
border: 0.01rem solid #ccc;
|
}
|
.blue {
|
background-color: #6396c2 !important;
|
color: #fff;
|
}
|
.setBox {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
flex-direction: column;
|
.setGroup {
|
position: relative;
|
margin-bottom: 0.01rem !important;
|
padding: 0.05rem !important;
|
background-color: white;
|
border: 0.01rem solid transparent;
|
border-width: 0.01rem;
|
border-color: #bce8f1;
|
color: #31708f;
|
margin-top: 20px;
|
.setTitle {
|
font-size: 0.18rem;
|
position: absolute;
|
top: -15px;
|
background-color: #fff;
|
padding: 0 5px;
|
}
|
.set_Option {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
// margin-top: 0.1rem;
|
.grid-content {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
margin-top: 0.05rem;
|
label {
|
width: 1.5rem;
|
font-size: 0.12rem;
|
text-align: right;
|
}
|
.el-input__inner {
|
text-align: right;
|
height: 0.4rem;
|
line-height: 40px;
|
padding: 0 0;
|
}
|
}
|
}
|
}
|
}
|
.tubiao {
|
height: 100%;
|
width: 100%;
|
}
|
.queryChartData {
|
position: absolute;
|
right: 0;
|
width: 40px;
|
height: 40px;
|
color: #ffffff;
|
border-radius: 50%;
|
line-height: 50px;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
opacity: 0.6;
|
}
|
}
|
</style>
|