From 038ff2930c53d1d48e5fa1038875f43fe5dfe64d Mon Sep 17 00:00:00 2001 From: tanghaolin <1723298894@qq.com> Date: 星期四, 20 二月 2025 12:01:35 +0800 Subject: [PATCH] 添加变速曲线图标 --- src/components/Chart/js/LxpChartDiagram.js | 10104 ++++++++++++---------------------- src/views/IndustrialSoftware.vue | 2 src/components/Chart/js/MultiSpeedChartDiagram.js | 250 src/views/EecLabel.vue | 15 src/views/Home.vue | 2 src/views/ProductDetail.vue | 23 src/components/Chart/MultiSpeedChart.vue | 2411 +++---- src/views/mock/DetailsInfo.ts | 4509 +++++++++++---- 8 files changed, 8,236 insertions(+), 9,080 deletions(-) diff --git a/src/components/Chart/MultiSpeedChart.vue b/src/components/Chart/MultiSpeedChart.vue index e0409ab..a4726cd 100644 --- a/src/components/Chart/MultiSpeedChart.vue +++ b/src/components/Chart/MultiSpeedChart.vue @@ -1,1399 +1,1040 @@ <template> - <!-- 鍙橀�熸洸绾� --> - <div id="chartBox" style="width: 100%; height: 100%" class="performanceCurveBox" v-loading="state.m_loadingPage"> - <div class="chartBar" v-if="false"> - <div class="multispeed-tools-div"> - <!-- 鏇茬嚎鏌ヨ鎸夐挳 --> - <a ref="paramQueryCtrl" v-click-outside="onParamQueryClickOutside" @click="btnClickChartQuery" - class="diagram multispeed_chart_btn default blue-stripe"> - <i class="iconfont iconsearch" style="font-size: 0.12rem"></i> - <span style="margin-left: 0.01rem"> - {{ t("detailPage.parameterQuery.TR") }} - </span> - </a> - <!-- 閫熷害鍒楄〃 --> - <a ref="multiSpeedCtrl" v-click-outside="onDispMenuClickOutside" - class="diagram multispeed_chart_btn default blue-stripe"> - <i class="iconfont iconshebeisheshi" style="font-size: 0.12rem"></i> - <span style="margin-left: 0.01rem">{{ - t("detailPage.speedList.TR") - }}</span> - </a> - <!-- 鏄剧ず璁剧疆 --> - <a ref="dispMenuCtrl" v-click-outside="onDispMenuClickOutside" - class="diagram multispeed_chart_btn default blue-stripe"> - <i class="iconfont iconshebeisheshi" style="font-size: 0.12rem"></i> - <span style="margin-left: 0.01rem">{{ - t("detailPage.displaySettings.TR") - }}</span> - </a> - <!-- 瀵煎嚭鍥捐〃 --> - <el-dropdown placement="bottom"> - <a class="diagram multispeed_chart_btn default blue-stripe"> - <i class="iconfont icondaochu1" style="font-size: 0.12rem"></i> - <span style="margin-left: 0.01rem">{{ - t("detailPage.curveExport.TR") - }}</span> - </a> - <template #dropdown> - <el-dropdown-menu> - <el-dropdown-item @click="btnClickExportChartImage"><i class="iconfont iconshiwutupian" - style="font-size: 0.28rem"></i>{{ t("detailPage.picture.TR") }}</el-dropdown-item> - <el-dropdown-item @click="btnClickExportChartCAD"><i class="iconfont icontubiao_daoruCAD" - style="font-size: 0.28rem"></i>CAD</el-dropdown-item> - </el-dropdown-menu> - </template> - </el-dropdown> - - <!-- 鍙傛暟鏌ヨ鏄剧ず/闅愯棌 --> - <el-popover ref="Param_Query_popoverRef" :virtual-ref="paramQueryCtrl" trigger="click" :show-arrow="false" - :offset="24" virtual-triggering popper-class="paramQuery_popover_style" :hide-after="0"> - <div class="select_menu" tabindex="1"> - <div class="group_select_menu"> - <ul> - <li v-for="(menu_item, menu_index) in state.m_chartDispSettingMenu - .chartQueryMenuOptions" :key="menu_index" style="position: relative"> - <div v-if="menu_item.type == 0" @click="btnClickParamsQuerySetChoiceGrp(menu_item)" - class="group_style" :class="state.m_chartDispSettingMenu.chartQueryMenuId == - menu_item.id - ? 'label_active' - : 'none_active' - "> - <el-icon> - <ArrowRight /> - </el-icon> - <span class="label_name">{{ menu_item.label }}</span> - </div> - <!-- 鍒ゆ柇濡傛灉褰撳墠涓篶heck绫诲瀷骞朵笖鎸夐挳涓哄弬鏁版煡璇� --> - <template v-if=" - menu_item.type == 1 && - menu_item.visible && - (menu_item.id == 'paramsQuery1' || - menu_item.id == 'paramsQuery2') - "> - <el-popover placement="right" width="210" trigger="click" :teleported="false"> - <div class="popover_cell"> - <span class="label_name" style="width: 40%">{{ t("detailPage.parameter_s.TR") }}:</span> - <el-input size="small" style="width: 60%" v-model="state.m_currentParamsQueryValue" - @focus="focusInput(menu_item)"></el-input> - </div> - <div style=" - text-align: right; - margin: 0; - display: flex; - justify-content: flex-end; - "> - <el-button style="min-width: 56px; min-height: 28px" type="primary" size="small" - @click="changeChartQueryValue(menu_item)">{{ - t("detailPage.parameterDetermine.TR") - }}</el-button> - </div> - <template #reference> - <div class="group_style" :class="'none_active'" @click="clickMenuLabel(menu_item)"> - <i class="icon-size"></i> - <span class="label_name">{{ menu_item.label }}</span> - </div> - </template> - </el-popover> - </template> - <!-- 鍒ゆ柇褰撳墠鏄痗heck绫诲瀷鑿滃崟 --> - <div v-else-if="menu_item.type == 1 && menu_item.visible" - @click="btnClickParamsQuerySetCheck(menu_item)" class="group_style setting-menu-title" - :class="menu_item.value ? 'label_active' : 'none_active'"> - <i class="icon-size iconfont" :class="menu_item.value == 1 ? 'iconselect_icon' : ''"></i> - <span class="label_name">{{ menu_item.label }}</span> - </div> - <ul class="chart_disp_menu_style" v-show="state.m_chartDispSettingMenu.chartQueryMenuId == - menu_item.id && menu_item.type == 0 - "> - <li v-for="( - choice_item, choice_index - ) in menu_item.choiceList" @click=" - btnClickParamsQuerySetChoiceMenu(menu_item, choice_item) - " style="position: relative" :key="choice_index" class="node_style" :class="menu_item.choiceValue == choice_item.value - ? 'label_active' - : 'none_active' - "> - <div v-if="choice_item.type == 'text'" style="cursor: pointer"> - <span class="label_name">{{ choice_item.label }}</span> - <i style="position: absolute; left: 0.32rem; top: 0.1rem" :class="menu_item.choiceValue == choice_item.value - ? 'iconfont iconselect_icon' - : '' - "> - </i> - </div> - </li> - </ul> - </li> - </ul> - </div> - </div> - </el-popover> - - <!-- 鏄剧ず閫熷害鍒楄〃 --> - <el-popover ref="SPEED_popoverRef" :virtual-ref="multiSpeedCtrl" trigger="click" :show-arrow="false" - :offset="24" virtual-triggering popper-class="SPEED_popover_style" :hide-after="0"> - <div class="mulit-chart-select_menu" tabindex="1"> - <div class="group_select_menu"> - <ul> - <li v-for="(menu_item, menu_index) in state.m_speedValueMenu.list" :key="menu_index"> - <div class="group_style"> - <span class="speed_input_style">{{ - menu_item.type == 2 ? "鈽�" : "" - }}</span> - <span class="speed_input_style">{{ - menu_item.value.toFixed(1) - }}</span> - <span>{{ menu_item.unit }}</span> - <el-color-picker @change=" - changeSpeedColorValue(menu_item.color, menu_index) - " size="small" v-model="menu_item.color" :teleported="false"></el-color-picker> - <span class="deleted_style"> - <i class="iconfont iconguanbi" @click="detelCurrentSpeedItem(menu_index)"></i> - </span> - </div> - </li> - <el-popover placement="right" @show="popoverShow" @hide="popoverHide" v-model="state.addDialogVisible" - width="220px" trigger="click" :teleported="false"> - <div class="transfer_type" style="margin-bottom: 7px"> - <el-radio v-model="state.m_currentAddType" label="1">{{ - t("selectPage.speed.TR") - }}</el-radio> - <el-radio v-model="state.m_currentAddType" label="2">{{ - t("ebookPage.motorFrequency.TR") - }}</el-radio> - </div> - <!-- 娣诲姞杞�� --> - <template v-if="state.m_currentAddType == '1'"> - <el-input :placeholder="t('detailPage.pleaseEnterSpeed.TR')" v-model="state.addSpeedValue" - clearable></el-input> - </template> - <!-- 娣诲姞棰戠巼 --> - <template v-if="state.m_currentAddType == '2'"> - <el-input :placeholder="t('detailPage.pleaseEnterHz.TR')" v-model="state.addHzValue" - clearable></el-input> - </template> - <div style="text-align: right; margin-top: 7px"> - <!-- <el-button size="small" type="primary" @click="state.addDialogVisible = false">{{ - t("detailPage.cancel.TR") - }}</el-button> --> - <el-button type="primary" style="padding: 7px 10px" size="small" @click="clickBtnAddSpeed">{{ - t("detailPage.define.TR") }}</el-button> - </div> - <template #reference> - <li> - <div class="group_style" :class="state.addSpeedIsActive ? 'add_speed_active' : '' - "> - <span class="label_name" style="text-align: center">{{ - t("detailPage.addPinLv.TR") - }}</span> - <i class="iconfont iconright" style="position: absolute; right: 10px"></i> - </div> - </li> - </template> - </el-popover> - </ul> - </div> - </div> - </el-popover> - - <!-- 鏄剧ず璁剧疆鑿滃崟 --> - <el-popover ref="DispMenu_popoverRef" :virtual-ref="dispMenuCtrl" trigger="click" :show-arrow="false" - :offset="24" virtual-triggering popper-class="multispeed_popover_style" :hide-after="0"> - <div class="mulit-chart-select_menu" tabindex="1"> - <div class="group_select_menu"> - <ul class="setting-menu"> - <li v-for="(menu_item, menu_index) in state.m_chartDispSettingMenu - .options" :key="menu_index" style="position: relative" class="setting-menu-item"> - <!-- 鍚湁缁� --> - <div v-if="menu_item.type == 0" :id="`group_${menu_item.id}`" - @click="btnClickChartDispSetChoiceGrp(menu_item)" class="group_style setting-menu-title" :class="state.m_chartDispSettingMenu.acitveMenuId == menu_item.id - ? 'label_active' - : 'none_active' - "> - <span class="label_name">{{ menu_item.label }}</span> - <el-icon> - <ArrowRight /> - </el-icon> - </div> - <!-- 涓嶅惈鏈夌粍 --> - <div v-else-if="menu_item.type == 1" @click="btnClickChartDispSetCheck(menu_item)" class="group_style" - :class="menu_item.value ? 'label_active' : 'none_active'"> - <span class="label_name">{{ menu_item.label }}</span> - <i class="icon-size iconfont" :class="menu_item.value == 1 ? 'iconselect_icon' : ''"></i> - </div> - - <div class="choice_item_div_style"> - <ul class="chart_disp_menu_style setting-menu" v-show="state.m_chartDispSettingMenu.acitveMenuId == - menu_item.id && menu_item.type == 0 - "> - <li v-for="( - choice_item, choice_index - ) in menu_item.choiceList" style="position: relative" :key="choice_index" - class="setting-menu-item node_style"> - <div @click.stop=" - btnClickChartDispSetChoiceMenu( - menu_item, - choice_item - ) - " v-if="choice_item.type == 'text'" style="cursor: pointer" - class="group_style setting-menu-title" :class="menu_item.choiceValue == choice_item.value - ? 'label_active' - : 'none_active' - "> - <i class="icon-size iconfont" :class="menu_item.choiceValue == choice_item.value - ? 'iconselect_icon' - : '' - "> - </i> - <span class="label_name">{{ - choice_item.label - }}</span> - </div> - <div v-if="choice_item.type == 'input'" style=" - display: flex; - padding: 0px 10px; - box-sizing: border-box; - " class="setting-menu-title"> - <i class="icon-size"></i> - <span class="label_name" style="width: 60%">{{ - choice_item.label - }}</span> - <el-input size="small" @change="changeChoiceValue(choice_item)" style="min-width: 50px" - v-model="choice_item.value"></el-input> - </div> - </li> - </ul> - </div> - </li> - </ul> - </div> - </div> - </el-popover> - </div> - </div> - <!-- 鏇茬嚎瀵煎嚭寮规 --> - <el-dialog :title="t('detailPage.tip.TR')" :modal="false" top="1vh" v-model="state.exportChartDialogVisible" - width="30%"> - <div class="dialog_title_style">{{ t("detailPage.tip.TR") }}</div> - <div class="dialog_content_style"> - {{ t("detailPage.downloadTips.TR") }} - </div> - <template #footer> - <span class="dialog-footer"> - <el-button @click="state.exportChartDialogVisible = false">{{ - t("detailPage.cancel.TR") - }}</el-button> - <el-button type="primary" @click="downClientFile">{{ - t("detailPage.download.TR") - }}</el-button> - </span> - </template> - </el-dialog> - - <!-- 鍥捐〃鍖哄煙 --> - <div style="overflow: hidden; width: 100%; height: calc(100% - 0.36rem)"> - <div class="tubiao"> - <div style="width: 100%; height: calc(100% - 0.1rem)" id="multiSpeedDiagramChart" ref="MultiSpeedChartSVG"> - </div> - </div> - </div> - <div v-if="state.isFullScreen" style=" - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - background: #fff; - z-index: 9999; - "> - <div style="height: 0.4rem; line-height: 0.4rem; text-align: left"> - <a class="diagram multispeed_chart_btn default blue-stripe" style="margin-left: 0.05rem"> - <i class="iconfont iconfullscreen" style="font-size: 0.12rem"></i> - <span @click="exitFullScreen" style="margin-left: 0.01rem"> - {{ t("detailPage.exitFull.TR") }} - </span> - </a> - </div> - <div style="width: 100%; height: calc(100% - 0.4rem)" id="ChartFullScreen"></div> - </div> - </div> - </template> - - <script setup name="multiSpeedChart"> - import { reactive, onMounted, nextTick, ref, unref } from "vue"; - import { - ElMessage, - ElPopover, - ElInput, - ElButton, - ElDialog, - ElColorPicker, - ClickOutside as vClickOutside, - } from "element-plus"; - import MultiSpeedChartDiagram from "@/components//MultiSpeedChartDiagram.js"; - import UtilsHelper from "@/utils/utils"; - import ConstParas from "@/utils/constParas.js"; - import html2canvas from "html2canvas"; //div鍐呭杞浘鐗� + <!-- 鍙橀�熸洸绾� --> + <div id="chartBox" style="width: 100%; height: 100%" class="performanceCurveBox" v-loading="state.m_loadingPage"> + <!-- 鍥捐〃鍖哄煙 --> + <div style="overflow: hidden; width: 100%; height: calc(100% - 0.36rem)"> + <div class="tubiao"> + <div style="width: 100%; height: calc(100% - 0.1rem)" id="multiSpeedDiagramChart" ref="MultiSpeedChartSVG"></div> + </div> + </div> + </div> +</template> + +<script setup name="multiSpeedChart"> +import { reactive, onMounted, nextTick, ref, unref } from 'vue'; +import { ElMessage, ElPopover, ElInput, ElButton, ElDialog, ElColorPicker, ClickOutside as vClickOutside } from 'element-plus'; +import MultiSpeedChartDiagram from '@/components/Chart/js/MultiSpeedChartDiagram.js'; +import UtilsHelper from '@/utils/utils'; +import ConstParas from '@/utils/constParas.js'; +// import html2canvas from 'html2canvas'; //div鍐呭杞浘鐗� // import waterMarkHelper from "/@/utils/waterMarkHelper"; // import axiosHelper from "/@/utils/axiosHelper.js"; // import { useLogin } from "/@/store/login.js"; - import { useRoute, useRouter } from "vue-router"; +import { useRoute, useRouter } from 'vue-router'; // import { useI18n } from "vue-i18n"; // import { chartConfigStore } from "/@/store/chartConfig.js"; // import { CheckDownChartFile } from '/@/api/checkDown/index.js' - const { t } = useI18n(); +// const { t } = useI18n(); // const chartConfig = chartConfigStore(); // const userStore = useLogin(); // const userInfo = userStore.getUserInfo(); - const MultiSpeedChartSVG = ref(); - - const paramQueryCtrl = ref(); - const Param_Query_popoverRef = ref(); - - const multiSpeedCtrl = ref(); - const SPEED_popoverRef = ref(); - - const dispMenuCtrl = ref(); - const DispMenu_popoverRef = ref(); - const route = useRoute(); - const router = useRouter(); - const emit = defineEmits([ - "cbChangeChartQueryData", - "cbSetDispMSChartQueryData", - ]); - let state = reactive({ - m_chartDiagram: null, //鍥捐〃瀵硅薄 - m_pumpName: "", - m_seriesID: 0, - m_pumpID: 0, - isFullScreen: false, //鏄惁鍏ㄥ睆 - chartBoxHiehgt: 0, //鍥捐〃鐩掑瓙楂樺害 - - exportChartDialogVisible: false, //鏇茬嚎瀵煎嚭瀵硅瘽妗嗘樉闅� - addSpeedValue: "", //娣诲姞鏂扮殑杞�熺殑鍊� - addHzValue: "50", //娣诲姞鏂扮殑棰戠巼鐨勫�� - m_currentAddType: "2", //褰撳墠娣诲姞鐨勫�肩殑绫诲瀷 榛樿2 1鏄浆閫熴��2鏄鐜� - - addDialogVisible: false, //娣诲姞寮规鏄鹃殣鐘舵�� - m_speedValueMenu: { - isVisibleCombox: false, //涓嬫媺鑿滃崟鐨勬樉绀洪殣钘� - list: [], - }, - addSpeedIsActive: false, //娣诲姞杞�熸牱寮� - coordinateBoxVisible: false, //璁剧疆鍧愭爣瀵硅瘽妗嗙殑鏄�/闅� - m_designPointParas: null, - m_chartDispSettingMenu: { - isShowQueryChartBtn: false, //鏄惁鏄剧ず鍥炬爣涓婄殑鏌ヨ鎸夐挳 - isVisibleCombox: false, //涓嬫媺鑿滃崟鐨勬樉绀洪殣钘� - acitveMenuId: "", - chartQueryMenuId: null, - options: [ - { - id: "xianshi", - label: "鍥捐〃棰滆壊", - type: 1, //娌℃湁瀛愯彍鍗� - choiceValue: 0, - choiceList: [ - { - label: "鍗曡壊", - value: 1, - }, - { - label: "褰╄壊", - value: 0, - }, - ], - }, - ], - chartQueryMenuOptions: [], - }, - m_loadingPage:false - }); - onMounted(() => { - nextTick(() => { - refreshWindowSize(); - }); - // window.addEventListener( - // "resize", - // () => { - // return (() => { - // refreshWindowSize(); - // })(); - // }, - // false - // ); - }); - //淇敼绐椾綋灏哄 - const refreshWindowSize = () => { - let totalHeight = 0; - let headerHeight = 0; - let footerHeight = 0; - if (document.querySelector(".page-head-style")) { - headerHeight = document.querySelector(".page-head-style").clientHeight; +const MultiSpeedChartSVG = ref(); + +const paramQueryCtrl = ref(); +const Param_Query_popoverRef = ref(); + +const multiSpeedCtrl = ref(); +const SPEED_popoverRef = ref(); + +const dispMenuCtrl = ref(); +const DispMenu_popoverRef = ref(); +const route = useRoute(); +const router = useRouter(); +const emit = defineEmits(['cbChangeChartQueryData', 'cbSetDispMSChartQueryData']); +let state = reactive({ + m_chartDiagram: null, //鍥捐〃瀵硅薄 + m_pumpName: '', + m_seriesID: 0, + m_pumpID: 0, + isFullScreen: false, //鏄惁鍏ㄥ睆 + chartBoxHiehgt: 0, //鍥捐〃鐩掑瓙楂樺害 + + exportChartDialogVisible: false, //鏇茬嚎瀵煎嚭瀵硅瘽妗嗘樉闅� + addSpeedValue: '', //娣诲姞鏂扮殑杞�熺殑鍊� + addHzValue: '50', //娣诲姞鏂扮殑棰戠巼鐨勫�� + m_currentAddType: '2', //褰撳墠娣诲姞鐨勫�肩殑绫诲瀷 榛樿2 1鏄浆閫熴��2鏄鐜� + + addDialogVisible: false, //娣诲姞寮规鏄鹃殣鐘舵�� + m_speedValueMenu: { + isVisibleCombox: false, //涓嬫媺鑿滃崟鐨勬樉绀洪殣钘� + list: [], + }, + addSpeedIsActive: false, //娣诲姞杞�熸牱寮� + coordinateBoxVisible: false, //璁剧疆鍧愭爣瀵硅瘽妗嗙殑鏄�/闅� + m_designPointParas: null, + m_chartDispSettingMenu: { + isShowQueryChartBtn: false, //鏄惁鏄剧ず鍥炬爣涓婄殑鏌ヨ鎸夐挳 + isVisibleCombox: false, //涓嬫媺鑿滃崟鐨勬樉绀洪殣钘� + acitveMenuId: '', + chartQueryMenuId: null, + options: [ + { + id: 'xianshi', + label: '鍥捐〃棰滆壊', + type: 1, //娌℃湁瀛愯彍鍗� + choiceValue: 0, + choiceList: [ + { + label: '鍗曡壊', + value: 1, + }, + { + label: '褰╄壊', + value: 0, + }, + ], + }, + ], + chartQueryMenuOptions: [], + }, + m_loadingPage: false, +}); +onMounted(() => { + nextTick(() => { + refreshWindowSize(); + }); + // window.addEventListener( + // "resize", + // () => { + // return (() => { + // refreshWindowSize(); + // })(); + // }, + // false + // ); +}); +//淇敼绐椾綋灏哄 +const refreshWindowSize = () => { + let totalHeight = 0; + let headerHeight = 0; + let footerHeight = 0; + if (document.querySelector('.page-head-style')) { + headerHeight = document.querySelector('.page-head-style').clientHeight; + } + if (document.querySelector('#app footer')) { + footerHeight = document.querySelector('#app footer').clientHeight; + } + totalHeight = document.body.clientHeight - headerHeight - footerHeight; + + let el_dom = document.getElementById('multiSpeedDiagramChart'); + let parentDom = el_dom.parentElement; + if (parentDom) { + totalHeight = parentDom.clientHeight; + } + state.chartBoxHiehgt = totalHeight; + if (state.m_chartDiagram) { + var diagramContentWidth = parentDom.clientWidth; + var diagramContentHiehgt = parentDom.clientHeight; + + state.m_chartDiagram.Resize(diagramContentWidth, diagramContentHiehgt); + } +}; +//瀵煎嚭鏇茬嚎鍥� +const btnClickExportChartImage = async () => { + state.m_loadingPage = true; + let checkStatus = await checkDownChartFile('PNG'); + state.m_loadingPage = false; + if (!checkStatus) return; + html2canvas(MultiSpeedChartSVG.value, { backgroundColor: '#fff' }).then((canvas) => { + let file = canvas.toDataURL('image/png'); + waterMarkHelper.addImage(file, null, (base64Url) => { + downChartImageFile(base64Url); + }); + }); +}; +//鐐瑰嚮"鍙傛暟鏌ヨ"鑿滃崟 type=0(甯﹀瓙鑿滃崟鐨�) +const btnClickParamsQuerySetChoiceGrp = (menuItem) => { + if (state.m_chartDispSettingMenu.chartQueryMenuId == menuItem.id) { + state.m_chartDispSettingMenu.chartQueryMenuId = null; + } else { + state.m_chartDispSettingMenu.chartQueryMenuId = menuItem.id; + } +}; +//鐐瑰嚮"鍙傛暟鏌ヨ"鑿滃崟 type=1(checkbox) +const btnClickParamsQuerySetCheck = (menuItem) => { + state.m_chartDispSettingMenu.chartQueryMenuId = menuItem.id; + menuItem.value = menuItem.value == 0 ? 1 : 0; + let dispMSChartQueryData = menuItem.value == 1 ? true : false; + // 褰撳墠鐐瑰嚮鐨勬槸鏌ヨ + if (menuItem.id == 'chaxunquxian') { + if (menuItem.value == 1) { + state.m_chartDiagram.setQueryIndicatVertLineVisible(true, 1); + } else { + state.m_chartDiagram.setQueryIndicatVertLineVisible(false, 1); + } + emit('cbSetDispMSChartQueryData', dispMSChartQueryData); + } +}; +//瀵煎嚭鏇茬嚎鍥綜AD +const btnClickExportChartCAD = async () => { + state.m_loadingPage = true; + let checkStatus = await checkDownChartFile('CAD'); + state.m_loadingPage = false; + if (!checkStatus) return; + + var simuSpeedCurves = state.m_chartDiagram.getSpeedCurveList(); + var list_speed = []; + simuSpeedCurves.forEach((element) => { + list_speed.push(element.speed); + }); + if (list_speed.length <= 1) { + ElMessage.warning('鑷冲皯涓ゆ潯鏇茬嚎鎵嶈兘瀵煎嚭'); + return; + } + let requestData = { + SeriesID: state.m_seriesID, + PumpID: state.m_pumpID, + Speeds: list_speed, + }; + if (state.m_designPointParas != null) { + //requestData.DesignPoint = state.m_designPointParas; + } + axiosHelper + .post({ + version: 3, + controller: 'PumpChart', + action: 'CreateMultiSpeedChartCad', + data: requestData, + apiUrlType: 'main', + isAddUrlSoftType: 'true', + }) + .then((res) => { + let result = res.data; + if (result.Code != 0) { + ElMessage.error(result.Message); + return; + } + let filePath = window.globalConfig.WebApiUrl.FileUrl + 'temp/selectReport/' + result.Data; + // let filePath = window.globalConfig.WebApiUrl.MainUrl + "temp/selectReport/" + result.Data; + UtilsHelper.downloadFile(filePath, UtilsHelper.extractFileExtension(filePath)); + }) + .catch((err) => {}); +}; +// 妫�鏌ュ鍑烘洸绾跨殑鏉冮檺 +const checkDownChartFile = (fileSuffixType) => { + let FileSuffix = { + PNG: 4, + CAD: 3, + PDF: 0, + }; + let isLogin = checkLogin(); + if (!isLogin) return false; + let requestData = { + SeriesID: state.m_seriesID, + ProductID: state.m_pumpID, + FileType: 1, + FileSuffixType: FileSuffix[fileSuffixType], + }; + return new Promise((resolve, reject) => { + CheckDownChartFile(requestData) + .then((res) => { + let result = res.data; + if (result.Code != 0) { + ElMessage.error(result.Message); + resolve(false); + } + resolve(true); + }) + .catch((err) => { + reject(err); + }); + }); +}; + +const downChartImageFile = (filePath) => { + let link = document.createElement('a'); + link.href = filePath; //涓嬭浇閾炬帴 + link.setAttribute('download', `${state.m_pumpName}-鍙橀�熸洸绾�.png`); + link.style.display = 'none'; //a鏍囩闅愯棌 + document.body.appendChild(link); + link.click(); + setTimeout(() => { + link.remove(); + }, 500); +}; +//杞�熸坊鍔� +const clickBtnAddSpeed = () => { + state.addDialogVisible = false; + let type = state.m_currentAddType; + if (type == '1') { + let color = state.m_chartDiagram.AddSpeedCurve(state.addSpeedValue); + if (color == null) return; + state.addSpeedValue = ''; + } + if (type == '2') { + let color = state.m_chartDiagram.AddHzCurve(state.addHzValue); + if (color == null) return; + state.addHzValue = ''; + } +}; +//鐩戝惉璁剧疆鐨勮浆閫熸洸绾跨殑棰滆壊鍊� +const changeSpeedColorValue = (value, index) => { + // console.log(value, index, 747); + if (state.m_chartDiagram == null) return; + //console.log(curve, 602); + let id = state.m_speedValueMenu.list[index].id; + state.m_chartDiagram.editColorById(id, value); +}; +//鍒犻櫎褰撳墠鍒楄〃鑺傜偣 +const detelCurrentSpeedItem = (index) => { + let id = state.m_speedValueMenu.list[index].id; + state.m_speedValueMenu.list.splice(index, 1); + //console.log(id, 434); + state.m_chartDiagram.deleteCurveById(id); +}; +//鑾峰彇淇敼鐨勮浆閫熷�� 鍦ㄥけ鍘荤劍鐐规垨鑰呮寜enter閿殑鏃跺�� 鎵ц璇ヤ唬鐮� +const changeEditSpeedValue = (index) => { + // 寰呬慨鏀�-------- + var speed = state.m_speedValueMenu.list[index].value; + //------------ + speed = parseInt(speed); + let id = state.m_speedValueMenu.list[index].id; + if (speed < 10) return; + var list = state.m_speedValueMenu.list; + list[index].value = speed; + state.m_speedValueMenu.list = list; + state.m_chartDiagram.editSpeedById(id, speed); +}; +//涓嬭浇瀹㈡埛绔� +const downClientFile = () => { + state.exportChartDialogVisible = false; + let filePath = window.pageConfig.IndexPage.DanjiUrl; + if ((filePath = '')) { + return; + } + window.open(filePath, '_blank'); +}; +// 鍒濆鍖栬幏鍙栨车鐨勬暟鎹� +const initPumpInfoData = (langType, pumpInfoData, size) => { + if (pumpInfoData == null) return; + if (pumpInfoData.BaseInfo.PumpStyle != ConstParas.PumpStyle.LXP) { + return; + } + state.m_pumpName = pumpInfoData.BaseInfo.PumpName; + state.m_seriesID = pumpInfoData.BaseInfo.SeriesID; + state.m_pumpID = pumpInfoData.BaseInfo.PumpID; + + initChart(langType, pumpInfoData, size); +}; +//鐐瑰嚮"鍥捐〃鏌ヨ" +const btnClickChartQuery = () => { + //鏌ヨ绾跨殑鏄�/闅� +}; +//鐐瑰嚮"鍥捐〃璁剧疆"鑿滃崟 type=0(甯﹀瓙鑿滃崟鐨�) +const btnClickChartDispSetChoiceGrp = (menuItem) => { + state.m_chartDispSettingMenu.acitveMenuId = menuItem.id; +}; +//鐐瑰嚮"鍥捐〃璁剧疆"鑿滃崟 type=1(checkbox) +const btnClickChartDispSetCheck = (menuItem) => { + menuItem.value = menuItem.value == 0 ? 1 : 0; + state.m_chartDispSettingMenu.isVisibleCombox = false; + //鐐瑰嚮鈥滄爣娉ㄩ鐜団�� + if (menuItem.id == 'dispPinLv') { + let dispPinlv = menuItem.value == 0 ? false : true; + state.m_chartDiagram.setCurveLabelDispHz(dispPinlv); + } + //鐐瑰嚮鈥滄爣娉ㄨ浆閫熲�� + if (menuItem.id == 'dispSpeed') { + let dispSpeed = menuItem.value == 0 ? false : true; + state.m_chartDiagram.setCurveLabelDispSpeed(dispSpeed); + } +}; +//鐐瑰嚮"鍥捐〃璁剧疆"鐨� 瀛愯彍鍗� +const btnClickChartDispSetChoiceMenu = (menuItem, choiceItem) => {}; +//鍒濆鍖� +const initChart = (langType, pumpInfoData, size) => { + //console.log(pumpInfoData, 404); + if (pumpInfoData == null) { + return; + } + + const el = document.getElementById('multiSpeedDiagramChart'); + while (el.firstChild) { + el.removeChild(el.firstChild); } - if (document.querySelector("#app footer")) { - footerHeight = document.querySelector("#app footer").clientHeight; - } - totalHeight = document.body.clientHeight - headerHeight - footerHeight; - - let el_dom = document.getElementById("multiSpeedDiagramChart"); - let parentDom = el_dom.parentElement; - if (parentDom) { - totalHeight = parentDom.clientHeight; - } - state.chartBoxHiehgt = totalHeight; - if (state.m_chartDiagram) { - var diagramContentWidth = parentDom.clientWidth; - var diagramContentHiehgt = parentDom.clientHeight; - - state.m_chartDiagram.Resize(diagramContentWidth, diagramContentHiehgt); - } - }; - //瀵煎嚭鏇茬嚎鍥� - const btnClickExportChartImage =async () => { - state.m_loadingPage = true; - let checkStatus = await checkDownChartFile('PNG') - state.m_loadingPage = false; - if (!checkStatus) return; - html2canvas(MultiSpeedChartSVG.value, { backgroundColor: "#fff" }).then( - (canvas) => { - let file = canvas.toDataURL("image/png"); - waterMarkHelper.addImage(file, null, (base64Url) => { - downChartImageFile(base64Url); - }); - } - ); - }; - //鐐瑰嚮"鍙傛暟鏌ヨ"鑿滃崟 type=0(甯﹀瓙鑿滃崟鐨�) - const btnClickParamsQuerySetChoiceGrp = (menuItem) => { - if (state.m_chartDispSettingMenu.chartQueryMenuId == menuItem.id) { - state.m_chartDispSettingMenu.chartQueryMenuId = null; - } else { - state.m_chartDispSettingMenu.chartQueryMenuId = menuItem.id; - } - }; - //鐐瑰嚮"鍙傛暟鏌ヨ"鑿滃崟 type=1(checkbox) - const btnClickParamsQuerySetCheck = (menuItem) => { - state.m_chartDispSettingMenu.chartQueryMenuId = menuItem.id; - menuItem.value = menuItem.value == 0 ? 1 : 0; - let dispMSChartQueryData = menuItem.value == 1 ? true : false; - // 褰撳墠鐐瑰嚮鐨勬槸鏌ヨ - if (menuItem.id == "chaxunquxian") { - if (menuItem.value == 1) { - state.m_chartDiagram.setQueryIndicatVertLineVisible(true, 1); - } else { - state.m_chartDiagram.setQueryIndicatVertLineVisible(false, 1); - } - emit("cbSetDispMSChartQueryData", dispMSChartQueryData); - } - }; - //瀵煎嚭鏇茬嚎鍥綜AD - const btnClickExportChartCAD = async () => { - state.m_loadingPage = true; - let checkStatus = await checkDownChartFile('CAD') - state.m_loadingPage = false; - if (!checkStatus) return; - - var simuSpeedCurves = state.m_chartDiagram.getSpeedCurveList(); - var list_speed = []; - simuSpeedCurves.forEach((element) => { - list_speed.push(element.speed); - }); - if (list_speed.length <= 1) { - ElMessage.warning("鑷冲皯涓ゆ潯鏇茬嚎鎵嶈兘瀵煎嚭"); - return; - } - let requestData = { - SeriesID: state.m_seriesID, - PumpID: state.m_pumpID, - Speeds: list_speed, - }; - if (state.m_designPointParas != null) { - //requestData.DesignPoint = state.m_designPointParas; - } - axiosHelper - .post({ - version: 3, - controller: "PumpChart", - action: "CreateMultiSpeedChartCad", - data: requestData, - apiUrlType: "main", - isAddUrlSoftType: "true", - }) - .then((res) => { - let result = res.data; - if (result.Code != 0) { - ElMessage.error(result.Message); - return; + + var chart_diagram = new MultiSpeedChartDiagram(); + //璁剧疆璇█ + chart_diagram.setLocalizationType(0); + //璁剧疆瀹瑰櫒 + chart_diagram.setContainerDiv( + 'multiSpeedDiagramChart', //Div鍚嶇О + 1200, + 750 - 30 + ); + //璁剧疆鎻愮ず妗哊ame + chart_diagram.setToolTipName('featCurveTip'); + //鏌ヨ + chart_diagram.setChangeQueryDataCb(function (data) { + // console.log("setChangeQueryDataCb",data); + //_this.$emit("cbChangeChartQueryData", data); //鍥炶皟鐖剁獥浣撲簨浠� + }); + //淇敼浜嗛�熷害鍒楄〃 + chart_diagram.setChangeSpeedListCb(function (list) { + // console.log("setChangeSpeedListCb", list); + var speedList = []; + list.forEach((v) => { + speedList.push({ + id: v.id, + value: v.speed, + text: v.speed + ' rpm', + color: v.color, + unit: 'rpm', + }); + }); + state.m_speedValueMenu.list = speedList; + }); + //鍏ㄥ眬閰嶇疆 + var chartStyle = { + IsMonoColor: false, + IsDispSpectrum: true, + IsOnlyDispWrkCurve: false, + ColorH: '#6396C2', + ColorE: '#a90d41', + ColorP: '#e20df2', + ColorNPSH: '#8e870e', + ColorEquipment: '#013317', + ColorEqualParaCurvesE: '#402db7', + ColorCurveLabel: '#28004D', + }; + + /*_this.m_chartDispSettingMenu.options[0].choiceValue = + chartStyle.IsMonoColor; + _this.m_chartDispSettingMenu.options[1].choiceValue = + chartStyle.IsDispSpectrum; + _this.m_chartDispSettingMenu.options[2].value = + chartStyle.IsOnlyDispWrkCurve; + + //涓婃閰嶇疆 + let chartConfig = _this.$store.state.instante.chartConfig; + + if (chartConfig) { + if (chartConfig.IsMonorColor != null) { + chartStyle.IsMonoColor = chartConfig.IsMonorColor == 1 ? true : false; + + _this.m_chartDispSettingMenu.options[0].choiceValue = + chartConfig.IsMonorColor; } - let filePath = - window.globalConfig.WebApiUrl.FileUrl + - "temp/selectReport/" + - result.Data; - // let filePath = window.globalConfig.WebApiUrl.MainUrl + "temp/selectReport/" + result.Data; - UtilsHelper.downloadFile( - filePath, - UtilsHelper.extractFileExtension(filePath) - ); - }) - .catch((err) => { - }); - }; - // 妫�鏌ュ鍑烘洸绾跨殑鏉冮檺 - const checkDownChartFile = (fileSuffixType) => { - let FileSuffix = { - PNG: 4, - CAD: 3, - PDF: 0 - } - let isLogin = checkLogin(); - if (!isLogin) return false - let requestData = { - SeriesID: state.m_seriesID, - ProductID: state.m_pumpID, - FileType: 1, - FileSuffixType: FileSuffix[fileSuffixType] - }; - return new Promise((resolve, reject) => { - CheckDownChartFile(requestData).then((res) => { - let result = res.data; - if (result.Code != 0) { - ElMessage.error(result.Message); - resolve(false); + + if (chartConfig.IsDispSpectrum != null) { + chartStyle.IsDispSpectrum = + chartConfig.IsDispSpectrum == 1 ? true : false; + + _this.m_chartDispSettingMenu.options[1].choiceValue = + chartConfig.IsDispSpectrum; } - resolve(true); - }) - .catch((err) => { - reject(err) - - }); - }) - }; - - const downChartImageFile = (filePath) => { - let link = document.createElement("a"); - link.href = filePath; //涓嬭浇閾炬帴 - link.setAttribute( - "download", - `${state.m_pumpName}-${t("detailPage.performanceCurve.TR")}.png` - ); - link.style.display = "none"; //a鏍囩闅愯棌 - document.body.appendChild(link); - link.click(); - setTimeout(() => { - link.remove(); - }, 500); - } - //杞�熸坊鍔� - const clickBtnAddSpeed = () => { - state.addDialogVisible = false; - let type = state.m_currentAddType; - if (type == "1") { - var color = state.m_chartDiagram.AddSpeedCurve(state.addSpeedValue); - if (color == null) return; - state.addSpeedValue = ""; - } - if (type == "2") { - var color = state.m_chartDiagram.AddHzCurve(state.addHzValue); - if (color == null) return; - state.addHzValue = ""; - } - }; - //鐩戝惉璁剧疆鐨勮浆閫熸洸绾跨殑棰滆壊鍊� - const changeSpeedColorValue = (value, index) => { - // console.log(value, index, 747); - if (state.m_chartDiagram == null) return; - //console.log(curve, 602); - let id = state.m_speedValueMenu.list[index].id; - state.m_chartDiagram.editColorById(id, value); - }; - //鍒犻櫎褰撳墠鍒楄〃鑺傜偣 - const detelCurrentSpeedItem = (index) => { - let id = state.m_speedValueMenu.list[index].id; - state.m_speedValueMenu.list.splice(index, 1); - //console.log(id, 434); - state.m_chartDiagram.deleteCurveById(id); - }; - //鑾峰彇淇敼鐨勮浆閫熷�� 鍦ㄥけ鍘荤劍鐐规垨鑰呮寜enter閿殑鏃跺�� 鎵ц璇ヤ唬鐮� - const changeEditSpeedValue = (index) => { - // 寰呬慨鏀�-------- - var speed = state.m_speedValueMenu.list[index].value; - //------------ - speed = parseInt(speed); - let id = state.m_speedValueMenu.list[index].id; - if (speed < 10) return; - var list = state.m_speedValueMenu.list; - list[index].value = speed; - state.m_speedValueMenu.list = list; - state.m_chartDiagram.editSpeedById(id, speed); - }; - //涓嬭浇瀹㈡埛绔� - const downClientFile = () => { - state.exportChartDialogVisible = false; - let filePath = window.pageConfig.IndexPage.DanjiUrl; - if ((filePath = "")) { - return; - } - window.open(filePath, "_blank"); - }; - // 鍒濆鍖栬幏鍙栨车鐨勬暟鎹� - const initPumpInfoData = (langType, pumpInfoData, size) => { - if (pumpInfoData == null) return; - if (pumpInfoData.BaseInfo.PumpStyle != ConstParas.PumpStyle.LXP) { - return; - } - state.m_pumpName = pumpInfoData.BaseInfo.PumpName; - state.m_seriesID = pumpInfoData.BaseInfo.SeriesID; - state.m_pumpID = pumpInfoData.BaseInfo.PumpID; - - initChart(langType, pumpInfoData, size); - }; - //鐐瑰嚮"鍥捐〃鏌ヨ" - const btnClickChartQuery = () => { - //鏌ヨ绾跨殑鏄�/闅� - }; - //鐐瑰嚮"鍥捐〃璁剧疆"鑿滃崟 type=0(甯﹀瓙鑿滃崟鐨�) - const btnClickChartDispSetChoiceGrp = (menuItem) => { - state.m_chartDispSettingMenu.acitveMenuId = menuItem.id; - }; - //鐐瑰嚮"鍥捐〃璁剧疆"鑿滃崟 type=1(checkbox) - const btnClickChartDispSetCheck = (menuItem) => { - menuItem.value = menuItem.value == 0 ? 1 : 0; - state.m_chartDispSettingMenu.isVisibleCombox = false; - //鐐瑰嚮鈥滄爣娉ㄩ鐜団�� - if (menuItem.id == "dispPinLv") { - let dispPinlv = menuItem.value == 0 ? false : true; - state.m_chartDiagram.setCurveLabelDispHz(dispPinlv); - } - //鐐瑰嚮鈥滄爣娉ㄨ浆閫熲�� - if (menuItem.id == "dispSpeed") { - let dispSpeed = menuItem.value == 0 ? false : true; - state.m_chartDiagram.setCurveLabelDispSpeed(dispSpeed); - } - }; - //鐐瑰嚮"鍥捐〃璁剧疆"鐨� 瀛愯彍鍗� - const btnClickChartDispSetChoiceMenu = (menuItem, choiceItem) => { }; - //鍒濆鍖� - const initChart = (langType, pumpInfoData, size) => { - if (pumpInfoData == null) { - return; - } - - document.getElementById("multiSpeedDiagramChart").innerHTML = ""; - - var chart_diagram = new MultiSpeedChartDiagram(); - //璁剧疆璇█ - chart_diagram.setLocalizationType(langType); - //璁剧疆瀹瑰櫒 - chart_diagram.setContainerDiv( - "multiSpeedDiagramChart", //Div鍚嶇О - size.width, - size.height - 35 - ); - //璁剧疆鎻愮ず妗哊ame - chart_diagram.setToolTipName("featCurveTip"); - //鏌ヨ - chart_diagram.setChangeQueryDataCb((data) => { - emit("cbChangeChartQueryData", data); //鍥炶皟鐖剁獥浣撲簨浠� - }); - //淇敼浜嗛�熷害鍒楄〃 - chart_diagram.setChangeSpeedListCb((list) => { - let speedList = []; - list.forEach((v) => { - const speed = v.speed; - speedList.push({ - id: v.id, - value: speed, - text: speed + " rpm", - color: v.color, - unit: "rpm", - type: v.type, - }); - }); - state.m_speedValueMenu.list = speedList; - }); - - //鍏ㄥ眬閰嶇疆 - var chartStyle = window.pageConfig.ChartStyle; - - let options = [ - { - id: "dispPinLv", - label: `鏍囨敞棰戠巼`, - type: 1, //娌℃湁瀛愯彍鍗� - value: 1, - }, - { - id: "dispSpeed", - label: `鏍囨敞杞�焋, - type: 1, //娌℃湁瀛愯彍鍗� - value: 1, - }, - ]; - state.m_chartDispSettingMenu.options = options; - - chart_diagram.setCurveLabelDispHz(true); - - // 鏌ヨ鏇茬嚎 - let chartQueryMenuOption = [ - { - id: "chaxunquxian", - label: `${t("detailPage.queryCurve.TR")}`, - type: 1, //1 鏃犲瓙鑿滃崟 - value: 0, - visible: true, - }, - // { - // id: "paramsQuery1", - // label: `${t("detailPage.parameterQuery.TR")}1`, - // type: 1, //1 鏃犲瓙鑿滃崟 - // value: "", - // visible: false, - // }, - // { - // id: "paramsQuery2", - // label: `${t("detailPage.parameterQuery.TR")}2`, - // type: 1, //1 鏃犲瓙鑿滃崟 - // value: "", - // visible: false, - // } - ]; - state.m_chartDispSettingMenu.chartQueryMenuOptions = chartQueryMenuOption; - - /*_this.m_chartDispSettingMenu.options[0].choiceValue = - chartStyle.IsMonoColor; - _this.m_chartDispSettingMenu.options[1].choiceValue = - chartStyle.IsDispSpectrum; - - - //涓婃閰嶇疆 - let chartConfig = _this.$store.state.instante.chartConfig; - - if (chartConfig) { - if (chartConfig.IsMonorColor != null) { - chartStyle.IsMonoColor = chartConfig.IsMonorColor == 1 ? true : false; - - _this.m_chartDispSettingMenu.options[0].choiceValue = - chartConfig.IsMonorColor; - } - - if (chartConfig.IsDispSpectrum != null) { - chartStyle.IsDispSpectrum = - chartConfig.IsDispSpectrum == 1 ? true : false; - - _this.m_chartDispSettingMenu.options[1].choiceValue = - chartConfig.IsDispSpectrum; - } - }*/ - - //鍒濆鍖� - chart_diagram.initialChart(pumpInfoData, chartStyle); - - state.m_chartDiagram = chart_diagram; - setTimeout(() => { - state.m_chartDiagram.Resize(size.width, size.height - 35); - }, 500); - }; - //璁剧疆宸ヤ綔鏇茬嚎 - const setWrkCurveInfo = (dp, curve) => { - if (state.m_chartDiagram == null) return; - - state.m_designPointParas = dp; - state.m_chartDiagram.setWrkCurveInfo(curve); - }; - //鏍规嵁娴侀噺璁$畻鍔熺巼 - const calcPowerByFlow = (flow, unit) => { - if (state.m_chartDiagram == null) return; - - return state.m_chartDiagram.calcPowerByFlow(flow, unit); - }; - //鏍规嵁娴侀噺璁$畻鏁堢巼 - const calcEtaByFlow = (flow, unit) => { - if (state.m_chartDiagram == null) return; - return state.m_chartDiagram.calcEtaByFlow(flow, unit); - }; - //淇敼浜嗗尯鍩熷弬鏁扮殑娴侀噺 - const refreshRegionByFlow = (std_unit_flow, tag) => { - if (state.m_chartDiagram == null) return; - return state.m_chartDiagram.refreshRegionByFlow(std_unit_flow, tag); - }; - - const showCoordinateBox = () => { - //鏄剧ず璁剧疆鍧愭爣瀵硅瘽妗� - state.coordinateBoxVisible = true; - //this.calcCoordinate(); - }; - const onParamQueryClickOutside = () => { - unref(Param_Query_popoverRef).Param_Query_popoverRef?.delayHide?.(); - }; - const onDispMenuClickOutside = () => { - unref(DispMenu_popoverRef).DispMenu_popoverRef?.delayHide?.(); - }; - const getSpeedList = () => { - let speedList = []; - state.m_speedValueMenu.list.forEach((item) => { - speedList.push(item.value); - }); - return speedList.join(","); - }; - //閫�鍑哄叏灞� - const exitFullScreen = () => { - state.isFullScreen = false; - }; - //鍏ㄥ睆 - const fullScreen = () => { - state.isFullScreen = true; - setTimeout(() => { - initFullScreenChart(); - }, 100); - }; - - const initFullScreenChart = () => { - var IdName = "ChartFullScreen"; - }; - // - const popoverShow = () => { - state.addSpeedIsActive = true; - }; - // - const popoverHide = () => { - state.addSpeedIsActive = false; - }; - // - const checkLogin = () => { - //妫�鏌ョ櫥闄� - var Token = userInfo.Token; - if (Token == null || Token == "") { - userStore.login(route.fullPath); - return false; - } - return true; - }; - defineExpose({ - initPumpInfoData, - setWrkCurveInfo, - getSpeedList, - }); - </script> - <style lang="scss"> - .performanceCurveBox { - position: relative; - - .chartBar { - background-color: white; - border-bottom: 0.01rem solid #cecece; - height: 0.35rem; - line-height: 0.35rem; - } - - .el-dialog__header { - display: none; - } - - .el-dialog--center .el-dialog__body { - padding: 0.25rem 0.25rem 0.15rem; - } - - .el-dialog__footer { - padding: 0.05rem 0.05rem; - - .el-button { - padding: 0.06rem 0.12rem; - min-height: 0.3rem; - } - } - - .diagram { - cursor: pointer; - font-size: 0.12rem; - margin-top: 0; - margin-bottom: 0.03rem; - padding-top: 0.05rem; - height: 0.27rem; - - &>span { - font-size: 0.12rem; - font-family: "SourceHanSans-Bold"; - } - } - - .multispeed-tools-div { - font-size: 0.13rem; - font-weight: bold; - display: flex; - height: 100%; - padding: 0.04rem; - box-sizing: border-box; - gap: 0.05rem; - } - - .multispeed_chart_btn { - border-width: 0; - padding: 0.07rem 0.14rem; - font-size: 0.12rem; - outline: none !important; - background-image: none !important; - border-radius: unset !important; - filter: none; - border-radius: 0; - box-shadow: none; - text-shadow: none; - height: 100%; - box-sizing: border-box; - display: flex; - justify-content: center; - align-items: center; - gap: 0.05rem; - - &.default { - color: #333333; - background-color: #e5e5e5; - font-weight: 700; - - &:hover { - background-color: #aaaaaa; + + if (chartConfig.IsOnlyDispWrkCurve != null) { + chartStyle.IsOnlyDispWrkCurve = + chartConfig.IsOnlyDispWrkCurve == 1 ? true : false; + + _this.m_chartDispSettingMenu.options[2].value = + chartConfig.IsOnlyDispWrkCurve; } - } - - &.blue-stripe { - border-left: 0.03rem solid #002c66; - } - } - - .add_speed_active { - color: #4b8df8 !important; - } - - .rightFilterBox { - position: absolute; - right: 0rem; - top: 0rem; - width: auto; - background-color: white; - float: right; - - .showChartInfoDiv { - width: 2rem; - display: block; - } - - .boxHead { - height: 0.34rem; - border-left: none; - border-right: none; - display: flex; - justify-content: space-between; - align-items: center; - background-color: white; - border: 0.01rem solid transparent; - color: #3c763d; - border-color: #d6e9c6; - font-size: 0.14rem; - - i { - font-size: 0.14rem; - } - } - - .panel-heading { - background-color: #f5f5f5; - border-color: #ddd; - margin-bottom: 0.01rem; - - .panel-title { - margin-top: 0; - padding: 0; - height: 0.23rem; - margin-bottom: 0; - font-size: 0.14rem; - background-color: #388cd4 !important; - color: white; - - .right { - transform: rotate(-90deg); - transition: 0.2s; - } - - .down { - transition: 0.2s; - transform: rotate(0deg); - } - } - - .accordion-toggle { - padding: 0.1rem 0.15rem; - } - } - - .panel-collapse { - height: auto; - - .panel-body { - background-color: #545196 !important; - - .el-checkbox { - color: #fff; - } - - .el-checkbox, - .el-radio { - margin-right: 0.1rem; - } - - .el-checkbox__label { - font-size: 0.12rem; - } - - .el-checkbox__input.is-checked+.el-checkbox__label { - color: #fff; - font-size: 0.12rem; - } - - .col-md-12 { - width: 100%; - margin-top: 0.03rem; - display: flex; - justify-content: center; - align-items: center; - - .spectrumLeftParaLabelName { - line-height: 0.25rem; - margin-right: 0.05rem; - font-size: 0.12rem; - float: left; - width: 31%; - color: white; - background-color: #545196 !important; - } - - .spectrumLeftParaLabelUnit { - line-height: 0.25rem; - margin-right: 0.05rem; - font-size: 0.12rem; - float: left; - width: 0.3rem; - color: white; - background-color: #545196 !important; - } - - .el-input { - width: unset; - line-height: 0.3rem; - - .el-input__inner { - height: 0.25rem; - line-height: 0.25rem; - width: 0.65rem; - text-align: right; - } - } - - .pointShow { - .el-input__inner { - height: 0.25rem; - line-height: 0.25rem; - width: 100%; - text-align: center; - } - - .el-input__prefix, - .el-input__suffix { - top: -0.07rem; - } - } - - .chartInfoParaInput { - float: left; - line-height: 0.15rem; - width: 0.48rem !important; - text-align: right; - } - - .form-control { - height: 0.08rem; - padding: 0.06rem 0.12rem; - font-size: 0.14rem; - font-weight: normal; - color: #333333; - background-color: white; - border: 0.01rem solid #b4afaf; - border-radius: 0; - box-shadow: none; - transition: border-color ease-in-out 0.15s, - box-shadow ease-in-out 0.15s; - } - } - } - } - } - - .searchbtn { - border-radius: 0; - border-width: 0; - padding: 0.02rem 0.14rem; - font-size: 0.14rem; - outline: none !important; - background-image: none !important; - filter: none; - box-shadow: none; - text-shadow: none; - display: inline-block; - font-weight: 400; - text-align: center; - vertical-align: middle; - cursor: pointer; - white-space: nowrap; - line-height: 0.2rem; - user-select: none; - margin-top: 0.08rem; - margin-left: 0.2rem; - height: 0.2rem; - margin-bottom: 0.02rem; - width: 0.6rem; - padding-top: 0.02rem; - border: 0.01rem solid #ccc; - } - - .blue { - background-color: #6396c2 !important; - color: #fff; - } - - .setBox { - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; - - .setGroup { - position: relative; - margin-bottom: 0.01rem !important; - padding: 0.05rem !important; - background-color: white; - border: 0.01rem solid transparent; - border-width: 0.01rem; - border-color: #bce8f1; - color: #31708f; - margin-top: 0.2rem; - - .setTitle { - font-size: 0.18rem; - position: absolute; - top: -0.15rem; - background-color: #fff; - padding: 0 0.05rem; - } - - .set_Option { - display: flex; - justify-content: center; - align-items: center; - - // margin-top: 0.1rem; - .grid-content { - display: flex; - justify-content: center; - align-items: center; - margin-top: 0.05rem; - - label { - width: 1.5rem; - font-size: 0.12rem; - text-align: right; - } - - .el-input__inner { - text-align: right; - height: 0.4rem; - line-height: 0.4rem; - padding: 0 0; - } - } - } - } - } - - .dialog_title_style { - height: 30px; - font-size: 22px; - text-align: left; - text-indent: 20px; - } - - .dialog_content_style { - height: 20px; - text-align: left; - text-indent: 20px; - margin-top: 10px; - } - - .el-color-picker { - line-height: 3; - margin-left: 0.05rem; - height: 0.34rem; - } - - .el-color-picker--mini .el-color-picker__trigger { - width: 0.2rem; - height: 0.2rem; - } - - .el-color-picker__trigger { - padding: unset; - } - - .el-color-picker--mini .el-color-picker__empty, - .el-color-picker--mini .el-color-picker__icon { - color: transparent; - } - - .tubiao { - height: 100%; - width: 100%; - } - - .disp_SetChoiceMenu_style { - position: absolute; - right: -1.77rem; - top: -0.01rem; - background: rgb(255, 255, 255); - border-width: 0.01rem 0.01rem 0.01rem 0.01rem; - border-color: #e5e5e5; - border-style: solid; - } - } - - .mulit-chart-select_menu { - width: 100%; - display: flex; - background: #fff; - border: 0.01rem solid #e5e5e5; - - .group_select_menu { - width: 100%; - border-right: 0.01rem solid #e5e5e5; - - ul { - width: 100%; - list-style: none; - margin: 0; - padding: 0.06rem 0; - - .group_style { - cursor: pointer; - color: #909399; - display: flex; - justify-content: center; - align-items: center; - padding: 0 0.3rem 0 0.2rem; - height: 0.34rem; - line-height: 0.34rem; - outline: none; - position: relative; - gap: 0.05rem; - box-sizing: border-box; - - .label_name { - // flex: 1; - padding: 0 0.1rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .speed_input_style { - -webkit-appearance: none; - background-color: transparent; - background-image: none; - border: none; - box-sizing: border-box; - color: #606266; - display: inline-block; - font-size: inherit; - height: 0.34rem; - line-height: 0.34rem; - outline: none; - padding: 0 0rem; - transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); - width: 50%; - text-align: center; - // text-indent: 0.22rem; - } - - .deleted_style { - position: absolute; - right: 0.1rem; - font-size: 0.16rem; - } - - .deleted_style:hover { - color: red; - cursor: pointer; - } - - &:hover { - background: #f5f7fa; - color: #303133; - } - - .node_style { - cursor: pointer; - color: #909399; - display: flex; - align-items: center; - padding: 0 0.3rem 0 0.2rem; - height: 0.34rem; - line-height: 0.34rem; - outline: none; - - .label_name { - // flex: 1; - padding: 0 0.1rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - &:hover { - background: #f5f7fa; - color: #303133; - } - } - } - - .label_active { - color: #409eff !important; - font-weight: 700; - } - - .none_active { - color: #909399; - font-weight: unset; - } - } - } - } - - .paramQuery_popover_style { - min-width: 2rem !important; - width: unset !important; - inset: 1.2rem auto auto 2.42rem !important; - padding: unset !important; - } - - .multispeed_popover_style { - min-width: 2rem !important; - width: unset !important; - inset: 1.31rem auto auto 3.4rem !important; - padding: unset !important; - } - - .SPEED_popover_style { - min-width: 1.5rem !important; - width: unset !important; - inset: 1.31rem auto auto 2.42rem !important; - padding: unset !important; - } - </style> - \ No newline at end of file + }*/ + + //鍒濆鍖� + chart_diagram.initialChart(pumpInfoData, chartStyle); + + state.m_chartDiagram = chart_diagram; +}; +//璁剧疆宸ヤ綔鏇茬嚎 +const setWrkCurveInfo = (dp, curve) => { + if (state.m_chartDiagram == null) return; + + state.m_designPointParas = dp; + state.m_chartDiagram.setWrkCurveInfo(curve); +}; +//鏍规嵁娴侀噺璁$畻鍔熺巼 +const calcPowerByFlow = (flow, unit) => { + if (state.m_chartDiagram == null) return; + + return state.m_chartDiagram.calcPowerByFlow(flow, unit); +}; +//鏍规嵁娴侀噺璁$畻鏁堢巼 +const calcEtaByFlow = (flow, unit) => { + if (state.m_chartDiagram == null) return; + return state.m_chartDiagram.calcEtaByFlow(flow, unit); +}; +//淇敼浜嗗尯鍩熷弬鏁扮殑娴侀噺 +const refreshRegionByFlow = (std_unit_flow, tag) => { + if (state.m_chartDiagram == null) return; + return state.m_chartDiagram.refreshRegionByFlow(std_unit_flow, tag); +}; + +const showCoordinateBox = () => { + //鏄剧ず璁剧疆鍧愭爣瀵硅瘽妗� + state.coordinateBoxVisible = true; + //this.calcCoordinate(); +}; +const onParamQueryClickOutside = () => { + unref(Param_Query_popoverRef).Param_Query_popoverRef?.delayHide?.(); +}; +const onDispMenuClickOutside = () => { + unref(DispMenu_popoverRef).DispMenu_popoverRef?.delayHide?.(); +}; +const getSpeedList = () => { + let speedList = []; + state.m_speedValueMenu.list.forEach((item) => { + speedList.push(item.value); + }); + return speedList.join(','); +}; +//閫�鍑哄叏灞� +const exitFullScreen = () => { + state.isFullScreen = false; +}; +//鍏ㄥ睆 +const fullScreen = () => { + state.isFullScreen = true; + setTimeout(() => { + initFullScreenChart(); + }, 100); +}; + +const initFullScreenChart = () => { + var IdName = 'ChartFullScreen'; +}; +// +const popoverShow = () => { + state.addSpeedIsActive = true; +}; +// +const popoverHide = () => { + state.addSpeedIsActive = false; +}; +// +const checkLogin = () => { + //妫�鏌ョ櫥闄� + var Token = userInfo.Token; + if (Token == null || Token == '') { + userStore.login(route.fullPath); + return false; + } + return true; +}; +defineExpose({ + initPumpInfoData, + setWrkCurveInfo, + getSpeedList, +}); +</script> +<style lang="scss"> +.performanceCurveBox { + position: relative; + + .chartBar { + background-color: white; + border-bottom: 0.01rem solid #cecece; + height: 0.35rem; + line-height: 0.35rem; + } + + .el-dialog__header { + display: none; + } + + .el-dialog--center .el-dialog__body { + padding: 0.25rem 0.25rem 0.15rem; + } + + .el-dialog__footer { + padding: 0.05rem 0.05rem; + + .el-button { + padding: 0.06rem 0.12rem; + min-height: 0.3rem; + } + } + + .diagram { + cursor: pointer; + font-size: 0.12rem; + margin-top: 0; + margin-bottom: 0.03rem; + padding-top: 0.05rem; + height: 0.27rem; + + & > span { + font-size: 0.12rem; + font-family: 'SourceHanSans-Bold'; + } + } + + .multispeed-tools-div { + font-size: 0.13rem; + font-weight: bold; + display: flex; + height: 100%; + padding: 0.04rem; + box-sizing: border-box; + gap: 0.05rem; + } + + .multispeed_chart_btn { + border-width: 0; + padding: 0.07rem 0.14rem; + font-size: 0.12rem; + outline: none !important; + background-image: none !important; + border-radius: unset !important; + filter: none; + border-radius: 0; + box-shadow: none; + text-shadow: none; + height: 100%; + box-sizing: border-box; + display: flex; + justify-content: center; + align-items: center; + gap: 0.05rem; + + &.default { + color: #333333; + background-color: #e5e5e5; + font-weight: 700; + + &:hover { + background-color: #aaaaaa; + } + } + + &.blue-stripe { + border-left: 0.03rem solid #002c66; + } + } + + .add_speed_active { + color: #4b8df8 !important; + } + + .rightFilterBox { + position: absolute; + right: 0rem; + top: 0rem; + width: auto; + background-color: white; + float: right; + + .showChartInfoDiv { + width: 2rem; + display: block; + } + + .boxHead { + height: 0.34rem; + border-left: none; + border-right: none; + display: flex; + justify-content: space-between; + align-items: center; + background-color: white; + border: 0.01rem solid transparent; + color: #3c763d; + border-color: #d6e9c6; + font-size: 0.14rem; + + i { + font-size: 0.14rem; + } + } + + .panel-heading { + background-color: #f5f5f5; + border-color: #ddd; + margin-bottom: 0.01rem; + + .panel-title { + margin-top: 0; + padding: 0; + height: 0.23rem; + margin-bottom: 0; + font-size: 0.14rem; + background-color: #388cd4 !important; + color: white; + + .right { + transform: rotate(-90deg); + transition: 0.2s; + } + + .down { + transition: 0.2s; + transform: rotate(0deg); + } + } + + .accordion-toggle { + padding: 0.1rem 0.15rem; + } + } + + .panel-collapse { + height: auto; + + .panel-body { + background-color: #545196 !important; + + .el-checkbox { + color: #fff; + } + + .el-checkbox, + .el-radio { + margin-right: 0.1rem; + } + + .el-checkbox__label { + font-size: 0.12rem; + } + + .el-checkbox__input.is-checked + .el-checkbox__label { + color: #fff; + font-size: 0.12rem; + } + + .col-md-12 { + width: 100%; + margin-top: 0.03rem; + display: flex; + justify-content: center; + align-items: center; + + .spectrumLeftParaLabelName { + line-height: 0.25rem; + margin-right: 0.05rem; + font-size: 0.12rem; + float: left; + width: 31%; + color: white; + background-color: #545196 !important; + } + + .spectrumLeftParaLabelUnit { + line-height: 0.25rem; + margin-right: 0.05rem; + font-size: 0.12rem; + float: left; + width: 0.3rem; + color: white; + background-color: #545196 !important; + } + + .el-input { + width: unset; + line-height: 0.3rem; + + .el-input__inner { + height: 0.25rem; + line-height: 0.25rem; + width: 0.65rem; + text-align: right; + } + } + + .pointShow { + .el-input__inner { + height: 0.25rem; + line-height: 0.25rem; + width: 100%; + text-align: center; + } + + .el-input__prefix, + .el-input__suffix { + top: -0.07rem; + } + } + + .chartInfoParaInput { + float: left; + line-height: 0.15rem; + width: 0.48rem !important; + text-align: right; + } + + .form-control { + height: 0.08rem; + padding: 0.06rem 0.12rem; + font-size: 0.14rem; + font-weight: normal; + color: #333333; + background-color: white; + border: 0.01rem solid #b4afaf; + border-radius: 0; + box-shadow: none; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + } + } + } + } + } + + .searchbtn { + border-radius: 0; + border-width: 0; + padding: 0.02rem 0.14rem; + font-size: 0.14rem; + outline: none !important; + background-image: none !important; + filter: none; + box-shadow: none; + text-shadow: none; + display: inline-block; + font-weight: 400; + text-align: center; + vertical-align: middle; + cursor: pointer; + white-space: nowrap; + line-height: 0.2rem; + user-select: none; + margin-top: 0.08rem; + margin-left: 0.2rem; + height: 0.2rem; + margin-bottom: 0.02rem; + width: 0.6rem; + padding-top: 0.02rem; + border: 0.01rem solid #ccc; + } + + .blue { + background-color: #6396c2 !important; + color: #fff; + } + + .setBox { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + + .setGroup { + position: relative; + margin-bottom: 0.01rem !important; + padding: 0.05rem !important; + background-color: white; + border: 0.01rem solid transparent; + border-width: 0.01rem; + border-color: #bce8f1; + color: #31708f; + margin-top: 0.2rem; + + .setTitle { + font-size: 0.18rem; + position: absolute; + top: -0.15rem; + background-color: #fff; + padding: 0 0.05rem; + } + + .set_Option { + display: flex; + justify-content: center; + align-items: center; + + // margin-top: 0.1rem; + .grid-content { + display: flex; + justify-content: center; + align-items: center; + margin-top: 0.05rem; + + label { + width: 1.5rem; + font-size: 0.12rem; + text-align: right; + } + + .el-input__inner { + text-align: right; + height: 0.4rem; + line-height: 0.4rem; + padding: 0 0; + } + } + } + } + } + + .dialog_title_style { + height: 30px; + font-size: 22px; + text-align: left; + text-indent: 20px; + } + + .dialog_content_style { + height: 20px; + text-align: left; + text-indent: 20px; + margin-top: 10px; + } + + .el-color-picker { + line-height: 3; + margin-left: 0.05rem; + height: 0.34rem; + } + + .el-color-picker--mini .el-color-picker__trigger { + width: 0.2rem; + height: 0.2rem; + } + + .el-color-picker__trigger { + padding: unset; + } + + .el-color-picker--mini .el-color-picker__empty, + .el-color-picker--mini .el-color-picker__icon { + color: transparent; + } + + .tubiao { + height: 100%; + width: 100%; + } + + .disp_SetChoiceMenu_style { + position: absolute; + right: -1.77rem; + top: -0.01rem; + background: rgb(255, 255, 255); + border-width: 0.01rem 0.01rem 0.01rem 0.01rem; + border-color: #e5e5e5; + border-style: solid; + } +} + +.mulit-chart-select_menu { + width: 100%; + display: flex; + background: #fff; + border: 0.01rem solid #e5e5e5; + + .group_select_menu { + width: 100%; + border-right: 0.01rem solid #e5e5e5; + + ul { + width: 100%; + list-style: none; + margin: 0; + padding: 0.06rem 0; + + .group_style { + cursor: pointer; + color: #909399; + display: flex; + justify-content: center; + align-items: center; + padding: 0 0.3rem 0 0.2rem; + height: 0.34rem; + line-height: 0.34rem; + outline: none; + position: relative; + gap: 0.05rem; + box-sizing: border-box; + + .label_name { + // flex: 1; + padding: 0 0.1rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .speed_input_style { + -webkit-appearance: none; + background-color: transparent; + background-image: none; + border: none; + box-sizing: border-box; + color: #606266; + display: inline-block; + font-size: inherit; + height: 0.34rem; + line-height: 0.34rem; + outline: none; + padding: 0 0rem; + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); + width: 50%; + text-align: center; + // text-indent: 0.22rem; + } + + .deleted_style { + position: absolute; + right: 0.1rem; + font-size: 0.16rem; + } + + .deleted_style:hover { + color: red; + cursor: pointer; + } + + &:hover { + background: #f5f7fa; + color: #303133; + } + + .node_style { + cursor: pointer; + color: #909399; + display: flex; + align-items: center; + padding: 0 0.3rem 0 0.2rem; + height: 0.34rem; + line-height: 0.34rem; + outline: none; + + .label_name { + // flex: 1; + padding: 0 0.1rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + &:hover { + background: #f5f7fa; + color: #303133; + } + } + } + + .label_active { + color: #409eff !important; + font-weight: 700; + } + + .none_active { + color: #909399; + font-weight: unset; + } + } + } +} + +.paramQuery_popover_style { + min-width: 2rem !important; + width: unset !important; + inset: 1.2rem auto auto 2.42rem !important; + padding: unset !important; +} + +.multispeed_popover_style { + min-width: 2rem !important; + width: unset !important; + inset: 1.31rem auto auto 3.4rem !important; + padding: unset !important; +} + +.SPEED_popover_style { + min-width: 1.5rem !important; + width: unset !important; + inset: 1.31rem auto auto 2.42rem !important; + padding: unset !important; +} +</style> diff --git a/src/components/Chart/js/LxpChartDiagram.js b/src/components/Chart/js/LxpChartDiagram.js index e42402b..8e59187 100644 --- a/src/components/Chart/js/LxpChartDiagram.js +++ b/src/components/Chart/js/LxpChartDiagram.js @@ -1,787 +1,585 @@ -锘縤mport svgObject from "./svgOjbect"; -import ConstParas from "@/utils/constParas.js"; -import UnitHelper from "@/utils/unit.js"; -import PointToleranceConfig from "./PointToleranceConfig.js"; -import coordinateHelper from "@/utils/coordinateHelper.js"; -import languageHelper from "@/utils/languageHelper.js"; +锘縤mport svgObject from './svgOjbect'; +import ConstParas from '@/utils/constParas.js'; +import UnitHelper from '@/utils/unit.js'; +import PointToleranceConfig from './PointToleranceConfig.js'; +import coordinateHelper from '@/utils/coordinateHelper.js'; var LxpChartDiagram = function () { - var m_svg; + var m_svg; - var m_unit = { Q: 1, H: 0, P: 1, NPSH: 0 }; //鍔熺巼銆佹祦閲忋�佹壃绋嬪崟浣嶉泦鍚�(浠呬粎閽堝鏇茬嚎鍥�) - var m_divChartName; //瀹瑰櫒DIV鍚嶇О - var m_chartSize; //鍥捐〃灏哄 - var m_localizationType; //璇█绫诲瀷 + var m_unit = { Q: 1, H: 0, P: 1, NPSH: 0 }; //鍔熺巼銆佹祦閲忋�佹壃绋嬪崟浣嶉泦鍚� + var m_divChartName; //瀹瑰櫒DIV鍚嶇О + var m_chartSize; //鍥捐〃灏哄 + var m_localizationType; //璇█绫诲瀷 + var m_toolTipContent; //鍐呭鎻愮ずDIV瀹瑰櫒 + var m_equipZeroH = 0; - var m_equipCurve = { - //瑁呯疆鏇茬嚎 - isVisble: false, - ZeroH: 0, - DpSectPt: null, - }; - var m_chartType; //绫诲瀷 - var m_pumpInfo; //鍩烘湰淇℃伅 - var m_chartPointPara; - var m_chartObject; - var m_coordinatePara; //鍧愭爣 - var m_groupPointQeMethod = 2;//0 璁$畻鏁堢巼 1 璁$畻鍔熺巼 2 涓嶈绠� - var m_secondFlowCoord; //绗簩鍧愭爣鍙傛暟(娴侀噺) - var m_displayStyle; //鏄剧ず璁剧疆 - var m_changeWrkCurveCb; //淇敼宸ヤ綔鏇茬嚎鐨勫洖璋冨嚱鏁� - var m_chartDiagramPanelStyle = ConstParas.ChartDiagramPanelStyle.Two; + var m_chartType; //绫诲瀷 + var m_pumpInfo; //鍩烘湰淇℃伅 + var m_chartPointPara; + var m_chartObject; + var m_coordinatePara; //鍧愭爣 - var m_isDispCurveQE = true; //鏄惁鏄剧ず鏁堢巼 - var m_isDispCurveQP = true; //鏄惁鏄剧ず鍔熺巼 - var m_isHaveBottomPanel = true; //鏄惁鏈夊簳閮ㄩ潰鏉� - var m_isDrawEquepEtaCurve = true; - var m_isDispNpsh; //鏄惁鏄剧ず姹借殌 - var m_d2IsMeter = true; //鍏埗 + var m_secondFlowCoord; //绗簩鍧愭爣鍙傛暟(娴侀噺) - var m_wrkCurveGrp; //宸ヤ綔鏇茬嚎 - var m_designPointTolerance = [0.91, 1.09, 0.95, 1.05]; //璁捐鐐瑰叕宸� - var m_curveColorDict = []; //鏇茬嚎棰滆壊 + var m_chartSetting; //璁剧疆 + var m_displayStyle; //鏄剧ず璁剧疆 - //璁剧疆棰滆壊 - var setObjectColor = function (isMonorColor) { - m_displayStyle.IsMonoColor = isMonorColor; - if (m_displayStyle.IsMonoColor) { - m_displayStyle.ColorH = "#000000"; - m_displayStyle.ColorE = "#000000"; - m_displayStyle.ColorP = "#000000"; - m_displayStyle.ColorNPSH = "#000000"; - m_displayStyle.ColorEquipment = "#000000"; - m_displayStyle.ColorEqualParaCurvesE = "#000000"; - m_displayStyle.SpectrumColor = "#f2eada"; - m_displayStyle.ColorGridLine = "#cccccc"; - } else { - m_displayStyle.ColorH = "RoyalBlue"; - m_displayStyle.ColorE = "DarkGreen"; - m_displayStyle.ColorP = "MediumVioletRed"; - m_displayStyle.ColorNPSH = "Salmon"; - m_displayStyle.ColorEquipment = "#013317"; - m_displayStyle.ColorEqualParaCurvesE = "#402db7"; - m_displayStyle.ColorGridLine = "#cccccc"; - } - }; + var m_changeWrkCurveCb; //淇敼宸ヤ綔鏇茬嚎鐨勫洖璋冨嚱鏁� - //鍒濆鍖栨樉绀鸿缃� - var initialDispStyle = function (displayStyle, chartSetting) { - if (displayStyle != null) { - m_displayStyle = displayStyle; - } else { - m_displayStyle = {}; - m_displayStyle.IsMonoColor = false; - m_displayStyle.IsDispSpectrum = false; //榛樿涓嶆樉绀哄瀷璋� - m_displayStyle.DesignPointDispType = 0; //璁捐鐐规樉绀烘柟寮�(eDesignPointDispType) Cross 0 LeftDownTriangle 2 - m_displayStyle.BlodRegionCurveWidth = 4; - } - // - if (chartSetting != null) { - m_displayStyle.AllowRegionDispStyle = chartSetting.AllowRegionDispStyle; - m_displayStyle.PerferRegionDispStyle = chartSetting.PerferRegionDispStyle; + var m_chartDiagramPanelStyle = ConstParas.ChartDiagramPanelStyle.Two; - m_isDispCurveQE = chartSetting.IsDispCurveQE; - m_isDispCurveQP = chartSetting.IsDispCurveQP; - } - if (m_displayStyle.AxisTitlePosiAxisUpY == null) - m_displayStyle.AxisTitlePosiAxisUpY = false; + var m_isDispCurveQE = true; //鏄惁鏄剧ず鏁堢巼 + var m_isDispNpsh; //鏄惁鏄剧ず姹借殌 + var m_d2IsMeter = true; //鍏埗 - m_isDispNpsh = true; - if (m_chartObject != null && m_chartObject.MaxWaterCurveNPSH == null) - m_isDispNpsh = false; + var m_wrkCurveGrp; //宸ヤ綔鏇茬嚎 + var m_designPointTolerance = [0.91, 1.09, 0.95, 1.05]; //璁捐鐐瑰叕宸� - if (m_isDispCurveQP == false && m_isDispNpsh == false) - m_isHaveBottomPanel = false; + //璁剧疆棰滆壊 + var setObjectColor = function (isMonorColor) { + m_displayStyle.IsMonoColor = isMonorColor; + if (m_displayStyle.IsMonoColor) { + m_displayStyle.ColorH = '#000000'; + m_displayStyle.ColorE = '#000000'; + m_displayStyle.ColorP = '#000000'; + m_displayStyle.ColorNPSH = '#000000'; + m_displayStyle.ColorEquipment = '#000000'; + m_displayStyle.ColorEqualParaCurvesE = '#000000'; + m_displayStyle.ColorSpectrumFill = '#f2eada'; + m_displayStyle.ColorGridLine = '#cccccc'; + } else { + m_displayStyle.ColorH = 'RoyalBlue'; + m_displayStyle.ColorE = 'DarkGreen'; + m_displayStyle.ColorP = 'MediumVioletRed'; + m_displayStyle.ColorNPSH = 'Salmon'; + m_displayStyle.ColorEquipment = '#013317'; + m_displayStyle.ColorEqualParaCurvesE = '#402db7'; + m_displayStyle.ColorSpectrumFill = 'Aquamarine'; + m_displayStyle.ColorGridLine = '#cccccc'; + } + }; - if (m_displayStyle.BlodRegionCurveWidth == null) - m_displayStyle.BlodRegionCurveWidth = 4; + //鍒濆鍖栨樉绀鸿缃� + var initialDispStyle = function (displayStyle, chartSetting) { + if (displayStyle != null) { + m_displayStyle = displayStyle; + } else { + m_displayStyle = {}; + m_displayStyle.IsMonoColor = false; + m_displayStyle.IsDispSpectrum = false; //榛樿涓嶆樉绀哄瀷璋� + m_displayStyle.DesignPointDispType = 0; //璁捐鐐规樉绀烘柟寮�(eDesignPointDispType) Cross 0 LeftDownTriangle 2 + m_displayStyle.BlodRegionCurveWidth = 4; + } + // + if (chartSetting != null) { + m_displayStyle.AllowRegionDispStyle = chartSetting.AllowRegionDispStyle; + m_displayStyle.PerferRegionDispStyle = chartSetting.PerferRegionDispStyle; + } + if (m_displayStyle.AxisTitlePosiAxisUpY == null) m_displayStyle.AxisTitlePosiAxisUpY = false; - m_displayStyle.FeatCurveSize = 10; - m_displayStyle.EqualCurveSize = 9; + m_isDispNpsh = true; + if (m_chartObject != null && m_chartObject.MaxWaterCurveNPSH == null) m_isDispNpsh = false; + if (m_displayStyle.BlodRegionCurveWidth == null) m_displayStyle.BlodRegionCurveWidth = 4; - m_displayStyle.isDrawWaterMark = true; - //鏄惁鏄剧ず瀛愬埢搴� - m_displayStyle.isDispMiniTick = true; - m_displayStyle.isRotateLabelX = false; - m_displayStyle.isAxisIntervalX = false; - m_displayStyle.MiniTickNumber = 3; - //瑁呯疆鏇茬嚎 - if (m_displayStyle.IsDispEquipCurve) { - m_equipCurve.isVisble = true; - } + m_displayStyle.FeatCurveSize = 10; + m_displayStyle.EqualCurveSize = 9; + if (m_displayStyle.IsDispCurveLabel == null) m_displayStyle.IsDispCurveLabel = true; - //闈㈡澘鏄剧ず - m_chartDiagramPanelStyle = ConstParas.ChartDiagramPanelStyle.Two; - if (m_displayStyle.DiagramPanelStyle == "Whole") { - m_chartDiagramPanelStyle = ConstParas.ChartDiagramPanelStyle.Whole; - } else if (m_displayStyle.DiagramPanelStyle == "Two") { - m_chartDiagramPanelStyle = ConstParas.ChartDiagramPanelStyle.Two; - } + m_displayStyle.isDrawWaterMark = true; + m_displayStyle.isDispEquipmentCurve = false; + //鏄惁鏄剧ず瀛愬埢搴� + m_displayStyle.isDispMiniTick = true; + m_displayStyle.isRotateLabelX = false; + m_displayStyle.isAxisIntervalX = false; + m_displayStyle.MiniTickNumber = 3; - setObjectColor(m_displayStyle.IsMonoColor); - }; - var initialSvg = function () { - if (m_divChartName == null) { - return false; - } - // - var m_svgID = "FeatCurveSvg"; //鏆傛椂涓嶇煡閬撳仛鍟ョ敤 - m_svg = new svgObject().init( - m_divChartName, - m_chartSize.TotalWidth, - m_chartSize.TotalHeight, - svgClick, - svgMove, - m_svgID - ); + setObjectColor(m_displayStyle.IsMonoColor); + }; + var initialSvg = function () { + if (m_divChartName == null) { + return false; + } + // + var m_svgID = 'FeatCurveSvg'; //鏆傛椂涓嶇煡閬撳仛鍟ョ敤 + m_svg = new svgObject().init(m_divChartName, m_chartSize.TotalWidth, m_chartSize.TotalHeight, svgClick, svgMove, m_svgID); - return true; - }; - //鍒濆鍖栭潰鏉垮昂瀵� - var initialPanelSize = function () { - if (!initialSvg()) return; + return true; + }; + //鍒濆鍖栭潰鏉垮昂瀵� + var initialPanelSize = function () { + if (!initialSvg()) return; - if (m_coordinatePara == null) return; + if (m_coordinatePara == null) return; - if (m_chartSize == null) { - m_chartSize = {}; - m_chartSize.TotalWidth = - document.getElementById(m_divChartName).clientWidth; - m_chartSize.TotalHeight = - document.getElementById(m_divChartName).clientHeight; - } + if (m_chartSize == null) { + m_chartSize = {}; + m_chartSize.TotalWidth = document.getElementById(m_divChartName).clientWidth; + m_chartSize.TotalHeight = document.getElementById(m_divChartName).clientHeight; + } - if (m_chartSize.TotalHeight < 500) m_chartSize.TotalHeight = 500; + if (m_chartSize.TotalHeight < 500) m_chartSize.TotalHeight = 500; - var space_left = 70; - var space_right = 60; - var space_top = 30; //鏈夌浜屽埢搴� 灏遍珮涓�鐐�, 娌℃湁鐨勮瘽 10灏卞浜� - var space_bottom = 52; - if (m_coordinatePara.SpaceP > 99) { - space_left = 80; - } - if (m_coordinatePara.SpaceP <= 0.1) { - space_left = 80; - } - if (m_localizationType >= 2) { - space_left = 75; - space_right = 75; - } + var space_left = 70; + var space_right = 60; + var space_top = 30; //鏈夌浜屽埢搴� 灏遍珮涓�鐐�, 娌℃湁鐨勮瘽 10灏卞浜� + var space_bottom = 52; + if (m_coordinatePara.SpaceP > 99) { + space_left = 80; + } + if (m_coordinatePara.SpaceP <= 0.1) { + space_left = 80; + } + if (m_localizationType >= 2) { + space_left = 75; + space_right = 75; + } - m_chartSize.SpaceTop = space_top; - m_chartSize.SpaceRight = space_right; - m_chartSize.SpaceBottom = space_bottom; - m_chartSize.SpaceLeft = space_left; + m_chartSize.SpaceTop = space_top; + m_chartSize.SpaceRight = space_right; + m_chartSize.SpaceBottom = space_bottom; + m_chartSize.SpaceLeft = space_left; - m_chartSize.DiagramTop = space_top; - m_chartSize.DiagramLeft = space_left; - m_chartSize.DiagramRight = m_chartSize.TotalWidth - space_right; - m_chartSize.DiagramBottom = m_chartSize.TotalHeight - space_bottom; + m_chartSize.DiagramTop = space_top; + m_chartSize.DiagramLeft = space_left; + m_chartSize.DiagramRight = m_chartSize.TotalWidth - space_right; + m_chartSize.DiagramBottom = m_chartSize.TotalHeight - space_bottom; - m_chartSize.DiagramWidth = - m_chartSize.TotalWidth - space_left - space_right; - var height = m_chartSize.TotalHeight - space_top - space_bottom; + m_chartSize.DiagramWidth = m_chartSize.TotalWidth - space_left - space_right; + m_chartSize.DiagramHeight = m_chartSize.TotalHeight - space_top - space_bottom; - m_chartSize.SpaceGridX = - m_chartSize.DiagramWidth / m_coordinatePara.GridNumberX; + m_chartSize.SpaceGridX = m_chartSize.DiagramWidth / m_coordinatePara.GridNumberX; - if (m_chartDiagramPanelStyle == ConstParas.ChartDiagramPanelStyle.Whole) { - m_chartSize.UpDiagram = {}; - m_chartSize.UpDiagram.Up = space_top; - m_chartSize.UpDiagram.Bottom = m_chartSize.TotalHeight - space_bottom; - m_chartSize.UpDiagram.DiagramHeight = height; - m_chartSize.UpDiagram.SpaceGridY = height / m_coordinatePara.GridNumberY; - m_chartSize.UpDiagram.GridNumberY = m_coordinatePara.GridNumberY; + if (m_chartDiagramPanelStyle == ConstParas.ChartDiagramPanelStyle.Whole) { + m_chartSize.UpDiagram = {}; + m_chartSize.UpDiagram.Up = space_top; + m_chartSize.UpDiagram.Bottom = m_chartSize.TotalHeight - space_bottom; + m_chartSize.UpDiagram.SpaceGridY = m_chartSize.DiagramHeight / m_coordinatePara.GridNumberY; + m_chartSize.UpDiagram.GridNumberY = m_coordinatePara.GridNumberY; - m_chartSize.DownDiagram = {}; //涓�鏍� - m_chartSize.DownDiagram.Up = space_top; - m_chartSize.DownDiagram.DiagramHeight = height; - m_chartSize.DownDiagram.Bottom = m_chartSize.TotalHeight - space_bottom; - m_chartSize.DownDiagram.SpaceGridY = - height / m_coordinatePara.GridNumberY; - m_chartSize.DownDiagram.GridNumberY = m_coordinatePara.GridNumberY; + m_chartSize.DownDiagram = {}; //涓�鏍� + m_chartSize.DownDiagram.Up = space_top; + m_chartSize.DownDiagram.Bottom = m_chartSize.TotalHeight - space_bottom; + m_chartSize.DownDiagram.SpaceGridY = m_chartSize.DiagramHeight / m_coordinatePara.GridNumberY; + m_chartSize.DownDiagram.GridNumberY = m_coordinatePara.GridNumberY; - m_chartSize.PanelH = {}; - m_chartSize.PanelH.Bottom = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoH; - m_chartSize.PanelH.Up = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoH; + m_chartSize.PanelH = {}; + m_chartSize.PanelH.Bottom = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoH; + m_chartSize.PanelH.Up = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoH; - m_chartSize.PanelE = {}; - m_chartSize.PanelE.Bottom = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoE; - m_chartSize.PanelE.Up = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoE; + m_chartSize.PanelE = {}; + m_chartSize.PanelE.Bottom = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoE; + m_chartSize.PanelE.Up = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoE; - m_chartSize.PanelP = {}; - m_chartSize.PanelP.Bottom = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoP; - m_chartSize.PanelP.Up = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoP; + m_chartSize.PanelP = {}; + m_chartSize.PanelP.Bottom = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoP; + m_chartSize.PanelP.Up = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoP; - m_chartSize.PanelNPSH = {}; - m_chartSize.PanelNPSH.Bottom = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoNPSH; - m_chartSize.PanelNPSH.Up = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoNPSH; + m_chartSize.PanelNPSH = {}; + m_chartSize.PanelNPSH.Bottom = + m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.StartLineNoNPSH; + m_chartSize.PanelNPSH.Up = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * m_coordinatePara.EndLineNoNPSH; - //鎶婇棿闅欏紕灏忕偣 - var areaAttr = { - x: space_left, - y: space_top, - width: m_chartSize.DiagramWidth, - height: m_chartSize.UpDiagram.DiagramHeight, - }; + //console.log(m_chartSize) + //鎶婇棿闅欏紕灏忕偣 + var areaAttr = { + x: space_left, + y: space_top, + width: m_chartSize.DiagramWidth, + height: m_chartSize.DiagramHeight, + }; - var areaStyle = { - "stroke-width": "1px", - stroke: "#cccccc", - fill: "#ffffff", - "fill-opacity": "0.5", - "zIndex:": 5, - }; + var areaStyle = { + 'stroke-width': '1px', + stroke: '#cccccc', + fill: '#ffffff', + 'fill-opacity': '0.5', + 'zIndex:': 5, + }; - // - m_svg.createArea(areaAttr, areaStyle); - } else { - var panel_space = 35; - m_chartSize.PanelSpace = panel_space; + // + m_svg.createArea(areaAttr, areaStyle); + } else { + var panel_space = 35; + m_chartSize.PanelSpace = panel_space; - var grid_num_h = - m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH; - var grid_num_e = - m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE; + var grid_num_h = m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH; + var grid_num_e = m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE; - var grid_num_up = Math.max(grid_num_h, grid_num_e); - if (m_coordinatePara.DislocationNumUp > 0) - grid_num_up = grid_num_up + m_coordinatePara.DislocationNumUp; - else grid_num_up = grid_num_up + 2; //澶氫袱鏉� + var grid_num_up = Math.max(grid_num_h, grid_num_e); + grid_num_up = grid_num_up + 2; //澶氫袱鏉� + if (!m_isDispCurveQE) { + grid_num_up = m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH; + } + //console.log(grid_num_up, grid_num_h, grid_num_e) ; + var grid_num_NPSH = m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH; + var grid_num_p = m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP; + var grid_num_down = Math.max(grid_num_NPSH, grid_num_p) + 1; - if (!m_isDispCurveQE) { - grid_num_up = - m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH; - } + m_chartSize.UpDiagram = {}; + m_chartSize.UpDiagram.Up = space_top; + m_chartSize.UpDiagram.SpaceGridY = (m_chartSize.DiagramHeight - panel_space) / (grid_num_up + grid_num_down); + m_chartSize.UpDiagram.Bottom = space_top + grid_num_up * m_chartSize.UpDiagram.SpaceGridY; + m_chartSize.UpDiagram.GridNumberY = grid_num_up; - var grid_num_NPSH = - m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH; - var grid_num_p = - m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP; + m_chartSize.DownDiagram = {}; + m_chartSize.DownDiagram.Up = m_chartSize.UpDiagram.Bottom + panel_space; + m_chartSize.DownDiagram.SpaceGridY = (m_chartSize.DiagramHeight - panel_space) / (grid_num_up + grid_num_down); + m_chartSize.DownDiagram.Bottom = m_chartSize.TotalHeight - space_bottom; + m_chartSize.DownDiagram.GridNumberY = grid_num_down; - var grid_num_down = - Math.max(grid_num_NPSH, grid_num_p) + - m_coordinatePara.DislocationNumDown; + m_chartSize.PanelH = {}; + m_chartSize.PanelH.Bottom = m_chartSize.UpDiagram.Up + m_chartSize.UpDiagram.SpaceGridY * grid_num_h; + m_chartSize.PanelH.Up = m_chartSize.UpDiagram.Up; - m_chartSize.UpDiagram = {}; - m_chartSize.DownDiagram = {}; + m_chartSize.PanelE = {}; + m_chartSize.PanelE.Bottom = m_chartSize.UpDiagram.Bottom; + m_chartSize.PanelE.Up = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * grid_num_e; - if (m_isHaveBottomPanel == false) { - m_chartSize.UpDiagram.DiagramHeight = height - panel_space; - m_chartSize.DownDiagram.DiagramHeight = 5; - } else { - m_chartSize.UpDiagram.DiagramHeight = (height - panel_space) * 0.6; - m_chartSize.DownDiagram.DiagramHeight = (height - panel_space) * 0.4; - } + m_chartSize.PanelP = {}; + m_chartSize.PanelP.Up = m_chartSize.DownDiagram.Up; + m_chartSize.PanelP.Bottom = m_chartSize.DownDiagram.Up + m_chartSize.DownDiagram.SpaceGridY * grid_num_p; - m_chartSize.UpDiagram.Up = space_top; - m_chartSize.UpDiagram.SpaceGridY = - m_chartSize.UpDiagram.DiagramHeight / grid_num_up; - m_chartSize.UpDiagram.Bottom = - space_top + grid_num_up * m_chartSize.UpDiagram.SpaceGridY; - m_chartSize.UpDiagram.GridNumberY = grid_num_up; + m_chartSize.PanelNPSH = {}; + m_chartSize.PanelNPSH.Bottom = m_chartSize.DownDiagram.Bottom; + m_chartSize.PanelNPSH.Up = m_chartSize.DownDiagram.Bottom - m_chartSize.DownDiagram.SpaceGridY * grid_num_NPSH; - m_chartSize.DownDiagram.Up = m_chartSize.UpDiagram.Bottom + panel_space; - m_chartSize.DownDiagram.SpaceGridY = - m_chartSize.DownDiagram.DiagramHeight / grid_num_down; - m_chartSize.DownDiagram.Bottom = m_chartSize.TotalHeight - space_bottom; - m_chartSize.DownDiagram.GridNumberY = grid_num_down; + //console.log(m_chartSize) + } + }; + //绗簩鍧愭爣 + var calcSecondFlowCoordParas = function () { + m_secondFlowCoord = {}; + if (m_coordinatePara.SecondUnitQ != null) { + //index椤甸潰浼氳缃� + m_secondFlowCoord.Unit = m_coordinatePara.SecondUnitQ; + } else { + if (m_unit.Q == 0) m_secondFlowCoord.Unit = 1; + else m_secondFlowCoord.Unit = 0; + } - m_chartSize.PanelH = {}; - m_chartSize.PanelH.Bottom = - m_chartSize.UpDiagram.Up + - m_chartSize.UpDiagram.SpaceGridY * grid_num_h; - m_chartSize.PanelH.Up = m_chartSize.UpDiagram.Up; + m_secondFlowCoord.Labels = []; + // console.log(m_coordinatePara) - m_chartSize.PanelE = {}; - m_chartSize.PanelE.Bottom = m_chartSize.UpDiagram.Bottom; - m_chartSize.PanelE.Up = - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * grid_num_e; + var spaceQ2 = coordinateHelper.GetOptimalSpace(UnitHelper.ConvertQ_fromM3H(m_secondFlowCoord.Unit, m_coordinatePara.SpaceQ * 1.1)); + var min_q = UnitHelper.ConvertQ_fromM3H(m_secondFlowCoord.Unit, m_coordinatePara.DispMinQ); + var dispMinQ2 = Math.floor(min_q / spaceQ2) * spaceQ2; - m_chartSize.PanelP = {}; - m_chartSize.PanelP.Up = m_chartSize.DownDiagram.Up; - m_chartSize.PanelP.Bottom = - m_chartSize.DownDiagram.Up + - m_chartSize.DownDiagram.SpaceGridY * grid_num_p; + for (var i = 0; i < m_coordinatePara.GridNumberX; i++) { + var q = dispMinQ2 + spaceQ2 * i; + var disQ = UnitHelper.valueFormat(UnitHelper.getDispValueQ(q)); + var m3h = UnitHelper.ConvertQ_toM3H(m_secondFlowCoord.Unit, q); - m_chartSize.PanelNPSH = {}; - m_chartSize.PanelNPSH.Bottom = m_chartSize.DownDiagram.Bottom; - m_chartSize.PanelNPSH.Up = - m_chartSize.DownDiagram.Bottom - - m_chartSize.DownDiagram.SpaceGridY * grid_num_NPSH; - } - }; - //绗簩娴侀噺鍧愭爣 - var calcSecondFlowCoordParas = function () { - m_secondFlowCoord = {}; - if (m_coordinatePara.SecondUnitQ != null) { - //index椤甸潰浼氳缃� - m_secondFlowCoord.Unit = m_coordinatePara.SecondUnitQ; - } else { - if (m_unit.Q == 0) m_secondFlowCoord.Unit = 1; - else m_secondFlowCoord.Unit = 0; - } + if (m3h < m_coordinatePara.DispMaxQ * 0.95) { + //console.log(i, disQ, m3h) + m_secondFlowCoord.Labels.push({ DispValue: disQ, M3H: m3h }); + } else { + break; + } + } + //console.log(m_secondFlowCoord) + }; + // + var getSvgObjByName = function (objName) { + return m_svg.getPathByName(objName); + }; + //浠g爜涓存椂娉ㄩ噴 + var svgClick = function (e) {}; + // + var svgMove = function (e) { + //alert("svgMove"); + }; - m_secondFlowCoord.Labels = []; + //缈昏瘧 + var getTranslateString = function (cn) { + if (m_localizationType == 0) return cn; + if (m_localizationType == 6) { + //ko + if (cn == '娴侀噺') return '鞙犽焿'; + else if (cn == '鍘嬪姏') return '鞎曤牓氚涬嫟'; + else if (cn == '鎵▼') return '鞏戩爼'; + else if (cn == '鏁堢巼') return '須湪靹�'; + else if (cn == '鍔熺巼') return '韺岇泴'; + } + if (m_localizationType == 8) { + //es + if (cn == '娴侀噺') return 'Caudal'; + else if (cn == '鍘嬪姏') return 'Presi贸n'; + else if (cn == '鎵▼') return 'Cabezal'; + else if (cn == '鏁堢巼') return 'Eficiencia'; + else if (cn == '鍔熺巼') return 'Potencia'; + } + if (m_localizationType == 5) { + //ru + if (cn == '娴侀噺') return '锌芯褌芯泻'; + else if (cn == '鍘嬪姏') return '写邪胁谢械薪懈械'; + else if (cn == '鎵▼') return '薪邪锌芯褉'; + else if (cn == '鏁堢巼') return '褝褎褎械泻褌懈胁薪芯褋褌褜'; + else if (cn == '鍔熺巼') return '屑芯褖薪芯褋褌褜聽'; + } + if (cn == '娴侀噺') return 'Flow'; + else if (cn == '鍘嬪姏') return 'Press'; + else if (cn == '鎵▼') return 'Head'; + else if (cn == '鏁堢巼') return 'Eta'; + else if (cn == '鍔熺巼') return 'Power'; + else if (cn == '姹借殌') return 'NPSHr'; + else return cn; + }; + //缁樺埗x鍧愭爣(鍚爣棰�):搴曢儴 + var createFlowAxisBottom = function () { + var title_space = 44; + var bottom_posi = m_chartSize.DownDiagram.Bottom; - var spaceQ2 = coordinateHelper.GetOptimalSpace( - UnitHelper.ConvertQ_fromM3H( - m_secondFlowCoord.Unit, - m_coordinatePara.SpaceQ * 1.1 - ) - ); - var min_q = UnitHelper.ConvertQ_fromM3H( - m_secondFlowCoord.Unit, - m_coordinatePara.DispMinQ - ); - var dispMinQ2 = Math.floor(min_q / spaceQ2) * spaceQ2; + if (m_coordinatePara == null) { + return; + } - for (var i = 0; i < m_coordinatePara.GridNumberX; i++) { - var q = dispMinQ2 + spaceQ2 * i; - var disQ = UnitHelper.valueFormat(UnitHelper.getDispValueQ(q)); - var m3h = UnitHelper.ConvertQ_toM3H(m_secondFlowCoord.Unit, q); + //鍒诲害绾� + var attrAxisTickX = { + stroke: 'black', + 'stroke-width': '1', + fill: 'none', + zIndex: 10, + }; - if (m3h < m_coordinatePara.DispMaxQ * 0.95) { + //鍒诲害闀垮害 + var minTickLength = 4; + var tickLength = 6; - m_secondFlowCoord.Labels.push({ DispValue: disQ, M3H: m3h }); - } else { - break; - } - } - - }; - - //浠g爜涓存椂娉ㄩ噴 - var svgClick = function (e) { - // if (m_toolTipContent == null) - // return; - // if (e.clientX - (svg).offset().left > m_chartSize.SpaceLeft && m_chartSize.DiagramRightX + (svg).offset().left - e.clientX > 0 && - // e.clientY - (svg).offset().top > m_chartSize.SpaceTop && m_chartSize.DiagramBottomY + (svg).offset().top - e.clientY > 0) { - // var htmlContent = new Array(); - // var xPixel = e.clientX - (svg).offset().left; - // var yPixel = e.clientY + (document).scrollTop() - (svg).offset().top; //鍙鍖哄煙 婊氬姩鏈夐棶棰�,鎵�浠ヨ鍔犱笂(document).scrollTop() - // var flow = "鐐瑰嚮澶�: 娴侀噺"; - // var head = "鎵▼"; - // var power = "鍔熺巼"; - // if (m_localizationType == 2) { - // flow = "Click point : Q"; - // head = "H"; - // cavitation = "NPSH"; - // } - // flow = flow + " : " + parseFloat(getActualValue(m_coordinatePara.CoordMinQ, m_coordinatePara.CoordMaxQ, m_chartSize.SpaceLeft, m_chartSize.DiagramRightX, xPixel)).toFixed(1); - // htmlContent.push(flow + " m鲁/h"); - // htmlContent.push(" "); - // if (yPixel <= m_coordinatePara.ValidPixelMinH && yPixel >= m_coordinatePara.ValidPixelMaxH) { - // head = head + " : " + parseFloat(getActualValue(m_coordinatePara.CoordMinH, m_coordinatePara.CoordMaxH, m_chartSize.DiagramBottomY, m_chartSize.SpaceTop, yPixel)).toFixed(1); - // //alert(yPixel); alert(head); - // htmlContent.push(head + " m"); - // htmlContent.push(" "); - // } - // m_toolTipContent.html(htmlContent.join('')); - // } - }; - // - var svgMove = function (e) { - //alert("svgMove"); - }; - - //缈昏瘧 - var getTranslateString = function (cn) { - if (m_localizationType == 0) return cn; - return languageHelper.translateString(m_localizationType, cn); - }; - //缁樺埗x鍧愭爣(鍚爣棰�):搴曢儴 - var createFlowAxisBottom = function () { - var title_space = 44; - var bottom_posi = m_chartSize.DownDiagram.Bottom; - - if (m_coordinatePara == null) { - return; - } - - //鍒诲害绾� - var attrAxisTickX = { - stroke: "black", - "stroke-width": "1", - fill: "none", - zIndex: 10, - }; - - //鍒诲害闀垮害 - var minTickLength = 4; - var tickLength = 6; - - //鍒诲害鏂囧瓧 - var styleAxisLabelX = - "font-size:11px;fill-opacity:1;fill:black;user-select:none;"; //font-weight:bold - - //鏍囬鏂囧瓧 - var styleAxisTitleX = - "font-size:14px;fill-opacity:1;fill:black;font-weight:bold;user-select: none;"; - - // - for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { - let q = m_coordinatePara.MinQ + i * m_coordinatePara.SpaceQ; + //鍒诲害鏂囧瓧 + var styleAxisLabelX = 'font-size:11px;fill-opacity:1;fill:black;'; //font-weight:bold - var content = UnitHelper.valueFormat( - UnitHelper.getDispValueQ(UnitHelper.ConvertQ_fromM3H(m_unit.Q, q)) - ); + //鏍囬鏂囧瓧 + var styleAxisTitleX = 'font-size:14px;fill-opacity:1;fill:black;font-weight:bold;'; - if (i == m_coordinatePara.GridNumberX) { - let unit_name = UnitHelper.GetUnitNameQ(m_unit.Q); - content = "Q [" + unit_name + "]"; - } - var posiX_grid = m_chartSize.DiagramLeft + m_chartSize.SpaceGridX * i; - //鍒诲害绾� - var valueMain = []; - valueMain.push( - "M ", - posiX_grid, - " ", - bottom_posi, - " L ", - posiX_grid, - " ", - bottom_posi + tickLength - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickX, null); //"TickLineX" + i + // + for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { + let q = m_coordinatePara.MinQ + i * m_coordinatePara.SpaceQ; + //console.log(q) + var content = UnitHelper.valueFormat(UnitHelper.getDispValueQ(UnitHelper.ConvertQ_fromM3H(m_unit.Q, q))); + if (i == m_coordinatePara.GridNumberX) { + let unit_name = UnitHelper.GetUnitNameQ(m_unit.Q); + content = 'Q [' + unit_name + ']'; + } + var posiX_grid = m_chartSize.DiagramLeft + m_chartSize.SpaceGridX * i; + //鍒诲害绾� + var valueMain = []; + valueMain.push('M ', posiX_grid, ' ', bottom_posi, ' L ', posiX_grid, ' ', bottom_posi + tickLength); + m_svg.createPath(null, valueMain.join(''), attrAxisTickX, null); //"TickLineX" + i - //鏂囧瓧 m_displayStyle.isAxisIntervalX - var label_y = bottom_posi + tickLength + 15; - if (m_displayStyle.isRotateLabelX) label_y = label_y + 1; - var attrAxisLabelX = { - opacity: 1, - x: posiX_grid, - y: label_y, - "text-anchor": "middle", - }; - var transform = null; - if (m_displayStyle.isRotateLabelX) - transform = "rotate(45 " + posiX_grid + "," + label_y + ")"; - if (m_displayStyle.isAxisIntervalX) { - if (i % 2 == 0) - m_svg.createText( - attrAxisLabelX, - styleAxisLabelX, - content, - 10, - null, - transform - ); - } else { - m_svg.createText( - attrAxisLabelX, - styleAxisLabelX, - content, - 10, - null, - transform - ); - } + //鏂囧瓧 m_displayStyle.isAxisIntervalX + var label_y = bottom_posi + tickLength + 15; + if (m_displayStyle.isRotateLabelX) label_y = label_y + 1; + var attrAxisLabelX = { + opacity: 1, + x: posiX_grid, + y: label_y, + 'text-anchor': 'middle', + }; + var transform = null; + if (m_displayStyle.isRotateLabelX) transform = 'rotate(45 ' + posiX_grid + ',' + label_y + ')'; + if (m_displayStyle.isAxisIntervalX) { + if (i % 2 == 0) m_svg.createText(attrAxisLabelX, styleAxisLabelX, content, 10, null, transform); + } else { + m_svg.createText(attrAxisLabelX, styleAxisLabelX, content, 10, null, transform); + } - //瀛愬埢搴︾嚎 - if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.GridNumberX) { - for (var j = 0; j <= m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiX_grid + - (m_chartSize.SpaceGridX * j) / (m_displayStyle.MiniTickNumber + 1); - var valueMini = []; - valueMini.push( - "M ", - pois_minTick, - " ", - bottom_posi, - " L ", - pois_minTick, - " ", - bottom_posi + minTickLength - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickX, null); - } - } - } + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.GridNumberX) { + for (var j = 0; j <= m_displayStyle.MiniTickNumber; j++) { + var pois_minTick = posiX_grid + (m_chartSize.SpaceGridX * j) / (m_displayStyle.MiniTickNumber + 1); + var valueMini = []; + valueMini.push('M ', pois_minTick, ' ', bottom_posi, ' L ', pois_minTick, ' ', bottom_posi + minTickLength); + m_svg.createPath(null, valueMini.join(''), attrAxisTickX, null); + } + } + } - var attrAxisTitleX = { - opacity: 1, - x: (m_chartSize.DiagramLeft + m_chartSize.DiagramRight) / 2, - y: bottom_posi + title_space, - "text-anchor": "middle", - }; - if (m_displayStyle.isRotateLabelX) attrAxisTitleX.y = attrAxisTitleX.y + 12; + var attrAxisTitleX = { + opacity: 1, + x: (m_chartSize.DiagramLeft + m_chartSize.DiagramRight) / 2, + y: bottom_posi + title_space, + 'text-anchor': 'middle', + }; + if (m_displayStyle.isRotateLabelX) attrAxisTitleX.y = attrAxisTitleX.y + 12; - let unit_name = UnitHelper.GetUnitNameQ(m_unit.Q); - m_svg.createText( - attrAxisTitleX, - styleAxisTitleX, - getTranslateString("娴侀噺") + " (" + unit_name + ")" - ); - }; - //缁樺埗x鍧愭爣(鍚爣棰�):涓婇潰绗簩鍧愭爣 - var createFlowAxisSecondUp = function () { - if (m_secondFlowCoord == null || m_secondFlowCoord.Labels == null) { - return; - } + let unit_name = UnitHelper.GetUnitNameQ(m_unit.Q); + m_svg.createText(attrAxisTitleX, styleAxisTitleX, getTranslateString('娴侀噺') + ' (' + unit_name + ')'); + }; + //缁樺埗x鍧愭爣(鍚爣棰�):涓婇潰绗簩鍧愭爣 + var createFlowAxisSecondUp = function () { + if (m_secondFlowCoord == null || m_secondFlowCoord.Labels == null) { + return; + } - //鍒诲害绾� - var attrAxisTickX = { - stroke: "black", - "stroke-width": "1", - fill: "none", - zIndex: 10, - }; + //鍒诲害绾� + var attrAxisTickX = { + stroke: 'black', + 'stroke-width': '1', + fill: 'none', + zIndex: 10, + }; - //鍒诲害闀垮害 - var minTickLength = 4; - var tickLength = 6; + //鍒诲害闀垮害 + var minTickLength = 4; + var tickLength = 6; - //鍒诲害鏂囧瓧 - var styleAxisLabelX = - "font-size:11px;fill-opacity:1;fill:black;user-select:none;"; //font-weight:bold - var bottom_posi = m_chartSize.SpaceTop; + //鍒诲害鏂囧瓧 + var styleAxisLabelX = 'font-size:11px;fill-opacity:1;fill:black;'; //font-weight:bold + var bottom_posi = m_chartSize.SpaceTop; - // - var posiX_start = getPixelValueQ(m_secondFlowCoord.Labels[0].M3H); - var spaix_space = - getPixelValueQ(m_secondFlowCoord.Labels[1].M3H) - - getPixelValueQ(m_secondFlowCoord.Labels[0].M3H); - var iLabelCount = m_secondFlowCoord.Labels.length; + // + var posiX_start = getPixelValueQ(m_secondFlowCoord.Labels[0].M3H); + var spaix_space = getPixelValueQ(m_secondFlowCoord.Labels[1].M3H) - getPixelValueQ(m_secondFlowCoord.Labels[0].M3H); + var iLabelCount = m_secondFlowCoord.Labels.length; - // - for (var i = 0; i <= 2; i++) { - var last_posi = posiX_start + iLabelCount * spaix_space; - if (last_posi < m_chartSize.DiagramRight - spaix_space * 1.1) { - var last = m_secondFlowCoord.Labels[iLabelCount - 1]; - var lastlast = m_secondFlowCoord.Labels[iLabelCount - 2]; - m_secondFlowCoord.Labels.push({ - DispValue: last.DispValue + (last.DispValue - lastlast.DispValue), - M3H: last.M3H + (last.M3H - lastlast.M3H), - }); + // + for (var i = 0; i <= 2; i++) { + var last_posi = posiX_start + iLabelCount * spaix_space; + if (last_posi < m_chartSize.DiagramRight - spaix_space * 1.1) { + var last = m_secondFlowCoord.Labels[iLabelCount - 1]; + var lastlast = m_secondFlowCoord.Labels[iLabelCount - 2]; + m_secondFlowCoord.Labels.push({ + DispValue: last.DispValue + (last.DispValue - lastlast.DispValue), + M3H: last.M3H + (last.M3H - lastlast.M3H), + }); - iLabelCount++; - } - } + iLabelCount++; + } + } - for (var i = 0; i <= iLabelCount; i++) { - var content = ""; - var posiX_grid = 0; - if (i == iLabelCount) { - let unit_name = UnitHelper.GetUnitNameQ(m_secondFlowCoord.Unit); - content = "Q [" + unit_name + "]"; - posiX_grid = m_chartSize.DiagramRight; - } else { - let q_disp = m_secondFlowCoord.Labels[i].DispValue; - //let q_m3h = m_secondFlowCoord.Labels[i].M3H; + for (let i = 0; i <= iLabelCount; i++) { + var content = ''; + var posiX_grid = 0; + if (i == iLabelCount) { + let unit_name = UnitHelper.GetUnitNameQ(m_secondFlowCoord.Unit); + content = 'Q [' + unit_name + ']'; + posiX_grid = m_chartSize.DiagramRight; + } else { + let q_disp = m_secondFlowCoord.Labels[i].DispValue; + //let q_m3h = m_secondFlowCoord.Labels[i].M3H; - content = UnitHelper.valueFormat(UnitHelper.getDispValueQ(q_disp)); - posiX_grid = posiX_start + i * spaix_space; - if (posiX_grid < m_chartSize.DiagramLeft) { - continue; - } + content = UnitHelper.valueFormat(UnitHelper.getDispValueQ(q_disp)); + posiX_grid = posiX_start + i * spaix_space; + if (posiX_grid < m_chartSize.DiagramLeft) { + continue; + } - //鍒诲害绾� - var valueMain = []; - valueMain.push( - "M ", - posiX_grid, - " ", - bottom_posi, - " L ", - posiX_grid, - " ", - bottom_posi - tickLength - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickX, null); //"TickLineX" + i - } + //鍒诲害绾� + var valueMain = []; + valueMain.push('M ', posiX_grid, ' ', bottom_posi, ' L ', posiX_grid, ' ', bottom_posi - tickLength); + m_svg.createPath(null, valueMain.join(''), attrAxisTickX, null); //"TickLineX" + i + } - //鏂囧瓧 m_displayStyle.isAxisIntervalX - var label_y = bottom_posi - tickLength - 7; + //鏂囧瓧 m_displayStyle.isAxisIntervalX + var label_y = bottom_posi - tickLength - 7; - var attrAxisLabelX = { - opacity: 1, - x: posiX_grid, - y: label_y, - "text-anchor": "middle", - }; - var transform = null; + var attrAxisLabelX = { + opacity: 1, + x: posiX_grid, + y: label_y, + 'text-anchor': 'middle', + }; + var transform = null; - m_svg.createText( - attrAxisLabelX, - styleAxisLabelX, - content, - 10, - null, - transform - ); + m_svg.createText(attrAxisLabelX, styleAxisLabelX, content, 10, null, transform); - //瀛愬埢搴︾嚎 - var sub_spaix_space = spaix_space / m_displayStyle.MiniTickNumber; - if (i < iLabelCount - 1) { - for (var j = 1; j < m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = posiX_grid + sub_spaix_space * j; - if (pois_minTick < m_chartSize.DiagramLeft) { - continue; - } + //瀛愬埢搴︾嚎 + var sub_spaix_space = spaix_space / m_displayStyle.MiniTickNumber; + if (i < iLabelCount - 1) { + for (var j = 1; j < m_displayStyle.MiniTickNumber; j++) { + var pois_minTick = posiX_grid + sub_spaix_space * j; + if (pois_minTick < m_chartSize.DiagramLeft) { + continue; + } - var valueMini = []; - valueMini.push( - "M ", - pois_minTick, - " ", - bottom_posi, - " L ", - pois_minTick, - " ", - bottom_posi - minTickLength - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickX, null); - } - } else { - for (var j = 1; j < 10; j++) { - var pois_minTick = posiX_grid + sub_spaix_space * j; - if (pois_minTick > m_chartSize.DiagramRight - sub_spaix_space) { - break; - } + var valueMini = []; + valueMini.push('M ', pois_minTick, ' ', bottom_posi, ' L ', pois_minTick, ' ', bottom_posi - minTickLength); + m_svg.createPath(null, valueMini.join(''), attrAxisTickX, null); + } + } else { + for (let j = 1; j < 10; j++) { + let pois_minTick = posiX_grid + sub_spaix_space * j; + if (pois_minTick > m_chartSize.DiagramRight - sub_spaix_space) { + break; + } - var valueMini = []; - valueMini.push( - "M ", - pois_minTick, - " ", - bottom_posi, - " L ", - pois_minTick, - " ", - bottom_posi - minTickLength - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickX, null); - } - } - } - }; + let valueMini = []; + valueMini.push('M ', pois_minTick, ' ', bottom_posi, ' L ', pois_minTick, ' ', bottom_posi - minTickLength); + m_svg.createPath(null, valueMini.join(''), attrAxisTickX, null); + } + } + } + }; - //缁樺埗x鍧愭爣(鍚爣棰�):涓棿 - var createFlowAxisMiddle = function () { - var bottom_posi = m_chartSize.UpDiagram.Bottom; - if (m_coordinatePara == null) { - return; - } + //缁樺埗x鍧愭爣(鍚爣棰�):涓棿 + var createFlowAxisMiddle = function () { + var bottom_posi = m_chartSize.UpDiagram.Bottom; + if (m_coordinatePara == null) { + return; + } - //鍒诲害绾� - var attrAxisTickX = { - stroke: "black", - "stroke-width": "1", - fill: "none", - zIndex: 10, - }; + //鍒诲害绾� + var attrAxisTickX = { + stroke: 'black', + 'stroke-width': '1', + fill: 'none', + zIndex: 10, + }; - //鍒诲害闀垮害 - var minTickLength = 4; - var tickLength = 6; + //鍒诲害闀垮害 + var minTickLength = 4; + var tickLength = 6; - //鍒诲害鏂囧瓧 - var styleAxisLabelX = - "font-size:11px;fill-opacity:1;fill:black;user-select:none;"; //font-weight:bold + //鍒诲害鏂囧瓧 + var styleAxisLabelX = 'font-size:11px;fill-opacity:1;fill:black;'; //font-weight:bold - // - for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { - //灏戜竴涓埢搴� + // + for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { + //灏戜竴涓埢搴� - let q = m_coordinatePara.MinQ + i * m_coordinatePara.SpaceQ; - var content = UnitHelper.valueFormat( - UnitHelper.getDispValueQ(UnitHelper.ConvertQ_fromM3H(m_unit.Q, q)) - ); - if (i == m_coordinatePara.GridNumberX) { - let unit_name = UnitHelper.GetUnitNameQ(m_unit.Q); - content = "Q [" + unit_name + "]"; - } - var posiX_grid = m_chartSize.DiagramLeft + m_chartSize.SpaceGridX * i; - //鍒诲害绾� - var valueMain = []; - valueMain.push( - "M ", - posiX_grid, - " ", - bottom_posi, - " L ", - posiX_grid, - " ", - bottom_posi + tickLength - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickX, null); //"TickLineX" + i + let q = m_coordinatePara.MinQ + i * m_coordinatePara.SpaceQ; + //console.log(q) + var content = UnitHelper.valueFormat(UnitHelper.getDispValueQ(UnitHelper.ConvertQ_fromM3H(m_unit.Q, q))); + if (i == m_coordinatePara.GridNumberX) { + let unit_name = UnitHelper.GetUnitNameQ(m_unit.Q); + content = 'Q [' + unit_name + ']'; + } + var posiX_grid = m_chartSize.DiagramLeft + m_chartSize.SpaceGridX * i; + //鍒诲害绾� + var valueMain = []; + valueMain.push('M ', posiX_grid, ' ', bottom_posi, ' L ', posiX_grid, ' ', bottom_posi + tickLength); + m_svg.createPath(null, valueMain.join(''), attrAxisTickX, null); //"TickLineX" + i - //鏂囧瓧 m_displayStyle.isAxisIntervalX - var label_y = bottom_posi + tickLength + 15; - if (m_displayStyle.isRotateLabelX) label_y = label_y + 1; - var attrAxisLabelX = { - opacity: 1, - x: posiX_grid, - y: label_y, - "text-anchor": "middle", - }; - var transform = null; - if (m_displayStyle.isRotateLabelX) - transform = "rotate(45 " + posiX_grid + "," + label_y + ")"; - if (m_displayStyle.isAxisIntervalX) { - if (i % 2 == 0) - m_svg.createText( - attrAxisLabelX, - styleAxisLabelX, - content, - 10, - null, - transform - ); - } else { - m_svg.createText( - attrAxisLabelX, - styleAxisLabelX, - content, - 10, - null, - transform - ); - } + //鏂囧瓧 m_displayStyle.isAxisIntervalX + var label_y = bottom_posi + tickLength + 15; + if (m_displayStyle.isRotateLabelX) label_y = label_y + 1; + var attrAxisLabelX = { + opacity: 1, + x: posiX_grid, + y: label_y, + 'text-anchor': 'middle', + }; + var transform = null; + if (m_displayStyle.isRotateLabelX) transform = 'rotate(45 ' + posiX_grid + ',' + label_y + ')'; + if (m_displayStyle.isAxisIntervalX) { + if (i % 2 == 0) m_svg.createText(attrAxisLabelX, styleAxisLabelX, content, 10, null, transform); + } else { + m_svg.createText(attrAxisLabelX, styleAxisLabelX, content, 10, null, transform); + } - //瀛愬埢搴︾嚎 - if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.GridNumberX) { - for (var j = 0; j <= m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiX_grid + - (m_chartSize.SpaceGridX * j) / (m_displayStyle.MiniTickNumber + 1); - var valueMini = []; - valueMini.push( - "M ", - pois_minTick, - " ", - bottom_posi, - " L ", - pois_minTick, - " ", - bottom_posi + minTickLength - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickX, null); - } - } - } + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.GridNumberX) { + for (var j = 0; j <= m_displayStyle.MiniTickNumber; j++) { + var pois_minTick = posiX_grid + (m_chartSize.SpaceGridX * j) / (m_displayStyle.MiniTickNumber + 1); + var valueMini = []; + valueMini.push('M ', pois_minTick, ' ', bottom_posi, ' L ', pois_minTick, ' ', bottom_posi + minTickLength); + m_svg.createPath(null, valueMini.join(''), attrAxisTickX, null); + } + } + } - /* + /* //鏍囬鏂囧瓧 var styleAxisTitleX = "font-size:14px;fill-opacity:1;fill:black;font-weight:bold;"; 涓嶇粯鍒舵爣棰� @@ -797,6041 +595,3529 @@ let unit_name = UnitHelper.GetUnitNameQ(m_unit.Q); m_svg.createText(attrAxisTitleX, styleAxisTitleX, getTranslateString("娴侀噺") + " (" + unit_name + ")"); */ - }; - //缁樺埗Y鍧愭爣(鍚爣棰�) - var createYAxis_Whole = function () { - if (m_coordinatePara == null) { - return; - } + }; + //缁樺埗Y鍧愭爣(鍚爣棰�) + var createYAxis_Whole = function () { + if (m_coordinatePara == null) { + return; + } - //鍒诲害闀垮害 - var minTickLength = 3; - var tickLength = 6; + //鍒诲害闀垮害 + var minTickLength = 3; + var tickLength = 6; - //鎵▼ - if (m_coordinatePara.EndLineNoH > m_coordinatePara.StartLineNoH) { - //鍒诲害绾� - var attrAxisTickH = { - stroke: m_displayStyle.ColorH, - "stroke-width": "1", - fill: "none", - }; + //鎵▼ + if (m_coordinatePara.EndLineNoH > m_coordinatePara.StartLineNoH) { + //鍒诲害绾� + var attrAxisTickH = { + stroke: m_displayStyle.ColorH, + 'stroke-width': '1', + fill: 'none', + }; - //鍒诲害鏂囧瓧 - var styleAxisLabelH = - "font-size:11px; fill-opacity:1; fill:" + - m_displayStyle.ColorH + - ";user-select:none;"; - //鏍囩 - var styleAxisTitleH = - "font-size:14px; ;fill-opacity:1; font-weight:bold; fill:" + - m_displayStyle.ColorH + - ";"; + //鍒诲害鏂囧瓧 + var styleAxisLabelH = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorH + ';'; + //鏍囩 + var styleAxisTitleH = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorH + ';'; - let unit_h_name = UnitHelper.GetUnitNameH(m_unit.H); + let unit_h_name = UnitHelper.GetUnitNameH(m_unit.H); - //鏍囩 - var attrAxisTitleH = { - opacity: 1, - x: m_chartSize.DiagramLeft - 52, - y: - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * - ((m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH) / 2 + - m_coordinatePara.StartLineNoH) - - 10, - "text-anchor": "middle", - }; - if (m_localizationType == 0) { - //涓枃 - if (m_unit.H == UnitHelper.H.MPa || m_unit.H == UnitHelper.H.KPa) { - attrAxisTitleH.y = attrAxisTitleH.y - 5; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "鍘�"); - attrAxisTitleH.y = attrAxisTitleH.y + 15; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "鍔�"); + //鏍囩 + var attrAxisTitleH = { + opacity: 1, + x: m_chartSize.DiagramLeft - 52, + y: + m_chartSize.UpDiagram.Bottom - + m_chartSize.UpDiagram.SpaceGridY * + ((m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH) / 2 + m_coordinatePara.StartLineNoH) - + 10, + 'text-anchor': 'middle', + }; + if (m_localizationType == 0) { + //涓枃 + if (m_unit.H == UnitHelper.H.MPa || m_unit.H == UnitHelper.H.KPa) { + attrAxisTitleH.y = attrAxisTitleH.y - 5; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '鍘�'); + attrAxisTitleH.y = attrAxisTitleH.y + 15; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '鍔�'); - attrAxisTitleH.x = attrAxisTitleH.x + 3; - attrAxisTitleH.y = attrAxisTitleH.y + 21; - var transform = - "rotate(-90 " + attrAxisTitleH.x + "," + attrAxisTitleH.y + ")"; - if (m_unit.H == UnitHelper.H.MPa) - m_svg.createText( - attrAxisTitleH, - styleAxisTitleH, - "(MPa)", - 10, - null, - transform - ); - else if (m_unit.H == UnitHelper.H.MPa) - m_svg.createText( - attrAxisTitleH, - styleAxisTitleH, - "(kPa)", - 10, - null, - transform - ); - } else { - attrAxisTitleH.y = attrAxisTitleH.y - 5; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "鎵�"); - attrAxisTitleH.y = attrAxisTitleH.y + 15; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "绋�"); + attrAxisTitleH.x = attrAxisTitleH.x + 3; + attrAxisTitleH.y = attrAxisTitleH.y + 21; + var transform = 'rotate(-90 ' + attrAxisTitleH.x + ',' + attrAxisTitleH.y + ')'; + if (m_unit.H == UnitHelper.H.MPa) m_svg.createText(attrAxisTitleH, styleAxisTitleH, '(MPa)', 10, null, transform); + else if (m_unit.H == UnitHelper.H.MPa) m_svg.createText(attrAxisTitleH, styleAxisTitleH, '(kPa)', 10, null, transform); + } else { + attrAxisTitleH.y = attrAxisTitleH.y - 5; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '鎵�'); + attrAxisTitleH.y = attrAxisTitleH.y + 15; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '绋�'); - if (m_unit.H == 0) { - attrAxisTitleH.x = attrAxisTitleH.x + 3; - attrAxisTitleH.y = attrAxisTitleH.y + 21; - var transform = - "rotate(-90 " + attrAxisTitleH.x + "," + attrAxisTitleH.y + ")"; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen - m_svg.createText( - attrAxisTitleH, - styleAxisTitleH, - "(" + unit_h_name + ")", - 10, - null, - transform - ); - } - } - } else { - var content = "Head (" + unit_h_name + ")"; - if (m_unit.H == UnitHelper.H.MPa) { - content = "Press (MPa)"; - } - if (m_unit.H == UnitHelper.H.KPa) { - content = "Press (KPa)"; - } - var transform = - "rotate(-90 " + attrAxisTitleH.x + "," + attrAxisTitleH.y + ")"; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen - m_svg.createText( - attrAxisTitleH, - styleAxisTitleH, - content, - 10, - null, - transform - ); - } + if (m_unit.H == 0) { + attrAxisTitleH.x = attrAxisTitleH.x + 3; + attrAxisTitleH.y = attrAxisTitleH.y + 21; + let transform = 'rotate(-90 ' + attrAxisTitleH.x + ',' + attrAxisTitleH.y + ')'; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '(' + unit_h_name + ')', 10, null, transform); + } + } + } else { + var content = 'Head (' + unit_h_name + ')'; + if (m_unit.H == UnitHelper.H.MPa) { + content = 'Press (MPa)'; + } + if (m_unit.H == UnitHelper.H.KPa) { + content = 'Press (KPa)'; + } + let transform = 'rotate(-90 ' + attrAxisTitleH.x + ',' + attrAxisTitleH.y + ')'; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen + m_svg.createText(attrAxisTitleH, styleAxisTitleH, content, 10, null, transform); + } - // - for ( - var i = m_coordinatePara.StartLineNoH; - i <= m_coordinatePara.EndLineNoH; - i++ - ) { - var posiY_grid = - m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; + // + for (var i = m_coordinatePara.StartLineNoH; i <= m_coordinatePara.EndLineNoH; i++) { + var posiY_grid = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramLeft, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramLeft - tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickH, null); + //涓诲埢搴� + var valueMain = []; + valueMain.push('M ', m_chartSize.DiagramLeft, ' ', posiY_grid, ' L ', m_chartSize.DiagramLeft - tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickH, null); - //鏂囧瓧 - var attrAxisLabelH = { - opacity: 1, - x: m_chartSize.DiagramLeft - 10, - y: posiY_grid + 5, - "text-anchor": "end", - }; - var content = UnitHelper.valueFormat( - m_coordinatePara.DispMinH + - (i - m_coordinatePara.StartLineNoH) * m_coordinatePara.SpaceH - ); - m_svg.createText(attrAxisLabelH, styleAxisLabelH, content); + //鏂囧瓧 + var attrAxisLabelH = { + opacity: 1, + x: m_chartSize.DiagramLeft - 10, + y: posiY_grid + 5, + 'text-anchor': 'end', + }; + let content = UnitHelper.valueFormat(m_coordinatePara.MinH + i * m_coordinatePara.SpaceH); + m_svg.createText(attrAxisLabelH, styleAxisLabelH, content); - //瀛愬埢搴︾嚎 - if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoH) { - for (var j = 1; j <= m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.UpDiagram.SpaceGridY * j) / - (m_displayStyle.MiniTickNumber + 1); - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramLeft, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramLeft - minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickH, null); - } - } - } - } + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoH) { + for (var j = 1; j <= m_displayStyle.MiniTickNumber; j++) { + var pois_minTick = posiY_grid - (m_chartSize.UpDiagram.SpaceGridY * j) / (m_displayStyle.MiniTickNumber + 1); + var valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramLeft, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramLeft - minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickH, null); + } + } + } + } - //鏁堢巼 - if ( - m_coordinatePara.EndLineNoE > m_coordinatePara.StartLineNoE && - m_isDispCurveQE - ) { - //鍒诲害绾� - var attrAxisTickE = { - stroke: m_displayStyle.ColorE, - "stroke-width": "1", - fill: "none", - }; + //鏁堢巼 + if (m_coordinatePara.EndLineNoE > m_coordinatePara.StartLineNoE && m_isDispCurveQE) { + //鍒诲害绾� + var attrAxisTickE = { + stroke: m_displayStyle.ColorE, + 'stroke-width': '1', + fill: 'none', + }; - //鍒诲害鏂囧瓧 - var styleAxisLabelE = - "font-size:11px; fill-opacity:1; fill:" + - m_displayStyle.ColorE + - ";user-select:none;"; - //鏍囩 - var styleAxisTitleE = - "font-size:14px; ;fill-opacity:1; font-weight:bold; fill:" + - m_displayStyle.ColorE + - ";"; - // - var attrAxisTitleE = { - opacity: 1, - x: m_chartSize.DiagramRight + 44, - y: - m_chartSize.UpDiagram.Bottom - - m_chartSize.UpDiagram.SpaceGridY * - ((m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE) / 2 + - m_coordinatePara.StartLineNoE) - - 10, - "text-anchor": "middle", - }; + //鍒诲害鏂囧瓧 + var styleAxisLabelE = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorE + ';'; + //鏍囩 + var styleAxisTitleE = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorE + ';'; + // + var attrAxisTitleE = { + opacity: 1, + x: m_chartSize.DiagramRight + 44, + y: + m_chartSize.UpDiagram.Bottom - + m_chartSize.UpDiagram.SpaceGridY * + ((m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE) / 2 + m_coordinatePara.StartLineNoE) - + 10, + 'text-anchor': 'middle', + }; - //鏍囩 - if (m_localizationType == 0) { - //涓枃 - attrAxisTitleE.y = attrAxisTitleE.y - 5; - m_svg.createText(attrAxisTitleE, styleAxisTitleE, "鏁�"); - attrAxisTitleE.y = attrAxisTitleE.y + 15; - m_svg.createText(attrAxisTitleE, styleAxisTitleE, "鐜�"); + //鏍囩 + if (m_localizationType == 0) { + //涓枃 + attrAxisTitleE.y = attrAxisTitleE.y - 5; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, '鏁�'); + attrAxisTitleE.y = attrAxisTitleE.y + 15; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, '鐜�'); - attrAxisTitleE.x = attrAxisTitleE.x + 6; - attrAxisTitleE.y = attrAxisTitleE.y + 24; - var transform = - "rotate(-90 " + attrAxisTitleE.x + "," + attrAxisTitleE.y + ")"; - m_svg.createText( - attrAxisTitleE, - styleAxisTitleE, - "(%)", - 10, - null, - transform - ); - } else { - attrAxisTitleE.x = attrAxisTitleE.x + 6; - attrAxisTitleE.y = attrAxisTitleE.y + 24; - var transform = - "rotate(-90 " + attrAxisTitleE.x + "," + attrAxisTitleE.y + ")"; - m_svg.createText( - attrAxisTitleE, - styleAxisTitleE, - "Eta (%)", - 10, - null, - transform - ); - } + attrAxisTitleE.x = attrAxisTitleE.x + 6; + attrAxisTitleE.y = attrAxisTitleE.y + 24; + let transform = 'rotate(-90 ' + attrAxisTitleE.x + ',' + attrAxisTitleE.y + ')'; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, '(%)', 10, null, transform); + } else { + attrAxisTitleE.x = attrAxisTitleE.x + 6; + attrAxisTitleE.y = attrAxisTitleE.y + 24; + let transform = 'rotate(-90 ' + attrAxisTitleE.x + ',' + attrAxisTitleE.y + ')'; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, 'Eta (%)', 10, null, transform); + } - // - for ( - var i = m_coordinatePara.StartLineNoE; - i <= m_coordinatePara.EndLineNoE; - i++ - ) { - var content = m_coordinatePara.MinE + i * m_coordinatePara.SpaceE; - var posiY_grid = - m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramRight, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramRight + tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickE, null); + // + for (let i = m_coordinatePara.StartLineNoE; i <= m_coordinatePara.EndLineNoE; i++) { + let content = m_coordinatePara.MinE + i * m_coordinatePara.SpaceE; + let posiY_grid = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; + //涓诲埢搴� + let valueMain = []; + valueMain.push('M ', m_chartSize.DiagramRight, ' ', posiY_grid, ' L ', m_chartSize.DiagramRight + tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickE, null); - //鏂囧瓧 - var attrAxisLabelE = { - opacity: 1, - x: m_chartSize.DiagramRight + 10, - y: posiY_grid + 5, - }; + //鏂囧瓧 + var attrAxisLabelE = { + opacity: 1, + x: m_chartSize.DiagramRight + 10, + y: posiY_grid + 5, + }; + m_svg.createText(attrAxisLabelE, styleAxisLabelE, content); - if (content <= 100) - m_svg.createText(attrAxisLabelE, styleAxisLabelE, content); + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoE) { + for (let j = 0; j < m_displayStyle.MiniTickNumber; j++) { + let pois_minTick = posiY_grid - (m_chartSize.UpDiagram.SpaceGridY * j) / m_displayStyle.MiniTickNumber; + let valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramRight, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramRight + minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickE, null); + } + } + } + } - //瀛愬埢搴︾嚎 - if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoE) { - for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.UpDiagram.SpaceGridY * j) / - m_displayStyle.MiniTickNumber; - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramRight, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramRight + minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickE, null); - } - } - } - } + //鍔熺巼 + if (m_coordinatePara.EndLineNoP > m_coordinatePara.StartLineNoP) { + //鍒诲害绾� + var attrAxisTickP = { + stroke: m_displayStyle.ColorP, + 'stroke-width': '1', + fill: 'none', + }; - //鍔熺巼 - if ( - m_coordinatePara.EndLineNoP > m_coordinatePara.StartLineNoP && - m_isDispCurveQP - ) { - //鍒诲害绾� - var attrAxisTickP = { - stroke: m_displayStyle.ColorP, - "stroke-width": "1", - fill: "none", - }; + let unit_p_name = UnitHelper.GetUnitNameP(m_unit.P); - let unit_p_name = UnitHelper.GetUnitNameP(m_unit.P); + //鍒诲害鏂囧瓧 + var styleAxisLabelP = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorP + ';'; + //鏍囩 + var styleAxisTitleP = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorP + ';'; - //鍒诲害鏂囧瓧 - var styleAxisLabelP = - "font-size:11px; fill-opacity:1; fill:" + m_displayStyle.ColorP + ";"; - //鏍囩 - var styleAxisTitleP = - "font-size:14px; ;fill-opacity:1; font-weight:bold; fill:" + - m_displayStyle.ColorP + - ";"; + //鏍囩 + if (m_localizationType == 0) { + //涓枃 + var attrAxisTitleP = { + opacity: 1, + x: m_chartSize.DiagramLeft - 52, + y: + m_chartSize.DownDiagram.Bottom - + m_chartSize.DownDiagram.SpaceGridY * + ((m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP) / 2 + m_coordinatePara.StartLineNoP), + 'text-anchor': 'middle', + }; + if (m_coordinatePara.SpaceP <= 0.1) { + attrAxisTitleP.x = attrAxisTitleP.x - 5; + } + attrAxisTitleP.y = attrAxisTitleP.y - 5; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, '鍔�'); + attrAxisTitleP.y = attrAxisTitleP.y + 15; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, '鐜�'); - //鏍囩 - if (m_localizationType == 0) { - //涓枃 - var attrAxisTitleP = { - opacity: 1, - x: m_chartSize.DiagramLeft - 52, - y: - m_chartSize.DownDiagram.Bottom - - m_chartSize.DownDiagram.SpaceGridY * - ((m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP) / - 2 + - m_coordinatePara.StartLineNoP), - "text-anchor": "middle", - }; - if (m_coordinatePara.SpaceP <= 0.1) { - attrAxisTitleP.x = attrAxisTitleP.x - 5; - } - attrAxisTitleP.y = attrAxisTitleP.y - 5; - m_svg.createText(attrAxisTitleP, styleAxisTitleP, "鍔�"); - attrAxisTitleP.y = attrAxisTitleP.y + 15; - m_svg.createText(attrAxisTitleP, styleAxisTitleP, "鐜�"); + attrAxisTitleP.x = attrAxisTitleP.x + 2; + attrAxisTitleP.y = attrAxisTitleP.y + 25; + let transform = 'rotate(-90 ' + attrAxisTitleP.x + ',' + attrAxisTitleP.y + ')'; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, '(' + unit_p_name + ')', 10, null, transform); + } else { + let attrAxisTitleP = { + opacity: 1, + x: m_chartSize.DiagramLeft - 60, + y: + m_chartSize.DownDiagram.Bottom - + m_chartSize.DownDiagram.SpaceGridY * + ((m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP) / 2 + m_coordinatePara.StartLineNoP) - + 10, + 'text-anchor': 'middle', + }; + if (m_coordinatePara.SpaceP <= 0.1) { + attrAxisTitleP.x = attrAxisTitleP.x - 5; + } + attrAxisTitleP.x = attrAxisTitleP.x + 13; + attrAxisTitleP.y = attrAxisTitleP.y + 25; + let transform = 'rotate(-90 ' + attrAxisTitleP.x + ',' + attrAxisTitleP.y + ')'; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, 'Power (' + unit_p_name + ')', 10, null, transform); + } - attrAxisTitleP.x = attrAxisTitleP.x + 2; - attrAxisTitleP.y = attrAxisTitleP.y + 25; - var transform = - "rotate(-90 " + attrAxisTitleP.x + "," + attrAxisTitleP.y + ")"; - m_svg.createText( - attrAxisTitleP, - styleAxisTitleP, - "(" + unit_p_name + ")", - 10, - null, - transform - ); - } else { - var attrAxisTitleP = { - opacity: 1, - x: m_chartSize.DiagramLeft - 60, - y: - m_chartSize.DownDiagram.Bottom - - m_chartSize.DownDiagram.SpaceGridY * - ((m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP) / - 2 + - m_coordinatePara.StartLineNoP) - - 10, - "text-anchor": "middle", - }; - if (m_coordinatePara.SpaceP <= 0.1) { - attrAxisTitleP.x = attrAxisTitleP.x - 5; - } - attrAxisTitleP.x = attrAxisTitleP.x + 13; - attrAxisTitleP.y = attrAxisTitleP.y + 25; - var transform = - "rotate(-90 " + attrAxisTitleP.x + "," + attrAxisTitleP.y + ")"; - m_svg.createText( - attrAxisTitleP, - styleAxisTitleP, - "Power (" + unit_p_name + ")", - 10, - null, - transform - ); - } + // + for (var i = m_coordinatePara.StartLineNoP; i <= m_coordinatePara.EndLineNoP; i++) { + let content = UnitHelper.valueFormat(m_coordinatePara.MinP + i * m_coordinatePara.SpaceP); - // - for ( - var i = m_coordinatePara.StartLineNoP; - i <= m_coordinatePara.EndLineNoP; - i++ - ) { - var content = UnitHelper.valueFormat( - m_coordinatePara.MinP + i * m_coordinatePara.SpaceP - ); + content = UnitHelper.formatToFixed(parseFloat(UnitHelper.ConvertP(UnitHelper.P.KW, m_unit.P, content)), 1); - content = UnitHelper.formatToFixed( - parseFloat(UnitHelper.ConvertP(UnitHelper.P.KW, m_unit.P, content)), - 1 - ); + let posiY_grid = m_chartSize.DownDiagram.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; + //涓诲埢搴� + let valueMain = []; + valueMain.push('M ', m_chartSize.DiagramLeft, ' ', posiY_grid, ' L ', m_chartSize.DiagramLeft - tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickP, null); - var posiY_grid = - m_chartSize.DownDiagram.Bottom - - m_chartSize.DownDiagram.SpaceGridY * i; - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramLeft, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramLeft - tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickP, null); + //鏂囧瓧 + var attrAxisLabelP = { + opacity: 1, + x: m_chartSize.DiagramLeft - 10, + y: posiY_grid + 5, + 'text-anchor': 'end', + }; - //鏂囧瓧 - var attrAxisLabelP = { - opacity: 1, - x: m_chartSize.DiagramLeft - 10, - y: posiY_grid + 5, - "text-anchor": "end", - }; + m_svg.createText(attrAxisLabelP, styleAxisLabelP, content); - m_svg.createText(attrAxisLabelP, styleAxisLabelP, content); + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoP && i != m_coordinatePara.EndLineNoE) { + for (let j = 1; j < m_displayStyle.MiniTickNumber; j++) { + let pois_minTick = posiY_grid - (m_chartSize.DownDiagram.SpaceGridY * j) / m_displayStyle.MiniTickNumber; + let valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramLeft, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramLeft - minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickP, null); + } + } + } + } - //瀛愬埢搴︾嚎 - if ( - m_displayStyle.isDispMiniTick && - i != m_coordinatePara.EndLineNoP && - i != m_coordinatePara.EndLineNoE - ) { - for (var j = 1; j < m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.DownDiagram.SpaceGridY * j) / - m_displayStyle.MiniTickNumber; - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramLeft, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramLeft - minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickP, null); - } - } - } - } + //姹借殌 + if (m_isDispNpsh && m_coordinatePara.EndLineNoNPSH > m_coordinatePara.StartLineNoNPSH) { + //鍒诲害绾� + var attrAxisTickNPSH = { + stroke: m_displayStyle.ColorNPSH, + 'stroke-width': '1', + fill: 'none', + }; - //姹借殌 - if ( - m_isDispNpsh && - m_coordinatePara.EndLineNoNPSH > m_coordinatePara.StartLineNoNPSH - ) { - //鍒诲害绾� - var attrAxisTickNPSH = { - stroke: m_displayStyle.ColorNPSH, - "stroke-width": "1", - fill: "none", - }; + //鍒诲害鏂囧瓧 + var styleAxisLabelNPSH = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorNPSH + ';'; + //鏍囩 + var styleAxisTitleNPSH = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorNPSH + ';'; - //鍒诲害鏂囧瓧 - var styleAxisLabelNPSH = - "font-size:11px; fill-opacity:1; fill:" + - m_displayStyle.ColorNPSH + - ";"; - //鏍囩 - var styleAxisTitleNPSH = - "font-size:14px; ;fill-opacity:1; font-weight:bold; fill:" + - m_displayStyle.ColorNPSH + - ";"; + //鏍囩 + var attrAxisTitleNPSH = { + opacity: 1, + x: m_chartSize.DiagramRight + 44, + y: + m_chartSize.DownDiagram.Bottom - + m_chartSize.DownDiagram.SpaceGridY * + ((m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH) / 2 + m_coordinatePara.StartLineNoNPSH) - + 10, + 'text-anchor': 'middle', + }; + if (m_localizationType == 0) { + //涓枃 + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y - 5; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, '姹�'); + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 15; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, '铓�'); + attrAxisTitleNPSH.x = attrAxisTitleNPSH.x + 6; + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; + let transform = 'rotate(-90 ' + attrAxisTitleNPSH.x + ',' + attrAxisTitleNPSH.y + ')'; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, '(m)', 10, null, transform); + } else { + attrAxisTitleNPSH.x = attrAxisTitleNPSH.x + 6; + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; + let transform = 'rotate(-90 ' + attrAxisTitleNPSH.x + ',' + attrAxisTitleNPSH.y + ')'; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, 'NPSHr (m)', 10, null, transform); + } - //鏍囩 - var attrAxisTitleNPSH = { - opacity: 1, - x: m_chartSize.DiagramRight + 44, - y: - m_chartSize.DownDiagram.Bottom - - m_chartSize.DownDiagram.SpaceGridY * - ((m_coordinatePara.EndLineNoNPSH - - m_coordinatePara.StartLineNoNPSH) / - 2 + - m_coordinatePara.StartLineNoNPSH) - - 10, - "text-anchor": "middle", - }; - var npsh_unit_name = "(" + UnitHelper.GetUnitNameNPSH(m_unit.NPSH) + ")"; - if (m_localizationType == 0) { - //涓枃 - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y - 5; - m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, "姹�"); - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 15; - m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, "铓�"); - attrAxisTitleNPSH.x = attrAxisTitleNPSH.x + 6; - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; - var transform = - "rotate(-90 " + attrAxisTitleNPSH.x + "," + attrAxisTitleNPSH.y + ")"; - m_svg.createText( - attrAxisTitleNPSH, - styleAxisTitleNPSH, - npsh_unit_name, - 10, - null, - transform - ); - } else { - attrAxisTitleNPSH.x = attrAxisTitleNPSH.x + 6; - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; - var transform = - "rotate(-90 " + attrAxisTitleNPSH.x + "," + attrAxisTitleNPSH.y + ")"; - m_svg.createText( - attrAxisTitleNPSH, - styleAxisTitleNPSH, - "NPSHr" + npsh_unit_name, - 10, - null, - transform - ); - } + // + for (let i = m_coordinatePara.StartLineNoNPSH; i <= m_coordinatePara.EndLineNoNPSH; i++) { + let content = UnitHelper.valueFormat(m_coordinatePara.MinNPSH + i * m_coordinatePara.SpaceNPSH); + let posiY_grid = m_chartSize.DownDiagram.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; + //涓诲埢搴� + let valueMain = []; + valueMain.push('M ', m_chartSize.DiagramRight, ' ', posiY_grid, ' L ', m_chartSize.DiagramRight + tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickNPSH, null); - // - for ( - var i = m_coordinatePara.StartLineNoNPSH; - i <= m_coordinatePara.EndLineNoNPSH; - i++ - ) { - var axis_npsh_m = - m_coordinatePara.MinNPSH + i * m_coordinatePara.SpaceNPSH; - var axis_npsh_v = UnitHelper.ConvertNPSH_fromM( - m_unit.NPSH, - axis_npsh_m - ); + //鏂囧瓧 + var attrAxisLabelNPSH = { + opacity: 1, + x: m_chartSize.DiagramRight + 10, + y: posiY_grid + 5, + }; + m_svg.createText(attrAxisLabelNPSH, styleAxisLabelNPSH, content); - var content = UnitHelper.valueFormat(axis_npsh_v); - var posiY_grid = - m_chartSize.DownDiagram.Bottom - - m_chartSize.DownDiagram.SpaceGridY * i; - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramRight, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramRight + tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickNPSH, null); + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoNPSH) { + for (let j = 0; j < m_displayStyle.MiniTickNumber; j++) { + let pois_minTick = posiY_grid - (m_chartSize.DownDiagram.SpaceGridY * j) / m_displayStyle.MiniTickNumber; + let valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramRight, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramRight + minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickNPSH, null); + } + } + } + } + }; + //缁樺埗Y鍧愭爣(鍚爣棰�) + var createYAxis_TwoPanel = function () { + if (m_coordinatePara == null) { + return; + } - //鏂囧瓧 - var attrAxisLabelNPSH = { - opacity: 1, - x: m_chartSize.DiagramRight + 10, - y: posiY_grid + 5, - }; - m_svg.createText(attrAxisLabelNPSH, styleAxisLabelNPSH, content); + //鍒诲害闀垮害 + var minTickLength = 3; + var tickLength = 6; - //瀛愬埢搴︾嚎 - if ( - m_displayStyle.isDispMiniTick && - i != m_coordinatePara.EndLineNoNPSH - ) { - for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.DownDiagram.SpaceGridY * j) / - m_displayStyle.MiniTickNumber; - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramRight, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramRight + minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickNPSH, null); - } - } - } - } - }; - //缁樺埗Y鍧愭爣(鍚爣棰�) - var createYAxis_TwoPanel = function () { - if (m_coordinatePara == null) { - return; - } + //鎵▼ + if (m_coordinatePara.EndLineNoH > m_coordinatePara.StartLineNoH) { + if (m_displayStyle.AxisTitlePosiAxisUpY == false) { + //鏍囬鏀惧湪鍒诲害涓� + creatAxisTitleH(); + } - //鍒诲害闀垮害 - var minTickLength = 3; - var tickLength = 6; + //鍒诲害绾� + var attrAxisTickH = { + stroke: m_displayStyle.ColorH, + 'stroke-width': '1', + fill: 'none', + }; - //鎵▼ - if (m_coordinatePara.EndLineNoH > m_coordinatePara.StartLineNoH) { - if (m_displayStyle.AxisTitlePosiAxisUpY == false) { - //鏍囬鏀惧湪鍒诲害涓� - creatAxisTitleH(); - } + //鍒诲害鏂囧瓧 + var styleAxisLabelH = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorH + ';'; + // + for (var i = 0; i <= m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH; i++) { + var posiY_grid = m_chartSize.PanelH.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; - //鍒诲害绾� - var attrAxisTickH = { - stroke: m_displayStyle.ColorH, - "stroke-width": "1", - fill: "none", - }; + //涓诲埢搴� + var valueMain = []; + valueMain.push('M ', m_chartSize.DiagramLeft, ' ', posiY_grid, ' L ', m_chartSize.DiagramLeft - tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickH, null); - //鍒诲害鏂囧瓧 - var styleAxisLabelH = - "font-size:11px;user-select:none;fill-opacity:1;fill:" + - m_displayStyle.ColorH + - ";user-select:none;"; - // - for ( - var i = 0; - i <= m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH; - i++ - ) { - var posiY_grid = - m_chartSize.PanelH.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; + //鏂囧瓧 + var attrAxisLabelH = { + opacity: 1, + x: m_chartSize.DiagramLeft - 10, + y: posiY_grid + 5, + 'text-anchor': 'end', + }; + var axis_h = UnitHelper.ConvertH_fromM( + m_unit.H, + m_coordinatePara.MinH + (i + m_coordinatePara.StartLineNoH) * m_coordinatePara.SpaceH + ); + if (axis_h < 0) continue; + var content = UnitHelper.valueFormat(axis_h); + if (i == m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH) { + if (m_displayStyle.AxisTitlePosiAxisUpY == true) { + styleAxisLabelH = 'font-size:12px; fill-opacity:1; fill:' + m_displayStyle.ColorH + ';'; + let unit_h_name = UnitHelper.GetUnitNameH(m_unit.H); + content = 'H [' + unit_h_name + ']'; + } + } - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramLeft, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramLeft - tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickH, null); + m_svg.createText(attrAxisLabelH, styleAxisLabelH, content); - //鏂囧瓧 - var attrAxisLabelH = { - opacity: 1, - x: m_chartSize.DiagramLeft - 10, - y: posiY_grid + 5, - "text-anchor": "end", - }; - var axis_h = UnitHelper.ConvertH_fromM( - m_unit.H, - m_coordinatePara.DispMinH + i * m_coordinatePara.SpaceH - ); - if (axis_h < 0) continue; - var content = UnitHelper.valueFormat(axis_h); - if (i == m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH) { - if (m_displayStyle.AxisTitlePosiAxisUpY == true) { - styleAxisLabelH = - "font-size:12px;fill-opacity:1;user-select:none;fill:" + - m_displayStyle.ColorH + - ";"; - let unit_h_name = UnitHelper.GetUnitNameH(m_unit.H); - content = "H [" + unit_h_name + "]"; - } - } + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH) { + for (var j = 1; j <= m_displayStyle.MiniTickNumber; j++) { + var pois_minTick = posiY_grid - (m_chartSize.UpDiagram.SpaceGridY * j) / (m_displayStyle.MiniTickNumber + 1); + var valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramLeft, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramLeft - minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickH, null); + } + } + } + } - m_svg.createText(attrAxisLabelH, styleAxisLabelH, content); + //鏁堢巼 + if (m_coordinatePara.EndLineNoE > m_coordinatePara.StartLineNoE && m_isDispCurveQE) { + createAxisTitleE(); - //瀛愬埢搴︾嚎 - if ( - m_displayStyle.isDispMiniTick && - i != m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH - ) { - for (var j = 1; j <= m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.UpDiagram.SpaceGridY * j) / - (m_displayStyle.MiniTickNumber + 1); - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramLeft, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramLeft - minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickH, null); - } - } - } - } + //鍒诲害鏂囧瓧 + var styleAxisLabelE = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorE + ';'; + //鍒诲害绾� + var attrAxisTickE = { + stroke: m_displayStyle.ColorE, + 'stroke-width': '1', + fill: 'none', + }; + // + for (let i = 0; i <= m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE; i++) { + let posiY_grid = m_chartSize.PanelE.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; + //涓诲埢搴� + let valueMain = []; + valueMain.push('M ', m_chartSize.DiagramRight, ' ', posiY_grid, ' L ', m_chartSize.DiagramRight + tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickE, null); - //鏁堢巼 - if ( - m_coordinatePara.EndLineNoE > m_coordinatePara.StartLineNoE && - m_isDispCurveQE - ) { - createAxisTitleE(); + //鏂囧瓧 + var attrAxisLabelE = { + opacity: 1, + x: m_chartSize.DiagramRight + 10, + y: posiY_grid + 5, + }; + let content = UnitHelper.valueFormat(m_coordinatePara.MinE + (i + m_coordinatePara.StartLineNoE) * m_coordinatePara.SpaceE); + m_svg.createText(attrAxisLabelE, styleAxisLabelE, content); - //鍒诲害鏂囧瓧 - var styleAxisLabelE = - "font-size:11px;user-select:none;fill-opacity:1;fill:" + - m_displayStyle.ColorE + - ";"; - //鍒诲害绾� - var attrAxisTickE = { - stroke: m_displayStyle.ColorE, - "stroke-width": "1", - fill: "none", - }; - // - for ( - var i = 0; - i <= m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE; - i++ - ) { - var posiY_grid = - m_chartSize.PanelE.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramRight, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramRight + tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickE, null); + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE) { + for (let j = 0; j < m_displayStyle.MiniTickNumber; j++) { + let pois_minTick = posiY_grid - (m_chartSize.UpDiagram.SpaceGridY * j) / m_displayStyle.MiniTickNumber; + let valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramRight, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramRight + minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickE, null); + } + } + } + } - //鏂囧瓧 - var attrAxisLabelE = { - opacity: 1, - x: m_chartSize.DiagramRight + 10, - y: posiY_grid + 5, - }; + //鍔熺巼 + if (m_coordinatePara.EndLineNoP > m_coordinatePara.StartLineNoP) { + if (m_displayStyle.AxisTitlePosiAxisUpY == false) { + //鏍囬鏀惧湪鍒诲害涓� + createAxisTitleP(); + } - var eta_disp = - m_coordinatePara.MinE + - (i + m_coordinatePara.StartLineNoE) * m_coordinatePara.SpaceE; - if (eta_disp >= 0 && eta_disp <= 100) { - var content = UnitHelper.valueFormat(eta_disp); - m_svg.createText(attrAxisLabelE, styleAxisLabelE, content); - } + //鍒诲害绾� + var attrAxisTickP = { + stroke: m_displayStyle.ColorP, + 'stroke-width': '1', + fill: 'none', + }; + var styleAxisLabelP = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorP + ';'; + //console.log(m_coordinatePara); + for (let i = 0; i <= m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP; i++) { + let posiY_grid = m_chartSize.PanelP.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; + //涓诲埢搴� + let valueMain = []; + valueMain.push('M ', m_chartSize.DiagramLeft, ' ', posiY_grid, ' L ', m_chartSize.DiagramLeft - tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickP, null); - //瀛愬埢搴︾嚎 - if ( - m_displayStyle.isDispMiniTick && - i != m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE - ) { - for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.UpDiagram.SpaceGridY * j) / - m_displayStyle.MiniTickNumber; - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramRight, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramRight + minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickE, null); - } - } - } - } + //鏂囧瓧 + var attrAxisLabelP = { + opacity: 1, + x: m_chartSize.DiagramLeft - 10, + y: posiY_grid + 5, + 'text-anchor': 'end', + }; - //鍔熺巼 - if ( - m_coordinatePara.EndLineNoP > m_coordinatePara.StartLineNoP && - m_isDispCurveQP - ) { - if (m_displayStyle.AxisTitlePosiAxisUpY == false) { - //鏍囬鏀惧湪鍒诲害涓� - createAxisTitleP(); - } + var aixs_p = m_coordinatePara.MinP + (i + m_coordinatePara.StartLineNoP) * m_coordinatePara.SpaceP; + aixs_p = UnitHelper.getDispValueP(UnitHelper.ConvertP_fromKW(m_unit.P, aixs_p)); + if (aixs_p < -0.01) continue; + let content = aixs_p.toString(); - //鍒诲害绾� - var attrAxisTickP = { - stroke: m_displayStyle.ColorP, - "stroke-width": "1", - fill: "none", - }; - var styleAxisLabelP = - "font-size:11px;user-select:none;fill-opacity:1;fill:" + - m_displayStyle.ColorP + - ";"; + if (i == m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP) { + if (m_displayStyle.AxisTitlePosiAxisUpY == true) { + styleAxisLabelP = 'font-size:12px; fill-opacity:1; fill:' + m_displayStyle.ColorP + ';'; + let unit_p_name = UnitHelper.GetUnitNameP(m_unit.P); + content = 'P [' + unit_p_name + ']'; + } + } - for ( - var i = 0; - i <= m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP; - i++ - ) { - var posiY_grid = - m_chartSize.PanelP.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramLeft, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramLeft - tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickP, null); + m_svg.createText(attrAxisLabelP, styleAxisLabelP, content); - //鏂囧瓧 - var attrAxisLabelP = { - opacity: 1, - x: m_chartSize.DiagramLeft - 10, - y: posiY_grid + 5, - "text-anchor": "end", - }; + //瀛愬埢搴︾嚎 + if ( + m_displayStyle.isDispMiniTick && + i != m_coordinatePara.EndLineNoP && + i != m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP + ) { + for (var j = 1; j < m_displayStyle.MiniTickNumber; j++) { + let pois_minTick = posiY_grid - (m_chartSize.DownDiagram.SpaceGridY * j) / m_displayStyle.MiniTickNumber; + let valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramLeft, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramLeft - minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickP, null); + } + } + } + } - var aixs_p = - m_coordinatePara.MinP + - (i + m_coordinatePara.StartLineNoP) * m_coordinatePara.SpaceP; - aixs_p = UnitHelper.getDispValueP( - UnitHelper.ConvertP_fromKW(m_unit.P, aixs_p) - ); - if (aixs_p < -0.01) continue; - var content = UnitHelper.toStringTrim(aixs_p); + //姹借殌 + if (m_isDispNpsh && m_coordinatePara.EndLineNoNPSH > m_coordinatePara.StartLineNoNPSH) { + createAxisTitleNPSH(); - if (i == m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP) { - if (m_displayStyle.AxisTitlePosiAxisUpY == true) { - styleAxisLabelP = - "font-size:12px;fill-opacity:1;user-select:none;fill:" + - m_displayStyle.ColorP + - ";"; - let unit_p_name = UnitHelper.GetUnitNameP(m_unit.P); - content = "P [" + unit_p_name + "]"; - } - } - - m_svg.createText(attrAxisLabelP, styleAxisLabelP, content); - - //瀛愬埢搴︾嚎 - if ( - m_displayStyle.isDispMiniTick && - i != m_coordinatePara.EndLineNoP && - i != m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP - ) { - for (var j = 1; j < m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.DownDiagram.SpaceGridY * j) / - m_displayStyle.MiniTickNumber; - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramLeft, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramLeft - minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickP, null); - } - } - } - } - - //姹借殌 - if ( - m_isDispNpsh && - m_coordinatePara.EndLineNoNPSH > m_coordinatePara.StartLineNoNPSH - ) { - createAxisTitleNPSH(); - - //鍒诲害绾� - var attrAxisTickNPSH = { - stroke: m_displayStyle.ColorNPSH, - "stroke-width": "1", - fill: "none", - }; - - //鍒诲害鏂囧瓧 - var styleAxisLabelNPSH = - "font-size:11px;user-select:none;fill-opacity:1;fill:" + - m_displayStyle.ColorNPSH + - ";"; - - // - for ( - var i = 0; - i <= m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH; - i++ - ) { - var posiY_grid = - m_chartSize.PanelNPSH.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramRight, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramRight + tickLength, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickNPSH, null); - - //鏂囧瓧 - var attrAxisLabelNPSH = { - opacity: 1, - x: m_chartSize.DiagramRight + 10, - y: posiY_grid + 5, - }; - - var axis_npsh_m = - m_coordinatePara.MinNPSH + - (i + m_coordinatePara.StartLineNoNPSH) * m_coordinatePara.SpaceNPSH; - var axis_npsh_v = UnitHelper.ConvertNPSH_fromM( - m_unit.NPSH, - axis_npsh_m - ); - if (axis_npsh_v < 0) continue; - - var content = UnitHelper.toStringTrim( - UnitHelper.getDispValueNPSH(axis_npsh_v) - ); - m_svg.createText(attrAxisLabelNPSH, styleAxisLabelNPSH, content); - - //瀛愬埢搴︾嚎 - if ( - m_displayStyle.isDispMiniTick && - i != m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH - ) { - for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { - var pois_minTick = - posiY_grid - - (m_chartSize.DownDiagram.SpaceGridY * j) / - m_displayStyle.MiniTickNumber; - var valueMini = []; - valueMini.push( - "M ", - m_chartSize.DiagramRight, - " ", - pois_minTick, - " L ", - m_chartSize.DiagramRight + minTickLength, - " ", - pois_minTick - ); - m_svg.createPath(null, valueMini.join(""), attrAxisTickNPSH, null); - } - } - } - } - }; - //缁樺埗鍥捐〃杈圭晫 - var createDiagramBoundary = function () { - var attrBoundary = { - stroke: "black", - "stroke-width": "1", - fill: "none", - }; - - var valueMain1Up = []; - valueMain1Up.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.UpDiagram.Up, - " L ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.UpDiagram.Bottom - ); - m_svg.createPath(null, valueMain1Up.join(""), attrBoundary, null); - - var valueMain2Up = []; - valueMain2Up.push( - "M ", - m_chartSize.DiagramRight, - " ", - m_chartSize.UpDiagram.Up, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.UpDiagram.Bottom - ); - m_svg.createPath(null, valueMain2Up.join(""), attrBoundary, null); - - var valueMain3Up = []; - valueMain3Up.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.UpDiagram.Up, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.UpDiagram.Up - ); - m_svg.createPath(null, valueMain3Up.join(""), attrBoundary, null); - - var valueMain4Up = []; - valueMain4Up.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.UpDiagram.Bottom, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.UpDiagram.Bottom - ); - m_svg.createPath(null, valueMain4Up.join(""), attrBoundary, null); - - if (m_isHaveBottomPanel) { - var valueMain1Down = []; - valueMain1Down.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.DownDiagram.Up, - " L ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.DownDiagram.Bottom - ); - m_svg.createPath(null, valueMain1Down.join(""), attrBoundary, null); - - var valueMain2Down = []; - valueMain2Down.push( - "M ", - m_chartSize.DiagramRight, - " ", - m_chartSize.DownDiagram.Up, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.DownDiagram.Bottom - ); - m_svg.createPath(null, valueMain2Down.join(""), attrBoundary, null); - - var valueMain3Down = []; - valueMain3Down.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.DownDiagram.Up, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.DownDiagram.Up - ); - m_svg.createPath(null, valueMain3Down.join(""), attrBoundary, null); + //鍒诲害绾� + var attrAxisTickNPSH = { + stroke: m_displayStyle.ColorNPSH, + 'stroke-width': '1', + fill: 'none', + }; - var valueMain4Down = []; - valueMain4Down.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.DownDiagram.Bottom, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.DownDiagram.Bottom - ); - m_svg.createPath(null, valueMain4Down.join(""), attrBoundary, null); - } - }; - //缁樺埗Y鍧愭爣鏍囬(鎵▼) - var creatAxisTitleH = function () { - var styleAxisTitleH = - "font-size:14px; ;fill-opacity:1;user-select:none;font-weight:bold; fill:" + - m_displayStyle.ColorH + - ";"; + //鍒诲害鏂囧瓧 + var styleAxisLabelNPSH = 'font-size:11px; fill-opacity:1; fill:' + m_displayStyle.ColorNPSH + ';'; - let unit_h_name = UnitHelper.GetUnitNameH(m_unit.H); + // + for (let i = 0; i <= m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH; i++) { + let posiY_grid = m_chartSize.PanelNPSH.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; + //涓诲埢搴� + let valueMain = []; + valueMain.push('M ', m_chartSize.DiagramRight, ' ', posiY_grid, ' L ', m_chartSize.DiagramRight + tickLength, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickNPSH, null); - //鏍囩 - var attrAxisTitleH = { - opacity: 1, - x: m_chartSize.DiagramLeft - 52, - y: (m_chartSize.PanelH.Bottom + m_chartSize.PanelH.Up) / 2 - 10, - "text-anchor": "middle", - }; - if (m_localizationType == 0) { - //涓枃 - if (m_unit.H == UnitHelper.H.MPa || m_unit.H == UnitHelper.H.KPa) { - attrAxisTitleH.y = attrAxisTitleH.y - 5; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "鍘�"); - attrAxisTitleH.y = attrAxisTitleH.y + 15; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "鍔�"); + //鏂囧瓧 + var attrAxisLabelNPSH = { + opacity: 1, + x: m_chartSize.DiagramRight + 10, + y: posiY_grid + 5, + }; + var axis_npsh = UnitHelper.valueFormat( + m_coordinatePara.MinNPSH + (i + m_coordinatePara.StartLineNoNPSH) * m_coordinatePara.SpaceNPSH + ); + axis_npsh = UnitHelper.ConvertNPSH_fromM(m_unit.NPSH, axis_npsh); + let content = UnitHelper.getDispValueNPSH(axis_npsh); - attrAxisTitleH.x = attrAxisTitleH.x + 3; - attrAxisTitleH.y = attrAxisTitleH.y + 21; - var transform = - "rotate(-90 " + attrAxisTitleH.x + "," + attrAxisTitleH.y + ")"; - m_svg.createText( - attrAxisTitleH, - styleAxisTitleH, - "(" + unit_h_name + ")", - 10, - null, - transform - ); - } else { - attrAxisTitleH.y = attrAxisTitleH.y - 5; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "鎵�"); - attrAxisTitleH.y = attrAxisTitleH.y + 15; - m_svg.createText(attrAxisTitleH, styleAxisTitleH, "绋�"); + m_svg.createText(attrAxisLabelNPSH, styleAxisLabelNPSH, content); - attrAxisTitleH.x = attrAxisTitleH.x + 3; - attrAxisTitleH.y = attrAxisTitleH.y + 21; - var transform = - "rotate(-90 " + attrAxisTitleH.x + "," + attrAxisTitleH.y + ")"; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen - m_svg.createText( - attrAxisTitleH, - styleAxisTitleH, - "(" + unit_h_name + ")", - 10, - null, - transform - ); - } - } else { - var content = "Head (" + unit_h_name + ")"; - if (m_unit.H == UnitHelper.H.MPa) { - content = "Press (MPa)"; - } - if (m_unit.H == UnitHelper.H.KPa) { - content = "Press (MPa)"; - } - var transform = - "rotate(-90 " + attrAxisTitleH.x + "," + attrAxisTitleH.y + ")"; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen - m_svg.createText( - attrAxisTitleH, - styleAxisTitleH, - content, - 10, - null, - transform - ); - } - }; - //缁樺埗Y鍧愭爣鏍囬(鏁堢巼) - var createAxisTitleE = function () { - if (m_displayStyle.AxisTitlePosiAxisUpY == true) { - //鏍囬鏀惧湪鍒诲害涓� - var styleAxisTitleE = - "font-size:12px; fill-opacity:1;user-select:none;fill:" + - m_displayStyle.ColorE + - ";"; - //鍒诲害绾� - var attrAxisTitleE = { - stroke: m_displayStyle.ColorE, - "stroke-width": "1", - fill: "none", - }; + //瀛愬埢搴︾嚎 + if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH) { + for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { + let pois_minTick = posiY_grid - (m_chartSize.DownDiagram.SpaceGridY * j) / m_displayStyle.MiniTickNumber; + let valueMini = []; + valueMini.push( + 'M ', + m_chartSize.DiagramRight, + ' ', + pois_minTick, + ' L ', + m_chartSize.DiagramRight + minTickLength, + ' ', + pois_minTick + ); + m_svg.createPath(null, valueMini.join(''), attrAxisTickNPSH, null); + } + } + } + } + }; + //缁樺埗Y鍧愭爣鏍囬(鎵▼) + var creatAxisTitleH = function () { + var styleAxisTitleH = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorH + ';'; - var posiY_grid = - m_chartSize.PanelE.Bottom - - m_chartSize.UpDiagram.SpaceGridY * - (m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE + 1); - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramRight, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramRight + 2, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTitleE, null); + let unit_h_name = UnitHelper.GetUnitNameH(m_unit.H); - //鏂囧瓧 - var attrAxisLabelE = { - opacity: 1, - x: m_chartSize.DiagramRight + 10, - y: posiY_grid + 5, - }; - var content = "E [%]"; - m_svg.createText(attrAxisLabelE, styleAxisTitleE, content); - } else { - var styleAxisTitleE = - "font-size:14px;fill-opacity:1;user-select:none;font-weight:bold; fill:" + - m_displayStyle.ColorE + - ";"; - // - var attrAxisTitleE = { - opacity: 1, - x: m_chartSize.DiagramRight + 44, - y: (m_chartSize.UpDiagram.Bottom + m_chartSize.UpDiagram.Up) / 2 - 10, - "text-anchor": "middle", - }; + //鏍囩 + var attrAxisTitleH = { + opacity: 1, + x: m_chartSize.DiagramLeft - 52, + y: (m_chartSize.PanelH.Bottom + m_chartSize.PanelH.Up) / 2 - 10, + 'text-anchor': 'middle', + }; + if (m_localizationType == 0) { + //涓枃 + if (m_unit.H == UnitHelper.H.MPa || m_unit.H == UnitHelper.H.KPa) { + attrAxisTitleH.y = attrAxisTitleH.y - 5; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '鍘�'); + attrAxisTitleH.y = attrAxisTitleH.y + 15; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '鍔�'); - //鏍囩 - if (m_localizationType == 0) { - //涓枃 - attrAxisTitleE.y = attrAxisTitleE.y - 5; - m_svg.createText(attrAxisTitleE, styleAxisTitleE, "鏁�"); - attrAxisTitleE.y = attrAxisTitleE.y + 15; - m_svg.createText(attrAxisTitleE, styleAxisTitleE, "鐜�"); + attrAxisTitleH.x = attrAxisTitleH.x + 3; + attrAxisTitleH.y = attrAxisTitleH.y + 21; + var transform = 'rotate(-90 ' + attrAxisTitleH.x + ',' + attrAxisTitleH.y + ')'; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '(MPa)', 10, null, transform); + } else { + attrAxisTitleH.y = attrAxisTitleH.y - 5; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '鎵�'); + attrAxisTitleH.y = attrAxisTitleH.y + 15; + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '绋�'); - attrAxisTitleE.x = attrAxisTitleE.x + 6; - attrAxisTitleE.y = attrAxisTitleE.y + 24; - var transform = - "rotate(-90 " + attrAxisTitleE.x + "," + attrAxisTitleE.y + ")"; - m_svg.createText( - attrAxisTitleE, - styleAxisTitleE, - "(%)", - 10, - null, - transform - ); - } else { - attrAxisTitleE.x = attrAxisTitleE.x + 6; - attrAxisTitleE.y = attrAxisTitleE.y + 24; - var transform = - "rotate(-90 " + attrAxisTitleE.x + "," + attrAxisTitleE.y + ")"; - m_svg.createText( - attrAxisTitleE, - styleAxisTitleE, - "Eta (%)", - 10, - null, - transform - ); - } - } - }; - //缁樺埗Y鍧愭爣鏍囬(鍔熺巼) - var createAxisTitleP = function () { - let unit_p_name = UnitHelper.GetUnitNameP(m_unit.P); + if (m_unit.H == 0) { + attrAxisTitleH.x = attrAxisTitleH.x + 3; + attrAxisTitleH.y = attrAxisTitleH.y + 21; + let transform = 'rotate(-90 ' + attrAxisTitleH.x + ',' + attrAxisTitleH.y + ')'; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen + m_svg.createText(attrAxisTitleH, styleAxisTitleH, '(' + unit_h_name + ')', 10, null, transform); + } + } + } else { + var content = 'Head (' + unit_h_name + ')'; + if (m_unit.H == UnitHelper.H.MPa) { + content = 'Press (MPa)'; + } + if (m_unit.H == UnitHelper.H.KPa) { + content = 'Press (MPa)'; + } + let transform = 'rotate(-90 ' + attrAxisTitleH.x + ',' + attrAxisTitleH.y + ')'; //涓嶇敤澶氬嚭绌烘牸鍚﹀垯鍏ㄥ睆浼氭湁闂expandChartFullScreen + m_svg.createText(attrAxisTitleH, styleAxisTitleH, content, 10, null, transform); + } + }; + //缁樺埗Y鍧愭爣鏍囬(鏁堢巼) + var createAxisTitleE = function () { + if (m_displayStyle.AxisTitlePosiAxisUpY == true) { + //鏍囬鏀惧湪鍒诲害涓� + var styleAxisTitleE = 'font-size:12px; fill-opacity:1; fill:' + m_displayStyle.ColorE + ';'; + //鍒诲害绾� + var attrAxisTitleE = { + stroke: m_displayStyle.ColorE, + 'stroke-width': '1', + fill: 'none', + }; - //鏍囩 - var styleAxisTitleP = - "font-size:14px;fill-opacity:1;user-select:none;font-weight:bold;fill:" + - m_displayStyle.ColorP + - ";"; + var posiY_grid = + m_chartSize.PanelE.Bottom - + m_chartSize.UpDiagram.SpaceGridY * (m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE + 1); + //涓诲埢搴� + var valueMain = []; + valueMain.push('M ', m_chartSize.DiagramRight, ' ', posiY_grid, ' L ', m_chartSize.DiagramRight + 2, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTitleE, null); - //鏍囩 - if (m_localizationType == 0) { - //涓枃 - var attrAxisTitleP = { - opacity: 1, - x: m_chartSize.DiagramLeft - 52, - y: (m_chartSize.PanelP.Bottom + m_chartSize.PanelP.Up) / 2 - 10, - "text-anchor": "middle", - }; - if (m_coordinatePara.SpaceP <= 0.1) { - attrAxisTitleP.x = attrAxisTitleP.x - 5; - } - attrAxisTitleP.y = attrAxisTitleP.y - 5; - m_svg.createText(attrAxisTitleP, styleAxisTitleP, "鍔�"); - attrAxisTitleP.y = attrAxisTitleP.y + 15; - m_svg.createText(attrAxisTitleP, styleAxisTitleP, "鐜�"); + //鏂囧瓧 + var attrAxisLabelE = { + opacity: 1, + x: m_chartSize.DiagramRight + 10, + y: posiY_grid + 5, + }; + var content = 'E [%]'; + m_svg.createText(attrAxisLabelE, styleAxisTitleE, content); + } else { + let styleAxisTitleE = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorE + ';'; + // + let attrAxisTitleE = { + opacity: 1, + x: m_chartSize.DiagramRight + 44, + y: (m_chartSize.UpDiagram.Bottom + m_chartSize.UpDiagram.Up) / 2 - 10, + 'text-anchor': 'middle', + }; - attrAxisTitleP.x = attrAxisTitleP.x + 2; - attrAxisTitleP.y = attrAxisTitleP.y + 25; - var transform = - "rotate(-90 " + attrAxisTitleP.x + "," + attrAxisTitleP.y + ")"; - m_svg.createText( - attrAxisTitleP, - styleAxisTitleP, - "(" + unit_p_name + ")", - 10, - null, - transform - ); - } else { - var attrAxisTitleP = { - opacity: 1, - x: m_chartSize.DiagramLeft - 60, - y: (m_chartSize.PanelP.Bottom + m_chartSize.PanelP.Up) / 2 - 10, - "text-anchor": "middle", - }; - if (m_coordinatePara.SpaceP <= 0.1) { - attrAxisTitleP.x = attrAxisTitleP.x - 5; - } - attrAxisTitleP.x = attrAxisTitleP.x + 13; - attrAxisTitleP.y = attrAxisTitleP.y + 25; - var transform = - "rotate(-90 " + attrAxisTitleP.x + "," + attrAxisTitleP.y + ")"; - m_svg.createText( - attrAxisTitleP, - styleAxisTitleP, - "Power (" + unit_p_name + ")", - 10, - null, - transform - ); - } - }; - //缁樺埗Y鍧愭爣鏍囬(姹借殌) - var createAxisTitleNPSH = function () { - if (m_displayStyle.AxisTitlePosiAxisUpY == true) { - //鏍囬鏀惧湪鍒诲害涓� - //鍒诲害绾� - var attrAxisTickNPSH = { - stroke: m_displayStyle.ColorNPSH, - "stroke-width": "1", - fill: "none", - }; + //鏍囩 + if (m_localizationType == 0) { + //涓枃 + attrAxisTitleE.y = attrAxisTitleE.y - 5; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, '鏁�'); + attrAxisTitleE.y = attrAxisTitleE.y + 15; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, '鐜�'); - //鍒诲害鏂囧瓧 - var styleAxisLabelNPSH = - "font-size:12px;user-select:none;fill-opacity:1; fill:" + - m_displayStyle.ColorNPSH + - ";"; + attrAxisTitleE.x = attrAxisTitleE.x + 6; + attrAxisTitleE.y = attrAxisTitleE.y + 24; + var transform = 'rotate(-90 ' + attrAxisTitleE.x + ',' + attrAxisTitleE.y + ')'; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, '(%)', 10, null, transform); + } else { + attrAxisTitleE.x = attrAxisTitleE.x + 6; + attrAxisTitleE.y = attrAxisTitleE.y + 24; + let transform = 'rotate(-90 ' + attrAxisTitleE.x + ',' + attrAxisTitleE.y + ')'; + m_svg.createText(attrAxisTitleE, styleAxisTitleE, 'Eta (%)', 10, null, transform); + } + } + }; + //缁樺埗Y鍧愭爣鏍囬(鍔熺巼) + var createAxisTitleP = function () { + let unit_p_name = UnitHelper.GetUnitNameP(m_unit.P); - var posiY_grid = - m_chartSize.PanelNPSH.Bottom - - m_chartSize.DownDiagram.SpaceGridY * - (m_coordinatePara.EndLineNoNPSH - - m_coordinatePara.StartLineNoNPSH + - 1); - //涓诲埢搴� - var valueMain = []; - valueMain.push( - "M ", - m_chartSize.DiagramRight, - " ", - posiY_grid, - " L ", - m_chartSize.DiagramRight + 2, - " ", - posiY_grid - ); - m_svg.createPath(null, valueMain.join(""), attrAxisTickNPSH, null); + //鏍囩 + var styleAxisTitleP = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorP + ';'; - //鏂囧瓧 - var attrAxisLabelNPSH = { - opacity: 1, - x: m_chartSize.DiagramRight + 10, - y: posiY_grid - 4, - }; - m_svg.createText(attrAxisLabelNPSH, styleAxisLabelNPSH, "NPSH"); + //鏍囩 + if (m_localizationType == 0) { + //涓枃 + var attrAxisTitleP = { + opacity: 1, + x: m_chartSize.DiagramLeft - 52, + y: (m_chartSize.PanelP.Bottom + m_chartSize.PanelP.Up) / 2 - 10, + 'text-anchor': 'middle', + }; + if (m_coordinatePara.SpaceP <= 0.1) { + attrAxisTitleP.x = attrAxisTitleP.x - 5; + } + attrAxisTitleP.y = attrAxisTitleP.y - 5; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, '鍔�'); + attrAxisTitleP.y = attrAxisTitleP.y + 15; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, '鐜�'); - var attrAxisLabelNPSH_unit = { - opacity: 1, - x: m_chartSize.DiagramRight + 10, - y: posiY_grid + 9, - }; - m_svg.createText( - attrAxisLabelNPSH_unit, - styleAxisLabelNPSH, - "[" + UnitHelper.GetUnitNameNPSH(m_unit.NPSH) + "]" - ); - } else { - var styleAxisTitleNPSH = - "font-size:14px; ;fill-opacity:1; font-weight:bold; fill:" + - m_displayStyle.ColorNPSH + - ";"; - var attrAxisTitleNPSH = { - opacity: 1, - x: m_chartSize.DiagramRight + 44, - y: (m_chartSize.PanelNPSH.Bottom + m_chartSize.PanelNPSH.Up) / 2 - 10, - "text-anchor": "middle", - }; - var title_content = "(" + UnitHelper.GetUnitNameNPSH(m_unit.NPSH) + ")"; - if (m_localizationType == 0) { - //涓枃 - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y - 5; - m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, "姹�"); - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 15; - m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, "铓�"); - attrAxisTitleNPSH.x = attrAxisTitleNPSH.x - 4; - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; - var transform = - "rotate(90 " + attrAxisTitleNPSH.x + "," + attrAxisTitleNPSH.y + ")"; - m_svg.createText( - attrAxisTitleNPSH, - styleAxisTitleNPSH, - title_content, - 10, - null, - transform - ); - } else { - attrAxisTitleNPSH.x = attrAxisTitleNPSH.x + 6; - attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; - var transform = - "rotate(90 " + attrAxisTitleNPSH.x + "," + attrAxisTitleNPSH.y + ")"; - m_svg.createText( - attrAxisTitleNPSH, - styleAxisTitleNPSH, - "NPSHr" + title_content, - 10, - null, - transform - ); - } - } - }; - //缁樺埗闈㈡澘 - var drawDiagramPanel = function () { - if (m_chartDiagramPanelStyle == ConstParas.ChartDiagramPanelStyle.Whole) { - //缁樺埗缃戞牸绾� - createGridLineDiagram_Whole(); + attrAxisTitleP.x = attrAxisTitleP.x + 2; + attrAxisTitleP.y = attrAxisTitleP.y + 25; + var transform = 'rotate(-90 ' + attrAxisTitleP.x + ',' + attrAxisTitleP.y + ')'; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, '(' + unit_p_name + ')', 10, null, transform); + } else { + let attrAxisTitleP = { + opacity: 1, + x: m_chartSize.DiagramLeft - 60, + y: (m_chartSize.PanelP.Bottom + m_chartSize.PanelP.Up) / 2 - 10, + 'text-anchor': 'middle', + }; + if (m_coordinatePara.SpaceP <= 0.1) { + attrAxisTitleP.x = attrAxisTitleP.x - 5; + } + attrAxisTitleP.x = attrAxisTitleP.x + 13; + attrAxisTitleP.y = attrAxisTitleP.y + 25; + let transform = 'rotate(-90 ' + attrAxisTitleP.x + ',' + attrAxisTitleP.y + ')'; + m_svg.createText(attrAxisTitleP, styleAxisTitleP, 'Power (' + unit_p_name + ')', 10, null, transform); + } + }; + //缁樺埗Y鍧愭爣鏍囬(姹借殌) + var createAxisTitleNPSH = function () { + if (m_displayStyle.AxisTitlePosiAxisUpY == true) { + //鏍囬鏀惧湪鍒诲害涓� + //鍒诲害绾� + var attrAxisTickNPSH = { + stroke: m_displayStyle.ColorNPSH, + 'stroke-width': '1', + fill: 'none', + }; - //缁樺埗X鍧愭爣(涓婇潰 绗簩鍧愭爣) - createFlowAxisSecondUp(); + //鍒诲害鏂囧瓧 + var styleAxisLabelNPSH = 'font-size:12px; fill-opacity:1; fill:' + m_displayStyle.ColorNPSH + ';'; - //缁樺埗X鍧愭爣 - createFlowAxisBottom(); + var posiY_grid = + m_chartSize.PanelNPSH.Bottom - + m_chartSize.DownDiagram.SpaceGridY * (m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH + 1); + //涓诲埢搴� + var valueMain = []; + valueMain.push('M ', m_chartSize.DiagramRight, ' ', posiY_grid, ' L ', m_chartSize.DiagramRight + 2, ' ', posiY_grid); + m_svg.createPath(null, valueMain.join(''), attrAxisTickNPSH, null); - //缁樺埗Y鍧愭爣 - createYAxis_Whole(); - } else { - //缁樺埗缃戞牸绾� - createGridLineDiagram_TwoPanel(); + //鏂囧瓧 + var attrAxisLabelNPSH = { + opacity: 1, + x: m_chartSize.DiagramRight + 10, + y: posiY_grid - 4, + }; + m_svg.createText(attrAxisLabelNPSH, styleAxisLabelNPSH, 'NPSH'); - //缁樺埗X鍧愭爣(涓婇潰 绗簩鍧愭爣) - createFlowAxisSecondUp(); + var attrAxisLabelNPSH_unit = { + opacity: 1, + x: m_chartSize.DiagramRight + 10, + y: posiY_grid + 9, + }; + m_svg.createText(attrAxisLabelNPSH_unit, styleAxisLabelNPSH, '[' + UnitHelper.GetUnitNameNPSH(m_unit.NPSH) + ']'); + } else { + var styleAxisTitleNPSH = 'font-size:14px; ;fill-opacity:1; font-weight:bold; fill:' + m_displayStyle.ColorNPSH + ';'; + var attrAxisTitleNPSH = { + opacity: 1, + x: m_chartSize.DiagramRight + 44, + y: (m_chartSize.PanelNPSH.Bottom + m_chartSize.PanelNPSH.Up) / 2 - 10, + 'text-anchor': 'middle', + }; + if (m_localizationType == 0) { + //涓枃 + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y - 5; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, '姹�'); + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 15; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, '铓�'); + attrAxisTitleNPSH.x = attrAxisTitleNPSH.x - 4; + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; + var transform = 'rotate(90 ' + attrAxisTitleNPSH.x + ',' + attrAxisTitleNPSH.y + ')'; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, '(m)', 10, null, transform); + } else { + attrAxisTitleNPSH.x = attrAxisTitleNPSH.x + 6; + attrAxisTitleNPSH.y = attrAxisTitleNPSH.y + 24; + let transform = 'rotate(90 ' + attrAxisTitleNPSH.x + ',' + attrAxisTitleNPSH.y + ')'; + m_svg.createText(attrAxisTitleNPSH, styleAxisTitleNPSH, 'NPSHr (m)', 10, null, transform); + } + } + }; + //缁樺埗闈㈡澘 + var drawDiagramPanel = function () { + if (m_chartDiagramPanelStyle == ConstParas.ChartDiagramPanelStyle.Whole) { + //缁樺埗缃戞牸绾� + createGridLineDiagram_Whole(); - //缁樺埗X鍧愭爣 - createFlowAxisMiddle(); + //缁樺埗X鍧愭爣(涓婇潰 绗簩鍧愭爣) + createFlowAxisSecondUp(); - if (m_isHaveBottomPanel) createFlowAxisBottom(); + //缁樺埗X鍧愭爣 + createFlowAxisBottom(); - //缁樺埗Y鍧愭爣 - createYAxis_TwoPanel(); + //缁樺埗Y鍧愭爣 + createYAxis_Whole(); + } else { + //缁樺埗缃戞牸绾� + createGridLineDiagram_TwoPanel(); - //缁樺埗鍥捐〃杈圭晫 - createDiagramBoundary(); - } - }; + //缁樺埗X鍧愭爣(涓婇潰 绗簩鍧愭爣) + createFlowAxisSecondUp(); - //浜х敓鍨嬭氨 - var drawSpectrumShape = function () { - var spectrumShape = m_chartObject.SpectrumShape; + //缁樺埗X鍧愭爣 + createFlowAxisMiddle(); + createFlowAxisBottom(); - if (spectrumShape == null) return; + //缁樺埗Y鍧愭爣 + createYAxis_TwoPanel(); + } + }; + //浜х敓瑁呯疆鏇茬嚎 + var drawEquipmentCurve = function () { + var equipmentCurveElement = document.getElementById('EquipmentCurve'); + if (equipmentCurveElement) { + equipmentCurveElement.parentNode.removeChild(equipmentCurveElement); + } - removeElementById("SpectrumShape"); + if (m_chartObject.EquipmentSectPt == null) return; + var pointNumber = 20; + var EquipmentCurve = []; + var space = m_chartObject.EquipmentSectPt.X / (pointNumber - 1); + var k = (m_chartObject.EquipmentSectPt.Y - m_equipZeroH) / (m_chartObject.EquipmentSectPt.X * m_chartObject.EquipmentSectPt.X); + for (var i = 0; i < pointNumber; i++) { + var pt = {}; + pt.X = space * i; + pt.Y = m_equipZeroH + k * pt.X * pt.X; + EquipmentCurve.push(pt); + } + createCurveQH('EquipmentCurve', EquipmentCurve, 1, m_displayStyle.ColorEquipment, m_displayStyle.isDispEquipmentCurve); + }; - if (!m_displayStyle.IsDispSpectrum) { - return; - } + //浜х敓鍨嬭氨 + var drawSpectrumShape = function () { + var spectrumShape = m_chartObject.SpectrumShape; + //console.log(m_displayStyle.IsDispSpectrum,spectrumShape) - var pathValue = []; + if (spectrumShape == null) return; + var spectrumShapeElement = document.getElementById('SpectrumShape'); + if (spectrumShapeElement) { + spectrumShapeElement.parentNode.removeChild(spectrumShapeElement); + } - var pixelPoints_Left = []; - var points_left = spectrumShape["LeftParabolaPoints"]; - for (var v = 0; v < points_left.length; v++) { - var pt = points_left[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueH(pt.Y); - pixelPoints_Left.push({ X: x, Y: y }); - } - var bezierCurve_points_Left = transBezierCurveModel(pixelPoints_Left); - for (var h = 0; h < bezierCurve_points_Left.length; h++) { - var b_pt = bezierCurve_points_Left[h]; - if (h == 0) { - pathValue.push("M ", b_pt.Point0.X, " ", b_pt.Point0.Y); - pathValue.push( - " C ", - b_pt.Point1.X, - " ", - b_pt.Point1.Y, - " ", - b_pt.Point2.X, - " ", - b_pt.Point2.Y, - " ", - b_pt.Point3.X, - " ", - b_pt.Point3.Y - ); - } else { - pathValue.push(" L ", b_pt.Point0.X, " ", b_pt.Point0.Y); - pathValue.push( - " C ", - b_pt.Point1.X, - " ", - b_pt.Point1.Y, - " ", - b_pt.Point2.X, - " ", - b_pt.Point2.Y, - " ", - b_pt.Point3.X, - " ", - b_pt.Point3.Y - ); - } - } + if (!m_displayStyle.IsDispSpectrum) { + return; + } - var pixelPoints_Top = []; - var points_top = spectrumShape["BasePoints"]; - for (var v = 0; v < points_top.length; v++) { - var pt = points_top[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueH(pt.Y); - pixelPoints_Top.push({ X: x, Y: y }); - } - var bezierCurve_points_top = transBezierCurveModel(pixelPoints_Top); - for (var h = 0; h < bezierCurve_points_top.length; h++) { - var b_pt = bezierCurve_points_top[h]; - pathValue.push(" L ", b_pt.Point0.X, " ", b_pt.Point0.Y); - pathValue.push( - " C ", - b_pt.Point1.X, - " ", - b_pt.Point1.Y, - " ", - b_pt.Point2.X, - " ", - b_pt.Point2.Y, - " ", - b_pt.Point3.X, - " ", - b_pt.Point3.Y - ); - } + var pathValue = []; - var pixelPoints_bottom = []; - var points_bottom = spectrumShape["SimularPoints"]; - for (var v = 0; v < points_bottom.length; v++) { - var pt = points_bottom[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueH(pt.Y); - pixelPoints_bottom.push({ X: x, Y: y }); - } - var bezierCurve_points_bottom = transBezierCurveModel(pixelPoints_bottom); - for (var h = 0; h < bezierCurve_points_bottom.length; h++) { - var b_pt = bezierCurve_points_bottom[h]; - pathValue.push(" L ", b_pt.Point0.X, " ", b_pt.Point0.Y); - pathValue.push( - " C ", - b_pt.Point1.X, - " ", - b_pt.Point1.Y, - " ", - b_pt.Point2.X, - " ", - b_pt.Point2.Y, - " ", - b_pt.Point3.X, - " ", - b_pt.Point3.Y - ); - } + var pixelPoints_Left = []; + var points_left = spectrumShape['LeftParabolaPoints']; + for (var v = 0; v < points_left.length; v++) { + var pt = points_left[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueH(pt.Y); + pixelPoints_Left.push({ X: x, Y: y }); + } + var bezierCurve_points_Left = transBezierCurveModel(pixelPoints_Left); + for (var h = 0; h < bezierCurve_points_Left.length; h++) { + var b_pt = bezierCurve_points_Left[h]; + if (h == 0) { + pathValue.push('M ', b_pt.Point0.X, ' ', b_pt.Point0.Y); + pathValue.push( + ' C ', + b_pt.Point1.X, + ' ', + b_pt.Point1.Y, + ' ', + b_pt.Point2.X, + ' ', + b_pt.Point2.Y, + ' ', + b_pt.Point3.X, + ' ', + b_pt.Point3.Y + ); + } else { + pathValue.push(' L ', b_pt.Point0.X, ' ', b_pt.Point0.Y); + pathValue.push( + ' C ', + b_pt.Point1.X, + ' ', + b_pt.Point1.Y, + ' ', + b_pt.Point2.X, + ' ', + b_pt.Point2.Y, + ' ', + b_pt.Point3.X, + ' ', + b_pt.Point3.Y + ); + } + } - var pixelPoints_right = []; - var points_right = spectrumShape["RightParabolaPoints"]; - for (var v = 0; v < points_right.length; v++) { - var pt = points_right[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueH(pt.Y); - pixelPoints_right.push({ X: x, Y: y }); - } - var bezierCurve_points_right = transBezierCurveModel(pixelPoints_right); - for (var h = 0; h < bezierCurve_points_right.length; h++) { - var b_pt = bezierCurve_points_right[h]; - pathValue.push(" L ", b_pt.Point0.X, " ", b_pt.Point0.Y); - pathValue.push( - " C ", - b_pt.Point1.X, - " ", - b_pt.Point1.Y, - " ", - b_pt.Point2.X, - " ", - b_pt.Point2.Y, - " ", - b_pt.Point3.X, - " ", - b_pt.Point3.Y - ); - if (h == bezierCurve_points_right.length - 1) { - pathValue.push(" L ", b_pt.Point3.X, " ", b_pt.Point3.Y); - } - } + var pixelPoints_Top = []; + var points_top = spectrumShape['BasePoints']; + for (let v = 0; v < points_top.length; v++) { + let pt = points_top[v]; + let x = getPixelValueQ(pt.X); + let y = getPixelValueH(pt.Y); + pixelPoints_Top.push({ X: x, Y: y }); + } + var bezierCurve_points_top = transBezierCurveModel(pixelPoints_Top); + for (let h = 0; h < bezierCurve_points_top.length; h++) { + let b_pt = bezierCurve_points_top[h]; + pathValue.push(' L ', b_pt.Point0.X, ' ', b_pt.Point0.Y); + pathValue.push( + ' C ', + b_pt.Point1.X, + ' ', + b_pt.Point1.Y, + ' ', + b_pt.Point2.X, + ' ', + b_pt.Point2.Y, + ' ', + b_pt.Point3.X, + ' ', + b_pt.Point3.Y + ); + } - if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { - return; - } + var pixelPoints_bottom = []; + var points_bottom = spectrumShape['SimularPoints']; + for (let v = 0; v < points_bottom.length; v++) { + let pt = points_bottom[v]; + let x = getPixelValueQ(pt.X); + let y = getPixelValueH(pt.Y); + pixelPoints_bottom.push({ X: x, Y: y }); + } + var bezierCurve_points_bottom = transBezierCurveModel(pixelPoints_bottom); + for (let h = 0; h < bezierCurve_points_bottom.length; h++) { + let b_pt = bezierCurve_points_bottom[h]; + pathValue.push(' L ', b_pt.Point0.X, ' ', b_pt.Point0.Y); + pathValue.push( + ' C ', + b_pt.Point1.X, + ' ', + b_pt.Point1.Y, + ' ', + b_pt.Point2.X, + ' ', + b_pt.Point2.Y, + ' ', + b_pt.Point3.X, + ' ', + b_pt.Point3.Y + ); + } - if (m_displayStyle.SpectrumColor == null) - m_displayStyle.SpectrumColor = "Aquamarine"; - var style = { - "stroke-width": "1", - stroke: "none", - fill: m_displayStyle.SpectrumColor, - "stroke-opacity": "0.1", - "fill-opacity": "0.3", - "shape-rendering": "geometricPrecision", - "zIndex:": -1, - }; - m_svg.createPath("SpectrumShape", pathValue.join(""), null, style); - }; + var pixelPoints_right = []; + var points_right = spectrumShape['RightParabolaPoints']; + for (let v = 0; v < points_right.length; v++) { + let pt = points_right[v]; + let x = getPixelValueQ(pt.X); + let y = getPixelValueH(pt.Y); + pixelPoints_right.push({ X: x, Y: y }); + } + var bezierCurve_points_right = transBezierCurveModel(pixelPoints_right); + for (let h = 0; h < bezierCurve_points_right.length; h++) { + let b_pt = bezierCurve_points_right[h]; + pathValue.push(' L ', b_pt.Point0.X, ' ', b_pt.Point0.Y); + pathValue.push( + ' C ', + b_pt.Point1.X, + ' ', + b_pt.Point1.Y, + ' ', + b_pt.Point2.X, + ' ', + b_pt.Point2.Y, + ' ', + b_pt.Point3.X, + ' ', + b_pt.Point3.Y + ); + if (h == bezierCurve_points_right.length - 1) { + pathValue.push(' L ', b_pt.Point3.X, ' ', b_pt.Point3.Y); + } + } - //缁樺埗鏇茬嚎(娴侀噺鎵▼) curveDashType 绫诲瀷 渚嬪 "5 5" - var createCurveQH = function ( - curveElementName, - curvePoints, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ) { - if (curvePoints == null || curvePoints.length == 0) { - return; - } + //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 + if (pathValue.toString().indexOf('M ,NaN, ,NaN') == 0) { + return; + } - var pixelPoints = []; - for (var v = 0; v < curvePoints.length; v++) { - var pt = curvePoints[v]; - var x = getPixelValueQ(pt.X); - if (pt.Y < 0) pt.Y = 0; - var y = getPixelValueH(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } + var style = { + 'stroke-width': '1', + stroke: 'none', + fill: m_displayStyle.ColorSpectrumFill, + 'stroke-opacity': '0.1', + 'fill-opacity': '0.3', + 'shape-rendering': 'geometricPrecision', + 'zIndex:': -1, + }; + m_svg.createPath('SpectrumShape', pathValue.join(''), null, style); + }; - return createCurveQH_pixel( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ); - }; - //缁樺埗鏇茬嚎(娴侀噺鎵▼) : 鍍忕礌鐐� - var createCurveQH_pixel = function ( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - isDisp, - curveDashType - ) { - if (pixelPoints == null || pixelPoints.length < 3) { - return; - } + //缁樺埗鏇茬嚎(娴侀噺鎵▼) + var createCurveQH = function (curveElementName, curvePoints, curveWidth, curveColor, curveIsDisp, curveDashType) { + if (curvePoints == null) { + return; + } + if (curveElementName == null) { + return; + } - var pathValue = transBezierCurveToPath(pixelPoints); - if (pathValue == null || pathValue == undefined) return; - // - if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { - return; - } + var pixelPoints = []; + for (var v = 0; v < curvePoints.length; v++) { + var pt = curvePoints[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueH(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } - var style = { - "stroke-width": "2px", - stroke: m_displayStyle.ColorH, - fill: "none", - "fill-opacity": "0.5", - //"stroke-dasharray":"5 3", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (curveWidth != null) { - style["stroke-width"] = curveWidth; - } - if (curveColor != null) { - style["stroke"] = curveColor; - } - if (curveDashType != null) { - style["stroke-dasharray"] = curveDashType; //'10, 10';//'10, 10, 5, 5' - } + return createCurveQH_pixel(curveElementName, pixelPoints, curveWidth, curveColor, curveIsDisp, curveDashType); + }; + //缁樺埗鏇茬嚎(娴侀噺鎵▼) : 鍍忕礌鐐� + var createCurveQH_pixel = function (curveElementName, pixelPoints, curveWidth, curveColor, isDisp, curveDashType) { + if (pixelPoints == null || pixelPoints.length < 3) { + return; + } + if (curveElementName == null) { + return; + } + var pathValue = transBezierCurveToPath(pixelPoints); + if (pathValue == null || pathValue == undefined) return; + //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 + if (pathValue.toString().indexOf('M ,NaN, ,NaN') == 0) { + return; + } - //缁樺埗 - m_svg.createPath( - curveElementName, - pathValue.join(""), - { - id: curveElementName, - }, - style - ); - //鏄惁鏄剧ず - if (isDisp != null && !isDisp) { - hideElementById(curveElementName); - } + var style = { + 'stroke-width': '2px', + stroke: m_displayStyle.ColorH, + fill: 'none', + 'fill-opacity': '0.5', + //"stroke-dasharray":"5 3", + 'shape-rendering': 'geometricPrecision', + 'zIndex:': 7, + }; + if (curveWidth != null) { + style['stroke-width'] = curveWidth; + } + if (curveColor != null) { + style['stroke'] = curveColor; + } + if (curveDashType != null) { + style['stroke-dasharray'] = curveDashType; //'10, 10';//'10, 10, 5, 5' + } + //console.log(curveElementName,pathValue) + //缁樺埗 + m_svg.createPath( + curveElementName, + pathValue.join(''), + { + id: curveElementName, + }, + style + ); + //鏄惁鏄剧ず + if (isDisp != null && !isDisp) { + document.getElementById(curveElementName).style.display = 'none'; + } - //缁樺埗瀹氫箟鐐� - /*pixelPoints.forEach(pixel_pt => { + //缁樺埗瀹氫箟鐐� + /*pixelPoints.forEach(pixel_pt => { + // console.log(pixel_pt) + var attr_pt = { + "cx": pixel_pt.X, + "cy": pixel_pt.Y, + "r": 2 + } + var style_pt = { + "stroke-width": "2px", + "stroke": curveColor, + "fill": "none", + "fill-opacity": "0.5", + "shape-rendering": "geometricPrecision", + "zIndex:": 7 + }; + + m_svg.createCircle(null, attr_pt, style_pt); });*/ - return pixelPoints; - }; - //缁樺埗鐩寸嚎 - var createLineQH = function ( - curveElementName, - point1, - point2, - curveWidth, - curveColor, - objTag - ) { - if (point1 == null || point2 == null) { - return; - } + return pixelPoints; + }; + //缁樺埗鐩寸嚎 + var createLineQH = function (curveElementName, point1, point2, curveWidth, curveColor, objTag) { + if (point1 == null || point2 == null) { + return; + } + if (curveElementName == null) { + return; + } + var x1 = getPixelValueQ(point1.X); + var y1 = getPixelValueH(point1.Y); - var x1 = getPixelValueQ(point1.X); - var y1 = getPixelValueH(point1.Y); + var x2 = getPixelValueQ(point2.X); + var y2 = getPixelValueH(point2.Y); - var x2 = getPixelValueQ(point2.X); - var y2 = getPixelValueH(point2.Y); + var style = { + 'stroke-width': '2px', + stroke: m_displayStyle.ColorH, + fill: 'none', + 'fill-opacity': '0.5', + //"stroke-dasharray":"5 3", + 'shape-rendering': 'geometricPrecision', + 'zIndex:': 7, + }; + if (curveWidth != null) { + style['stroke-width'] = curveWidth; + } + if (curveColor != null) { + style['stroke'] = curveColor; + } + var temp = 'M x1 y1 L x2 y2'; + var pathValue = temp.replace('x1', x1).replace('y1', y1).replace('x2', x2).replace('y2', y2); + if (objTag == null) m_svg.createPath(curveElementName, pathValue, null, style); + else m_svg.createPath(curveElementName, pathValue, { tag: objTag }, style); + }; + //缁樺埗鐐� + var createPointQH = function (curveElementName, point, circleSize, circleColor) { + if (point == null) { + return; + } + if (curveElementName == null) { + return; + } - var style = { - "stroke-width": "2px", - stroke: m_displayStyle.ColorH, - fill: "none", - "fill-opacity": "0.5", - //"stroke-dasharray":"5 3", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (curveWidth != null) { - style["stroke-width"] = curveWidth; - } - if (curveColor != null) { - style["stroke"] = curveColor; - } - var temp = "M x1 y1 L x2 y2"; - var pathValue = temp - .replace("x1", x1) - .replace("y1", y1) - .replace("x2", x2) - .replace("y2", y2); - if (objTag == null) - m_svg.createPath(curveElementName, pathValue, null, style); - else m_svg.createPath(curveElementName, pathValue, { tag: objTag }, style); - }; - //铏氱嚎 curveDashType 绫诲瀷 "5 3" - var createDashedLineQH = function ( - curveElementName, - point1, - point2, - curveWidth, - curveColor, - curveDashType, - objTag - ) { - if (point1 == null || point2 == null) { - return; - } + var xPixel = getPixelValueQ(point.X); + var yPixel = getPixelValueH(point.Y); - var x1 = getPixelValueQ(point1.X); - var y1 = getPixelValueH(point1.Y); + var attr = { + cx: xPixel, + cy: yPixel, + r: 2, + }; + var style = { + 'stroke-width': '2px', + stroke: m_displayStyle.ColorH, + fill: 'none', + 'fill-opacity': '0.5', + //"stroke-dasharray":"5 3", + 'shape-rendering': 'geometricPrecision', + 'zIndex:': 7, + }; + if (circleSize != null) { + attr.r = circleSize; + } + if (circleColor != null) { + style['stroke'] = circleColor; + } - var x2 = getPixelValueQ(point2.X); - var y2 = getPixelValueH(point2.Y); + m_svg.createCircle(curveElementName, attr, style); + }; + //缁樺埗鏂囧瓧 textAnchor 鏂囧瓧瀵归綈 start | middle | end + var drawTextByQH = function (curveElementName, text, point, textSize, textColor, offsetPixelX, offsetPixelY, textAnchor) { + if (!text) { + return; + } + if (!point) { + return; + } - var style = { - "stroke-width": "2px", - stroke: m_displayStyle.ColorH, - fill: "none", - "fill-opacity": "0.5", - "stroke-dasharray": curveDashType, - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (curveWidth != null) { - style["stroke-width"] = curveWidth; - } - if (curveColor != null) { - style["stroke"] = curveColor; - } - var temp = "M x1 y1 L x2 y2"; - var pathValue = temp - .replace("x1", x1) - .replace("y1", y1) - .replace("x2", x2) - .replace("y2", y2); - if (objTag == null) - m_svg.createPath(curveElementName, pathValue, null, style); - else m_svg.createPath(curveElementName, pathValue, { tag: objTag }, style); - }; - var createLine_pixel = function ( - curveElementName, - point1, - point2, - curveWidth, - curveColor, - objTag - ) { - if (point1 == null || point2 == null) { - return; - } + var xPixel = getPixelValueQ(point.X); + var yPixel = getPixelValueH(point.Y); + if (offsetPixelX != null) { + xPixel += offsetPixelX; + } + if (offsetPixelY != null) { + yPixel -= offsetPixelY; + } - var x1 = point1.X; - var y1 = point1.Y; + var textStyle = 'stroke-width:1px; '; //font-weight:bold; fill-opacity:0.9; + if (textColor != null) { + textStyle += ' fill:' + textColor + ';'; + } else { + textStyle += ' fill:#000000;'; + } + if (textSize != null) { + textStyle += ' font-size:' + textSize + 'px;'; + } else { + textStyle += ' font-size:12px;'; + } + if (textAnchor != null) { + textStyle += ' text-anchor:' + textAnchor + ';'; + } + if (curveElementName == null) { + return m_svg.createText( + { + opacity: 0.5, + y: yPixel, + x: xPixel, + }, + textStyle, + text + ); + } else { + return m_svg.createText( + { + id: curveElementName, + opacity: 0.5, + y: yPixel, + x: xPixel, + }, + textStyle, + text + ); + } + }; + //缁樺埗璁捐鐐� + var drawDesignPoint = function () { + if (m_chartObject.DesignPoint4StdUnit == null) return; + var defaultDp = m_chartObject.DesignPoint4StdUnit; - var x2 = point2.X; - var y2 = point2.Y; + var DispStyleType = m_displayStyle.DesignPointDispType; + if (DispStyleType == 2) { + //鍊掍笁瑙� - var style = { - "stroke-width": "2px", - stroke: curveColor, - fill: "none", - "fill-opacity": "0.5", - //"stroke-dasharray":"5 3", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (curveWidth != null) { - style["stroke-width"] = curveWidth; - } - if (curveColor != null) { - style["stroke"] = curveColor; - } - var temp = "M x1 y1 L x2 y2"; - var pathValue = temp - .replace("x1", x1) - .replace("y1", y1) - .replace("x2", x2) - .replace("y2", y2); - if (objTag == null) - m_svg.createPath(curveElementName, pathValue, null, style); - else m_svg.createPath(curveElementName, pathValue, { tag: objTag }, style); - }; - //缁樺埗鐐� - var createPointQH = function ( - curveElementName, - point, - circleSize, - circleColor - ) { - if (point == null) { - return; - } - if (curveElementName == null) { - return; - } + var xPixel = getPixelValueQ(defaultDp.X); + var yPixel = getPixelValueH(defaultDp.Y); - var xPixel = getPixelValueQ(point.X); - var yPixel = getPixelValueH(point.Y); + var xTri = m_chartSize.DiagramWidth / 20; + var yTri = xTri / 2; + var style = { + 'stroke-width': '2px', + stroke: 'red', + fill: 'none', + 'fill-opacity': '0.5', + //"stroke-dasharray":"5 3", + 'shape-rendering': 'geometricPrecision', + 'zIndex:': 18, + }; + //if (curveWidth != null) { + // style["stroke-width"] = curveWidth; + //} + //if (curveColor != null) { + // style["stroke"] = curveColor; + //} - var attr = { - cx: xPixel, - cy: yPixel, - r: 2, - }; - var style = { - "stroke-width": "2px", - stroke: m_displayStyle.ColorH, - fill: "none", - "fill-opacity": "0.5", - //"stroke-dasharray":"5 3", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (circleSize != null) { - attr.r = circleSize; - } - if (circleColor != null) { - style["stroke"] = circleColor; - } + var temp = 'M x1 y1 L x2 y2'; + var pathValue = temp + .replace('x1', xPixel) + .replace('y1', yPixel) + .replace('x2', xPixel - xTri) + .replace('y2', yPixel); + m_svg.createPath( + 'DesignPointWater1', + pathValue, + { + //"class": "DesignPoint1", + tag: 'DesignPoint1', + }, + style + ); + pathValue = temp + .replace('x1', xPixel) + .replace('y1', yPixel) + .replace('x2', xPixel) + .replace('y2', yPixel + yTri); + m_svg.createPath( + 'DesignPointWater2', + pathValue, + { + //"class": "DesignPoint1", + tag: 'DesignPoint1', + }, + style + ); + pathValue = temp + .replace('x1', xPixel - xTri) + .replace('y1', yPixel) + .replace('x2', xPixel) + .replace('y2', yPixel + yTri); + m_svg.createPath( + 'DesignPointWater3', + pathValue, + { + //"class": "DesignPoint1", + tag: 'DesignPoint1', + }, + style + ); - m_svg.createCircle(curveElementName, attr, style); - }; - //缁樺埗鏂囧瓧 - var drawTextByQH = function (elementName, content, point, style) { - if (!content) { - return; - } - if (!point) { - return; - } + //m_svg.createPath(objName, pathValue.join(''), { + // "id": objName + //}, style); - var xPixel = getPixelValueQ(point.X); - var yPixel = getPixelValueH(point.Y); - if (style.offsetPixelX != null) { - xPixel += style.offsetPixelX; - } - if (style.offsetPixelY != null) { - yPixel += style.offsetPixelY; - } + pathValue = temp + .replace('x1', xPixel - xTri / 3) + .replace('y1', yPixel) + .replace('x2', xPixel) + .replace('y2', yPixel + yTri / 3); + m_svg.createPath( + 'DesignPointWater4', + pathValue, + { + //"class": "DesignPoint1", + tag: 'DesignPoint1', + }, + style + ); - var textStyle = "user-select:none;stroke-width:1px;"; // fill-opacity:0.9; + pathValue = temp + .replace('x1', xPixel - (xTri * 2) / 3) + .replace('y1', yPixel) + .replace('x2', xPixel) + .replace('y2', yPixel + (yTri * 2) / 3); + m_svg.createPath( + 'DesignPointWater5', + pathValue, + { + //"class": "DesignPoint1", + tag: 'DesignPoint1', + }, + style + ); + } else { + //鍗佸瓧绾� + var x = defaultDp.X; + var y = defaultDp.Y; + var point1 = { X: x, Y: y * m_designPointTolerance[2] }; + var point2 = { X: x, Y: y * m_designPointTolerance[3] }; + createLineQH('DesignPointWater1', point1, point2, 3, 'red', 'DesignPoint1'); - if (style.color != null) { - textStyle += " fill:" + style.color + ";"; - } else { - textStyle += " fill:#000000;"; - } - var textHeight = 12; - if (style.size != null) { - textHeight = style.size; - textStyle += " font-size:" + style.size + "px;"; - } else { - textStyle += " font-size:12px;"; - } + point1 = { X: x * m_designPointTolerance[0], Y: y }; + point2 = { X: x * m_designPointTolerance[1], Y: y }; + createLineQH('DesignPointWater2', point1, point2, 3, 'red', 'DesignPoint1'); + } + }; + //鍒锋柊鍖哄煙鐐逛綅缃� + var refreshRegionPtPosi = function (grp_pt, tag) { + // console.log(m_chartObject, grp_pt, tag); + if (tag == null) return; - if (style.anchor != null) { - textStyle += " text-anchor:" + style.anchor + ";"; - } - // - if (style.textAligment == 0) { - //Right 鏂囧瓧瀵归綈 start | middle | end - xPixel += 2; - textStyle += " text-anchor:start;dominant-baseline: middle;"; - } else if (style.textAligment == 1) { - //Bottom - yPixel = yPixel + (textHeight + 2); - textStyle += " text-anchor:middle;"; - } else if (style.textAligment == 2) { - //Left - yPixel = yPixel - 2; - textStyle += " text-anchor:end;dominant-baseline: middle;"; - } else if (style.textAligment == 3) { - //Top - yPixel = yPixel - 5; - textStyle += " text-anchor:middle;"; - } else if (style.textAligment == 4) { - //TopLeft - yPixel = yPixel - 5; - textStyle += " text-anchor:start;"; - } + if (tag == 'AllowMaxPointQ' && m_chartPointPara != null) { + m_chartPointPara.AllowMaxPoint = grp_pt; + calcAllowRegionCurve(); + } + if (tag == 'AllowMinPointQ' && m_chartPointPara != null) { + m_chartPointPara.AllowMinPoint = grp_pt; + calcAllowRegionCurve(); + } + if (tag == 'PerferMinPointQ' && m_chartPointPara != null) { + m_chartPointPara.PerferMinPoint = grp_pt; + calcPerferRegionCurve(); + } + if (tag == 'PerferMaxPointQ' && m_chartPointPara != null) { + m_chartPointPara.PerferMaxPoint = grp_pt; + calcPerferRegionCurve(); + } + }; + //缁樺埗 鍏佽鍖哄煙 + var calcAllowRegionCurve = function () { + var regionBlodCurveQHAllow = document.getElementById('RegionBlodCurveQH_Allow'); + if (regionBlodCurveQHAllow) { + regionBlodCurveQHAllow.parentNode.removeChild(regionBlodCurveQHAllow); + } + var regionBlodCurveQPAllow = document.getElementById('RegionBlodCurveQP_Allow'); + if (regionBlodCurveQPAllow) { + regionBlodCurveQPAllow.parentNode.removeChild(regionBlodCurveQPAllow); + } + var regionBlodCurveQEAllow = document.getElementById('RegionBlodCurveQE_Allow'); + if (regionBlodCurveQEAllow) { + regionBlodCurveQEAllow.parentNode.removeChild(regionBlodCurveQEAllow); + } + var regionBlodCurveNPSHAllow = document.getElementById('RegionBlodCurveNPSH_Allow'); + if (regionBlodCurveNPSHAllow) { + regionBlodCurveNPSHAllow.parentNode.removeChild(regionBlodCurveNPSHAllow); + } - if (style.fontWeight != null) { - textStyle += " font-weight:" + style.fontWeight + ";"; - } + if (m_chartPointPara == null) return; - var opacity = 0.5; - if (style.opacity != null) { - opacity = style.opacity; - } + if (m_wrkCurveGrp == null) return; + if (m_wrkCurveGrp.PixelQH == null) return; - return m_svg.createText( - { - id: elementName, - opacity: opacity, - y: yPixel, - x: xPixel, - }, - textStyle, - content - ); - }; - //缁樺埗鏂囧瓧 textAnchor 鏂囧瓧瀵归綈 start | middle | end - var drawTextByQP = function (elementName, content, point, style) { - if (!content) { - return; - } - if (!point) { - return; - } - var xPixel = getPixelValueQ(point.X); - var yPixel = getPixelValueP(point.Y); - if (style.offsetPixelX != null) { - xPixel += style.offsetPixelX; - } - if (style.offsetPixelY != null) { - yPixel += style.offsetPixelY; - } + if (m_chartPointPara.AllowMaxPoint == null) return; + if (m_chartPointPara.AllowMinPoint == null) return; + // console.log("AllowRegionPoint",m_chartPointPara.AllowMaxPoint,m_chartPointPara.AllowMinPoint); + if (!m_chartPointPara.AllowRegionInChartVisible) { + return; + } + if (m_chartPointPara.AllowRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod) { + //鍔犵矖鏄剧ず - var textStyle = "user-select:none;stroke-width:1px;"; //font-weight:bold; fill-opacity:0.9; + var pt_num = 11; + var space = (m_chartPointPara.AllowMaxPoint.Q - m_chartPointPara.AllowMinPoint.Q) / (pt_num - 1); - if (style.color != null) { - textStyle += " fill:" + style.color + ";"; - } else { - textStyle += " fill:#000000;"; - } - var textHeight = 12; - if (style.size != null) { - textHeight = style.size; - textStyle += " font-size:" + style.size + "px;"; - } else { - textStyle += " font-size:12px;"; - } + var pixelPoints_QH = []; + var pixelPoints_QE = []; + var pixelPoints_QP = []; - if (style.anchor != null) { - textStyle += " text-anchor:" + style.anchor + ";"; - } - if (style.textAligment == 0) { - //Right 鏂囧瓧瀵归綈 start | middle | end - xPixel += 2; - yPixel = yPixel + textHeight / 2; - textStyle += " text-anchor:start;"; - } else if (style.textAligment == 1) { - //Bottom - yPixel = yPixel + (textHeight + 2); - textStyle += " text-anchor:middle;"; - } else if (style.textAligment == 2) { - //Left - xPixel -= 2; - yPixel = yPixel + (textHeight / 2 + 1); - textStyle += " text-anchor:end;"; - } else if (style.textAligment == 3) { - //Top - yPixel = yPixel - 2; - textStyle += " text-anchor:middle;"; - } + for (var i = 0; i < pt_num; i++) { + var q = m_chartPointPara.AllowMinPoint.Q + i * space; + var xPixel = getPixelValueQ(q); - if (style.fontWeight != null) { - textStyle += " font-weight:" + style.fontWeight + ";"; - } + var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); + if (head_pixel_pt != null) pixelPoints_QH.push(head_pixel_pt); + if (m_isDispCurveQE) { + var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); + if (eta_pixel_pt != null) pixelPoints_QE.push(eta_pixel_pt); + } - var opacity = 0.5; - if (style.opacity != null) { - opacity = style.opacity; - } + var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); + if (power_pixel_pt != null) pixelPoints_QP.push(power_pixel_pt); - return m_svg.createText( - { - id: elementName, - opacity: opacity, - y: yPixel, - x: xPixel, - }, - textStyle, - content - ); - }; - //缁樺埗鏂囧瓧 textAnchor 鏂囧瓧瀵归綈 start | middle | end - var drawText_pixel = function ( - curveElementName, - text, - point, - textSize, - textColor, - textAnchor, - textStyle - ) { - if (!text) { - return; - } - if (!point) { - return; - } + //var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); + //if (npsh_pixel_pt != null) + // pixelPoints_NPSH.push(npsh_pixel_pt); + } - var xPixel = point.X; - var yPixel = point.Y; + let pixelPoints_NPSH = []; + if (m_isDispNpsh && m_wrkCurveGrp.PixelNPSH && m_wrkCurveGrp.PixelNPSH.length > 3) { + var min_q = Math.max(getPixelValueQ(m_chartPointPara.AllowMinPoint.Q), m_wrkCurveGrp.PixelNPSH[0].Point0.X); + var max_q = Math.min( + getPixelValueQ(m_chartPointPara.AllowMaxPoint.Q), + m_wrkCurveGrp.PixelNPSH[m_wrkCurveGrp.PixelNPSH.length - 1].Point3.X + ); - if (textStyle == null) textStyle = "user-select:none;"; - //font-weight:bold; fill-opacity:0.9; stroke-width:1px; - else textStyle += "user-select:none;"; + //console.log("PixelNPSH", m_wrkCurveGrp.PixelNPSH[m_wrkCurveGrp.PixelNPSH.length - 1] , getPixelValueQ(m_chartPointPara.AllowMaxPoint.Q), max_q); - if (textColor != null) { - textStyle += " fill:" + textColor + ";"; - } else { - textStyle += " fill:#000000;"; - } - if (textSize != null) { - textStyle += " font-size:" + textSize + "px;"; - } else { - textStyle += " font-size:12px;"; - } - if (textAnchor != null) { - textStyle += " text-anchor:" + textAnchor + ";"; - } - if (curveElementName == null) { - return m_svg.createText( - { - //"opacity": 0.5, - y: yPixel, - x: xPixel, - }, - textStyle, - text - ); - } else { - return m_svg.createText( - { - id: curveElementName, - opacity: 0.5, - y: yPixel, - x: xPixel, - }, - textStyle, - text - ); - } - }; - // - var getSvgObjByName = function (objName) { - return m_svg.getPathByName(objName); - }; - var removeElementById = function (id) { - var obj = document.getElementById(id); - if (obj != null) { - obj.remove(); - } - }; - var hideElementById = function (id) { - var obj = document.getElementById(id); - if (obj != null) { - obj.style.display = "none"; - } - }; - var showElementById = function (id) { - var obj = document.getElementById(id); - if (obj != null) { - obj.style.display = ""; - } - }; - //缁樺埗璁捐鐐�:0 Cross 1 LeftDownHalfCross 2 LeftDownTriangle 3 CrossAnPointCircle 4 PointCircle 5 BlodTriangle - var drawDesignPoint = function () { - if (m_chartObject.DesignPoint4StdUnit == null) return; + space = (max_q - min_q) / (pt_num - 1); + for (let i = 0; i < pt_num; i++) { + let xPixel = min_q + i * space; - removeElementById("DesignPointWater1"); - removeElementById("DesignPointWater2"); - removeElementById("DesignPointWater3"); - removeElementById("DesignPointWater4"); - removeElementById("DesignPointWater5"); + var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); + //console.log(i, xPixel,npsh_pixel_pt); + if (npsh_pixel_pt != null) { + pixelPoints_NPSH.push(npsh_pixel_pt); + } else { + if (i == 0) pixelPoints_NPSH.push(m_wrkCurveGrp.PixelNPSH[0].Point0); + } + } + } - var defaultDp = m_chartObject.DesignPoint4StdUnit; - var dp_color = "red"; - var dispStyleType = m_displayStyle.DesignPointDispType; + //console.log(m_wrkCurveGrp,m_chartPointPara); + createCurveQH_pixel('RegionBlodCurveQH_Allow', pixelPoints_QH, m_displayStyle.BlodRegionCurveWidth); + createCurveQE_pixel('RegionBlodCurveQE_Allow', pixelPoints_QE, m_displayStyle.BlodRegionCurveWidth); + createCurveQP_pixel('RegionBlodCurveQP_Allow', pixelPoints_QP, m_displayStyle.BlodRegionCurveWidth); + createCurveNPSH_pixel('RegionBlodCurveNPSH_Allow', pixelPoints_NPSH, m_displayStyle.BlodRegionCurveWidth); + } else if (m_chartPointPara.AllowRegionDispStyle == ConstParas.ChartRegionDispStyle.Strip) { + // 鏉″甫 + var chartRegionAllowRegionStrip = document.getElementById('ChartRegionAllowRegionStrip'); + if (chartRegionAllowRegionStrip) { + chartRegionAllowRegionStrip.parentNode.removeChild(chartRegionAllowRegionStrip); + } + var xPixel_min_q = getPixelValueQ(m_chartPointPara.AllowMinPoint.Q); + var xPixel_max_q = getPixelValueQ(m_chartPointPara.AllowMaxPoint.Q); - if (dispStyleType == 2) { - //鍊掍笁瑙� + var attr = { + x: xPixel_min_q, + y: m_chartSize.DiagramTop, + width: xPixel_max_q - xPixel_min_q, + height: m_chartSize.DiagramHeight, + }; + var style = { + 'stroke-width': '1', + stroke: 'none', + fill: 'ForestGreen', + 'stroke-opacity': '0.1', + 'fill-opacity': '0.3', + 'shape-rendering': 'geometricPrecision', + 'zIndex:': -1, + }; + m_svg.createRect(attr, style, 'ChartRegionAllowRegionStrip'); + } + }; + //缁樺埗 鏈�浼樺尯鍩� + var calcPerferRegionCurve = function () { + if (m_chartPointPara == null) return; + if (m_wrkCurveGrp == null) return; + if (m_wrkCurveGrp.PixelQH == null) return; + if (m_chartPointPara.PerferMaxPoint == null) return; + if (m_chartPointPara.PerferMinPoint == null) return; - var xPixel = getPixelValueQ(defaultDp.X); - var yPixel = getPixelValueH(defaultDp.Y); + if (!m_chartPointPara.PerferRegionInChartVisible) { + return; + } + if (m_chartPointPara.PerferRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod) { + //鍔犵矖鏄剧ず - var xTri = m_chartSize.DiagramWidth / 20; - var yTri = xTri / 2; - var style = { - "stroke-width": "2px", - stroke: dp_color, - fill: "none", - "fill-opacity": "0.5", - //"stroke-dasharray":"5 3", - "shape-rendering": "geometricPrecision", - "zIndex:": 18, - }; + var pt_num = 11; + var space = (m_chartPointPara.PerferMaxPoint.Q - m_chartPointPara.PerferMinPoint.Q) / (pt_num - 1); - var temp = "M x1 y1 L x2 y2"; - var pathValue = temp - .replace("x1", xPixel) - .replace("y1", yPixel) - .replace("x2", xPixel - xTri) - .replace("y2", yPixel); - m_svg.createPath( - "DesignPointWater1", - pathValue, - { - tag: "DesignPoint1", - }, - style - ); - pathValue = temp - .replace("x1", xPixel) - .replace("y1", yPixel) - .replace("x2", xPixel) - .replace("y2", yPixel + yTri); - m_svg.createPath( - "DesignPointWater2", - pathValue, - { - tag: "DesignPoint1", - }, - style - ); - pathValue = temp - .replace("x1", xPixel - xTri) - .replace("y1", yPixel) - .replace("x2", xPixel) - .replace("y2", yPixel + yTri); - m_svg.createPath( - "DesignPointWater3", - pathValue, - { - tag: "DesignPoint1", - }, - style - ); + var pixelPoints_QH = []; + var pixelPoints_QE = []; + var pixelPoints_QP = []; + let pixelPoints_NPSH = []; - pathValue = temp - .replace("x1", xPixel - xTri / 3) - .replace("y1", yPixel) - .replace("x2", xPixel) - .replace("y2", yPixel + yTri / 3); - m_svg.createPath( - "DesignPointWater4", - pathValue, - { - tag: "DesignPoint1", - }, - style - ); + for (var i = 0; i < pt_num; i++) { + var q = m_chartPointPara.PerferMinPoint.Q + i * space; + var xPixel = getPixelValueQ(q); - pathValue = temp - .replace("x1", xPixel - (xTri * 2) / 3) - .replace("y1", yPixel) - .replace("x2", xPixel) - .replace("y2", yPixel + (yTri * 2) / 3); - m_svg.createPath( - "DesignPointWater5", - pathValue, - { - tag: "DesignPoint1", - }, - style - ); - } else if (dispStyleType == 4) { - //鍦嗙偣 - var attr_pt = { - cx: getPixelValueQ(defaultDp.X), - cy: getPixelValueH(defaultDp.Y), - r: 6, - }; - var style_pt = { - "stroke-width": "2px", - stroke: "none", - fill: dp_color, - "fill-opacity": "0.5", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; + var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); + if (head_pixel_pt != null) pixelPoints_QH.push(head_pixel_pt); + if (m_isDispCurveQE) { + var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); + if (eta_pixel_pt != null) pixelPoints_QE.push(eta_pixel_pt); + } - m_svg.createCircle("DesignPointWater1", attr_pt, style_pt); - } else if (dispStyleType == 5) { - //鍔犵矖涓夎 + var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); + if (power_pixel_pt != null) pixelPoints_QP.push(power_pixel_pt); + } - var xPixel = getPixelValueQ(defaultDp.X); - var yPixel = getPixelValueH(defaultDp.Y); - var attr1 = { - id: "DesignPointWater1", - x: xPixel - 20, - y: yPixel, - width: 20, - height: 6, - }; - var attr2 = { - id: "DesignPointWater2", - x: xPixel - 6, - y: yPixel, - width: 6, - height: 20, - }; - var style1 = { - "stroke-width": "1", - stroke: "none", - fill: dp_color, - //"stroke-opacity": '0.1', - //"fill-opacity": "0.3", - "shape-rendering": "geometricPrecision", - "zIndex:": -1, - }; - m_svg.createRect(attr1, style1, "DesignPointWater1"); - m_svg.createRect(attr2, style1, "DesignPointWater2"); - } else { - //鍗佸瓧绾� - var x = defaultDp.X; - var y = defaultDp.Y; - var point1 = { X: x, Y: y * m_designPointTolerance[2] }; - var point2 = { X: x, Y: y * m_designPointTolerance[3] }; - createLineQH( - "DesignPointWater1", - point1, - point2, - 3, - dp_color, - "DesignPoint1" - ); + if (m_isDispNpsh && m_wrkCurveGrp.PixelNPSH && m_wrkCurveGrp.PixelNPSH.length > 3) { + var min_q = Math.max(getPixelValueQ(m_chartPointPara.PerferMinPoint.Q), m_wrkCurveGrp.PixelNPSH[0].Point0.X); + var max_q = Math.min( + getPixelValueQ(m_chartPointPara.PerferMaxPoint.Q), + m_wrkCurveGrp.PixelNPSH[m_wrkCurveGrp.PixelNPSH.length - 1].Point3.X + ); + //console.log("PixelNPSH", m_wrkCurveGrp.PixelNPSH[0] , getPixelValueQ(m_chartPointPara.AllowMinPoint.Q), min_q); + space = (max_q - min_q) / (pt_num - 1); + for (let i = 0; i < pt_num; i++) { + let xPixel = min_q + i * space; - point1 = { X: x * m_designPointTolerance[0], Y: y }; - point2 = { X: x * m_designPointTolerance[1], Y: y }; - createLineQH( - "DesignPointWater2", - point1, - point2, - 3, - dp_color, - "DesignPoint1" - ); - } - }; - //缁樺埗宸ヤ綔鐐� - var drawWorkPoint = function () { - removeElementById("RealWorkPointQH"); - removeElementById("RealWorkPointQE"); - removeElementById("RealWorkPointQP"); - removeElementById("RealWorkPointQNPSH"); + var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); + if (npsh_pixel_pt != null) pixelPoints_NPSH.push(npsh_pixel_pt); + else { + if (i == 0) pixelPoints_NPSH.push(m_wrkCurveGrp.PixelNPSH[0].Point0); + else console.log(xPixel); + } + } + } + var regionBlodCurveQHPerfer = document.getElementById('RegionBlodCurveQH_Perfer'); + if (regionBlodCurveQHPerfer) { + regionBlodCurveQHPerfer.parentNode.removeChild(regionBlodCurveQHPerfer); + } + var regionBlodCurveQPPerfer = document.getElementById('RegionBlodCurveQP_Perfer'); + if (regionBlodCurveQPPerfer) { + regionBlodCurveQPPerfer.parentNode.removeChild(regionBlodCurveQPPerfer); + } + var regionBlodCurveQEPerfer = document.getElementById('RegionBlodCurveQE_Perfer'); + if (regionBlodCurveQEPerfer) { + regionBlodCurveQEPerfer.parentNode.removeChild(regionBlodCurveQEPerfer); + } + var regionBlodCurveNPSHPerfer = document.getElementById('RegionBlodCurveNPSH_Perfer'); + if (regionBlodCurveNPSHPerfer) { + regionBlodCurveNPSHPerfer.parentNode.removeChild(regionBlodCurveNPSHPerfer); + } - if (m_chartObject.DesignPoint4StdUnit == null || m_chartObject.JieZhiWorkPoint == null) return; + createCurveQH_pixel('RegionBlodCurveQH_Perfer', pixelPoints_QH, m_displayStyle.BlodRegionCurveWidth); + createCurveQE_pixel('RegionBlodCurveQE_Perfer', pixelPoints_QE, m_displayStyle.BlodRegionCurveWidth); + createCurveQP_pixel('RegionBlodCurveQP_Perfer', pixelPoints_QP, m_displayStyle.BlodRegionCurveWidth); + createCurveNPSH_pixel('RegionBlodCurveNPSH_Perfer', pixelPoints_NPSH, m_displayStyle.BlodRegionCurveWidth); + } else if (m_chartPointPara.PerferRegionDispStyle == ConstParas.ChartRegionDispStyle.Strip) { + // 鏉″甫 + var chartRegionPerferRegionStrip = document.getElementById('ChartRegionPerferRegionStrip'); + if (chartRegionPerferRegionStrip) { + chartRegionPerferRegionStrip.parentNode.removeChild(chartRegionPerferRegionStrip); + } + var xPixel_min_q = getPixelValueQ(m_chartPointPara.PerferMinPoint.Q); + var xPixel_max_q = getPixelValueQ(m_chartPointPara.PerferMaxPoint.Q); + var attr = { + x: xPixel_min_q, + y: m_chartSize.DiagramTop, + width: xPixel_max_q - xPixel_min_q, + height: m_chartSize.DiagramHeight, + }; + var style = { + 'stroke-width': '1', + stroke: 'none', + fill: 'ForestGreen', + 'stroke-opacity': '0.1', + 'fill-opacity': '0.3', + 'shape-rendering': 'geometricPrecision', + 'zIndex:': -1, + }; + m_svg.createRect(attr, style, 'ChartRegionPerferRegionStrip'); + } + }; + //缁樺埗鏇茬嚎(娴侀噺鏁堢巼) + var createCurveQE = function (curveElementName, points, curveWidth, curveColor, curveIsDisp, curveDashType) { + if (points == null) { + return null; + } + if (curveElementName == null) { + return null; + } + var point_num = points.length; + if (point_num < 3) return; + if (curveElementName == 'RegionBlodCurveQE_Allow') { + console.log('') + } else if (curveElementName == 'PerferBlodCurveQE_Allow') { + console.log('') + } else { + if (points[0].X < points[point_num - 1].X * 0.01 && points[0].Y < 10) { + //寮哄埗褰掗浂 + points[0].X = 0; + points[0].Y = 0; + } + } + var pixelPoints = []; + //console.log(points[0]); + for (var v = 0; v < point_num; v++) { + var pt = points[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueE(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } - if (m_chartObject.JieZhiWorkPoint.Q < 0.1) - return; + return createCurveQE_pixel(curveElementName, pixelPoints, curveWidth, curveColor, curveIsDisp, curveDashType); + }; + //缁樺埗鏇茬嚎(娴侀噺鏁堢巼) : 鍍忕礌鐐� + var createCurveQE_pixel = function (curveElementName, pixelPoints, curveWidth, curveColor, isDisp, curveDashType) { + if (pixelPoints == null || pixelPoints.length < 3) { + return null; + } + if (curveElementName == null) { + return null; + } + var pathValue = transBezierCurveToPath(pixelPoints); + if (pathValue == null || pathValue == undefined) return null; + //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 + if (pathValue.toString().indexOf('M ,NaN, ,NaN') == 0) { + return null; + } + var style = { + 'stroke-width': '2px', + stroke: m_displayStyle.ColorE, + fill: 'none', + 'fill-opacity': '0.5', + //"stroke-dasharray":"5 3", + 'shape-rendering': 'geometricPrecision', + 'zIndex:': 7, + }; + if (curveWidth != null) { + style['stroke-width'] = curveWidth; + } + if (curveColor != null) { + style['stroke'] = curveColor; + } - var dp_color = "Purple"; - var dp_radial = 5; + if (curveDashType != null) { + style['stroke-dasharray'] = curveDashType; //'10, 10';//'10, 10, 5, 5' + } - var style_pt = { - "stroke-width": "2px", - stroke: "none", - fill: dp_color, - //"fill-opacity": "0.5", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - //鍦嗙偣 - var pixel_flow = getPixelValueQ(m_chartObject.JieZhiWorkPoint.Q); + m_svg.createPath( + curveElementName, + pathValue.join(''), + { + id: curveElementName, + }, + style + ); + if (isDisp != null && !isDisp) { + document.getElementById(curveElementName).style.display = 'none'; + } + return pixelPoints; + }; + //缁樺埗鏇茬嚎(娴侀噺鍔熺巼) + var createCurveQP = function (curveElementName, points, curveWidth, curveColor, curveIsDisp, curveDashType) { + if (points == null) { + return null; + } + if (curveElementName == null) { + return null; + } - var attr_pt_qh = { - cx: pixel_flow, - cy: getPixelValueH(m_chartObject.JieZhiWorkPoint.H), - r: dp_radial - }; - m_svg.createCircle("RealWorkPointQH", attr_pt_qh, style_pt); + var pixelPoints = []; + for (var v = 0; v < points.length; v++) { + var pt = points[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueP(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } + return createCurveQP_pixel(curveElementName, pixelPoints, curveWidth, curveColor, curveIsDisp, curveDashType); + }; + //缁樺埗鏇茬嚎(娴侀噺鍔熺巼) : 鍍忕礌鐐� + var createCurveQP_pixel = function (curveElementName, pixelPoints, curveWidth, curveColor, curveIsDisp, curveDashType) { + if (pixelPoints == null || pixelPoints.length < 3) { + return null; + } + if (curveElementName == null) { + return null; + } + var pathValue = transBezierCurveToPath(pixelPoints); + if (pathValue == null || pathValue == undefined) return null; + //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 + if (pathValue.toString().indexOf('M ,NaN, ,NaN') == 0) { + return null; + } + var style = { + 'stroke-width': '2px', + stroke: m_displayStyle.ColorP, + fill: 'none', + 'fill-opacity': '0.5', + //"stroke-dasharray":"5 3", + 'shape-rendering': 'geometricPrecision', + 'zIndex:': 7, + }; + if (curveWidth != null) { + style['stroke-width'] = curveWidth; + } + if (curveColor != null) { + style['stroke'] = curveColor; + } + //m_svg.createPath(curveElementName, pathValue.join(''), { + // "id": curveElementName + //}, style); + if (curveDashType != null) { + style['stroke-dasharray'] = curveDashType; //'10, 10';//'10, 10, 5, 5' + } + m_svg.createPath( + curveElementName, + pathValue.join(''), + { + id: curveElementName, + }, + style + ); + if (curveIsDisp != null && !curveIsDisp) { + document.getElementById(curveElementName).style.display = 'none'; + } - if (m_isDispCurveQE) { - var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, pixel_flow); - var pixel_eta = getPixelValueE(m_chartObject.JieZhiWorkPoint.E); - if (Math.abs(pixel_eta - eta_pixel_pt.Y) < 5) {//宸窛杩囧ぇ灏变笉鏄剧ず, 闇�瑕佸悗鍙板鐞� - var attr_pt_qe = { - cx: pixel_flow, - cy: pixel_eta, - r: dp_radial - }; + return pixelPoints; + }; + //缁樺埗鏇茬嚎(娴侀噺姹借殌) + var createCurveNPSH = function (curveElementName, points, curveWidth, curveColor, curveIsDisp, curveDashType) { + if (points == null || m_coordinatePara.SpaceNPSH < 0.02) { + return null; + } + if (curveElementName == null) { + return null; + } - m_svg.createCircle("RealWorkPointQE", attr_pt_qe, style_pt); - } - } + var pixelPoints = []; + for (var v = 0; v < points.length; v++) { + var pt = points[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueNPSH(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } + return createCurveNPSH_pixel(curveElementName, pixelPoints, curveWidth, curveColor, curveIsDisp, curveDashType); + }; + //缁樺埗鏇茬嚎(娴侀噺鍔熺巼) : 鍍忕礌鐐� + var createCurveNPSH_pixel = function (curveElementName, pixelPoints, curveWidth, curveColor, curveIsDisp, curveDashType) { + if (pixelPoints == null || pixelPoints.length < 3) { + return null; + } + if (curveElementName == null) { + return null; + } + var pathValue = transBezierCurveToPath(pixelPoints); + if (pathValue == null || pathValue == undefined) return; + //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 + if (pathValue.toString().indexOf('M ,NaN, ,NaN') == 0) { + return; + } + var style = { + 'stroke-width': '2px', + stroke: m_displayStyle.ColorNPSH, + fill: 'none', + 'fill-opacity': '0.5', + //"stroke-dasharray":"5 3", + 'shape-rendering': 'geometricPrecision', + 'zIndex:': 7, + }; + if (curveWidth != null) { + style['stroke-width'] = curveWidth; + } + if (curveColor != null) { + style['stroke'] = curveColor; + } + if (curveDashType != null) { + style['stroke-dasharray'] = curveDashType; //'10, 10';//'10, 10, 5, 5' + } + m_svg.createPath( + curveElementName, + pathValue.join(''), + { + id: curveElementName, + }, + style + ); + if (curveIsDisp != null && !curveIsDisp) { + document.getElementById(curveElementName).style.display = 'none'; + } + }; + //娓呯悊 + var ClearCurveElement = function () { + var elements = [ + 'SimJieZhiCurveQH', + 'SimJieZhiCurveQE', + 'SimJieZhiCurveQP', + 'SimJieZhiCurveNPSH', + 'SimWaterCurveQH', + 'SimWaterCurveQE', + 'SimWaterCurveQP', + 'SimWaterCurveNPSH', + 'MaxWaterCurveQH', + 'MaxWaterCurveQE', + 'MaxWaterCurveQP', + 'MaxWaterCurveNPSH', + 'MaxD2Text', + 'WrkD2Text', + 'RegionBlodCurveQH_Allow', + 'RegionBlodCurveQP_Allow', + 'RegionBlodCurveQE_Allow', + 'RegionBlodCurveNPSH_Allow', + 'PerferBlodCurveQH_Allow', + 'PerferBlodCurveQP_Allow', + 'PerferBlodCurveQE_Allow', + 'PerferBlodCurveNPSH_Allow', + 'DesignPointWater1', + 'DesignPointWater2', + ]; - if (m_isDispCurveQP) { - var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, pixel_flow); - var pixel_power = getPixelValueP(m_chartObject.JieZhiWorkPoint.P); - if (Math.abs(pixel_power - power_pixel_pt.Y) < 5) { - var attr_pt_qp = { - cx: pixel_flow, - cy: pixel_power, - r: dp_radial - }; + elements.forEach(function (id) { + var element = document.getElementById(id); + if (element) { + element.parentNode.removeChild(element); + } + }); + }; - m_svg.createCircle("RealWorkPointQP", attr_pt_qp, style_pt); - } - } + //鍒濆鍖栧伐浣滄洸绾� + var intitalWrkCurveInfo = function () { + m_wrkCurveGrp = {}; + //console.log(m_chartObject) + if (m_chartObject.SimJieZhiCurveQH != null) { + m_wrkCurveGrp = { + RealQH: m_chartObject.SimJieZhiCurveQH, + RealQE: m_chartObject.SimJieZhiCurveQE, + RealQP: m_chartObject.SimJieZhiCurveQP, + RealNPSH: m_chartObject.SimJieZhiCurveNPSH, + }; + } else if (m_chartObject.SimWaterCurveQH != null) { + m_wrkCurveGrp = { + RealQH: m_chartObject.SimWaterCurveQH, + RealQE: m_chartObject.SimWaterCurveQE, + RealQP: m_chartObject.SimWaterCurveQP, + RealNPSH: m_chartObject.SimWaterCurveNPSH, + }; + } else if (m_chartObject.MaxWaterCurveQH != null) { + m_wrkCurveGrp = { + RealQH: m_chartObject.MaxWaterCurveQH, + RealQE: m_chartObject.MaxWaterCurveQE, + RealQP: m_chartObject.MaxWaterCurveQP, + RealNPSH: m_chartObject.MaxWaterCurveNPSH, + }; + } else { + return null; + } - if (m_chartObject.JieZhiWorkPoint.NPSH > 0.01) { - var attr_pt_qp = { - cx: pixel_flow, - cy: getPixelValueNPSH(m_chartObject.JieZhiWorkPoint.NPSH), - r: dp_radial - }; + //閫氱煡澶栭儴 + if (m_changeWrkCurveCb != null) { + m_changeWrkCurveCb(m_wrkCurveGrp); + } + //console.log(m_wrkCurveGrp,m_changeWrkCurveCb) + // + var pixelPoints = []; + if (m_wrkCurveGrp.RealQH != null) { + for (var v = 0; v < m_wrkCurveGrp.RealQH.length; v++) { + var pt = m_wrkCurveGrp.RealQH[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueH(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } + } - m_svg.createCircle("RealWorkPointQNPSH", attr_pt_qp, style_pt); - } + m_wrkCurveGrp.PixelQH = transBezierCurveModel(pixelPoints); - }; + pixelPoints = []; + if (m_wrkCurveGrp.RealQE != null) { + for (var v = 0; v < m_wrkCurveGrp.RealQE.length; v++) { + var pt = m_wrkCurveGrp.RealQE[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueE(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } + } - //缁樺埗娑堥槻娉电殑鐐� - var drawFirePumpPoint = function () { - if (m_chartPointPara.Percent150Pt == null) return; - removeElementById("Percent150Pt1"); + m_wrkCurveGrp.PixelQE = transBezierCurveModel(pixelPoints); - var attr_pt = { - cx: getPixelValueQ(m_chartPointPara.Percent150Pt.Q), - cy: getPixelValueH(m_chartPointPara.Percent150Pt.H), - r: 6, - }; - var dp_color = "red"; - var style_pt = { - "stroke-width": "2px", - stroke: "none", - fill: dp_color, - "fill-opacity": "0.9", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; + pixelPoints = []; + if (m_wrkCurveGrp.RealQP != null) { + for (var v = 0; v < m_wrkCurveGrp.RealQP.length; v++) { + var pt = m_wrkCurveGrp.RealQP[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueP(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } + } + m_wrkCurveGrp.PixelQP = transBezierCurveModel(pixelPoints); - m_svg.createCircle("Percent150Pt1", attr_pt, style_pt); - }; - //鍒锋柊鍖哄煙鐐逛綅缃� - var refreshRegionPtPosi = function (grp_pt, tag) { + if (m_wrkCurveGrp.RealNPSH != null && m_wrkCurveGrp.RealNPSH.length > 3) { + pixelPoints = []; + for (var v = 0; v < m_wrkCurveGrp.RealNPSH.length; v++) { + var pt = m_wrkCurveGrp.RealNPSH[v]; + var x = getPixelValueQ(pt.X); + var y = getPixelValueNPSH(pt.Y); + pixelPoints.push({ X: x, Y: y }); + } + m_wrkCurveGrp.PixelNPSH = transBezierCurveModel(pixelPoints); + } + }; - if (tag == null) return; + //缁樺埗 瀛愬垏鍓茬嚎 + var drawSubSimuCurveList = function () { + // + if (m_chartObject.SpectrumList != null) { + for (var i = 0; i < m_chartObject.SpectrumList.length; i++) { + var subSpectrumCurve = m_chartObject.SpectrumList[i]; - if (tag == "AllowMaxPointQ" && m_chartPointPara != null) { - m_chartPointPara.AllowMaxPoint = grp_pt; - calcAllowRegionCurve(); - } - if (tag == "AllowMinPointQ" && m_chartPointPara != null) { - m_chartPointPara.AllowMinPoint = grp_pt; - calcAllowRegionCurve(); - } - if (tag == "PerferMinPointQ" && m_chartPointPara != null) { - m_chartPointPara.PerferMinPoint = grp_pt; - calcPerferRegionCurve(); - } - if (tag == "PerferMaxPointQ" && m_chartPointPara != null) { - m_chartPointPara.PerferMaxPoint = grp_pt; - calcPerferRegionCurve(); - } - }; - //缁樺埗 鍏佽鍖哄煙 - var calcAllowRegionCurve = function () { - removeElementById("RegionBlodCurveQH_Allow"); - removeElementById("RegionBlodCurveQP_Allow"); - removeElementById("RegionBlodCurveQE_Allow"); - removeElementById("RegionBlodCurveNPSH_Allow"); + createCurveQH('SpectrumList' + i, subSpectrumCurve.QH, 1); + if (m_displayStyle.IsDispCurveLabel) { + if (subSpectrumCurve.CurveName == null || subSpectrumCurve.CurveName == '') { + //if (m_d2IsMeter) { + // drawTextByQH("SpectrumListText" + i, subSpectrumCurve.CurvePara + "mm", subSpectrumCurve.QH[0], m_displayStyle.FeatCurveSize,m_displayStyle.ColorH, 6, 5, "start"); + //} + //else { + // drawTextByQH("SpectrumListText" + i, (subSpectrumCurve.CurvePara / 25.4).toFixed(2) + "\"", subSpectrumCurve.QH[0], m_displayStyle.FeatCurveSize,m_displayStyle.ColorH, 6, 5, "start"); + //} + drawTextByQH( + 'SpectrumListText' + i, + UnitHelper.getDispValueLength(subSpectrumCurve.CurvePara, m_d2IsMeter, true), + subSpectrumCurve.QH[0], + m_displayStyle.FeatCurveSize, + m_displayStyle.ColorH, + 6, + 5, + 'start' + ); + } else { + drawTextByQH( + 'SpectrumListText' + i, + subSpectrumCurve.CurveName, + subSpectrumCurve.QH[0], + m_displayStyle.FeatCurveSize, + m_displayStyle.ColorH, + 6, + 5, + 'start' + ); + } + } + } + } + }; + //缁樺埗绛夋晥绾� + var drawEquepEtaCurveList = function () { + // + if (m_chartObject.EqualParaCurvesE != null) { + for (var i = 0; i < m_chartObject.EqualParaCurvesE.length; i++) { + var points = m_chartObject.EqualParaCurvesE[i].PointInfo; + if (points.length >= 4) { + //鏇茬嚎 + createCurveQH('EqualParaCurvesE' + i, points, 1, m_displayStyle.ColorEqualParaCurvesE); + drawTextByQH( + 'EqualParaCurvesEText' + i, + m_chartObject.EqualParaCurvesE[i].CurvePara + '%', + points[0], + m_displayStyle.EqualCurveSize, + m_displayStyle.ColorEqualParaCurvesE, + 2, + 6, + 'middle' + ); + } else if (points.length == 2 || points.length == 3) { + //鐩寸嚎 + createLineQH('EqualParaCurvesE' + i, points[0], points[1], 1, m_displayStyle.ColorEqualParaCurvesE); + drawTextByQH( + 'EqualParaCurvesEText' + i, + m_chartObject.EqualParaCurvesE[i].CurvePara + '%', + points[0], + m_displayStyle.EqualCurveSize, + m_displayStyle.ColorEqualParaCurvesE, + 2, + 6, + 'middle' + ); + } else if (points.length == 1) { + createPointQH('EqualParaCurvesE' + i, points[0], 3, m_displayStyle.ColorEqualParaCurvesE); + drawTextByQH( + 'EqualParaCurvesEText' + i, + m_chartObject.EqualParaCurvesE[i].CurvePara + '%', + points[0], + m_displayStyle.EqualCurveSize, + m_displayStyle.ColorEqualParaCurvesE, + 2, + 6, + 'middle' + ); + } + } + } + }; + //鍒囧壊,鍏ㄩ儴 + var drawAllCurve_Cut_Full = function () { + var maxCurveWidth = 2; + if (m_chartObject.SimWaterCurveQH != null) { + maxCurveWidth = 1; + } + var simuWaterCurveWidth = 2; + if (m_chartObject.SimJieZhiCurveQH != null) { + simuWaterCurveWidth = 1; + } + // + var curveMaxPathQH = createCurveQH('MaxWaterCurveQH', m_chartObject.MaxWaterCurveQH, maxCurveWidth); + if (m_pumpInfo.MaxD2 != null && m_pumpInfo.MaxD2 > 1 && m_displayStyle.IsDispCurveLabel) { + //鍙惰疆鐩村緞(鏈�澶�) + drawTextByQH( + 'MaxD2Text', + UnitHelper.getDispValueLength(m_pumpInfo.MaxD2, m_d2IsMeter, true), + m_chartObject.MaxWaterCurveQH[0], + m_displayStyle.FeatCurveSize, + m_displayStyle.ColorH, + 6, + 5 + ); + } + // + createCurveQH('MinWaterCurveQH', m_chartObject.MinWaterCurveQH, 1); + if (m_chartObject.MinWaterCurveQH != null && m_displayStyle.IsDispCurveLabel && m_pumpInfo.MinD2) { + //鍙惰疆鐩村緞(鏈�灏�) + drawTextByQH( + 'MinD2Text', + UnitHelper.getDispValueLength(m_pumpInfo.MinD2, m_d2IsMeter, true), + m_chartObject.MinWaterCurveQH[0], + m_displayStyle.FeatCurveSize, + m_displayStyle.ColorH, + 6, + 5 + ); + } + // + var curveSimuPathQH = createCurveQH('SimWaterCurveQH', m_chartObject.SimWaterCurveQH, simuWaterCurveWidth); + if (m_chartObject.SimWaterCurveQH != null) { + //鍙惰疆鐩村緞 + if (Math.abs(m_pumpInfo.WrkD2 - m_pumpInfo.MaxD2) > 5) { + drawTextByQH( + 'WrkD2Text', + UnitHelper.getDispValueLength(m_pumpInfo.WrkD2, m_d2IsMeter, true), + m_chartObject.SimWaterCurveQH[0], + 12, + m_displayStyle.ColorH, + 10, + 5 + ); + } + } - if (m_chartPointPara == null) return; + //鏁堢巼 + if (m_isDispCurveQE) { + if (m_chartObject.SimWaterCurveQE) createCurveQE('SimWaterCurveQE', m_chartObject.SimWaterCurveQE, simuWaterCurveWidth); + else if (m_chartObject.MaxWaterCurveQE) createCurveQE('MaxWaterCurveQE', m_chartObject.MaxWaterCurveQE, maxCurveWidth); + //鏆傛椂涓嶆樉绀� + //createCurveQE("MinWaterCurveQE", m_chartObject.MinWaterCurveQE, 1); + } - if (m_wrkCurveGrp == null) return; - if (m_wrkCurveGrp.PixelQH == null) return; + //鍔熺巼 + if (m_chartObject.SimWaterCurveQP) createCurveQP('SimWaterCurveQP', m_chartObject.SimWaterCurveQP, simuWaterCurveWidth); + else if (m_chartObject.MaxWaterCurveQP) createCurveQP('MaxWaterCurveQP', m_chartObject.MaxWaterCurveQP, maxCurveWidth); + //createCurveQP("MinWaterCurveQP", m_chartObject.MinWaterCurveQP, 1); - if (m_chartPointPara.AllowMaxPoint == null) return; - if (m_chartPointPara.AllowMinPoint == null) return; + if (m_chartObject.SimWaterCurveNPSH) createCurveNPSH('SimWaterCurveNPSH', m_chartObject.SimWaterCurveNPSH, simuWaterCurveWidth); + else if (m_chartObject.MaxWaterCurveNPSH) createCurveNPSH('MaxWaterCurveNPSH', m_chartObject.MaxWaterCurveNPSH, maxCurveWidth); + //createCurveNPSH("MinWaterCurveNPSH", m_chartObject.MinWaterCurveNPSH, 1); - if (!m_chartPointPara.AllowRegionInChartVisible) { - return; - } + if (m_chartObject.SimJieZhiCurveQH != null) { + createCurveQH('SimJieZhiCurveQH', m_chartObject.SimJieZhiCurveQH, 1, null, true, '10, 10'); + if (m_isDispCurveQE) createCurveQE('SimJieZhiCurveQE', m_chartObject.SimJieZhiCurveQE, 1, null, true, '10, 10'); + createCurveQP('SimJieZhiCurveQP', m_chartObject.SimJieZhiCurveQP, 1, null, true, '10, 10'); + } - if ( - m_chartPointPara.AllowRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - //鍔犵矖鏄剧ず + //鍒濆鍖栧伐浣滄洸绾� + intitalWrkCurveInfo(); - var pt_num = 11; - var space = - (m_chartPointPara.AllowMaxPoint.Q - m_chartPointPara.AllowMinPoint.Q) / - (pt_num - 1); + //缁樺埗鍖哄煙 + calcAllowRegionCurve(); + calcPerferRegionCurve(); + }; + //鍒囧壊,宸ヤ綔鏇茬嚎 + var drawAllCurve_Cut_Wrk = function () { + // console.log(m_chartObject,m_chartPointPara) + var fullCurveWidth = 2; + if ( + m_chartPointPara.AllowRegionInChartVisible == true || + m_chartPointPara.AllowRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + fullCurveWidth = 1; + } + if ( + m_chartPointPara.PerferRegionInChartVisible == true || + m_chartPointPara.PerferRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + fullCurveWidth = 1; + } - var pixelPoints_QH = []; - var pixelPoints_QE = []; - var pixelPoints_QP = []; + if (m_chartObject.SimWaterCurveQH != null) { + var curveSimuPathQH = createCurveQH('SimWaterCurveQH', m_chartObject.SimWaterCurveQH, fullCurveWidth); - for (var i = 0; i < pt_num; i++) { - var q = m_chartPointPara.AllowMinPoint.Q + i * space; - var xPixel = getPixelValueQ(q); + //鍙惰疆鐩村緞 + if (m_pumpInfo.WrkD2 != null && m_pumpInfo.WrkD2 > 1 && m_displayStyle.IsDispCurveLabel) { + drawTextByQH( + 'WrkD2Text', + UnitHelper.getDispValueLength(m_pumpInfo.WrkD2, m_d2IsMeter, true), + m_chartObject.SimWaterCurveQH[0], + 12, + m_displayStyle.ColorH, + 10, + 5 + ); + } - var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); - if (head_pixel_pt != null) pixelPoints_QH.push(head_pixel_pt); - if (m_isDispCurveQE) { - var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); - if (eta_pixel_pt != null) pixelPoints_QE.push(eta_pixel_pt); - } - if (m_isDispCurveQP) { - var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); - if (power_pixel_pt != null) pixelPoints_QP.push(power_pixel_pt); - } + if (m_isDispCurveQE) createCurveQE('SimWaterCurveQE', m_chartObject.SimWaterCurveQE, fullCurveWidth); - //var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); - //if (npsh_pixel_pt != null) - // pixelPoints_NPSH.push(npsh_pixel_pt); - } + createCurveQP('SimWaterCurveQP', m_chartObject.SimWaterCurveQP, fullCurveWidth); - var pixelPoints_NPSH = []; - if ( - m_isDispNpsh && - m_wrkCurveGrp.PixelNPSH && - m_wrkCurveGrp.PixelNPSH.length > 3 - ) { - var min_q = Math.max( - getPixelValueQ(m_chartPointPara.AllowMinPoint.Q), - m_wrkCurveGrp.PixelNPSH[0].Point0.X - ); - var max_q = Math.min( - getPixelValueQ(m_chartPointPara.AllowMaxPoint.Q), - m_wrkCurveGrp.PixelNPSH[m_wrkCurveGrp.PixelNPSH.length - 1].Point3.X - ); + createCurveNPSH('SimWaterCurveNPSH', m_chartObject.SimWaterCurveNPSH, fullCurveWidth); - space = (max_q - min_q) / (pt_num - 1); - for (var i = 0; i < pt_num; i++) { - var xPixel = min_q + i * space; + if (m_chartObject.SimJieZhiCurveQH != null) { + createCurveQH('SimJieZhiCurveQH', m_chartObject.SimJieZhiCurveQH, 1, null, true, '10, 10'); + if (m_isDispCurveQE) createCurveQE('SimJieZhiCurveQE', m_chartObject.SimJieZhiCurveQE, 1, null, true, '10, 10'); + createCurveQP('SimJieZhiCurveQP', m_chartObject.SimJieZhiCurveQP, 1, null, true, '10, 10'); + } + } else { + // + var curveMaxPathQH = createCurveQH('MaxWaterCurveQH', m_chartObject.MaxWaterCurveQH, fullCurveWidth); + // + if (m_pumpInfo.WrkD2 != null && m_pumpInfo.WrkD2 > 1 && m_displayStyle.IsDispCurveLabel) { + //鍙惰疆鐩村緞 + drawTextByQH( + 'MaxD2Text', + UnitHelper.getDispValueLength(m_pumpInfo.WrkD2, m_d2IsMeter, true), + m_chartObject.MaxWaterCurveQH[0], + m_displayStyle.FeatCurveSize, + m_displayStyle.ColorH, + 6, + 5 + ); + } - var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); + if (m_isDispCurveQE) { + createCurveQE('MaxWaterCurveQE', m_chartObject.MaxWaterCurveQE, fullCurveWidth); + } - if (npsh_pixel_pt != null) { - pixelPoints_NPSH.push(npsh_pixel_pt); - } else { - if (i == 0) - pixelPoints_NPSH.push(m_wrkCurveGrp.PixelNPSH[0].Point0); - } - } - } + createCurveQP('MaxWaterCurveQP', m_chartObject.MaxWaterCurveQP, fullCurveWidth); - createCurveQH_pixel( - "RegionBlodCurveQH_Allow", - pixelPoints_QH, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQH - ); - createCurveQE_pixel( - "RegionBlodCurveQE_Allow", - pixelPoints_QE, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQE - ); - createCurveQP_pixel( - "RegionBlodCurveQP_Allow", - pixelPoints_QP, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQP - ); - createCurveNPSH_pixel( - "RegionBlodCurveNPSH_Allow", - pixelPoints_NPSH, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQNPSH - ); - } else if ( - m_chartPointPara.AllowRegionDispStyle == - ConstParas.ChartRegionDispStyle.Strip - ) { - // 鏉″甫 - removeElementById("ChartRegionAllowRegionStrip"); - var xPixel_min_q = getPixelValueQ(m_chartPointPara.AllowMinPoint.Q); - var xPixel_max_q = getPixelValueQ(m_chartPointPara.AllowMaxPoint.Q); + createCurveNPSH('MaxWaterCurveNPSH', m_chartObject.MaxWaterCurveNPSH, fullCurveWidth); + } + //鍒濆鍖栧伐浣滄洸绾� + intitalWrkCurveInfo(); - var attr = { - x: xPixel_min_q, - y: m_chartSize.DiagramTop, - width: xPixel_max_q - xPixel_min_q, - height: m_chartSize.UpDiagram.DiagramHeight, - }; - var style = { - "stroke-width": "1", - stroke: "none", - fill: "ForestGreen", - "stroke-opacity": "0.1", - "fill-opacity": "0.3", - "shape-rendering": "geometricPrecision", - "zIndex:": -1, - }; - m_svg.createRect(attr, style, "ChartRegionAllowRegionStrip"); - } - }; - //缁樺埗 鏈�浼樺尯鍩� - var calcPerferRegionCurve = function () { - if (m_chartPointPara == null) return; - if (m_wrkCurveGrp == null) return; - if (m_wrkCurveGrp.PixelQH == null) return; - if (m_chartPointPara.PerferMaxPoint == null) return; - if (m_chartPointPara.PerferMinPoint == null) return; + calcAllowRegionCurve(); + calcPerferRegionCurve(); + }; + //鍙橀,鍏ㄩ儴鏇茬嚎 + var drawAllCurve_Speed_Full = function () { + var fullCurveWidth = 2; + if ( + m_chartPointPara.AllowRegionInChartVisible == true || + m_chartPointPara.AllowRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + fullCurveWidth = 1; + } + if ( + m_chartPointPara.PerferRegionInChartVisible == true || + m_chartPointPara.PerferRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + fullCurveWidth = 1; + } + var curveMaxPathQH = createCurveQH('MaxWaterCurveQH', m_chartObject.MaxWaterCurveQH, fullCurveWidth); + if (m_pumpInfo.Ratedn != null && m_pumpInfo.Ratedn > 1 && m_displayStyle.IsDispCurveLabel) { + //杞�� + drawTextByQH('MaxSpeedText', m_pumpInfo.Ratedn + ' rpm', m_chartObject.MaxWaterCurveQH[0], 12, '#28004D', 10, 5); + } - if (!m_chartPointPara.PerferRegionInChartVisible) { - return; - } + if (m_isDispCurveQE) createCurveQE('MaxWaterCurveQE', m_chartObject.MaxWaterCurveQE, fullCurveWidth); - if ( - m_chartPointPara.PerferRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - //鍔犵矖鏄剧ず + createCurveQP('MaxWaterCurveQP', m_chartObject.MaxWaterCurveQP, fullCurveWidth); + createCurveNPSH('MaxWaterCurveNPSH', m_chartObject.MaxWaterCurveNPSH, fullCurveWidth); - var pt_num = 11; - var space = - (m_chartPointPara.PerferMaxPoint.Q - - m_chartPointPara.PerferMinPoint.Q) / - (pt_num - 1); + // + createCurveQH('MinWaterCurveQH', m_chartObject.MinWaterCurveQH, 1); + if (m_chartType == 0 && m_chartObject.MinWaterCurveQH != null && m_displayStyle.IsDispCurveLabel) { + //杞�� + drawTextByQH('MinSpeedText', m_pumpInfo.MinSpeed + ' rpm', m_chartObject.MinWaterCurveQH[0], 12, '#28004D', 10, 5); + } - var pixelPoints_QH = []; - var pixelPoints_QE = []; - var pixelPoints_QP = []; - var pixelPoints_NPSH = []; + //鏆傛椂涓嶆樉绀� + //m_isDispCurveQE + //createCurveQE("MinWaterCurveQE", m_chartObject.MinWaterCurveQE, 1); + //createCurveQP("MinWaterCurveQP", m_chartObject.MinWaterCurveQP, 1); + //createCurveNPSH("MinWaterCurveNPSH", m_chartObject.MinWaterCurveNPSH, 1); - for (var i = 0; i < pt_num; i++) { - var q = m_chartPointPara.PerferMinPoint.Q + i * space; - var xPixel = getPixelValueQ(q); + var curveMaxPathQH = createCurveQH('SimWaterCurveQH', m_chartObject.SimWaterCurveQH, fullCurveWidth); - var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); - if (head_pixel_pt != null) pixelPoints_QH.push(head_pixel_pt); - if (m_isDispCurveQE) { - var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); - if (eta_pixel_pt != null) pixelPoints_QE.push(eta_pixel_pt); - } - if (m_isDispCurveQP) { - var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); - if (power_pixel_pt != null) pixelPoints_QP.push(power_pixel_pt); - } - } + if (m_isDispCurveQE) createCurveQE('SimWaterCurveQE', m_chartObject.SimWaterCurveQE, fullCurveWidth); + createCurveQP('SimWaterCurveQP', m_chartObject.SimWaterCurveQP, fullCurveWidth); + createCurveNPSH('SimWaterCurveNPSH', m_chartObject.SimWaterCurveNPSH, fullCurveWidth); - var pixelPoints_NPSH = []; - if ( - m_isDispNpsh && - m_wrkCurveGrp.PixelNPSH && - m_wrkCurveGrp.PixelNPSH.length > 3 - ) { - var min_q = Math.max( - getPixelValueQ(m_chartPointPara.PerferMinPoint.Q), - m_wrkCurveGrp.PixelNPSH[0].Point0.X - ); - var max_q = Math.min( - getPixelValueQ(m_chartPointPara.PerferMaxPoint.Q), - m_wrkCurveGrp.PixelNPSH[m_wrkCurveGrp.PixelNPSH.length - 1].Point3.X - ); + if (m_chartObject.SimJieZhiCurveQH != null) { + createCurveQH('SimJieZhiCurveQH', m_chartObject.SimJieZhiCurveQH, 1, null, true, '10, 10'); + if (m_isDispCurveQE) createCurveQE('SimJieZhiCurveQE', m_chartObject.SimJieZhiCurveQE, 1, null, true, '10, 10'); + createCurveQP('SimJieZhiCurveQP', m_chartObject.SimJieZhiCurveQP, 1, null, true, '10, 10'); + } + //鍒濆鍖栧伐浣滄洸绾� + intitalWrkCurveInfo(); - space = (max_q - min_q) / (pt_num - 1); - for (var i = 0; i < pt_num; i++) { - var xPixel = min_q + i * space; + calcAllowRegionCurve(); + calcPerferRegionCurve(); + }; + //鍙橀,宸ヤ綔鏇茬嚎 + var drawAllCurve_Speed_Wrk = function () { + var fullCurveWidth = 2; + if ( + m_chartPointPara.AllowRegionInChartVisible == true || + m_chartPointPara.AllowRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + fullCurveWidth = 1; + } + if ( + m_chartPointPara.PerferRegionInChartVisible == true || + m_chartPointPara.PerferRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + fullCurveWidth = 1; + } + // console.log(m_pumpInfo) + if (m_chartObject.SimWaterCurveQH != null) { + var curveSimuPathQH = createCurveQH('SimWaterCurveQH', m_chartObject.SimWaterCurveQH, fullCurveWidth); - var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); - if (npsh_pixel_pt != null) pixelPoints_NPSH.push(npsh_pixel_pt); - else { - if (i == 0) - pixelPoints_NPSH.push(m_wrkCurveGrp.PixelNPSH[0].Point0); + if (m_pumpInfo.WrkSpeed != null && m_pumpInfo.WrkSpeed > 1 && m_displayStyle.IsDispCurveLabel) { + drawTextByQH('WrkD2Text', m_pumpInfo.WrkSpeed + ' rpm', m_chartObject.SimWaterCurveQH[0], 12, m_displayStyle.ColorH, 10, 5); + } - } - } - } + if (m_isDispCurveQE) createCurveQE('SimWaterCurveQE', m_chartObject.SimWaterCurveQE, fullCurveWidth); - removeElementById("RegionBlodCurveQH_Perfer"); - removeElementById("RegionBlodCurveQP_Perfer"); - removeElementById("RegionBlodCurveQE_Perfer"); - removeElementById("RegionBlodCurveNPSH_Perfer"); + createCurveQP('SimWaterCurveQP', m_chartObject.SimWaterCurveQP, fullCurveWidth); - createCurveQH_pixel( - "RegionBlodCurveQH_Perfer", - pixelPoints_QH, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQH - ); - createCurveQE_pixel( - "RegionBlodCurveQE_Perfer", - pixelPoints_QE, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQE - ); - createCurveQP_pixel( - "RegionBlodCurveQP_Perfer", - pixelPoints_QP, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQP - ); - createCurveNPSH_pixel( - "RegionBlodCurveNPSH_Perfer", - pixelPoints_NPSH, - m_displayStyle.BlodRegionCurveWidth, - m_chartObject.WorkCurveColorQNPSH - ); - } else if ( - m_chartPointPara.PerferRegionDispStyle == - ConstParas.ChartRegionDispStyle.Strip - ) { - // 鏉″甫 - removeElementById("ChartRegionPerferRegionStrip"); + createCurveNPSH('SimWaterCurveNPSH', m_chartObject.SimWaterCurveNPSH, fullCurveWidth); - var xPixel_min_q = getPixelValueQ(m_chartPointPara.PerferMinPoint.Q); - var xPixel_max_q = getPixelValueQ(m_chartPointPara.PerferMaxPoint.Q); + if (m_chartObject.SimJieZhiCurveQH != null) { + createCurveQH('SimJieZhiCurveQH', m_chartObject.SimJieZhiCurveQH, 1, null, true, '10, 10'); + if (m_isDispCurveQE) createCurveQE('SimJieZhiCurveQE', m_chartObject.SimJieZhiCurveQE, 1, null, true, '10, 10'); + createCurveQP('SimJieZhiCurveQP', m_chartObject.SimJieZhiCurveQP, 1, null, true, '10, 10'); + } + } else { + // + var curveMaxPathQH = createCurveQH('MaxWaterCurveQH', m_chartObject.MaxWaterCurveQH, fullCurveWidth); + // console.log(m_displayStyle,m_pumpInfo.Ratedn) + if (m_pumpInfo.Ratedn != null && m_pumpInfo.Ratedn > 1 && m_displayStyle.IsDispCurveLabel) { + drawTextByQH( + 'MaxD2Text', + m_pumpInfo.Ratedn + ' rpm', + m_chartObject.MaxWaterCurveQH[0], + m_displayStyle.FeatCurveSize, + m_displayStyle.ColorH, + 6, + 5 + ); + } - var attr = { - x: xPixel_min_q, - y: m_chartSize.DiagramTop, - width: xPixel_max_q - xPixel_min_q, - height: m_chartSize.UpDiagram.DiagramHeight, - }; - var style = { - "stroke-width": "1", - stroke: "none", - fill: "ForestGreen", - "stroke-opacity": "0.1", - "fill-opacity": "0.3", - "shape-rendering": "geometricPrecision", - "zIndex:": -1, - }; - m_svg.createRect(attr, style, "ChartRegionPerferRegionStrip"); - } - }; - //缁樺埗鏇茬嚎(娴侀噺鏁堢巼) - var createCurveQE = function ( - curveElementName, - points, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ) { - if (points == null) { - return null; - } + if (m_isDispCurveQE) { + createCurveQE('MaxWaterCurveQE', m_chartObject.MaxWaterCurveQE, fullCurveWidth); + } - if (curveElementName == null) { - return null; - } - var point_num = points.length; - if (point_num < 3) return; - if (curveElementName == "RegionBlodCurveQE_Allow") { - } else if (curveElementName == "PerferBlodCurveQE_Allow") { - } else { - if (points[0].X < points[point_num - 1].X * 0.01 && points[0].Y < 10) { - //寮哄埗褰掗浂 - points[0].X = 0; - points[0].Y = 0; - } - } - var pixelPoints = []; + createCurveQP('MaxWaterCurveQP', m_chartObject.MaxWaterCurveQP, fullCurveWidth); - for (var v = 0; v < point_num; v++) { - var pt = points[v]; - var x = getPixelValueQ(pt.X); - if (pt.Y < 0) pt.Y = 0; - var y = getPixelValueE(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } + createCurveNPSH('MaxWaterCurveNPSH', m_chartObject.MaxWaterCurveNPSH, fullCurveWidth); + } + //鍒濆鍖栧伐浣滄洸绾� + intitalWrkCurveInfo(); - return createCurveQE_pixel( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ); - }; - //缁樺埗鏇茬嚎(娴侀噺鏁堢巼) : 鍍忕礌鐐� - var createCurveQE_pixel = function ( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - isDisp, - curveDashType - ) { - if (pixelPoints == null || pixelPoints.length < 3) { - return null; - } - if (curveElementName == null) { - return null; - } - var pathValue = transBezierCurveToPath(pixelPoints); - if (pathValue == null || pathValue == undefined) return null; + calcAllowRegionCurve(); + calcPerferRegionCurve(); + }; + // + var drawAllCurve_BaoLuo = function () { + var maxCurveWidth = 2; + if ( + m_chartPointPara.AllowRegionInChartVisible == true || + m_chartPointPara.AllowRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + maxCurveWidth = 1; + } + if ( + m_chartPointPara.PerferRegionInChartVisible == true || + m_chartPointPara.PerferRegionDispStyle == ConstParas.ChartRegionDispStyle.Blod + ) { + maxCurveWidth = 1; + } + var curveMaxPathQH = createCurveQH('MaxWaterCurveQH', m_chartObject.MaxWaterCurveQH, maxCurveWidth); - if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { - return null; - } - var style = { - "stroke-width": "2px", - stroke: m_displayStyle.ColorE, - fill: "none", - "fill-opacity": "0.5", - //"stroke-dasharray":"5 3", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (curveWidth != null) { - style["stroke-width"] = curveWidth; - } - if (curveColor != null) { - style["stroke"] = curveColor; - } + //console.log( m_chartObject.MaxWaterCurveQE) + if (m_isDispCurveQE) createCurveQE('MaxWaterCurveQE', m_chartObject.MaxWaterCurveQE, maxCurveWidth); - if (curveDashType != null) { - style["stroke-dasharray"] = curveDashType; //'10, 10';//'10, 10, 5, 5' - } + createCurveQP('MaxWaterCurveQP', m_chartObject.MaxWaterCurveQP, maxCurveWidth); + createCurveNPSH('MaxWaterCurveNPSH', m_chartObject.MaxWaterCurveNPSH, maxCurveWidth); - m_svg.createPath( - curveElementName, - pathValue.join(""), - { - id: curveElementName, - }, - style - ); - if (isDisp != null && !isDisp) { - hideElementById(curveElementName); - } - return pixelPoints; - }; - //缁樺埗鏇茬嚎(娴侀噺鍔熺巼) - var createCurveQP = function ( - curveElementName, - points, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ) { - if (points == null) { - return null; - } - if (curveElementName == null) { - return null; - } + var simuWaterCurveWidth = 2; + if (m_chartObject.SimJieZhiCurveQH != null) { + simuWaterCurveWidth = 1; + } - var pixelPoints = []; - for (var v = 0; v < points.length; v++) { - var pt = points[v]; - var x = getPixelValueQ(pt.X); - if (pt.Y < 0) pt.Y = 0; - var y = getPixelValueP(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } - return createCurveQP_pixel( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ); - }; - //缁樺埗鏇茬嚎(娴侀噺鍔熺巼) : 鍍忕礌鐐� - var createCurveQP_pixel = function ( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ) { - if (pixelPoints == null || pixelPoints.length < 3) { - return null; - } - if (curveElementName == null) { - return null; - } - var pathValue = transBezierCurveToPath(pixelPoints); - if (pathValue == null || pathValue == undefined) return null; + if (m_chartObject.SimJieZhiCurveQH != null) { + createCurveQH('SimJieZhiCurveQH', m_chartObject.SimJieZhiCurveQH, 1, null, true, '10, 10'); + if (m_isDispCurveQE) createCurveQE('SimJieZhiCurveQE', m_chartObject.SimJieZhiCurveQE, 1, null, true, '10, 10'); + createCurveQP('SimJieZhiCurveQP', m_chartObject.SimJieZhiCurveQP, 1, null, true, '10, 10'); + } + //鍒濆鍖栧伐浣滄洸绾� + intitalWrkCurveInfo(); - if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { - return null; - } - var style = { - "stroke-width": "2px", - stroke: m_displayStyle.ColorP, - fill: "none", - "fill-opacity": "0.5", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (curveWidth != null) { - style["stroke-width"] = curveWidth; - } - if (curveColor != null) { - style["stroke"] = curveColor; - } + calcAllowRegionCurve(); + calcPerferRegionCurve(); + }; + //缁樺埗姘村嵃(鏂囧瓧) + var drawTextWaterMark = function (text) { + if (!text) { + return; + } - if (curveDashType != null) { - style["stroke-dasharray"] = curveDashType; //'10, 10' '10, 10, 5, 5' - } + var logoStyle = + '-webkit-transform: rotate(5deg);-moz-transform: rotate(5deg);transform: rotate(15deg);fill:#000000;fill-opacity:0.6;font-weight:bold;stroke-width:1px;font-size:16px;z-index:0'; - m_svg.createPath( - curveElementName, - pathValue.join(""), - { - id: curveElementName, - }, - style - ); - if (curveIsDisp != null && !curveIsDisp) { - hideElementById(curveElementName); - } + var w = 30; + var h = 80; + var isDrawSecond = true; + var left = (m_chartSize.DiagramRight - m_chartSize.DiagramLeft - text.length * w) / 2; - return pixelPoints; - }; - //缁樺埗鏇茬嚎(娴侀噺姹借殌) - var createCurveNPSH = function ( - curveElementName, - points, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ) { - if (points == null || m_coordinatePara.SpaceNPSH < 0.01) { - return null; - } - if (curveElementName == null) { - return null; - } + for (var i = 0; i < text.length; i++) { + m_svg.createText( + { + opacity: 0.5, + y: m_chartSize.SpaceTop + h + i * 10, + x: m_chartSize.DiagramLeft + left + i * w, + }, + logoStyle, + text[i], + 0, + 'WaterMarkText1' + ); - var pixelPoints = []; - for (var v = 0; v < points.length; v++) { - var pt = points[v]; - var x = getPixelValueQ(pt.X); - if (pt.Y < 0) pt.Y = 0; - var y = getPixelValueNPSH(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } + if (isDrawSecond) { + var endHeight = h + text.length * 10; //: h + text.length * 10 - 80; + m_svg.createText( + { + opacity: 0.5, + y: m_chartSize.UpDiagram.Bottom - endHeight + i * 10, + x: m_chartSize.DiagramLeft + left + i * w, + }, + logoStyle, + text[i], + 0, + 'WaterMarkText1' + ); + } + } + }; - return createCurveNPSH_pixel( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ); - }; - //缁樺埗鏇茬嚎(娴侀噺鍔熺巼) : 鍍忕礌鐐� - var createCurveNPSH_pixel = function ( - curveElementName, - pixelPoints, - curveWidth, - curveColor, - curveIsDisp, - curveDashType - ) { - if (pixelPoints == null || pixelPoints.length < 3) { - return null; - } - if (curveElementName == null) { - return null; - } - var pathValue = transBezierCurveToPath(pixelPoints); - if (pathValue == null || pathValue == undefined) return; - if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { - return; - } - var style = { - "stroke-width": "2px", - stroke: m_displayStyle.ColorNPSH, - fill: "none", - "fill-opacity": "0.5", - "shape-rendering": "geometricPrecision", - "zIndex:": 7, - }; - if (curveWidth != null) { - style["stroke-width"] = curveWidth; - } - if (curveColor != null) { - style["stroke"] = curveColor; - } - if (curveDashType != null) { - style["stroke-dasharray"] = curveDashType; //'10, 10' '10, 10, 5, 5' - } - m_svg.createPath( - curveElementName, - pathValue.join(""), - { - id: curveElementName, - }, - style - ); - if (curveIsDisp != null && !curveIsDisp) { - hideElementById(curveElementName); - } - }; - //娓呯悊 - var ClearCurveElement = function () { - removeElementById("SimJieZhiCurveQH"); - removeElementById("SimJieZhiCurveQE"); - removeElementById("SimJieZhiCurveQP"); - removeElementById("SimJieZhiCurveNPSH"); + //缁樺埗姘村嵃(鍥剧墖) + var drawLogoWaterMark = function () { + var watermark_img_url = '/static/img/watermark/default.png'; - removeElementById("SimWaterCurveQH"); - removeElementById("SimWaterCurveQE"); - removeElementById("SimWaterCurveQP"); - removeElementById("SimWaterCurveNPSH"); + var img_watermark = new Image(); + img_watermark.src = watermark_img_url; + img_watermark.onload = function () { + var watermark_image_width_real = img_watermark.width; + var watermark_image_height_real = img_watermark.height; - removeElementById("MaxWaterCurveQH"); - removeElementById("MaxWaterCurveQE"); - removeElementById("MaxWaterCurveQP"); - removeElementById("MaxWaterCurveNPSH"); + var ratio_byHeight = (m_chartSize.TotalHeight * 0.2) / watermark_image_height_real; + var ratio_byWidth = (m_chartSize.TotalWidth * 0.2) / watermark_image_width_real; - removeElementById("MinWaterCurveQH"); - removeElementById("MinWaterCurveQE"); - removeElementById("MinWaterCurveQP"); - removeElementById("MinWaterCurveNPSH"); + var ratio_waterMark = Math.min(ratio_byHeight, ratio_byWidth); - removeElementById("RegionBlodCurveQH_Allow"); - removeElementById("RegionBlodCurveQP_Allow"); - removeElementById("RegionBlodCurveQE_Allow"); - removeElementById("RegionBlodCurveNPSH_Allow"); + var watermark_image_width = watermark_image_width_real * ratio_waterMark; + var watermark_image_height = watermark_image_height_real * ratio_waterMark; - removeElementById("PerferBlodCurveQH_Allow"); - removeElementById("PerferBlodCurveQP_Allow"); - removeElementById("PerferBlodCurveQE_Allow"); - removeElementById("PerferBlodCurveNPSH_Allow"); + var logoStyle = + '-webkit-transform: rotate(5deg);-moz-transform: rotate(5deg);transform: rotate(15deg);fill:#000000;fill-opacity:0.6;font-weight:bold;stroke-width:1px;font-size:16px;z-index:0'; + var logoPosi1 = { + opacity: 0.9, + y: (m_chartSize.TotalHeight * 1) / 4 - watermark_image_height / 2, + x: (m_chartSize.TotalWidth * 1) / 4 - watermark_image_width / 2, + width: watermark_image_width, + height: watermark_image_height, + }; + m_svg.createImage(logoPosi1, logoStyle, 'WaterMarkImage2', watermark_img_url); - removeElementById("DesignPointWater1"); - removeElementById("DesignPointWater2"); - removeElementById("DesignPointWater3"); - removeElementById("DesignPointWater4"); - removeElementById("DesignPointWater5"); + var logoPosi2 = { + opacity: 0.9, + y: (m_chartSize.TotalHeight * 3) / 4 - watermark_image_height / 2, + x: (m_chartSize.TotalWidth * 1) / 4 - watermark_image_width / 2, + width: watermark_image_width, + height: watermark_image_height, + }; + m_svg.createImage(logoPosi2, logoStyle, 'WaterMarkImage2', watermark_img_url); - removeElementById("RealWorkPointQH"); - removeElementById("RealWorkPointQE"); - removeElementById("RealWorkPointQP"); - removeElementById("RealWorkPointQNPSH"); - }; + var logoPosi3 = { + opacity: 0.9, + y: (m_chartSize.TotalHeight * 1) / 4 - watermark_image_height / 2, + x: (m_chartSize.TotalWidth * 3) / 4 - watermark_image_width / 2, + width: watermark_image_width, + height: watermark_image_height, + }; + m_svg.createImage(logoPosi3, logoStyle, 'WaterMarkImage3', watermark_img_url); - //鍒濆鍖栧伐浣滄洸绾� - var intitalWrkCurveInfo = function () { - m_wrkCurveGrp = {}; - if (m_chartObject.SimJieZhiCurveQH != null) { - m_wrkCurveGrp = { - RealQH: m_chartObject.SimJieZhiCurveQH, - RealQE: m_chartObject.SimJieZhiCurveQE, - RealQP: m_chartObject.SimJieZhiCurveQP, - RealNPSH: m_chartObject.SimJieZhiCurveNPSH, - }; - } else if (m_chartObject.SimWaterCurveQH != null) { - m_wrkCurveGrp = { - RealQH: m_chartObject.SimWaterCurveQH, - RealQE: m_chartObject.SimWaterCurveQE, - RealQP: m_chartObject.SimWaterCurveQP, - RealNPSH: m_chartObject.SimWaterCurveNPSH, - }; - } else if (m_chartObject.MaxWaterCurveQH != null) { - m_wrkCurveGrp = { - RealQH: m_chartObject.MaxWaterCurveQH, - RealQE: m_chartObject.MaxWaterCurveQE, - RealQP: m_chartObject.MaxWaterCurveQP, - RealNPSH: m_chartObject.MaxWaterCurveNPSH, - }; - } else { - return null; - } + var logoPosi4 = { + opacity: 0.9, + y: (m_chartSize.TotalHeight * 3) / 4 - watermark_image_height / 2, + x: (m_chartSize.TotalWidth * 3) / 4 - watermark_image_width / 2, + width: watermark_image_width, + height: watermark_image_height, + }; + m_svg.createImage(logoPosi4, logoStyle, 'WaterMarkImage4', watermark_img_url); + }; + }; + //浜х敓瑁呯疆鏇茬嚎 + var drawEquipmentCurve = function () { + var equipmentCurveElement = document.getElementById('EquipmentCurve'); + if (equipmentCurveElement) { + equipmentCurveElement.parentNode.removeChild(equipmentCurveElement); + } + if (m_chartObject.EquipmentSectPt == null) return; + var pointNumber = 20; + var EquipmentCurve = []; + var space = m_chartObject.EquipmentSectPt.X / (pointNumber - 1); + var k = (m_chartObject.EquipmentSectPt.Y - m_equipZeroH) / (m_chartObject.EquipmentSectPt.X * m_chartObject.EquipmentSectPt.X); + for (var i = 0; i < pointNumber; i++) { + var pt = {}; + pt.X = space * i; + pt.Y = m_equipZeroH + k * pt.X * pt.X; + EquipmentCurve.push(pt); + } + createCurveQH('EquipmentCurve', EquipmentCurve, 1, m_displayStyle.ColorEquipment, m_displayStyle.isDispEquipmentCurve); + }; + //缁樺埗鏌ヨ绔栫洿鎸囧绾� + var drawQueryIndicatVertLine = function () { + if (document.getElementById('infoDv4VerticalLine') !== null) { + var infoDiv = document.getElementById('infoDv4VerticalLine'); + if (infoDiv) { + infoDiv.parentNode.removeChild(infoDiv); + } + } - if (m_chartType == ConstParas.ChartType.Cut) { - m_wrkCurveGrp.CurvePara = m_pumpInfo.WrkD2; - } else if (m_chartType == ConstParas.ChartType.Speed) { - m_wrkCurveGrp.CurvePara = m_pumpInfo.WrkSpeed; - } - //閫氱煡澶栭儴 - if (m_changeWrkCurveCb != null) { - m_changeWrkCurveCb(m_wrkCurveGrp); - } + //鍏堝垱寤虹敤浜庢斁缃煡璇俊鎭殑Div + var htmlDiv = "<lable style='font-size:7px'>" + getTranslateString('娴侀噺') + '</label>'; + var info_Div = document.createElement('div'); + info_Div.id = 'infoDv4VerticalLine'; + info_Div.style.position = 'relative'; + info_Div.style.color = 'gray'; + info_Div.style.fontSize = '9px'; + info_Div.style.textAlign = 'left'; + info_Div.style.width = '120px'; + info_Div.style.left = (m_chartSize.DiagramRight - 90).toString() + 'px'; + info_Div.style.top = (32 - m_chartSize.TotalHeight).toString() + 'px'; + info_Div.innerHTML = htmlDiv; + info_Div.style.display = 'none'; + document.getElementById(m_divChartName).appendChild(info_Div); - // - var pixelPoints = []; - if (m_wrkCurveGrp.RealQH != null) { - for (var v = 0; v < m_wrkCurveGrp.RealQH.length; v++) { - var pt = m_wrkCurveGrp.RealQH[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueH(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } - } + m_infoDv4VerticalLine = document.getElementById('infoDv4VerticalLine'); - m_wrkCurveGrp.PixelQH = transBezierCurveModel(pixelPoints); + var attr4verticalLine = { + stroke: 'rgb(136 136 221)', + 'stroke-width': '5', + fill: 'none', + zIndex: 100, + 'stroke-dasharray': '10 3', + cursor: 'pointer', + 'stroke-opacity': '1', + 'shape-rendering': 'geometricPrecision', + }; - pixelPoints = []; - if (m_wrkCurveGrp.RealQE != null) { - for (var v = 0; v < m_wrkCurveGrp.RealQE.length; v++) { - var pt = m_wrkCurveGrp.RealQE[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueE(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } - } + var xStartValuePixel = (m_chartSize.DiagramLeft + m_chartSize.DiagramRight) / 2; // 寮�濮嬩綅缃� - m_wrkCurveGrp.PixelQE = transBezierCurveModel(pixelPoints); + //鍒涘缓绔栫洿绾� + var pathValue1 = []; + var vertialLinePathName1 = 'verticalLine1'; + pathValue1.push( + 'M ', + xStartValuePixel, + ' ', + m_chartSize.UpDiagram.Up, + ' L ', + xStartValuePixel, + ' ', + m_chartSize.DownDiagram.Bottom + ); + m_svg.createPath( + vertialLinePathName1, + pathValue1.join(''), + { + id: vertialLinePathName1, + }, + attr4verticalLine, + null + ); - pixelPoints = []; - if (m_wrkCurveGrp.RealQP != null) { - for (var v = 0; v < m_wrkCurveGrp.RealQP.length; v++) { - var pt = m_wrkCurveGrp.RealQP[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueP(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } - } - m_wrkCurveGrp.PixelQP = transBezierCurveModel(pixelPoints); + m_queryInfoIndicatorLineV = document.getElementById(vertialLinePathName1); - if (m_wrkCurveGrp.RealNPSH != null && m_wrkCurveGrp.RealNPSH.length > 3) { - pixelPoints = []; - for (var v = 0; v < m_wrkCurveGrp.RealNPSH.length; v++) { - var pt = m_wrkCurveGrp.RealNPSH[v]; - var x = getPixelValueQ(pt.X); - var y = getPixelValueNPSH(pt.Y); - pixelPoints.push({ X: x, Y: y }); - } - m_wrkCurveGrp.PixelNPSH = transBezierCurveModel(pixelPoints); - } - }; - //鑾峰彇棰滆壊 - var getCurveColor = function (index) { - if (index <= 0) return "#4169E1"; - if (index == 1) return "#FF4500"; - if (index == 2) return "#FF00FF"; - if (index == 3) return "#A0522D"; - if (index == 4) return "#6495ED"; - if (index == 5) return "#00CED1"; - if (index == 6) return "#2E8B57"; - if (index == 7) return "#FFA500"; + drawQueryDataInfo(xStartValuePixel); - return null; - }; + var isMoveVerticalLine = false; + //m_svg.getPathByName("verticalLine") - var drawChartTextAnnotation = function () { - if (m_chartObject.LabelPosi == null || m_chartObject.LabelPosi.length == 0) - return; + m_queryInfoIndicatorLineV.addEventListener('mousedown', function (e) { + isMoveVerticalLine = true; + e.preventDefault(); + }); - if (m_wrkCurveGrp != null) { - var lst_pt_qh = m_wrkCurveGrp.RealQH[m_wrkCurveGrp.RealQH.length - 1]; + document.addEventListener('mousemove', function (e) { + if (isMoveVerticalLine) { + var svg_root = m_svg.getRootNode(); + var svg = document.querySelector(svg_root); - var text = "unknow"; - if (m_chartType == ConstParas.ChartType.Cut) { - text = UnitHelper.getDispValueLength( - m_wrkCurveGrp.CurvePara, - m_d2IsMeter, - true - ); - } else if (m_chartType == ConstParas.ChartType.Speed) { - text = m_wrkCurveGrp.CurvePara + " rpm"; - } + let e = window.event || e; + if ( + e.clientX - svg.offset().left > m_chartSize.DiagramLeft && + m_chartSize.DiagramRight + svg.offset().left - e.clientX > 0 && + e.clientY - svg.offset().top > m_chartSize.DiagramTop && + m_chartSize.DiagramBottom + svg.offset().top - e.clientY > 0 + ) { + //褰撳墠榧犳爣浣嶇疆 x鐨勫儚绱� + var xPixel = parseFloat(e.clientX - svg.offset().left); + // + drawQueryDataInfo(xPixel); + //淇敼浣嶇疆 + if (m_queryInfoIndicatorLineV) { + var pathValue1 = []; + pathValue1.push('M ', xPixel, ' ', m_chartSize.UpDiagram.Up, ' L ', xPixel, ' ', m_chartSize.DownDiagram.Bottom); + m_queryInfoIndicatorLineV.attr('d', pathValue1.join('')); + } + } + } + }); + document.addEventListener('mouseup', function (e) { + if (isMoveVerticalLine) { + isMoveVerticalLine = false; + } + }); - drawTextByQH("WorkCurveParasQH", text, lst_pt_qh, { - size: m_displayStyle.FeatCurveSize, - color: "black", - offsetPixelX: 2, - textAligment: 0, - fontWeight: "900", - }); - if (m_isDispCurveQP) { - var lst_pt_qp = m_wrkCurveGrp.RealQP[m_wrkCurveGrp.RealQP.length - 1]; - drawTextByQP("WorkCurveParasQP", text, lst_pt_qp, { - size: m_displayStyle.FeatCurveSize, - color: "black", - offsetPixelX: 2, - textAligment: 0, - fontWeight: "900", - }); - } - } - if (m_displayStyle.LxpCurveBundleDispStyle == 0) - return; + //璁剧疆鏄剧ず + setQueryIndicatVertLineVisible(m_dispVerticalLine); + }; + //鑾峰彇x鍦╟urve鐨�(X Y)鐐瑰�� (鍍忕礌鐐�) + var getBezierPointY = function (curve, x) { + if (curve == null) return null; + var iPtCount = curve.length; - for (var j = 0; j < m_chartObject.LabelPosi.length; j++) { - var anno = m_chartObject.LabelPosi[j]; + if (x < curve[0].Point0.X - 1) { + return null; + } + if (x > curve[iPtCount - 1].Point3.X + 1) { + return null; + } - var posi = {}; - posi.X = anno.X; - posi.Y = anno.Y; + for (var i = 0; i < iPtCount; i++) { + if (x == curve[i].Point0.X) { + return { + X: curve[i].Point0.X, + Y: curve[i].Point0.Y, + }; + } + if (x == curve[i].Point3.X) { + return { + X: curve[i].Point3.X, + Y: curve[i].Point3.Y, + }; + } + if (x > curve[i].Point0.X && x < curve[i].Point3.X) { + var ptBizer = curve[i]; + // + try { + var minDis = Math.abs(ptBizer.Point3.X - ptBizer.Point0.X); + var sectY = null; + var sectX = null; + for (var uu = 0; uu <= 1; uu = uu + 0.05) { + var x0 = ptBizer.Point0.X * uu * uu * uu; + var x1 = 3 * ptBizer.Point1.X * uu * uu * (1 - uu); + var x2 = 3 * ptBizer.Point2.X * uu * (1 - uu) * (1 - uu); + var x3 = ptBizer.Point3.X * (1 - uu) * (1 - uu) * (1 - uu); - var curveName = "CurvePara_" + anno.CurveTag + "_" + anno.ID; - anno.ObjectName = curveName; + var curveX = x0 + x1 + x2 + x3; + if (Math.abs(curveX - x) < minDis) { + var y0 = ptBizer.Point0.Y * uu * uu * uu; + var y1 = 3 * ptBizer.Point1.Y * uu * uu * (1 - uu); + var y2 = 3 * ptBizer.Point2.Y * uu * (1 - uu) * (1 - uu); + var y3 = ptBizer.Point3.Y * (1 - uu) * (1 - uu) * (1 - uu); + minDis = Math.abs(curveX - x); + sectY = y0 + y1 + y2 + y3; + sectX = curveX; + } + } + // + if (sectY != null && sectX != null) { + return { + X: sectX, + Y: sectY, + }; + } + } catch (ex) { + //alert(ex.message); + console.log('getBezierPointY error', curve, x); + return null; + } + } + } - var lblColor = m_displayStyle.ColorH; - if (anno.CurveTag == "QE") { - lblColor = m_displayStyle.ColorE; - if (!m_isDrawEquepEtaCurve) - continue; - } - else { - if (Math.abs(anno.Para - m_wrkCurveGrp.CurvePara) < 2) continue; + if (x > curve[iPtCount - 1].Point3.X - 1 && x < curve[iPtCount - 1].Point3.X + 5) { + return { + X: curve[iPtCount - 1].Point3.X, + Y: curve[iPtCount - 1].Point3.Y, + }; + } + return null; + }; + //鑾峰彇x鍦╟urve鐨�(X Y)鐐瑰�� (鍍忕礌鐐�) + var getBezierPointX = function (curve, y) { + if (curve == null) return null; + var iPtCount = curve.length; - if (anno.CurveTag == "DMH" || anno.CurveTag == "DMP") {//鍒囧壊鍙惰疆澶栧緞,鍜屾渶澶у彾杞寰� (鎵▼绾夸笂) + if (y < curve[0].Point0.Y && y < curve[iPtCount - 1].Point3.Y) { + return null; + } + if (y > curve[0].Point0.Y && y > curve[iPtCount - 1].Point3.Y) { + return null; + } - } - else if (anno.CurveTag == "PN") {//娉靛瀷鍙� + for (var i = 0; i < iPtCount; i++) { + var ptBizer = curve[i]; - } - else if (anno.CurveTag == "WRP" || anno.CurveTag == "WRH") {//鍒囧壊鍙惰疆澶栧緞,鍜屾渶澶у彾杞寰� (鍔熺巼绾夸笂) + if (y < ptBizer.Point0.Y && y < ptBizer.Point3.Y) { + continue; + } + if (y > ptBizer.Point0.Y && y > ptBizer.Point3.Y) { + continue; + } - } - else if (anno.CurveTag == "SIMU" || anno.CurveTag == "DSP" || anno.CurveTag == "DSH") {//鍒囧壊绾垮瓙鍨嬪彿 - var min_d2_text = m_pumpInfo.MinD2 + "mm"; - if (anno.Text != min_d2_text && m_displayStyle.LxpCurveBundleDispStyle == 1) { - continue; - } - } + // + try { + var minDis = Math.abs(ptBizer.Point3.Y - ptBizer.Point0.Y); + var sectY = null; + var sectX = null; + for (var uu = 0; uu <= 1; uu = uu + 0.05) { + var x0 = ptBizer.Point0.X * uu * uu * uu; + var x1 = 3 * ptBizer.Point1.X * uu * uu * (1 - uu); + var x2 = 3 * ptBizer.Point2.X * uu * (1 - uu) * (1 - uu); + var x3 = ptBizer.Point3.X * (1 - uu) * (1 - uu) * (1 - uu); - if (m_curveColorDict != null) { - if (anno.CurveTag == "DIH" || anno.CurveTag == "DIP") { - for (var i = 0; i < m_curveColorDict.length; i++) { - if (m_curveColorDict[i].type == "min") { - lblColor = m_curveColorDict[i].color; - } - } - } - if (anno.CurveTag == "DMH" || anno.CurveTag == "DMP") { - for (var i = 0; i < m_curveColorDict.length; i++) { - if (m_curveColorDict[i].type == "max") { - lblColor = m_curveColorDict[i].color; - } - } - } - } - } + var y0 = ptBizer.Point0.Y * uu * uu * uu; + var y1 = 3 * ptBizer.Point1.Y * uu * uu * (1 - uu); + var y2 = 3 * ptBizer.Point2.Y * uu * (1 - uu) * (1 - uu); + var y3 = ptBizer.Point3.Y * (1 - uu) * (1 - uu) * (1 - uu); - if (anno.Panel == 0) { - drawTextByQH(curveName, anno.Text, posi, { - size: m_displayStyle.FeatCurveSize, - color: lblColor, - textAligment: anno.TextAligment, - }); - } else if (anno.Panel == 1 && m_isDispCurveQP) { - drawTextByQP(curveName, anno.Text, posi, { - size: m_displayStyle.FeatCurveSize, - color: lblColor, - textAligment: anno.TextAligment, - }); - } - } - }; - //鏈�灏忔祦閲忕嚎 - var drawMinContinueFlowCurve = function () { - if ( - m_chartObject.MinContinueFlowCurve == null || - m_chartObject.MinContinueFlowCurve.length < 2 - ) { - return; - } - removeElementById("MinContinueFlowCurve"); + var curveX = x0 + x1 + x2 + x3; + var curveY = y0 + y1 + y2 + y3; - var color_curve = "#FF1493"; - if (m_chartObject.MinContinueFlowCurve.length > 3) { - createCurveQH( - "MinContinueFlowCurve", - m_chartObject.MinContinueFlowCurve, - 0.5, - color_curve, - true, - "3 3" - ); - } else { - createDashedLineQH( - "MinContinueFlowCurve", - m_chartObject.MinContinueFlowCurve[0], - m_chartObject.MinContinueFlowCurve[1], - 0.5, - color_curve, - "3 3" - ); - } - }; + if (Math.abs(curveY - y) < minDis) { + minDis = Math.abs(curveY - y); + sectY = curveY; + sectX = curveX; + } + } + // + if (sectY != null && sectX != null) { + return { + X: sectX, + Y: sectY, + }; + } + } catch (ex) { + //alert(ex.message); + return null; + } + } - //缁樺埗绛夋晥绾� - var drawEquepEtaCurveList = function () { - m_displayStyle.ColorEqualParaCurvesE = m_displayStyle.ColorE; - if ( - m_chartObject.EqualParaCurvesE == null || - m_chartObject.EqualParaCurvesE.length == 0 - ) { - m_isDrawEquepEtaCurve = false; - return; - } - for (var i = 0; i < m_chartObject.EqualParaCurvesE.length; i++) { - m_isDrawEquepEtaCurve = true; - var points = m_chartObject.EqualParaCurvesE[i].PointInfo; - if (points.length >= 4) { - //鏇茬嚎 - createCurveQH( - "EqualParaCurvesE" + i, - points, - 1, - m_displayStyle.ColorEqualParaCurvesE - ); - } else if (points.length == 3) { - //涔熸寜鐩寸嚎缁樺埗 - createLineQH( - "EqualParaCurvesEA" + i, - points[0], - points[1], - 1, - m_displayStyle.ColorEqualParaCurvesE - ); - createLineQH( - "EqualParaCurvesEB" + i, - points[1], - points[2], - 1, - m_displayStyle.ColorEqualParaCurvesE - ); - } else if (points.length == 2 || points.length == 3) { - //鐩寸嚎 - createLineQH( - "EqualParaCurvesE" + i, - points[0], - points[1], - 1, - m_displayStyle.ColorEqualParaCurvesE - ); - } else if (points.length == 1) { - //鐐� - createPointQH( - "EqualParaCurvesE" + i, - points[0], - 3, - m_displayStyle.ColorEqualParaCurvesE - ); - } - } - }; - //缁樺埗鎬ц兘鏇茬嚎 - var drawFeatCurve = function () { - //缁樺埗绾� - if (m_chartType == ConstParas.ChartType.Cut) { - if (m_displayStyle.LxpCurveBundleDispStyle == 0) { - //鍙粯鍒跺伐浣滄洸绾� - drawAllCurve_Cut_Wrk(); + return null; + }; + //缁樺埗/鏄剧ず 鍙傛暟鏌ヨ淇℃伅 + var drawQueryDataInfo = function (xPixel) { + //x鐨勫儚绱� + if (xPixel == null) return; + if (m_wrkCurveGrp == null) return; + if (m_wrkCurveGrp.PixelQH == null) return; + //娴侀噺 + //console.log(m_coordinatePara,m_chartSize, xPixel); + let flow_stdUnit = getActualValueQ(xPixel); + if (flow_stdUnit == null) return; + //console.log(flow_stdUnit); + if (flow_stdUnit < 0.1) return; - //鍒濆鍖栧伐浣滄洸绾� - intitalWrkCurveInfo(); + var flow_info = {}; + flow_info.text = getTranslateString('娴侀噺'); + flow_info.value = UnitHelper.getDispValueQ(UnitHelper.ConvertQ_fromM3H(m_unit.Q, flow_stdUnit)); + flow_info.unit = UnitHelper.GetUnitNameQ(m_unit.Q); + if (flow_info.value == null || flow_info.value == '') return; + // console.log(flow_info); - calcAllowRegionCurve(); + //鎵▼ + var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); + if (head_pixel_pt == null) return; + var head_stdUnit = getActualValueH(head_pixel_pt.Y); + var head_info = {}; + head_info.text = getTranslateString('鎵▼'); + head_info.unit = UnitHelper.GetUnitNameH(m_unit.H); + head_info.value = UnitHelper.getDispValueH(UnitHelper.ConvertH_fromM(m_unit.H, head_stdUnit)); - calcPerferRegionCurve(); + //鏁堢巼 + var eff_info = {}; + eff_info.value = ''; + if (m_isDispCurveQE) { + var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); + //console.log(" 1875 eta_pixel_pt",m_wrkCurveGrp.PixelQE,xPixel,eta_pixel_pt) + if (eta_pixel_pt != null) { + var eta_stdUnit = getActualValueE(eta_pixel_pt.Y); - } else if (m_displayStyle.LxpCurveBundleDispStyle == 1) { - //鍙粯鍒舵渶澶ф渶灏忓伐浣滄洸绾� - drawAllCurve_Cut_Full_singleColor(); + eff_info.text = getTranslateString('鏁堢巼'); + eff_info.value = parseFloat(eta_stdUnit.toFixed(1)); + eff_info.unit = '%'; + } + } - //鍒濆鍖栧伐浣滄洸绾� - intitalWrkCurveInfo(); + //鍔熺巼 + var power_info = {}; + power_info.value = ''; + var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); + if (power_pixel_pt != null) { + var power_stdUnit = getActualValueP(power_pixel_pt.Y); + power_info.text = getTranslateString('鍔熺巼'); + power_info.value = UnitHelper.getDispValueP(UnitHelper.ConvertP_fromKW(m_unit.P, power_stdUnit)); + power_info.unit = UnitHelper.GetUnitNameP(m_unit.P); + } - //缁樺埗鍨嬭氨 - drawSpectrumShape(); + var npsh_info = {}; //姹借殌 + npsh_info.text = getTranslateString('姹借殌'); + npsh_info.value = ''; + npsh_info.unit = 'm'; - //缁樺埗鍖哄煙 - calcAllowRegionCurve(); - calcPerferRegionCurve(); + if (m_wrkCurveGrp.PixelNPSH != null && m_isDispNpsh) { + var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); + //console.log(npsh_pixel_pt) + if (npsh_pixel_pt != null) { + npsh_info.unit = UnitHelper.GetUnitNameNPSH(m_unit.NPSH); + var npsh_stdUnit = getActualValueNPSH(npsh_pixel_pt.Y); + npsh_info.value = UnitHelper.getDispValueNPSH(UnitHelper.ConvertNPSH_fromM(npsh_stdUnit)); + } + } - //绛夋晥绾� - drawEquepEtaCurveList(); + var tip_html = ''; + var flow_html = flow_info.text + ': ' + flow_info.value + ' ' + flow_info.unit; + tip_html = flow_html; + //console.log("flow_info",flow_info); - //鏈�灏忔祦閲忕嚎 - drawMinContinueFlowCurve(); + var head_html = head_info.text + ': ' + head_info.value + ' ' + head_info.unit; + tip_html += '</br>' + head_html; + //console.log("head_info",head_info); - //缁樺埗鏂囧瓧 - drawChartTextAnnotation(); + if (eff_info.value != '') { + var eff_html = eff_info.text + ': ' + eff_info.value + ' ' + eff_info.unit; + tip_html += '</br>' + eff_html; + } + if (power_info.value != '') { + var power_html = power_info.text + ': ' + power_info.value + ' ' + power_info.unit; + tip_html += '</br>' + power_html; + } - } else { + if (npsh_info.value != '') { + var npsh_html = npsh_info.text + ': ' + npsh_info.value + ' ' + npsh_info.unit; + tip_html += '</br>' + npsh_html; + } - if (m_displayStyle.IsMultiColorCurve) { - drawAllCurve_Cut_Full_multiColor(); - } else { - drawAllCurve_Cut_Full_singleColor(); - } + m_infoDv4VerticalLine.style.display = 'block'; + m_infoDv4VerticalLine.innerHTML = tip_html; - //鍒濆鍖栧伐浣滄洸绾� - intitalWrkCurveInfo(); + //鑾峰彇鏌ヨ鏇茬嚎鏌ヨ寰楀埌鐨勬暟鎹� 缁欏弬鏁版煡璇娇鐢� + if (onChangeQueryDataCb != null) { + onChangeQueryDataCb({ + Q: flow_info, + H: head_info, + E: eff_info, + P: power_info, + NPSH: npsh_info, + }); + } + }; + //鏍规嵁娴侀噺鑾峰彇鐐� + var getGrpPointInWrkCurveByFlow = function (flow_stdUnit) { + if (flow_stdUnit == null) return null; + if (flow_stdUnit < 0.1) return null; - //缁樺埗鍨嬭氨 - drawSpectrumShape(); + //var UnitHelper.ConvertQ_fromM3H(m_unit.Q, flow_stdUnit) + var xPixel = getPixelValueQ(flow_stdUnit); - //缁樺埗鍖哄煙 - calcAllowRegionCurve(); - calcPerferRegionCurve(); + //鎵▼ + var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); + if (head_pixel_pt == null) return; + var head_stdUnit = getActualValueH(head_pixel_pt.Y); - //绛夋晥绾� - drawEquepEtaCurveList(); + //鏁堢巼 + var eta_stdUnit = 0; + if (m_isDispCurveQE) { + var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); + if (eta_pixel_pt != null) { + eta_stdUnit = getActualValueE(eta_pixel_pt.Y); + eta_stdUnit = parseFloat(eta_stdUnit.toFixed(1)); + } + } - //鏈�灏忔祦閲忕嚎 - drawMinContinueFlowCurve(); + //鍔熺巼 + var power_stdUnit = 0; + var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); + if (power_pixel_pt != null) { + power_stdUnit = getActualValueP(power_pixel_pt.Y); + } - //鍙惰疆澶栧緞鎻愮ず妗� - drawCurveParasPanel(); + var npsh_stdUnit = 0; + if (m_wrkCurveGrp.PixelNPSH != null) { + var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); + if (npsh_pixel_pt != null) { + npsh_stdUnit = getActualValueNPSH(npsh_pixel_pt.Y); + } + } + var grp_pt = {}; + grp_pt.Q = flow_stdUnit; + grp_pt.H = head_stdUnit; + grp_pt.E = eta_stdUnit; + grp_pt.P = power_stdUnit; + grp_pt.NPSH = npsh_stdUnit; - //缁樺埗鏂囧瓧 - drawChartTextAnnotation(); - } - } else if (m_chartType == ConstParas.ChartType.Speed) { - if (m_displayStyle.LxpCurveBundleDispStyle == 0) { - //鍙粯鍒跺伐浣滄洸绾� - drawAllCurve_Speed_Wrk(); - //鍒濆鍖栧伐浣滄洸绾� - intitalWrkCurveInfo(); + return grp_pt; + }; + //鏌ヨ绾� + var m_infoDv4VerticalLine; + var m_queryInfoIndicatorLineV; + var m_dispVerticalLine = false; + var onChangeQueryDataCb = null; //鏌ヨ澶栭儴鍥炶皟 + //璁剧疆鏄惁鏄剧ず + var setQueryIndicatVertLineVisible = function (disp) { + m_dispVerticalLine = disp; + if (disp) { + m_infoDv4VerticalLine.style.display = 'block'; + m_queryInfoIndicatorLineV.style.display = 'block'; + } else { + m_infoDv4VerticalLine.style.display = 'none'; + m_queryInfoIndicatorLineV.style.display = 'none'; + } + }; + //缁樺埗鍥捐〃(鏍稿績浠g爜) + var drawChart = function () { + //闈㈡澘(鍚潗鏍�) + drawDiagramPanel(); - } else { - drawAllCurve_Speed_Full(); - - //鍒濆鍖栧伐浣滄洸绾� - intitalWrkCurveInfo(); - - //绛夋晥绾� - drawEquepEtaCurveList(); - - //缁樺埗鍨嬭氨 - drawSpectrumShape(); - - calcAllowRegionCurve(); - calcPerferRegionCurve(); - - //缁樺埗鏂囧瓧 - drawChartTextAnnotation(); - } - } else if (m_chartType == ConstParas.ChartType.BaoLuo) { - - drawAllCurve_BaoLuo(); - - } else { - return; - } - }; - //鍒囧壊,宸ヤ綔鏇茬嚎 - var drawAllCurve_Cut_Wrk = function () { - - var fullCurveWidth = 2; - if ( - m_chartPointPara.AllowRegionInChartVisible == true || - m_chartPointPara.AllowRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - fullCurveWidth = 1; - } - if ( - m_chartPointPara.PerferRegionInChartVisible == true || - m_chartPointPara.PerferRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - fullCurveWidth = 1; - } - - if (m_chartObject.SimWaterCurveQH != null) { - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.SimWaterCurveQH, - fullCurveWidth - ); - - if (m_isDispCurveQE) - createCurveQE( - "SimWaterCurveQE", - m_chartObject.SimWaterCurveQE, - fullCurveWidth - ); - if (m_isDispCurveQP) - createCurveQP( - "SimWaterCurveQP", - m_chartObject.SimWaterCurveQP, - fullCurveWidth - ); - - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.SimWaterCurveNPSH, - fullCurveWidth - ); - - if (m_chartObject.SimJieZhiCurveQH != null) { - createCurveQH( - "SimJieZhiCurveQH", - m_chartObject.SimJieZhiCurveQH, - 1, - null, - true, - "10, 10" - ); - if (m_isDispCurveQE) - createCurveQE( - "SimJieZhiCurveQE", - m_chartObject.SimJieZhiCurveQE, - 1, - null, - true, - "10, 10" - ); - if (m_isDispCurveQP) - createCurveQP( - "SimJieZhiCurveQP", - m_chartObject.SimJieZhiCurveQP, - 1, - null, - true, - "10, 10" - ); - } - } else { - // - var curveMaxPathQH = createCurveQH( - "MaxWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - fullCurveWidth - ); - - if (m_isDispCurveQE) - createCurveQE( - "MaxWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - fullCurveWidth - ); - - if (m_isDispCurveQP) - createCurveQP( - "MaxWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - fullCurveWidth - ); - - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - fullCurveWidth - ); - } - }; - //鍒囧壊,鍏ㄩ儴, 鍗曡壊 - var drawAllCurve_Cut_Full_singleColor = function () { - if (m_pumpInfo.MaxD2 == null || m_pumpInfo.MaxD2 < 1) { - console.log("m_pumpInfo.MaxD2 is null:" + m_pumpInfo.MaxD2); - return; - } - - //鏈�澶у彾杞寰� - var maxCurveWidth = 2; - if ( - m_chartObject.MaxWaterCurveQH != null && - Math.abs(m_pumpInfo.WrkD2 - m_pumpInfo.MaxD2) > 1 - ) { - var curveMaxPathQH = createCurveQH( - "MaxWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - maxCurveWidth - ); - - if (m_isDispCurveQE && m_chartObject.MaxWaterCurveQE != null) { - createCurveQE( - "MaxWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - maxCurveWidth - ); - } - - if (m_isDispCurveQP && m_chartObject.MaxWaterCurveQP != null) { - createCurveQP( - "MaxWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - maxCurveWidth - ); - } - } - // 缁樺埗鍏朵粬鍒囧壊绾� - if (m_chartObject.SpectrumList != null && m_displayStyle.LxpCurveBundleDispStyle == 2) { - - for (var i = 0; i < m_chartObject.SpectrumList.length; i++) { - var subSpectrumCurve = m_chartObject.SpectrumList[i]; - - if (subSpectrumCurve.IsVisible == false) - continue; - - if (Math.abs(m_pumpInfo.WrkD2 - subSpectrumCurve.CurvePara) < 0.4) - continue; - if (Math.abs(m_pumpInfo.MinD2 - subSpectrumCurve.CurvePara) < 0.4) - continue; - - - - if (subSpectrumCurve.QH != null) { - var curve_points_pixl = createCurveQH( - "SpectrumList" + i, - subSpectrumCurve.QH, - maxCurveWidth - ); - } - - if (m_isDispCurveQP && subSpectrumCurve.QP != null) { - var curve_points_pixl = createCurveQP( - "SpectrumList" + i, - subSpectrumCurve.QP, - maxCurveWidth - ); - } - } - } - - //鏈�灏忓彾杞寰� - var minCurveWidth = 2; - if ( - m_chartObject.MinWaterCurveQH != null && - Math.abs(m_pumpInfo.WrkD2 - m_pumpInfo.MinD2) > 1 - ) { - var curveMinPathQH = createCurveQH( - "MinWaterCurveQH", - m_chartObject.MinWaterCurveQH, - minCurveWidth - ); - - if (m_isDispCurveQP && m_chartObject.MinWaterCurveQP != null) { - var curveMinPathQP = createCurveQP( - "MinWaterCurveQP", - m_chartObject.MinWaterCurveQP, - minCurveWidth - ); - } - } - - var color_wrk_curve = "black"; - if (m_chartObject != null) { - m_chartObject.WorkCurveColorQH = color_wrk_curve; - m_chartObject.WorkCurveColorQE = color_wrk_curve; - m_chartObject.WorkCurveColorQP = color_wrk_curve; - m_chartObject.WorkCurveColorQNPSH = color_wrk_curve; - } - - //宸ヤ綔鏇茬嚎 - var simuWaterCurveWidth = 3; - m_curveColorDict.push({ - color: color_wrk_curve, - para: m_pumpInfo.WrkD2, - type: "wrk", - }); - if (m_chartObject.SimWaterCurveQH != null) { - - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.SimWaterCurveQH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else if (m_chartObject.MaxWaterCurveQH != null) { - - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - - //鏁堢巼 - if (m_isDispCurveQE) { - removeElementById("MaxWaterCurveQE"); //鍙樉绀轰竴鏉℃晥鐜囩嚎 - if (m_chartObject.SimWaterCurveQE != null) { - var curveSimuPathQE = createCurveQE( - "SimWaterCurveQE", - m_chartObject.SimWaterCurveQE, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - var curveSimuPathQE = createCurveQE( - "SimWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - - //鍔熺巼 - if (m_isDispCurveQP) { - if (m_chartObject.SimWaterCurveQP != null) { - createCurveQP( - "SimWaterCurveQP", - m_chartObject.SimWaterCurveQP, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - createCurveQP( - "SimWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - - //浠嬭川 - if (m_chartObject.SimJieZhiCurveQH != null) { - createCurveQH( - "SimJieZhiCurveQH", - m_chartObject.SimJieZhiCurveQH, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQE && m_chartObject.SimJieZhiCurveQE != null) - createCurveQE( - "SimJieZhiCurveQE", - m_chartObject.SimJieZhiCurveQE, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQP && m_chartObject.SimJieZhiCurveQP != null) - createCurveQP( - "SimJieZhiCurveQP", - m_chartObject.SimJieZhiCurveQP, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - } - - //姘旇殌 - if (m_chartObject.NpshCurveStatus != 2) { - //鍙湁涓�鏉� - if (m_chartObject.SimWaterCurveNPSH != null) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.SimWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else if (m_chartObject.MaxWaterCurveNPSH != null) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } else { - if ( - m_chartObject.MaxWaterCurveNPSH && - m_chartObject.NpshMaxCurveDispStatus == 1 - ) { - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - maxCurveWidth, - color_max_curve - ); - } - if ( - m_chartObject.MinWaterCurveNPSH && - m_chartObject.NpshMinCurveDispStatus == 1 - ) { - createCurveNPSH( - "MinWaterCurveNPSH", - m_chartObject.MinWaterCurveNPSH, - minCurveWidth, - color_min_curve - ); - } - if (m_chartObject.SimWaterCurveNPSH) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.SimWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - }; - // 鍒囧壊,鍏ㄩ儴, 鍚叾浠栧垏鍓茬嚎(澶氬僵) - var drawAllCurve_Cut_Full_multiColor = function () { - if (m_pumpInfo.MaxD2 == null || m_pumpInfo.MaxD2 < 1) { - return; - } - - m_curveColorDict = []; //鏇茬嚎棰滆壊 - - //鏈�澶у彾杞寰� - if ( - m_chartObject.MaxWaterCurveQH != null && - Math.abs(m_pumpInfo.WrkD2 - m_pumpInfo.MaxD2) > 1 - ) { - var maxCurveWidth = 2; - var color_max_curve = getCurveColor(0); - - m_curveColorDict.push({ - color: color_max_curve, - para: m_pumpInfo.MaxD2, - type: "max", - }); - - var curveMaxPathQH = createCurveQH( - "MaxWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - maxCurveWidth, - color_max_curve - ); - - if (m_isDispCurveQE && m_chartObject.MaxWaterCurveQE != null) { - createCurveQE( - "MaxWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - maxCurveWidth, - color_max_curve - ); - } - - if (m_isDispCurveQP && m_chartObject.MaxWaterCurveQP != null) { - createCurveQP( - "MaxWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - maxCurveWidth, - color_max_curve - ); - } - } - - var color_wrk_curve = "black"; - if (m_chartObject != null) { - m_chartObject.WorkCurveColorQH = color_wrk_curve; - m_chartObject.WorkCurveColorQE = color_wrk_curve; - m_chartObject.WorkCurveColorQP = color_wrk_curve; - m_chartObject.WorkCurveColorQNPSH = color_wrk_curve; - } - - //宸ヤ綔鏇茬嚎 - var simuWaterCurveWidth = 3; - m_curveColorDict.push({ - color: color_wrk_curve, - para: m_pumpInfo.WrkD2, - type: "wrk", - }); - if (m_chartObject.SimWaterCurveQH != null) { - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.SimWaterCurveQH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - if (m_isDispCurveQE) { - removeElementById("MaxWaterCurveQE"); //鍙樉绀轰竴鏉℃晥鐜囩嚎 - if (m_chartObject.SimWaterCurveQE != null) { - var curveSimuPathQE = createCurveQE( - "SimWaterCurveQE", - m_chartObject.SimWaterCurveQE, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - var curveSimuPathQE = createCurveQE( - "SimWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - if (m_isDispCurveQP) { - if (m_chartObject.SimWaterCurveQP != null) { - createCurveQP( - "SimWaterCurveQP", - m_chartObject.SimWaterCurveQP, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - createCurveQP( - "SimWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - - //浠嬭川宸ヤ綔鏇茬嚎 - if (m_chartObject.SimJieZhiCurveQH != null) { - createCurveQH( - "SimJieZhiCurveQH", - m_chartObject.SimJieZhiCurveQH, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQE && m_chartObject.SimJieZhiCurveQE != null) - createCurveQE( - "SimJieZhiCurveQE", - m_chartObject.SimJieZhiCurveQE, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQP && m_chartObject.SimJieZhiCurveQP != null) - createCurveQP( - "SimJieZhiCurveQP", - m_chartObject.SimJieZhiCurveQP, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - } - // 缁樺埗鍏朵粬鍒囧壊绾� - if (m_chartObject.SpectrumList != null) { - - for (var i = 0; i < m_chartObject.SpectrumList.length; i++) { - var subSpectrumCurve = m_chartObject.SpectrumList[i]; - - if (subSpectrumCurve.IsVisible == false) - //鍙兘闈犲緱澶繎, 灏变笉鏄剧ず浜� - continue; - if (Math.abs(m_pumpInfo.WrkD2 - subSpectrumCurve.CurvePara) < 0.4) - continue; - if (Math.abs(m_pumpInfo.MinD2 - subSpectrumCurve.CurvePara) < 0.4) - continue; - - var color_curve = getCurveColor(m_curveColorDict.length); - - m_curveColorDict.push({ - color: color_curve, - para: subSpectrumCurve.CurvePara, - type: "simu", - }); - - if (subSpectrumCurve.QH != null) { - var curve_points_pixl = createCurveQH( - "SpectrumList" + i, - subSpectrumCurve.QH, - 2, - color_curve - ); - } - - if (m_isDispCurveQP && subSpectrumCurve.QP != null) { - var curve_points_pixl = createCurveQP( - "SpectrumList" + i, - subSpectrumCurve.QP, - 2, - color_curve - ); - } - } - } - - //鏈�灏忓彾杞寰� - var minCurveWidth = 2; - if ( - m_chartObject.MinWaterCurveQH != null && - Math.abs(m_pumpInfo.WrkD2 - m_pumpInfo.MinD2) > 1 - ) { - var color_min_curve = getCurveColor(m_curveColorDict.length); - m_curveColorDict.push({ - color: color_min_curve, - para: m_pumpInfo.MinD2, - type: "min", - }); - - var curveMinPathQH = createCurveQH( - "MinWaterCurveQH", - m_chartObject.MinWaterCurveQH, - minCurveWidth, - color_min_curve - ); - - if (m_isDispCurveQP && m_chartObject.MinWaterCurveQP != null) { - var curveMinPathQP = createCurveQP( - "MinWaterCurveQP", - m_chartObject.MinWaterCurveQP, - minCurveWidth, - color_min_curve - ); - } - } - - //姘旇殌 - if (m_chartObject.NpshCurveStatus != 2) { - //鍙湁涓�鏉� - if (m_chartObject.SimWaterCurveNPSH != null) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.SimWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else if (m_chartObject.MaxWaterCurveNPSH != null) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } else { - if ( - m_chartObject.MaxWaterCurveNPSH && - m_chartObject.NpshMaxCurveDispStatus == 1 - ) { - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - maxCurveWidth, - color_max_curve - ); - } - if ( - m_chartObject.MinWaterCurveNPSH && - m_chartObject.NpshMinCurveDispStatus == 1 - ) { - createCurveNPSH( - "MinWaterCurveNPSH", - m_chartObject.MinWaterCurveNPSH, - minCurveWidth, - color_min_curve - ); - } - if (m_chartObject.SimWaterCurveNPSH) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.SimWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - }; - //鍙惰疆澶栧緞鍙傛暟闈㈡澘妗� - var drawCurveParasPanel = function () { - if (m_displayStyle.IsDispCurveParasPanel == false) - return; - if (m_displayStyle.IsMultiColorCurve == false) - return; - if (m_curveColorDict == null) return; - var curve_count = m_curveColorDict.length; - if (curve_count < 2) return; - - var tip_cell_height = 20; - - var _curveDiaTipRectangleWidth = 70; - var _curveDiaTipRectangleHeight = curve_count * tip_cell_height; - - m_curveColorDict.sort((a, b) => b.para - a.para); - - for (var i = 0; i < curve_count; i++) { - var sapce = tip_cell_height * i + tip_cell_height / 2; - - var para = m_curveColorDict[i].para; - var color = m_curveColorDict[i].color; - - createLine_pixel( - null, - { - X: m_chartSize.DiagramRight - _curveDiaTipRectangleWidth, - Y: m_chartSize.UpDiagram.Up + tip_cell_height * i + tip_cell_height, - }, - { - X: m_chartSize.DiagramRight, - Y: m_chartSize.UpDiagram.Up + tip_cell_height * i + tip_cell_height, - }, - 1, - "black" - ); - - drawText_pixel( - null, - "--- 脴" + para, - { - X: m_chartSize.DiagramRight - _curveDiaTipRectangleWidth + 6, - Y: m_chartSize.UpDiagram.Up + sapce + 5, - }, - 13, - color, - "start", - "font-weight:bold;" - ); - } - createLine_pixel( - null, - { - X: m_chartSize.DiagramRight - _curveDiaTipRectangleWidth, - Y: m_chartSize.UpDiagram.Up, - }, - { - X: m_chartSize.DiagramRight - _curveDiaTipRectangleWidth, - Y: m_chartSize.UpDiagram.Up + _curveDiaTipRectangleHeight, - }, - 1, - "black" - ); - }; - - //鍙橀,鍏ㄩ儴鏇茬嚎 - var drawAllCurve_Speed_Full = function () { - // var fullCurveWidth = 2; - // if ( - // m_chartPointPara.AllowRegionInChartVisible == true || - // m_chartPointPara.AllowRegionDispStyle == - // ConstParas.ChartRegionDispStyle.Blod - // ) { - // fullCurveWidth = 1; - // } - // if ( - // m_chartPointPara.PerferRegionInChartVisible == true || - // m_chartPointPara.PerferRegionDispStyle == - // ConstParas.ChartRegionDispStyle.Blod - // ) { - // fullCurveWidth = 1; - // } - - //鏈�澶� - if ( - m_chartObject.MaxWaterCurveQH != null && - Math.abs(m_pumpInfo.WrkSpeed - m_pumpInfo.Ratedn) > 1 - ) { - - var maxCurveWidth = 2; - - var curveMaxPathQH = createCurveQH( - "MaxWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - maxCurveWidth - ); - - if (m_isDispCurveQE && m_chartObject.MaxWaterCurveQE != null) { - createCurveQE( - "MaxWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - maxCurveWidth - ); - } - - if (m_isDispCurveQP && m_chartObject.MaxWaterCurveQP != null) { - createCurveQP( - "MaxWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - maxCurveWidth - ); - } - - if (m_chartObject.MaxWaterCurveNPSH) { - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - maxCurveWidth - ); - } - } - - //鏈�灏忛�熷害 - if ( - m_chartObject.MinWaterCurveQH != null && - Math.abs(m_pumpInfo.WrkSpeed - m_pumpInfo.MinSpeed) > 1 - ) { - var minCurveWidth = 2; - var curveMinPathQH = createCurveQH( - "MinWaterCurveQH", - m_chartObject.MinWaterCurveQH, - minCurveWidth - ); - - if (m_isDispCurveQP && m_chartObject.MinWaterCurveQP != null) { - var curveMinPathQP = createCurveQP( - "MinWaterCurveQP", - m_chartObject.MinWaterCurveQP, - minCurveWidth - ); - } - } - - var color_wrk_curve = "black"; - if (m_chartObject != null) { - m_chartObject.WorkCurveColorQH = color_wrk_curve; - m_chartObject.WorkCurveColorQE = color_wrk_curve; - m_chartObject.WorkCurveColorQP = color_wrk_curve; - m_chartObject.WorkCurveColorQNPSH = color_wrk_curve; - } - - //宸ヤ綔鏇茬嚎 - var simuWaterCurveWidth = 3; - - if (m_chartObject.SimWaterCurveQH != null) { - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.SimWaterCurveQH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - - //鏁堢巼 - if (m_isDispCurveQE) { - removeElementById("MaxWaterCurveQE"); //鍙樉绀轰竴鏉℃晥鐜囩嚎 - if (m_chartObject.SimWaterCurveQE != null) { - var curveSimuPathQE = createCurveQE( - "SimWaterCurveQE", - m_chartObject.SimWaterCurveQE, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - var curveSimuPathQE = createCurveQE( - "SimWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - - //鍔熺巼 - if (m_isDispCurveQP) { - if (m_chartObject.SimWaterCurveQP != null) { - createCurveQP( - "SimWaterCurveQP", - m_chartObject.SimWaterCurveQP, - simuWaterCurveWidth, - color_wrk_curve - ); - } else { - createCurveQP( - "SimWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - simuWaterCurveWidth, - color_wrk_curve - ); - } - } - - //姘旇殌 - if (m_chartObject.SimWaterCurveNPSH != null) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.SimWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } else if (m_chartObject.MaxWaterCurveNPSH != null) { - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - simuWaterCurveWidth, - color_wrk_curve - ); - } - - //浠嬭川 - if (m_chartObject.SimJieZhiCurveQH != null) { - createCurveQH( - "SimJieZhiCurveQH", - m_chartObject.SimJieZhiCurveQH, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQE && m_chartObject.SimJieZhiCurveQE != null) - createCurveQE( - "SimJieZhiCurveQE", - m_chartObject.SimJieZhiCurveQE, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQP && m_chartObject.SimJieZhiCurveQP != null) - createCurveQP( - "SimJieZhiCurveQP", - m_chartObject.SimJieZhiCurveQP, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - } - }; - //鍙橀,宸ヤ綔鏇茬嚎 - var drawAllCurve_Speed_Wrk = function () { - var fullCurveWidth = 2; - if ( - m_chartPointPara.AllowRegionInChartVisible == true || - m_chartPointPara.AllowRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - fullCurveWidth = 1; - } - if ( - m_chartPointPara.PerferRegionInChartVisible == true || - m_chartPointPara.PerferRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - fullCurveWidth = 1; - } - - if (m_chartObject.SimWaterCurveQH != null) { - var curveSimuPathQH = createCurveQH( - "SimWaterCurveQH", - m_chartObject.SimWaterCurveQH, - fullCurveWidth - ); - - if (m_isDispCurveQE) - createCurveQE( - "SimWaterCurveQE", - m_chartObject.SimWaterCurveQE, - fullCurveWidth - ); - if (m_isDispCurveQP) - createCurveQP( - "SimWaterCurveQP", - m_chartObject.SimWaterCurveQP, - fullCurveWidth - ); - - createCurveNPSH( - "SimWaterCurveNPSH", - m_chartObject.SimWaterCurveNPSH, - fullCurveWidth - ); - - if (m_chartObject.SimJieZhiCurveQH != null) { - createCurveQH( - "SimJieZhiCurveQH", - m_chartObject.SimJieZhiCurveQH, - 1, - null, - true, - "10, 10" - ); - if (m_isDispCurveQE) - createCurveQE( - "SimJieZhiCurveQE", - m_chartObject.SimJieZhiCurveQE, - 1, - null, - true, - "10, 10" - ); - if (m_isDispCurveQP) - createCurveQP( - "SimJieZhiCurveQP", - m_chartObject.SimJieZhiCurveQP, - 1, - null, - true, - "10, 10" - ); - } - } else { - var curveMaxPathQH = createCurveQH( - "MaxWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - fullCurveWidth - ); - - if (m_isDispCurveQE) - createCurveQE( - "MaxWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - fullCurveWidth - ); - - if (m_isDispCurveQP) - createCurveQP( - "MaxWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - fullCurveWidth - ); - - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - fullCurveWidth - ); - } - //鍒濆鍖栧伐浣滄洸绾� - intitalWrkCurveInfo(); - - calcAllowRegionCurve(); - calcPerferRegionCurve(); - }; - // - var drawAllCurve_BaoLuo = function () { - var maxCurveWidth = 2; - if ( - m_chartPointPara.AllowRegionInChartVisible == true || - m_chartPointPara.AllowRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - maxCurveWidth = 1; - } - if ( - m_chartPointPara.PerferRegionInChartVisible == true || - m_chartPointPara.PerferRegionDispStyle == - ConstParas.ChartRegionDispStyle.Blod - ) { - maxCurveWidth = 1; - } - var curveMaxPathQH = createCurveQH( - "MaxWaterCurveQH", - m_chartObject.MaxWaterCurveQH, - maxCurveWidth - ); - - - if (m_isDispCurveQE) - createCurveQE( - "MaxWaterCurveQE", - m_chartObject.MaxWaterCurveQE, - maxCurveWidth - ); - if (m_isDispCurveQP) - createCurveQP( - "MaxWaterCurveQP", - m_chartObject.MaxWaterCurveQP, - maxCurveWidth - ); - createCurveNPSH( - "MaxWaterCurveNPSH", - m_chartObject.MaxWaterCurveNPSH, - maxCurveWidth - ); - - //浠嬭川 - if (m_chartObject.SimJieZhiCurveQH != null) { - var simuWaterCurveWidth = 1; - var color_wrk_curve = "black"; - createCurveQH( - "SimJieZhiCurveQH", - m_chartObject.SimJieZhiCurveQH, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQE && m_chartObject.SimJieZhiCurveQE != null) - createCurveQE( - "SimJieZhiCurveQE", - m_chartObject.SimJieZhiCurveQE, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - if (m_isDispCurveQP && m_chartObject.SimJieZhiCurveQP != null) - createCurveQP( - "SimJieZhiCurveQP", - m_chartObject.SimJieZhiCurveQP, - simuWaterCurveWidth, - color_wrk_curve, - true, - "10, 10" - ); - } - - //鍒濆鍖栧伐浣滄洸绾� - intitalWrkCurveInfo(); - - calcAllowRegionCurve(); - - calcPerferRegionCurve(); - }; - //缁樺埗姘村嵃(鏂囧瓧) - var drawTextWaterMark = function (text) { - if (!text) { - return; - } - - var logoStyle = - "-webkit-transform: rotate(5deg);-moz-transform: rotate(5deg);transform: rotate(15deg);fill:#000000;fill-opacity:0.6;font-weight:bold;stroke-width:1px;font-size:16px;z-index:0"; - - var w = 30; - var h = 80; - var isDrawSecond = true; - var left = - (m_chartSize.DiagramRight - m_chartSize.DiagramLeft - text.length * w) / - 2; - - for (var i = 0; i < text.length; i++) { - m_svg.createText( - { - opacity: 0.5, - y: m_chartSize.SpaceTop + h + i * 10, - x: m_chartSize.DiagramLeft + left + i * w, - }, - logoStyle, - text[i], - 0, - "WaterMarkText1" - ); - - if (isDrawSecond) { - var endHeight = h + text.length * 10; //: h + text.length * 10 - 80; - m_svg.createText( - { - opacity: 0.5, - y: m_chartSize.UpDiagram.Bottom - endHeight + i * 10, - x: m_chartSize.DiagramLeft + left + i * w, - }, - logoStyle, - text[i], - 0, - "WaterMarkText1" - ); - } - } - }; - - //缁樺埗姘村嵃(鍥剧墖) - var drawLogoWaterMark = function () { - var watermark_img_url = "static/img/watermark.png"; - - var img_watermark = new Image(); - img_watermark.src = watermark_img_url; - img_watermark.onload = function () { - var watermark_image_width_real = img_watermark.width; - var watermark_image_height_real = img_watermark.height; - - var ratio_byHeight = - (m_chartSize.TotalHeight * 0.2) / watermark_image_height_real; - var ratio_byWidth = - (m_chartSize.TotalWidth * 0.2) / watermark_image_width_real; - - var ratio_waterMark = Math.min(ratio_byHeight, ratio_byWidth); - - var watermark_image_width = watermark_image_width_real * ratio_waterMark; - var watermark_image_height = - watermark_image_height_real * ratio_waterMark; - - var logoStyle = - "-webkit-transform: rotate(5deg);-moz-transform: rotate(5deg);transform: rotate(15deg);fill:#000000;fill-opacity:0.6;font-weight:bold;stroke-width:1px;font-size:16px;z-index:0"; - var logoPosi1 = { - opacity: 0.9, - y: (m_chartSize.TotalHeight * 1) / 4 - watermark_image_height / 2, - x: (m_chartSize.TotalWidth * 1) / 4 - watermark_image_width / 2, - width: watermark_image_width, - height: watermark_image_height, - }; - m_svg.createImage( - logoPosi1, - logoStyle, - "WaterMarkImage2", - watermark_img_url - ); - - var logoPosi2 = { - opacity: 0.9, - y: (m_chartSize.TotalHeight * 3) / 4 - watermark_image_height / 2, - x: (m_chartSize.TotalWidth * 1) / 4 - watermark_image_width / 2, - width: watermark_image_width, - height: watermark_image_height, - }; - m_svg.createImage( - logoPosi2, - logoStyle, - "WaterMarkImage2", - watermark_img_url - ); - - var logoPosi3 = { - opacity: 0.9, - y: (m_chartSize.TotalHeight * 1) / 4 - watermark_image_height / 2, - x: (m_chartSize.TotalWidth * 3) / 4 - watermark_image_width / 2, - width: watermark_image_width, - height: watermark_image_height, - }; - m_svg.createImage( - logoPosi3, - logoStyle, - "WaterMarkImage3", - watermark_img_url - ); - - var logoPosi4 = { - opacity: 0.9, - y: (m_chartSize.TotalHeight * 3) / 4 - watermark_image_height / 2, - x: (m_chartSize.TotalWidth * 3) / 4 - watermark_image_width / 2, - width: watermark_image_width, - height: watermark_image_height, - }; - m_svg.createImage( - logoPosi4, - logoStyle, - "WaterMarkImage4", - watermark_img_url - ); - }; - }; - //缁樺埗 瑁呯疆鏇茬嚎 - var drawEquipmentCurve = function () { - removeElementById("EquipmentCurve"); - if (m_equipCurve == null) return; - if (m_equipCurve.DpSectPt == null) return; - if (m_equipCurve.isVisble == false) return; - - - var pointNumber = 20; - var equipmentCurvePts = []; - var space = m_equipCurve.DpSectPt.X / (pointNumber - 1.0); - var k = - (m_equipCurve.DpSectPt.Y - m_equipCurve.ZeroH) / - (m_equipCurve.DpSectPt.X * m_equipCurve.DpSectPt.X); - - for (var i = 0; i < pointNumber; i++) { - var pt = {}; - pt.X = space * i; - if (Object.is(pt.X, NaN)) continue; - - pt.Y = m_equipCurve.ZeroH + k * pt.X * pt.X; - if ( - pt.Y < - m_coordinatePara.DispMinH - - m_coordinatePara.DislocationNumUp * m_coordinatePara.SpaceH - ) - continue; - equipmentCurvePts.push(pt); - } - - if (equipmentCurvePts.length < 4) return; - - createCurveQH( - "EquipmentCurve", - equipmentCurvePts, - 1, - m_displayStyle.ColorEquipment - ); - }; - - //缁樺埗鏌ヨ绔栫洿鎸囧绾� - var drawQueryIndicatVertLine = function (index) { - - // - removeElementById("infoDv4VerticalLine1"); - removeElementById("infoDv4VerticalLine2"); - - var obj_divChart = document.getElementById(m_divChartName); - - //鍏堝垱寤虹敤浜庢斁缃煡璇俊鎭殑Div - var info_div1 = document.createElement("div"); - info_div1.innerHTML = "<lable style='font-size:7px'>" + getTranslateString("娴侀噺") + "</label>"; - info_div1.id = "infoDv4VerticalLine1"; - info_div1.style.display = 'none'; - info_div1.style.position = 'relative'; - info_div1.style.color = 'gray'; - info_div1.style.fontSize = '9px'; - info_div1.style.textAlign = "left"; - info_div1.style.width = "120px"; - info_div1.style.left = (m_chartSize.DiagramRight - 120).toString() + "px"; - info_div1.style.top = (32 - m_chartSize.TotalHeight).toString() + "px"; - - obj_divChart.appendChild(info_div1); - - - var info_div2 = document.createElement("div"); - info_div2.innerHTML = "<lable style='font-size:7px'>" + getTranslateString("娴侀噺") + "</label>"; - info_div2.id = "infoDv4VerticalLine2"; - info_div2.style.display = 'none'; - info_div2.style.position = 'relative'; - info_div2.style.color = 'gray'; - info_div2.style.fontSize = '9px'; - info_div2.style.textAlign = "left"; - info_div2.style.width = "120px"; - info_div2.style.left = (m_chartSize.DiagramRight - 120).toString() + "px"; - info_div2.style.top = (120 - m_chartSize.TotalHeight).toString() + "px"; - - obj_divChart.appendChild(info_div2); - - - - var attr4verticalLine1 = { - "stroke": "rgb(136 136 221)", - "stroke-width": "3", - "fill": "none", - "zIndex": 100, - "stroke-dasharray": "18 3", - "cursor": 'pointer', - "stroke-opacity": '1', - "shape-rendering": "geometricPrecision", - }; - var attr4verticalLine2 = { - "stroke": "rgb(175 175 235)", - "stroke-width": "3", - "fill": "none", - "zIndex": 100, - "stroke-dasharray": "18 3", - "cursor": 'pointer', - "stroke-opacity": '1', - "shape-rendering": "geometricPrecision", - }; - // 寮�濮嬩綅缃� - var xStartValuePixel = (m_chartSize.DiagramLeft + m_chartSize.DiagramRight) / 2; - - - //鍒涘缓绔栫洿绾� - var pathValue1 = []; - var vertialLinePathName1 = "verticalLine1"; - pathValue1.push("M ", xStartValuePixel, " ", m_chartSize.UpDiagram.Up, " L ", xStartValuePixel, " ", m_chartSize.DownDiagram.Bottom); - m_svg.createPath(vertialLinePathName1, pathValue1.join(''), { - id: vertialLinePathName1 - }, attr4verticalLine1, null); - - var pathValue2 = []; - var vertialLinePathName2 = "verticalLine2"; - pathValue2.push("M ", xStartValuePixel, " ", m_chartSize.UpDiagram.Up, " L ", xStartValuePixel, " ", m_chartSize.DownDiagram.Bottom); - m_svg.createPath(vertialLinePathName2, pathValue1.join(''), { - id: vertialLinePathName2 - }, attr4verticalLine2, null); - - - drawQueryDataInfoByPixel(xStartValuePixel, 1); - drawQueryDataInfoByPixel(xStartValuePixel, 2); - - var isMoveVerticalLine1 = false; - var objIndicatorLine1 = document.getElementById("verticalLine1"); - objIndicatorLine1.onmousedown = function (e) { - isMoveVerticalLine1 = true; - e.preventDefault(); - } - - var isMoveVerticalLine2 = false; - var objIndicatorLine2 = document.getElementById("verticalLine2"); - objIndicatorLine2.onmousedown = function (e) { - isMoveVerticalLine2 = true; - e.preventDefault(); - } - - obj_divChart.onmousemove = function (e) { - if (isMoveVerticalLine1 == true) { - if (objIndicatorLine1 == null) - return; - var svg_root = m_svg.getRootNode(); - const box = svg_root.getBoundingClientRect(); - var top = box.top + window.scrollY - document.documentElement.clientTop; - var left = box.left + window.scrollX - document.documentElement.clientLeft - var e = window.event || e; - if (e.clientX - left > m_chartSize.DiagramLeft && - m_chartSize.DiagramRight + left - e.clientX > 0 && - e.clientY - top > m_chartSize.DiagramTop && - m_chartSize.DiagramBottom + top - e.clientY > 0) { - //褰撳墠榧犳爣浣嶇疆 x鐨勫儚绱� - var xPixel = parseFloat(e.clientX - left); - // - drawQueryDataInfoByPixel(xPixel, 1); - //淇敼浣嶇疆 - var pathValue1 = []; - pathValue1.push("M ", xPixel, " ", m_chartSize.UpDiagram.Up, " L ", xPixel, " ", m_chartSize.DownDiagram.Bottom); - objIndicatorLine1.setAttribute('d', pathValue1.join('')); - } - } - - if (isMoveVerticalLine2 == true) { - if (objIndicatorLine2 == null) - return; - var svg_root = m_svg.getRootNode(); - const box = svg_root.getBoundingClientRect(); - var top = box.top + window.scrollY - document.documentElement.clientTop; - var left = box.left + window.scrollX - document.documentElement.clientLeft - var e = window.event || e; - if (e.clientX - left > m_chartSize.DiagramLeft && - m_chartSize.DiagramRight + left - e.clientX > 0 && - e.clientY - top > m_chartSize.DiagramTop && - m_chartSize.DiagramBottom + top - e.clientY > 0) { - //褰撳墠榧犳爣浣嶇疆 x鐨勫儚绱� - var xPixel = parseFloat(e.clientX - left); - // - drawQueryDataInfoByPixel(xPixel, 2); - //淇敼浣嶇疆 - var pathValue1 = []; - pathValue1.push("M ", xPixel, " ", m_chartSize.UpDiagram.Up, " L ", xPixel, " ", m_chartSize.DownDiagram.Bottom); - objIndicatorLine2.setAttribute('d', pathValue1.join('')); - } - } - }; - obj_divChart.onmouseup = function (e) { - if (isMoveVerticalLine1) { - isMoveVerticalLine1 = false; - } - if (isMoveVerticalLine2) { - isMoveVerticalLine2 = false; - } - }; - - - //璁剧疆鏄剧ず - setQueryIndicatVertLineVisible(m_dispVerticalLine1, 1); - setQueryIndicatVertLineVisible(m_dispVerticalLine2, 2); - }; - //鑾峰彇x鍦╟urve鐨�(X Y)鐐瑰�� (鍍忕礌鐐�) - var getBezierPointY = function (curve, x) { - if (curve == null) return null; - var iPtCount = curve.length; - - if (x < curve[0].Point0.X - 1) { - return null; - } - if (x > curve[iPtCount - 1].Point3.X + 1) { - return null; - } - - for (var i = 0; i < iPtCount; i++) { - if (x == curve[i].Point0.X) { - return { - X: curve[i].Point0.X, - Y: curve[i].Point0.Y, - }; - } - if (x == curve[i].Point3.X) { - return { - X: curve[i].Point3.X, - Y: curve[i].Point3.Y, - }; - } - if (x > curve[i].Point0.X && x < curve[i].Point3.X) { - var ptBizer = curve[i]; - // - try { - var minDis = Math.abs(ptBizer.Point3.X - ptBizer.Point0.X); - var sectY = null; - var sectX = null; - for (var uu = 0; uu <= 1; uu = uu + 0.05) { - var x0 = ptBizer.Point0.X * uu * uu * uu; - var x1 = 3 * ptBizer.Point1.X * uu * uu * (1 - uu); - var x2 = 3 * ptBizer.Point2.X * uu * (1 - uu) * (1 - uu); - var x3 = ptBizer.Point3.X * (1 - uu) * (1 - uu) * (1 - uu); - - var curveX = x0 + x1 + x2 + x3; - if (Math.abs(curveX - x) < minDis) { - var y0 = ptBizer.Point0.Y * uu * uu * uu; - var y1 = 3 * ptBizer.Point1.Y * uu * uu * (1 - uu); - var y2 = 3 * ptBizer.Point2.Y * uu * (1 - uu) * (1 - uu); - var y3 = ptBizer.Point3.Y * (1 - uu) * (1 - uu) * (1 - uu); - minDis = Math.abs(curveX - x); - sectY = y0 + y1 + y2 + y3; - sectX = curveX; - } - } - // - if (sectY != null && sectX != null) { - return { - X: sectX, - Y: sectY, - }; - } - } catch (ex) { - console.log("getBezierPointY error", curve, x); - return null; - } - } - } - - if ( - x > curve[iPtCount - 1].Point3.X - 1 && - x < curve[iPtCount - 1].Point3.X + 5 - ) { - return { - X: curve[iPtCount - 1].Point3.X, - Y: curve[iPtCount - 1].Point3.Y, - }; - } - - return null; - }; - //鑾峰彇x鍦╟urve鐨�(X Y)鐐瑰�� (鍍忕礌鐐�) - var getBezierPointX = function (curve, y) { - if (curve == null) return null; - var iPtCount = curve.length; - - if (y < curve[0].Point0.Y && y < curve[iPtCount - 1].Point3.Y) { - return null; - } - if (y > curve[0].Point0.Y && y > curve[iPtCount - 1].Point3.Y) { - return null; - } - - for (var i = 0; i < iPtCount; i++) { - var ptBizer = curve[i]; - - if (y < ptBizer.Point0.Y && y < ptBizer.Point3.Y) { - continue; - } - if (y > ptBizer.Point0.Y && y > ptBizer.Point3.Y) { - continue; - } - - // - try { - var minDis = Math.abs(ptBizer.Point3.Y - ptBizer.Point0.Y); - - var sectY = null; - var sectX = null; - for (var uu = 0; uu <= 1; uu = uu + 0.05) { - var x0 = ptBizer.Point0.X * uu * uu * uu; - var x1 = 3 * ptBizer.Point1.X * uu * uu * (1 - uu); - var x2 = 3 * ptBizer.Point2.X * uu * (1 - uu) * (1 - uu); - var x3 = ptBizer.Point3.X * (1 - uu) * (1 - uu) * (1 - uu); - - var y0 = ptBizer.Point0.Y * uu * uu * uu; - var y1 = 3 * ptBizer.Point1.Y * uu * uu * (1 - uu); - var y2 = 3 * ptBizer.Point2.Y * uu * (1 - uu) * (1 - uu); - var y3 = ptBizer.Point3.Y * (1 - uu) * (1 - uu) * (1 - uu); - - var curveX = x0 + x1 + x2 + x3; - var curveY = y0 + y1 + y2 + y3; - - if (Math.abs(curveY - y) < minDis) { - minDis = Math.abs(curveY - y); - sectY = curveY; - sectX = curveX; - } - } - // - if (sectY != null && sectX != null) { - return { - X: sectX, - Y: sectY, - }; - } - } catch (ex) { - //alert(ex.message); - return null; - } - } - - return null; - }; - // - var calculateE = function (Q, H, P, midu) { - var gavity = 9.81; - P = P * 1000;//姝ゅ 1000 鏄� kw鎹㈡垚w - Q = Q / 3600;//姝ゅ 3600 鏄� 灏忔椂鎹㈡垚绉� - var E = 0; - if (P < 0.1) - E = 0; - else - E = midu * gavity * Q * H / P; - return Math.round(E * 100, 2);//鏁堢巼鐢ㄧ櫨鍒嗘暟 - }; - var calculateP = function (Q, H, E, midu) { - var gavity = 9.81; - H = H * 1000 / gavity;//鎹㈡垚m - E = E / 100;//鏁堢巼鐢ㄧ櫨鍒嗘暟 - Q = Q / 1000;//姝ゅ 1000 鏄� L/s - var P = 0; - if (E < 0.01) - P = 0; - else - P = midu * gavity * Q * H / E; - return Math.round(P / 1000, 2);//姝ゅ 1000 鏄� kw鎹㈡垚w - }; - //缁樺埗/鏄剧ず 鍙傛暟鏌ヨ淇℃伅 - var drawQueryDataInfoByPixel = function (xPixel, index) {//x鐨勫儚绱� - if (xPixel == null) - return; - if (m_wrkCurveGrp == null) - return; - if (m_wrkCurveGrp.PixelQH == null) - return; - //娴侀噺 - let flow_m3h = getActualValueQ(xPixel); - if (flow_m3h == null) - return; - - drawQueryDataInfoByReal(flow_m3h, xPixel, index); - }; - //缁樺埗/鏄剧ず 鍙傛暟鏌ヨ淇℃伅 ( flow_m3h 瀹為檯鍊� ) - var drawQueryDataInfoByReal = function (flow_m3h, xPixel, index) { - - if (flow_m3h < 0.1) - return; - - var query_pt = {}; - - - var flow_info = {}; - flow_info.text = getTranslateString("娴侀噺"); - flow_info.value = UnitHelper.getDispValueQ(UnitHelper.ConvertQ_fromM3H(m_unit.Q, flow_m3h)); - flow_info.unit = UnitHelper.GetUnitNameQ(m_unit.Q); - if (flow_info.value == null || flow_info.value == "") - return; - query_pt.Q = flow_m3h; - - //鎵▼ - var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); - if (head_pixel_pt == null) - return; - var head_m = getActualValueH(head_pixel_pt.Y); - var head_info = {}; - head_info.text = getTranslateString("鎵▼"); - head_info.unit = UnitHelper.GetUnitNameH(m_unit.H); - head_info.value = UnitHelper.getDispValueH(UnitHelper.ConvertH_fromM(m_unit.H, head_m)); - query_pt.H = head_m; - - //鏁堢巼 - var eff_info = {}; - eff_info.value = ""; - if (m_isDispCurveQE) { - var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); - if (eta_pixel_pt != null) { - var eta_std = getActualValueE(eta_pixel_pt.Y); - - eff_info.text = getTranslateString("鏁堢巼"); - eff_info.value = parseFloat(eta_std.toFixed(1)); - eff_info.unit = "%"; - - query_pt.E = parseFloat(eta_std.toFixed(1)); - } - } - - //鍔熺巼 - var power_info = {}; - power_info.value = ""; - if (m_isDispCurveQP) { - var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); - if (power_pixel_pt != null) { - var power_kw = getActualValueP(power_pixel_pt.Y); - power_info.text = getTranslateString("鍔熺巼"); - power_info.value = UnitHelper.getDispValueP(UnitHelper.ConvertP_fromKW(m_unit.P, power_kw)); - power_info.unit = UnitHelper.GetUnitNameP(m_unit.P); - - query_pt.P = power_kw; - } - } - //0 璁$畻鏁堢巼 1 璁$畻鍔熺巼 2 涓嶈绠� - if (m_chartObject.SimJieZhiCurveQP == null && query_pt.E>0) {//鏈変粙璐ㄦ洸绾匡紝鏆傛椂涓嶈�冭檻锛屼笉鐒惰浼犲叆瀵嗗害 - if (m_groupPointQeMethod == 0) { - query_pt.E = parseFloat(calculateE(query_pt.Q, query_pt.H, query_pt.P, 1000).toFixed(1)); - eff_info.value = query_pt.E; - } else if (m_groupPointQeMethod == 1) { - query_pt.P = parseFloat(calculateP(query_pt.Q, query_pt.H, query_pt.E, 1000).toFixed(2)); - power_info.value = UnitHelper.getDispValueP(UnitHelper.ConvertP_fromKW(m_unit.P, query_pt.P)); - } - } - - - var npsh_info = {};//姹借殌 - npsh_info.text = getTranslateString("姹借殌"); - npsh_info.value = ''; - npsh_info.unit = UnitHelper.GetUnitNameH(m_unit.NPSH); - - if (m_wrkCurveGrp.PixelNPSH != null && m_isDispNpsh) { - var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); - - if (npsh_pixel_pt != null) { - npsh_info.unit = UnitHelper.GetUnitNameNPSH(m_unit.NPSH); - var npsh_m = getActualValueNPSH(npsh_pixel_pt.Y); - npsh_info.value = UnitHelper.getDispValueNPSH(UnitHelper.ConvertNPSH_fromM(m_unit.NPSH, npsh_m)); - - query_pt.NPSH = npsh_m; - } - } - - var tip_html = ""; - var flow_html = flow_info.text + ": " + flow_info.value + " " + flow_info.unit; - tip_html = flow_html; - - var head_html = head_info.text + ": " + head_info.value + " " + head_info.unit; - tip_html += "</br>" + head_html; - - if (eff_info.value != "") { - var eff_html = eff_info.text + ": " + eff_info.value + " " + eff_info.unit; - tip_html += "</br>" + eff_html; - } - - if (power_info.value != "") { - var power_html = power_info.text + ": " + power_info.value + " " - + power_info.unit; - tip_html += "</br>" + power_html; - } - - if (npsh_info.value != "") { - var npsh_html = npsh_info.text + ": " + npsh_info.value + " " + npsh_info.unit; - tip_html += "</br>" + npsh_html; - } - if (index == 2) { - var objInfo = document.getElementById("infoDv4VerticalLine2"); - if (objInfo != null) { - objInfo.innerHTML = tip_html; - objInfo.style.display = ""; - } - } - else { - var objInfo = document.getElementById("infoDv4VerticalLine1"); - if (objInfo != null) { - objInfo.innerHTML = tip_html; - objInfo.style.display = ""; - } - - //鑾峰彇鏌ヨ鏇茬嚎鏌ヨ寰楀埌鐨勬暟鎹� 缁欏弬鏁版煡璇娇鐢� - if (onChangeQueryDataCb != null) { - onChangeQueryDataCb(query_pt) - } - } - - - }; - //鏍规嵁娴侀噺鑾峰彇鐐�(m3h鍗曚綅涓嬬殑) - var getGrpPointInWrkCurveByFlow = function (flow_m3h) { - if (flow_m3h == null) return null; - if (typeof flow_m3h == "string") flow_m3h = parseFloat(flow_m3h); - - if (flow_m3h < 0.1) return null; - - //var UnitHelper.ConvertQ_fromM3H(m_unit.Q, flow_m3h) - var xPixel = getPixelValueQ(flow_m3h); - - //鎵▼ - var head_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQH, xPixel); - if (head_pixel_pt == null) return; - var head_m = getActualValueH(head_pixel_pt.Y); - - //鏁堢巼 - var eta_std = 0; - if (m_isDispCurveQE) { - var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); - if (eta_pixel_pt != null) { - eta_std = getActualValueE(eta_pixel_pt.Y); - eta_std = parseFloat(eta_std.toFixed(1)); - } - } - - //鍔熺巼 - var power_kw = 0; - if (m_isDispCurveQP) { - var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); - if (power_pixel_pt != null) { - power_kw = getActualValueP(power_pixel_pt.Y); - } - } - - var npsh_m = 0; - if (m_wrkCurveGrp.PixelNPSH != null) { - var npsh_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelNPSH, xPixel); - if (npsh_pixel_pt != null) { - npsh_m = getActualValueNPSH(npsh_pixel_pt.Y); - } - } - - var grp_pt = {}; - grp_pt.Q = flow_m3h; - grp_pt.H = head_m; - grp_pt.E = eta_std; - grp_pt.P = power_kw; - grp_pt.NPSH = npsh_m; - - return grp_pt; - }; - //鏌ヨ绾� - var m_dispVerticalLine1 = false; - var m_dispVerticalLine2 = false; - var onChangeQueryDataCb = null; //鏌ヨ澶栭儴鍥炶皟 - //璁剧疆鏌ヨ绾� 鏄惁鏄剧ず - var setQueryIndicatVertLineVisible = function (disp, index) { - - var objInfo; - var objLine; - if (index == 2) { - objLine = document.getElementById("verticalLine2"); - objInfo = document.getElementById("infoDv4VerticalLine2"); - } - else { - m_dispVerticalLine1 = disp; - objInfo = document.getElementById("infoDv4VerticalLine1"); - objLine = document.getElementById("verticalLine1"); - } - if (objInfo != null && objLine != null) { - if (disp) { - objInfo.style.display = ''; - objLine.style.display = ''; - } - else { - objInfo.style.display = 'none'; - objLine.style.display = 'none'; - } - } - - }; - //璁剧疆鏌ヨ绾� 鐨勫�� - var setQueryIndicatValue = function (flow_m3h, index) { - if (index == 2) { - m_dispVerticalLine2 = true; - setQueryIndicatVertLineVisible(m_dispVerticalLine2, 2); - return setQueryIndicatValue2(flow_m3h); - } - else { - m_dispVerticalLine1 = true; - setQueryIndicatVertLineVisible(m_dispVerticalLine1, 1); - return setQueryIndicatValue1(flow_m3h); - } - }; - var setQueryIndicatValue1 = function (flow_m3h) { - if (m_dispVerticalLine1 == false) - return; - - var xPixel = getPixelValueQ(flow_m3h); - - var pathValue1 = []; - pathValue1.push("M ", xPixel, " ", m_chartSize.UpDiagram.Up, " L ", xPixel, " ", m_chartSize.DownDiagram.Bottom); - - var objLine = document.getElementById("verticalLine1"); - if (objLine == null) - return; - - objLine.setAttribute('d', pathValue1.join('')); - - drawQueryDataInfoByReal(flow_m3h, xPixel, 1); - }; - var setQueryIndicatValue2 = function (flow_m3h) { - m_dispVerticalLine2 = true; - - var xPixel = getPixelValueQ(flow_m3h); - - var pathValue1 = []; - pathValue1.push("M ", xPixel, " ", m_chartSize.UpDiagram.Up, " L ", xPixel, " ", m_chartSize.DownDiagram.Bottom); - - var objLine = document.getElementById("verticalLine2"); - if (objLine == null) - return; - - objLine.setAttribute('d', pathValue1.join('')); - - drawQueryDataInfoByReal(flow_m3h, xPixel, 2); - }; - - //缁樺埗鍥捐〃(鏍稿績浠g爜) - var drawChart = function () { - //闈㈡澘(鍚潗鏍�) - drawDiagramPanel(); - - //缁樺埗鎬ц兘鏇茬嚎 - drawFeatCurve(); - - //璁捐鐐� - drawDesignPoint(); - drawWorkPoint(); - - //娑堥槻鐐� - drawFirePumpPoint(); - - //缁樺埗姘村嵃 - drawLogoWaterMark(); - - //瑁呯疆鏇茬嚎 - drawEquipmentCurve(); - - //鏌ヨ鎸囩ず绾� - drawQueryIndicatVertLine(); - - // createMouseTipInfo(); - }; - - // - var createGridLineDiagram_Whole = function () { - if (m_coordinatePara == null) { - return; - } - - var attr = { - stroke: m_displayStyle.ColorGridLine, - "stroke-width": "1", - fill: "none", - zIndex: 10, - }; - - //浜х敓缃戞牸绾跨珫鐩存柟鍚� - for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { - var distance = m_chartSize.SpaceGridX * i; - var valueTemp = []; - valueTemp.push( - "M ", - m_chartSize.DiagramLeft + distance, - " ", - m_chartSize.SpaceTop, - " L ", - m_chartSize.DiagramLeft + distance, - " ", - m_chartSize.UpDiagram.Bottom - ); - m_svg.createPath(null, valueTemp.join(""), attr, null); - } - - //浜х敓缃戞牸绾挎按骞虫柟鍚� - for (var i = 0; i <= m_coordinatePara.GridNumberY; i++) { - var distance = m_chartSize.UpDiagram.SpaceGridY * i; - var valueTemp = []; - valueTemp.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.SpaceTop + distance, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.SpaceTop + distance - ); - m_svg.createPath(null, valueTemp.join(""), attr, null); - } - }; - //缁樺埗闈㈡澘(鍒嗙) - var createGridLineDiagram_TwoPanel = function () { - if (m_coordinatePara == null) { - return; - } - - var attr = { - stroke: m_displayStyle.ColorGridLine, - "stroke-width": "1", - fill: "none", - zIndex: 10, - }; - - //浜х敓缃戞牸绾跨珫鐩存柟鍚� - for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { - var distance = m_chartSize.SpaceGridX * i; - var valueTemp = []; - valueTemp.push( - "M ", - m_chartSize.DiagramLeft + distance, - " ", - m_chartSize.UpDiagram.Up, - " L ", - m_chartSize.DiagramLeft + distance, - " ", - m_chartSize.UpDiagram.Bottom - ); - m_svg.createPath(null, valueTemp.join(""), attr, null); - - } - - //浜х敓缃戞牸绾挎按骞虫柟鍚� - for (var i = 0; i <= m_chartSize.UpDiagram.GridNumberY; i++) { - var distance = m_chartSize.UpDiagram.SpaceGridY * i; - var valueTemp = []; - valueTemp.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.UpDiagram.Up + distance, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.UpDiagram.Up + distance - ); - m_svg.createPath(null, valueTemp.join(""), attr, null); - } - - if (m_isHaveBottomPanel) { - //浜х敓缃戞牸绾跨珫鐩存柟鍚� - for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { - var distance = m_chartSize.SpaceGridX * i; - var valueTemp = []; - valueTemp.push( - "M ", - m_chartSize.DiagramLeft + distance, - " ", - m_chartSize.DownDiagram.Up, - " L ", - m_chartSize.DiagramLeft + distance, - " ", - m_chartSize.DownDiagram.Bottom - ); - m_svg.createPath(null, valueTemp.join(""), attr, null); - } - //浜х敓缃戞牸绾挎按骞虫柟鍚� - for (var i = 0; i <= m_chartSize.DownDiagram.GridNumberY; i++) { - var distance = m_chartSize.DownDiagram.SpaceGridY * i; - var valueTemp = []; - valueTemp.push( - "M ", - m_chartSize.DiagramLeft, - " ", - m_chartSize.DownDiagram.Up + distance, - " L ", - m_chartSize.DiagramRight, - " ", - m_chartSize.DownDiagram.Up + distance - ); - m_svg.createPath(null, valueTemp.join(""), attr, null); - } - } - }; - //杞垚Bezier鏇茬嚎妯″瀷 - var transBezierCurveModel = function (pixelPoints) { - if (pixelPoints == null || pixelPoints.length < 4) return null; - - var iPointCout = pixelPoints.length; - - var controlPoint = []; - var smooth_value = 0.6; - for (var i = 0; i < iPointCout - 1; i++) { - var x0, y0; - if (i > 0) { - x0 = pixelPoints[i - 1].X; - y0 = pixelPoints[i - 1].Y; - } else { - x0 = pixelPoints[i].X; - y0 = pixelPoints[i].Y; - } - - var x1 = pixelPoints[i].X; - var y1 = pixelPoints[i].Y; - - var x2 = pixelPoints[i + 1].X; - var y2 = pixelPoints[i + 1].Y; - - var x3, y3; - if (i >= iPointCout - 2) { - x3 = pixelPoints[i + 1].X; - y3 = pixelPoints[i + 1].Y; - } else { - x3 = pixelPoints[i + 2].X; - y3 = pixelPoints[i + 2].Y; - } - - var xc1 = (x0 + x1) / 2.0; - var yc1 = (y0 + y1) / 2.0; - var xc2 = (x1 + x2) / 2.0; - var yc2 = (y1 + y2) / 2.0; - var xc3 = (x2 + x3) / 2.0; - var yc3 = (y2 + y3) / 2.0; - - var len1 = Math.sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)); - var len2 = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); - var len3 = Math.sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2)); - - var k1 = len1 / (len1 + len2); - var k2 = len2 / (len2 + len3); - - var xm1 = xc1 + (xc2 - xc1) * k1; - var ym1 = yc1 + (yc2 - yc1) * k1; - - var xm2 = xc2 + (xc3 - xc2) * k2; - var ym2 = yc2 + (yc3 - yc2) * k2; - - // Resulting control points. Here smooth_value is mentioned - // above coefficient K whose value should be in range [0...1]. - var ctrl1_x = xm1 + (xc2 - xm1) * smooth_value + x1 - xm1; - var ctrl1_y = ym1 + (yc2 - ym1) * smooth_value + y1 - ym1; - - var ctrl2_x = xm2 + (xc2 - xm2) * smooth_value + x2 - xm2; - var ctrl2_y = ym2 + (yc2 - ym2) * smooth_value + y2 - ym2; - - var bezier = {}; - bezier.Point0 = pixelPoints[i]; - bezier.Point1 = { - X: ctrl1_x, - Y: ctrl1_y, - }; - - bezier.Point2 = { - X: ctrl2_x, - Y: ctrl2_y, - }; - bezier.Point3 = pixelPoints[i + 1]; - controlPoint.push(bezier); - } - return controlPoint; - }; - //杞垚Bezier鏇茬嚎妯″瀷 - var transBezierCurveModel_bak = function (pixelPoints) { - if (pixelPoints == null || pixelPoints.length < 4) return null; - - var iPointCout = pixelPoints.length; - var a = 0.09; - var b = 0.09; - var controlPoint = []; - - for (var i = 0; i < iPointCout - 1; i++) { - var bezier = {}; - bezier.Point0 = pixelPoints[i]; - if (i == 0) { - var x1 = - pixelPoints[i].X + a * (pixelPoints[i + 1].X - pixelPoints[i].X); - var y1 = - pixelPoints[i].Y + a * (pixelPoints[i + 1].Y - pixelPoints[i].Y); - bezier.Point1 = { - X: x1, - Y: y1, - }; - } else { - var x1 = - pixelPoints[i].X + a * (pixelPoints[i + 1].X - pixelPoints[i - 1].X); - var y1 = - pixelPoints[i].Y + a * (pixelPoints[i + 1].Y - pixelPoints[i - 1].Y); - bezier.Point1 = { - X: x1, - Y: y1, - }; - } + //缁樺埗绾� + if (m_chartType == ConstParas.ChartType.Cut) { + if (m_displayStyle.IsOnlyDispWrkCurve) { + drawAllCurve_Cut_Wrk(); + } else { + //缁樺埗鍨嬭氨 + drawSpectrumShape(); + drawAllCurve_Cut_Full(); + } + } else if (m_chartType == ConstParas.ChartType.Speed) { + if (m_displayStyle.IsOnlyDispWrkCurve) { + drawAllCurve_Speed_Wrk(); + } else { + //缁樺埗鍨嬭氨 + drawSpectrumShape(); + drawAllCurve_Speed_Full(); + } + } else if (m_chartType == ConstParas.ChartType.BaoLuo) { + drawAllCurve_BaoLuo(); + } else return; - if (i == iPointCout - 2) { - var x2 = - pixelPoints[i + 1].X - b * (pixelPoints[i + 1].X - pixelPoints[i].X); - var y2 = - pixelPoints[i + 1].Y - b * (pixelPoints[i + 1].Y - pixelPoints[i].Y); - bezier.Point2 = { - X: x2, - Y: y2, - }; - } else { - var x2 = - pixelPoints[i + 1].X - b * (pixelPoints[i + 2].X - pixelPoints[i].X); - var y2 = - pixelPoints[i + 1].Y - b * (pixelPoints[i + 2].Y - pixelPoints[i].Y); - bezier.Point2 = { - X: x2, - Y: y2, - }; - } + //璁捐鐐� + drawDesignPoint(); - bezier.Point3 = pixelPoints[i + 1]; - controlPoint.push(bezier); - } - return controlPoint; - }; + //缁樺埗姘村嵃 + drawLogoWaterMark(); - //杞垚鏇茬嚎璺緞 - var transBezierCurveToPath = function (pixelPoints) { - var bezierCurveValue = transBezierCurveModel(pixelPoints); - if (bezierCurveValue == null) { - return; - } - var pathValue = []; - for (var i = 0; i < bezierCurveValue.length; i++) { - var b_pt = bezierCurveValue[i]; - if (i == 0) { - pathValue.push("M ", b_pt.Point0.X, " ", b_pt.Point0.Y); - pathValue.push( - " C ", - b_pt.Point1.X, - " ", - b_pt.Point1.Y, - " ", - b_pt.Point2.X, - " ", - b_pt.Point2.Y, - " ", - b_pt.Point3.X, - " ", - b_pt.Point3.Y - ); - } else { - pathValue.push(" L ", b_pt.Point0.X, " ", b_pt.Point0.Y); - pathValue.push( - " C ", - b_pt.Point1.X, - " ", - b_pt.Point1.Y, - " ", - b_pt.Point2.X, - " ", - b_pt.Point2.Y, - " ", - b_pt.Point3.X, - " ", - b_pt.Point3.Y - ); - } - if (i == bezierCurveValue.length - 1) { - pathValue.push(" L ", b_pt.Point3.X, " ", b_pt.Point3.Y); - } - } - return pathValue; - }; + //瑁呯疆鏇茬嚎 + drawEquipmentCurve(); - //杩斿洖鏍囧噯鍗曚綅涓嬬殑鍊� - var getActualValueQ = function (pixelValue) { - var actualMinValue = m_coordinatePara.DispMinQ; - var actualMaxValue = m_coordinatePara.DispMaxQ; - var pixelMinValue = m_chartSize.DiagramLeft; - var pixelMaxValue = m_chartSize.DiagramRight; - return ( - ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * - (actualMaxValue - actualMinValue) + - actualMinValue - ); - }; - var getActualValueH = function (pixelValue) { - var actualMinValue = m_coordinatePara.DispMinH; - var actualMaxValue = m_coordinatePara.DispMaxH; - var pixelMinValue = m_chartSize.PanelH.Bottom; - var pixelMaxValue = m_chartSize.PanelH.Up; + //鏌ヨ鎸囩ず绾� + drawQueryIndicatVertLine(); - var actualValue = - ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * - (actualMaxValue - actualMinValue) + - actualMinValue; + // + // createMouseTipInfo(); + }; + // + var createGridLineDiagram_Whole = function () { + if (m_coordinatePara == null) { + return; + } - return actualValue; - }; - var getActualValueE = function (pixelValue) { - var actualMinValue = m_coordinatePara.DispMinE; - var actualMaxValue = m_coordinatePara.DispMaxE; - var pixelMinValue = m_chartSize.PanelE.Bottom; - var pixelMaxValue = m_chartSize.PanelE.Up; + var attr = { + stroke: m_displayStyle.ColorGridLine, + 'stroke-width': '1', + fill: 'none', + zIndex: 10, + }; - var actualValue = - ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * - (actualMaxValue - actualMinValue) + - actualMinValue; + //浜х敓缃戞牸绾跨珫鐩存柟鍚� + for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { + var distance = m_chartSize.SpaceGridX * i; + var valueTemp = []; + valueTemp.push( + 'M ', + m_chartSize.DiagramLeft + distance, + ' ', + m_chartSize.SpaceTop, + ' L ', + m_chartSize.DiagramLeft + distance, + ' ', + m_chartSize.UpDiagram.Bottom + ); + m_svg.createPath(null, valueTemp.join(''), attr, null); + } - return actualValue; - }; - var getActualValueP = function (pixelValue) { - var actualMinValue = m_coordinatePara.DispMinP; - var actualMaxValue = m_coordinatePara.DispMaxP; - var pixelMinValue = m_chartSize.PanelP.Bottom; - var pixelMaxValue = m_chartSize.PanelP.Up; - return ( - ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * - (actualMaxValue - actualMinValue) + - actualMinValue - ); - }; - var getActualValueNPSH = function (pixelValue) { - var actualMinValue = m_coordinatePara.DispMinNPSH; - var actualMaxValue = m_coordinatePara.DispMaxNPSH; - var pixelMinValue = m_chartSize.PanelNPSH.Bottom; - var pixelMaxValue = m_chartSize.PanelNPSH.Up; - var actualValue = - ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * - (actualMaxValue - actualMinValue) + - actualMinValue; + //浜х敓缃戞牸绾挎按骞虫柟鍚� + for (let i = 0; i <= m_coordinatePara.GridNumberY; i++) { + let distance = m_chartSize.UpDiagram.SpaceGridY * i; + let valueTemp = []; + valueTemp.push( + 'M ', + m_chartSize.DiagramLeft, + ' ', + m_chartSize.SpaceTop + distance, + ' L ', + m_chartSize.DiagramRight, + ' ', + m_chartSize.SpaceTop + distance + ); + m_svg.createPath(null, valueTemp.join(''), attr, null); + } + }; + //缁樺埗闈㈡澘(鍒嗙) + var createGridLineDiagram_TwoPanel = function () { + if (m_coordinatePara == null) { + return; + } - return actualValue; - }; + var attr = { + stroke: m_displayStyle.ColorGridLine, + 'stroke-width': '1', + fill: 'none', + zIndex: 10, + }; - // actualValue 鏄�(m3h鍗曚綅涓嬬殑鍊�)m_coordinatePara閲岄潰鐨勬暟鎹崟浣峬3h - var getPixelValueQ = function (actualValue) { - var actualMinValue = m_coordinatePara.DispMinQ; - var actualMaxValue = m_coordinatePara.DispMaxQ; - var pixelMinValue = m_chartSize.DiagramLeft; - var pixelMaxValue = m_chartSize.DiagramRight; + //浜х敓缃戞牸绾跨珫鐩存柟鍚� + for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { + var distance = m_chartSize.SpaceGridX * i; + var valueTemp = []; + valueTemp.push( + 'M ', + m_chartSize.DiagramLeft + distance, + ' ', + m_chartSize.UpDiagram.Up, + ' L ', + m_chartSize.DiagramLeft + distance, + ' ', + m_chartSize.UpDiagram.Bottom + ); + m_svg.createPath(null, valueTemp.join(''), attr, null); - return ( - ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * - (pixelMaxValue - pixelMinValue) + - pixelMinValue - ); - }; - // actualValue 鏄�(m 鍗曚綅涓嬬殑鍊�)m_coordinatePara閲岄潰鐨勬暟鎹崟浣峬 - var getPixelValueH = function (actualValue) { - var actualMinValue = m_coordinatePara.DispMinH; - var actualMaxValue = m_coordinatePara.DispMaxH; - var pixelMinValue = m_chartSize.PanelH.Bottom; - var pixelMaxValue = m_chartSize.PanelH.Up; - if (actualMaxValue == actualMinValue) return actualMinValue; + //console.log(m_chartSize.DiagramLeft + distance , m_chartSize.UpDiagram.Up, m_chartSize.DiagramLeft + distance, m_chartSize.UpDiagram.Bottom) + } - var v = - ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * - (pixelMaxValue - pixelMinValue) + - pixelMinValue; + for (let i = 0; i <= m_coordinatePara.GridNumberX; i++) { + let distance = m_chartSize.SpaceGridX * i; + let valueTemp = []; + valueTemp.push( + 'M ', + m_chartSize.DiagramLeft + distance, + ' ', + m_chartSize.DownDiagram.Up, + ' L ', + m_chartSize.DiagramLeft + distance, + ' ', + m_chartSize.DownDiagram.Bottom + ); + m_svg.createPath(null, valueTemp.join(''), attr, null); + } - return v; - }; - var getPixelValueE = function (actualValue) { - var actualMinValue = m_coordinatePara.DispMinE; - var actualMaxValue = m_coordinatePara.DispMaxE; - var pixelMinValue = m_chartSize.PanelE.Bottom; - var pixelMaxValue = m_chartSize.PanelE.Up; - if (actualMaxValue == actualMinValue) return actualMinValue; + //浜х敓缃戞牸绾挎按骞虫柟鍚� + for (let i = 0; i <= m_chartSize.UpDiagram.GridNumberY; i++) { + let distance = m_chartSize.UpDiagram.SpaceGridY * i; + let valueTemp = []; + valueTemp.push( + 'M ', + m_chartSize.DiagramLeft, + ' ', + m_chartSize.UpDiagram.Up + distance, + ' L ', + m_chartSize.DiagramRight, + ' ', + m_chartSize.UpDiagram.Up + distance + ); + m_svg.createPath(null, valueTemp.join(''), attr, null); + } - return ( - ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * - (pixelMaxValue - pixelMinValue) + - pixelMinValue - ); - }; - var getPixelValueP = function (actualValue) { - var actualMinValue = m_coordinatePara.DispMinP; - var actualMaxValue = m_coordinatePara.DispMaxP; - var pixelMinValue = m_chartSize.PanelP.Bottom; - var pixelMaxValue = m_chartSize.PanelP.Up; - if (actualMaxValue == actualMinValue) return actualMinValue; + for (let i = 0; i <= m_chartSize.DownDiagram.GridNumberY; i++) { + let distance = m_chartSize.DownDiagram.SpaceGridY * i; + let valueTemp = []; + valueTemp.push( + 'M ', + m_chartSize.DiagramLeft, + ' ', + m_chartSize.DownDiagram.Up + distance, + ' L ', + m_chartSize.DiagramRight, + ' ', + m_chartSize.DownDiagram.Up + distance + ); + m_svg.createPath(null, valueTemp.join(''), attr, null); + } + }; + //杞垚Bezier鏇茬嚎妯″瀷 + var transBezierCurveModel = function (pixelPoints) { + if (pixelPoints == null || pixelPoints.length < 4) return null; - return ( - ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * - (pixelMaxValue - pixelMinValue) + - pixelMinValue - ); - }; - var getPixelValueNPSH = function (actualValue) { - var actualMinValue = m_coordinatePara.DispMinNPSH; - var actualMaxValue = m_coordinatePara.DispMaxNPSH; - var pixelMinValue = m_chartSize.PanelNPSH.Bottom; - var pixelMaxValue = m_chartSize.PanelNPSH.Up; - if (actualMaxValue == actualMinValue) return actualMinValue; + var iPointCout = pixelPoints.length; + var a = 0.09; + var b = 0.09; + var controlPoint = []; - return ( - ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * - (pixelMaxValue - pixelMinValue) + - pixelMinValue - ); - }; + for (var i = 0; i < iPointCout - 1; i++) { + var bezier = {}; + bezier.Point0 = pixelPoints[i]; + if (i == 0) { + let x1 = pixelPoints[i].X + a * (pixelPoints[i + 1].X - pixelPoints[i].X); + let y1 = pixelPoints[i].Y + a * (pixelPoints[i + 1].Y - pixelPoints[i].Y); + bezier.Point1 = { + X: x1, + Y: y1, + }; + } else { + let x1 = pixelPoints[i].X + a * (pixelPoints[i + 1].X - pixelPoints[i - 1].X); + let y1 = pixelPoints[i].Y + a * (pixelPoints[i + 1].Y - pixelPoints[i - 1].Y); + bezier.Point1 = { + X: x1, + Y: y1, + }; + } - /** ----------------瀵瑰鍑芥暟-------------------- **/ + if (i == iPointCout - 2) { + let x2 = pixelPoints[i + 1].X - b * (pixelPoints[i + 1].X - pixelPoints[i].X); + let y2 = pixelPoints[i + 1].Y - b * (pixelPoints[i + 1].Y - pixelPoints[i].Y); + bezier.Point2 = { + X: x2, + Y: y2, + }; + } else { + let x2 = pixelPoints[i + 1].X - b * (pixelPoints[i + 2].X - pixelPoints[i].X); + let y2 = pixelPoints[i + 1].Y - b * (pixelPoints[i + 2].Y - pixelPoints[i].Y); + bezier.Point2 = { + X: x2, + Y: y2, + }; + } - //璁剧疆鐢ㄦ埛璁剧疆 - this.setUserSetting = function ( - uiUserSetting, - seriesUnitQ, - seriesUnitH, - seriesUnitP, - seriesIsD2Meter - ) { + bezier.Point3 = pixelPoints[i + 1]; + controlPoint.push(bezier); + } + return controlPoint; + }; - if (uiUserSetting == null) return; - if (uiUserSetting.isAdjustCoordUnitByUserSetting) { - if (uiUserSetting.Q != null) { - m_unit.Q = uiUserSetting.Q; - } else { - m_unit.Q = seriesUnitQ; - } + //杞垚鏇茬嚎璺緞 + var transBezierCurveToPath = function (pixelPoints) { + var bezierCurveValue = transBezierCurveModel(pixelPoints); + if (bezierCurveValue == null) { + return; + } + var pathValue = []; + for (var i = 0; i < bezierCurveValue.length; i++) { + var b_pt = bezierCurveValue[i]; + if (i == 0) { + pathValue.push('M ', b_pt.Point0.X, ' ', b_pt.Point0.Y); + pathValue.push( + ' C ', + b_pt.Point1.X, + ' ', + b_pt.Point1.Y, + ' ', + b_pt.Point2.X, + ' ', + b_pt.Point2.Y, + ' ', + b_pt.Point3.X, + ' ', + b_pt.Point3.Y + ); + } else { + pathValue.push(' L ', b_pt.Point0.X, ' ', b_pt.Point0.Y); + pathValue.push( + ' C ', + b_pt.Point1.X, + ' ', + b_pt.Point1.Y, + ' ', + b_pt.Point2.X, + ' ', + b_pt.Point2.Y, + ' ', + b_pt.Point3.X, + ' ', + b_pt.Point3.Y + ); + } + if (i == bezierCurveValue.length - 1) { + pathValue.push(' L ', b_pt.Point3.X, ' ', b_pt.Point3.Y); + } + } + return pathValue; + }; - if (uiUserSetting.H != null) { - m_unit.H = uiUserSetting.H; - } else { - m_unit.H = seriesUnitH; - } + //杩斿洖鏍囧噯鍗曚綅涓嬬殑鍊� + var getActualValueQ = function (pixelValue) { + var actualMinValue = m_coordinatePara.DispMinQ; + var actualMaxValue = m_coordinatePara.DispMaxQ; + var pixelMinValue = m_chartSize.DiagramLeft; + var pixelMaxValue = m_chartSize.DiagramRight; + return ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * (actualMaxValue - actualMinValue) + actualMinValue; + }; + var getActualValueH = function (pixelValue) { + var actualMinValue = m_coordinatePara.DispMinH; + var actualMaxValue = m_coordinatePara.DispMaxH; + var pixelMinValue = m_chartSize.PanelH.Bottom; + var pixelMaxValue = m_chartSize.PanelH.Up; - if (uiUserSetting.P != null) { - m_unit.P = uiUserSetting.P; - } else { - m_unit.P = seriesUnitP; - } + var actualValue = + ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * (actualMaxValue - actualMinValue) + actualMinValue; + //console.log("getActualValueH", actualValue, actualMinValue,actualMaxValue,pixelMinValue,pixelMaxValue); - if (uiUserSetting.NPSH != null) { - m_unit.NPSH = uiUserSetting.NPSH; - } else { - m_unit.NPSH = 0; - } + return actualValue; + }; + var getActualValueE = function (pixelValue) { + var actualMinValue = m_coordinatePara.DispMinE; + var actualMaxValue = m_coordinatePara.DispMaxE; + var pixelMinValue = m_chartSize.PanelE.Bottom; + var pixelMaxValue = m_chartSize.PanelE.Up; - if (uiUserSetting.D2 != null) m_d2IsMeter = uiUserSetting.D2; - else m_d2IsMeter = seriesIsD2Meter; - } else { - m_unit.Q = seriesUnitQ; - m_unit.H = seriesUnitH; - m_unit.P = seriesUnitP; - m_d2IsMeter = seriesIsD2Meter; - } - }; - //鑾峰彇鍗曚綅 - this.getUserUnit = function () { - return m_unit; - }; - //杞寲鎴恗3h娴侀噺 - this.transFlowToM3H = function (flow) { - return UnitHelper.ConvertQ_fromM3H(m_unit.Q, flow); - }; - //璁剧疆鏄惁鏄崟鑹叉樉绀� - this.setMonorColor = function (isMonorColor) { - document.getElementById(m_divChartName).innerHTML = ""; - setObjectColor(isMonorColor); - if (!initialSvg()) return; + var actualValue = + ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * (actualMaxValue - actualMinValue) + actualMinValue; + //console.log("getActualValueE",actualValue, actualMinValue,actualMaxValue,pixelMinValue,pixelMaxValue); - drawChart(); - }; - //璁剧疆鏄惁鏄彧鏄剧ず宸ヤ綔鏇茬嚎 - this.setCurveBundleDispStyle = function (style) { - m_displayStyle.LxpCurveBundleDispStyle = style; - document.getElementById(m_divChartName).innerHTML = ""; - if (!initialSvg()) - return; + return actualValue; + }; + var getActualValueP = function (pixelValue) { + var actualMinValue = m_coordinatePara.DispMinP; + var actualMaxValue = m_coordinatePara.DispMaxP; + var pixelMinValue = m_chartSize.PanelP.Bottom; + var pixelMaxValue = m_chartSize.PanelP.Up; + return ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * (actualMaxValue - actualMinValue) + actualMinValue; + }; + var getActualValueNPSH = function (pixelValue) { + var actualMinValue = m_coordinatePara.DispMinNPSH; + var actualMaxValue = m_coordinatePara.DispMaxNPSH; + var pixelMinValue = m_chartSize.PanelNPSH.Bottom; + var pixelMaxValue = m_chartSize.PanelNPSH.Up; + var actualValue = + ((pixelValue - pixelMinValue) / (pixelMaxValue - pixelMinValue)) * (actualMaxValue - actualMinValue) + actualMinValue; + // console.log("getActualValueNPSH",actualValue, actualMinValue,actualMaxValue,pixelMinValue,pixelMaxValue); + return actualValue; + }; - drawChart(); - }; - //璁剧疆鏄惁鏄洸绾垮弬鏁版樉绀烘柟寮� - this.setCurveParasPanelDisp = function (isDisp) { - m_displayStyle.IsDispCurveParasPanel = isDisp; + // actualValue 鏄爣鍑嗗崟浣嶄笅鐨勫�� + var getPixelValueQ = function (actualValue) { + var actualMinValue = m_coordinatePara.DispMinQ; + var actualMaxValue = m_coordinatePara.DispMaxQ; + var pixelMinValue = m_chartSize.DiagramLeft; + var pixelMaxValue = m_chartSize.DiagramRight; - document.getElementById(m_divChartName).innerHTML = ""; + return ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * (pixelMaxValue - pixelMinValue) + pixelMinValue; + }; + var getPixelValueH = function (actualValue) { + var actualMinValue = m_coordinatePara.DispMinH; + var actualMaxValue = m_coordinatePara.DispMaxH; + var pixelMinValue = m_chartSize.PanelH.Bottom; + var pixelMaxValue = m_chartSize.PanelH.Up; - if (!initialSvg()) return; + if (actualMaxValue == actualMinValue) return actualMinValue; - drawChart(); - }; - //璁剧疆鏄惁鏄洸绾垮褰╂洸绾� - this.setCurveMultiColor = function (isMultiColor) { - m_displayStyle.IsMultiColorCurve = isMultiColor; + var v = ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * (pixelMaxValue - pixelMinValue) + pixelMinValue; + //console.log("getPixelValueH",actualValue,v, actualMinValue,actualMaxValue,pixelMinValue,pixelMaxValue); + return v; + }; + var getPixelValueE = function (actualValue) { + var actualMinValue = m_coordinatePara.DispMinE; + var actualMaxValue = m_coordinatePara.DispMaxE; + var pixelMinValue = m_chartSize.PanelE.Bottom; + var pixelMaxValue = m_chartSize.PanelE.Up; + if (actualMaxValue == actualMinValue) return actualMinValue; - document.getElementById(m_divChartName).innerHTML = ""; + return ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * (pixelMaxValue - pixelMinValue) + pixelMinValue; + }; + var getPixelValueP = function (actualValue) { + var actualMinValue = m_coordinatePara.DispMinP; + var actualMaxValue = m_coordinatePara.DispMaxP; + var pixelMinValue = m_chartSize.PanelP.Bottom; + var pixelMaxValue = m_chartSize.PanelP.Up; + if (actualMaxValue == actualMinValue) return actualMinValue; - if (!initialSvg()) return; + return ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * (pixelMaxValue - pixelMinValue) + pixelMinValue; + }; + var getPixelValueNPSH = function (actualValue) { + var actualMinValue = m_coordinatePara.DispMinNPSH; + var actualMaxValue = m_coordinatePara.DispMaxNPSH; + var pixelMinValue = m_chartSize.PanelNPSH.Bottom; + var pixelMaxValue = m_chartSize.PanelNPSH.Up; + if (actualMaxValue == actualMinValue) return actualMinValue; - drawChart(); - }; + return ((actualValue - actualMinValue) / (actualMaxValue - actualMinValue)) * (pixelMaxValue - pixelMinValue) + pixelMinValue; + }; - //璁剧疆鏄惁鏄剧ず鍨嬭氨 - this.setSpectrumDisp = function (isDisp) { - m_displayStyle.IsDispSpectrum = isDisp; - drawSpectrumShape(); - }; - this.updateCoordinatePara = function (Coordinate) { }; - this.getCoordinatePara = function () { - return m_coordinatePara; - }; - //璁剧疆瀹瑰櫒 - this.setContainerDiv = function (divChartName, divWidth, divHeight) { - m_divChartName = divChartName; + /** ----------------瀵瑰鍑芥暟-------------------- **/ - if (m_chartSize == null) { - m_chartSize = {}; - } + //璁剧疆璁捐鐐瑰叕宸� + this.SetUnit = function (unitQ, unitH, unitP, unitNPSH) { + m_unit.Q = unitQ; + m_unit.H = unitH; + m_unit.P = unitP; + if (unitNPSH > 0) { + m_unit.NPSH = unitNPSH; + } else { + m_unit.NPSH = 0; + } + }; + //璁剧疆鏄惁鏄崟鑹叉樉绀� + this.setMonorColor = function (isMonorColor) { + document.getElementById(m_divChartName).innerHTML = ''; + setObjectColor(isMonorColor); + if (!initialSvg()) return; - if (divWidth != null) { - m_chartSize.TotalWidth = divWidth; - } else { - m_chartSize.TotalWidth = - document.getElementById(divChartName).clientWidth; - } + drawChart(); + }; + //璁剧疆鏄惁鏄崟鑹叉樉绀� + this.setOnlyWrkCurve = function (isOnlyWrkCurve) { + m_displayStyle.IsOnlyDispWrkCurve = isOnlyWrkCurve; + //console.log(m_displayStyle) + document.getElementById(m_divChartName).innerHTML = ''; - if (divHeight != null) { - m_chartSize.TotalHeight = divHeight; - } else { - m_chartSize.TotalHeight = - document.getElementById(divChartName).clientHeight; - } - }; - //璁剧疆璇█ - this.setLocalizationType = function (localizationType) { - m_localizationType = localizationType; - }; - //璁剧疆宸ュ叿鎻愮ず鏍� - this.setToolTipName = function (toolTipName) { }; - //鑾峰彇鏌ヨ鏇茬嚎鏌ヨ寰楀埌鐨勬暟鎹� 缁欏弬鏁版煡璇娇鐢� - this.setChangeQueryDataCb = function (cb) { - onChangeQueryDataCb = cb; - }; - //鏌ヨ绾� 鏄惁鏄剧ず - this.setQueryIndicatVertLineVisible = function (isVisible, index) { - setQueryIndicatVertLineVisible(isVisible, index); - }; - this.getQueryIndicatVertLineVisible = function (index) { - if (index == 2) - return m_dispVerticalLine2; - else - return m_dispVerticalLine1; - }; - //璁剧疆鏌ヨ鍊� - this.setQueryIndicatValue = function (value, index) { - setQueryIndicatValue(value, index); - }; + if (!initialSvg()) return; - //鍒濆鍖栧浘琛�(鍏ュ彛) - this.initialChart = function (chartFullInfo, displayStyle, cbDict) { - if (!m_divChartName) return; + drawChart(); + }; + //璁剧疆鏄惁鏄剧ず鍨嬭氨 + this.setSpectrumDisp = function (isDisp) { + m_displayStyle.IsDispSpectrum = isDisp; + drawSpectrumShape(); + }; + //璁剧疆瀹瑰櫒 + this.setContainerDiv = function (divChartName, divWidth, divHeight) { + m_divChartName = divChartName; - //娓呯┖ - document.getElementById(m_divChartName).innerHTML = ""; + if (m_chartSize == null) { + m_chartSize = {}; + } - if (chartFullInfo.ChartObjectDict == null) return; - if (chartFullInfo.ChartObjectDict.Coordinate == null) return; + if (divWidth != null) { + m_chartSize.TotalWidth = divWidth; + } else { + m_chartSize.TotalWidth = document.getElementById(divChartName).clientWidth; + } - m_designPointTolerance = PointToleranceConfig.GetDefaultTolerancePara(); + if (divHeight != null) { + m_chartSize.TotalHeight = divHeight; + } else { + m_chartSize.TotalHeight = document.getElementById(divChartName).clientHeight; + } + }; + //璁剧疆璇█ + this.setLocalizationType = function (localizationType) { + m_localizationType = localizationType; + //console.log("localizationType:"+localizationType) + }; + //璁剧疆宸ュ叿鎻愮ず鏍� + this.setToolTipName = function (toolTipName) { + m_toolTipContent = document.getElementById(toolTipName); + }; + //鑾峰彇鏌ヨ鏇茬嚎鏌ヨ寰楀埌鐨勬暟鎹� 缁欏弬鏁版煡璇娇鐢� + this.setChangeQueryDataCb = function (cb) { + onChangeQueryDataCb = cb; + }; + this.setQueryIndicatVertLineVisible = function (isVisible) { + setQueryIndicatVertLineVisible(isVisible); + }; + this.getQueryIndicatVertLineVisible = function () { + return m_dispVerticalLine; + }; - m_chartType = chartFullInfo.BaseInfo.ChartType; - m_pumpInfo = chartFullInfo.BaseInfo; - m_chartPointPara = chartFullInfo.ChartPointPara; - m_groupPointQeMethod = chartFullInfo.SettingInfo.GroupPointQeMethod; - m_chartObject = chartFullInfo.ChartObjectDict; + //鍒濆鍖栧浘琛�(鍏ュ彛) + this.initialChart = function (chartFullInfo, displayStyle, cbDict) { + if (!m_divChartName) return; + //console.log("initialChart chartFullInfo", chartFullInfo) + //娓呯┖ + document.getElementById(m_divChartName).innerHTML = ''; - m_coordinatePara = chartFullInfo.ChartObjectDict.Coordinate; + if (chartFullInfo.ChartObjectDict == null) return; + if (chartFullInfo.ChartObjectDict.Coordinate == null) return; - //鍒濆鍖栨樉绀鸿缃� - var chartSetting = chartFullInfo.SettingInfo; - initialDispStyle(displayStyle, chartSetting); + m_designPointTolerance = PointToleranceConfig.GetDefaultTolerancePara(); - //璁剧疆鍚勭鍥炶皟鍑芥暟 - if (cbDict != null) { - m_changeWrkCurveCb = cbDict.setChangeWrkCurveCb; //璁剧疆鏇茬嚎淇敼鍥炶皟鍑芥暟 - } + m_chartType = chartFullInfo.BaseInfo.ChartType; + //console.log("m_chartType", m_chartType) + m_pumpInfo = chartFullInfo.BaseInfo; + m_chartPointPara = chartFullInfo.ChartPointPara; + m_chartSetting = chartFullInfo.SettingInfo; + m_chartObject = chartFullInfo.ChartObjectDict; + m_coordinatePara = chartFullInfo.ChartObjectDict.Coordinate; //extend(m_coordinatePara, chartFullInfo.Coordinate); - //瑁呯疆鏇茬嚎鐩镐氦鐐� - if (m_equipCurve == null) - m_equipCurve = {}; - m_equipCurve.DpSectPt = m_chartObject.EquipmentSectPt; + this.SetUnit( + //璁剧疆鍗曚綅 + m_chartSetting.UnitQ, + m_chartSetting.UnitH, + m_chartSetting.UnitP, + m_chartSetting.UnitNPSH + ); + //console.log(chartFullInfo.SettingInfo) + //console.log(this.m_coordinatePara,"cccc") - //璁$畻绗簩鍧愭爣 - calcSecondFlowCoordParas(); + if (m_chartSetting != null) { + if (m_chartSetting.IsDispCurveQE != null) { + m_isDispCurveQE = m_chartSetting.IsDispCurveQE; + } + m_d2IsMeter = m_chartSetting ? m_chartSetting.IsD2Meter : true; + } - //鍒濆鍖栭潰鏉垮昂瀵� - initialPanelSize(); + //鍒濆鍖栨樉绀鸿缃� + initialDispStyle(displayStyle, m_chartSetting); - drawChart(); + // + m_chartDiagramPanelStyle = ConstParas.ChartDiagramPanelStyle.Two; - return this; - }; - //淇敼浜嗗尯鍩熷弬鏁扮殑娴侀噺(m3h鍗曚綅涓�) - this.refreshRegionByFlow = function (flow_m3h, tag) { - if (tag == null) return null; - var pt = getGrpPointInWrkCurveByFlow(flow_m3h); - if (pt != null) { - refreshRegionPtPosi(pt, tag); - } - return pt; - }; - //璁剧疆璁捐鐐规槸鍚︽樉绀� - this.setDesignPointDisp = (status) => { - if (status) { - drawDesignPoint(); - } else { - removeElementById("DesignPointWater1"); - removeElementById("DesignPointWater2"); - removeElementById("DesignPointWater3"); - removeElementById("DesignPointWater4"); - removeElementById("DesignPointWater5"); - } - }; - //璁剧疆璁捐鐐规樉绀烘柟寮� - this.setDesignPointDispType = function (dispStyleType) { - m_displayStyle.DesignPointDispType = dispStyleType; + //璁剧疆鍚勭鍥炶皟鍑芥暟 + if (cbDict != null) { + m_changeWrkCurveCb = cbDict.setChangeWrkCurveCb; //璁剧疆鏇茬嚎淇敼鍥炶皟鍑芥暟 + } - drawDesignPoint(); - }; - //鏍规嵁娴侀噺璁$畻鍔熺巼 - this.calcPowerByFlow = function (flow, unit) { - if (flow == null || m_wrkCurveGrp == null) return null; - var flow_m3h = UnitHelper.ConvertQ_toM3H(unit, flow); - if (flow_m3h < 0.1) return null; + //璁$畻绗簩鍧愭爣 + calcSecondFlowCoordParas(); - var xPixel = getPixelValueQ(flow_m3h); - var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); - if (power_pixel_pt != null) { - var power = getActualValueP(power_pixel_pt.Y); + //鍒濆鍖栭潰鏉垮昂瀵� + initialPanelSize(); - return parseFloat(power.toFixed(2)); - } else { - return null; - } - }; - //鏍规嵁娴侀噺璁$畻鏁堢巼 - this.calcEtaByFlow = function (flow, unit) { - if (flow == null || m_wrkCurveGrp == null) return null; - var flow_m3h = UnitHelper.ConvertQ_toM3H(unit, flow); - if (flow_m3h < 0.1) return null; + // console.log(m_displayStyle,m_coordinatePara) - var xPixel = getPixelValueQ(flow_m3h); - var eta_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); - if (eta_pixel_pt != null) { - var power = getActualValueE(eta_pixel_pt.Y); + drawChart(); - return parseFloat(power.toFixed(2)); - } else { - return null; - } - }; - //璁剧疆瑁呯疆鏇茬嚎鏄惁鏄剧ず - this.setEquipCurveVisible = function (isVisible) { - m_equipCurve.isVisble = isVisible; + return this; + }; + //淇敼浜嗗尯鍩熺偣 + this.refreshRegionByFlow = function (std_unit_flow, tag) { + if (tag == null) return null; + var pt = getGrpPointInWrkCurveByFlow(std_unit_flow); + if (pt != null) { + refreshRegionPtPosi(pt, tag); + } + return pt; + }; + //鏍规嵁娴侀噺璁$畻鍔熺巼 + this.calcPowerByFlow = function (flow, unit) { + if (flow == null || m_wrkCurveGrp == null) return null; + var flow_stdUnit = UnitHelper.ConvertQ_toM3H(unit, flow); + if (flow_stdUnit < 0.1) return null; + //console.log("flow_stdUnit", flow_stdUnit, unit, flow) + var xPixel = getPixelValueQ(flow_stdUnit); + var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQP, xPixel); + if (power_pixel_pt != null) { + var power = getActualValueP(power_pixel_pt.Y); + // console.log("flow_power", flow_stdUnit, power.toFixed(2) ) + return power.toFixed(2); + } else { + return null; + } + }; + //鏍规嵁娴侀噺璁$畻鏁堢巼 + this.calcEtaByFlow = function (flow, unit) { + if (flow == null || m_wrkCurveGrp == null) return null; + var flow_stdUnit = UnitHelper.ConvertQ_toM3H(unit, flow); + if (flow_stdUnit < 0.1) return null; + //console.log("flow_stdUnit", flow_stdUnit, unit, flow) + var xPixel = getPixelValueQ(flow_stdUnit); + var power_pixel_pt = getBezierPointY(m_wrkCurveGrp.PixelQE, xPixel); + if (power_pixel_pt != null) { + var power = getActualValueE(power_pixel_pt.Y); + //console.log("flow_power", power.toFixed(2) ) + return power.toFixed(2); + } else { + return null; + } + }; + //璁剧疆姘村嵃鍥剧墖璺緞 + this.setWatermarkImageUrl = function (img_path) {}; + //淇敼浜嗚璁$偣 + this.refreshByDp = function (response) { + // + var ChartInfo = response.ChartObjectDict; + // console.log(response ) - if (isVisible) { - drawEquipmentCurve(); - } else { - removeElementById("EquipmentCurve"); - } - }; - this.setEquipCurveZeroH = function (zeroH) { - if (zeroH == null) return; - m_equipCurve.ZeroH = zeroH; - if (m_equipCurve.isVisble) { - drawEquipmentCurve(); - } - }; - //鑾峰彇瑁呯疆鏇茬嚎淇℃伅(鎶ュ憡浼氱敤) - this.getEquipCurveInfo = function () { - if (m_equipCurve == null) return null; - if (m_equipCurve.isVisble == false) return null; - if (m_equipCurve.DpSectPt == null) return null; - return { - //瑁呯疆鏇茬嚎(缁欓�夊瀷鎶ュ憡鐢�) - IsDisp: true, - ZeroPointH: m_equipCurve.ZeroH, - EndPointX: m_equipCurve.DpSectPt.X, - EndPointX: m_equipCurve.DpSectPt.Y, - }; - }; - this.getCoordinatePara = function () { - return m_coordinatePara; - }; - this.getChartDispStyle = function () { - return m_displayStyle; - }; - //淇敼浜嗚璁$偣 - this.refreshByDp = function (response) { - // - var ChartInfo = response.ChartObjectDict; - if (ChartInfo == null) return; - m_chartPointPara = response.ChartPointPara; + m_chartPointPara = response.ChartPointPara; - if (response.IsChangeOriginCurve) { - m_chartObject = ChartInfo; - } - else { - m_chartObject.SimWaterCurveQH = ChartInfo.SimWaterCurveQH; - m_chartObject.SimWaterCurveQE = ChartInfo.SimWaterCurveQE; - m_chartObject.SimWaterCurveQP = ChartInfo.SimWaterCurveQP; - m_chartObject.SimWaterCurveNPSH = ChartInfo.SimWaterCurveNPSH; + m_chartObject.EquipmentSectPt = ChartInfo.EquipmentSectPt; + m_chartObject.SimWaterCurveQH = ChartInfo.SimWaterCurveQH; + m_chartObject.SimWaterCurveQE = ChartInfo.SimWaterCurveQE; + m_chartObject.SimWaterCurveQP = ChartInfo.SimWaterCurveQP; + m_chartObject.SimWaterCurveNPSH = ChartInfo.SimWaterCurveNPSH; - m_chartObject.SimJieZhiCurveQH = ChartInfo.SimJieZhiCurveQH; - m_chartObject.SimJieZhiCurveQE = ChartInfo.SimJieZhiCurveQE; - m_chartObject.SimJieZhiCurveQP = ChartInfo.SimJieZhiCurveQP; - m_chartObject.SimJieZhiCurveNPSH = ChartInfo.SimJieZhiCurveNPSH; + m_chartObject.SimJieZhiCurveQH = ChartInfo.SimJieZhiCurveQH; + m_chartObject.SimJieZhiCurveQE = ChartInfo.SimJieZhiCurveQE; + m_chartObject.SimJieZhiCurveQP = ChartInfo.SimJieZhiCurveQP; + m_chartObject.SimJieZhiCurveNPSH = ChartInfo.SimJieZhiCurveNPSH; - m_chartObject.WaterWorkPoint = ChartInfo.WaterWorkPoint; - m_chartObject.JieZhiWorkPoint = ChartInfo.JieZhiWorkPoint; + m_chartObject.DesignPoint4StdUnit = ChartInfo.DesignPoint4StdUnit; - m_chartObject.DesignPoint4StdUnit = ChartInfo.DesignPoint4StdUnit; - } + ClearCurveElement(); - m_equipCurve.DpSectPt = ChartInfo.EquipmentSectPt; //瑁呯疆鏇茬嚎鐩镐氦鐐� + if (m_chartType == ConstParas.ChartType.Cut) { + m_pumpInfo.WrkD2 = response.BaseInfo.WrkD2; - if (m_chartType == ConstParas.ChartType.Cut) { - m_pumpInfo.WrkD2 = response.BaseInfo.WrkD2; - } else if (m_chartType == ConstParas.ChartType.Speed) { - m_pumpInfo.WrkSpeed = response.BaseInfo.WrkSpeed; - } + if (m_displayStyle.IsOnlyDispWrkCurve) drawAllCurve_Cut_Wrk(); + else drawAllCurve_Cut_Full(); + } else if (m_chartType == ConstParas.ChartType.Speed) { + m_pumpInfo.WrkSpeed = response.BaseInfo.WrkSpeed; - document.getElementById(m_divChartName).innerHTML = ""; + if (m_displayStyle.IsOnlyDispWrkCurve) drawAllCurve_Speed_Wrk(); + else drawAllCurve_Speed_Full(); + } else if (m_chartType == ConstParas.ChartType.BaoLuo) { + drawAllCurve_BaoLuo(); + } else return; - // - if (!initialSvg()) return; + //璁捐鐐� + drawDesignPoint(); - drawChart(); - }; - //閲嶇粯鍥捐〃澶у皬 - this.Resize = function (widht, height) { - if (widht && widht > 0) m_chartSize.TotalWidth = widht; - if (height && height > 0) m_chartSize.TotalHeight = height; + //瑁呯疆鏇茬嚎 + drawEquipmentCurve(); + }; + //閲嶇粯鍥捐〃澶у皬 + this.Resize = function (widht, height) { + if (widht && widht > 0) m_chartSize.TotalWidth = widht; + if (height && height > 0) m_chartSize.TotalHeight = height; - document.getElementById(m_divChartName).innerHTML = ""; + document.getElementById(m_divChartName).innerHTML = ''; - //璁$畻绗簩鍧愭爣 - //calcSecondFlowCoordParas(); + //璁$畻绗簩鍧愭爣 + //calcSecondFlowCoordParas(); - //鍒濆鍖栭潰鏉� - initialPanelSize(); + //鍒濆鍖栭潰鏉� + initialPanelSize(); - drawChart(); - }; + drawChart(); + }; }; -export default LxpChartDiagram; \ No newline at end of file +export default LxpChartDiagram; diff --git a/src/components/Chart/js/MultiSpeedChartDiagram.js b/src/components/Chart/js/MultiSpeedChartDiagram.js index 296b698..cdeb03b 100644 --- a/src/components/Chart/js/MultiSpeedChartDiagram.js +++ b/src/components/Chart/js/MultiSpeedChartDiagram.js @@ -362,7 +362,7 @@ var content = UnitHelper.valueFormat(UnitHelper.getDispValueQ(UnitHelper.ConvertQ_fromM3H(m_unit.Q, q))); var posiX_grid = m_chartSize.DiagramLeft + m_chartSize.SpaceGridX * i; //鍒诲害绾� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", posiX_grid, " ", bottom_posi, " L ", posiX_grid, " ", bottom_posi + tickLength); m_svg.createPath(null, valueMain.join(''), attrAxisTickX, null);//"TickLineX" + i @@ -391,7 +391,7 @@ if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.GridNumberX) { for (var j = 0; j <= m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiX_grid + m_chartSize.SpaceGridX * j / (m_displayStyle.MiniTickNumber + 1); - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", pois_minTick, " ", bottom_posi, " L ", pois_minTick, " ", bottom_posi + minTickLength); m_svg.createPath(null, valueMini.join(''), attrAxisTickX, null); } @@ -496,7 +496,7 @@ var posiY_grid = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramLeft, " ", posiY_grid, " L ", m_chartSize.DiagramLeft - tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickH, null); @@ -514,7 +514,7 @@ if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoH) { for (var j = 1; j <= m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.UpDiagram.SpaceGridY * j / (m_displayStyle.MiniTickNumber + 1); - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramLeft, " ", pois_minTick, " L ", m_chartSize.DiagramLeft - minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickH, null); } @@ -569,7 +569,7 @@ var content = m_coordinatePara.MinE + i * m_coordinatePara.SpaceE; var posiY_grid = m_chartSize.UpDiagram.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramRight, " ", posiY_grid, " L ", m_chartSize.DiagramRight + tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickE, null); @@ -585,7 +585,7 @@ if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoE) { for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.UpDiagram.SpaceGridY * j / m_displayStyle.MiniTickNumber; - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramRight, " ", pois_minTick, " L ", m_chartSize.DiagramRight + minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickE, null); } @@ -657,7 +657,7 @@ var posiY_grid = m_chartSize.DownDiagram.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramLeft, " ", posiY_grid, " L ", m_chartSize.DiagramLeft - tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickP, null); @@ -675,7 +675,7 @@ if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoP && i != m_coordinatePara.EndLineNoE) { for (var j = 1; j < m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.DownDiagram.SpaceGridY * j / m_displayStyle.MiniTickNumber; - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramLeft, " ", pois_minTick, " L ", m_chartSize.DiagramLeft - minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickP, null); } @@ -731,7 +731,7 @@ var content = UnitHelper.valueFormat(m_coordinatePara.MinNPSH + i * m_coordinatePara.SpaceNPSH); var posiY_grid = m_chartSize.DownDiagram.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramRight, " ", posiY_grid, " L ", m_chartSize.DiagramRight + tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickNPSH, null); @@ -747,7 +747,7 @@ if (m_displayStyle.isDispMiniTick && i != m_coordinatePara.EndLineNoNPSH) { for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.DownDiagram.SpaceGridY * j / m_displayStyle.MiniTickNumber; - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramRight, " ", pois_minTick, " L ", m_chartSize.DiagramRight + minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickNPSH, null); } @@ -833,7 +833,7 @@ var posiY_grid = m_chartSize.PanelH.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramLeft, " ", posiY_grid, " L ", m_chartSize.DiagramLeft - tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickH, null); @@ -854,7 +854,7 @@ if (m_displayStyle.isDispMiniTick && i != (m_coordinatePara.EndLineNoH - m_coordinatePara.StartLineNoH)) { for (var j = 1; j <= m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.UpDiagram.SpaceGridY * j / (m_displayStyle.MiniTickNumber + 1); - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramLeft, " ", pois_minTick, " L ", m_chartSize.DiagramLeft - minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickH, null); } @@ -908,7 +908,7 @@ var posiY_grid = m_chartSize.PanelE.Bottom - m_chartSize.UpDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramRight, " ", posiY_grid, " L ", m_chartSize.DiagramRight + tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickE, null); @@ -929,7 +929,7 @@ if (m_displayStyle.isDispMiniTick && i != (m_coordinatePara.EndLineNoE - m_coordinatePara.StartLineNoE)) { for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.UpDiagram.SpaceGridY * j / m_displayStyle.MiniTickNumber; - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramRight, " ", pois_minTick, " L ", m_chartSize.DiagramRight + minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickE, null); } @@ -996,7 +996,7 @@ var posiY_grid = m_chartSize.PanelP.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramLeft, " ", posiY_grid, " L ", m_chartSize.DiagramLeft - tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickP, null); @@ -1019,7 +1019,7 @@ && i != (m_coordinatePara.EndLineNoP - m_coordinatePara.StartLineNoP)) { for (var j = 1; j < m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.DownDiagram.SpaceGridY * j / m_displayStyle.MiniTickNumber; - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramLeft, " ", pois_minTick, " L ", m_chartSize.DiagramLeft - minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickP, null); } @@ -1075,7 +1075,7 @@ var posiY_grid = m_chartSize.PanelNPSH.Bottom - m_chartSize.DownDiagram.SpaceGridY * i; //涓诲埢搴� - var valueMain = new Array(); + var valueMain = []; valueMain.push("M ", m_chartSize.DiagramRight, " ", posiY_grid, " L ", m_chartSize.DiagramRight + tickLength, " ", posiY_grid); m_svg.createPath(null, valueMain.join(''), attrAxisTickNPSH, null); @@ -1096,7 +1096,7 @@ if (m_displayStyle.isDispMiniTick && i != (m_coordinatePara.EndLineNoNPSH - m_coordinatePara.StartLineNoNPSH)) { for (var j = 0; j < m_displayStyle.MiniTickNumber; j++) { var pois_minTick = posiY_grid - m_chartSize.DownDiagram.SpaceGridY * j / m_displayStyle.MiniTickNumber; - var valueMini = new Array(); + var valueMini = []; valueMini.push("M ", m_chartSize.DiagramRight, " ", pois_minTick, " L ", m_chartSize.DiagramRight + minTickLength, " ", pois_minTick); m_svg.createPath(null, valueMini.join(''), attrAxisTickNPSH, null); } @@ -1130,7 +1130,10 @@ }; //浜х敓瑁呯疆鏇茬嚎 var drawEquipmentCurve = function () { - $("#EquipmentCurve").remove(); + var equipmentCurveElement = document.getElementById("EquipmentCurve"); + if (equipmentCurveElement) { + equipmentCurveElement.remove(); + } if (m_chartObject.EquipmentSectPt == null) return; var pointNumber = 20; @@ -1157,7 +1160,7 @@ return; } - var pixelPoints = new Array(); + var pixelPoints = []; for (var v = 0; v < curvePoints.length; v++) { var pt = curvePoints[v]; var x = getPixelValueQ(pt.X); @@ -1181,7 +1184,7 @@ //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { return; - }; + } var style = { "stroke-width": "2px", @@ -1208,7 +1211,7 @@ }, style); //鏄惁鏄剧ず if (isDisp != null && !isDisp) { - $("#" + curveElementName).hide(); + document.getElementById(curveElementName).style.display = 'none'; } //缁樺埗瀹氫箟鐐� @@ -1493,7 +1496,7 @@ if (curveElementName == "PerferBlodCurveQE_Allow") isForceZeroPt = false; - var pixelPoints = new Array(); + var pixelPoints = []; for (var v = 0; v < points.length; v++) { if (isForceZeroPt && v == 0 && points[0].X < 10) {//寮哄埗褰掗浂 points[0].X = 0; @@ -1521,7 +1524,7 @@ //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { return null; - }; + } var style = { "stroke-width": "2px", "stroke": m_displayStyle.ColorE, @@ -1546,7 +1549,7 @@ "id": curveElementName }, style); if (isDisp != null && !isDisp) { - $("#" + curveElementName).hide(); + document.getElementById(curveElementName).style.display = 'none'; } return pixelPoints; }; @@ -1559,7 +1562,7 @@ return null; } - var pixelPoints = new Array(); + var pixelPoints = []; for (var v = 0; v < points.length; v++) { var pt = points[v]; var x = getPixelValueQ(pt.X); @@ -1582,7 +1585,7 @@ //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { return null; - }; + } var style = { "stroke-width": "2px", "stroke": m_displayStyle.ColorP, @@ -1609,7 +1612,7 @@ "id": curveElementName }, style); if (curveIsDisp != null && !curveIsDisp) { - $("#" + curveElementName).hide(); + document.getElementById(curveElementName).style.display = 'none'; } return pixelPoints; @@ -1623,7 +1626,7 @@ return null; } - var pixelPoints = new Array(); + var pixelPoints = []; for (var v = 0; v < points.length; v++) { var pt = points[v]; var x = getPixelValueQ(pt.X); @@ -1647,7 +1650,7 @@ //鏈夋椂浼氭姤閿欙紝鍔犱笂杩欎釜灏辨病浜� tangxu 20151122 if (pathValue.toString().indexOf("M ,NaN, ,NaN") == 0) { return; - }; + } var style = { "stroke-width": "2px", "stroke": m_displayStyle.ColorNPSH, @@ -1670,7 +1673,7 @@ "id": curveElementName }, style); if (curveIsDisp != null && !curveIsDisp) { - $("#" + curveElementName).hide(); + document.getElementById(curveElementName).style.display = 'none'; } }; //娓呯悊 @@ -1797,7 +1800,10 @@ }; //浜х敓瑁呯疆鏇茬嚎 var drawEquipmentCurve = function () { - $("#EquipmentCurve").remove(); + var equipmentCurveElement = document.getElementById("EquipmentCurve"); + if (equipmentCurveElement) { + equipmentCurveElement.remove(); + } if (m_chartObject.EquipmentSectPt == null) return; var pointNumber = 20; @@ -1815,25 +1821,29 @@ //鏌ヨ鏌ヨ绔栫洿鎸囧绾� var drawQueryIndicatVertLine = function () { - if ($("#infoDv4VerticalLine").is("div")) { - $("#infoDv4VerticalLine").remove(); + if (document.getElementById("infoDv4VerticalLine")) { + var infoDiv = document.getElementById("infoDv4VerticalLine"); + if (infoDiv) { + infoDiv.parentNode.removeChild(infoDiv); + } } //鍏堝垱寤虹敤浜庢斁缃煡璇俊鎭殑Div var htmlDiv = "<lable style='font-size:7px'>" + getTranslateString("娴侀噺") + "</label>"; - $("#" + m_divChartName).append($("<div id='infoDv4VerticalLine'></div>").css({ - "position": "relative",//relative absolute - "color": "gray", - "font-size": "9px", - //"font-family": "Times New Roman", - //"font-weight": "bold", - "text-align": "left", - "width": "120px", - "left": (m_chartSize.DiagramRight - 125).toString() + "px", - "top": (12 - m_chartSize.TotalHeight).toString() + "px",// + m_divChartName + "px" - }).html(htmlDiv).hide()); + var infoDiv = document.createElement('div'); + infoDiv.id = 'infoDv4VerticalLine'; + infoDiv.style.position = 'relative'; + infoDiv.style.color = 'gray'; + infoDiv.style.fontSize = '9px'; + infoDiv.style.textAlign = 'left'; + infoDiv.style.width = '120px'; + infoDiv.style.left = (m_chartSize.DiagramRight - 125) + 'px'; + infoDiv.style.top = (12 - m_chartSize.TotalHeight) + 'px'; + infoDiv.innerHTML = htmlDiv; + infoDiv.style.display = 'none'; + document.getElementById(m_divChartName).appendChild(infoDiv); - m_infoDv4VerticalLine = $("#infoDv4VerticalLine"); + m_infoDv4VerticalLine = document.getElementById("infoDv4VerticalLine"); var attr4verticalLine = { @@ -1851,13 +1861,13 @@ //鍒涘缓绔栫洿绾� - var pathValue1 = new Array(); + var pathValue1 = []; var vertialLinePathName1 = "verticalLine1"; pathValue1.push("M ", xStartValuePixel, " ", m_chartSize.UpDiagram.Up, " L ", xStartValuePixel, " ", m_chartSize.DownDiagram.Bottom); m_svg.createPath(vertialLinePathName1, pathValue1.join(''), { id: vertialLinePathName1 }, attr4verticalLine, null); - m_queryInfoIndicatorLineV = $(getSvgObjByName(vertialLinePathName1)); + m_queryInfoIndicatorLineV = document.getElementById(vertialLinePathName1); @@ -1876,11 +1886,11 @@ }); - $(document).mousemove(function (e) { + document.addEventListener('mousemove', function (e) { if (isMoveVerticalLine) { var svg_root = m_svg.getRootNode(); - var svg = $(svg_root); + var svg = document.querySelector(svg_root); var e = window.event || e; if (e.clientX - svg.offset().left > m_chartSize.DiagramLeft && @@ -1893,13 +1903,14 @@ drawQueryDataInfo(xPixel); //淇敼浣嶇疆 if (m_queryInfoIndicatorLineV) { - var pathValue1 = new Array(); + var pathValue1 = []; pathValue1.push("M ", xPixel, " ", m_chartSize.UpDiagram.Up, " L ", xPixel, " ", m_chartSize.DownDiagram.Bottom); m_queryInfoIndicatorLineV.attr("d", pathValue1.join('')); } } } - }).mouseup(function (e) { + }) + document.addEventListener('mouseup', function (e) { if (isMoveVerticalLine) { isMoveVerticalLine = false; } @@ -2234,29 +2245,54 @@ //缁樺埗鍥捐〃(鎵�鏈夋洸绾�) var drawDiagramCurve = function () { var curveWidth = 2; + var maxCurveQHElement = document.getElementById("MaxCurveQH"); + if (maxCurveQHElement) { + maxCurveQHElement.remove(); + } - $("#MaxCurveQH").remove(); - //$("#MaxCurveQE").remove(); - $("#MaxCurveQP").remove(); - $("#MaxCurveQHText").remove(); - //$("#MaxCurveQEText").remove(); - $("#MaxCurveQPText").remove(); + var maxCurveQPElement = document.getElementById("MaxCurveQP"); + if (maxCurveQPElement) { + maxCurveQPElement.remove(); + } + + var maxCurveQHTextElement = document.getElementById("MaxCurveQHText"); + if (maxCurveQHTextElement) { + maxCurveQHTextElement.remove(); + } + + var maxCurveQPTextElement = document.getElementById("MaxCurveQPText"); + if (maxCurveQPTextElement) { + maxCurveQPTextElement.remove(); + } if (m_simuSpeedCurves != null && m_simuSpeedCurves.length > 0) { for (var i = 0; i < m_simuSpeedCurves.length; i++) { var id = m_simuSpeedCurves[i].id; - $("#SimuCurveQH" + id).remove(); - //$("#SimuCurveQE"+id).remove(); - $("#SimuCurveQP" + id).remove(); + var curveQHElement = document.getElementById("SimuCurveQH" + id); + if (curveQHElement) { + curveQHElement.remove(); + } - $("#SimuCurveQHText" + id).remove(); - //$("#SimuCurveQEText"+id).remove(); - $("#SimuCurveQPText" + id).remove(); + var curveQPElement = document.getElementById("SimuCurveQP" + id); + if (curveQPElement) { + curveQPElement.remove(); + } + + var curveQHTextElement = document.getElementById("SimuCurveQHText" + id); + if (curveQHTextElement) { + curveQHTextElement.remove(); + } + + var curveQPTextElement = document.getElementById("SimuCurveQPText" + id); + if (curveQPTextElement) { + curveQPTextElement.remove(); + } } } // m_maxSpeedCurve.color = "#003a6c"; + var curveMaxPathQH = createCurveQH("MaxCurveQH", m_maxSpeedCurve.RealQH, curveWidth, m_maxSpeedCurve.color); var pointsQH = m_maxSpeedCurve.RealQH; drawSpeedTextByQH("MaxCurveQHText", m_maxSpeedCurve.speed, pointsQH[pointsQH.length - 1], m_maxSpeedCurve.color); @@ -2362,7 +2398,7 @@ break; } if (isNeedRefresh) { - $("#" + m_divChartName).empty(); + document.getElementById(m_divChartName).innerHTML = ''; //鍒濆鍖栭潰鏉垮昂瀵� initialPanelSize(); @@ -2407,13 +2443,25 @@ var curveColor = simuCurve.color; var curve_id = simuCurve.id; - $("#SimuCurveQH" + curve_id).remove(); - //$("#SimuCurveQE"+i).remove(); - $("#SimuCurveQP" + curve_id).remove(); + var curveQHElement = document.getElementById("SimuCurveQH" + curve_id); + if (curveQHElement) { + curveQHElement.remove(); + } - $("#SimuCurveQHText" + curve_id).remove(); - //$("#SimuCurveQEText"+i).remove(); - $("#SimuCurveQPText" + curve_id).remove(); + var curveQPElement = document.getElementById("SimuCurveQP" + curve_id); + if (curveQPElement) { + curveQPElement.remove(); + } + + var curveQHTextElement = document.getElementById("SimuCurveQHText" + curve_id); + if (curveQHTextElement) { + curveQHTextElement.remove(); + } + + var curveQPTextElement = document.getElementById("SimuCurveQPText" + curve_id); + if (curveQPTextElement) { + curveQPTextElement.remove(); + } var int_speed = Math.round(speed) ; @@ -2439,7 +2487,7 @@ //浜х敓缃戞牸绾跨珫鐩存柟鍚� for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { var distance = m_chartSize.SpaceGridX * i; - var valueTemp = new Array(); + var valueTemp = []; valueTemp.push("M ", m_chartSize.DiagramLeft + distance, " ", m_chartSize.SpaceTop, " L ", m_chartSize.DiagramLeft + distance, " ", m_chartSize.UpDiagram.Bottom); m_svg.createPath(null, valueTemp.join(''), attr, null); } @@ -2447,7 +2495,7 @@ //浜х敓缃戞牸绾挎按骞虫柟鍚� for (var i = 0; i <= m_coordinatePara.GridNumberY; i++) { var distance = m_chartSize.UpDiagram.SpaceGridY * i; - var valueTemp = new Array(); + var valueTemp = []; valueTemp.push("M ", m_chartSize.DiagramLeft, " ", m_chartSize.SpaceTop + distance, " L ", m_chartSize.DiagramRight, " ", m_chartSize.SpaceTop + distance); m_svg.createPath(null, valueTemp.join(''), attr, null); } @@ -2470,7 +2518,7 @@ //浜х敓缃戞牸绾跨珫鐩存柟鍚� for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { var distance = m_chartSize.SpaceGridX * i; - var valueTemp = new Array(); + var valueTemp = []; valueTemp.push("M ", m_chartSize.DiagramLeft + distance, " ", m_chartSize.UpDiagram.Up, " L ", m_chartSize.DiagramLeft + distance, " ", m_chartSize.UpDiagram.Bottom); m_svg.createPath(null, valueTemp.join(''), attr, null); @@ -2481,7 +2529,7 @@ for (var i = 0; i <= m_coordinatePara.GridNumberX; i++) { var distance = m_chartSize.SpaceGridX * i; - var valueTemp = new Array(); + var valueTemp = []; valueTemp.push("M ", m_chartSize.DiagramLeft + distance, " ", m_chartSize.DownDiagram.Up, " L ", m_chartSize.DiagramLeft + distance, " ", m_chartSize.DownDiagram.Bottom); m_svg.createPath(null, valueTemp.join(''), attr, null); } @@ -2489,14 +2537,14 @@ //浜х敓缃戞牸绾挎按骞虫柟鍚� for (var i = 0; i <= m_chartSize.UpDiagram.GridNumberY; i++) { var distance = m_chartSize.UpDiagram.SpaceGridY * i; - var valueTemp = new Array(); + var valueTemp = []; valueTemp.push("M ", m_chartSize.DiagramLeft, " ", m_chartSize.UpDiagram.Up + distance, " L ", m_chartSize.DiagramRight, " ", m_chartSize.UpDiagram.Up + distance); m_svg.createPath(null, valueTemp.join(''), attr, null); } for (var i = 0; i <= m_chartSize.DownDiagram.GridNumberY; i++) { var distance = m_chartSize.DownDiagram.SpaceGridY * i; - var valueTemp = new Array(); + var valueTemp = []; valueTemp.push("M ", m_chartSize.DiagramLeft, " ", m_chartSize.DownDiagram.Up + distance, " L ", m_chartSize.DiagramRight, " ", m_chartSize.DownDiagram.Up + distance); m_svg.createPath(null, valueTemp.join(''), attr, null); } @@ -2509,7 +2557,7 @@ var iPointCout = pixelPoints.length; var a = 0.09; var b = 0.09; - var controlPoint = new Array(); + var controlPoint = []; for (var i = 0; i < iPointCout - 1; i++) { var bezier = {}; @@ -2560,7 +2608,7 @@ if (bezierCurveValue == null) { return; } - var pathValue = new Array(); + var pathValue = []; for (var i = 0; i < bezierCurveValue.length; i++) { var b_pt = bezierCurveValue[i]; if (i == 0) { @@ -2701,7 +2749,7 @@ }; //璁剧疆鏄惁鏄崟鑹叉樉绀� this.setMonorColor = function (isMonorColor) { - $("#" + m_divChartName).empty(); + document.getElementById(m_divChartName).innerHTML = ''; setObjectColor(isMonorColor); if (!initialSvg()) return; @@ -2821,13 +2869,13 @@ return; speedItem.color = color; - $("#SimuCurveQH" + speedItem.id).css("stroke", color); - //$("#SimuCurveQE"+i).remove(); - $("#SimuCurveQP" + speedItem.id).css("stroke", color); + document.getElementById("SimuCurveQH" + speedItem.id).style.stroke = color; - $("#SimuCurveQHText" + speedItem.id).css("fill", color); - //$("#SimuCurveQEText"+i).remove(); - $("#SimuCurveQPText" + speedItem.id).css("fill", color); + document.getElementById("SimuCurveQP" + speedItem.id).style.stroke = color; + + document.getElementById("SimuCurveQHText" + speedItem.id).style.fill = color; + + document.getElementById("SimuCurveQPText" + speedItem.id).style.fill = color; //閫氱煡澶栭儴 鏇茬嚎淇敼浜� noticeCurveChanged(); @@ -2845,13 +2893,25 @@ return; m_simuSpeedCurves.splice(index, 1) - $("#SimuCurveQH" + id).remove(); - //$("#SimuCurveQE"+i).remove(); - $("#SimuCurveQP" + id).remove(); + var curveQHElement = document.getElementById("SimuCurveQH" + id); + if (curveQHElement) { + curveQHElement.remove(); + } - $("#SimuCurveQHText" + id).remove(); - //$("#SimuCurveQEText"+i).remove(); - $("#SimuCurveQPText" + id).remove(); + var curveQPElement = document.getElementById("SimuCurveQP" + id); + if (curveQPElement) { + curveQPElement.remove(); + } + + var curveQHTextElement = document.getElementById("SimuCurveQHText" + id); + if (curveQHTextElement) { + curveQHTextElement.remove(); + } + + var curveQPTextElement = document.getElementById("SimuCurveQPText" + id); + if (curveQPTextElement) { + curveQPTextElement.remove(); + } }; //璁剧疆瀹瑰櫒 this.setContainerDiv = function (divChartName, divWidth, divHeight) { @@ -2883,7 +2943,7 @@ }; //璁剧疆宸ュ叿鎻愮ず鏍� this.setToolTipName = function (toolTipName) { - m_toolTipContent = $("#" + toolTipName); + m_toolTipContent = document.getElementById(toolTipName); }; //鑾峰彇鏌ヨ鏇茬嚎鏌ヨ寰楀埌鐨勬暟鎹� 缁欏弬鏁版煡璇娇鐢� this.setChangeQueryDataCb = function (cb) { @@ -2907,7 +2967,7 @@ return; //console.log("initialChart ChartFullInfo", ChartFullInfo) //娓呯┖ - $("#" + m_divChartName).empty(); + document.getElementById(m_divChartName).innerHTML = ''; if (ChartFullInfo.ChartObjectDict == null) return; @@ -3033,7 +3093,7 @@ if (height && height > 0) m_chartSize.TotalHeight = height; - $("#" + m_divChartName).empty(); + document.getElementById(m_divChartName).innerHTML = ''; //鍒濆鍖栭潰鏉� initialPanelSize(); diff --git a/src/views/EecLabel.vue b/src/views/EecLabel.vue index 47c8d00..16c4acd 100644 --- a/src/views/EecLabel.vue +++ b/src/views/EecLabel.vue @@ -268,6 +268,20 @@ .then((res) => { state.m_PageLoading = false; let result = res.data; + result.sort((a: any, b: any) => { + const aPrefix = a.Model.slice(0, 3); + const bPrefix = b.Model.slice(0, 3); + const aContainsDP = aPrefix.includes('DP') || aPrefix.includes('DRL'); + const bContainsDP = bPrefix.includes('DP') || bPrefix.includes('DRL'); + + if (aContainsDP && !bContainsDP) { + return -1; + } else if (!aContainsDP && bContainsDP) { + return 1; + } else { + return 0; + } + }); let arr = []; result.forEach((item: any, index: number) => { let node = { @@ -335,7 +349,6 @@ localStorage.setItem('currentProduct', JSON.stringify(currentProduct)); } router.push(`/product/${currentProduct.Id}`); - }; const clickDetailCertifcate = (row: any) => { state.m_detailDialogInfo = row; diff --git a/src/views/Home.vue b/src/views/Home.vue index bb977ac..71af422 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -229,7 +229,7 @@ :slidesPerView="5" :spaceBetween="10" :autoplay="{ - delay: 2500, + delay: 1500, disableOnInteraction: false, }" :modules="SwiperModule" diff --git a/src/views/IndustrialSoftware.vue b/src/views/IndustrialSoftware.vue index 823733b..a6f92f2 100644 --- a/src/views/IndustrialSoftware.vue +++ b/src/views/IndustrialSoftware.vue @@ -168,7 +168,7 @@ p-id="34746" class="icon-path" ></path></svg - >璇佷功 + >鎶ュ憡 </div> </div> </div> diff --git a/src/views/ProductDetail.vue b/src/views/ProductDetail.vue index 8653d4b..1738131 100644 --- a/src/views/ProductDetail.vue +++ b/src/views/ProductDetail.vue @@ -94,14 +94,17 @@ </div> </el-tab-pane> <el-tab-pane label="鎬ц兘鏇茬嚎" name="PerformanceCurve"> - <div style="width: 1200px; height: 750px" v-show="false"> + <div style="width: 1200px; height: 750px" v-show="true"> <LXBChart ref="lxbChartCtrl"></LXBChart> </div> - <el-empty description="鏆傛棤鎬ц兘鏇茬嚎淇℃伅" /> + <!-- <el-empty description="鏆傛棤鎬ц兘鏇茬嚎淇℃伅" /> --> </el-tab-pane> <el-tab-pane label="鍙橀�熸洸绾�" name="params"> <!-- <div style="width: 1200px; height: 750px"></div> --> - <el-empty description="鏆傛棤鍙橀�熸洸绾夸俊鎭�" /> + <div style="width: 1200px; height: 750px" v-show="true"> + <MultiSpeedChart ref="multiSpeedChartCtrl"></MultiSpeedChart> + </div> + <!-- <el-empty description="鏆傛棤鍙橀�熸洸绾夸俊鎭�" /> --> </el-tab-pane> <el-tab-pane label="鍒囧壊鏇茬嚎" name="CutCurve"> <el-empty description="鏆傛棤鍒囧壊鏇茬嚎淇℃伅" /> @@ -112,7 +115,7 @@ </div> </el-tab-pane> <el-tab-pane label="閫夊瀷鎶ュ憡" name="SelectReport"> - <el-empty description="鏆傛棤鎶ュ憡" /> + <el-empty description="鏆傛棤鎶ュ憡" /> </el-tab-pane> <el-tab-pane label="娴嬭瘯鎶ュ憡" name="certificate"> <div class="p-6 flex justify-center"> @@ -184,11 +187,13 @@ import axios from 'axios'; import pumpDetailInfo from './mock/DetailsInfo'; import LXBChart from '@/components/Chart/LXBChart.vue'; +import MultiSpeedChart from '@/components/Chart/MultiSpeedChart.vue'; import prop from './components/prop.vue'; const route = useRoute(); const router = useRouter(); const lxbChartCtrl = ref(); +const multiSpeedChartCtrl = ref(); const propCtrl = ref(); const activeTab = ref('intro'); const showBuyDialog = ref(false); @@ -334,8 +339,14 @@ NPSHr: null, }, }; - lxbChartCtrl.value.initPumpInfoData(0, pumpInfoData, () => {}, m_userUnitSetting); - + var cb_dict = { + //璁剧疆鏇茬嚎淇敼鍥炶皟鍑芥暟 + setChangeWrkCurveCb: (curve) => { + multiSpeedChartCtrl.value.setWrkCurveInfo(curve); + }, + }; + lxbChartCtrl.value.initPumpInfoData(0, pumpInfoData, cb_dict, m_userUnitSetting); + multiSpeedChartCtrl.value.initPumpInfoData(0, pumpInfoData, () => {}, m_userUnitSetting); //鍒濆鍖栧睘鎬ф帶浠� propCtrl.value.initialData(0, pumpBaseInfo, pumpInfoData.PartFullInfo, pumpInfoData.SettingInfo); }; diff --git a/src/views/mock/DetailsInfo.ts b/src/views/mock/DetailsInfo.ts index 1710a6a..c49b4c7 100644 --- a/src/views/mock/DetailsInfo.ts +++ b/src/views/mock/DetailsInfo.ts @@ -1,1183 +1,3328 @@ export default { - "BaseInfo": { - "SeriesID": 4, - "PumpID": 2174, - "SubID": 0, - "ChartType": 3, - "PumpStyle": 0, - "PumpName4File": "KQDQ25-1-17", - "PumpName": "KQDQ25-1-17", - "SubPumpName": null, - "SeriesName": "KQDQ", - "CatalogName": "杞诲瀷绔嬪紡澶氱骇绂诲績娉�", - "DefaultMotorPower": 0, - "IsMainModel": true, - "IsOuterSubModel": false, - "IsInnerSubModel": false, - "MaxD2": 86, - "WrkD2": 86, - "MinD2": 86, - "Ratedn": 2750, - "WrkSpeed": 2750, - "MinSpeed": null, - "FirePumpType": 0, - "DriveType": 0, - "MotorFrequece": 50, - "StructFileLabelName": "缁撴瀯鍥�", - "AssemFileLabelName": "瀹夎鍥�", - "DimFileLabelName": "浜у搧灏哄鍥�", - "ElecFileLabelName": "鐢垫皵鍥�", - "StructFilePageVisible": false, - "AssemFilePageVisible": false, - "DimFilePageVisible": false, - "ElecFilePageVisible": false, - "IsDispNameplateParasInReport": false, - "NameplateParasSource": 0, - "RatedParas": { - "H": "17", - "Q": "1", - "E": "33", - "P": "0.14", - "NPSHr": "1.5" - }, - "RatedDegree": null - }, - "SettingInfo": { - "SeriesUnitQ": 1, - "SeriesUnitH": 0, - "SeriesUnitP": 1, - "SeriesUnitNPSH": 0, - "SeriesIsD2Meter": true, - "IsDispCurveQE": true, - "IsDispCurveQP": true, - "LxpCurveBundleDispStyle": 2, - "GroupPointQeMethod": 0, - "AllowRegionDispStyle": 2, - "PerferRegionDispStyle": 0, - "IsMotorPowerComboxInSelectGrid": false, - "IsAutoCalcMotorPower": true, - "CalcMotorPowerPtPosi": 5, - "CalcAxisPowerCoeff": 1.01, - "PartPropIsQueryMotorDsPara": false, - "IsChangeSpeedByMotorSpeedProp": false, - "MotorPowerInSelectDataSource": 0, - "IsDispSpeedSimuCurve": true, - "EtaTextType": 0, - "PowerTextType": 0 - }, - "MainParaItemList": [ - { - "Name": "娴侀噺", - "Value": "", - "Unit": 1, - "UnitName": "m鲁/h", - "Tag": "RequestPointQ", - "Range": null, - "IsEditAble": true - }, - { - "Name": "鎵▼", - "Value": "", - "Unit": 0, - "UnitName": "m", - "Tag": "RequestPointH", - "Range": null, - "IsEditAble": true - }, - { - "Name": "杞��", - "Value": "2750", - "Unit": 0, - "UnitName": "rpm", - "Tag": "WrkSpeed", - "Range": null, - "IsEditAble": false - } - ], - "ChartPointPara": { - "JieZhiWrkPt": null, - "LxpPerformParas": { - "PreferDisplayMode": 0, - "AllowDisplayMode": 1, - "PreferredRegionMin": 0.9, - "PreferredRegionMax": 1.1, - "AllowableRegionMin": 0.6, - "AllowableRegionMax": 1.25, - "ContinueRegionMin": 0, - "BEP": 1 - }, - "Bep": null, - "AllowMinPoint": { - "ID": 0, - "Q": 0.6, - "H": 17.5, - "E": 23.9, - "P": 0.12, - "NPSH": 1.42 - }, - "AllowMaxPoint": { - "ID": 0, - "Q": 1.25, - "H": 16.1, - "E": 37.4, - "P": 0.146, - "NPSH": 1.52 - }, - "PerferMinPoint": { - "ID": 0, - "Q": 0.9, - "H": 16.9, - "E": 31.9, - "P": 0.132, - "NPSH": 1.46 - }, - "PerferMaxPoint": { - "ID": 0, - "Q": 1.1, - "H": 16.5, - "E": 35.6, - "P": 0.139, - "NPSH": 1.49 - }, - "AllowRegionInGridVisible": true, - "PerferRegionInGridVisible": false, - "AllowRegionInChartVisible": true, - "PerferRegionInChartVisible": false, - "AllowRegionDispStyle": 2, - "PerferRegionDispStyle": 0, - "ZeroPtHead": 0, - "ZeroPtRatio": 0, - "IsDispMaxEtaPtInGrid": false, - "IsDispMaxEtaPtInChart": false, - "IsDispMaxPowerPtInGrid": false, - "IsDispMaxPowerPtInChart": false, - "IsDispZeroPtInChart": false, - "IsDispZeroPtInGrid": false, - "MotorAllowMaxPtDict": null, - "Percent150Pt": null, - "MaxPowerPt": null - }, - "ReportSetting": { - "FileFormats": [ - 0, - 2 - ], - "IsRemoveWaterMark": true, - "IsRemoveCorpInfo": true - }, - "ChartObjectDict": { - "MaxWaterCurveQH": [ - { - "X": 0, - "Y": 18.944 - }, - { - "X": 0.095, - "Y": 18.709 - }, - { - "X": 0.189, - "Y": 18.48 - }, - { - "X": 0.284, - "Y": 18.256 - }, - { - "X": 0.379, - "Y": 18.037 - }, - { - "X": 0.474, - "Y": 17.821 - }, - { - "X": 0.568, - "Y": 17.609 - }, - { - "X": 0.663, - "Y": 17.399 - }, - { - "X": 0.758, - "Y": 17.192 - }, - { - "X": 0.853, - "Y": 16.987 - }, - { - "X": 0.947, - "Y": 16.783 - }, - { - "X": 1.042, - "Y": 16.58 - }, - { - "X": 1.137, - "Y": 16.377 - }, - { - "X": 1.232, - "Y": 16.173 - }, - { - "X": 1.326, - "Y": 15.969 - }, - { - "X": 1.421, - "Y": 15.763 - }, - { - "X": 1.516, - "Y": 15.555 - }, - { - "X": 1.611, - "Y": 15.345 - }, - { - "X": 1.705, - "Y": 15.131 - }, - { - "X": 1.8, - "Y": 14.914 - } - ], - "MaxWaterCurveQE": [ - { - "X": 0, - "Y": 0 - }, - { - "X": 0.138, - "Y": 6.53 - }, - { - "X": 0.277, - "Y": 12.366 - }, - { - "X": 0.415, - "Y": 17.685 - }, - { - "X": 0.554, - "Y": 22.462 - }, - { - "X": 0.692, - "Y": 26.674 - }, - { - "X": 0.831, - "Y": 30.294 - }, - { - "X": 0.969, - "Y": 33.3 - }, - { - "X": 1.108, - "Y": 35.667 - }, - { - "X": 1.246, - "Y": 37.371 - }, - { - "X": 1.385, - "Y": 38.387 - }, - { - "X": 1.523, - "Y": 38.692 - }, - { - "X": 1.662, - "Y": 38.26 - }, - { - "X": 1.8, - "Y": 37.067 - } - ], - "MaxWaterCurveQP": [ - { - "X": 0, - "Y": 0.059 - }, - { - "X": 0.138, - "Y": 0.08 - }, - { - "X": 0.277, - "Y": 0.096 - }, - { - "X": 0.415, - "Y": 0.108 - }, - { - "X": 0.554, - "Y": 0.117 - }, - { - "X": 0.692, - "Y": 0.124 - }, - { - "X": 0.831, - "Y": 0.129 - }, - { - "X": 0.969, - "Y": 0.134 - }, - { - "X": 1.108, - "Y": 0.139 - }, - { - "X": 1.246, - "Y": 0.145 - }, - { - "X": 1.385, - "Y": 0.154 - }, - { - "X": 1.523, - "Y": 0.165 - }, - { - "X": 1.662, - "Y": 0.179 - }, - { - "X": 1.8, - "Y": 0.199 - } - ], - "MaxWaterCurveNPSH": [ - { - "X": 0, - "Y": 1.198 - }, - { - "X": 0.257, - "Y": 1.334 - }, - { - "X": 0.514, - "Y": 1.408 - }, - { - "X": 0.771, - "Y": 1.447 - }, - { - "X": 1.029, - "Y": 1.479 - }, - { - "X": 1.286, - "Y": 1.529 - }, - { - "X": 1.543, - "Y": 1.626 - }, - { - "X": 1.8, - "Y": 1.796 - } - ], - "Coordinate": { - "GridNumberX": 8, - "GridNumberY": 21, - "StartLineNoH": 11, - "EndLineNoH": 21, - "StartLineNoE": 6, - "EndLineNoE": 11, - "StartLineNoP": 2, - "EndLineNoP": 6, - "StartLineNoNPSH": 0, - "EndLineNoNPSH": 3, - "MinQ": 0, - "DispMinQ": 0, - "DispMaxQ": 2, - "SpaceQ": 0.25, - "MinH": -22, - "DispMinH": 0, - "DispMaxH": 20, - "SpaceH": 2, - "MinE": -60, - "DispMinE": 0, - "DispMaxE": 50, - "SpaceE": 10, - "MinP": -0.05, - "DispMinP": 0.05, - "DispMaxP": 0.25000000000000006, - "SpaceP": 0.05, - "MinNPSH": 0, - "DispMinNPSH": 0, - "DispMaxNPSH": 2.4000000000000004, - "SpaceNPSH": 0.8, - "DislocationNumUp": 2, - "DislocationNumDown": 1 - } - }, - "MaterialGrpList": null, - "PartFullInfo": { - "SelPartID": 1424, - "PartList": [ - { - "PartID": 1424, - "PartName": "", - "PartNO": "KQDQ25-1-17", - "PartCode": "KQDQ25-1-17", - "ProductFileName": null, - "StructFileName": null, - "AssemFileName": null, - "AssemSysFileName": null, - "RealFileName": "72aa8ebcafc24ec49371228eb8a93277.png", - "RealFileNameSys": null, - "ElectricFileName": null, - "PartNote": "", - "PartPropList": [ - { - "ID": 0, - "GroupName": "閾墝鍙傛暟", - "PropName": "娴侀噺", - "PropValueList": null, - "PropValue": "1 m鲁/h", - "Tag": "RatedQ", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 0, - "GroupName": "閾墝鍙傛暟", - "PropName": "鎵▼", - "PropValueList": null, - "PropValue": "17 m", - "Tag": "RatedH", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 0, - "GroupName": "閾墝鍙傛暟", - "PropName": "鏁堢巼", - "PropValueList": null, - "PropValue": "33 %", - "Tag": "RatedE", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 0, - "GroupName": "閾墝鍙傛暟", - "PropName": "杞��", - "PropValueList": null, - "PropValue": "2750 rpm", - "Tag": "Ratedn", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 0, - "GroupName": "閾墝鍙傛暟", - "PropName": "绾ф暟", - "PropValueList": null, - "PropValue": "2", - "Tag": "StageNum", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 390, - "GroupName": "鎶�鏈�", - "PropName": "娉靛舰寮�", - "PropValueList": null, - "PropValue": "绔嬪紡澶氱骇娉�", - "Tag": "娉靛舰寮�", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 374, - "GroupName": "鎶�鏈�", - "PropName": "娉电殑鏍囧噯", - "PropValueList": null, - "PropValue": "GB/T5657", - "Tag": "娉电殑鏍囧噯", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 354, - "GroupName": "鎶�鏈�", - "PropName": "棰滆壊", - "PropValueList": null, - "PropValue": "榛戣壊", - "Tag": "棰滆壊", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 328, - "GroupName": "鎬ц兘", - "PropName": "鏈�浣虫祦閲忎娇鐢ㄨ寖鍥�(m鲁/h)", - "PropValueList": null, - "PropValue": "0.75-1.2", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 299, - "GroupName": "鏉愭枡", - "PropName": "鍙惰疆", - "PropValueList": null, - "PropValue": "AISI304", - "Tag": "鍙惰疆", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 300, - "GroupName": "鏉愭枡", - "PropName": "娉电洊", - "PropValueList": null, - "PropValue": "AISI304", - "Tag": "娉电洊", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 301, - "GroupName": "鏉愭枡", - "PropName": "娉典綋", - "PropValueList": null, - "PropValue": "/", - "Tag": "娉典綋", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 302, - "GroupName": "鏉愭枡", - "PropName": "娉佃酱", - "PropValueList": null, - "PropValue": "AISI304", - "Tag": "娉佃酱", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 355, - "GroupName": "鏉愭枡", - "PropName": "杞村", - "PropValueList": null, - "PropValue": "AISI304", - "Tag": "杞村", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 356, - "GroupName": "鏉愭枡", - "PropName": "瀵嗗皝鐜�", - "PropValueList": null, - "PropValue": "/", - "Tag": "瀵嗗皝鐜�", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 337, - "GroupName": "鏉愭枡", - "PropName": "涓", - "PropValueList": null, - "PropValue": "/", - "Tag": "涓", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 338, - "GroupName": "鏉愭枡", - "PropName": "瀵煎彾", - "PropValueList": null, - "PropValue": "/", - "Tag": "瀵煎彾", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 358, - "GroupName": "鏉愭枡", - "PropName": "杞存壙浣�", - "PropValueList": null, - "PropValue": "/", - "Tag": "杞存壙浣�", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 359, - "GroupName": "鏉愭枡", - "PropName": "搴曞骇", - "PropValueList": null, - "PropValue": "/", - "Tag": "搴曞骇", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 174, - "GroupName": "瀹夎", - "PropName": "杩炴帴鏂瑰紡", - "PropValueList": null, - "PropValue": "娉曞叞杩炴帴", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 378, - "GroupName": "瀹夎", - "PropName": "鍦拌剼铻烘爴", - "PropValueList": null, - "PropValue": "/", - "Tag": "鍦拌剼铻烘爴", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 379, - "GroupName": "瀹夎", - "PropName": "鏈�澶у叆鍙e帇鍔�", - "PropValueList": null, - "PropValue": "1MPa", - "Tag": "鏈�澶у叆鍙e帇鍔�", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 380, - "GroupName": "瀹夎", - "PropName": "鍏佽杩愯鍘嬪姏", - "PropValueList": null, - "PropValue": "2.5MPa", - "Tag": "鍏佽鐨勮繍琛屽帇鍔�", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 7, - "GroupName": "浠嬭川", - "PropName": "浠嬭川娓╁害", - "PropValueList": null, - "PropValue": "-20鈩冿綖+70鈩�", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 123, - "GroupName": "浠嬭川", - "PropName": "鏈�澶х幆澧冩俯搴�", - "PropValueList": null, - "PropValue": "鈮�40鈩�", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 9, - "GroupName": "鐢垫満", - "PropName": "闃叉姢绛夌骇", - "PropValueList": null, - "PropValue": "IP55", - "Tag": "闃叉姢绛夌骇", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 10, - "GroupName": "鐢垫満", - "PropName": "缁濈紭绛夌骇", - "PropValueList": null, - "PropValue": "F", - "Tag": "缁濈紭绛夌骇", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 12, - "GroupName": "鐢垫満", - "PropName": "鐢垫満鍔熺巼", - "PropValueList": null, - "PropValue": "0.37", - "Tag": "鐢垫満鍔熺巼", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 19, - "GroupName": "鐢垫満", - "PropName": "鐢垫満鍨嬪彿", - "PropValueList": null, - "PropValue": "YE3-711-2", - "Tag": "鐢垫満鍨嬪彿", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 27, - "GroupName": "鐢垫満", - "PropName": "鍙惰疆杞悜锛堜粠鐢垫満绔湅锛�", - "PropValueList": null, - "PropValue": "閫嗘椂閽�", - "Tag": "杞姩鏂瑰悜", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 114, - "GroupName": "鐢垫満", - "PropName": "鐢垫簮棰戠巼", - "PropValueList": null, - "PropValue": "50HZ", - "Tag": "鐢垫満棰戠巼", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 115, - "GroupName": "鐢垫満", - "PropName": "棰濆畾鐢靛帇", - "PropValueList": null, - "PropValue": "380V", - "Tag": "棰濆畾鐢靛帇", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 116, - "GroupName": "鐢垫満", - "PropName": "棰濆畾鐢垫祦", - "PropValueList": null, - "PropValue": "0.94A", - "Tag": "棰濆畾鐢垫祦", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 118, - "GroupName": "鐢垫満", - "PropName": "鑳芥晥绛夌骇", - "PropValueList": null, - "PropValue": "IE3", - "Tag": "鑳芥晥绛夌骇", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 169, - "GroupName": "鐢垫満", - "PropName": "鐢垫満鏋佹暟", - "PropValueList": null, - "PropValue": "2", - "Tag": "鐢垫満鏋佹暟", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 242, - "GroupName": "鐢垫満", - "PropName": "鐢垫満杞��", - "PropValueList": null, - "PropValue": "2960rpm", - "Tag": "鐢垫満杞��", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 280, - "GroupName": "鐢垫満", - "PropName": "鐢垫満褰㈠紡", - "PropValueList": null, - "PropValue": "涓夌浉寮傛鐢靛姩鏈�", - "Tag": "鐢垫満褰㈠紡", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 391, - "GroupName": "鐢垫満", - "PropName": "鍚姩鐢垫祦/棰濆畾鐢垫祦", - "PropValueList": null, - "PropValue": "6.1", - "Tag": "鍚姩鐢垫祦/棰濆畾鐢垫祦", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 363, - "GroupName": "鐢垫満", - "PropName": "鐢垫満鏈哄骇鍙�", - "PropValueList": null, - "PropValue": "711-2", - "Tag": "鐢垫満鏈哄骇鍙�", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 364, - "GroupName": "鐢垫満", - "PropName": "椹卞姩绫诲瀷", - "PropValueList": null, - "PropValue": "寮傛鐢垫満", - "Tag": "椹卞姩绫诲瀷", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 365, - "GroupName": "鐢垫満", - "PropName": "鐢垫満鍐峰嵈鏂规硶", - "PropValueList": null, - "PropValue": "IC411/IC416", - "Tag": "鐢垫満鍐峰嵈鏂规硶", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 381, - "GroupName": "鐢垫満", - "PropName": "鍔熺巼鍥犳暟cos蠄", - "PropValueList": null, - "PropValue": "0.82", - "Tag": "Cosphi", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 382, - "GroupName": "鐢垫満", - "PropName": "鍦ㄨ浇鑽蜂负3/4鏃剁殑鐢垫満鏁堢巼", - "PropValueList": null, - "PropValue": "71.5%", - "Tag": "3/4鐢垫満鏁堢巼", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 383, - "GroupName": "鐢垫満", - "PropName": "鍦ㄨ浇鑽蜂负1/2鏃剁殑鐢垫満鏁堢巼", - "PropValueList": null, - "PropValue": "70.3%", - "Tag": "1/2鐢垫満鏁堢巼", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 384, - "GroupName": "鐢垫満", - "PropName": "鍦ㄨ浇鑽蜂负4/4鏃剁殑鐢垫満鏁堢巼", - "PropValueList": null, - "PropValue": "71.9%", - "Tag": "4/4鐢垫満鏁堢巼", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 387, - "GroupName": "鐢垫満", - "PropName": "鐢垫満鎻愪緵", - "PropValueList": [ - "閲戦緳", - "鍏畨" - ], - "PropValue": "閲戦緳", - "Tag": "鐢垫満鎻愪緵", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 26, - "GroupName": "缁撴瀯灏哄", - "PropName": "缁撴瀯绫诲瀷", - "PropValueList": null, - "PropValue": "V1", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 268, - "GroupName": "鍑哄彛娉曞叞", - "PropName": "鍑哄彛娉曞叞鏍囧噯", - "PropValueList": null, - "PropValue": "GB/T 17241.6", - "Tag": "鍑哄彛娉曞叞鏍囧噯", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 30, - "GroupName": "鍑哄彛娉曞叞", - "PropName": "鍑哄彛鍙e緞", - "PropValueList": null, - "PropValue": "DN25", - "Tag": "鍑哄彛鍙e緞", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 119, - "GroupName": "鍑哄彛娉曞叞", - "PropName": "鍑哄彛娉曞叞鍘嬪姏绛夌骇", - "PropValueList": null, - "PropValue": "PN25", - "Tag": "鍑哄彛娉曞叞鍘嬪姏绛夌骇", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 29, - "GroupName": "杩涘彛娉曞叞", - "PropName": "杩涘彛鍙e緞", - "PropValueList": null, - "PropValue": "DN25", - "Tag": "杩涘彛鍙e緞", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 293, - "GroupName": "杩涘彛娉曞叞", - "PropName": "杩涘彛娉曞叞鍘嬪姏绛夌骇", - "PropValueList": null, - "PropValue": "PN25", - "Tag": "杩涘彛娉曞叞鍘嬪姏绛夌骇", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 347, - "GroupName": "杩涘彛娉曞叞", - "PropName": "杩涘彛娉曞叞鏍囧噯", - "PropValueList": null, - "PropValue": "GB/T 17241.6", - "Tag": "杩涘彛娉曞叞鏍囧噯", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 18, - "GroupName": "杞存壙杞村皝", - "PropName": "鏈烘瀵嗗皝", - "PropValueList": null, - "PropValue": "FGL-12", - "Tag": "鏈烘瀵嗗皝", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 133, - "GroupName": "杞存壙杞村皝", - "PropName": "瀵嗗皝绫诲瀷", - "PropValueList": null, - "PropValue": "闆嗚寮忔満灏�", - "Tag": "瀵嗗皝绫诲瀷", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 329, - "GroupName": "杞存壙杞村皝", - "PropName": "鍓嶈酱鎵垮瀷鍙�", - "PropValueList": null, - "PropValue": "/", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 330, - "GroupName": "杞存壙杞村皝", - "PropName": "鍚庤酱鎵垮瀷鍙�", - "PropValueList": null, - "PropValue": "/", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 348, - "GroupName": "杞存壙杞村皝", - "PropName": "杞存壙绫诲瀷", - "PropValueList": null, - "PropValue": "/", - "Tag": "杞存壙绫诲瀷", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 349, - "GroupName": "杞存壙杞村皝", - "PropName": "娌规鼎婊戝瀷", - "PropValueList": null, - "PropValue": "/", - "Tag": "娌规鼎婊戝瀷", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 11, - "GroupName": "閲嶉噺", - "PropName": "鍗曟车閲嶉噺", - "PropValueList": null, - "PropValue": "/", - "Tag": "PumpWeight", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 170, - "GroupName": "閲嶉噺", - "PropName": "鎬婚噸閲�", - "PropValueList": null, - "PropValue": "20kg", - "Tag": "TotalWeight", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 360, - "GroupName": "閲嶉噺", - "PropName": "鐢垫満閲嶉噺", - "PropValueList": null, - "PropValue": "/", - "Tag": "鐢垫満閲嶉噺", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 361, - "GroupName": "閲嶉噺", - "PropName": "浣撶Н", - "PropValueList": null, - "PropValue": "/", - "Tag": "浣撶Н", - "VisibilityStatus": 1, - "EditStatus": 1 - }, - { - "ID": 277, - "GroupName": "鍏朵粬", - "PropName": "瀹夎鍥剧被鍨�", - "PropValueList": [ - "鏍囧噯", - "铻虹汗" - ], - "PropValue": "鏍囧噯", - "Tag": "", - "VisibilityStatus": 1, - "EditStatus": 1 - } - ] - } - ], - "PartNOLaw": null, - "PartNameLaw": null, - "PartPropMap": null, - "StructList": [], - "FileLaw4AssPart": [ - { - "ItemType": 1, - "Prefix": 1, - "FilePrefix": "_", - "PropID": 0, - "CodeMapType": 0, - "CodeLawList": [] - }, - { - "ItemType": 0, - "Prefix": 0, - "FilePrefix": "\\", - "PropID": 277, - "CodeMapType": 1, - "CodeLawList": [ - { - "Key": "鏍囧噯", - "StringValue": "BZ" - }, - { - "Key": "standard", - "StringValue": "BZ" - }, - { - "Key": "小褌邪薪写邪褉褌褘", - "StringValue": "BZ" - }, - { - "Key": "铻虹汗", - "StringValue": "LW" - }, - { - "Key": "袪械蟹褜斜邪", - "StringValue": "LW" - }, - { - "Key": "thread", - "StringValue": "LW" - } - ] - } - ], - "FileLaw4AssSys": null, - "FileLaw4Struct": null, - "FileLaw4Dimen": null, - "PartCombTitles": null, - "PartCombRows": null - }, - "MultiSpeedInfo": { - "SpeedItems": [ - { - "Value": 2475, - "Type": 0 - }, - { - "Value": 2337, - "Type": 0 - }, - { - "Value": 2200, - "Type": 0 - }, - { - "Value": 2062, - "Type": 0 - } - ], - "SpectrumShape": null - }, - "AttachFiles": [], - "BimFileLaws": null, - "Struct3d": null, - "Product3d": null, - "Video": null, - "DynFileAssemSys": null -} \ No newline at end of file + BaseInfo: { + CorpID: 69, + SeriesID: 'C69S4', + PumpID: 8978, + SubID: 0, + ChartType: 3, + PumpStyle: 0, + PumpName4File: 'DRL1-18S', + CorpName: '涓煩鏉滅', + PumpName: 'DRL1-18S', + SeriesName: 'DRL', + CatalogName: '绔嬪紡澶氱骇娉�', + EecStauts: 0, + EecGrade: 0, + DefaultMotorPower: 0, + MaxD2: 75, + WrkD2: 75, + MinD2: 75, + Ratedn: 2900, + WrkSpeed: 2900, + FirePumpType: 0, + DriveType: 0, + RatedParas: { + H: '100.5', + Q: '1', + E: '41', + P: '0.67', + NPSHr: null, + }, + }, + SettingInfo: { + UnitQ: 1, + UnitH: 0, + UnitP: 1, + IsD2Meter: true, + SeriesUnitQ: 1, + SeriesUnitH: 0, + SeriesUnitP: 1, + SeriesIsD2Meter: true, + IsDispCurveQE: true, + IsDispCurveQP: true, + IsOnlyDispWrkCurve: false, + AllowRegionDispStyle: 2, + PerferRegionDispStyle: 0, + }, + MainParaItemList: [ + { + Name: '娴侀噺', + Value: '', + Unit: 1, + UnitName: 'm鲁/h', + Tag: 'RequestPointQ', + Range: null, + IsEditAble: true, + }, + { + Name: '鎵▼', + Value: '', + Unit: 0, + UnitName: 'm', + Tag: 'RequestPointH', + Range: null, + IsEditAble: true, + }, + { + Name: '杞��', + Value: '2900', + Unit: 0, + UnitName: 'rpm', + Tag: 'WrkSpeed', + Range: null, + IsEditAble: false, + }, + ], + ChartPointPara: { + JieZhiWrkPt: null, + LxpPerformParas: { + PreferDisplayMode: 0, + AllowDisplayMode: 1, + PreferredRegionMin: 0.9, + PreferredRegionMax: 1.1, + AllowableRegionMin: 0.4, + AllowableRegionMax: 2, + ContinueRegionMin: 0, + BEP: 1, + }, + Bep: null, + AllowMinPoint: { + ID: 0, + Q: 0.4, + H: 103.8, + E: 22, + P: 0.569, + NPSH: 1.47, + }, + AllowMaxPoint: { + ID: 0, + Q: 2, + H: 67.8, + E: 44, + P: 0.828, + NPSH: 2.31, + }, + PerferMinPoint: { + ID: 0, + Q: 0.9, + H: 101.4, + E: 39.6, + P: 0.655, + NPSH: 1.35, + }, + PerferMaxPoint: { + ID: 0, + Q: 1.1, + H: 98.6, + E: 43.8, + P: 0.69, + NPSH: 1.3, + }, + AllowRegionInGridVisible: true, + PerferRegionInGridVisible: false, + AllowRegionInChartVisible: true, + PerferRegionInChartVisible: false, + AllowRegionDispStyle: 2, + PerferRegionDispStyle: 0, + ZeroPtHead: 0, + ZeroPtRatio: 0, + IsDispMaxEtaPtInGrid: false, + IsDispMaxEtaPtInChart: false, + IsDispMaxPowerPtInGrid: false, + IsDispMaxPowerPtInChart: false, + IsDispZeroPtInChart: false, + IsDispZeroPtInGrid: false, + MotorAllowMaxPtDict: null, + Percent150Pt: null, + MaxPowerPt: null, + }, + ChartObjectDict: { + Coordinate: { + GridNumberX: 10, + GridNumberY: 18, + StartLineNoH: 12, + EndLineNoH: 18, + StartLineNoE: 7, + EndLineNoE: 12, + StartLineNoP: 2, + EndLineNoP: 7, + StartLineNoNPSH: 0, + EndLineNoNPSH: 4, + MinQ: 0, + DispMinQ: 0, + DispMaxQ: 2.5, + SpaceQ: 0.25, + MinH: -70, + DispMinH: 50, + DispMaxH: 110, + SpaceH: 10, + MinE: -70, + DispMinE: 0, + DispMaxE: 50, + SpaceE: 10, + MinP: 0.2, + DispMinP: 0.4, + DispMaxP: 0.9000000000000001, + SpaceP: 0.1, + MinNPSH: 0, + DispMinNPSH: 0, + DispMaxNPSH: 4, + SpaceNPSH: 1, + }, + MaxWaterCurveQH: [ + { + X: 0, + Y: 102.503159899944, + }, + { + X: 0.11578947368421054, + Y: 103.0891783022391, + }, + { + X: 0.23157894736842108, + Y: 103.52135576106531, + }, + { + X: 0.3473684210526316, + Y: 103.7673185174918, + }, + { + X: 0.46315789473684216, + Y: 103.79469281258778, + }, + { + X: 0.5789473684210527, + Y: 103.57110488742245, + }, + { + X: 0.6947368421052632, + Y: 103.064180983065, + }, + { + X: 0.8105263157894738, + Y: 102.24154734058463, + }, + { + X: 0.9263157894736843, + Y: 101.07083020105054, + }, + { + X: 1.0421052631578949, + Y: 99.51965580553194, + }, + { + X: 1.1578947368421053, + Y: 97.555650395098, + }, + { + X: 1.273684210526316, + Y: 95.14644021081794, + }, + { + X: 1.3894736842105264, + Y: 92.25965149376096, + }, + { + X: 1.505263157894737, + Y: 88.86291048499623, + }, + { + X: 1.6210526315789475, + Y: 84.92384342559298, + }, + { + X: 1.7368421052631582, + Y: 80.4100765566204, + }, + { + X: 1.8526315789473686, + Y: 75.28923611914767, + }, + { + X: 1.968421052631579, + Y: 69.52894835424402, + }, + { + X: 2.0842105263157897, + Y: 63.09683950297862, + }, + { + X: 2.2, + Y: 55.96053580642068, + }, + ], + MaxWaterCurveQE: [ + { + X: 0, + Y: 0, + }, + { + X: 0.16923076923076924, + Y: 10.26721136089612, + }, + { + X: 0.3384615384615385, + Y: 19.07247632716279, + }, + { + X: 0.5076923076923077, + Y: 26.646014149303817, + }, + { + X: 0.676923076923077, + Y: 33.01276630402201, + }, + { + X: 0.8461538461538463, + Y: 38.19767426802015, + }, + { + X: 1.0153846153846153, + Y: 42.22567951800103, + }, + { + X: 1.1846153846153846, + Y: 45.121723530667474, + }, + { + X: 1.353846153846154, + Y: 46.91074778272227, + }, + { + X: 1.5230769230769232, + Y: 47.617693750868206, + }, + { + X: 1.6923076923076925, + Y: 47.26750291180809, + }, + { + X: 1.8615384615384616, + Y: 45.88511674224471, + }, + { + X: 2.0307692307692307, + Y: 43.49547671888085, + }, + { + X: 2.2, + Y: 40.12352431841934, + }, + ], + MaxWaterCurveQP: [ + { + X: 0, + Y: 0.50644539621935, + }, + { + X: 0.16923076923076924, + Y: 0.5318465038990742, + }, + { + X: 0.3384615384615385, + Y: 0.5589072164226258, + }, + { + X: 0.5076923076923077, + Y: 0.5872203257088813, + }, + { + X: 0.676923076923077, + Y: 0.6163786236767175, + }, + { + X: 0.8461538461538463, + Y: 0.645974902245011, + }, + { + X: 1.0153846153846153, + Y: 0.6756019533326381, + }, + { + X: 1.1846153846153846, + Y: 0.7048525688584756, + }, + { + X: 1.353846153846154, + Y: 0.7333195407414, + }, + { + X: 1.5230769230769232, + Y: 0.760595660900288, + }, + { + X: 1.6923076923076925, + Y: 0.7862737212540158, + }, + { + X: 1.8615384615384616, + Y: 0.8099465137214604, + }, + { + X: 2.0307692307692307, + Y: 0.8312068302214981, + }, + { + X: 2.2, + Y: 0.8496474626730058, + }, + ], + MaxWaterCurveNPSH: [ + { + X: 0, + Y: 1.3, + }, + { + X: 0.125, + Y: 1.3, + }, + { + X: 0.25, + Y: 1.3, + }, + { + X: 0.375, + Y: 1.3, + }, + { + X: 0.7428571428571429, + Y: 1.4023281870637019, + }, + { + X: 0.9857142857142858, + Y: 1.3227922825768954, + }, + { + X: 1.2285714285714286, + Y: 1.3, + }, + { + X: 1.4714285714285715, + Y: 1.3819652259394397, + }, + { + X: 1.7142857142857144, + Y: 1.6567945055829683, + }, + { + X: 1.9571428571428573, + Y: 2.1858659450641196, + }, + { + X: 2.2, + Y: 3.037239760279981, + }, + ], + }, + DictDegreeRatedPoints: null, + MaterialGrpList: null, + PartFullInfo: { + PartList: [ + { + PartID: 23231, + PartName: '', + PartNO: 'CDLS1-18-1', + PartCode: 'CDLF1-18KSWSCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: 'Series4/Ass\\DRL1-18S.png', + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'S', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'K', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '25 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '25 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F14', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23232, + PartName: '', + PartNO: 'CDLS1-18-2', + PartCode: 'CDLF1-18FSWSCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'S', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '25 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '25 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F14', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23233, + PartName: '', + PartNO: 'CDLS1-18-3', + PartCode: 'CDLF1-18LSWSCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'S', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '25 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '25 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F14', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23234, + PartName: '', + PartNO: 'CDLS1-18-4', + PartCode: 'CDLF1-18FSWLCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '316', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'E', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '316L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '25 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '25 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F16', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23235, + PartName: '', + PartNO: 'CDLS1-18-5', + PartCode: 'CDLF1-18KSWLCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '316', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'E', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '316L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'K', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '25 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '25 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F16', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23236, + PartName: '', + PartNO: 'CDLS1-18-6', + PartCode: 'CDLF1-18LSWLCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '316', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'E', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '316L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '25 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '25 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F16', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23237, + PartName: '', + PartNO: 'CDLS1-18-7', + PartCode: 'CDL1-18FSWPCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: 'HT200', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '25 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '25 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F14', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23238, + PartName: '', + PartNO: 'CDLS1-18-8', + PartCode: 'CDLF1-18YSWSCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'S', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'Y', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '16 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '16 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F14', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23239, + PartName: '', + PartNO: 'CDLS1-18-9', + PartCode: 'CDLF1-18YSWLCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '316', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'E', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: '316L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'L', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'Y', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '16 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '16 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F16', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + { + PartID: 23240, + PartName: '', + PartNO: 'CDLS1-18-10', + PartCode: 'CDL1-18YSWPCS', + ProductFileName: null, + StructFileName: null, + AssemFileName: null, + AssemSysFileName: null, + RealFileName: 'Series4/d32bda70ff484ea6812cf37293246291.png', + RealFileNameSys: null, + PartPropList: [ + { + ID: 105, + GroupName: '鎶�鏈�', + PropName: '娉佃浆閫�', + PropValueList: null, + PropValue: '2900', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 110, + GroupName: '鎶�鏈�', + PropName: '閾墝涓婄殑鏍囧噯', + PropValueList: null, + PropValue: 'CE', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 112, + GroupName: '鎶�鏈�', + PropName: '娉电殑鐗堟湰', + PropValueList: null, + PropValue: '2', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 1, + GroupName: '鏉愭枡', + PropName: '鍙惰疆', + PropValueList: null, + PropValue: '304', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 4, + GroupName: '鏉愭枡', + PropName: '姗¤兌浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 13, + GroupName: '鏉愭枡', + PropName: '杩涘嚭姘存', + PropValueList: null, + PropValue: 'HT200', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 113, + GroupName: '鏉愭枡', + PropName: '鏉愭枡浠g爜', + PropValueList: null, + PropValue: 'P', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 22, + GroupName: '瀹夎', + PropName: '杩炴帴浠g爜', + PropValueList: null, + PropValue: 'Y', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 21, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堥珮娓╋級', + PropValueList: null, + PropValue: '16 bar / 120 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 122, + GroupName: '瀹夎', + PropName: '鏈�澶у帇鍔�/娓╁害锛堜綆娓╋級', + PropValueList: null, + PropValue: '16 bar / -15 鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 120, + GroupName: '瀹夎', + PropName: '娉曞叞鏍囧噯', + PropValueList: null, + PropValue: 'DIN', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 119, + GroupName: '瀹夎', + PropName: '鍘嬪姏绛夌骇', + PropValueList: null, + PropValue: 'PN25', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 121, + GroupName: '瀹夎', + PropName: '杩涘嚭鍙�', + PropValueList: null, + PropValue: 'DN25', + Tag: '鍑哄彛鍙e緞', + VisibilityStatus: 1, + }, + { + ID: 16, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堝父娓╁瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+70鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 17, + GroupName: '浠嬭川', + PropName: '浠嬭川娓╁害锛堢儹姘村瀷锛�', + PropValueList: null, + PropValue: '-15鈩冿綖+120鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 123, + GroupName: '浠嬭川', + PropName: '鏈�澶х幆澧冩俯搴�', + PropValueList: null, + PropValue: '40鈩�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 26, + GroupName: '缁撴瀯灏哄', + PropName: '鐖嗙偢鍥�', + PropValueList: null, + PropValue: 'CDL1-4鐖嗙偢鍥�', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 8, + GroupName: '鐢垫満', + PropName: '鐢垫満鐩告暟', + PropValueList: null, + PropValue: '涓夌浉', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 9, + GroupName: '鐢垫満', + PropName: '闃叉姢绛夌骇', + PropValueList: null, + PropValue: 'IP55', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 10, + GroupName: '鐢垫満', + PropName: '缁濈紭绛夌骇', + PropValueList: null, + PropValue: 'F', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 12, + GroupName: '鐢垫満', + PropName: '鐢垫満鍔熺巼(kW)', + PropValueList: null, + PropValue: '1.1kW', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 114, + GroupName: '鐢垫満', + PropName: '鐢垫簮棰戠巼', + PropValueList: null, + PropValue: '50Hz', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 115, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢靛帇(V)', + PropValueList: null, + PropValue: '220/380V', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 116, + GroupName: '鐢垫満', + PropName: '棰濆畾鐢垫祦(A)', + PropValueList: null, + PropValue: '4.2/2.4A', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 118, + GroupName: '鐢垫満', + PropName: '鑳芥晥绛夌骇', + PropValueList: null, + PropValue: 'IE3', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 18, + GroupName: '瀵嗗皝', + PropName: '鏈烘瀵嗗皝', + PropValueList: null, + PropValue: 'CDLA-12/WB1F14', + Tag: '', + VisibilityStatus: 1, + }, + { + ID: 11, + GroupName: '鍏朵粬', + PropName: '閲嶉噺(kg)', + PropValueList: null, + PropValue: '37', + Tag: '', + VisibilityStatus: 1, + }, + ], + }, + ], + PartNOLaw: null, + PartNameLaw: null, + PartPropMap: null, + StructList: [ + { + ID: 170, + SeriesID: 4, + Name: 'CDL1,2,3,4F', + PartPropID: 141, + AssemFileName: '93dca6c75ed34323b6bee60fb0af9246.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 171, + SeriesID: 4, + Name: 'CDL1,2,3,4Y', + PartPropID: 141, + AssemFileName: 'e21434ac866243a78571f3380cf4c043.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 172, + SeriesID: 4, + Name: 'CDL8,12,16,20Y', + PartPropID: 141, + AssemFileName: '10e2e2ee032742f9b8921c22139fe64f.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 173, + SeriesID: 4, + Name: 'CDL16F', + PartPropID: 141, + AssemFileName: '602396158e91495d8b9a4981c4d5d8f3.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 174, + SeriesID: 4, + Name: 'CDL32F', + PartPropID: 141, + AssemFileName: 'e80375ba9ef64bdbb4ba73f4ae3b189d.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 175, + SeriesID: 4, + Name: 'CDL42F', + PartPropID: 141, + AssemFileName: '', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 176, + SeriesID: 4, + Name: 'CDL65F', + PartPropID: 141, + AssemFileName: '5822e24f1ee44a17b81a9ed57dbc830d.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 177, + SeriesID: 4, + Name: 'CDL85F', + PartPropID: 141, + AssemFileName: 'cac2a3fe1f9f433f91712e0f9b39bb1f.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 178, + SeriesID: 4, + Name: 'CDL200F', + PartPropID: 141, + AssemFileName: 'd69c66d2fa724377965cfc2cc9117236.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 179, + SeriesID: 4, + Name: 'CDLF1,2,3,4F', + PartPropID: 141, + AssemFileName: '735b64f86bcc4667864b79d388275c99.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 180, + SeriesID: 4, + Name: 'CDLF1,2,3,4K', + PartPropID: 141, + AssemFileName: 'ae9cff3d92934bd89df516b64a855141.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 181, + SeriesID: 4, + Name: 'CDLF1,2,3,4L', + PartPropID: 141, + AssemFileName: 'ac5a595aeb4142049da49c318a0ab583.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 182, + SeriesID: 4, + Name: 'CDLF1,2,3,4Y', + PartPropID: 141, + AssemFileName: 'a6fb18f5bc834089bda878cb68b35568.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 183, + SeriesID: 4, + Name: 'CDLF8,12,16,20F', + PartPropID: 141, + AssemFileName: '8eb7578cfac54206912ea76900d7507f.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 184, + SeriesID: 4, + Name: 'CDLF8,12,16,20K', + PartPropID: 141, + AssemFileName: '95cef6d449f845d683dca4aaa43b10a5.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 185, + SeriesID: 4, + Name: 'CDLF8,12,16,20L', + PartPropID: 141, + AssemFileName: '26c0253427194b4084a79437bf8a4de8.png', + ProductFileName: '', + StructFileName: '', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 238, + SeriesID: 4, + Name: 'CDL1-4鐖嗙偢鍥�', + PartPropID: 26, + AssemFileName: '', + ProductFileName: '', + StructFileName: '016f0fe4c8b649b6899788a2c1738cf7.png', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 239, + SeriesID: 4, + Name: 'CDL8-20鐖嗙偢鍥�', + PartPropID: 26, + AssemFileName: '', + ProductFileName: '', + StructFileName: 'd7325c171a3f4f349010a19c5a958287.png', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + { + ID: 240, + SeriesID: 4, + Name: 'CDL32-85鐖嗙偢鍥�', + PartPropID: 26, + AssemFileName: '', + ProductFileName: '', + StructFileName: 'aaafe176e02e4f0889330b054ff2e053.png', + RealFileName: '', + RealSysFileName: '', + ElectricFileName: '', + }, + ], + FileLaw4AssPart: [ + { + ItemType: 1, + Prefix: 0, + FilePrefix: '\\', + PropID: 0, + CodeMapType: 0, + CodeLawList: [], + }, + ], + FileLaw4AssSys: null, + FileLaw4Struct: null, + FileLaw4Dimen: null, + PartCombTitles: [ + { + Tag: null, + Text: '缂栧彿', + }, + { + Tag: 'Prop:4', + Text: '姗¤兌浠g爜', + }, + { + Tag: 'Prop:113', + Text: '鏉愭枡浠g爜', + }, + { + Tag: 'Prop:22', + Text: '杩炴帴浠g爜', + }, + { + Tag: 'Prop:18', + Text: '鏈烘瀵嗗皝', + }, + ], + PartCombRows: [ + { + PartID: '23231', + PartNO: 'CDLS1-18-1', + PartCode: 'CDLF1-18KSWSCS', + Contents: ['CDLS1-18-1', 'P', 'S', 'K', 'CDLA-12/WB1F14'], + }, + { + PartID: '23232', + PartNO: 'CDLS1-18-2', + PartCode: 'CDLF1-18FSWSCS', + Contents: ['CDLS1-18-2', 'P', 'S', 'F', 'CDLA-12/WB1F14'], + }, + { + PartID: '23233', + PartNO: 'CDLS1-18-3', + PartCode: 'CDLF1-18LSWSCS', + Contents: ['CDLS1-18-3', 'P', 'S', 'L', 'CDLA-12/WB1F14'], + }, + { + PartID: '23234', + PartNO: 'CDLS1-18-4', + PartCode: 'CDLF1-18FSWLCS', + Contents: ['CDLS1-18-4', 'E', 'L', 'F', 'CDLA-12/WB1F16'], + }, + { + PartID: '23235', + PartNO: 'CDLS1-18-5', + PartCode: 'CDLF1-18KSWLCS', + Contents: ['CDLS1-18-5', 'E', 'L', 'K', 'CDLA-12/WB1F16'], + }, + { + PartID: '23236', + PartNO: 'CDLS1-18-6', + PartCode: 'CDLF1-18LSWLCS', + Contents: ['CDLS1-18-6', 'E', 'L', 'L', 'CDLA-12/WB1F16'], + }, + { + PartID: '23237', + PartNO: 'CDLS1-18-7', + PartCode: 'CDL1-18FSWPCS', + Contents: ['CDLS1-18-7', 'P', 'P', 'F', 'CDLA-12/WB1F14'], + }, + { + PartID: '23238', + PartNO: 'CDLS1-18-8', + PartCode: 'CDLF1-18YSWSCS', + Contents: ['CDLS1-18-8', 'P', 'S', 'Y', 'CDLA-12/WB1F14'], + }, + { + PartID: '23239', + PartNO: 'CDLS1-18-9', + PartCode: 'CDLF1-18YSWLCS', + Contents: ['CDLS1-18-9', 'E', 'L', 'Y', 'CDLA-12/WB1F16'], + }, + { + PartID: '23240', + PartNO: 'CDLS1-18-10', + PartCode: 'CDL1-18YSWPCS', + Contents: ['CDLS1-18-10', 'P', 'P', 'Y', 'CDLA-12/WB1F14'], + }, + ], + }, + MultiSpeedValues: null, + AttachFiles: [], + BimFileLaws: null, + Struct3d: null, + Video: null, +}; -- Gitblit v1.9.3