tanghaolin
2022-08-31 244c4241427b9f3316f06f1e0ae2ee571edc1a23
合并系列详情 图表曲线对应的参数点和查询点表格
已修改5个文件
214 ■■■■ 文件已修改
src/router/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Detail/byParas/Index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Detail/byParas/components/LXBChartPointParas.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Detail/byParas/components/LXBSelectMainPoint.vue 180 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Select/SelSeries.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -159,6 +159,7 @@
        cache: false,
        noFrame: false,
        noPermissionValidate: true,
        keepAlive:true
    },
    component: () =>
        import('../views/Select/SelSeries.vue'),
src/views/Detail/byParas/Index.vue
@@ -921,7 +921,7 @@
    //修改查询值(给子控件调用)
    cbChangeChartQueryData(val) {
      if (this.PumpStyle == ConstParas.PumpStyle.LXP) {
        this.$refs.lxbChartPointParasCtrl.buildChartQueryData(val);
        this.$refs.lxbSelectPointCtrl.buildChartQueryData(val);
      }
    },
    //设置BIM文件
src/views/Detail/byParas/components/LXBChartPointParas.vue
@@ -3,7 +3,7 @@
    <van-collapse v-model="activeNames">
      <van-collapse-item
        :title="$t('detailPage.queryPoint.TR')"
        v-show="m_isChartQueryTableVisible"
        v-if="false"
      >
        <div style="display: flex; margin-top: 0.1rem">
          <van-col :span="6">
@@ -268,7 +268,7 @@
    buildPointTable_General(pumpInfoData) {
      if (pumpInfoData.ChartPointPara == null) return;
      // console.log(pumpInfoData.ChartPointPara, 285);
       console.log(pumpInfoData.ChartPointPara, 285);
      let _this = this;
@@ -496,7 +496,7 @@
        dataChartPointGrid.push(ZeroPtObj);
      }
      //console.log(dataChartPointGrid, 737);
      console.log(dataChartPointGrid, 737);
      _this.m_dataChartPointGrid = dataChartPointGrid;
    },
    //
@@ -889,7 +889,7 @@
    },
    //构建查询参数
    buildChartQueryData(query_pt) {
      //  console.log(query_pt, 799);
        console.log(query_pt, 799);
      if (query_pt == null) {
        return;
      }
@@ -946,7 +946,7 @@
      obj.nodeList.push(chartPointNode);
      this.m_chartQueryData = obj;
      // console.log("m_chartQueryData", this.m_chartQueryData);
       console.log("m_chartQueryData", this.m_chartQueryData);
    },
    //外部获取选型参数
    getDesignParas() {
src/views/Detail/byParas/components/LXBSelectMainPoint.vue
@@ -1,29 +1,52 @@
<template>
  <div>
    <van-collapse v-model="activeNames">
      <van-collapse-item :title="$t('detailPage.parameter.TR')">
      <van-collapse-item :title="$t('detailPage.parameter.TR')" name="1">
        <div style="display: flex; margin-top: 0.1rem">
          <van-col :span="6">
            <div class="table_box">
              <div class="content2 table_head" style="border-top: 1px solid #e9e9e9">{{$t('detailPage.parameter.TR')}}</div>
              <div
                class="content2 table_head"
                style="border-top: 1px solid #e9e9e9"
              >
                {{ $t("detailPage.parameter.TR") }}
            </div>
          </van-col>
          <van-col :span="12">
            <div class="table_box">
              <div class="content2 table_head" style="border-top: 1px solid #e9e9e9">{{$t('detailPage.data.TR')}}</div>
            </div>
          </van-col>
          <van-col :span="6">
            <div class="table_box">
              <div class="content3 table_head" style="border-top: 1px solid #e9e9e9">{{$t('detailPage.unit.TR')}}</div>
              <div
                class="content2 table_head"
                style="border-top: 1px solid #e9e9e9"
              >
                {{ $t("detailPage.data.TR") }}
              </div>
            </div>
          </van-col>
          <van-col :span="6">
            <div class="table_box">
              <div
                class="content2 table_head"
                style="border-top: 1px solid #e9e9e9"
              >
                查询点数据
              </div>
            </div>
          </van-col>
          <van-col :span="6">
            <div class="table_box">
              <div
                class="content3 table_head"
                style="border-top: 1px solid #e9e9e9"
              >
                {{ $t("detailPage.unit.TR") }}
              </div>
            </div>
          </van-col>
        </div>
        <div
          style="display: flex; flex-direction: column"
          v-for="(
            mainParas_item, mainParas_index
          ) in paraTable4Disp.nodeList"
          v-for="(mainParas_item, mainParas_index) in paraTable4Disp.nodeList"
          :key="'searchTable' + mainParas_index"
        >
          <div style="width: 100%">
