lxf
2025-04-30 b4c4556a5eddf6708ec55b07e3edc15b2217842e
src/page/list/trading-list copy.vue
@@ -176,7 +176,7 @@
                    <div
                      v-if="
                        (tabsItemIndex == 5 && item.zt == 0) ||
                        tabsItemIndex != 5
                          tabsItemIndex != 5
                      "
                    >
                      <div class="left_title">
@@ -231,9 +231,9 @@
                            class="price_color"
                            v-if="
                              tabsItemIndex == 0 ||
                              tabsItemIndex == 2 ||
                              tabsItemIndex == 3 ||
                              tabsItemIndex == 4
                                tabsItemIndex == 2 ||
                                tabsItemIndex == 3 ||
                                tabsItemIndex == 4
                            "
                            :class="item.hcrate > 0 ? 'green' : 'red'"
                          >
@@ -265,9 +265,9 @@
                            class="price_color"
                            v-if="
                              tabsItemIndex == 0 ||
                              tabsItemIndex == 2 ||
                              tabsItemIndex == 3 ||
                              tabsItemIndex == 4
                                tabsItemIndex == 2 ||
                                tabsItemIndex == 3 ||
                                tabsItemIndex == 4
                            "
                            :class="item.hcrate > 0 ? 'green' : 'red'"
                            >{{ item.hcrate }}</span
