<template>
|
<div class="PumpDetailBody" v-loading="state.m_isShowLoadingFrm">
|
<div style="width: 100%; margin: 0 auto; height: 100%" class="page-content">
|
<el-row style="width: 100; height: 100%" class="homeBox">
|
<!-- 左侧导航菜单 -->
|
<el-col :span="3" class="leftBox">
|
<!-- 左侧导航菜单one -->
|
<el-menu id="one" :default-active="state.currentLeftMeunId" :default-opened="state.defaultLeftMeunId"
|
class="el-menu-vertical-demo" @select="onSelectLeftMenu">
|
<!-- 性能曲线 -->
|
<el-menu-item index="featCurve">{{
|
t("detailPage.performanceCurve.TR")
|
}}</el-menu-item>
|
<!-- 变速曲线 -->
|
<el-menu-item index="multiSpeedCurve" v-show="state.mainSetting.multiSpeedCurve.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.variableSpeedCurve.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 串并联曲线 -->
|
<el-menu-item index="connCurve" v-show="state.mainSetting.connCurve.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.seriesParallelConnection.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 安装图 -->
|
<el-menu-item index="assemFilePart" v-show="state.mainSetting.assemFilePart.tabVisible">
|
<template #title>
|
<span>{{ state.mainSetting.assemFilePart.tabText }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 安装机组图 -->
|
<el-menu-item index="assemFileSys" v-show="state.mainSetting.assemFileSys.tabVisible">
|
<template #title>
|
<span>{{ state.mainSetting.assemFileSys.tabText }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 动态安装机组图 -->
|
<el-menu-item index="dynamicAssemFileSys" v-show="state.mainSetting.dynamicAssemFileSys.tabVisible">
|
<template #title>
|
<span>{{ state.mainSetting.dynamicAssemFileSys.tabText }}</span>
|
</template>
|
</el-menu-item>
|
<!-- cad三维模型 -->
|
<el-menu-item index="cadModel" v-show="state.mainSetting.cadModel.tabVisible">
|
<template #title>
|
<span>{{ t("ebookPage.model_3D.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<!-- BIM模型 -->
|
<el-menu-item index="model3d" v-show="state.mainSetting.model3d.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.model_3D.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 尺寸图 -->
|
<el-menu-item index="productFilePart" v-show="state.mainSetting.productFilePart.tabVisible">
|
<template #title>
|
<span>{{ state.mainSetting.productFilePart.tabText }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 结构图/爆炸图 (二维) -->
|
<el-menu-item index="structFilePart" v-show="state.mainSetting.structFilePart.tabVisible">
|
<template #title>
|
<span>{{ state.mainSetting.structFilePart.tabText }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 结构图 (三维) -->
|
<el-menu-item index="seriesStructure3d" v-show="state.mainSetting.seriesStructure3d.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.structureDrawing.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 接线图 -->
|
<el-menu-item index="elecFile" v-show="state.mainSetting.elecFile.tabVisible">
|
<template #title>
|
<span>{{ state.mainSetting.elecFile.tabText }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 实物图(系统) -->
|
<el-menu-item index="realFilePart" v-show="state.mainSetting.realFilePart.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.modelDrawing.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<el-menu-item index="JieZhi" v-show="state.mainSetting.jiezhi.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.medium.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 文档 -->
|
<el-menu-item index="seriesDoc" v-show="state.mainSetting.seriesDoc.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.documents.TR") }}</span>
|
</template>
|
</el-menu-item>
|
<!-- 视频 -->
|
<el-menu-item index="seriesVideo" v-show="state.mainSetting.seriesVideo.tabVisible">
|
<template #title>
|
<span>{{ t("detailPage.video.TR") }}</span>
|
</template>
|
</el-menu-item>
|
</el-menu>
|
</el-col>
|
<!-- 中间显示部分 -->
|
<el-col id="middleDivBody" :span="14" class="midBox">
|
<!-- 离心泵曲线图 -->
|
<LXBChart v-show="state.mainSetting.featCurve.ctrVisible && state.m_pumpStyle == 0
|
" ref="lxbChartCtrl" @cbChangeChartQueryStatus="cbChangeChartQueryStatus"
|
@cbChangeChartQueryData="cbChangeChartQueryData">
|
</LXBChart>
|
<!-- 轴流泵曲线图 -->
|
<ZLBChart v-show="state.mainSetting.featCurve.ctrVisible && state.m_pumpStyle == 1
|
" ref="zlbChartCtrl" @cbChangeChartQueryStatus="cbChangeChartQueryStatus"
|
@cbChangeChartQueryData="cbChangeChartQueryData">
|
</ZLBChart>
|
<!-- 变频曲线图 -->
|
<MultiSpeedChart ref="multiSpeedChartCtrl" @cbChangeChartQueryData="cbChangeQueryDataByMultiSpeedChart"
|
@cbSetDispMSChartQueryData="cbSetDispMSChartQueryData"
|
v-show="state.mainSetting.multiSpeedCurve.ctrVisible">
|
</MultiSpeedChart>
|
<!-- 串并联曲线 -->
|
<conn-chart ref="connChartCtrl" v-show="state.mainSetting.connCurve.ctrVisible">
|
</conn-chart>
|
<!-- 电气图 -->
|
<PictureViver v-show="state.mainSetting.elecFile.ctrVisible" :path="state.mainComponentData.elecFile.path"
|
:width="300" :height="300"></PictureViver>
|
<!-- 实物图 -->
|
<PictureViver v-show="state.mainSetting.realFilePart.ctrVisible"
|
:path="state.mainComponentData.realFilePart.path" :width="300" :height="300"></PictureViver>
|
<!-- 结构图 -->
|
<RealPicture v-show="state.mainSetting.structFilePart.ctrVisible"
|
:sid="state.m_pumpInfoData.BaseInfo.SeriesID" :pid="state.m_pumpInfoData.BaseInfo.PumpID"
|
:path="state.mainComponentData.structFilePart.path" :cad="state.mainComponentData.structFilePart.cad"
|
:width="300" :height="300">
|
</RealPicture>
|
<!-- 产品尺寸图 -->
|
<RealPicture v-show="state.mainSetting.productFilePart.ctrVisible"
|
:sid="state.m_pumpInfoData.BaseInfo.SeriesID" :pid="state.m_pumpInfoData.BaseInfo.PumpID"
|
:path="state.mainComponentData.productFilePart.path" :cad="state.mainComponentData.productFilePart.cad"
|
:width="300" :height="300">
|
</RealPicture>
|
<!-- 安装图(泵头尺寸图) -->
|
<RealPicture v-show="state.mainSetting.assemFilePart.ctrVisible" tag="assemFilePart"
|
:sid="state.m_pumpInfoData.BaseInfo.SeriesID" :pid="state.m_pumpInfoData.BaseInfo.PumpID"
|
:path="state.mainComponentData.assemFilePart.path" :cad="state.mainComponentData.assemFilePart.cad"
|
:width="300" :height="300">
|
</RealPicture>
|
<!-- 安装图机组(安装尺寸图) -->
|
<RealPicture v-show="state.mainSetting.assemFileSys.ctrVisible" :sid="state.m_pumpInfoData.BaseInfo.SeriesID"
|
:pid="state.m_pumpInfoData.BaseInfo.PumpID" :path="state.mainComponentData.assemFileSys.path"
|
:cad="state.mainComponentData.assemFileSys.cad" :width="300" :height="300">
|
</RealPicture>
|
<!-- 安装图机组(动态图) -->
|
<dynamic-picture v-if="state.m_dynPict4Sys != null" dom-id="dynamicAssemFileSys" ref="DynamicAssemFileSysRef">
|
</dynamic-picture>
|
<attache-file ref="attachFileCtrl" v-show="state.mainSetting.seriesDoc.ctrVisible"></attache-file>
|
<!-- <SeriesStructure3d v-show="mainSetting.seriesStructure3d.ctrVisible" ref="seriesStructureCtrl">
|
</SeriesStructure3d> -->
|
<!-- <SeriesVideo v-if="mainSetting.seriesVideo.ctrVisible" ref="seriesVideoCtrl"></SeriesVideo> -->
|
<CadModel ref="cadModelCtrl" v-show="state.mainSetting.cadModel.ctrVisible"
|
:dispCtrl="state.Product3d.DispCtrl">
|
</CadModel>
|
<model3D v-show="state.mainSetting.model3d.ctrVisible" ref="model3dCtrl"></model3D>
|
</el-col>
|
<!-- 右侧参数表格 -->
|
<el-col :span="7" class="rightBox">
|
<div class="tab_panel_box">
|
<div class="tab_panel_box_continer">
|
<el-tabs ref="rightTabs" class="h100" v-model="state.currentRightMeunId" :before-leave="tabBeforeLeave"
|
@tab-click="onSelectRightMenu" type="card">
|
<!-- 运行参数 -->
|
<el-tab-pane id="params_tab_pane" class="h100" :label="t('detailPage.operatingParameters.TR')"
|
name="chartPoint">
|
<template #label>
|
<span name="chartPoint">
|
<i class="iconfont iconyunhangcanshu"></i>
|
{{ t("detailPage.operatingParameters.TR") }}
|
</span>
|
</template>
|
|
<div class="h100" style="overflow: auto">
|
<LXBSelectMainPoint v-show="state.m_pumpStyle == 0" ref="lxbSelectPointCtrl"
|
@cbChangeMotorPower="cbChangeMotorPowerInMainGrid" @cbRefreshByDp="refreshByDp"
|
@cbOpenErrorTips="cbOpenErrorTips" @cbCloseErrorTips="cbCloseErrorTips">
|
</LXBSelectMainPoint>
|
<LXBChartPointParas v-show="state.m_pumpStyle == 0" ref="lxbChartPointParasCtrl"
|
@refreshRegionByFlow="refreshRegionByFlow">
|
</LXBChartPointParas>
|
|
<ZLBSelectMainPoint v-show="state.m_pumpStyle == 1" ref="zlbSelectPointCtrl"
|
@cbChangeMotorPower="cbChangeMotorPowerInMainGrid" @cbRefreshByDp="refreshByDp">
|
</ZLBSelectMainPoint>
|
|
<ZLBChartPointParas v-show="state.m_pumpStyle == 1" ref="zlbChartPointParasCtrl"
|
@cbUpdateConstantLine="updateZlpConstantLine">
|
</ZLBChartPointParas>
|
</div>
|
</el-tab-pane>
|
<!-- 属性 -->
|
<el-tab-pane id="prop_tab_pane" style="height: 100%" :label="t('detailPage.properties.TR')" name="prop">
|
<template #label>
|
<span name="prop">
|
<i class="iconfont iconshuxing1"></i>
|
{{ t("detailPage.properties.TR") }}
|
</span>
|
</template>
|
<Prop ref="propCtrl" @cbOpenErrorTips="cbOpenErrorTips" @cbCloseErrorTips="cbCloseErrorTips"
|
@updateSelectMainPoint="cbUpdateSelectMainPoint"></Prop>
|
</el-tab-pane>
|
<!-- 材质 -->
|
<el-tab-pane id="material_tab_pane" class="h100" :label="t('detailPage.material.TR')" name="material">
|
<template #label>
|
<span name="material">
|
<i class="iconfont iconcaizhi"></i>
|
{{ t("detailPage.material.TR") }}
|
</span>
|
</template>
|
<Material ref="materialCtrl"></Material>
|
</el-tab-pane>
|
<!-- 变速曲线查询参数 -->
|
<el-tab-pane id="multiSpeedChart_tab_pane" class="h100" :label="t('detailPage.queryParams.TR')"
|
name="multiSpeedChartQueryTable">
|
<template #label>
|
<span name="queryParams">
|
<i class="iconfont iconxiangqing1"></i>
|
{{ t("detailPage.queryParams.TR") }}
|
</span>
|
</template>
|
<multi-speed-chart-query-table v-show="state.dispMulSpeedChartQueryTable"
|
ref="multiSpeedChartQueryTableRef"></multi-speed-chart-query-table>
|
</el-tab-pane>
|
<!-- 介质列表 -->
|
<el-tab-pane id="medium_tab_pane" class="h100" :label="t('detailPage.medium.TR')" name="mediumTable"
|
v-if="state.dispMediumTabPane">
|
<template #label>
|
<span name="medium">
|
<i class="iconfont iconjiezhi"></i>
|
{{ t("detailPage.medium.TR") }}
|
</span>
|
</template>
|
<medium ref="JieZhiFormRef"></medium>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
</template>
|
|
<script setup name="pumpDetail">
|
import { ref, reactive, nextTick } from "vue";
|
import { useRoute, useRouter } from "vue-router";
|
import {
|
ElMenu,
|
ElMenuItem,
|
ElRow,
|
ElCol,
|
ElTabs,
|
ElTabPane,
|
ElMessage,
|
} from "element-plus";
|
import { useI18n } from "vue-i18n";
|
import LXBChart from "./LXBChart.vue";
|
import ZLBChart from "./ZLBChart.vue";
|
import LXBSelectMainPoint from "./LXBSelectMainPoint.vue"; //右侧详情顶部参数选型表格 -- 离心泵
|
import LXBChartPointParas from "./LXBChartPointParas.vue"; //右侧详情底部工作点、最有区域表格 -- 离心泵
|
import ZLBSelectMainPoint from "./ZLBSelectMainPoint.vue"; //右侧详情顶部参数选型表格 -- 轴流泵
|
import ZLBChartPointParas from "./ZLBChartPointParas.vue"; //右侧详情底部工作点、最有区域表格 -- 轴流泵
|
import ConnChart from "./ConnChart.vue"; //串并联曲线
|
import MultiSpeedChartQueryTable from "./MultiSpeedChartQueryTable.vue"; //变速曲线查询参数
|
import Medium from "./Medium.vue";
|
import CadModel from "@/components/CADModel.vue"; //3D秀秀
|
import Prop from "./Prop.vue"; //属性
|
import Material from "./Material.vue"; //材质
|
import MultiSpeedChart from "./MultiSpeedChart.vue"; //变速曲线
|
import waterMarkHelper from "@/utils/waterMarkHelper.js";
|
import AttacheFile from "@/components/attachFile.vue";
|
|
|
import ConstParas from "@/utils/constParas.js";
|
import UserSettingsHelper from "@/utils/userSetting.js";
|
import coordinateHelper from "@/utils/coordinateHelper.js";
|
import axiosHelper from "@/utils/axiosHelper.js";
|
import PictureViver from "@/components/picture.vue";
|
import DynamicPicture from "@/components/dynamicPicture.vue";
|
|
import model3D from "@/components/model3DContainer.vue";
|
import RealPicture from "@/components/realPicture.vue";
|
import { useLogin } from "@/stores/useLogin";
|
import utils from "@/utils/utils.js";
|
const loginStore = useLogin();
|
const userInfo = loginStore.getUserInfo();
|
const route = useRoute();
|
const rightTabs = ref("");
|
const propCtrl = ref("");
|
const materialCtrl = ref("");
|
const JieZhiFormRef = ref("");
|
const lxbChartCtrl = ref("");
|
const lxbSelectPointCtrl = ref("");
|
const lxbChartPointParasCtrl = ref("");
|
const zlbSelectPointCtrl = ref("");
|
const zlbChartCtrl = ref("");
|
const zlbChartPointParasCtrl = ref("");
|
const multiSpeedChartCtrl = ref("");
|
const multiSpeedChartQueryTableRef = ref("");
|
const connChartCtrl = ref("");
|
const attachFileCtrl = ref("");
|
const seriesVideoCtrl = ref("");
|
const seriesStructureCtrl = ref("");
|
const model3dCtrl = ref("");
|
const cadModelCtrl = ref("");
|
|
const DynamicAssemFileSysRef = ref();
|
const { t } = useI18n();
|
|
const m_currentLanguage = 0;
|
|
const emit = defineEmits([
|
"cbOpenDetailIndexErrorTips",
|
"cbCloseDetailIndexErrorTips",
|
]);
|
|
let state = reactive({
|
m_corpShortName: "", //公司名称
|
dispPropTabPane: false,
|
dispMaterialTabPane: false,
|
dispMediumTabPane: false,
|
isShowLccCmd: true,
|
isShowLccDialog: false,
|
isShowShareCmd: true,
|
isShowShareDialog: false,
|
isShowReportDialog: false,
|
isShowInQuiryPriceDialog: false,
|
m_motorAllowMaxPtDict: null, //不同电机 对应不同最大运行区域点
|
m_pageFrom: 0, //页面来源
|
m_pagePurpose: 0, //打开的目的
|
|
m_userUnitSetting: null, //用户全局单位配置 Q H E P D2 这几个变量
|
m_pumpInfoData: {
|
BaseInfo: {
|
SeriesID: 0,
|
PumpID: 0,
|
},
|
}, //泵信息
|
m_pumpBaseInfo: {
|
DispPumpName: "",
|
PumpName: "",
|
SeriesName: "",
|
CatalogName: "",
|
},
|
|
m_pumpStyle: 0, //当前泵的类型 0表示离心泵 1 表示轴流泵
|
m_selMotorPower: 0, //电机功率
|
m_calcMotorPowerPtPosi: 5, //电机功率匹配方式 5 设计点功率乘以一个系数(固定) 7 产品编号和切割型号名简单匹配
|
|
m_isShowLoadingFrm: false, //等待框
|
|
jieZhiParas: {
|
ID: 0,
|
MiDu: 1000,
|
NianDu: 1,
|
Name: "water",
|
isNdCor: false,
|
},
|
|
ChartPointGridQuery: [], //接口返回的参数信息
|
|
defaultLeftMeunId: ["featCurve"], //左侧菜单 默认展开的菜单的索引
|
currentLeftMeunId: "featCurve", //当前左侧上部分菜单默认展开的菜单索引
|
|
currentRightMeunId: "chartPoint", //当前右侧菜单默认激活的菜单名称
|
m_dynPict4Sys: null, //机组动态图配置
|
m_model3dSetting: {
|
//三维模型设置
|
BimFileLaws: null,
|
CurrentViewModelPath: null, //fbx文件
|
NextViewModelPath: null, //
|
CurrentDsModelPath: null, //rfa文件
|
isInitialFinish: false, //是否加载过
|
IsHaveDim: false, //是否有尺寸
|
LawID: 0,
|
},
|
|
m_toleranceParas: null, //容差
|
mainSetting: {
|
featCurve: { tabVisible: true, ctrVisible: true, tabText: "曲线" },
|
multiSpeedCurve: {
|
tabVisible: true,
|
ctrVisible: false,
|
tabText: "变速曲线",
|
},
|
connCurve: {
|
tabVisible: true,
|
ctrVisible: false,
|
tabText: "串并联曲线",
|
},
|
assemFilePart: {
|
tabVisible: true,
|
ctrVisible: false,
|
tabText: "安装图",
|
},
|
assemFileSys: {
|
tabVisible: false,
|
ctrVisible: false,
|
tabText: "安装图(机组)",
|
},
|
dynamicAssemFileSys: {
|
tabVisible: false,
|
ctrVisible: false,
|
tabText: "安装图(机组)",
|
},
|
structFilePart: {
|
tabVisible: true,
|
ctrVisible: false,
|
tabText: "结构图",
|
},
|
productFilePart: {
|
tabVisible: false,
|
ctrVisible: false,
|
tabText: "产品尺寸图",
|
},
|
realFilePart: {
|
tabVisible: true,
|
ctrVisible: false,
|
tabText: " ",
|
},
|
elecFile: {
|
tabVisible: false,
|
ctrVisible: false,
|
tabText: "电气图",
|
},
|
seriesStructure3d: {
|
tabVisible: false,
|
ctrVisible: false,
|
tabText: " ",
|
},
|
seriesVideo: {
|
tabVisible: false,
|
ctrVisible: false,
|
tabText: " ",
|
},
|
jiezhi: { tabVisible: false, ctrVisible: false, tabText: " " },
|
seriesDoc: { tabVisible: true, ctrVisible: false, tabText: " " },
|
material: { tabVisible: false, ctrVisible: false, tabText: " " },
|
chartPoint: { tabVisible: false, ctrVisible: true, tabText: " " },
|
prop: { tabVisible: true, ctrVisible: false, tabText: " " },
|
cadModel: { tabVisible: false, ctrVisible: false, tabText: " " },
|
model3d: {
|
tabVisible: false,
|
ctrVisible: false,
|
tabText: " ",
|
isInitialOK: false,
|
url: "",
|
},
|
},
|
mainComponentData: {
|
assemFilePart: {
|
cad: "",
|
path: "",
|
},
|
assemFileSys: {
|
cad: "",
|
path: "",
|
},
|
structFilePart: {
|
cad: "",
|
path: "",
|
},
|
productFilePart: {
|
cad: "",
|
path: "",
|
},
|
realFilePart: {
|
path: "",
|
},
|
elecFile: {
|
cad: "",
|
path: "",
|
},
|
seriesStructure3d: {
|
path: "",
|
},
|
seriesVideo: {
|
path: "",
|
},
|
},
|
Product3d: {
|
DispCtrl: ConstParas.Disp3dMethod.CAD_3DShowShow, //默认是3d秀秀
|
},
|
|
m_IsShowRight: {
|
report: false,
|
share: false,
|
lcc: false,
|
}, //头部按钮是否显示在右边
|
m_IsInitPropData: false, //判断是否初始化了属性数据
|
dispMulSpeedChartQueryTable: false,
|
});
|
|
//获取整个页面初始的详情数据
|
const initDetailPageData = (pageData) => {
|
//设置控件配置
|
setCtrlConfig();
|
var waterName = "water";
|
if (m_currentLanguage == 0) {
|
waterName = "清水";
|
}
|
|
var jieZhiParas = {
|
ID: 0,
|
MiDu: 1000,
|
NianDu: 1,
|
Name: waterName,
|
isNdCor: false,
|
V_C: 100, //体积浓度
|
};
|
let jzkey = ["jzid", "jzmd", "jznd", "jzmz", "isndc", "jzvc"];
|
jzkey.forEach((item) => {
|
if (Object.keys(route.query).includes(item)) {
|
state.dispMediumTabPane = true;
|
}
|
});
|
jieZhiParas.ID = route.query.jzid || "0";
|
jieZhiParas.MiDu = route.query.jzmd || 1000;
|
jieZhiParas.NianDu = route.query.jznd || 1;
|
jieZhiParas.Name = route.query.jzmz || waterName;
|
jieZhiParas.isNdCor = route.query.isndc || false;
|
jieZhiParas.V_C = route.query.jzvc || 100;
|
state.jieZhiParas = jieZhiParas;
|
|
let requestData = {
|
DpQ: route.query.DpQ || "",
|
DpH: route.query.DpH || "",
|
DpQu: route.query.DpQu,
|
DpHu: route.query.DpHu,
|
TolGrade: route.query.TGrade || 0,
|
TolRatioMinQ: route.query.TRatioMinQ || 0,
|
TolRatioMaxQ: route.query.TRatioMaxQ || 0,
|
TolRatioMinH: route.query.TRatioMinH || 0,
|
TolRatioMaxH: route.query.TRatioMaxH || 0,
|
};
|
|
if (requestData.TolGrade > 0) {
|
let m_toleranceParas = {};
|
m_toleranceParas.Grade = requestData.TolGrade;
|
m_toleranceParas.RatioMinQ = requestData.TolRatioMinQ;
|
m_toleranceParas.RatioMaxQ = requestData.TolRatioMaxQ;
|
m_toleranceParas.RatioMinH = requestData.TolRatioMinH;
|
m_toleranceParas.RatioMaxH = requestData.TolRatioMaxH;
|
|
state.m_toleranceParas = m_toleranceParas;
|
}
|
|
state.m_isShowLoadingFrm = false;
|
|
const pumpInfoData = pageData; //泵详细所有数据
|
if (pumpInfoData == null) {
|
return;
|
}
|
|
state.m_pumpInfoData = pumpInfoData;
|
const pumpBaseInfo = pumpInfoData.BaseInfo;
|
if (pumpBaseInfo == null) {
|
return;
|
}
|
|
//设置单位,根据用户设置
|
setUnitByUserSetting(pumpInfoData, requestData);
|
|
//
|
if (state.m_designPointParas != null) {
|
state.m_designPointParas.WrkSpeed = pumpBaseInfo.WrkSpeed;
|
state.m_designPointParas.WrkD2 = pumpBaseInfo.WrkD2;
|
}
|
let pumpBaseInfo_g = {};
|
pumpBaseInfo_g.SeriesID = pumpBaseInfo.SeriesID;
|
pumpBaseInfo_g.PumpID = pumpBaseInfo.PumpID; //主ID
|
pumpBaseInfo_g.SubID = pumpBaseInfo.SubID; //切割
|
pumpBaseInfo_g.CatalogName = pumpBaseInfo.CatalogName || "";
|
pumpBaseInfo_g.SeriesName = pumpBaseInfo.SeriesName || "";
|
pumpBaseInfo_g.PumpName = pumpBaseInfo.PumpName || "";
|
pumpBaseInfo_g.FirePumpType = pumpBaseInfo.FirePumpType || 0;
|
pumpBaseInfo_g.DriveType = requestData.DriveType; //驱动方式
|
pumpBaseInfo_g.DriveSpeed = requestData.DriveSpeed; //柴油机转速
|
pumpBaseInfo_g.PumpStyle = pumpBaseInfo.PumpStyle;
|
pumpBaseInfo_g.IsMainModel = pumpBaseInfo.IsMainModel;
|
pumpBaseInfo_g.SubPumpName = pumpBaseInfo.SubPumpName;
|
pumpBaseInfo_g.DispPumpName = pumpBaseInfo.PumpName;
|
pumpBaseInfo_g.AssemFilePageVisible = pumpBaseInfo.AssemFilePageVisible;
|
pumpBaseInfo_g.DimFilePageVisible = pumpBaseInfo.DimFilePageVisible;
|
pumpBaseInfo_g.ElecFilePageVisible = pumpBaseInfo.ElecFilePageVisible;
|
pumpBaseInfo_g.StructFilePageVisible = pumpBaseInfo.StructFilePageVisible;
|
if (pumpBaseInfo.IsMainModel == false) {
|
pumpBaseInfo_g.DispPumpName = pumpBaseInfo.SubPumpName;
|
}
|
if (pumpInfoData.ReportSetting) {
|
pumpBaseInfo_g.ReportSetting = pumpInfoData.ReportSetting;
|
}
|
//
|
state.m_pumpBaseInfo = pumpBaseInfo_g;
|
|
// 设置tab按钮的翻译
|
state.mainSetting.assemFilePart.tabText = pumpBaseInfo.AssemFileLabelName
|
? pumpBaseInfo.AssemFileLabelName
|
: state.mainSetting.assemFilePart.tabText;
|
state.mainSetting.structFilePart.tabText = pumpBaseInfo.StructFileLabelName
|
? pumpBaseInfo.StructFileLabelName
|
: state.mainSetting.structFilePart.tabText;
|
state.mainSetting.productFilePart.tabText = pumpBaseInfo.DimFileLabelName
|
? pumpBaseInfo.DimFileLabelName
|
: state.mainSetting.productFilePart.tabText;
|
state.mainSetting.elecFile.tabText = pumpBaseInfo.ElecFileLabelName
|
? pumpBaseInfo.ElecFileLabelName
|
: state.mainSetting.elecFile.tabText;
|
|
// 设置左侧tab按钮的显示隐藏
|
state.mainSetting.assemFilePart.tabVisible =
|
state.m_pumpBaseInfo.AssemFilePageVisible;
|
state.mainSetting.structFilePart.tabVisible =
|
state.m_pumpBaseInfo.StructFilePageVisible;
|
state.mainSetting.productFilePart.tabVisible =
|
state.m_pumpBaseInfo.DimFilePageVisible;
|
state.mainSetting.elecFile.tabVisible =
|
state.m_pumpBaseInfo.ElecFilePageVisible;
|
|
// 判断左侧tab菜单的安装图(机组)是否是动态图
|
if (pumpInfoData.DynFileAssemSys) {
|
state.mainSetting.dynamicAssemFileSys.tabVisible = true;
|
state.m_dynPict4Sys = {};
|
(state.m_dynPict4Sys.isSuccess = pumpInfoData.DynFileAssemSys.IsSuccess),
|
(state.m_dynPict4Sys.TemplateImageFilePath =
|
pumpInfoData.DynFileAssemSys.TemplateImageFilePath);
|
(state.m_dynPict4Sys.criticalItem4Template =
|
pumpInfoData.DynFileAssemSys.CriticalItem4Template),
|
(state.m_dynPict4Sys.criticalItem4CsvRow =
|
pumpInfoData.DynFileAssemSys.CriticalItem4CsvRow);
|
|
let dyn_data_info = {
|
pumpBaseInfo: state.m_pumpBaseInfo,
|
isSuccess: pumpInfoData.DynFileAssemSys.IsSuccess,
|
filepath: pumpInfoData.DynFileAssemSys.TemplateImageFilePath,
|
allTextInfo: pumpInfoData.DynFileAssemSys.AllTextInfo,
|
note: pumpInfoData.DynFileAssemSys.Info,
|
};
|
nextTick(() => {
|
DynamicAssemFileSysRef.value.initDynamicPictureData(dyn_data_info);
|
});
|
}
|
//console.log(pumpBaseInfo_g);
|
|
// 设置变速曲线左侧菜单按钮是否显示
|
if (pumpInfoData.SettingInfo.IsDispSpeedSimuCurve != undefined) {
|
state.mainSetting.multiSpeedCurve.tabVisible =
|
pumpInfoData.SettingInfo.IsDispSpeedSimuCurve;
|
}
|
|
document.title = state.m_pumpBaseInfo.DispPumpName;
|
|
state.m_calcMotorPowerPtPosi = pumpInfoData.SettingInfo.CalcMotorPowerPtPosi;
|
//
|
state.m_pumpStyle = pumpBaseInfo.PumpStyle;
|
|
//三维模型
|
state.m_model3dSetting.BimFileLaws = pumpInfoData.BimFileLaws;
|
|
//判断是否有产品结构图(三维)
|
if (
|
pumpInfoData.Struct3d != null &&
|
pumpInfoData.Struct3d.DispCtrl == ConstParas.Disp3dMethod.NONE
|
) {
|
state.mainSetting.seriesStructure3d.tabVisible = true;
|
let url =
|
window.globalConfig.WebApiUrl.FileUrl +
|
pumpInfoData.Struct3d.Info;
|
createAsyncTask().then(() => {
|
initSeriesStructureByThreeD(url);
|
});
|
} else {
|
if (!pumpInfoData.Product3d) {
|
state.Product3d.DispCtrl = ConstParas.Disp3dMethod.CAD_3DShowShow;
|
}
|
//3D
|
if (pumpInfoData.Product3d != null && pumpInfoData.Product3d.Info != null) {
|
if (pumpInfoData.Product3d.DispCtrl) {
|
state.Product3d.DispCtrl = pumpInfoData.Product3d.DispCtrl;
|
if (
|
pumpInfoData.Product3d.DispCtrl ==
|
ConstParas.Disp3dMethod.CAD_3DShowShow
|
) {
|
state.mainSetting.cadModel.tabVisible = true;
|
state.mainSetting.cadModel.url =
|
"http://www.3dxiuxiu.cn/web/view_admin.html?modelId=" +
|
pumpInfoData.Product3d.Info;
|
}
|
if (
|
pumpInfoData.Product3d.DispCtrl == ConstParas.Disp3dMethod.CAD_51JM
|
) {
|
state.mainSetting.cadModel.tabVisible = true;
|
state.mainSetting.cadModel.url =
|
"https://www.51jianmo.com/newModel/?code=" +
|
pumpInfoData.Product3d.Info +
|
"&desc=1&icon=1&type=1&quick=0&opacity=1&full=0&isxcx=0";
|
}
|
}
|
}
|
}
|
//判断是否有视频
|
if (pumpInfoData.Video != null) {
|
if (window.pageConfig.PumpDetailPage.LeftMenuBar.Video.isShow) {
|
state.mainSetting.seriesVideo.tabVisible = true;
|
state.mainComponentData.seriesVideo.path =
|
pumpInfoData.Video.AddressContent;
|
}
|
}
|
// 初始化介质
|
if (state.dispMediumTabPane) {
|
initMedium();
|
}
|
//材料
|
if (pumpInfoData.MaterialGrpList && pumpInfoData.MaterialGrpList.length > 0) {
|
createAsyncTask()
|
.then(() => {
|
initMaterial(pumpInfoData);
|
})
|
.catch();
|
} else {
|
state.mainSetting.material.tabVisible = false;
|
document.getElementById("tab-material").style.display = "none";
|
}
|
//如果没有图表参数就隐藏掉参数表格
|
if (!pumpInfoData.ChartPointPara) {
|
state.mainSetting.chartPoint.tabVisible = false;
|
state.currentRightMeunId = "prop";
|
document.getElementById("tab-chartPoint").style.display = "none";
|
}
|
|
// 默认隐藏变速曲线查询参数
|
if (!state.mainSetting.multiSpeedCurve.ctrVisible) {
|
settingMSChartQueryTableDisp(false);
|
}
|
//电机(轴流泵 暂时没有)
|
if (pumpInfoData.ChartPointPara != null) {
|
state.m_motorAllowMaxPtDict =
|
pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
|
}
|
|
//刷新了产品属性列表
|
propCtrl.value.setRefreshPropListCb((propList) => {
|
setBimFileByPropList(propList); //BIM 文件
|
});
|
//修改了所选产品
|
propCtrl.value.setChangeSelectPartCb((sel_part) => {
|
//刷新动态图
|
refreshDynPicture4Part(sel_part);
|
});
|
//修改了所选产品
|
propCtrl.value.setRefreshPropValueCb((prop, method) => {
|
//刷新动态图
|
refreshDynPicture4Prop(prop);
|
});
|
//修改了产品图片回调
|
propCtrl.value.setImageFilePathCb((type, file) => {
|
setImageFile(type, file);
|
});
|
|
createAsyncTask().then(() => {
|
let pumpBaseInfo = state.m_pumpInfoData.BaseInfo;
|
let pumpInfoData = state.m_pumpInfoData;
|
|
//附件
|
initAttachFile(pumpBaseInfo, pumpInfoData);
|
|
//初始化属性控件
|
propCtrl.value.initialData(
|
m_currentLanguage,
|
pumpBaseInfo,
|
pumpInfoData.PartFullInfo,
|
pumpInfoData.SettingInfo
|
);
|
|
//propCtrl.value.setBaseInfo(pumpBaseInfo, pumpInfoData.SettingInfo);
|
// propCtrl.value.setLaw4(pumpInfoData.PartFullInfo);
|
// // 初始化图片构建
|
// let PartList = pumpInfoData.PartFullInfo.PartList;
|
// if (PartList && PartList.length > 0) {
|
// let defaultPart = PartList[0];
|
// propCtrl.value.setCurrentPartInfo(defaultPart);
|
// } else {
|
// propCtrl.value.BuildAllPictureFile();
|
// }
|
});
|
|
// 初始化属性和图表
|
createAsyncTask()
|
.then(() => {
|
initCurve(pumpBaseInfo, pumpInfoData);
|
})
|
.catch((err) => {
|
console.log(err);
|
});
|
};
|
//刷新动态图,修改产品
|
const refreshDynPicture4Part = (sel_part) => {
|
if (state.m_dynPict4Sys == null || sel_part == null) return;
|
|
var isRefresData = false;
|
if (state.m_dynPict4Sys.criticalItem4CsvRow != null) {
|
for (var i = 0; i < state.m_dynPict4Sys.criticalItem4CsvRow.length; i++) {
|
if (state.m_dynPict4Sys.criticalItem4CsvRow[i].Type == 0) {
|
isRefresData = true;
|
}
|
}
|
}
|
if (state.m_dynPict4Sys.criticalItem4Template != null) {
|
for (var i = 0; i < state.m_dynPict4Sys.criticalItem4Template.length; i++) {
|
if (state.m_dynPict4Sys.criticalItem4Template[i].Type == 0) {
|
isRefresData = true;
|
}
|
}
|
}
|
console.log("refreshDynPicture4Part isRefresData:" + isRefresData);
|
if (!isRefresData) {
|
return;
|
}
|
|
refreshDynPictData(sel_part);
|
};
|
//刷新动态图,修改产品
|
const refreshDynPicture4Prop = (prop) => {
|
if (prop == null) return;
|
|
if (state.m_dynPict4Sys == null) return;
|
//
|
DynamicAssemFileSysRef.value.refreshPropValue(prop);
|
|
if (prop.Tag == null) return;
|
|
var isRefresData = false;
|
if (state.m_dynPict4Sys.criticalItem4CsvRow != null) {
|
for (var i = 0; i < state.m_dynPict4Sys.criticalItem4CsvRow.length; i++) {
|
if (state.m_dynPict4Sys.criticalItem4CsvRow[i].Type == 2) {
|
if (state.m_dynPict4Sys.criticalItem4CsvRow[i].Tag == prop.Tag)
|
isRefresData = true;
|
}
|
}
|
}
|
if (state.m_dynPict4Sys.criticalItem4Template != null) {
|
for (var i = 0; i < state.m_dynPict4Sys.criticalItem4Template.length; i++) {
|
if (state.m_dynPict4Sys.criticalItem4Template[i].Type == 2) {
|
if (state.m_dynPict4Sys.criticalItem4Template[i].Tag == prop.Tag)
|
isRefresData = true;
|
}
|
}
|
}
|
|
if (!isRefresData) {
|
return;
|
}
|
var sel_part = propCtrl.value.GetCurrentPartEntity();
|
|
refreshDynPictData(sel_part);
|
};
|
const refreshDynPictData = (sel_part) => {
|
if (sel_part == null || sel_part.PartPropList == null) return;
|
|
var propStore = propCtrl.value.GetPartProp4Store2(sel_part.PartPropList);
|
|
let requestData = {
|
SeriesID: state.m_pumpBaseInfo.SeriesID,
|
ProductID: state.m_pumpBaseInfo.PumpID,
|
SubID: state.m_pumpBaseInfo.SubID,
|
PartID: sel_part.PartID,
|
PartProp: propStore,
|
};
|
|
state.m_isShowLoadingFrm = true;
|
axiosHelper
|
.post({
|
version: 3,
|
lang: m_currentLanguage,
|
//isAddLangParam : "false",
|
controller: "PumpDetailByPara",
|
action: "RefreshDynPict",
|
data: requestData,
|
apiUrlType: "main",
|
})
|
.then((res) => {
|
state.m_isShowLoadingFrm = false;
|
let resdata = res.data;
|
if (resdata.Code != 0) {
|
ElMessage(resdata.Message);
|
return;
|
}
|
|
let reponstData = resdata.Data;
|
if (reponstData == null) {
|
ElMessage("error:684");
|
return;
|
}
|
let dyn_data_info = {
|
pumpBaseInfo: state.m_pumpBaseInfo,
|
isSuccess: reponstData.IsSuccess,
|
filepath: reponstData.TemplateImageFilePath,
|
allTextInfo: reponstData.AllTextInfo,
|
note: reponstData.Info,
|
};
|
nextTick(() => {
|
DynamicAssemFileSysRef.value.updateDrawView(dyn_data_info);
|
});
|
//console.log(reponstData);
|
});
|
};
|
// 初始化属性
|
const initProp = () => {
|
// let pumpBaseInfo = state.m_pumpInfoData.BaseInfo;
|
// let pumpInfoData = state.m_pumpInfoData;
|
// //初始化属性控件
|
// propCtrl.value.initialData(
|
// m_currentLanguage,
|
// pumpBaseInfo,
|
// pumpInfoData.PartFullInfo,
|
// pumpInfoData.SettingInfo
|
// );
|
};
|
// 初始化曲线
|
const initCurve = (pumpBaseInfo, pumpInfoData) => {
|
//图表控件
|
if (pumpBaseInfo.PumpStyle == ConstParas.PumpStyle.LXP) {
|
//判断当前是否是离心泵
|
var cb_dict = {
|
//设置曲线修改回调函数
|
setChangeWrkCurveCb: function (curve) {
|
var dp = lxbSelectPointCtrl.value.getDesignParas();
|
|
if (multiSpeedChartCtrl.value != null)
|
multiSpeedChartCtrl.value.setWrkCurveInfo(dp, curve);
|
|
if (connChartCtrl.value != null)
|
connChartCtrl.value.setWrkCurveInfo(dp, curve);
|
},
|
};
|
|
if (pumpInfoData.ChartPointPara !== null) {
|
state.m_motorAllowMaxPtDict =
|
pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
|
}
|
|
//获取中间部分的尺寸,由于变频曲线开始时隐藏的,内部无法获取尺寸,只能传入进去
|
var chart_diagram_size = lxbChartCtrl.value.getDiagramSize();
|
//
|
multiSpeedChartCtrl.value.initPumpInfoData(
|
//放在lxbChartCtrl.initPumpInfoData 之前
|
m_currentLanguage,
|
pumpInfoData,
|
chart_diagram_size
|
);
|
|
connChartCtrl.value.initPumpInfoData(
|
m_currentLanguage,
|
pumpInfoData,
|
chart_diagram_size
|
);
|
|
lxbChartCtrl.value.initPumpInfoData(
|
m_currentLanguage,
|
pumpInfoData,
|
cb_dict,
|
state.m_userUnitSetting
|
);
|
initLxbSelectPoint(pumpInfoData);
|
|
initLxbChartPointParas(pumpInfoData);
|
} else if (pumpBaseInfo.PumpStyle == ConstParas.PumpStyle.ZLP) {
|
//轴流泵
|
var cb_dict = {
|
//设置曲线修改回调函数
|
setChangeWrkCurveCb: function (curve) {
|
// if (_this.$refs.multiSpeedChartCtrl == null) return;
|
// _this.$refs.multiSpeedChartCtrl.setWrkCurveInfo(curve);
|
},
|
};
|
|
state.mainSetting.multiSpeedCurve.tabVisible = false; // 轴流泵 暂时不开放
|
state.mainSetting.connCurve.tabVisible = false; //轴流泵 暂不开放串并联曲线
|
|
zlbSelectPointCtrl.value.initPumpInfoData(m_currentLanguage, pumpInfoData);
|
zlbChartPointParasCtrl.value.initPumpInfoData(
|
m_currentLanguage,
|
pumpInfoData
|
);
|
zlbChartCtrl.value.initPumpInfoData(
|
m_currentLanguage,
|
pumpInfoData,
|
cb_dict,
|
state.m_userUnitSetting
|
);
|
}
|
};
|
// 初始化离心泵选型点
|
const initLxbSelectPoint = (pumpInfoData) => {
|
lxbSelectPointCtrl.value.initPumpInfoData(m_currentLanguage, pumpInfoData);
|
};
|
// 初始化离心泵图表参数点
|
const initLxbChartPointParas = (pumpInfoData) => {
|
lxbChartPointParasCtrl.value.initPumpInfoData(
|
m_currentLanguage,
|
pumpInfoData
|
);
|
};
|
// 初始化附件
|
const initAttachFile = (pumpBaseInfo, pumpInfoData) => {
|
nextTick(() => {
|
attachFileCtrl.value.initialFileList(
|
pumpBaseInfo.SeriesID,
|
pumpInfoData.AttachFiles
|
);
|
});
|
};
|
// 初始化材料
|
const initMaterial = (pumpInfoData) => {
|
state.mainSetting.material.tabVisible = true;
|
materialCtrl.value.initialData(pumpInfoData.MaterialGrpList);
|
};
|
const initMedium = () => {
|
nextTick(() => {
|
JieZhiFormRef.value &&
|
JieZhiFormRef.value.initJieZhiParas(state.jieZhiParas);
|
});
|
};
|
// 初始化视频路径
|
const initVideoSrc = (src) => {
|
nextTick(() => {
|
seriesVideoCtrl.value.initVideoSrc(src);
|
});
|
};
|
// 初始化爆炸图(三维)
|
const initSeriesStructureByThreeD = (url) => {
|
seriesStructureCtrl.value.initFrameUrl(url);
|
};
|
//到登陆界面
|
const gotoLoginPage = () => {
|
loginStore.preLoginPageRoute(route.fullPath);
|
loginStore.login(route.fullPath);
|
};
|
//设置控件配置
|
const setCtrlConfig = () => {
|
state.mainSetting.multiSpeedCurve.tabVisible = true;
|
|
let leftMenuBar = window.pageConfig.PumpDetailPage.LeftMenuBar;
|
|
state.mainSetting.seriesVideo.tabVisible = leftMenuBar.Video.isShow;
|
// 设置左侧菜单文字是爆炸图还是结构图
|
if (
|
leftMenuBar.StructFile &&
|
leftMenuBar.StructFile.tabText == "explosionDiagram"
|
) {
|
state.mainSetting.structFilePart.tabText = `${t(
|
"detailPage.explosionDiagram.TR"
|
)}`;
|
} else {
|
state.mainSetting.structFilePart.tabText = `${t(
|
"detailPage.structureDrawing.TR"
|
)}`;
|
}
|
//设置左侧菜单文字是安装图(单泵)还是泵头尺寸图
|
if (
|
leftMenuBar.assemFilePart &&
|
leftMenuBar.assemFilePart.tabText == "pumpDimensions"
|
) {
|
state.mainSetting.assemFilePart.tabText = `${t(
|
"detailPage.pumpDimensions.TR"
|
)}`;
|
} else {
|
state.mainSetting.assemFilePart.tabText = `${t(
|
"detailPage.assemblyDrawing.TR"
|
)}`;
|
}
|
|
//设置左侧菜单文字是安装图(机组)还是安装尺寸图
|
if (
|
leftMenuBar.assemFileSys &&
|
leftMenuBar.assemFileSys.tabText == "outlineDrawing"
|
) {
|
state.mainSetting.assemFileSys.tabText = `${t(
|
"detailPage.outlineDrawing.TR"
|
)}`;
|
state.mainSetting.dynamicAssemFileSys.tabText = `${t(
|
"detailPage.outlineDrawing.TR"
|
)}`;
|
} else {
|
state.mainSetting.dynamicAssemFileSys.tabText = `${t(
|
"detailPage.assemblyDrawingSys.TR"
|
)}`;
|
}
|
};
|
//修改了区域参数的流量(m3h单位下)
|
const refreshRegionByFlow = (flow_m3h, tag) => {
|
if (flow_m3h == null) return;
|
//判断当前是否是离心泵
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
var grp_pt = lxbChartCtrl.value.refreshRegionByFlow(flow_m3h, tag);
|
if (grp_pt != null) {
|
lxbChartPointParasCtrl.value.refreshRegionPtParas(grp_pt, tag);
|
}
|
// _this.calcChartPointGrid();
|
}
|
};
|
//子组件 修改设计点 刷新页面
|
const refreshByDp = (designPointParas) => {
|
//
|
if (designPointParas == null) return;
|
if (designPointParas.DpQ == null || designPointParas.DpQ == "") return;
|
if (designPointParas.DpH == null || designPointParas.DpH == "") return;
|
|
var zeroH = 0;
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
if (lxbChartCtrl.value != null) zeroH = lxbChartCtrl.value.getEquipCurveZeroH();
|
}
|
|
var jieZhiParas = state.jieZhiParas;
|
|
let isAllowSpeed = true;
|
let isAllowCut = true;
|
|
if (route.query.isspeed != undefined) {
|
isAllowSpeed = Number(route.query.isspeed) ? true : false;
|
}
|
if (route.query.iscut != undefined) {
|
isAllowCut = Number(route.query.iscut) ? true : false;
|
}
|
|
let requestData = {
|
SID: state.m_pumpBaseInfo.SeriesID,
|
PID: state.m_pumpBaseInfo.PumpID,
|
SubID: state.m_pumpBaseInfo.SubID,
|
|
DpQ: designPointParas.DpQ + "",
|
DpH: designPointParas.DpH + "",
|
DpQu: designPointParas.DpQu + "",
|
DpHu: designPointParas.DpHu + "",
|
|
FirePumpType: state.m_pumpBaseInfo.FirePumpType || "0",
|
DriveType: state.m_pumpBaseInfo.DriveType || "", //驱动方式
|
DriveSpeed: state.m_pumpBaseInfo.DriveSpeed || "", //柴油机转速
|
|
WorkSpeed: designPointParas.WrkSpeed,
|
IsChangeSpeed: false,
|
|
jzID: Number(jieZhiParas.ID),
|
jzMiDu: jieZhiParas.MiDu.toString(),
|
jzNianDu: jieZhiParas.NianDu.toString(),
|
jzName: jieZhiParas.Name.toString(),
|
isNdCor: jieZhiParas.isNdCor,
|
|
EquipCurveZeroH: zeroH,
|
IsAllowSpeed: isAllowSpeed,
|
IsAllowCut: isAllowCut
|
};
|
|
var isChangeSpeed = false;
|
if (requestData.WorkSpeed && requestData.WorkSpeed > 10) {
|
if (state.m_pumpInfoData.BaseInfo.WrkSpeed != requestData.WorkSpeed) {
|
state.m_pumpInfoData.BaseInfo.WrkSpeed = requestData.WorkSpeed;
|
isChangeSpeed = true;
|
}
|
}
|
requestData.IsChangeSpeed = isChangeSpeed;
|
|
|
state.m_isShowLoadingFrm = true;
|
axiosHelper
|
.post({
|
version: 3,
|
lang: m_currentLanguage,
|
controller: "PumpDetailByPara",
|
action: "CalcByDp",
|
data: requestData,
|
apiUrlType: "main",
|
})
|
.then(function (res) {
|
state.m_isShowLoadingFrm = false;
|
let resdata = res.data;
|
if (resdata.Code != 0) {
|
ElMessage(resdata.Message);
|
return;
|
}
|
|
let pumpInfoData = resdata.Data;
|
if (pumpInfoData == null) {
|
ElMessage("error:684");
|
return;
|
}
|
var baseInfo = pumpInfoData.BaseInfo;
|
//判断是否是切割型
|
state.m_pumpBaseInfo.IsMainModel = baseInfo.IsMainModel;
|
state.m_pumpBaseInfo.SubID = baseInfo.SubID;
|
state.m_pumpBaseInfo.SubPumpName = baseInfo.SubPumpName;
|
state.m_pumpBaseInfo.DispPumpName = baseInfo.PumpName;
|
if (baseInfo.IsMainModel == false) {
|
state.m_pumpBaseInfo.DispPumpName = baseInfo.SubPumpName;
|
}
|
if (state.m_calcMotorPowerPtPosi == 7) {
|
propCtrl.value.setCurrentPartByPartNO(
|
state.m_pumpBaseInfo.DispPumpName
|
);
|
}
|
if (pumpInfoData.ChartPointPara) {
|
state.m_motorAllowMaxPtDict =
|
pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
|
}
|
//获取数据后调用离心泵图表组件的方法重新绘制图表
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
lxbChartCtrl.value.refreshByDp(pumpInfoData);
|
lxbSelectPointCtrl.value.refreshPumpInfoData(pumpInfoData);
|
lxbChartPointParasCtrl.value.refreshPumpInfoData(
|
designPointParas,
|
pumpInfoData
|
);
|
}
|
//获取数据后调用离心泵图表组件的方法重新绘制图表
|
else if (state.m_pumpStyle == ConstParas.PumpStyle.ZLP) {
|
if (
|
pumpInfoData.ChartObjectDict == null ||
|
pumpInfoData.ChartObjectDict.WorkCurve == null
|
) {
|
ElMessage("此参数已超出曲线范围");
|
}
|
zlbChartCtrl.value.refreshByDp(pumpInfoData);
|
zlbSelectPointCtrl.value.refreshPumpInfoData(pumpInfoData);
|
zlbChartPointParasCtrl.value.refreshPumpInfoData(
|
designPointParas,
|
pumpInfoData
|
);
|
}
|
});
|
};
|
/**
|
* 入参为数组格式,例:['错误1','错误2']
|
* @param arr
|
*/
|
const cbOpenErrorTips = (arr) => {
|
emit("cbOpenDetailIndexErrorTips", arr);
|
};
|
const cbCloseErrorTips = () => {
|
emit("cbOpenDetailIndexErrorTips");
|
};
|
//设置单位,根据用户设置
|
const setUnitByUserSetting = (pumpInfoData, requestData) => {
|
var series_unit_q = pumpInfoData.SettingInfo.SeriesUnitQ; //表示后台传的单位
|
var series_unit_h = pumpInfoData.SettingInfo.SeriesUnitH;
|
var series_unit_p = pumpInfoData.SettingInfo.SeriesUnitP;
|
var series_unit_npsh = 0; //m 默认
|
|
//系列单位(标准单位)
|
pumpInfoData.SettingInfo.StdUnitQ = series_unit_q;
|
pumpInfoData.SettingInfo.StdUnitH = series_unit_h;
|
pumpInfoData.SettingInfo.StdUnitP = series_unit_p;
|
pumpInfoData.SettingInfo.StdUnitNPSH = 0;
|
|
pumpInfoData.SettingInfo.UserUnitQ = series_unit_q;
|
pumpInfoData.SettingInfo.UserUnitH = series_unit_h;
|
pumpInfoData.SettingInfo.UserUnitP = series_unit_p;
|
pumpInfoData.SettingInfo.UserUnitNPSH = 0;
|
|
pumpInfoData.SettingInfo.UserUnitD2 = 0;
|
pumpInfoData.SettingInfo.StdUnitD2 = 0;
|
|
var isChangeCoordinateUnit = false; //是否改变了坐标的单位
|
var userUnitSetting = {};
|
if (pumpInfoData.SettingInfo) {
|
var q_unit_setting =
|
UserSettingsHelper.getFlowUnitSetting(m_currentLanguage);
|
if (q_unit_setting >= 0) {
|
userUnitSetting.Q = q_unit_setting;
|
if (pumpInfoData.SettingInfo.UserUnitQ != q_unit_setting) {
|
pumpInfoData.SettingInfo.UserUnitQ = q_unit_setting;
|
isChangeCoordinateUnit = true;
|
}
|
}
|
var h_unit_setting =
|
UserSettingsHelper.getHeadUnitSetting(m_currentLanguage);
|
if (h_unit_setting >= 0) {
|
userUnitSetting.H = h_unit_setting;
|
if (pumpInfoData.SettingInfo.UserUnitH != h_unit_setting) {
|
pumpInfoData.SettingInfo.UserUnitH = h_unit_setting;
|
isChangeCoordinateUnit = true;
|
}
|
}
|
var p_unit_setting =
|
UserSettingsHelper.getPowerUnitSetting(m_currentLanguage);
|
|
if (p_unit_setting >= 0) {
|
userUnitSetting.P = p_unit_setting;
|
pumpInfoData.SettingInfo.UserUnitP = p_unit_setting;
|
}
|
|
var npsh_unit_setting =
|
UserSettingsHelper.getNpshUnitSetting(m_currentLanguage);
|
if (npsh_unit_setting >= 0) {
|
userUnitSetting.NPSH = npsh_unit_setting;
|
pumpInfoData.SettingInfo.UserUnitNPSH = npsh_unit_setting;
|
}
|
|
var d2_unit_setting =
|
UserSettingsHelper.getD2UnitSetting(m_currentLanguage);
|
if (d2_unit_setting >= 0) {
|
userUnitSetting.D2 = d2_unit_setting;
|
pumpInfoData.SettingInfo.UserUnitD2 = d2_unit_setting;
|
}
|
}
|
//最后以选型单位为准
|
if (requestData.DpQ && requestData.DpH) {
|
pumpInfoData.SettingInfo.UserUnitQ = parseInt(requestData.DpQu);
|
pumpInfoData.SettingInfo.UserUnitH = parseInt(requestData.DpHu);
|
}
|
|
var isAdjustCoordUnitByUserSetting = false; //是否根据用户设置的单位修改图表坐标
|
var detailPageConfig = window.pageConfig.PumpDetailPage;
|
if (
|
detailPageConfig.Chart &&
|
detailPageConfig.Chart.IsAdjustCoordUnitByUserSetting
|
) {
|
isAdjustCoordUnitByUserSetting = true;
|
}
|
|
//根据单位换算坐标
|
if (isChangeCoordinateUnit && isAdjustCoordUnitByUserSetting) {
|
var coord = pumpInfoData.ChartObjectDict.Coordinate;
|
|
coordinateHelper.CalcOptimalByUnitQ(
|
series_unit_q,
|
pumpInfoData.SettingInfo.UserUnitQ,
|
coord
|
);
|
//console.log(pumpInfoData.ChartObjectDict.Coordinate)
|
coordinateHelper.CalcOptimalByUnitH(
|
series_unit_h,
|
pumpInfoData.SettingInfo.UserUnitH,
|
coord
|
);
|
coordinateHelper.CalcOptimalByUnitP(
|
series_unit_p,
|
pumpInfoData.SettingInfo.UserUnitP,
|
coord
|
);
|
coordinateHelper.CalcOptimalByUnitNPSH(
|
series_unit_npsh,
|
pumpInfoData.SettingInfo.UserUnitNPSH,
|
coord
|
);
|
|
pumpInfoData.ChartObjectDict.Coordinate = coord;
|
}
|
userUnitSetting.isAdjustCoordUnitByUserSetting =
|
isAdjustCoordUnitByUserSetting;
|
state.m_userUnitSetting = userUnitSetting; //保存一份
|
};
|
//修改查询状态(给子控件调用)
|
const cbChangeChartQueryStatus = (val) => {
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
lxbChartPointParasCtrl.value.setChartQueryStatus(val);
|
}
|
};
|
//修改查询值(给子控件调用)
|
const cbChangeChartQueryData = (val) => {
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
lxbChartPointParasCtrl.value.buildChartQueryData(val);
|
}
|
};
|
// 变速曲线查询数据回调
|
const cbChangeQueryDataByMultiSpeedChart = (val) => {
|
// console.log(val,678)
|
multiSpeedChartQueryTableRef.value.updateQueryData(val);
|
};
|
// 设置变速曲线查询参数显示状态(给子组件使用)
|
const cbSetDispMSChartQueryData = (status) => {
|
state.dispMulSpeedChartQueryTable = status;
|
if (status) {
|
state.currentRightMeunId = "multiSpeedChartQueryTable";
|
} else {
|
state.currentRightMeunId = "chartPoint";
|
}
|
settingMSChartQueryTableDisp(status);
|
};
|
// 设置变速曲线查询标的显示
|
const settingMSChartQueryTableDisp = (status) => {
|
let display = status ? "block" : "none";
|
document.getElementById("tab-multiSpeedChartQueryTable").style.display =
|
display;
|
};
|
//根据流量计算功率
|
const calcPowerByFlow = (flow = null, unit = null) => {
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
var power = lxbChartCtrl.value.calcPowerByFlow(flow, unit);
|
return power;
|
}
|
return -1;
|
};
|
//根据流量计算效率
|
const calcEtaByFlow = (flow, unit) => {
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
var eta = lxbChartCtrl.value.calcEtaByFlow(flow, unit);
|
return eta;
|
}
|
return -1;
|
};
|
//修改参数选型电机功率下拉的值
|
const cbChangeMotorPowerInMainGrid = (val) => {
|
state.m_selMotorPower = val;
|
|
if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
|
//通知属性
|
createAsyncTask()
|
.then(() => {
|
propCtrl.value.setMotorPowerValue(val);
|
})
|
.catch();
|
|
if (state.m_motorAllowMaxPtDict != null) {
|
var allowMaxPointQ = state.m_motorAllowMaxPtDict[val];
|
if (allowMaxPointQ != null) {
|
refreshRegionByFlow(allowMaxPointQ, "AllowMaxPointQ");
|
}
|
}
|
|
var wrkPt = lxbChartPointParasCtrl.value.getWorkPtStdUnit();
|
if (wrkPt == null) return;
|
var coeff = propCtrl.value.getMotorPowerCalcCoeff();
|
if (coeff <= 0.1) return;
|
var min_power = wrkPt.P * coeff;
|
if (val < wrkPt.P * coeff) {
|
cbOpenErrorTips(
|
"电机功率" +
|
val +
|
", 不能小于最小轴功率 " +
|
min_power +
|
" ( " +
|
wrkPt.P +
|
" x " +
|
coeff +
|
")"
|
);
|
} else {
|
cbCloseErrorTips();
|
}
|
}
|
if (state.m_pumpStyle == ConstParas.PumpStyle.ZLP) {
|
//通知属性
|
propCtrl.value.setMotorPowerValue(val);
|
|
if (state.m_motorAllowMaxPtDict != null) {
|
var allowMaxPointQ = state.m_motorAllowMaxPtDict[val];
|
if (allowMaxPointQ != null) {
|
refreshRegionByFlow(allowMaxPointQ, "AllowMaxPointQ");
|
}
|
}
|
}
|
};
|
//设置BIM文件
|
const setBimFileByPropList = (propList) => {
|
var bimFileLaws = state.m_model3dSetting.BimFileLaws;
|
if (bimFileLaws == null || bimFileLaws.length == 0) return;
|
if (propList == null || propList.length == 0) return;
|
|
var ok_bimFileLaw = null;
|
if (bimFileLaws.length == 1) {
|
ok_bimFileLaw = bimFileLaws[0];
|
} else {
|
bimFileLaws.forEach((bimFileLaw) => {
|
var propFilters = bimFileLaw.PropFilters;
|
var isAllAcoord = true;
|
if (propFilters != null) {
|
for (var i = 0; i < propFilters.length; i++) {
|
var isAccordPropValue = false;
|
for (var j = 0; j < propList.length; j++) {
|
if (
|
propFilters[i].ID == propList[j].ID &&
|
propFilters[i].Value == propList[j].PropValue
|
) {
|
isAccordPropValue = true;
|
break;
|
}
|
}
|
if (!isAccordPropValue) {
|
isAllAcoord = false;
|
break;
|
}
|
}
|
}
|
if (isAllAcoord) {
|
ok_bimFileLaw = bimFileLaw;
|
return false;
|
}
|
});
|
}
|
if (ok_bimFileLaw == null) return;
|
if (ok_bimFileLaw.FileLaw4View == null) return;
|
|
var isHaveDim = ok_bimFileLaw.IsHaveDim;
|
|
var view_file_path = BuildBimFilePath(propList, ok_bimFileLaw.FileLaw4View);
|
var ds_file_path = BuildBimFilePath(propList, ok_bimFileLaw.FileLaw4Ds);
|
if (view_file_path == null || view_file_path == "") return;
|
if (view_file_path.indexOf(".") <= 0) {
|
view_file_path = view_file_path + ".fbx";
|
}
|
if (isHaveDim == null) state.m_model3dSetting.IsHaveDim = false;
|
else state.m_model3dSetting.IsHaveDim = isHaveDim;
|
state.m_model3dSetting.LawID = ok_bimFileLaw.ID;
|
state.m_model3dSetting.NextViewModelPath =
|
window.globalConfig.WebApiUrl.FileUrl +
|
"Series" +
|
state.m_pumpBaseInfo.SeriesID +
|
"/BIM/" +
|
view_file_path;
|
|
if (ds_file_path) {
|
if (!ds_file_path.endsWith(".rfa")) {
|
ds_file_path = ds_file_path + ".rfa";
|
}
|
state.m_model3dSetting.CurrentDsModelPath =
|
window.globalConfig.WebApiUrl.FileUrl +
|
"Series" +
|
state.m_pumpBaseInfo.SeriesID +
|
"/BIM/" +
|
ds_file_path;
|
} else {
|
state.m_model3dSetting.CurrentDsModelPath = null;
|
}
|
state.mainSetting.model3d.tabVisible = true;
|
if (state.mainSetting.model3d.ctrVisible) {
|
nextTick(() => {
|
loadModel3DFile();
|
});
|
}
|
};
|
//模型组件内点击下载按钮调用函数
|
const downloadModel3D = () => {
|
let FilePath = state.m_model3dSetting.CurrentViewModelPath;
|
if (FilePath == null) return false;
|
var uToken = userInfo.Token;
|
var userType = userInfo.UserType;
|
if (uToken == null || uToken == "") {
|
gotoLoginPage();
|
return;
|
}
|
//
|
if (userType != ConstParas.UserType.Employee) {
|
ElMessage("你没有下载权限,请联系 管理员 开通权限后下载");
|
return;
|
}
|
checkDownBimRfaFile();
|
};
|
//检查下载三维模型文件
|
const checkDownBimRfaFile = () => {
|
let requestData = {
|
SeriesID: state.m_pumpInfoData.BaseInfo.SeriesID,
|
ProductID: state.m_pumpInfoData.BaseInfo.PumpID,
|
FilePath: state.m_model3dSetting.CurrentViewModelPath,
|
};
|
axiosHelper
|
.get({
|
version: 3,
|
controller: "UserAuthor",
|
action: "CheckDownBimRfaFile",
|
data: requestData,
|
apiUrlType: "main",
|
isAddUrlSoftType: "false",
|
})
|
.then((res) => {
|
let result = res.data;
|
if (result.Code != 0) {
|
ElMessage.error(result.Message);
|
return;
|
}
|
let a = document.createElement("a"); // 生成一个a元素
|
let event = new MouseEvent("click"); // 创建一个单击事件
|
a.href = requestData.FilePath; // 将生成的URL设置为a.href属性
|
a.dispatchEvent(event); // 触发a的单击事件
|
setTimeout(() => {
|
a.remove();
|
}, 500);
|
})
|
.catch((err) => {
|
new Error(err.toString());
|
});
|
};
|
//构建BIM路径
|
const BuildBimFilePath = (propList, fileLawList) => {
|
if (fileLawList == null) return null;
|
if (fileLawList == null) return null;
|
|
var fileName_law = "";
|
for (var i in fileLawList) {
|
var law = fileLawList[i];
|
|
if (law.ItemType == 0 && law.PropID != null) {
|
//产品属性
|
}
|
if (law.ItemType == 1 && state.m_pumpBaseInfo.PumpName) {
|
//产品型号
|
var pumpName = state.m_pumpBaseInfo.PumpName.replace("/", "-")
|
.replace("\\", "-")
|
.replace("*", "-");
|
fileName_law += pumpName;
|
if (fileLawList.length > 1) {
|
fileName_law += GetFilePrefix(law);
|
}
|
}
|
if (law.ItemType == 2 && state.m_pumpBaseInfo.PartNO) {
|
//产品编号
|
fileName_law += state.m_pumpBaseInfo.PartNO;
|
if (fileLawList.length > 1) {
|
fileName_law += GetFilePrefix(law);
|
}
|
}
|
if (law.ItemType == 3 && state.m_pumpBaseInfo.PartCode) {
|
//产品图号
|
fileName_law += state.m_pumpBaseInfo.PartCode;
|
if (fileLawList.length > 1) {
|
fileName_law += GetFilePrefix(law);
|
}
|
}
|
if (law.ItemType == 4) {
|
//固定
|
if (law.CodeLawList != null && law.CodeLawList.length > 0) {
|
fileName_law += law.CodeLawList[0].Key;
|
fileName_law += GetFilePrefix(law);
|
}
|
}
|
}
|
|
var lastStr = fileName_law[fileName_law.length - 1];
|
if (lastStr == "\\" || lastStr == "/" || lastStr == "_" || lastStr == "-") {
|
fileName_law = fileName_law.substring(0, fileName_law.length - 1);
|
}
|
|
return fileName_law;
|
};
|
//
|
const GetFilePrefix = (law) => {
|
var FilePrefix = law.FilePrefix;
|
if (FilePrefix == "\\") return "/";
|
else return FilePrefix;
|
};
|
//设置图片
|
const setImageFile = (type, file) => {
|
let currentLangName = "CN";
|
// 安装图
|
if (type == "AssemImagePart") {
|
if (file) {
|
const callBack = (newFile) => {
|
state.mainSetting.assemFilePart.tabVisible = true;
|
state.mainComponentData.assemFilePart.cad = newFile;
|
const TextContent = state.m_pumpInfoData.BaseInfo.PumpName;
|
const TextWaterMarkOps = {
|
content: TextContent,
|
position: "right",
|
};
|
waterMarkHelper.addImage(
|
newFile,
|
null,
|
(base64Url) => {
|
state.mainComponentData.assemFilePart.path = base64Url;
|
},
|
TextWaterMarkOps
|
);
|
};
|
utils.checkImgPathByLang(currentLangName, file, callBack);
|
} else {
|
state.mainSetting.assemFilePart.tabVisible =
|
state.m_pumpBaseInfo.AssemFilePageVisible;
|
}
|
}
|
// 安装图机组
|
if (type == "AssemImageSys") {
|
if (file) {
|
state.mainSetting.assemFileSys.tabVisible = true;
|
state.mainComponentData.assemFileSys.cad = file;
|
waterMarkHelper.addImage(file, null, (base64Url) => {
|
state.mainComponentData.assemFileSys.path = base64Url;
|
});
|
}
|
}
|
// 实物图
|
if (type == "RealImagePart") {
|
if (file) {
|
waterMarkHelper.addImage(file, null, (base64Url) => {
|
state.mainComponentData.realFilePart.path = base64Url;
|
});
|
}
|
}
|
// 结构图
|
if (type == "StructImagePart") {
|
if (file) {
|
// let newFile = utils.checkImgPathByLang(currentLangName, file)
|
const callBack = (newFile) => {
|
state.mainSetting.structFilePart.tabVisible = true;
|
state.mainComponentData.structFilePart.cad = newFile;
|
waterMarkHelper.addImage(newFile, null, (base64Url) => {
|
state.mainComponentData.structFilePart.path = base64Url;
|
});
|
};
|
utils.checkImgPathByLang(currentLangName, file, callBack);
|
} else {
|
state.mainSetting.structFilePart.tabVisible =
|
state.m_pumpBaseInfo.StructFilePageVisible;
|
}
|
}
|
// 产品尺寸图
|
if (type == "ProductImagePart") {
|
if (file) {
|
state.mainSetting.productFilePart.tabVisible = true;
|
state.mainComponentData.productFilePart.cad = file;
|
waterMarkHelper.addImage(file, null, (base64Url) => {
|
state.mainComponentData.productFilePart.path = base64Url;
|
});
|
} else {
|
state.mainSetting.productFilePart.tabVisible =
|
state.m_pumpBaseInfo.DimFilePageVisible;
|
}
|
}
|
// 电气图
|
if (type == "ElectricImagePart") {
|
if (file) {
|
state.mainComponentData.elecFile.cad = file;
|
state.mainSetting.elecFile.tabVisible = true;
|
waterMarkHelper.addImage(file, null, (base64Url) => {
|
state.mainComponentData.elecFile.path = base64Url;
|
});
|
} else {
|
state.mainSetting.elecFile.tabVisible =
|
state.m_pumpBaseInfo.ElecFilePageVisible;
|
}
|
}
|
};
|
|
//加载三维模型
|
const loadModel3DFile = () => {
|
var model3dSetting = state.m_model3dSetting;
|
if (model3dSetting.CurrentViewModelPath == model3dSetting.NextViewModelPath)
|
return;
|
model3dSetting.CurrentViewModelPath = model3dSetting.NextViewModelPath;
|
|
state.m_model3dSetting = model3dSetting;
|
|
if (state.m_model3dSetting.isInitialFinish == false) {
|
//下载三维模型
|
nextTick(() => {
|
model3dCtrl.value.setLoadModelCommandCb(function () {
|
return downloadModel3D();
|
});
|
});
|
}
|
state.m_isShowLoadingFrm = true;
|
nextTick(() => {
|
//加载三维模型
|
model3dCtrl.value.loadModel(
|
model3dSetting.CurrentViewModelPath,
|
true,
|
function (val) {
|
state.mainSetting.model3d.isInitialFinish = true;
|
|
if (model3dSetting.IsHaveDim && model3dSetting.LawID > 0) {
|
let fileName = state.m_pumpBaseInfo.PumpName.replace("/", "-");
|
|
var load_bim_dim_post_data = {
|
SeriesID: state.m_pumpBaseInfo.SeriesID,
|
LawID: model3dSetting.LawID,
|
FileName: fileName,
|
};
|
axiosHelper
|
.get({
|
version: 3,
|
// lang: _this.m_currentLanguage,
|
isAddUrlSoftType: "false",
|
controller: "ModelLibrary",
|
action: "GetProductDimList",
|
data: load_bim_dim_post_data,
|
apiUrlType: "main",
|
})
|
.then((res) => {
|
state.m_isShowLoadingFrm = false;
|
|
if (res.data.Code != 0) {
|
model3dCtrl.value.setDimDisplay(false);
|
ElMessage(res.data.Message);
|
return;
|
}
|
|
model3dCtrl.value.updateSizeValue(res.data.Data);
|
model3dCtrl.value.setDimDisplay(true);
|
})
|
.catch((err) => {
|
state.m_isShowLoadingFrm = false;
|
console.log("校验失败");
|
return;
|
});
|
} else {
|
state.m_isShowLoadingFrm = false;
|
}
|
}
|
);
|
});
|
};
|
|
//监听右侧选项的选中值
|
const onSelectRightMenu = (val) => {
|
state.currentRightMeunId = val.name;
|
};
|
const tabBeforeLeave = (activeName, oldActiveName) => {
|
if (activeName == "prop") {
|
if (state.m_IsInitPropData) return;
|
nextTick(() => {
|
initProp();
|
state.m_IsInitPropData = true;
|
});
|
}
|
};
|
//监听左侧菜单当前选择的索引
|
const onSelectLeftMenu = (key, keyPath) => {
|
if (key == "prop_fix") {
|
state.currentRightMeunId = "prop";
|
return;
|
} else if (key == "prop_motor") {
|
state.currentRightMeunId = "prop";
|
return;
|
} else if (key == "material") {
|
state.currentRightMeunId = "material";
|
return;
|
} else if (key == "ChartPoint_WrkPt") {
|
state.currentRightMeunId = "chartPoint";
|
return;
|
} else if (key == "ChartPoint_QueryPt") {
|
state.currentRightMeunId = "chartPoint";
|
return;
|
}
|
|
state.mainSetting.featCurve.ctrVisible = false;
|
state.mainSetting.assemFilePart.ctrVisible = false;
|
state.mainSetting.assemFileSys.ctrVisible = false;
|
state.mainSetting.dynamicAssemFileSys.ctrVisible = false;
|
state.mainSetting.productFilePart.ctrVisible = false;
|
state.mainSetting.structFilePart.ctrVisible = false;
|
state.mainSetting.elecFile.ctrVisible = false;
|
state.mainSetting.realFilePart.ctrVisible = false;
|
state.mainSetting.model3d.ctrVisible = false;
|
state.mainSetting.seriesDoc.ctrVisible = false;
|
state.mainSetting.seriesStructure3d.ctrVisible = false;
|
state.mainSetting.seriesVideo.ctrVisible = false;
|
state.mainSetting.multiSpeedCurve.ctrVisible = false;
|
state.mainSetting.connCurve.ctrVisible = false;
|
state.mainSetting.cadModel.ctrVisible = false;
|
|
// 判断如果有动态安装图(机组),切换其他菜单时默认隐藏
|
if (state.m_dynPict4Sys != null) {
|
DynamicAssemFileSysRef.value &&
|
DynamicAssemFileSysRef.value.toggleDynamicPicVisible(false);
|
}
|
|
if (!state.mainSetting.multiSpeedCurve.ctrVisible) {
|
settingMSChartQueryTableDisp(false);
|
state.currentRightMeunId = "chartPoint";
|
}
|
|
if (key == "featCurve") {
|
state.currentLeftMeunId = "featCurve";
|
state.mainSetting.featCurve.ctrVisible = true;
|
} else if (key == "cadModel") {
|
state.currentLeftMeunId = "cadModel";
|
state.mainSetting.cadModel.ctrVisible = true;
|
// 判断是否已经加载过,如果已经加载过就不重复加载了
|
if (state.mainSetting.cadModel.isInitialOK) {
|
return;
|
}
|
nextTick(() => {
|
cadModelCtrl.value.initIFrameUrl(state.mainSetting.cadModel.url);
|
});
|
state.mainSetting.cadModel.isInitialOK = true;
|
} else if (key == "model3d") {
|
state.currentLeftMeunId = "model3d";
|
state.mainSetting.model3d.ctrVisible = true;
|
nextTick(() => {
|
loadModel3DFile();
|
});
|
} else if (key == "multiSpeedCurve") {
|
state.mainSetting.multiSpeedCurve.ctrVisible = true;
|
if (state.dispMulSpeedChartQueryTable) {
|
settingMSChartQueryTableDisp(true);
|
state.currentRightMeunId = "multiSpeedChartQueryTable";
|
}
|
} else if (key == "connCurve") {
|
state.mainSetting.connCurve.ctrVisible = true;
|
} else if (key == "assemFilePart") {
|
state.mainSetting.assemFilePart.ctrVisible = true;
|
} else if (key == "assemFileSys") {
|
state.mainSetting.assemFileSys.ctrVisible = true;
|
} else if (key == "dynamicAssemFileSys") {
|
state.mainSetting.dynamicAssemFileSys.ctrVisible = true;
|
if (state.m_dynPict4Sys != null) {
|
nextTick(() => {
|
DynamicAssemFileSysRef.value.toggleDynamicPicVisible(true);
|
});
|
}
|
} else if (key == "structFilePart") {
|
state.mainSetting.structFilePart.ctrVisible = true;
|
} else if (key == "elecFile") {
|
state.mainSetting.elecFile.ctrVisible = true;
|
} else if (key == "productFilePart") {
|
state.mainSetting.productFilePart.ctrVisible = true;
|
} else if (key == "realFilePart") {
|
state.mainSetting.realFilePart.ctrVisible = true;
|
} else if (key == "seriesDoc") {
|
state.currentLeftMeunId = "seriesDoc";
|
state.mainSetting.seriesDoc.ctrVisible = true;
|
} else if (key == "seriesStructure3d") {
|
state.currentLeftMeunId = "seriesStructure3d";
|
state.mainSetting.seriesStructure3d.ctrVisible = true;
|
} else if (key == "seriesVideo") {
|
state.currentLeftMeunId = "seriesVideo";
|
state.mainSetting.seriesVideo.ctrVisible = true;
|
initVideoSrc(state.mainSetting.seriesVideo.path);
|
} else {
|
state.currentLeftMeunId = "featCurve";
|
state.mainSetting.featCurve.ctrVisible = true;
|
}
|
};
|
|
// 更新运行参数--->选型参数
|
const cbUpdateSelectMainPoint = (data) => {
|
if (data == null) return;
|
if (data.name == "WorkSpeed" && lxbSelectPointCtrl.value != null) {
|
lxbSelectPointCtrl.value.updateWorkSpeed(data.value);
|
}
|
if (data.name == "MotorPower" && lxbSelectPointCtrl.value != null) {
|
lxbSelectPointCtrl.value.updateMotorPower(data.value);
|
}
|
};
|
//更新
|
const updateZlpConstantLine = (params) => {
|
zlbChartCtrl.value.updateConstantLine(params)
|
}
|
|
// 获取动态安装图修改参数
|
const GetAssemDynFileSys = () => {
|
if (state.m_dynPict4Sys == null) {
|
return null;
|
}
|
|
return DynamicAssemFileSysRef.value.getAssemDynFileSys();
|
};
|
|
const getWorkFlow4Lcc = () => {
|
if (lxbChartPointParasCtrl.value == null) return 0;
|
return lxbChartPointParasCtrl.value.getWorkFlow4Lcc();
|
};
|
|
const GetCurrentPartEntity = () => {
|
return propCtrl.value.GetCurrentPartEntity();
|
};
|
|
const GetPartProp4Store = () => {
|
return propCtrl.value.GetPartProp4Store();
|
};
|
|
const getDesignParasByLXB = () => {
|
return lxbSelectPointCtrl.value.getDesignParas();
|
};
|
|
const getDesignParasByZLB = () => {
|
return zlbSelectPointCtrl.value.getDesignParas();
|
};
|
// 把同步的任务转成异步任务
|
const createAsyncTask = () => {
|
return new Promise((resolve) => {
|
resolve();
|
});
|
};
|
const getConstantPtValue4StoreByLXB = () => {
|
return lxbChartPointParasCtrl.value.getConstantPtValue4Store();
|
};
|
const getConstantPtValue4StoreByZLB = () => {
|
return zlbChartPointParasCtrl.value.getConstantPtValue4Store();
|
};
|
const getEquipCurveInfo = () => {
|
return lxbChartCtrl.value.getEquipCurveInfo();
|
};
|
|
const getChartDispStyleByLXB = () => {
|
return lxbChartCtrl.value.getChartDispStyle();
|
};
|
|
const getAssemFileSysDispStatus = () => {
|
return state.mainSetting.assemFileSys.tabVisible;
|
};
|
|
const getMaterialDispStatus = () => {
|
return state.mainSetting.material.tabVisible;
|
};
|
|
const getParas4StoreByMateria = () => {
|
return materialCtrl.value.getParas4Store();
|
};
|
//获取变速曲线的速度列表
|
const getMultiSpeedCurveList = () => {
|
return multiSpeedChartCtrl.value.getSpeedList();
|
};
|
|
const getLXBCtrlRef = () => {
|
return lxbChartCtrl.value;
|
};
|
const getPropCtrl = () => {
|
return propCtrl.value;
|
};
|
defineExpose({
|
initDetailPageData,
|
calcEtaByFlow,
|
calcPowerByFlow,
|
getWorkFlow4Lcc,
|
GetCurrentPartEntity,
|
GetPartProp4Store,
|
getDesignParasByLXB,
|
getDesignParasByZLB,
|
getConstantPtValue4StoreByLXB,
|
getConstantPtValue4StoreByZLB,
|
getEquipCurveInfo,
|
getChartDispStyleByLXB,
|
getAssemFileSysDispStatus,
|
getMaterialDispStatus,
|
getParas4StoreByMateria,
|
getPropCtrl,
|
getLXBCtrlRef,
|
getMultiSpeedCurveList,
|
GetAssemDynFileSys,
|
});
|
</script>
|
<style lang="scss">
|
.PumpDetailBody {
|
width: 100%;
|
min-width: 1366px;
|
height: 100%;
|
|
button {
|
border: 0;
|
}
|
|
.el-dialog__header {
|
border-bottom: 1px solid #ccc;
|
margin-right: unset;
|
|
.el-dialog__headerbtn {
|
&:focus {
|
outline: unset;
|
}
|
}
|
}
|
|
.el-dialog__body {
|
padding: 10px;
|
}
|
|
.page-content {
|
width: 100%;
|
height: 100%;
|
margin-top: 0px;
|
padding: 0px;
|
background-color: #fff;
|
|
.el-tabs--border-card>.el-tabs__content {
|
padding: 5px;
|
overflow: auto;
|
}
|
|
.tabs_item {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
|
.el-menu {
|
border: unset;
|
}
|
|
.el-menu-item {
|
margin-top: 5px;
|
background: #eee;
|
color: #409eff;
|
width: 100%;
|
justify-content: center;
|
}
|
|
.el-menu-vertical-demo {
|
width: 100%;
|
}
|
|
.el-menu-item.is-active {
|
color: #409eff;
|
background: #ecf5ff !important;
|
}
|
|
.el-submenu .el-menu-item {
|
padding: 0px !important;
|
width: 180px;
|
background: #eeee;
|
// margin-bottom: 5px;
|
text-align: center;
|
margin-left: 34px;
|
color: #409eff;
|
min-width: unset;
|
}
|
|
.el-submenu__title {
|
background: #eee;
|
color: #409eff;
|
}
|
|
.el-menu-item-group__title {
|
padding: 0px 0px 0px 20px;
|
}
|
|
.el-menu-item-group>ul {
|
display: flex;
|
flex-direction: column;
|
align-items: flex-end;
|
}
|
|
.is-select {
|
color: #409eff !important;
|
background: #ecf5ff !important;
|
}
|
|
.no-select {
|
color: #409eff !important;
|
background: #eee !important;
|
}
|
|
.el-tabs__header {
|
margin: unset;
|
margin-bottom: 5px;
|
|
.el-tabs__item {
|
height: 30px !important;
|
line-height: 30px !important;
|
padding: 0 20px !important;
|
font-size: 14px !important;
|
}
|
|
.el-tabs__item.is-active {
|
background: #ecf5ff !important;
|
}
|
}
|
|
.el-tabs__content {
|
height: calc(100% - 46px);
|
overflow: auto;
|
padding: 0px 5px;
|
}
|
|
.right {
|
transform: rotate(-90deg);
|
transition: 0.2s;
|
position: absolute;
|
left: 10px;
|
font-size: 12px;
|
}
|
|
.down {
|
transition: 0.2s;
|
transform: rotate(0deg);
|
position: absolute;
|
left: 10px;
|
font-size: 12px;
|
}
|
|
.group_name {
|
width: 100%;
|
height: 40px;
|
background: #eee;
|
line-height: 40px;
|
position: relative;
|
}
|
|
.resize {
|
width: 8px;
|
height: 100%;
|
cursor: col-resize;
|
float: left;
|
}
|
|
.el-col-6 {
|
width: 24.3%;
|
}
|
|
.rightBox {
|
width: 28.711111%;
|
height: calc(100% - 0px);
|
background-color: white;
|
|
.tab_panel_box {
|
overflow: hidden;
|
height: 100%;
|
|
.tab_panel_box_continer {
|
border: 1px solid #ddd;
|
margin-top: 1px;
|
border-bottom: 0;
|
height: 100%;
|
}
|
}
|
|
.el-tabs__content {
|
overflow: auto;
|
}
|
}
|
}
|
|
.mgl-8 {
|
margin-left: 8px;
|
}
|
|
.leftBox {
|
height: calc(100% - 0px);
|
border-right: solid 1px #e6e6e6;
|
overflow: auto;
|
}
|
|
.midBox {
|
height: calc(100% - 0px);
|
background-color: white;
|
}
|
}
|
|
section {
|
height: 100%;
|
}
|
</style>
|