<template>
|
<div>
|
<!-- 查询参数表格 -->
|
<div v-show="state.m_isChartQueryTableVisible" class="panel-collapse">
|
<div
|
class="panel-body"
|
style="
|
display: flex;
|
flex-direction: column;
|
background-color: #fff !important;
|
margin-bottom: 10px;
|
cursor: pointer;
|
"
|
>
|
<!-- 表格名称 -->
|
<div
|
@click="
|
state.m_chartQueryData.isShow = !state.m_chartQueryData.isShow
|
"
|
class="group_name"
|
>
|
<i
|
class="iconfont iconxiajiantou"
|
:class="state.m_chartQueryData.isShow ? 'down' : 'right'"
|
/>
|
{{ state.m_chartQueryData.title }}
|
</div>
|
|
<el-collapse-transition>
|
<div v-show="state.m_chartQueryData.isShow">
|
<div style="display: flex">
|
<!-- 用户单位 -->
|
<el-col
|
:span="!state.m_isVisibleStdUnit ? 24 : 16"
|
class="custom_col_style"
|
>
|
<div class="table_box" style="width: 99%">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.userUnit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 标准单位 -->
|
<el-col :span="8" v-if="state.m_isVisibleStdUnit">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="
|
border-top: 1px solid #e9e9e9;
|
border-right: 1px solid #e9e9e9;
|
"
|
>
|
{{ t("detailPage.standardUnit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
</div>
|
<div style="display: flex">
|
<!-- 用户单位表头 -->
|
<el-col
|
:span="!state.m_isVisibleStdUnit ? 24 : 16"
|
class="custom_col_style"
|
>
|
<!-- 用户单位 参数 -->
|
<el-col :span="8" style="width: 25%">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.parameter.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 用户单位 数据 -->
|
<el-col :span="8">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.data.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 用户单位 单位 -->
|
<el-col :span="8">
|
<div class="table_box">
|
<div
|
class="content3 table_head"
|
style="
|
border-top: 1px solid #e9e9e9;
|
border-right: unset !important;
|
"
|
>
|
{{ t("detailPage.unit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
</el-col>
|
<!-- 标准单位表头 -->
|
<el-col :span="8" v-if="state.m_isVisibleStdUnit">
|
<!-- 标准单位数据 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div
|
class="content3 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.data.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 标准单位 单位 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div
|
class="content3 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.unit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
</el-col>
|
</div>
|
<div
|
style="display: flex; flex-direction: column"
|
v-for="(ptNode, ptIndex) in state.m_chartQueryData.nodeList"
|
:key="'searchTable' + ptIndex"
|
>
|
<div style="width: 100%">
|
<el-col :span="24" style="display: flex; width: 100%">
|
<!-- 用户单位 -->
|
<el-col :span="!state.m_isVisibleStdUnit ? 24 : 16" style="flex: 1 1 auto">
|
<!-- 用户单位 参数 -->
|
<el-col :span="8" style="width: 25%">
|
<div class="table_box">
|
<div class="content2">
|
{{ ptNode.ItemName }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 用户单位 数据 -->
|
<el-col :span="8" style="display: flex">
|
<div class="table_box">
|
<div class="content2">
|
{{ ptNode.ValueUserUnit }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 用户单位 单位 -->
|
<el-col :span="8" style="display: flex">
|
<div class="table_box">
|
<div class="content3">
|
{{ ptNode.UnitNameUser }}
|
</div>
|
</div>
|
</el-col>
|
</el-col>
|
<el-col :span="8" v-if="state.m_isVisibleStdUnit">
|
<!-- 标准单位 数据 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div class="content3">
|
{{ ptNode.ValueStdUnit }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 标准单位 单位 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div class="content3">{{ ptNode.UnitNameStd }}</div>
|
</div>
|
</el-col>
|
</el-col>
|
</el-col>
|
</div>
|
</div>
|
</div>
|
</el-collapse-transition>
|
</div>
|
</div>
|
<!-- 工作点 等参数表格 -->
|
<div
|
class="panel-collapse"
|
v-for="(params_item, params_index) in state.m_dataChartPointGrid"
|
:key="'params' + params_index"
|
>
|
<div
|
class="panel-body"
|
v-if="params_item.isVisible"
|
style="
|
display: flex;
|
flex-direction: column;
|
background-color: #fff !important;
|
margin-bottom: 10px;
|
cursor: pointer;
|
"
|
>
|
<div
|
class="group_name"
|
@click.stop="params_item.isShow = !params_item.isShow"
|
>
|
<i
|
class="iconfont iconxiajiantou"
|
:class="params_item.isShow ? 'down' : 'right'"
|
/>
|
{{ params_item.title }}
|
</div>
|
<el-collapse-transition>
|
<div v-show="params_item.isShow">
|
<div style="display: flex">
|
<!-- 用户单位 -->
|
<el-col
|
:span="!state.m_isVisibleStdUnit ? 24 : 16"
|
class="custom_col_style"
|
>
|
<div class="table_box" style="width: 99%">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.userUnit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 标准单位 -->
|
<el-col :span="8" v-if="state.m_isVisibleStdUnit">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="
|
border-top: 1px solid #e9e9e9;
|
border-right: 1px solid #e9e9e9;
|
"
|
>
|
{{ t("detailPage.standardUnit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
</div>
|
<div style="display: flex">
|
<!-- 用户单位表头 -->
|
<el-col
|
:span="!state.m_isVisibleStdUnit ? 24 : 16"
|
class="custom_col_style"
|
>
|
<!-- 用户单位 参数 -->
|
<el-col :span="8" style="width: 25%">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.parameter.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 用户单位 数据 -->
|
<el-col :span="8">
|
<div class="table_box">
|
<div
|
class="content2 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.data.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 用户单位 单位 -->
|
<el-col :span="8">
|
<div class="table_box">
|
<div
|
class="content3 table_head"
|
style="
|
border-top: 1px solid #e9e9e9;
|
border-right: unset !important;
|
"
|
>
|
{{ t("detailPage.unit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
</el-col>
|
<!-- 标准单位表头 -->
|
<el-col :span="8" v-if="state.m_isVisibleStdUnit" class="flex">
|
<!-- 标准单位数据 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div
|
class="content3 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.data.TR") }}
|
</div>
|
</div>
|
</el-col>
|
<!-- 标准单位 单位 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div
|
class="content3 table_head"
|
style="border-top: 1px solid #e9e9e9"
|
>
|
{{ t("detailPage.unit.TR") }}
|
</div>
|
</div>
|
</el-col>
|
</el-col>
|
</div>
|
<div
|
style="display: flex; flex-direction: column"
|
v-for="(ptNode, node_index) in params_item.nodeList"
|
:key="'group' + node_index"
|
>
|
<div style="width: 100%">
|
<el-col :span="24" style="display: flex; width: 100%">
|
<!-- 用户单位 表内容 -->
|
<el-col
|
:span="!state.m_isVisibleStdUnit ? 24 : 16"
|
class="custom_col_style"
|
>
|
<el-col :span="8">
|
<div class="table_box">
|
<div class="content2">{{ ptNode.ItemName }}</div>
|
</div>
|
</el-col>
|
<el-col :span="8" style="display: flex">
|
<div class="table_box">
|
<div class="content2" style="position: relative">
|
<el-input
|
v-model="ptNode.ValueUserUnit"
|
v-if="ptNode.IsEditer"
|
></el-input>
|
<div v-else>
|
{{ ptNode.ValueUserUnit }}
|
</div>
|
<span
|
@click.stop="refreshTableCell(params_item)"
|
v-if="ptNode.IsEditer"
|
class="iconfont iconrefresh-right refresh-icon-style"
|
id="eidt_refresh_icon"
|
></span>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="8" style="display: flex">
|
<div class="table_box">
|
<div
|
class="content3"
|
style="border-right: unset !important"
|
>
|
{{ ptNode.UnitNameUser }}
|
</div>
|
</div>
|
</el-col>
|
</el-col>
|
<!-- 标准单位 表内容 -->
|
<el-col
|
:span="8"
|
v-if="state.m_isVisibleStdUnit"
|
class="flex"
|
>
|
<!-- 标准单位 数据 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div class="content3">
|
{{
|
ptNode.ValueStdUnit > 0 ? ptNode.ValueStdUnit : ""
|
}}
|
</div>
|
</div>
|
</el-col>
|
<!-- 标准单位 单位 -->
|
<el-col :span="12">
|
<div class="table_box">
|
<div class="content3">{{ ptNode.UnitNameStd }}</div>
|
</div>
|
</el-col>
|
</el-col>
|
</el-col>
|
</div>
|
</div>
|
</div>
|
</el-collapse-transition>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script setup name="zlbChartPointParas">
|
import { onMounted, ref, reactive, nextTick, inject } from "vue";
|
import { ElInput, ElCollapseTransition, ElRow, ElCol } from "element-plus";
|
import UnitHelper from "@/utils/unit";
|
import languageHelper from "@/utils/languageHelper.js";
|
import axiosHelper from "@/utils/axiosHelper.js";
|
import { useI18n } from "vue-i18n";
|
const m_currentLanguage = 0;
|
let { t } = useI18n();
|
|
const emit = defineEmits(["cbUpdateConstantLine"]);
|
|
let state = reactive({
|
m_currentLanguage: 0,
|
|
m_ratedParas: null,
|
m_pumpInfo: null,
|
m_ratedDegree: 0,
|
m_designPointParas: null,
|
m_wrkParas: null, //工作参数
|
m_chartQueryData: [],
|
m_isChartQueryTableVisible: false, //参数查询的显示状态
|
|
m_dataChartPointGrid: [], //最大工作点 最小工作点
|
m_unitSetting: {
|
StdUnitQ: 1,
|
StdUnitH: 0,
|
StdUnitP: 1,
|
StdUnitNPSH: 0,
|
StdUnitD2: 0,
|
|
UserUnitQ: 1,
|
UserUnitH: 0,
|
UserUnitP: 1,
|
UserUnitNPSH: 0,
|
UserUnitD2: 0,
|
},
|
m_isVisibleStdUnit: false, //是否显示标准单位列
|
});
|
|
// const emit = defineEmits(["refreshRegionByFlow"]);
|
//获取初始化(外部index调用)
|
const initPumpInfoData = (langType, pumpInfoData) => {
|
state.m_currentLanguage = langType;
|
|
//获取标准单位
|
if (pumpInfoData.SettingInfo == null) {
|
return;
|
}
|
//获取图表点参数
|
if (pumpInfoData.ChartPointPara == null) {
|
return;
|
}
|
|
state.m_ratedParas = pumpInfoData.BaseInfo.RatedParas;
|
state.m_pumpInfo = pumpInfoData.BaseInfo;
|
|
state.m_ratedDegree = 0;
|
if (
|
pumpInfoData.BaseInfo.RatedDegree != null &&
|
pumpInfoData.BaseInfo.RatedDegree != ""
|
) {
|
state.m_ratedDegree = pumpInfoData.BaseInfo.RatedDegree;
|
}
|
|
state.m_unitSetting = pumpInfoData.SettingInfo;
|
//设置标准单位列的显示状态
|
setStdUnitColVisibleStatus(state.m_unitSetting);
|
|
buildPointTable(pumpInfoData);
|
};
|
|
//修改刷新
|
const refreshTableCell = (ptNode) => {
|
var const_h = ptNode.nodeList[0].ValueUserUnit;
|
|
if (const_h == "" || const_h < 0.1) return;
|
var type = 0;
|
let currentTag = ptNode.tag;
|
if (currentTag == "MaxHeadPoint") {
|
type = 0;
|
} else if (currentTag == "AverageHeadPoint") {
|
type = 1;
|
} else if (currentTag == "MinHeadPoint") {
|
type = 2;
|
} else {
|
return;
|
}
|
let requestData = {
|
SID: state.m_pumpInfo.SeriesID,
|
PID: state.m_pumpInfo.PumpID,
|
WorkDegree: state.m_wrkParas.Degree,
|
ZlpContangLineType: type,
|
ContangLineHead: const_h,
|
};
|
|
axiosHelper
|
.post({
|
version: 3,
|
lang: m_currentLanguage,
|
controller: "PumpDetailByPara",
|
action: "CalcZlpContantLine",
|
data: requestData,
|
apiUrlType: "main",
|
})
|
.then((res) => {
|
state.m_isShowLoadingFrm = false;
|
let resdata = res.data;
|
if (resdata.Code != 0) {
|
ElMessage(resdata.Message);
|
return;
|
}
|
const resultData = JSON.parse(JSON.stringify(resdata.Data));
|
resultData.type = type;
|
emit("cbUpdateConstantLine", resultData);
|
setPointParasByTag(currentTag, resultData);
|
})
|
.catch((err) => {
|
console.log(err, 785);
|
});
|
};
|
// 根据tag设置值
|
const setPointParasByTag = (tag, paras) => {
|
let resultParas = deepClone(paras);
|
let unitSetting = state.m_unitSetting;
|
//console.log(unitSetting)
|
|
state.m_dataChartPointGrid.forEach((item) => {
|
if (item.tag == tag) {
|
item.nodeList.forEach((node) => {
|
if(node.Tag == tag+"Q" ){
|
node.ValueUserUnit = UnitHelper.ConvertQ_fromM3H(unitSetting.UserUnitQ, resultParas.Q);
|
node.ValueStdUnit = UnitHelper.ConvertQ_fromM3H(unitSetting.StdUnitQ, resultParas.Q);
|
}
|
if(node.Tag == tag+"E" ){
|
node.ValueUserUnit = resultParas.E;
|
node.ValueStdUnit = resultParas.E;
|
}
|
if(node.Tag == tag+"P" ){
|
node.ValueUserUnit = resultParas.P;
|
node.ValueStdUnit = resultParas.P;
|
}
|
});
|
}
|
});
|
};
|
//修改设计点参数后 刷新(外部index调用)
|
const refreshPumpInfoData = (designPointParas, pumpInfoData) => {
|
let chartPointPara = pumpInfoData.ChartPointPara;
|
let chartObjectDict = pumpInfoData.ChartObjectDict;
|
if (chartPointPara.JieZhiWrkPt == null) return;
|
var wrkNode = state.m_dataChartPointGrid[0];
|
|
if (state.m_wrkParas == null) state.m_wrkParas = {};
|
state.m_designPointParas = designPointParas;
|
|
var wrkNodeList = wrkNode.nodeList;
|
for (var i = 0; i < wrkNodeList.length; i++) {
|
var node = wrkNodeList[i];
|
if (node.Tag == "WorkPointD") {
|
node.ValueStdUnit = chartObjectDict.PlaceAngle;
|
node.ValueUserUnit = chartObjectDict.PlaceAngle;
|
|
state.m_wrkParas.Degree = chartObjectDict.PlaceAngle;
|
}
|
if (node.Tag == "WorkPointE") {
|
node.ValueStdUnit = UnitHelper.getDispValueE(
|
chartPointPara.JieZhiWrkPt.E
|
);
|
node.ValueUserUnit = UnitHelper.getDispValueE(
|
chartPointPara.JieZhiWrkPt.E
|
);
|
state.m_wrkParas.E = chartPointPara.JieZhiWrkPt.E;
|
}
|
if (node.Tag == "WorkPointP") {
|
node.ValueStdUnit = UnitHelper.getDispValueP(
|
chartPointPara.JieZhiWrkPt.P
|
);
|
node.ValueUserUnit = UnitHelper.getDispValueP(
|
chartPointPara.JieZhiWrkPt.P
|
);
|
state.m_wrkParas.P = chartPointPara.JieZhiWrkPt.P;
|
}
|
}
|
};
|
|
//获取用户单位系统
|
const getUserUnit = () => {
|
var unitSetting = state.m_unitSetting;
|
|
var unit = {};
|
unit.Q = unitSetting.UserUnitQ;
|
unit.H = unitSetting.UserUnitH;
|
unit.P = unitSetting.UserUnitP;
|
unit.NPSH = unitSetting.UserUnitNPSH;
|
unit.D2 = unitSetting.UserUnitD2;
|
// console.log("unitSetting", unitSetting);
|
|
return unit;
|
};
|
//设置标准单位列的显示状态
|
const setStdUnitColVisibleStatus = (unitSetting) => {
|
var isDispStdUnitCol = false; //是否显示标准单位列
|
|
if (unitSetting.StdUnitQ != unitSetting.UserUnitQ) {
|
isDispStdUnitCol = true;
|
}
|
if (unitSetting.StdUnitH != unitSetting.UserUnitH) {
|
isDispStdUnitCol = true;
|
}
|
|
state.m_isVisibleStdUnit = isDispStdUnitCol;
|
};
|
//获取曲线点值(用于返回后台:所以都是标准单位)
|
const getConstantPtValue4Store = () => {
|
var para = {};
|
var chartPointNode = state.m_dataChartPointGrid;
|
|
if (chartPointNode == null) return para;
|
|
var unitSetting = state.m_unitSetting;
|
|
for (var i = 0; i < chartPointNode.length; i++) {
|
var nodeList = chartPointNode[i].nodeList;
|
|
if (chartPointNode[i].tag == "MaxHeadPoint") {
|
for (var j = 0; j < nodeList.length; j++) {
|
var node = nodeList[j];
|
if (node.Tag == "MaxHeadPointH") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMaxHeadH = node.ValueUserUnit;
|
}
|
if (node.Tag == "MaxHeadPointQ") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMaxHeadQ = UnitHelper.ConvertQ_toM3H(
|
unitSetting.UserUnitQ,
|
parseFloat(node.ValueUserUnit)
|
); //转成标准单位
|
}
|
if (node.Tag == "MaxHeadPointE") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMaxHeadE = parseFloat(node.ValueUserUnit);
|
}
|
if (node.Tag == "MaxHeadPointP") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMaxHeadP = parseFloat(node.ValueUserUnit);
|
}
|
}
|
} else if (chartPointNode[i].tag == "MinHeadPoint") {
|
for (var j = 0; j < nodeList.length; j++) {
|
var node = nodeList[j];
|
if (node.Tag == "MinHeadPointH") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMinHeadH = node.ValueUserUnit;
|
}
|
if (node.Tag == "MinHeadPointQ") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMinHeadQ = UnitHelper.ConvertQ_toM3H(
|
unitSetting.UserUnitQ,
|
parseFloat(node.ValueUserUnit)
|
); //转成标准单位
|
}
|
if (node.Tag == "MinHeadPointE") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMinHeadE = parseFloat(node.ValueUserUnit);
|
}
|
if (node.Tag == "MinHeadPointP") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantMinHeadP = parseFloat(node.ValueUserUnit);
|
}
|
}
|
} else if (chartPointNode[i].tag == "AverageHeadPoint") {
|
for (var j = 0; j < nodeList.length; j++) {
|
var node = nodeList[j];
|
if (node.Tag == "AverageHeadPointH") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantAverageHeadH = node.ValueUserUnit;
|
}
|
if (node.Tag == "AverageHeadPointQ") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantAverageHeadQ = UnitHelper.ConvertQ_toM3H(
|
unitSetting.UserUnitQ,
|
parseFloat(node.ValueUserUnit)
|
); //转成标准单位
|
}
|
if (node.Tag == "AverageHeadPointE") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantAverageHeadE = parseFloat(node.ValueUserUnit);
|
}
|
if (node.Tag == "AverageHeadPointP") {
|
if (node.ValueUserUnit == "") continue;
|
para.ConstantAverageHeadP = parseFloat(node.ValueUserUnit);
|
}
|
}
|
|
}
|
}
|
|
|
return para;
|
};
|
//构建表格(每次都是清空)
|
const buildPointTable = (pumpInfoData) => {
|
if (pumpInfoData.ChartPointPara == null) return;
|
//chartPointPara都是 流量扬程单位是m3/h , m, 后台传入的
|
let chartPointPara = pumpInfoData.ChartPointPara;
|
|
//用于展示的表格数据
|
let dataChartPointGrid = [];
|
//构建工作点
|
let grp_wrkPt = buildWorkPtItem(chartPointPara);
|
dataChartPointGrid.push(grp_wrkPt);
|
|
let grp_maxHeadPt = buildHeadConstantPtItem("最高扬程", "MaxHeadPoint");
|
dataChartPointGrid.push(grp_maxHeadPt);
|
|
let grp_averyHeadPt = buildHeadConstantPtItem("平均扬程", "AverageHeadPoint");
|
dataChartPointGrid.push(grp_averyHeadPt);
|
|
let grp_minHeadPt = buildHeadConstantPtItem("最低扬程", "MinHeadPoint");
|
dataChartPointGrid.push(grp_minHeadPt);
|
|
//构建铭牌参数
|
let grp_ratedPt = buildRatedPtItem(chartPointPara);
|
dataChartPointGrid.push(grp_ratedPt);
|
|
|
state.m_dataChartPointGrid = dataChartPointGrid;
|
};
|
|
//构建工作点(wrk_pt是后台传入的,单位都是m3/h 和 m)
|
const buildWorkPtItem = (chartPointPara) => {
|
var group_name = `${t("detailPage.workingPoint.TR")}`;
|
var grp_tag = "WorkPoint";
|
var wrk_pt = chartPointPara.JieZhiWrkPt;
|
|
var wrk_degree = chartPointPara.PlaceAngle;
|
if (wrk_degree == null || wrk_degree == "") {
|
wrk_degree = state.m_ratedDegree;
|
}
|
if (wrk_degree == null || wrk_degree == "") {
|
wrk_degree = 0;
|
}
|
|
var grp_pt = wrk_pt;
|
if (grp_pt == null) {
|
if (state.m_ratedParas == null) return;
|
grp_pt = {};
|
grp_pt.Q = parseFloat(state.m_ratedParas.Q);
|
grp_pt.H = parseFloat(state.m_ratedParas.H);
|
grp_pt.E = parseFloat(state.m_ratedParas.E);
|
grp_pt.P = parseFloat(state.m_ratedParas.P);
|
// if (this.m_ratedParas.NPSHr)
|
// grp_pt.NPSH = parseFloat(this.m_ratedParas.NPSHr);
|
}
|
|
state.m_wrkParas = {};
|
state.m_wrkParas.Degree = wrk_degree;
|
state.m_wrkParas.E = grp_pt.E;
|
state.m_wrkParas.P = grp_pt.P;
|
|
let unitSetting = state.m_unitSetting;
|
|
let obj = {};
|
obj.isVisible = true;
|
obj.title = group_name;
|
obj.isShow = true;
|
obj.nodeList = [];
|
obj.tag = grp_tag;
|
|
let chartPointNode = null;
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.angle.TR")}`,
|
Tag: grp_tag + "D",
|
UnitNameUser: "°",
|
ValueUserUnit: wrk_degree,
|
ValueStdUnit: wrk_degree,
|
UnitNameStd: "°",
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.efficiency.TR")}`,
|
Tag: grp_tag + "E",
|
UnitNameUser: "%",
|
ValueUserUnit: UnitHelper.getDispValueE(grp_pt.E),
|
ValueStdUnit: "",
|
UnitNameStd: "",
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.shaftPower.TR")}`,
|
Tag: grp_tag + "P",
|
UnitNameUser: UnitHelper.GetUnitNameP(unitSetting.UserUnitP),
|
ValueUserUnit: UnitHelper.getDispValueP(
|
UnitHelper.ConvertP_fromKW(unitSetting.UserUnitP, grp_pt.P)
|
),
|
ValueStdUnit: "",
|
UnitNameStd:
|
unitSetting.StdUnitP == unitSetting.UserUnitP
|
? ""
|
: UnitHelper.GetUnitNameP(unitSetting.StdUnitP),
|
};
|
obj.nodeList.push(chartPointNode);
|
|
|
return obj;
|
};
|
//构建扬程点(wrk_pt是后台传入的,单位都是m3/h 和 m)
|
const buildHeadConstantPtItem = (group_name, grp_tag) => {
|
let unitSetting = state.m_unitSetting;
|
|
let obj = {};
|
obj.isVisible = true;
|
obj.title = group_name;
|
obj.isShow = true;
|
obj.nodeList = [];
|
obj.tag = grp_tag;
|
|
let chartPointNode = null;
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: group_name,
|
Tag: grp_tag + "H",
|
UnitNameUser: "m",
|
ValueUserUnit: "",
|
ValueStdUnit: "",
|
UnitNameStd: "m",
|
IsEditer: true,
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.flow.TR")}`,
|
Tag: grp_tag + "Q",
|
IsEditer: false,
|
UnitNameUser: UnitHelper.GetUnitNameQ(unitSetting.UserUnitQ),
|
ValueUserUnit: "",
|
ValueStdUnit: "",
|
UnitNameStd: UnitHelper.GetUnitNameQ(unitSetting.StdUnitQ),
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `效率`,
|
Tag: grp_tag + "E",
|
UnitNameUser: "%",
|
ValueUserUnit: "",
|
ValueStdUnit: "",
|
UnitNameStd: "%",
|
IsEditer: false,
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `功率`,
|
Tag: grp_tag + "P",
|
IsEditer: false,
|
UnitNameUser: UnitHelper.GetUnitNameP(unitSetting.UserUnitP),
|
ValueUserUnit: "",
|
ValueStdUnit: "",
|
UnitNameStd:
|
unitSetting.StdUnitP == unitSetting.UserUnitP
|
? ""
|
: UnitHelper.GetUnitNameP(unitSetting.StdUnitP),
|
};
|
obj.nodeList.push(chartPointNode);
|
|
return obj;
|
};
|
|
//构建铭牌参数(wrk_pt是后台传入的,单位都是m3/h 和 m)
|
const buildRatedPtItem = (chartPointPara) => {
|
var group_name = `${t("detailPage.nameplateParameter.TR")}`;
|
var grp_tag = "RatedPoint";
|
|
var wrk_degree = state.m_ratedDegree;
|
if (wrk_degree == null || wrk_degree == "") {
|
wrk_degree = 0;
|
}
|
//
|
|
if (state.m_ratedParas == null) {
|
return;
|
}
|
var grp_pt = state.m_ratedParas;
|
grp_pt.Q = parseFloat(grp_pt.Q);
|
grp_pt.H = parseFloat(grp_pt.H);
|
grp_pt.E = parseFloat(grp_pt.E);
|
grp_pt.P = parseFloat(grp_pt.P);
|
|
let unitSetting = state.m_unitSetting;
|
|
let obj = {};
|
obj.isVisible = true;
|
obj.title = group_name;
|
obj.isShow = true;
|
obj.nodeList = [];
|
obj.tag = grp_tag;
|
|
let chartPointNode = null;
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.angle.TR")}`,
|
Tag: grp_tag + "D",
|
UnitNameUser: "°",
|
ValueUserUnit: wrk_degree,
|
ValueStdUnit: wrk_degree,
|
UnitNameStd: "°",
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.flow.TR")}`,
|
Tag: grp_tag + "Q",
|
IsEditer: false,
|
UnitNameUser: UnitHelper.GetUnitNameQ(unitSetting.UserUnitQ),
|
ValueUserUnit: UnitHelper.getDispValueQ(
|
UnitHelper.ConvertQ_fromM3H(unitSetting.UserUnitQ, grp_pt.Q)
|
),
|
ValueStdUnit: UnitHelper.getDispValueQ(
|
UnitHelper.ConvertQ_fromM3H(unitSetting.StdUnitQ, grp_pt.Q)
|
),
|
UnitNameStd: UnitHelper.GetUnitNameQ(unitSetting.StdUnitQ),
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.head.TR")}`,
|
Tag: grp_tag + "H",
|
UnitNameUser: UnitHelper.GetUnitNameH(unitSetting.UserUnitH),
|
ValueUserUnit: UnitHelper.getDispValueH(
|
UnitHelper.ConvertH_fromM(unitSetting.UserUnitH, grp_pt.H)
|
),
|
ValueStdUnit: UnitHelper.getDispValueH(
|
UnitHelper.ConvertH_fromM(unitSetting.StdUnitH, grp_pt.H)
|
),
|
UnitNameStd: UnitHelper.GetUnitNameH(unitSetting.StdUnitH),
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.efficiency.TR")}`,
|
Tag: grp_tag + "E",
|
UnitNameUser: "%",
|
ValueUserUnit: UnitHelper.getDispValueE(grp_pt.E),
|
ValueStdUnit: "",
|
UnitNameStd: "",
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: group_name,
|
ItemName: `${t("detailPage.shaftPower.TR")}`,
|
Tag: grp_tag + "P",
|
UnitNameUser: UnitHelper.GetUnitNameP(unitSetting.UserUnitP),
|
ValueUserUnit: UnitHelper.getDispValueP(
|
UnitHelper.ConvertP_fromKW(unitSetting.UserUnitP, grp_pt.P)
|
),
|
ValueStdUnit: "",
|
UnitNameStd:
|
unitSetting.StdUnitP == unitSetting.UserUnitP
|
? ""
|
: UnitHelper.GetUnitNameP(unitSetting.StdUnitP),
|
};
|
obj.nodeList.push(chartPointNode);
|
return obj;
|
};
|
|
//翻译
|
const getTranslateString = (cn) => {
|
if (m_currentLanguage == 0) return cn;
|
return languageHelper.translateString(m_currentLanguage, cn);
|
};
|
const deepClone = (obj) => {
|
return JSON.parse(JSON.stringify(obj));
|
};
|
//返回工作点流量(给LCC专用)
|
const getWorkFlow4Lcc = () => {
|
var unitSetting = state.m_unitSetting;
|
var dataChartPointGrid = state.m_dataChartPointGrid;
|
//console.log("dataChartPointGrid", dataChartPointGrid);
|
for (var index = 0; index < dataChartPointGrid.length; index++) {
|
if (dataChartPointGrid[index].tag == "WorkPoint") {
|
for (var j = 0; j < dataChartPointGrid[index].nodeList.length; j++) {
|
if (dataChartPointGrid[index].nodeList[j].Tag == "WorkPointQ") {
|
return {
|
Value: dataChartPointGrid[index].nodeList[j].ValueUserUnit,
|
Unit: unitSetting.UserUnitQ,
|
};
|
}
|
}
|
}
|
}
|
|
return null;
|
};
|
|
//构建查询参数
|
const buildChartQueryData = (query_pt) => {
|
//console.log(query_pt, 799);
|
if (query_pt == null) {
|
return;
|
}
|
|
let obj = {};
|
obj.title = `${t("detailPage.parameterQuery.TR")}`;
|
obj.isShow = true;
|
obj.nodeList = [];
|
let unitSetting = state.m_unitSetting;
|
|
let chartPointNode = {
|
GroupName: `${t("detailPage.parameterQuery.TR")}`,
|
ItemName: getTranslateString("流量"),
|
Tag: "ChartPointQueryQ",
|
UnitNameUser: UnitHelper.GetUnitNameQ(unitSetting.UserUnitQ),
|
ValueUserUnit: UnitHelper.getDispValueQ(
|
UnitHelper.ConvertQ_fromM3H(unitSetting.UserUnitQ, parseFloat(query_pt.Q))
|
),
|
ValueStdUnit:
|
unitSetting.UserUnitQ == unitSetting.StdUnitQ
|
? ""
|
: UnitHelper.getDispValueQ(
|
UnitHelper.ConvertQ_fromM3H(
|
unitSetting.StdUnitQ,
|
parseFloat(query_pt.Q)
|
)
|
),
|
UnitNameStd:
|
unitSetting.UserUnitQ == unitSetting.StdUnitQ
|
? ""
|
: UnitHelper.GetUnitNameQ(unitSetting.StdUnitQ),
|
};
|
obj.nodeList.push(chartPointNode);
|
|
chartPointNode = {
|
GroupName: `${t("detailPage.parameterQuery.TR")}`,
|
ItemName: getTranslateString("扬程"),
|
Tag: "ChartPointQueryH",
|
UnitNameUser: UnitHelper.GetUnitNameH(unitSetting.UserUnitH),
|
ValueUserUnit: UnitHelper.getDispValueH(
|
UnitHelper.ConvertH_fromM(unitSetting.UserUnitH, parseFloat(query_pt.H))
|
),
|
ValueStdUnit:
|
unitSetting.UserUnitH == unitSetting.StdUnitH
|
? ""
|
: UnitHelper.getDispValueH(
|
UnitHelper.ConvertH_fromM(
|
unitSetting.StdUnitH,
|
parseFloat(query_pt.H)
|
)
|
),
|
UnitNameStd:
|
unitSetting.UserUnitH == unitSetting.StdUnitH
|
? ""
|
: UnitHelper.GetUnitNameH(unitSetting.StdUnitH),
|
};
|
obj.nodeList.push(chartPointNode);
|
|
if (query_pt.E && query_pt.E > 1) {
|
chartPointNode = {
|
GroupName: `${t("detailPage.parameterQuery.TR")}`,
|
ItemName: getTranslateString("效率"),
|
Tag: "ChartPointQueryE",
|
UnitNameUser: "%",
|
ValueUserUnit: query_pt.E,
|
ValueStdUnit: "",
|
UnitNameStd: "",
|
};
|
obj.nodeList.push(chartPointNode);
|
}
|
|
if (query_pt.P && query_pt.P > 0.1) {
|
chartPointNode = {
|
GroupName: `${t("detailPage.parameterQuery.TR")}`,
|
ItemName: getTranslateString("功率"),
|
Tag: "ChartPointQueryP",
|
UnitNameUser: UnitHelper.GetUnitNameP(unitSetting.UserUnitP),
|
ValueUserUnit: UnitHelper.getDispValueP(
|
UnitHelper.ConvertP_fromKW(unitSetting.UserUnitP, query_pt.P)
|
),
|
ValueStdUnit:
|
unitSetting.UserUnitP == unitSetting.StdUnitP
|
? ""
|
: UnitHelper.getDispValueP(
|
UnitHelper.ConvertP_fromKW(unitSetting.StdUnitP, query_pt.P)
|
),
|
UnitNameStd:
|
unitSetting.UserUnitP == unitSetting.StdUnitP
|
? ""
|
: UnitHelper.GetUnitNameP(unitSetting.StdUnitP),
|
};
|
obj.nodeList.push(chartPointNode);
|
}
|
if (query_pt.NPSH && query_pt.NPSH > 0.1) {
|
chartPointNode = {
|
GroupName: `${t("detailPage.parameterQuery.TR")}`,
|
ItemName: getTranslateString("汽蚀"),
|
Tag: "ChartPointQueryNPSH",
|
UnitNameUser: UnitHelper.GetUnitNameNPSH(unitSetting.UserUnitNPSH),
|
ValueUserUnit: UnitHelper.getDispValueNPSH(
|
UnitHelper.ConvertNPSH_fromM(unitSetting.UserUnitNPSH, query_pt.NPSH)
|
),
|
ValueStdUnit:
|
unitSetting.UserUnitNPSH == unitSetting.StdUnitNPSH
|
? ""
|
: UnitHelper.getDispValueNPSH(
|
UnitHelper.ConvertNPSH_fromM(
|
unitSetting.StdUnitNPSH,
|
query_pt.NPSH
|
)
|
),
|
UnitNameStd:
|
unitSetting.UserUnitNPSH == unitSetting.StdUnitNPSH
|
? ""
|
: UnitHelper.GetUnitNameNPSH(unitSetting.StdUnitNPSH),
|
};
|
obj.nodeList.push(chartPointNode);
|
}
|
|
state.m_chartQueryData = obj;
|
// console.log("m_chartQueryData", this.m_chartQueryData);
|
};
|
//设置参数查询的显示状态
|
const setChartQueryStatus = (status) => {
|
//console.log(status);
|
state.m_isChartQueryTableVisible = status;
|
};
|
defineExpose({
|
initPumpInfoData,
|
refreshPumpInfoData,
|
getConstantPtValue4Store,
|
});
|
</script>
|
|
<style lang="scss">
|
.table_box {
|
width: 99%;
|
height: 30px;
|
display: flex;
|
border-left: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
|
.content2 {
|
width: 100%;
|
height: 100%;
|
line-height: 30px;
|
text-align: center;
|
background-color: #fff;
|
border-top: 1px solid #e9e9e9 !important;
|
// border-right: 1px solid #e9e9e9;
|
border-bottom: 1px solid #e9e9e9 !important;
|
color: #000000;
|
font-size: 12px;
|
}
|
|
.content3 {
|
width: 100%;
|
height: 100%;
|
line-height: 30px;
|
text-align: center;
|
background-color: #fff;
|
border-top: 1px solid #e9e9e9 !important;
|
border-right: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
color: #000000;
|
font-size: 12px;
|
}
|
|
.table_head {
|
border-top: 1px solid #e9e9e9 !important;
|
border-bottom: 1px solid #e9e9e9 !important;
|
}
|
|
.el-input__inner {
|
height: 24px;
|
line-height: 24px;
|
border: 1px solid #fff;
|
padding: unset;
|
text-align: center;
|
}
|
|
.el-input__icon {
|
line-height: 24px;
|
width: 20px;
|
}
|
|
.el-input-number {
|
width: 100%;
|
line-height: unset;
|
}
|
|
.el-input-number__decrease {
|
display: block;
|
}
|
|
.el-input-number__increase {
|
display: block;
|
}
|
|
.install_content {
|
.el-input__inner {
|
text-align: left;
|
padding-left: 30px;
|
}
|
}
|
|
.custom_col_style {
|
display: flex;
|
max-width: unset;
|
flex: 1 auto;
|
}
|
|
#eidt_refresh_icon {
|
color: #409eff;
|
}
|
|
.refresh-icon-style {
|
display: inline-block;
|
font-size: 22px;
|
font-weight: bold;
|
position: absolute;
|
right: 5px;
|
top: 4px;
|
}
|
}
|
</style>
|