@@ -505,16 +505,16 @@
              <div class="left">
                <span>{{ $t('hj47') }}</span>
              </div>
              <div class="right" v-if="userData.length == 0"> ﷼0.00</div>
              <div class="right" v-if="userData.length == 0">  0.00</div>
              <div class="right" v-if="userData.length != 0">
                <span v-if="$store.state.userInfo.userAmt == undefined"> ﷼0.00</span>
                <span v-if="$store.state.userInfo.userAmt == undefined">  0.00</span>
                <span v-if="$store.state.userInfo && tabsItemIndex == 1" style="white-space: nowarp;">
                  {{ ' ﷼' + $store.state.userInfo.userIndexAmt
                  {{ '  ' + $store.state.userInfo.userIndexAmt
                  }}
                </span>
                <span v-if="$store.state.userInfo.enableAmt != undefined && (tabsItemIndex == 0)"
                  style="white-space: nowarp;">
                  {{ ' ﷼ ' + $store.state.userInfo.enableAmt
                  {{ '   ' + $store.state.userInfo.enableAmt
                  }}
                </span>
                <span v-if="$store.state.userInfo.enableAmt != undefined && tabsItemIndex == 3"
@@ -529,12 +529,12 @@
                </span>
                <span v-if="$store.state.userInfo.enableAmt != undefined && tabsItemIndex == 2"
                  style="white-space: nowarp;">
                  {{ ' ﷼ ' + $store.state.userInfo.enableAmt
                  {{ '   ' + $store.state.userInfo.enableAmt
                  }}
                </span>
                <span v-if="$store.state.userInfo.enableAmt != undefined && tabsItemIndex == 5"
                  style="white-space: nowarp;">
                  {{ ' ﷼ ' + $store.state.userInfo.enableAmt
                  {{ '   ' + $store.state.userInfo.enableAmt
                  }}
                </span>
              
@@ -565,11 +565,11 @@
              <p
                v-if="
                  this.$store.state.settingForm.indexDisplay &&
                  !this.$store.state.settingForm.futuresDisplay
                    !this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
                 ﷼{{
                {{
                  $store.state.hide
                    ? "****"
                    : Number(
@@ -581,11 +581,11 @@
              <p
                v-else-if="
                  !this.$store.state.settingForm.indexDisplay &&
                  this.$store.state.settingForm.futuresDisplay
                    this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
                 ﷼{{
                {{
                  $store.state.hide
                    ? "****"
                    : Number(
@@ -597,11 +597,11 @@
              <p
                v-else-if="
                  !this.$store.state.settingForm.indexDisplay &&
                  !this.$store.state.settingForm.futuresDisplay
                    !this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
                 ﷼{{
                {{
                  $store.state.hide
                    ? "****"
                    : Number($store.state.userInfo.userAmt).toFixed(2)
@@ -611,7 +611,7 @@
                v-else-if="this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
                class="account"
              >
                 ﷼{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
                  {{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
                $store.state.userInfo.userIndexAmt + $store.state.userInfo.userFuturesAmt).toFixed(2)
                }}
              </p> -->
@@ -620,7 +620,7 @@
              <p
                v-if="
                  this.$store.state.settingForm.indexDisplay &&
                  !this.$store.state.settingForm.futuresDisplay
                    !this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
@@ -639,7 +639,7 @@
              <p
                v-else-if="
                  !this.$store.state.settingForm.indexDisplay &&
                  this.$store.state.settingForm.futuresDisplay
                    this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
@@ -658,7 +658,7 @@
              <p
                v-else-if="
                  !this.$store.state.settingForm.indexDisplay &&
                  !this.$store.state.settingForm.futuresDisplay
                    !this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
@@ -675,7 +675,7 @@
                v-else-if="this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
                class="account"
              >
                 ﷼{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
                  {{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
                $store.state.userInfo.userIndexAmt + $store.state.userInfo.userFuturesAmt).toFixed(2)
                }}
              </p> -->
@@ -684,7 +684,7 @@
              <p
                v-if="
                  this.$store.state.settingForm.indexDisplay &&
                  !this.$store.state.settingForm.futuresDisplay
                    !this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
@@ -703,7 +703,7 @@
              <p
                v-else-if="
                  !this.$store.state.settingForm.indexDisplay &&
                  this.$store.state.settingForm.futuresDisplay
                    this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
@@ -722,7 +722,7 @@
              <p
                v-else-if="
                  !this.$store.state.settingForm.indexDisplay &&
                  !this.$store.state.settingForm.futuresDisplay
                    !this.$store.state.settingForm.futuresDisplay
                "
                class="account"
              >
@@ -739,7 +739,7 @@
                v-else-if="this.$store.state.settingForm.indexDisplay && this.$store.state.settingForm.futuresDisplay"
                class="account"
              >
                 ﷼{{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
                  {{ $store.state.hide ? '****' : Number($store.state.userInfo.userAmt +
                $store.state.userInfo.userIndexAmt + $store.state.userInfo.userFuturesAmt).toFixed(2)
                }}
              </p> -->
@@ -846,22 +846,22 @@
          <div class="bottom_price">
            <div>
              <span v-show="tabsItemIndex == 1">{{
                " ﷼ " + $store.state.userInfo.userIndexAmt
                "   " + $store.state.userInfo.userIndexAmt
              }}</span>
              <span v-show="tabsItemIndex == 0 || tabsItemIndex == 5">{{
                " ﷼ " + $store.state.userInfo.userAmt
                "   " + $store.state.userInfo.userAmt
              }}</span>
              <span v-show="tabsItemIndex == 3">{{
                "$ " + (Number($store.state.userInfo.userAmt) / 7.1).toFixed(2)
              }}</span>
              <span v-show="tabsItemIndex == 4">{{
                "HK$ " +
                (Number($store.state.userInfo.userAmt) / 0.9).toFixed(2)
                  (Number($store.state.userInfo.userAmt) / 0.9).toFixed(2)
              }}</span>
              <span v-show="tabsItemIndex == 2">{{
                " ﷼ " + $store.state.userInfo.userAmt
                "   " + $store.state.userInfo.userAmt
              }}</span>
              <!-- <span v-show="tabsItemIndex == 3">{{ ' ﷼ ' + $store.state.userInfo.userFuturesAmt }}</span> -->
              <!-- <span v-show="tabsItemIndex == 3">{{ '   ' + $store.state.userInfo.userFuturesAmt }}</span> -->
            </div>
          </div>
        </div>
@@ -874,23 +874,23 @@
          <div class="bottom_price">
            <div>
              <span v-show="tabsItemIndex == 1">{{
                " ﷼ " + $store.state.userInfo.enableIndexAmt
                "   " + $store.state.userInfo.enableIndexAmt
              }}</span>
              <span v-show="tabsItemIndex == 0 || tabsItemIndex == 5">{{
                " ﷼ " + $store.state.userInfo.enableAmt
                "   " + $store.state.userInfo.enableAmt
              }}</span>
              <span v-show="tabsItemIndex == 3">{{
                "$ " +
                (Number($store.state.userInfo.enableAmt) / 7.1).toFixed(2)
                  (Number($store.state.userInfo.enableAmt) / 7.1).toFixed(2)
              }}</span>
              <span v-show="tabsItemIndex == 4">{{
                "HK$ " +
                (Number($store.state.userInfo.enableAmt) / 0.9).toFixed(2)
                  (Number($store.state.userInfo.enableAmt) / 0.9).toFixed(2)
              }}</span>
              <span v-show="tabsItemIndex == 2">{{
                " ﷼ " + $store.state.userInfo.enableAmt
                "   " + $store.state.userInfo.enableAmt
              }}</span>
              <!-- <span v-show="tabsItemIndex == 3">{{ ' ﷼ ' + $store.state.userInfo.enableFuturesAmt }}</span> -->
              <!-- <span v-show="tabsItemIndex == 3">{{ '   ' + $store.state.userInfo.enableFuturesAmt }}</span> -->
            </div>
          </div>
        </div>
@@ -903,26 +903,26 @@
          <div class="bottom_price">
            <div>
              <span v-show="tabsItemIndex == 1">{{
                " ﷼ " + $store.state.userInfo.allIndexFreezAmt
                "   " + $store.state.userInfo.allIndexFreezAmt
              }}</span>
              <span v-show="tabsItemIndex == 0">{{
                " ﷼ " + $store.state.userInfo.allFreezAmt
                "   " + $store.state.userInfo.allFreezAmt
              }}</span>
              <span v-show="tabsItemIndex == 5">{{
                " ﷼ " + $store.state.userInfo.djzj
                "   " + $store.state.userInfo.djzj
              }}</span>
              <span v-show="tabsItemIndex == 3">{{
                "$ " +
                (Number($store.state.userInfo.allFreezAmt) / 7.1).toFixed(2)
                  (Number($store.state.userInfo.allFreezAmt) / 7.1).toFixed(2)
              }}</span>
              <span v-show="tabsItemIndex == 4">{{
                "HK$ " +
                (Number($store.state.userInfo.allFreezAmt) / 0.9).toFixed(2)
                  (Number($store.state.userInfo.allFreezAmt) / 0.9).toFixed(2)
              }}</span>
              <span v-show="tabsItemIndex == 2">{{
                " ﷼ " + $store.state.userInfo.allFreezAmt
                "   " + $store.state.userInfo.allFreezAmt
              }}</span>
              <!-- <span v-show="tabsItemIndex == 3">{{ ' ﷼ ' + $store.state.userInfo.allFuturesFreezAmt }}</span> -->
              <!-- <span v-show="tabsItemIndex == 3">{{ '   ' + $store.state.userInfo.allFuturesFreezAmt }}</span> -->
            </div>
          </div>
        </div>
@@ -943,7 +943,7 @@
                    : ''
                "
                v-show="tabsItemIndex == 1"
                >{{ " ﷼ " + $store.state.userInfo.allIndexProfitAndLose }}</span
                >{{ "   " + $store.state.userInfo.allIndexProfitAndLose }}</span
              >
              <span
                :class="
@@ -954,7 +954,7 @@
                    : ''
                "
                v-show="tabsItemIndex == 0 || tabsItemIndex == 5"
                >{{ " ﷼ " + $store.state.userInfo.allProfitAndLose }}</span
                >{{ "   " + $store.state.userInfo.allProfitAndLose }}</span
              >
              <span
                :class="
@@ -967,9 +967,9 @@
                v-show="tabsItemIndex == 3"
                >{{
                  "$ " +
                  (
                    Number($store.state.userInfo.allProfitAndLose) / 7.1
                  ).toFixed(2)
                    (
                      Number($store.state.userInfo.allProfitAndLose) / 7.1
                    ).toFixed(2)
                }}</span
              >
              <span
@@ -983,9 +983,9 @@
                v-show="tabsItemIndex == 4"
                >{{
                  "HK$ " +
                  (
                    Number($store.state.userInfo.allProfitAndLose) / 0.9
                  ).toFixed(2)
                    (
                      Number($store.state.userInfo.allProfitAndLose) / 0.9
                    ).toFixed(2)
                }}</span
              >
              <span
@@ -997,11 +997,11 @@
                    : ''
                "
                v-show="tabsItemIndex == 2"
                >{{ " ﷼ " + $store.state.userInfo.allProfitAndLose }}</span
                >{{ "   " + $store.state.userInfo.allProfitAndLose }}</span
              >
              <!-- <span
                :class="$store.state.userInfo.allFuturesProfitAndLose > 0 ? 'red' : $store.state.userInfo.allFuturesProfitAndLose < 0 ? ' green' : ''"
                v-show="tabsItemIndex == 3">{{ ' ﷼' +Number($store.state.userInfo.allFuturesProfitAndLose).toFixed(2)}}</span> -->
                v-show="tabsItemIndex == 3">{{ '  ' +Number($store.state.userInfo.allFuturesProfitAndLose).toFixed(2)}}</span> -->
            </div>
          </div>
        </div>
@@ -1109,16 +1109,16 @@
      tabsClassArr: [
        {
          name: this.$t("hj63"),
          type: 0,
          type: 0
        },
        {
          name: this.$t("hj51"),
          type: 1,
          type: 1
        },
        {
          name: this.$t("hj64"),
          type: 2,
          type: 2
        },
        // {
        //   name: "期货",
@@ -1126,16 +1126,16 @@
        // }
        {
          name: this.$t("hj65"),
          type: 3,
          type: 3
        },
        {
          name: this.$t("hj66"),
          type: 4,
          type: 4
        },
        {
          name: this.$t("hj3"),
          type: 5,
        },
          type: 5
        }
      ],
      tabsItemIndex: 0,
      listArr: [],
@@ -1144,7 +1144,7 @@
      listArr3: [],
      listArr4: [],
      listArr5: [],
      listArrs: [],
      listArrs: []
    };
  },
  props: ["typety"],
@@ -1235,7 +1235,7 @@
      //   this.finished = true;
      // }
    },
    gpinput: handleDt.debounce(function () {
    gpinput: handleDt.debounce(function() {
      this.pageNum = 1;
      this.listArr = [];
      this.listArr1 = [];
@@ -1313,7 +1313,7 @@
      } else {
        this.$store.commit("elAlertShow", {
          elAlertShow: true,
          elAlertText: data.msg,
          elAlertText: data.msg
        });
      }
    },
@@ -1326,7 +1326,7 @@
      } else {
        this.$store.commit("elAlertShow", {
          elAlertShow: true,
          elAlertText: data.msg,
          elAlertText: data.msg
        });
      }
    },
@@ -1339,14 +1339,14 @@
        // `this.$store.commit('elAlertShow',{'elAlertShow':true,'elAlertText': data.msg});`
        this.$store.commit("elAlertShow", {
          elAlertShow: true,
          elAlertText: data.msg,
          elAlertText: data.msg
        });
      }
    },
    getListMarket: handleDt.debounce(async function () {
    getListMarket: handleDt.debounce(async function() {
      let val = {
        pageNum: this.pageNum,
        pageSize: 15,
        pageSize: 15
      };
      // 获取指数列表
      let result = await api.getListMarket(val);
@@ -1361,7 +1361,7 @@
        this.alertShow = true;
      }
    }, 500),
    getStock: handleDt.debounce(async function (pageNum) {
    getStock: handleDt.debounce(async function(pageNum) {
      let stockType = this.tabsIndex001 == 0 ? "ST" : "US";
      let pageNumVal = pageNum ? this.pageNum++ : 1;
@@ -1372,7 +1372,7 @@
        stockPlate: this.stockPlate,
        keyWords: this.gpcode,
        stockType: stockType,
        orderBy: this.orderBy,
        orderBy: this.orderBy
      };
      // let data = await api.getStock(opt)
      let data = await api.getStockByType(opt);
@@ -1392,7 +1392,7 @@
            if (this.gpcode) {
              this.listArr = data.data.list;
            } else {
              data.data.list.forEach((element) => {
              data.data.list.forEach(element => {
                this.listArr.push(element);
              });
            }
@@ -1406,7 +1406,7 @@
      }
    }, 500),
    getStock009: handleDt.debounce(async function (pageNum) {
    getStock009: handleDt.debounce(async function(pageNum) {
      let pageNumVal = pageNum ? this.pageNum++ : 1;
      // 沪深
@@ -1415,7 +1415,7 @@
        pageSize: 15,
        stockPlate: this.stockPlate,
        keyWords: this.gpcode,
        stockType: "US",
        stockType: "US"
      };
      let data = await api.getStock(opt);
      this.loading = false;
@@ -1427,7 +1427,7 @@
          if (this.pageNum === 1) {
            this.listArr = data.data.list;
          } else {
            data.data.list.forEach((element) => {
            data.data.list.forEach(element => {
              this.listArr.push(element);
            });
          }
@@ -1438,14 +1438,14 @@
      }
    }, 500),
    getStockUs: handleDt.debounce(async function () {
    getStockUs: handleDt.debounce(async function() {
      // 美股
      let opt = {
        pageNum: this.pageNum,
        pageSize: 15,
        stockPlate: this.stockPlate,
        keyWords: this.gpcode,
        stockType: this.stockType,
        stockType: this.stockType
      };
      let data = await api.getStock(opt);
      this.loading = false;
@@ -1457,7 +1457,7 @@
          if (this.gpcode) {
            this.listArr3 = data.data.list;
          } else {
            data.data.list.forEach((element) => {
            data.data.list.forEach(element => {
              this.listArr3.push(element);
            });
          }
@@ -1467,14 +1467,14 @@
        this.alertShow = true;
      }
    }, 500),
    getStockHk: handleDt.debounce(async function () {
    getStockHk: handleDt.debounce(async function() {
      // 港股
      let opt = {
        pageNum: this.pageNum,
        pageSize: 15,
        stockPlate: this.stockPlate,
        keyWords: this.gpcode,
        stockType: this.stockType,
        stockType: this.stockType
      };
      let data = await api.getStock(opt);
      this.loading = false;
@@ -1486,7 +1486,7 @@
          if (this.gpcode) {
            this.listArr4 = data.data.list;
          } else {
            data.data.list.forEach((element) => {
            data.data.list.forEach(element => {
              this.listArr4.push(element);
            });
          }
@@ -1496,13 +1496,13 @@
        this.alertShow = true;
      }
    }, 500),
    getStocks: handleDt.debounce(async function () {
    getStocks: handleDt.debounce(async function() {
      // 科创
      let opt = {
        pageNum: this.pageNum,
        pageSize: 15,
        stockPlate: this.stockPlate,
        keyWords: this.gpcode,
        keyWords: this.gpcode
      };
      let data = await api.getStock(opt);
      this.loading = false;
@@ -1514,7 +1514,7 @@
          if (this.gpcode) {
            this.listArr2 = data.data.list;
          } else {
            data.data.list.forEach((element) => {
            data.data.list.forEach(element => {
              this.listArr2.push(element);
            });
          }
@@ -1549,7 +1549,7 @@
      let opt = {
        newCode: this.sgCode,
        applyNums: this.sgNum,
        phone: this.$store.state.userInfo.phone,
        phone: this.$store.state.userInfo.phone
      };
      let data = await api.getNewAdd(opt);
      if (data.status === 0) {
@@ -1582,8 +1582,8 @@
          if_us: ifUs,
          if_zhishu: ifZhishu,
          sok: item.type ? item.type : this.filterSH(item.stock_type),
          type: item.stock_type,
        },
          type: item.stock_type
        }
      });
    },
    // 进入详情
@@ -1597,7 +1597,7 @@
      }
      const obj = {
        pid: item.code || "",
        type: item.stock_type || "",
        type: item.stock_type || ""
      };
      window.localStorage.setItem("kLine", JSON.stringify(obj));
      var codes = "";
@@ -1679,8 +1679,8 @@
            sok: soks,
            if_us: ifUs,
            usType: item.type,
            if_zhishu: ifZhishu,
          },
            if_zhishu: ifZhishu
          }
        });
      }
    },
@@ -1692,7 +1692,7 @@
      }
    },
    getFutures: handleDt.debounce(async function () {
    getFutures: handleDt.debounce(async function() {
      // 获取期货列表
      let opt = {};
      let data = await api.getNewGu(opt);
@@ -1740,12 +1740,12 @@
      let opt = {
        pageNum: this.pageNums,
        pageSize: 15,
        keyWords: this.gpcodes,
        keyWords: this.gpcodes
      };
      let data = await api.getMyList(opt);
      this.loadings = false;
      if (data.status === 0) {
        data.data.list.forEach((element) => {
        data.data.list.forEach(element => {
          this.listArrs.push(element);
        });
      }
@@ -1872,7 +1872,7 @@
      if (this.tabsItemIndex === 1) {
        this.$message({
          message: this.$t("hj71"),
          type: "warning",
          type: "warning"
        });
        return;
      }
@@ -2038,7 +2038,7 @@
      }
      let opt = {
        pageNum: 1,
        pageSize: this.currentNum,
        pageSize: this.currentNum
      };
      let data = await api.getListMarket(opt);
      this.list = data.data;
@@ -2057,7 +2057,7 @@
        this.$refs["topTitle"].style.height = "1.2821rem";
      }
      this.dialogFlag = !this.dialogFlag;
    },
    }
  },
  filters: {
    getName(spell) {
@@ -2124,8 +2124,8 @@
      }
      // 17:35:2922-06-2022
      return y + "-" + mm + "-" + d + " " + h + ":" + m + ":" + c;
    },
  },
    }
  }
};
</script>