| | |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <itemCard :activeObj="activeObj" :itemClick="itemClick" /> |
| | | <itemCard |
| | | @closingPosition="closingPosition" |
| | | :activeObj="activeObj" |
| | | :itemClick="itemClick" |
| | | /> |
| | | </template> |
| | | <div v-show="active !== '1'"> |
| | | <dataList ref="dataListref" :activeObj="activeObj" /> |
| | | <dataList |
| | | ref="dataListref" |
| | | :activeObj="activeObj" |
| | | @closingPosition="closingPosition" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | { |
| | | title: this.$t("mggs"), |
| | | assname: this.$t("美股总资产"), |
| | | name: "2", |
| | | bgc: "rgb(12, 175, 226)", |
| | | laber: "US", |
| | |
| | | symbol: "$", |
| | | }, |
| | | { |
| | | title: this.$t("ydgs"), |
| | | name: "3", |
| | | bgc: "rgb(255, 91, 150)", |
| | | laber: "IN", |
| | | symbolCode: "USD", |
| | | symbol: "$", |
| | | }, |
| | | { |
| | | title: this.$t("马来西亚"), |
| | | assname: this.$t("馬股总资产"), |
| | | name: "4", |
| | | bgc: "rgb(163, 91, 255)", |
| | | laber: "MAS", |
| | | symbolCode: "MYR", |
| | | symbol: "RM", |
| | | }, |
| | | { |
| | | title: this.$t("港股"), |
| | | assname: this.$t("港股总资产"), |
| | | name: "5", |
| | | bgc: "rgb(255 91 230)", |
| | | laber: "HK", |
| | | symbolCode: "HKD", |
| | | symbol: "HK$", |
| | | }, |
| | | ], |
| | | getMoneyList: [], |
| | |
| | | created() { |
| | | this.getMoneys(); |
| | | }, |
| | | mounted() { |
| | | if (this.$route.query.buyType) { |
| | | let arr = this.tabsArr.filter( |
| | | (item) => item.laber == this.$route.query.buyType |
| | | )[0]; |
| | | this.onClick(arr); |
| | | } |
| | | }, |
| | | methods: { |
| | | closingPosition() { |
| | | this.getMoneys(); |
| | | }, |
| | | itemClick() { |
| | | this.$refs.dataListref.getList(this.activeObj.laber); |
| | | this.getMoneys(); |
| | | }, |
| | | async getMoneys() { |
| | | const res = await getMoney(); |
| | |
| | | } |
| | | }); |
| | | }); |
| | | let obj = arr.filter((item) => item.name == this.active)[0]; |
| | | this.activeObj = obj; |
| | | console.log(obj, "0000000", this.tabsArr); |
| | | this.tabsArr = arr; |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | } |
| | | }, |
| | | onClick(e) { |
| | | console.log(e, "===="); |
| | | this.active = e.name; |
| | | this.activeObj = e; |
| | | this.getMoneys(); |
| | |
| | | // padding: 0.10667rem 0.34667rem; |
| | | color: #fff; |
| | | } |
| | | </style> |
| | | </style> |