| | |
| | | <div class="card_1 flex-center"> |
| | | <div>{{ $t("浮動盈虧") }}</div> |
| | | <div style="font-size: 24px" :style="`color:${thisMoneyData.profitAndLoss > 0 |
| | | ? 'red' |
| | | : thisMoneyData.profitAndLoss < 0 |
| | | ? 'green' |
| | | : '' |
| | | ? 'red' |
| | | : thisMoneyData.profitAndLoss < 0 |
| | | ? 'green' |
| | | : '' |
| | | }`"> |
| | | {{ thisMoneyData.symbol }} {{ thisMoneyData.profitAndLoss }} |
| | | </div> |
| | |
| | | <el-table-column prop="profitAndLoseParent" :label="$t('Profit')"> |
| | | <template slot-scope="scope"> |
| | | <span :class="`${scope.row.profitAndLose < 0 |
| | | ? 'r_c' |
| | | : scope.row.profitAndLose > 0 |
| | | ? 'lc_c' |
| | | : '' |
| | | ? 'r_c' |
| | | : scope.row.profitAndLose > 0 |
| | | ? 'lc_c' |
| | | : '' |
| | | }`"> |
| | | {{ scope.row.profitAndLose }} ({{ |
| | | scope.row.profitAndLoseParent |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | let teimss2 = null; // 轮询获取持仓数据计时器 |
| | | import mixins from "@/mixins/myMixins"; // 混入 |
| | | import * as api from "@/axios/api"; |
| | | export default { |
| | |
| | | this.opt.stockType = this.type; |
| | | this.apiInterface = api.getchicang; // 赋值接口 |
| | | this.init(); // 获取记录列表 |
| | | |
| | | teimss2 = setInterval(() => { |
| | | this.getList(); |
| | | }, 3000); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(teimss2); |
| | | }, |
| | | methods: { |
| | | // 关闭弹窗 |