... | @@ -38,7 +38,7 @@ | ... | @@ -38,7 +38,7 @@ |
38 | "babel-register": "^6.22.0", | 38 | "babel-register": "^6.22.0", |
39 | "chalk": "^2.0.1", | 39 | "chalk": "^2.0.1", |
40 | "chromedriver": "^2.27.2", | 40 | "chromedriver": "^2.27.2", |
41 | - "copy-webpack-plugin": "^4.0.1", | 41 | + "copy-webpack-plugin": "^4.6.0", |
42 | "cross-spawn": "^5.0.1", | 42 | "cross-spawn": "^5.0.1", |
43 | "css-loader": "^0.28.0", | 43 | "css-loader": "^0.28.0", |
44 | "eslint": "^4.15.0", | 44 | "eslint": "^4.15.0", | ... | ... |
16.6 KB
17.5 KB
19.5 KB
16.1 KB
19 KB
18 KB
16.6 KB
16.7 KB
19.4 KB
16.7 KB
20.8 KB
15.4 KB
17.6 KB
19.4 KB
17.6 KB
17.4 KB
15.6 KB
16.8 KB
17.9 KB
17.8 KB
15.3 KB
18.9 KB
17.9 KB
18.8 KB
19.9 KB
15.3 KB
18.6 KB
20.7 KB
16.6 KB
18 KB
17.8 KB
17 KB
18.5 KB
21.4 KB
17.9 KB
14.5 KB
13.3 KB
15.1 KB
15.9 KB
17 KB
14.9 KB
17.6 KB
18.1 KB
17.2 KB
18 KB
16.4 KB
17.3 KB
16.3 KB
15.9 KB
21.1 KB
18.1 KB
16.8 KB
17.2 KB
16.6 KB
20.5 KB
15.8 KB
17.7 KB
17.8 KB
13.6 KB
14.1 KB
17.5 KB
16.1 KB
18 KB
17.6 KB
19.8 KB
17.9 KB
18 KB
15.1 KB
18 KB
14.9 KB
18.7 KB
19 KB
16.6 KB
18.5 KB
18.1 KB
16 KB
20.8 KB
16.5 KB
18.2 KB
14 KB
16.7 KB
17.7 KB
17.9 KB
16.5 KB
13.5 KB
15.7 KB
17.3 KB
17.3 KB
18.4 KB
18.8 KB
16.5 KB
18.4 KB
20 KB
16.8 KB
14.5 KB
17.1 KB
16.1 KB
13.3 KB
19.3 KB
18.4 KB
19 KB
19.9 KB
15.2 KB
15.6 KB
20.4 KB
18.3 KB
18.1 KB
16.7 KB
18.6 KB
17.4 KB
17.9 KB
18.5 KB
20 KB
18.1 KB
16.3 KB
18.6 KB
17.1 KB
16.6 KB
18.4 KB
18 KB
17 KB
18.3 KB
14 KB
17.7 KB
17.7 KB
17.3 KB
19.6 KB
13.5 KB
16.7 KB
19 KB
20.8 KB
19 KB
19.5 KB
18.6 KB
15.9 KB
18 KB
17.7 KB
18 KB
19 KB
20.4 KB
16.8 KB
19.1 KB
15.9 KB
19.9 KB
18.3 KB
... | @@ -3,44 +3,44 @@ | ... | @@ -3,44 +3,44 @@ |
3 | <div class="header"> | 3 | <div class="header"> |
4 | <h1>{{ userId }}</h1> | 4 | <h1>{{ userId }}</h1> |
5 | </div> | 5 | </div> |
6 | + | ||
6 | <div class="body"> | 7 | <div class="body"> |
7 | <div class="assist"> | 8 | <div class="assist"> |
8 | - <b-button>Pick Assistant</b-button> | 9 | + <b-button v-b-toggle.collapse-predict variant="outline-primary">Pick Assistant</b-button> |
10 | + <b-collapse id="collapse-predict"> | ||
11 | + <h1>the world of sound</h1> | ||
12 | + <span v-for="champion in championList"> | ||
13 | + <img v-bind:src="splashLoader(champion)"> | ||
14 | + </span> | ||
15 | + </b-collapse> | ||
9 | </div> | 16 | </div> |
17 | + | ||
10 | <div class="team"> | 18 | <div class="team"> |
19 | + <div class="team_summary"> | ||
11 | <div class="team_best"> | 20 | <div class="team_best"> |
12 | - <h1>tb {{ inference_team[0]['id'] }}</h1> | 21 | + <h1>Best : {{ nameTranslator(inference_team[0]['id']) }}</h1> |
22 | + <img v-bind:src="splashLoader(inference_team[0]['id'])"> | ||
13 | </div> | 23 | </div> |
14 | <div class="team_worst"> | 24 | <div class="team_worst"> |
15 | - <h1>tw {{ inference_team[inference_team.length -1]['id'] }}</h1> | 25 | + <h1>Worst {{ nameTranslator(inference_team[inference_team.length - 1]['id']) }}</h1> |
26 | + <img v-bind:src="splashLoader(inference_team[inference_team.length - 1]['id'])"> | ||
16 | </div> | 27 | </div> |
17 | </div> | 28 | </div> |
18 | - | 29 | + <b-button v-b-toggle.collapse-1 variant="primary">More</b-button> |
30 | + <b-collapse id="collapse-1"> | ||
19 | <b-container fluid class="wrap"> | 31 | <b-container fluid class="wrap"> |
20 | <b-row class="items flex-row flex-nowrap"> | 32 | <b-row class="items flex-row flex-nowrap"> |
21 | - <template v-for="team in inference_team"> | 33 | + <template v-for="team, index in inference_team"> |
22 | <b-card class="card"> | 34 | <b-card class="card"> |
23 | - <b-card-text>{{ team['id'] }}</b-card-text> | 35 | + <img v-bind:src="splashLoader(team['id'])"> |
24 | - <b-card-text>{{ team['coefficient'] }}</b-card-text> | 36 | + <h3>{{ index + 1 }}. {{ nameTranslator(team['id']) }}</h3> |
25 | </b-card> | 37 | </b-card> |
26 | </template> | 38 | </template> |
27 | </b-row> | 39 | </b-row> |
28 | </b-container> | 40 | </b-container> |
29 | - | 41 | + </b-collapse> |
30 | - <div class="wrap"> | ||
31 | - <div class="items"> | ||
32 | - <h1>1234123412348123840182304981-23841-2034812-384123479012374917340917394073907409172394071092374901723940172394710923749012734091723407102374</h1> | ||
33 | - </div> | ||
34 | </div> | 42 | </div> |
35 | 43 | ||
36 | - <div class="enemy"> | ||
37 | - <div class="enemy_best"> | ||
38 | - <h1>eb {{ inference_enemy[0]["id"] }}</h1> | ||
39 | - </div> | ||
40 | - <div class="enemy_worst"> | ||
41 | - <h1>ew {{ inference_enemy[inference_enemy.length -1]["id"] }}</h1> | ||
42 | - </div> | ||
43 | - </div> | ||
44 | <div class="myPick"> | 44 | <div class="myPick"> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
... | @@ -48,6 +48,8 @@ | ... | @@ -48,6 +48,8 @@ |
48 | </template> | 48 | </template> |
49 | 49 | ||
50 | <script> | 50 | <script> |
51 | +import championTable from '../assets/champion_table.json'; | ||
52 | + | ||
51 | export default { | 53 | export default { |
52 | name: 'DetailPage', | 54 | name: 'DetailPage', |
53 | data () { | 55 | data () { |
... | @@ -58,27 +60,25 @@ export default { | ... | @@ -58,27 +60,25 @@ export default { |
58 | inference_enemy: [], | 60 | inference_enemy: [], |
59 | inference_secondary: [], | 61 | inference_secondary: [], |
60 | myPick: [], | 62 | myPick: [], |
63 | + splash: [], | ||
64 | + championList: Array.from(Array(145).keys()) | ||
61 | } | 65 | } |
62 | }, | 66 | }, |
63 | created () { | 67 | created () { |
64 | - //this.userId = $route.params.userId | ||
65 | - //this.axios.post('http://127.0.0.1:8000/GameData/search/', {'game_id': "laurelwoods"}, { | ||
66 | - // headers: { 'Content-Type': 'application/json'} | ||
67 | - //}) | ||
68 | this.axios.get('http://127.0.0.1:8000/GameData/search/', { params: { game_id: 'laurelwoods' }}) | 68 | this.axios.get('http://127.0.0.1:8000/GameData/search/', { params: { game_id: 'laurelwoods' }}) |
69 | .then((response) => { | 69 | .then((response) => { |
70 | this.userPk = response.data.id; | 70 | this.userPk = response.data.id; |
71 | this.userId = response.data.game_id; | 71 | this.userId = response.data.game_id; |
72 | // inference : team | 72 | // inference : team |
73 | - this.axios.get('http://127.0.0.1:8000/GameData/' + this.userPk + '/inference/', { params: { model_type: 'team'}}) | 73 | + this.axios.get('http://127.0.0.1:8000/GameData/' + this.userPk + '/inference/', { params: { model_type: 'team' } }) |
74 | .then((response) => { this.inference_team = response.data; }) | 74 | .then((response) => { this.inference_team = response.data; }) |
75 | 75 | ||
76 | // inference : enemy | 76 | // inference : enemy |
77 | - this.axios.get('http://127.0.0.1:8000/GameData/' + this.userPk + '/inference/', { params: { model_type: 'enemy'}}) | 77 | + this.axios.get('http://127.0.0.1:8000/GameData/' + this.userPk + '/inference/', { params: { model_type: 'enemy' } }) |
78 | .then((response) => { this.inference_enemy = response.data; }) | 78 | .then((response) => { this.inference_enemy = response.data; }) |
79 | 79 | ||
80 | // inference : secondary | 80 | // inference : secondary |
81 | - this.axios.get('http://127.0.0.1:8000/GameData/' + this.userPk + '/inference/', { params: { model_type: 'secondary'}}) | 81 | + this.axios.get('http://127.0.0.1:8000/GameData/' + this.userPk + '/inference/', { params: { model_type: 'secondary' } }) |
82 | .then((response) => { | 82 | .then((response) => { |
83 | this.inference_secondary = response.data; }) | 83 | this.inference_secondary = response.data; }) |
84 | 84 | ||
... | @@ -89,7 +89,15 @@ export default { | ... | @@ -89,7 +89,15 @@ export default { |
89 | .catch((error) => { | 89 | .catch((error) => { |
90 | console.log(error.response) | 90 | console.log(error.response) |
91 | }) | 91 | }) |
92 | - | 92 | + }, |
93 | + methods: { | ||
94 | + nameTranslator: function (championId) { | ||
95 | + return championTable[championId]['name_ko'] | ||
96 | + }, | ||
97 | + splashLoader: function (championId) { | ||
98 | + const path = require('../assets/splash/' + String(championId) + '.png') | ||
99 | + return path | ||
100 | + } | ||
93 | } | 101 | } |
94 | } | 102 | } |
95 | </script> | 103 | </script> |
... | @@ -106,7 +114,7 @@ export default { | ... | @@ -106,7 +114,7 @@ export default { |
106 | overflow: auto; | 114 | overflow: auto; |
107 | } | 115 | } |
108 | .card { | 116 | .card { |
109 | - min-height: 300px; | 117 | + min-height: 200px; |
110 | - min-width: 300px; | 118 | + min-width: 250px; |
111 | } | 119 | } |
112 | </style> | 120 | </style> | ... | ... |
-
Please register or login to post a comment