Blame view
src/pages/Mark/viewMark.vue
9.35 KB
006544386
|
1 2 |
<template> <v-app id="pages-dasboard"> |
495e4037c
|
3 |
<!-- ****** PROFILE MARK ****** --> |
006544386
|
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
<v-container fluid grid-list-md> <v-flex xs12 sm12> <v-container fluid> <v-layout wrap> <v-flex xs12 sm12 md3 class="mt-4"> <v-card flat> <v-toolbar dark class="fixcolors" flat> <v-spacer></v-spacer> <v-toolbar-title> <h3>Profile</h3> </v-toolbar-title> <v-spacer></v-spacer> </v-toolbar> <v-card-text> <v-container> <v-layout wrap v-for="(mark,i) in markData" :key="i"> <v-flex xs12> <v-layout> <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center" > <v-avatar size="100px"> <img src="/static/icon/user.png" v-if="!mark.studentsMarks[0].studentId.profilePicUrl" /> <img :src="mark.studentsMarks[0].studentId.profilePicUrl" v-else-if="mark.studentsMarks[0].studentId.profilePicUrl" /> </v-avatar> </v-flex> </v-layout> <v-layout> <v-flex xs12 sm12> <h3 class="text-xs-center"> <b>{{ mark.studentsMarks[0].studentId.name }}</b> </h3> <p class="text-xs-center grey--text">Student</p> </v-flex> </v-layout> <v-layout style="border: 1px solid lightgrey;"> <v-flex xs6 sm6 class="py-0"> <h4 class="right"> <b>Roll No :</b> </h4> </v-flex> <v-flex sm6 xs6 class="py-0"> <h4>{{ mark.studentsMarks[0].studentId.rollNo }}</h4> </v-flex> </v-layout> <v-layout style="border: 1px solid lightgrey;"> <v-flex xs6 sm6 class="py-0"> <h4 class="right"> <b>Class :</b> </h4> </v-flex> <v-flex sm6 xs6 class="right py-0"> <h4>{{ mark.classId.classNum }}</h4> </v-flex> </v-layout> <v-layout style="border: 1px solid lightgrey;"> <v-flex xs6 sm6 class="right py-0"> <h4 class="right"> <b>Section :</b> </h4> </v-flex> <v-flex sm6 xs6 class="right py-0"> <h4>{{ mark.sectionId.name}}</h4> </v-flex> </v-layout> </v-flex> </v-layout> </v-container> </v-card-text> </v-card> </v-flex> |
495e4037c
|
82 83 |
<!-- ****** TABLE DATA MARK ****** --> |
006544386
|
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
<v-flex xs12 sm12 md9 class="mt-4"> <v-card> <v-toolbar dark class="fixcolors" flat> <v-spacer></v-spacer> <v-toolbar-title> <h3>Mark</h3> </v-toolbar-title> <v-spacer></v-spacer> </v-toolbar> <v-card-title v-for="(markList,i) in markData" :key="i" class="subheading" >{{ markList.examId.examName }}</v-card-title> <table class="feeTypeTable tableRsponsive"> <tr class="info white--text"> <th rowspan="2">Subject</th> <th colspan="2" v-for="(markDistribution,i) in markDistributions" :key="i " >{{ markDistribution.markDistributionId.distributionType}}</th> <!-- <th colspan="2">ASSIGNMENT</th> --> <th colspan="3">Total</th> </tr> <tr class="info white--text"> <th class="bg-sky" v-for="(markDistribution,i) in markDistributions" :key="i" >{{i === 0 ? 'Mark' : 'Highest Mark'}}</th> <th class="bg-sky-light" v-for="(markDistribution,i) in markDistributions" :key="i" >{{i === 0 ? 'Mark' : 'Highest Mark'}}</th> <th class="bg-sky">Mark</th> <th class="bg-purple">Point</th> <th class="bg-skyDark">Grade</th> </tr> <!-- </tr> --> <tr v-for="(mark,i) in markData" :key="i"> |
495e4037c
|
126 |
<td>{{ mark.classId.subjects[0].subjectName }}</td> |
006544386
|
127 128 129 |
<td v-for="(markDistribution,i) in markParticularDistributionData" :key="i" |
495e4037c
|
130 |
>{{ markDistribution }}</td> |
006544386
|
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
<!-- <td> 10 </td> <td> 10 </td> <td> 83 </td> <td> 8 </td> <td>B </td>--> </tr> <!-- <tfoot> <tr> <td colspan="2">Total:</td> <td></td> <td></td> <td></td> <td></td> </tr> </tfoot>--> </table> </v-card> </v-flex> </v-layout> </v-container> </v-flex> </v-container> <div class="loader" v-if="showLoader"> <v-progress-circular indeterminate color="white"></v-progress-circular> </div> </v-app> </template> <script> import http from "@/Services/http.js"; import moment from "moment"; export default { data: () => ({ showLoader: false, markData: [], token: "", markDistributions: [], markParticularDistributionData: [] }), mounted() { this.token = this.$store.state.token; this.getMarkList(); }, methods: { getMarkList() { this.showLoader = true; http() .get("/getParticularMark", { params: { studentId: this.$route.params.markId }, headers: { Authorization: "Bearer " + this.token } }) .then(response => { this.markData = response.data.data; for (let i = 0; i < this.markData.length; i++) { for (let j = 0; j < this.markData[i].studentsMarks.length; j++) { // console.log("this.studentsMarksSSSSSSSSSSSSS",this.markData[i].studentsMarks[j].marksObtained) this.markDistributions = this.markData[i].studentsMarks[ j ].marksObtained; for ( let k = 0; k < this.markData[i].studentsMarks[j].marksObtained.length; k++ ) { this.markParticularDistributionData.push( |
495e4037c
|
207 |
this.markData[i].studentsMarks[j].marksObtained[k].marksScored |
006544386
|
208 209 |
); this.markParticularDistributionData.push( |
495e4037c
|
210 211 212 |
this.markData[i].studentsMarks[j].marksObtained[k] .markDistributionId.markValue ); |
006544386
|
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
console.log( "this.markParticularDistributionData", this.markParticularDistributionData ); } } } this.showLoader = false; }) .catch(error => { // console.log("err====>", err); this.showLoader = false; this.snackbar = true; this.text = error.response.data.message; if (error.response.status === 401) { this.$router.replace({ path: "/" }); this.$store.dispatch("setToken", null); this.$store.dispatch("Id", null); } }); } } }; </script> <style scoped> table { border-collapse: collapse; border: 1px solid #e2e7eb; } th, td { border: 1px solid #e2e7eb; padding: 10px; text-align: center; } table.feeTypeTable { table-layout: auto !important; width: 100% !important; } .bg-sky { background-color: #98b2cc !important; } .bg-sky-light { background-color: #89a0b8; } .bg-purple { background-color: #9583ac; } .bg-skyDark { background-color: #956785; } @media screen and (max-width: 380px) { .tableRsponsive { display: block; position: relative; overflow: scroll; } } </style> |