tanghaolin
2022-09-07 f6ed109d2075ec9dd2a15d606be0a43129d080c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!--  -->
<template>
  <div class="page_box">
    <!-- 头部导航栏 -->
    <van-nav-bar style="background-color: #528abe">
      <template #left>
        <van-icon @click="pageBack" name="arrow-left" size="18" />
      </template>
      <template #title>
        <label>{{$t('indexPage.myCollection.TR')}}</label>
      </template>
      <template #right>
        <!-- <van-icon name="search" size="18" /> -->
      </template>
    </van-nav-bar>
 
    <!-- 显示内容 -->
    <div class="page_main">
      <div style="height: 100%; overflow: auto">
        <van-cell
          style="text-align: left"
          is-link
          size="large"
          v-for="(node, i) in m_PumpList"
          :key="node.PumpID"
          @click="toDetail(i)"
        >
          <template #title>
            <span style="color: #000000">{{ node.PumpName }}</span>
          </template>
          <template #label>
            <div>
              <span class="item_font">{{$t('selectPage.flow.TR')}}:{{ node.RatedQ }}</span>
              <span class="item_font">{{$t('selectPage.head.TR')}}:{{ node.RatedH }}</span>
              <span class="item_font">{{$t('selectPage.speed.TR')}}:{{ node.Ratedn }}</span>
            </div>
          </template>
          <template #right-icon>
            <van-icon
              style="position: absolute; right: 15px; top: 24px"
              name="arrow"
              size="18"
            />
          </template>
        </van-cell>
      </div>
    </div>
  </div>
</template>
 
<script>
import languageMixin from "@/mixin/language.js";
export default {
  mixins: [languageMixin],
  name: "",
  components: {},
  data() {
    return { 
      m_PumpList: [],
      m_collectList: [] //收藏列表
    };
  },
  created() {},
  mounted() {
 
    document.title = this.getSoftName();
 
    let collectList = localStorage.getItem("collectList");
    collectList = collectList != null ? JSON.parse(collectList) : [];
    this.m_collectList = collectList;
    if(collectList != null && collectList.length>0)
    this.initTable();
  },
  computed: {},
  watch: {},
  methods: {
    initTable() {
      let _this = this;
      let url =
        this.$globalConfig.WebApiUrl.MainUrl + "v1/Web/PumpInfo/GetBaseList";
      let lang = this.getCurrentLanguageType();
      let list = [];
      this.m_collectList.forEach((item) => {
        list.push({
          ProductType: 0,
          SID: item.SID,
          PID: item.PID,
        });
      });
      let requestData = {
        List: list,
        Lang: lang,
      }; 
      _this.m_isShowLoadingFrm = true;
      this.$axios({
        url: url,
        method: "post",
        data: requestData,
      }).then(function (res) {
        _this.m_isShowLoadingFrm = false;
 
        let resdata = res.data;
        // console.log(resdata, 50);
        //
        if (resdata.Code != 0) {
          _this.$toast(resdata.Message);
          return;
        }
        let data = resdata.Data;
        _this.m_PumpList = data;
      });
    },
    toDetail(i) { 
      let row = this.m_collectList[i];
      let query = {
        SID: row.SID,
        PID: row.PID,
        from: row.from,
        pur: row.pur, //EBook = 0
      };
      this.gotoPage("/byParas/Index", query, null);
    },
    //返回上一页
    pageBack() {
      this.$router.go(-1);
    },
  },
};
</script>
<style scoped>
 
.page_box{
    height: 100%;
}
.page_main{
    height: calc(100% - 44px);
}
.item_font {
  margin-left: 10px;
}
.item_font:first-of-type {
  margin-left: 0px;
}
</style>