From e4e66d8b276c8b207f19044550356214d9656be6 Mon Sep 17 00:00:00 2001 From: uutaein <uutaein@gmail.com> Date: Wed, 4 Dec 2019 03:15:49 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=9D=B5=EB=A5=A0=EA=B9=8C=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/src/Layout/Components/StrategySimulator.vue | 7 +++---- Frontend/src/store/index.js | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Frontend/src/Layout/Components/StrategySimulator.vue b/Frontend/src/Layout/Components/StrategySimulator.vue index 31d1528..66dd1a7 100644 --- a/Frontend/src/Layout/Components/StrategySimulator.vue +++ b/Frontend/src/Layout/Components/StrategySimulator.vue @@ -30,7 +30,7 @@ <div class="card-header-tab card-header"> <div class="card-header-title font-size-lg text-capitalize font-weight-normal"> <i class="header-icon lnr-cloud-download icon-gradient bg-happy-itmeo"> </i> - Technical Support + 내 포트폴리오 결과 </div> </div> <div class="p-0 card-body"> @@ -39,14 +39,13 @@ <div class="widget-chat-wrapper-outer"> <div class="widget-chart-content widget-chart-content-lg pb-0"> <div class="widget-chart-flex"> - <div class="widget-title opacity-5 text-muted text-uppercase">Helpdesk - Tickets + <div class="widget-title opacity-5 text-muted text-uppercase">최종 수익률 </div> </div> <div class="widget-numbers"> <div class="widget-chart-flex"> <div> - <span class="text-warning">34</span> + <span class="text-warning">{{ this.$store.state.SS_profit }}%</span> </div> <div class="widget-title ml-2 font-size-lg font-weight-normal text-dark"> diff --git a/Frontend/src/store/index.js b/Frontend/src/store/index.js index bd71377..d00eb69 100644 --- a/Frontend/src/store/index.js +++ b/Frontend/src/store/index.js @@ -16,7 +16,8 @@ export default new Vuex.Store({ SS_chart_labels : [], SS_chart_data1 : [], SS_chart_data2 : [], - SS_chart_done : false + SS_chart_done : false, + SS_profit : 0 }, // 전체돈 * ration / 주식개별 // 전체돈 * 코스닥 가격 @@ -88,6 +89,7 @@ export default new Vuex.Store({ } } state.SS_chart_data2.reverse(); + state.SS_profit = (state.SS_chart_data2[payloadNumSize] - state.SS_init_money ) / state.SS_init_money * 100; state.SS_chart_done = true; console.log(state.SS_chart_data2); }, -- GitLab