@@ -33,10 +56,14 @@
                  <div class="content2">{{ mainParas_item.Name }}</div>
                </div>
              </van-col>
              <van-col :span="12" style="display: flex">
              <van-col :span="6" style="display: flex">
                <div class="table_box">
                  <div class="content2" v-if="mainParas_item.IsEditAble">
                  <van-field v-if="mainParas_item.Tag == 'RequestPointH'" v-model="mainParas_item.Value" label />
                    <van-field
                      v-if="mainParas_item.Tag == 'RequestPointH'"
                      v-model="mainParas_item.Value"
                      label
                    />
                    <span
                      @click.stop="clickGridRowRefreshByDp"
                      v-if="mainParas_item.Tag == 'RequestPointH'"
@@ -48,12 +75,25 @@
                      clickable
                      style="text-align:center"
                      name="picker"
                      @click="showMotorValueComboxPicker(mainParas_index,mainParas_item)"
                      @click="
                        showMotorValueComboxPicker(
                          mainParas_index,
                          mainParas_item
                        )
                      "
                    >
                      <template slot="input">
                      <template #input>
                        <div
                          style="text-decoration: underline;color: blue;width: 100%;text-align: center;font-size:12px;"
                        >{{mainParas_item.Value}}</div>
                          style="
                            text-decoration: underline;
                            color: blue;
                            width: 100%;
                            text-align: center;
                            font-size: 12px;
                          "
                        >
                          {{ mainParas_item.Value }}
                        </div>
                      </template>
                    </van-field>
                    <van-field v-else v-model="mainParas_item.Value" label />
@@ -70,6 +110,11 @@
                    </van-popup>
                  </div>
                  <div class="content2" v-else>{{ mainParas_item.Value }}</div>
                </div>
              </van-col>
               <van-col :span="6" style="display: flex">
                <div class="table_box">
                  <div class="content2">{{ mainParas_item.chartQueryPt }}</div>
                </div>
              </van-col>
              <van-col :span="6" style="display: flex">
@@ -96,12 +141,13 @@
      m_chartType: 0,
      paraTable4Disp: {}, //参数选型
      MainParaItemList: [], //参数选型列表
      m_query_pt_data: {}, //图表查询数据
      isFirstLoadingQueryPt: true, //是否是第一次加载查询参数
      unitSetting: {
        Q: UnitHelper.Default.Q,
        H: UnitHelper.Default.H,
        P: UnitHelper.Default.P
      } //默认单位
        P: UnitHelper.Default.P,
      }, //默认单位
    };
  },
  methods: {
@@ -125,13 +171,51 @@
      _this.buildTable(pumpInfoData.MainParaItemList);
    },
    //构建表格
    buildTable(mainParaItemList) {
      if (mainParaItemList == null) {
        return;
      }
      let _this = this;
      if(_this.isFirstLoadingQueryPt){
      let pointObj = {
        IsEditAble: false,
        Name: "效率",
        Range: null,
        Tag: "RequestPointE",
        Unit: 0,
        UnitName: "%",
        Value: "",
        isShowPicker: false,
        userUnit: [],
      };
      mainParaItemList.push(pointObj);
      pointObj = {
        IsEditAble: false,
        Name: "功率",
        Range: null,
        Tag: "RequestPointP",
        Unit: 0,
        UnitName: "kw",
        Value: "",
        isShowPicker: false,
        userUnit: [],
      };
      mainParaItemList.push(pointObj);
      pointObj = {
        IsEditAble: false,
        Name: "汽蚀",
        Range: null,
        Tag: "RequestPointNPSH",
        Unit: 0,
        UnitName: "m",
        Value: "",
        isShowPicker: false,
        userUnit: [],
      };
      mainParaItemList.push(pointObj);
    }
      _this.MainParaItemList = mainParaItemList;
      //   console.log(mainParaItemList, "mainParaItemList");
        let langType = _this.getCurrentLanguageUrl();
      let pointTable = {};
      pointTable.title = `${this.$t("detailPage.parameterSelection.TR")}`;
@@ -141,13 +225,30 @@
        let node = mainParaItemList[i];
       //判断当前是不是英文
        if(langType == "EN"){
          node.Name = _this.getTranslateString(node.Name)
          node.Name = _this.getTranslateString(node.Name);
        }
        if (node.Tag == "RequestPointQ") {
          node.userUnit = UnitHelper.Q_Value_List;
          node.chartQueryPt = _this.m_query_pt_data.Q.value;
          node.chartQueryPtTag = "ChartPointQueryQ";
        } else if (node.Tag == "RequestPointH") {
          node.userUnit = UnitHelper.H_Value_List;
        } else {
          node.chartQueryPt = _this.m_query_pt_data.H.value;
          node.chartQueryPtTag = "ChartPointQueryH";
        } else if(node.Tag == "RequestPointE"){
          node.userUnit = [];
          node.chartQueryPt = _this.m_query_pt_data.E.value;
          node.chartQueryPtTag = "ChartPointQueryE";
        } else if(node.Tag == "RequestPointP"){
          node.userUnit = [];
          node.chartQueryPt = _this.m_query_pt_data.P.value;
          node.chartQueryPtTag = "ChartPointQueryP";
        }else if(node.Tag == "RequestPointNPSH"){
          node.userUnit = [];
          node.chartQueryPt = _this.m_query_pt_data.NPSH.value;
          node.chartQueryPtTag = "ChartPointQueryNPSH";
        }
        else {
          node.userUnit = [];
        }
        if (node.Tag == "MotorPower") {
@@ -159,11 +260,26 @@
        pointTable.nodeList.push(node);
      }
    //   console.log(pointTable, 661);
    pointTable.nodeList.forEach(item=>{
        item.isShowPicker = false
    })
      this.paraTable4Disp = pointTable
    //   console.log(this.paraTable4Disp,158)
      pointTable.nodeList.forEach((item) => {
        item.isShowPicker = false;
      });
      this.paraTable4Disp = pointTable;
      this.isFirstLoadingQueryPt = false;
      // console.log(this.paraTable4Disp, 158);
    },
    //构建查询参数
    buildChartQueryData(query_pt) {
      // console.log(query_pt, 799);
      if (query_pt == null) {
        return;
      }
      this.m_query_pt_data = query_pt;
      //  console.log("m_chartQueryData", this.m_query_pt_data);
      if (!this.isFirstLoadingQueryPt) {
        this.buildTable(this.MainParaItemList);
      }
    },
    //修改设计点参数后 刷新
    refreshPumpInfoData(val) {
@@ -184,7 +300,7 @@
    getDesignParas() {
      let obj = {};
      let nodeList = this.paraTable4Disp.nodeList;
      nodeList.forEach(item => {
      nodeList.forEach((item) => {
        if (item.Tag == "RequestPointQ") {
          //流量
          obj.DpQ = item.Value;
@@ -239,10 +355,10 @@
      this.paraTable4Disp = paraTable4Disp;
    },
    showMotorValueComboxPicker(index,item) {
      this.currentShowPicker = [index]
      item.isShowPicker = !item.isShowPicker
      this.currentShowPicker = [index];
      item.isShowPicker = !item.isShowPicker;
      this.$set(this.paraTable4Disp.nodeList, index, item)
      this.$set(this.paraTable4Disp.nodeList, index, item);
    },
    getMotorValueList(index) {
      let list = this.paraTable4Disp.nodeList[index].Range;
@@ -278,7 +394,7 @@
      else if (cn == "电机功率") return "Motor Power";
      else return cn;
    },
  }
  },
};
</script>
<style lang="scss">
src/views/Select/SelSeries.vue
@@ -164,6 +164,7 @@
import languageMixin from "@/mixin/language.js";
export default {
  name:"SelSeries",
  mixins: [languageMixin],
  data() {
    return {
@@ -205,6 +206,10 @@
      },
      showPopover: false
    };
  },
    activated() {
        // keepalive缓存的页面每次进入都会进行的生命周期
        console.log("keepalive缓存的页面每次进入都会进行的生命周期")
  },
  mounted() {
    let _this = this;    
@@ -269,7 +274,7 @@
            }
        }) 
        .then(res => {
           console.log(res);
          //  console.log(res);
          let result = res.data;
          if (result.Code != 0) {
            myToast.clear();
@@ -442,13 +447,13 @@
    changeSelectAllList(val) {
      let SeriesID = [];
      if (val) {
        this.m_SeriesList.forEach(node => {
        this.m_VisibleSeriesList.forEach(node => {
          node.isCheck = true;
          SeriesID.push(node.ID);
        });
        this.m_SelectSeriesID = SeriesID;
      } else {
        this.m_SeriesList.forEach(node => {
        this.m_VisibleSeriesList.forEach(node => {
          node.isCheck = false;
        });
        this.m_SelectSeriesID = [];
@@ -576,19 +581,11 @@
            }
          })
        })
      console.log(showSeriesList,568)
      // console.log(showSeriesList,568)
         this.filterSeriesList(
              showSeriesList,
              this.m_pinlv
            );
      // this.m_VisibleSeriesList = showSeriesList
      //判断当前是否是全选
      // if(this.m_BrandValue.length != this.m_BrandColumns.length){
      //   this.brandSelectAll = false
      // }else {
      //   this.brandSelectAll = true
      // }
    },
    //公司筛选列表去重
  uniqueCorpList (arr) {