Commit 819c223ec08cc985738f4d27e53b5664a7b68dfa
1 parent
8deade1932
Exists in
master
and in
3 other branches
improve school and persons logo and details
Showing
3 changed files
with
32 additions
and
26 deletions
Show diff stats
src/pages/Mark/viewMark.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <!-- ****** PROFILE MARK ****** --> | 3 | <!-- ****** PROFILE MARK ****** --> |
4 | <v-container fluid grid-list-md> | 4 | <v-container fluid grid-list-md> |
5 | <v-layout> | 5 | <v-layout> |
6 | <v-flex xs12 sm8 md10> | 6 | <v-flex xs12 sm8 md10> |
7 | <v-btn class="open-dialog-button mt-3" round dark @click="print()"> | 7 | <v-btn class="open-dialog-button mt-3" round dark @click="print()"> |
8 | 8 | ||
9 | <v-icon size="18" right dark>print</v-icon> | 9 | <v-icon size="18" right dark>print</v-icon> |
10 | </v-btn> | 10 | </v-btn> |
11 | </v-flex> | 11 | </v-flex> |
12 | <v-flex xs12 sm4 md2 class="right"> | 12 | <v-flex xs12 sm4 md2 class="right"> |
13 | <v-select | 13 | <v-select |
14 | class | 14 | class |
15 | :items="selectMark" | 15 | :items="selectMark" |
16 | label="Select" | 16 | label="Select" |
17 | v-model="selectMarkList" | 17 | v-model="selectMarkList" |
18 | @change="selectMarkData(selectMarkList)" | 18 | @change="selectMarkData(selectMarkList)" |
19 | ></v-select> | 19 | ></v-select> |
20 | </v-flex> | 20 | </v-flex> |
21 | </v-layout> | 21 | </v-layout> |
22 | <v-flex xs12 sm12 id="printMe"> | 22 | <v-flex xs12 sm12 id="printMe"> |
23 | <v-layout wrap> | 23 | <v-layout wrap> |
24 | <!-- ****** TABLE DATA MARK ****** --> | 24 | <!-- ****** TABLE DATA MARK ****** --> |
25 | <v-flex xs12 sm12 md12> | 25 | <v-flex xs12 sm12 md12> |
26 | <v-card | 26 | <v-card |
27 | v-for="(value, id, index) in filterData" | 27 | v-for="(value, id, index) in filterData" |
28 | :key="index" | 28 | :key="index" |
29 | flat | 29 | flat |
30 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" | 30 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" |
31 | > | 31 | > |
32 | <v-layout> | 32 | <v-layout> |
33 | <v-flex xs12 sm12 md12 class="text-xs-center"> | 33 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
34 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | 34 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
35 | <p class="title">{{ userData.name }}</p> | 35 | <p class="title">{{ userData.name }}</p> |
36 | <p>{{ userData.address }}</p> | 36 | <p>{{ userData.address }}</p> |
37 | </v-flex> | 37 | </v-flex> |
38 | <v-flex xs12 sm12 md12 class="text-xs-center"> | 38 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
39 | <v-avatar size="100"> | 39 | <v-avatar size="80px"> |
40 | <img | 40 | <img src="/static/icon/user.png" v-if="!value[0].studentId.profilePicUrl" /> |
41 | :src="value[0].studentId.profilePicUrl" | 41 | <img :src="value[0].studentId.profilePicUrl" v-else-if="value[0].studentId.profilePicUrl" /> |
42 | v-if="value[0].studentId.profilePicUrl" | ||
43 | width="100px" | ||
44 | /> | ||
45 | <img | ||
46 | src="/static/icon/user.png" | ||
47 | v-else-if="!value[0].studentId.profilePicUrl" | ||
48 | width="100px" | ||
49 | /> | ||
50 | </v-avatar> | 42 | </v-avatar> |
51 | <p | 43 | <p |
52 | style="font-size:20px;margin:0px;margin-bottom:4px;" | 44 | style="font-size:20px;margin:0px;margin-bottom:4px;" |
53 | >{{ value[0].studentId.name }}</p> | 45 | >{{ value[0].studentId.name }}</p> |
54 | <p | 46 | <p |
55 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" | 47 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
56 | >Class : {{ value[0].classId.classNum }}</p> | 48 | > Class : {{ value[0].classId.classNum }}</p> |
57 | <p | 49 | <p |
58 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" | 50 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
59 | >Roll NO : {{ value[0].studentId.rollNo }}</p> | 51 | > Section : {{ value[0].sectionId.name }}</p> |
60 | <p | 52 | <p |
61 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" | 53 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
62 | >Section : {{ value[0].sectionId.name }}</p> | 54 | > Roll No : {{ value[0].studentId.rollNo }}</p> |
63 | </v-flex> | 55 | </v-flex> |
64 | </v-layout> | 56 | </v-layout> |
65 | <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> | ||
66 | <table | 57 | <table |
67 | class="mb-5 tableRsponsive feeTypeTable" | 58 | class="mb-5 tableRsponsive feeTypeTable" |
68 | style="border: 1px solid lightgrey; | 59 | style="border: 1px solid lightgrey; |
69 | border-collapse: collapse;!important | 60 | border-collapse: collapse;!important |
70 | table-layout: auto !important; | 61 | table-layout: auto !important; |
71 | width: 100% !important; | 62 | width: 100% !important; |
72 | " | 63 | " |
73 | > | 64 | > |
74 | <thead style="border: 1px solid lightgrey !important;"> | 65 | <thead style="border: 1px solid lightgrey !important;"> |
75 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 66 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
76 | <td | 67 | <td |
77 | rowspan="2" | 68 | rowspan="2" |
78 | style="border: 1px solid lightgrey !important;padding: 10px;" | 69 | style="border: 1px solid lightgrey !important;padding: 10px;" |
79 | >Subject</td> | 70 | >Subject</td> |
80 | <template v-for="studentData in value"> | 71 | <template v-for="studentData in value"> |
81 | <td | 72 | <td |
82 | colspan="2" | 73 | colspan="2" |
83 | v-for="studentMark in studentData.studentsMarks" | 74 | v-for="studentMark in studentData.studentsMarks" |
84 | style="border: 1px solid lightgrey !important;padding: 10px;" | 75 | style="border: 1px solid lightgrey !important;padding: 10px;" |
85 | >{{studentMark.markDistributionId.distributionType}}</td> | 76 | >{{studentMark.markDistributionId.distributionType}}</td> |
86 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> | 77 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> |
87 | </template> | 78 | </template> |
88 | </tr> | 79 | </tr> |
89 | <tr | 80 | <tr |
90 | v-for="(subject, ind) in value" | 81 | v-for="(subject, ind) in value" |
91 | v-if="ind == 0" | 82 | v-if="ind == 0" |
92 | style="border: 1px solid lightgrey !important;" | 83 | style="border: 1px solid lightgrey !important;" |
93 | > | 84 | > |
94 | <template v-for="(exam, i) in subject.studentsMarks"> | 85 | <template v-for="(exam, i) in subject.studentsMarks"> |
95 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 86 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
96 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Highest Mark</td> | 87 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Highest Mark</td> |
97 | </template> | 88 | </template> |
98 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 89 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
99 | </tr> | 90 | </tr> |
100 | </thead> | 91 | </thead> |
101 | <tbody style="border: 1px solid lightgrey !important;"> | 92 | <tbody style="border: 1px solid lightgrey !important;"> |
102 | <tr v-for="subject in value" style="border: 1px solid lightgrey !important;"> | 93 | <tr v-for="subject in value" style="border: 1px solid lightgrey !important;"> |
103 | <td | 94 | <td |
104 | style="border: 1px solid lightgrey !important;padding: 10px;" | 95 | style="border: 1px solid lightgrey !important;padding: 10px;" |
105 | >{{subject.subjectName}}</td> | 96 | >{{subject.subjectName}}</td> |
106 | <template v-for="(exam, i) in subject.studentsMarks"> | 97 | <template v-for="(exam, i) in subject.studentsMarks"> |
107 | <td | 98 | <td |
108 | style="border: 1px solid lightgrey !important;padding: 10px;" | 99 | style="border: 1px solid lightgrey !important;padding: 10px;" |
109 | >{{exam.marksScored}}</td> | 100 | >{{exam.marksScored}}</td> |
110 | <td | 101 | <td |
111 | style="border: 1px solid lightgrey !important;padding: 10px;" | 102 | style="border: 1px solid lightgrey !important;padding: 10px;" |
112 | >{{exam.markDistributionId.markValue}}</td> | 103 | >{{exam.markDistributionId.markValue}}</td> |
113 | </template> | 104 | </template> |
114 | <td | 105 | <td |
115 | style="border: 1px solid lightgrey !important;padding: 10px;" | 106 | style="border: 1px solid lightgrey !important;padding: 10px;" |
116 | >{{subject.totalMarks}}</td> | 107 | >{{subject.totalMarks}}</td> |
117 | </tr> | 108 | </tr> |
118 | </tbody> | 109 | </tbody> |
119 | </table> | 110 | </table> |
120 | </v-card> | 111 | </v-card> |
121 | </v-flex> | 112 | </v-flex> |
122 | </v-layout> | 113 | </v-layout> |
123 | </v-flex> | 114 | </v-flex> |
124 | </v-container> | 115 | </v-container> |
125 | <div class="loader" v-if="showLoader"> | 116 | <div class="loader" v-if="showLoader"> |
126 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 117 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
127 | </div> | 118 | </div> |
128 | </v-app> | 119 | </v-app> |
129 | </template> | 120 | </template> |
130 | 121 | ||
131 | <script> | 122 | <script> |
132 | import http from "@/Services/http.js"; | 123 | import http from "@/Services/http.js"; |
133 | import moment from "moment"; | 124 | import moment from "moment"; |
134 | import _ from "underscore"; | 125 | import _ from "underscore"; |
135 | 126 | ||
136 | export default { | 127 | export default { |
137 | data: () => ({ | 128 | data: () => ({ |
138 | showLoader: true, | 129 | showLoader: true, |
139 | nameShow: false, | 130 | nameShow: false, |
140 | showMark: true, | 131 | showMark: true, |
141 | showGrade: false, | 132 | showGrade: false, |
142 | markData: [], | 133 | markData: [], |
143 | token: "", | 134 | token: "", |
144 | markDistributions: [], | 135 | markDistributions: [], |
145 | markParticularDistributionData: [], | 136 | markParticularDistributionData: [], |
146 | filterData: [], | 137 | filterData: [], |
147 | output: null, | 138 | output: null, |
148 | gradeAPlus: "A+", | 139 | gradeAPlus: "A+", |
149 | gradeA: "A", | 140 | gradeA: "A", |
150 | gradeBPlus: "B+", | 141 | gradeBPlus: "B+", |
151 | gradeB: "B", | 142 | gradeB: "B", |
152 | gradeCPlus: "C+", | 143 | gradeCPlus: "C+", |
153 | gradeC: "C", | 144 | gradeC: "C", |
154 | selectMarkList: "Mark", | 145 | selectMarkList: "Mark", |
155 | selectMark: ["Mark", "Grade"], | 146 | selectMark: ["Mark", "Grade"], |
156 | MarkData: "", | 147 | MarkData: "", |
157 | userData: {} | 148 | userData: {} |
158 | }), | 149 | }), |
159 | mounted() { | 150 | mounted() { |
160 | this.token = this.$store.state.token; | 151 | this.token = this.$store.state.token; |
161 | this.getMarkList(); | 152 | this.getMarkList(); |
162 | this.getUserData(); | 153 | this.getUserData(); |
163 | }, | 154 | }, |
164 | methods: { | 155 | methods: { |
165 | getMarkList() { | 156 | getMarkList() { |
166 | this.showLoader = true; | 157 | this.showLoader = true; |
167 | http() | 158 | http() |
168 | .get("/getParticularMark", { | 159 | .get("/getParticularMark", { |
169 | params: { studentId: this.$route.params.markId }, | 160 | params: { studentId: this.$route.params.markId }, |
170 | headers: { Authorization: "Bearer " + this.token } | 161 | headers: { Authorization: "Bearer " + this.token } |
171 | }) | 162 | }) |
172 | .then(response => { | 163 | .then(response => { |
173 | this.markData = response.data.data; | 164 | this.markData = response.data.data; |
174 | let newData = response.data.data; | 165 | let newData = response.data.data; |
175 | // console.log("newData", newData); | 166 | // console.log("newData", newData); |
176 | for (var i = 0; i < newData.length; i++) { | 167 | for (var i = 0; i < newData.length; i++) { |
177 | newData[i].examination = newData[i].examId._id; | 168 | newData[i].examination = newData[i].examId._id; |
178 | } | 169 | } |
179 | this.filterData = _.groupBy(newData, ["examination"]); | 170 | this.filterData = _.groupBy(newData, ["examination"]); |
180 | // console.log("this.filterData", this.filterData); | 171 | // console.log("this.filterData", this.filterData); |
181 | for (let data in this.filterData) { | 172 | for (let data in this.filterData) { |
182 | for (let item in this.filterData[data]) { | 173 | for (let item in this.filterData[data]) { |
183 | var totalMarks = 0; | 174 | var totalMarks = 0; |
184 | for ( | 175 | for ( |
185 | let i = 0; | 176 | let i = 0; |
186 | i < this.filterData[data][item].studentsMarks.length; | 177 | i < this.filterData[data][item].studentsMarks.length; |
187 | i++ | 178 | i++ |
188 | ) { | 179 | ) { |
189 | // console.log("this.filterData[data][item].studentsMarks[i]",this.filterData[data][item].studentsMarks[i] | 180 | // console.log("this.filterData[data][item].studentsMarks[i]",this.filterData[data][item].studentsMarks[i] |
190 | // .marksScored) | 181 | // .marksScored) |
191 | totalMarks += this.filterData[data][item].studentsMarks[i] | 182 | totalMarks += this.filterData[data][item].studentsMarks[i] |
192 | .marksScored; | 183 | .marksScored; |
193 | } | 184 | } |
194 | this.filterData[data][item].totalMarks = totalMarks; | 185 | this.filterData[data][item].totalMarks = totalMarks; |
195 | 186 | ||
196 | if (totalMarks > 90) { | 187 | if (totalMarks > 90) { |
197 | this.filterData[data][item].grade = this.gradeAPlus; | 188 | this.filterData[data][item].grade = this.gradeAPlus; |
198 | } else if (totalMarks > 80 && totalMarks < 90) { | 189 | } else if (totalMarks > 80 && totalMarks < 90) { |
199 | this.filterData[data][item].grade = this.gradeA; | 190 | this.filterData[data][item].grade = this.gradeA; |
200 | } else if (totalMarks > 70 && totalMarks < 80) { | 191 | } else if (totalMarks > 70 && totalMarks < 80) { |
201 | this.filterData[data][item].grade = this.gradeBPlus; | 192 | this.filterData[data][item].grade = this.gradeBPlus; |
202 | } else if (totalMarks > 60 && totalMarks < 70) { | 193 | } else if (totalMarks > 60 && totalMarks < 70) { |
203 | this.filterData[data][item].grade = this.gradeB; | 194 | this.filterData[data][item].grade = this.gradeB; |
204 | } else if (totalMarks > 50 && totalMarks < 60) { | 195 | } else if (totalMarks > 50 && totalMarks < 60) { |
205 | this.filterData[data][item].grade = this.gradeCPlus; | 196 | this.filterData[data][item].grade = this.gradeCPlus; |
206 | } else if (totalMarks > 40 && totalMarks < 50) { | 197 | } else if (totalMarks > 40 && totalMarks < 50) { |
207 | this.filterData[data][item].grade = this.gradeC; | 198 | this.filterData[data][item].grade = this.gradeC; |
208 | } | 199 | } |
209 | } | 200 | } |
210 | } | 201 | } |
211 | this.showLoader = false; | 202 | this.showLoader = false; |
212 | }) | 203 | }) |
213 | .catch(error => { | 204 | .catch(error => { |
214 | this.showLoader = false; | 205 | this.showLoader = false; |
215 | this.snackbar = true; | 206 | this.snackbar = true; |
216 | this.text = error.response.data.message; | 207 | this.text = error.response.data.message; |
217 | if (error.response.status === 401) { | 208 | if (error.response.status === 401) { |
218 | this.$router.replace({ path: "/" }); | 209 | this.$router.replace({ path: "/" }); |
219 | this.$store.dispatch("setToken", null); | 210 | this.$store.dispatch("setToken", null); |
220 | this.$store.dispatch("Id", null); | 211 | this.$store.dispatch("Id", null); |
221 | } | 212 | } |
222 | }); | 213 | }); |
223 | }, | 214 | }, |
224 | print() { | 215 | print() { |
225 | // Pass the element id here | 216 | // Pass the element id here |
226 | this.$htmlToPaper("printMe"); | 217 | this.$htmlToPaper("printMe"); |
227 | }, | 218 | }, |
228 | getUserData() { | 219 | getUserData() { |
229 | http() | 220 | http() |
230 | .get("/getParticularUserDetail") | 221 | .get("/getParticularUserDetail") |
231 | .then(response => { | 222 | .then(response => { |
232 | this.userData = response.data.data; | 223 | this.userData = response.data.data; |
233 | }) | 224 | }) |
234 | .catch(error => { | 225 | .catch(error => { |
235 | // if (error.response.status === 401) { | 226 | // if (error.response.status === 401) { |
236 | // this.$router.replace({ path: "/" }); | 227 | // this.$router.replace({ path: "/" }); |
237 | // this.$store.dispatch("setToken", null); | 228 | // this.$store.dispatch("setToken", null); |
238 | // this.$store.dispatch("Id", null); | 229 | // this.$store.dispatch("Id", null); |
239 | // } | 230 | // } |
240 | }); | 231 | }); |
241 | }, | 232 | }, |
242 | selectMarkData(select) { | 233 | selectMarkData(select) { |
243 | if (select == "Mark") { | 234 | if (select == "Mark") { |
244 | this.showMark = true; | 235 | this.showMark = true; |
245 | this.showGrade = false; | 236 | this.showGrade = false; |
246 | } else if (select == "Grade") { | 237 | } else if (select == "Grade") { |
247 | this.showGrade = true; | 238 | this.showGrade = true; |
248 | this.showMark = false; | 239 | this.showMark = false; |
249 | } | 240 | } |
250 | } | 241 | } |
251 | } | 242 | } |
252 | }; | 243 | }; |
253 | </script> | 244 | </script> |
254 | 245 | ||
255 | <style scoped> | 246 | <style scoped> |
256 | .add-button { | 247 | .add-button { |
257 | background: #feb83c !important; | 248 | background: #feb83c !important; |
258 | border-color: #feb83c !important; | 249 | border-color: #feb83c !important; |
259 | text-transform: none !important; | 250 | text-transform: none !important; |
260 | -webkit-box-shadow: none !important; | 251 | -webkit-box-shadow: none !important; |
261 | box-shadow: none !important; | 252 | box-shadow: none !important; |
262 | } | 253 | } |
263 | .card-styles { | 254 | .card-styles { |
264 | background: #7f62f8 !important; | 255 | background: #7f62f8 !important; |
265 | border-color: #7f62f8 !important; | 256 | border-color: #7f62f8 !important; |
266 | } | 257 | } |
267 | .open-dialog-button { | 258 | .open-dialog-button { |
268 | background: #827bfa !important; | 259 | background: #827bfa !important; |
269 | border-color: #827bfa !important; | 260 | border-color: #827bfa !important; |
270 | text-transform: none !important; | 261 | text-transform: none !important; |
271 | } | 262 | } |
272 | table { | 263 | table { |
273 | border-collapse: collapse; | 264 | border-collapse: collapse; |
274 | border: 1px solid #e2e7eb; | 265 | border: 1px solid #e2e7eb; |
275 | } | 266 | } |
276 | th, | 267 | th, |
277 | td { | 268 | td { |
278 | border: 1px solid #e2e7eb; | 269 | border: 1px solid #e2e7eb; |
279 | text-align: center; | 270 | text-align: center; |
280 | } | 271 | } |
281 | table.feeTypeTable { | 272 | table.feeTypeTable { |
282 | table-layout: auto !important; | 273 | table-layout: auto !important; |
283 | width: 100% !important; | 274 | width: 100% !important; |
284 | } | 275 | } |
285 | .bg-sky { | 276 | .bg-sky { |
286 | background-color: #98b2cc !important; | 277 | background-color: #98b2cc !important; |
287 | } | 278 | } |
288 | .bg-sky-light { | 279 | .bg-sky-light { |
289 | background-color: #89a0b8; | 280 | background-color: #89a0b8; |
290 | } | 281 | } |
291 | .bg-purple { | 282 | .bg-purple { |
292 | background-color: #9583ac; | 283 | background-color: #9583ac; |
293 | } | 284 | } |
294 | .bg-skyDark { | 285 | .bg-skyDark { |
295 | background-color: #956785; | 286 | background-color: #956785; |
296 | } | 287 | } |
297 | .loader { | 288 | .loader { |
298 | width: 100%; | 289 | width: 100%; |
299 | height: 100%; | 290 | height: 100%; |
300 | position: fixed; | 291 | position: fixed; |
301 | top: 0; | 292 | top: 0; |
302 | left: 0; | 293 | left: 0; |
303 | text-align: center; | 294 | text-align: center; |
304 | background-color: rgba(0, 0, 0, 0.5); | 295 | background-color: rgba(0, 0, 0, 0.5); |
305 | z-index: 999; | 296 | z-index: 999; |
306 | } | 297 | } |
307 | 298 | ||
308 | .loader > div { | 299 | .loader > div { |
309 | position: relative; | 300 | position: relative; |
310 | top: calc(50% - 16px); | 301 | top: calc(50% - 16px); |
311 | } | 302 | } |
312 | @media screen and (max-width: 380px) { | 303 | @media screen and (max-width: 380px) { |
313 | .tableRsponsive { | 304 | .tableRsponsive { |
314 | /* display: block; */ | 305 | /* display: block; */ |
315 | position: relative; | 306 | position: relative; |
316 | overflow: scroll; | 307 | overflow: scroll; |
317 | } | 308 | } |
318 | } | 309 | } |
319 | </style> | 310 | </style> |
320 | 311 | ||
321 | 312 | ||
322 | 313 | ||
323 | 314 | ||
324 | 315 | ||
325 | 316 | ||
326 | 317 | ||
327 | 318 | ||
328 | 319 | ||
329 | 320 | ||
330 | 321 | ||
331 | 322 | ||
332 | 323 | ||
333 | 324 | ||
334 | 325 | ||
335 | 326 | ||
336 | 327 | ||
337 | 328 |
src/pages/Report/progressCardReport.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** Progress Card Report Table****** --> | 3 | <!-- ****** Progress Card Report Table****** --> |
4 | <v-card flat class="elevation-0 transparent"> | 4 | <v-card flat class="elevation-0 transparent"> |
5 | <v-form ref="form" v-model="valid" lazy-validation> | 5 | <v-form ref="form" v-model="valid" lazy-validation> |
6 | <v-flex xs12 sm12 lg12> | 6 | <v-flex xs12 sm12 lg12> |
7 | <v-layout wrap> | 7 | <v-layout wrap> |
8 | <v-flex xs12 sm12 lg3> | 8 | <v-flex xs12 sm12 lg3> |
9 | <v-layout> | 9 | <v-layout> |
10 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 10 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
11 | <label class="right">Class:</label> | 11 | <label class="right">Class:</label> |
12 | </v-flex> | 12 | </v-flex> |
13 | <v-flex xs9 sm6 lg8 class="ml-2"> | 13 | <v-flex xs9 sm6 lg8 class="ml-2"> |
14 | <v-select | 14 | <v-select |
15 | v-model="getReport.classId" | 15 | v-model="getReport.classId" |
16 | label="Select your class" | 16 | label="Select your class" |
17 | type="text" | 17 | type="text" |
18 | :items="classList" | 18 | :items="classList" |
19 | item-text="classNum" | 19 | item-text="classNum" |
20 | item-value="_id" | 20 | item-value="_id" |
21 | :rules="classRules" | 21 | :rules="classRules" |
22 | @change="getSections(getReport.classId)" | 22 | @change="getSections(getReport.classId)" |
23 | required | 23 | required |
24 | ></v-select> | 24 | ></v-select> |
25 | </v-flex> | 25 | </v-flex> |
26 | </v-layout> | 26 | </v-layout> |
27 | </v-flex> | 27 | </v-flex> |
28 | <v-flex xs12 sm12 lg3> | 28 | <v-flex xs12 sm12 lg3> |
29 | <v-layout> | 29 | <v-layout> |
30 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 30 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
31 | <label class="right">Section:</label> | 31 | <label class="right">Section:</label> |
32 | </v-flex> | 32 | </v-flex> |
33 | <v-flex xs9 sm6 lg8 class="ml-2"> | 33 | <v-flex xs9 sm6 lg8 class="ml-2"> |
34 | <v-select | 34 | <v-select |
35 | :items="addSection" | 35 | :items="addSection" |
36 | label="Select your Section" | 36 | label="Select your Section" |
37 | v-model="getReport.sectionId" | 37 | v-model="getReport.sectionId" |
38 | item-text="name" | 38 | item-text="name" |
39 | item-value="_id" | 39 | item-value="_id" |
40 | name="Select Section" | 40 | name="Select Section" |
41 | @change="getStudents" | 41 | @change="getStudents" |
42 | :rules="sectionRules" | 42 | :rules="sectionRules" |
43 | required | 43 | required |
44 | ></v-select> | 44 | ></v-select> |
45 | </v-flex> | 45 | </v-flex> |
46 | </v-layout> | 46 | </v-layout> |
47 | </v-flex> | 47 | </v-flex> |
48 | <v-flex xs12 sm12 lg3> | 48 | <v-flex xs12 sm12 lg3> |
49 | <v-layout> | 49 | <v-layout> |
50 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 50 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
51 | <label class="right">Student:</label> | 51 | <label class="right">Student:</label> |
52 | </v-flex> | 52 | </v-flex> |
53 | <v-flex xs9 sm6 lg8 class="ml-2"> | 53 | <v-flex xs9 sm6 lg8 class="ml-2"> |
54 | <v-select | 54 | <v-select |
55 | :items="getStudentsList" | 55 | :items="getStudentsList" |
56 | label="Select your student" | 56 | label="Select your student" |
57 | v-model="getReport.studentId" | 57 | v-model="getReport.studentId" |
58 | item-text="name" | 58 | item-text="name" |
59 | item-value="_id" | 59 | item-value="_id" |
60 | :rules="studentRules" | 60 | :rules="studentRules" |
61 | required | 61 | required |
62 | ></v-select> | 62 | ></v-select> |
63 | </v-flex> | 63 | </v-flex> |
64 | </v-layout> | 64 | </v-layout> |
65 | </v-flex> | 65 | </v-flex> |
66 | <v-flex xs12 sm12 lg3 class="hidden-xs-only hidden-sm-only pl-5"> | 66 | <v-flex xs12 sm12 lg3 class="hidden-xs-only hidden-sm-only pl-5"> |
67 | <v-btn | 67 | <v-btn |
68 | @click="getMarkReportList" | 68 | @click="getMarkReportList" |
69 | round | 69 | round |
70 | dark | 70 | dark |
71 | :loading="loading" | 71 | :loading="loading" |
72 | class="open-dialog-button mt-3 ml-5" | 72 | class="open-dialog-button mt-3 ml-5" |
73 | >Get Report</v-btn> | 73 | >Get Report</v-btn> |
74 | </v-flex> | 74 | </v-flex> |
75 | </v-layout> | 75 | </v-layout> |
76 | </v-flex> | 76 | </v-flex> |
77 | </v-form> | 77 | </v-form> |
78 | </v-card> | 78 | </v-card> |
79 | <v-layout v-show="showReport"> | 79 | <v-layout v-show="showReport"> |
80 | <v-flex xs12> | 80 | <v-flex xs12> |
81 | <v-card class="transparent elevation-0"> | 81 | <v-card class="transparent elevation-0"> |
82 | <v-layout> | 82 | <v-layout> |
83 | <v-flex xs12> | 83 | <v-flex xs12> |
84 | <v-btn class="open-dialog-button right" round dark @click="printProgressReport()"> | 84 | <v-btn class="open-dialog-button right" round dark @click="printProgressReport()"> |
85 | 85 | ||
86 | <v-icon right dark>print</v-icon> | 86 | <v-icon right dark>print</v-icon> |
87 | </v-btn> | 87 | </v-btn> |
88 | </v-flex> | 88 | </v-flex> |
89 | </v-layout> | 89 | </v-layout> |
90 | <v-container grid-list-md v-show="showReport"> | 90 | <v-container grid-list-md v-show="showReport"> |
91 | <v-flex xs12 sm12 id="printMe"> | 91 | <v-flex xs12 sm12 id="printMe"> |
92 | <v-layout wrap> | 92 | <v-layout wrap> |
93 | <!-- ****** TABLE DATA MARK ****** --> | 93 | <!-- ****** TABLE DATA MARK ****** --> |
94 | <v-flex xs12 sm12 md12> | 94 | <v-flex xs12 sm12 md12> |
95 | <v-card | 95 | <v-card |
96 | v-for="(value, id, index) in filterData" | 96 | v-for="(value, id, index) in filterData" |
97 | :key="index" | 97 | :key="index" |
98 | flat | 98 | flat |
99 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" | 99 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" |
100 | > | 100 | > |
101 | <v-layout> | 101 | <v-layout> |
102 | <v-flex xs12 sm12 md12 class="text-xs-center"> | 102 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
103 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | 103 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
104 | <p class="title">{{ userData.name }}</p> | 104 | <p class="title">{{ userData.name }}</p> |
105 | <p>{{ userData.address }}</p> | 105 | <p>{{ userData.address }}</p> |
106 | </v-flex> | 106 | </v-flex> |
107 | <v-flex xs12 sm12 md12 class="text-xs-center"> | 107 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
108 | <v-avatar size="100"> | 108 | <v-avatar size="100"> |
109 | <img :src="value[0].studentId.profilePicUrl" v-if="value[0].studentId.profilePicUrl" width="100px" /> | 109 | <img :src="value[0].studentId.profilePicUrl" v-if="value[0].studentId.profilePicUrl" width="100px" /> |
110 | <img src="/static/icon/user.png" v-else-if="!value[0].studentId.profilePicUrl" width="100px" /> | 110 | <img src="/static/icon/user.png" v-else-if="!value[0].studentId.profilePicUrl" width="100px" /> |
111 | </v-avatar> | 111 | </v-avatar> |
112 | <p | 112 | <p |
113 | style="font-size:20px;margin:0px;margin-bottom:4px;" | 113 | style="font-size:20px;margin:0px;margin-bottom:4px;" |
114 | >{{ value[0].studentId.name }}</p> | 114 | >{{ value[0].studentId.name }}</p> |
115 | <p | 115 | <p |
116 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" | 116 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
117 | >Class : {{ value[0].classId.classNum }}</p> | 117 | >Class : {{ value[0].classId.classNum }}</p> |
118 | <p | 118 | <p |
119 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" | 119 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
120 | >Roll NO : {{ value[0].studentId.rollNo }}</p> | 120 | >Section : {{ value[0].sectionId.name }}</p> |
121 | <p | 121 | <p |
122 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" | 122 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
123 | >Section : {{ value[0].sectionId.name }}</p> | 123 | >Roll NO : {{ value[0].studentId.rollNo }}</p> |
124 | </v-flex> | 124 | </v-flex> |
125 | </v-layout> | 125 | </v-layout> |
126 | <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> | 126 | <!-- <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> --> |
127 | <table | 127 | <table |
128 | class="mb-5 tableRsponsive feeTypeTable" | 128 | class="mb-5 tableRsponsive feeTypeTable" |
129 | style="border: 1px solid lightgrey; | 129 | style="border: 1px solid lightgrey; |
130 | border-collapse: collapse;!important | 130 | border-collapse: collapse;!important |
131 | table-layout: auto !important; | 131 | table-layout: auto !important; |
132 | width: 100% !important; | 132 | width: 100% !important; |
133 | overflow: hidden; | 133 | overflow: hidden;" |
134 | display: block;" | ||
135 | > | 134 | > |
136 | <thead style="border: 1px solid lightgrey !important;"> | 135 | <thead style="border: 1px solid lightgrey !important;"> |
137 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 136 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
138 | <td | 137 | <td |
139 | rowspan="2" | 138 | rowspan="2" |
140 | style="border: 1px solid lightgrey !important;padding: 10px;" | 139 | style="border: 1px solid lightgrey !important;padding: 10px;" |
141 | >Subject</td> | 140 | >Subject</td> |
142 | <td | 141 | <td |
143 | v-for="(exam,i) in value[index].studentsMarks" | 142 | v-for="(exam,i) in value[index].studentsMarks" |
144 | colspan="2" | 143 | colspan="2" |
145 | style="border: 1px solid lightgrey !important;padding: 10px;" | 144 | style="border: 1px solid lightgrey !important;padding: 10px;" |
146 | >{{ exam.markDistributionId.distributionType }}</td> | 145 | >{{ exam.markDistributionId.distributionType }}</td> |
147 | <template v-for="studentData in value"> | 146 | <!-- <template v-for="studentData in value"> |
148 | <td | 147 | <td |
149 | colspan="2" | 148 | colspan="2" |
150 | v-for="studentMark in studentData.studentsMarks" | 149 | v-for="studentMark in studentData.studentsMarks" |
151 | >{{ studentMark.markDistributionId.distributionType }}</td> | 150 | >{{ studentMark.markDistributionId.distributionType }}</td> |
152 | </template> | 151 | </template> --> |
153 | <td>{{value[0].studentsMarks[1].markDistributionId.distributionType}}</td> | 152 | <!-- <td>{{value[0].studentsMarks[1].markDistributionId.distributionType}}</td> --> |
154 | 153 | ||
155 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> | 154 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> |
156 | </tr> | 155 | </tr> |
157 | <tr | 156 | <tr |
158 | v-for="(subject, ind) in value" | 157 | v-for="(subject, ind) in value" |
159 | v-if="ind == 0" | 158 | v-if="ind == 0" |
160 | style="border: 1px solid lightgrey !important;" | 159 | style="border: 1px solid lightgrey !important;" |
161 | > | 160 | > |
162 | <template v-for="(exam, i) in subject.studentsMarks"> | 161 | <template v-for="(exam, i) in subject.studentsMarks"> |
163 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 162 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
164 | <td | 163 | <td |
165 | style="border: 1px solid lightgrey !important;padding: 10px;" | 164 | style="border: 1px solid lightgrey !important;padding: 10px;" |
166 | >Highest Mark</td> | 165 | >Highest Mark</td> |
167 | </template> | 166 | </template> |
168 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 167 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
169 | </tr> | 168 | </tr> |
170 | </thead> | 169 | </thead> |
171 | <tbody style="border: 1px solid lightgrey !important;"> | 170 | <tbody style="border: 1px solid lightgrey !important;"> |
172 | <tr | 171 | <tr |
173 | v-for="subject in value" | 172 | v-for="subject in value" |
174 | style="border: 1px solid lightgrey !important;" | 173 | style="border: 1px solid lightgrey !important;" |
175 | > | 174 | > |
176 | <td | 175 | <td |
177 | style="border: 1px solid lightgrey !important;padding: 10px;" | 176 | style="border: 1px solid lightgrey !important;padding: 10px;" |
178 | >{{subject.subjectName}}</td> | 177 | >{{subject.subjectName}}</td> |
179 | <template v-for="(exam, i) in subject.studentsMarks"> | 178 | <template v-for="(exam, i) in subject.studentsMarks"> |
180 | <td | 179 | <td |
181 | style="border: 1px solid lightgrey !important;padding: 10px;" | 180 | style="border: 1px solid lightgrey !important;padding: 10px;" |
182 | >{{exam.marksScored}}</td> | 181 | >{{exam.marksScored}}</td> |
183 | <td | 182 | <td |
184 | style="border: 1px solid lightgrey !important;padding: 10px;" | 183 | style="border: 1px solid lightgrey !important;padding: 10px;" |
185 | >{{exam.markDistributionId.markValue}}</td> | 184 | >{{exam.markDistributionId.markValue}}</td> |
186 | </template> | 185 | </template> |
187 | <td | 186 | <td |
188 | style="border: 1px solid lightgrey !important;padding: 10px;" | 187 | style="border: 1px solid lightgrey !important;padding: 10px;" |
189 | >{{subject.totalMarks}}</td> | 188 | >{{subject.totalMarks}}</td> |
190 | </tr> | 189 | </tr> |
191 | </tbody> | 190 | </tbody> |
192 | <!-- <tfoot> | 191 | <!-- <tfoot> |
193 | <tr> | 192 | <tr> |
194 | <td colspan="4"> | 193 | <td colspan="4"> |
195 | <span class="right subheding">Total Amount (RS) :</span> | 194 | <span class="right subheding">Total Amount (RS) :</span> |
196 | </td> | 195 | </td> |
197 | <td>{{ feeType.subTotal }}</td> | 196 | <td>{{ feeType.subTotal }}</td> |
198 | </tr> | 197 | </tr> |
199 | <tr> | 198 | <tr> |
200 | <td colspan="4"> | 199 | <td colspan="4"> |
201 | <span class="right subheding">Paid (RS) :</span> | 200 | <span class="right subheding">Paid (RS) :</span> |
202 | </td> | 201 | </td> |
203 | <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td> | 202 | <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td> |
204 | </tr> | 203 | </tr> |
205 | <tr> | 204 | <tr> |
206 | <td colspan="4"> | 205 | <td colspan="4"> |
207 | <span class="right subheding">Balance (RS) :</span> | 206 | <span class="right subheding">Balance (RS) :</span> |
208 | </td> | 207 | </td> |
209 | <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td> | 208 | <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td> |
210 | </tr> | 209 | </tr> |
211 | </tfoot>--> | 210 | </tfoot>--> |
212 | </table> | 211 | </table> |
213 | </v-card> | 212 | </v-card> |
214 | </v-flex> | 213 | </v-flex> |
215 | </v-layout> | 214 | </v-layout> |
216 | </v-flex> | 215 | </v-flex> |
217 | </v-container> | 216 | </v-container> |
218 | </v-card> | 217 | </v-card> |
219 | </v-flex> | 218 | </v-flex> |
220 | </v-layout> | 219 | </v-layout> |
221 | <div class="loader" v-if="showLoader"> | 220 | <div class="loader" v-if="showLoader"> |
222 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 221 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
223 | </div> | 222 | </div> |
224 | </v-container> | 223 | </v-container> |
225 | </template> | 224 | </template> |
226 | 225 | ||
227 | <script> | 226 | <script> |
228 | import http from "@/Services/http.js"; | 227 | import http from "@/Services/http.js"; |
229 | import moment from "moment"; | 228 | import moment from "moment"; |
230 | import _ from "underscore"; | 229 | import _ from "underscore"; |
231 | 230 | ||
232 | export default { | 231 | export default { |
233 | data: () => ({ | 232 | data: () => ({ |
234 | showLoader: false, | 233 | showLoader: false, |
235 | markData: [], | 234 | markData: [], |
236 | token: "", | 235 | token: "", |
237 | markDistributions: [], | 236 | markDistributions: [], |
238 | markParticularDistributionData: [], | 237 | markParticularDistributionData: [], |
239 | loading: false, | 238 | loading: false, |
240 | valid: true, | 239 | valid: true, |
241 | loading: false, | 240 | loading: false, |
242 | showReport: false, | 241 | showReport: false, |
243 | addSection: [], | 242 | addSection: [], |
244 | filterData: [], | 243 | filterData: [], |
245 | getStudentsList: [], | 244 | getStudentsList: [], |
246 | classRules: [v => !!v || "Class is required"], | 245 | classRules: [v => !!v || "Class is required"], |
247 | sectionRules: [v => !!v || "Class is required"], | 246 | sectionRules: [v => !!v || "Class is required"], |
248 | studentRules: [v => !!v || "Student is required"], | 247 | studentRules: [v => !!v || "Student is required"], |
249 | getReport: {}, | 248 | getReport: {}, |
250 | classList: [], | 249 | classList: [], |
251 | output: null, | 250 | output: null, |
252 | userData: {} | 251 | userData: {} |
253 | }), | 252 | }), |
254 | mounted() { | 253 | mounted() { |
255 | this.token = this.$store.state.token; | 254 | this.token = this.$store.state.token; |
256 | this.getClass(); | 255 | this.getClass(); |
257 | this.getUserData(); | 256 | this.getUserData(); |
258 | }, | 257 | }, |
259 | methods: { | 258 | methods: { |
260 | clear() { | 259 | clear() { |
261 | this.$refs.form.reset(); | 260 | this.$refs.form.reset(); |
262 | }, | 261 | }, |
263 | getClass() { | 262 | getClass() { |
264 | this.showLoader = true; | 263 | this.showLoader = true; |
265 | http() | 264 | http() |
266 | .get("/getClassesList", { | 265 | .get("/getClassesList", { |
267 | headers: { Authorization: "Bearer " + this.token } | 266 | headers: { Authorization: "Bearer " + this.token } |
268 | }) | 267 | }) |
269 | .then(response => { | 268 | .then(response => { |
270 | this.classList = response.data.data; | 269 | this.classList = response.data.data; |
271 | this.showLoader = false; | 270 | this.showLoader = false; |
272 | }) | 271 | }) |
273 | .catch(error => { | 272 | .catch(error => { |
274 | this.showLoader = false; | 273 | this.showLoader = false; |
275 | // console.log("err====>", err); | 274 | // console.log("err====>", err); |
276 | }); | 275 | }); |
277 | }, | 276 | }, |
278 | getSections(_id) { | 277 | getSections(_id) { |
279 | this.showLoader = true; | 278 | this.showLoader = true; |
280 | http() | 279 | http() |
281 | .get( | 280 | .get( |
282 | "/getSectionsList", | 281 | "/getSectionsList", |
283 | { params: { classId: _id } }, | 282 | { params: { classId: _id } }, |
284 | { | 283 | { |
285 | headers: { Authorization: "Bearer " + this.token } | 284 | headers: { Authorization: "Bearer " + this.token } |
286 | } | 285 | } |
287 | ) | 286 | ) |
288 | .then(response => { | 287 | .then(response => { |
289 | this.addSection = response.data.data; | 288 | this.addSection = response.data.data; |
290 | this.showLoader = false; | 289 | this.showLoader = false; |
291 | }) | 290 | }) |
292 | .catch(err => { | 291 | .catch(err => { |
293 | this.showLoader = false; | 292 | this.showLoader = false; |
294 | // console.log("err====>", err); | 293 | // console.log("err====>", err); |
295 | }); | 294 | }); |
296 | }, | 295 | }, |
297 | getStudents() { | 296 | getStudents() { |
298 | this.showLoader = true; | 297 | this.showLoader = true; |
299 | http() | 298 | http() |
300 | .get("/getStudentWithClass", { | 299 | .get("/getStudentWithClass", { |
301 | params: { | 300 | params: { |
302 | classId: this.getReport.classId, | 301 | classId: this.getReport.classId, |
303 | sectionId: this.getReport.sectionId | 302 | sectionId: this.getReport.sectionId |
304 | } | 303 | } |
305 | }) | 304 | }) |
306 | .then(response => { | 305 | .then(response => { |
307 | this.getStudentsList = response.data.data; | 306 | this.getStudentsList = response.data.data; |
308 | this.showLoader = false; | 307 | this.showLoader = false; |
309 | // console.log("getSectionsList=====>", response.data.data); | 308 | // console.log("getSectionsList=====>", response.data.data); |
310 | }) | 309 | }) |
311 | .catch(error => { | 310 | .catch(error => { |
312 | console.log("err====>", error); | 311 | console.log("err====>", error); |
313 | this.showLoader = false; | 312 | this.showLoader = false; |
314 | }); | 313 | }); |
315 | }, | 314 | }, |
316 | getMarkReportList() { | 315 | getMarkReportList() { |
317 | // this.showLoader = true; | 316 | // this.showLoader = true; |
318 | this.showReport = true; | 317 | this.showReport = true; |
319 | http() | 318 | http() |
320 | .get("/getParticularMark", { | 319 | .get("/getParticularMark", { |
321 | params: { studentId: this.getReport.studentId }, | 320 | params: { studentId: this.getReport.studentId }, |
322 | headers: { Authorization: "Bearer " + this.token } | 321 | headers: { Authorization: "Bearer " + this.token } |
323 | }) | 322 | }) |
324 | .then(response => { | 323 | .then(response => { |
325 | this.showLoader = false; | 324 | this.showLoader = false; |
326 | let newData = response.data.data; | 325 | let newData = response.data.data; |
327 | // console.log("response", newData); | 326 | // console.log("response", newData); |
328 | for (var i = 0; i < newData.length; i++) { | 327 | for (var i = 0; i < newData.length; i++) { |
329 | newData[i].examination = newData[i].examId._id; | 328 | newData[i].examination = newData[i].examId._id; |
330 | // console.log("newData[i].examination", newData[i].examination); | 329 | // console.log("newData[i].examination", newData[i].examination); |
331 | } | 330 | } |
332 | this.filterData = _.groupBy(newData, ["examination"]); | 331 | this.filterData = _.groupBy(newData, ["examination"]); |
333 | for (let data in this.filterData) { | 332 | for (let data in this.filterData) { |
334 | // console.log("data+++++++++++++++++++++++++++++++++++", data); | 333 | // console.log("data+++++++++++++++++++++++++++++++++++", data); |
335 | 334 | ||
336 | for (let item in this.filterData[data]) { | 335 | for (let item in this.filterData[data]) { |
337 | // console.log( | 336 | // console.log( |
338 | // "filterData[data]==========================>", | 337 | // "filterData[data]==========================>", |
339 | // this.filterData[data] | 338 | // this.filterData[data] |
340 | // ); | 339 | // ); |
341 | // console.log("filterData[item]==========================>", item); | 340 | // console.log("filterData[item]==========================>", item); |
342 | var totalMarks = 0; | 341 | var totalMarks = 0; |
343 | for ( | 342 | for ( |
344 | let i = 0; | 343 | let i = 0; |
345 | i < this.filterData[data][item].studentsMarks.length; | 344 | i < this.filterData[data][item].studentsMarks.length; |
346 | i++ | 345 | i++ |
347 | ) { | 346 | ) { |
348 | totalMarks += this.filterData[data][item].studentsMarks[i] | 347 | totalMarks += this.filterData[data][item].studentsMarks[i] |
349 | .marksScored; | 348 | .marksScored; |
350 | } | 349 | } |
351 | this.filterData[data][item].totalMarks = totalMarks; | 350 | this.filterData[data][item].totalMarks = totalMarks; |
352 | // var total = 0; | 351 | // var total = 0; |
353 | // total += this.filterData[data][item].totalMarks ; | 352 | // total += this.filterData[data][item].totalMarks ; |
354 | // console.log("total", total); | 353 | // console.log("total", total); |
355 | } | 354 | } |
356 | } | 355 | } |
357 | }) | 356 | }) |
358 | .catch(error => { | 357 | .catch(error => { |
359 | // console.log("err====>", err); | 358 | // console.log("err====>", err); |
360 | this.showLoader = false; | 359 | this.showLoader = false; |
361 | this.snackbar = true; | 360 | this.snackbar = true; |
362 | this.text = error.response.data.message; | 361 | this.text = error.response.data.message; |
363 | if (error.response.status === 401) { | 362 | if (error.response.status === 401) { |
364 | this.$router.replace({ path: "/" }); | 363 | this.$router.replace({ path: "/" }); |
365 | this.$store.dispatch("setToken", null); | 364 | this.$store.dispatch("setToken", null); |
366 | this.$store.dispatch("Id", null); | 365 | this.$store.dispatch("Id", null); |
367 | } | 366 | } |
368 | }); | 367 | }); |
369 | }, | 368 | }, |
370 | printProgressReport() { | 369 | printProgressReport() { |
371 | // Pass the element id here | 370 | // Pass the element id here |
372 | this.$htmlToPaper("printMe"); | 371 | this.$htmlToPaper("printMe"); |
373 | }, | 372 | }, |
374 | getUserData() { | 373 | getUserData() { |
375 | http() | 374 | http() |
376 | .get("/getParticularUserDetail") | 375 | .get("/getParticularUserDetail") |
377 | .then(response => { | 376 | .then(response => { |
378 | this.userData = response.data.data; | 377 | this.userData = response.data.data; |
379 | }) | 378 | }) |
380 | .catch(error => { | 379 | .catch(error => { |
381 | // if (error.response.status === 401) { | 380 | // if (error.response.status === 401) { |
382 | // this.$router.replace({ path: "/" }); | 381 | // this.$router.replace({ path: "/" }); |
383 | // this.$store.dispatch("setToken", null); | 382 | // this.$store.dispatch("setToken", null); |
384 | // this.$store.dispatch("Id", null); | 383 | // this.$store.dispatch("Id", null); |
385 | // } | 384 | // } |
386 | }); | 385 | }); |
387 | } | 386 | } |
388 | } | 387 | } |
389 | }; | 388 | }; |
390 | </script> | 389 | </script> |
391 | 390 | ||
392 | <style scoped> | 391 | <style scoped> |
393 | table { | 392 | table { |
394 | border-collapse: collapse; | 393 | border-collapse: collapse; |
395 | border: 1px solid #e2e7eb; | 394 | border: 1px solid #e2e7eb; |
396 | } | 395 | } |
397 | 396 | ||
398 | th, | 397 | th, |
399 | td { | 398 | td { |
400 | border: 1px solid #e2e7eb; | 399 | border: 1px solid #e2e7eb; |
401 | padding: 10px; | 400 | padding: 10px; |
402 | text-align: center; | 401 | text-align: center; |
403 | } | 402 | } |
404 | table.feeTypeTable { | 403 | table.feeTypeTable { |
405 | table-layout: auto !important; | 404 | table-layout: auto !important; |
406 | width: 100% !important; | 405 | width: 100% !important; |
407 | } | 406 | } |
408 | .bg-sky { | 407 | .bg-sky { |
409 | background-color: #98b2cc !important; | 408 | background-color: #98b2cc !important; |
410 | } | 409 | } |
411 | .bg-sky-light { | 410 | .bg-sky-light { |
412 | background-color: #89a0b8; | 411 | background-color: #89a0b8; |
413 | } | 412 | } |
414 | .bg-purple { | 413 | .bg-purple { |
415 | background-color: #9583ac; | 414 | background-color: #9583ac; |
416 | } | 415 | } |
417 | .bg-skyDark { | 416 | .bg-skyDark { |
418 | background-color: #956785; | 417 | background-color: #956785; |
419 | } | 418 | } |
420 | @media screen and (max-width: 380px) { | 419 | @media screen and (max-width: 380px) { |
421 | .tableRsponsive { | 420 | .tableRsponsive { |
422 | /* display: block; */ | 421 | /* display: block; */ |
423 | position: relative; | 422 | position: relative; |
424 | overflow: scroll; | 423 | overflow: scroll; |
425 | } | 424 | } |
426 | } | 425 | } |
427 | </style> s | 426 | </style> s |
src/pages/Report/studentReport.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** Student Report TABLE****** --> | 3 | <!-- ****** Student Report TABLE****** --> |
4 | <v-card flat class="elevation-0 transparent"> | 4 | <v-card flat class="elevation-0 transparent"> |
5 | <v-form ref="form" v-model="valid" lazy-validation> | 5 | <v-form ref="form" v-model="valid" lazy-validation> |
6 | <v-flex xs12 sm12 lg12> | 6 | <v-flex xs12 sm12 lg12> |
7 | <v-layout wrap> | 7 | <v-layout wrap> |
8 | <v-flex xs12 sm12 lg4> | 8 | <v-flex xs12 sm12 lg4> |
9 | <v-layout> | 9 | <v-layout> |
10 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> | 10 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> |
11 | <label class="right">Report For :</label> | 11 | <label class="right">Report For :</label> |
12 | </v-flex> | 12 | </v-flex> |
13 | <v-flex xs7 sm6 lg8 class="ml-2"> | 13 | <v-flex xs7 sm6 lg8 class="ml-2"> |
14 | <v-autocomplete | 14 | <v-autocomplete |
15 | v-model="report.form" | 15 | v-model="report.form" |
16 | label="Select your report for" | 16 | label="Select your report for" |
17 | :items="formList" | 17 | :items="formList" |
18 | item-text="name" | 18 | item-text="name" |
19 | item-value="value" | 19 | item-value="value" |
20 | @change="getReport(report.form)" | 20 | @change="getReport(report.form)" |
21 | :rules="formRules" | 21 | :rules="formRules" |
22 | required | 22 | required |
23 | ></v-autocomplete> | 23 | ></v-autocomplete> |
24 | </v-flex> | 24 | </v-flex> |
25 | </v-layout> | 25 | </v-layout> |
26 | </v-flex> | 26 | </v-flex> |
27 | <v-flex xs12 sm12 lg4 v-if="bloodGroup"> | 27 | <v-flex xs12 sm12 lg4 v-if="bloodGroup"> |
28 | <v-layout> | 28 | <v-layout> |
29 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 29 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
30 | <label class="right">Blood Group :</label> | 30 | <label class="right">Blood Group :</label> |
31 | </v-flex> | 31 | </v-flex> |
32 | <v-flex xs7 sm6 lg8 class="ml-2"> | 32 | <v-flex xs7 sm6 lg8 class="ml-2"> |
33 | <v-autocomplete | 33 | <v-autocomplete |
34 | v-model="report.bloodGroup" | 34 | v-model="report.bloodGroup" |
35 | label="Select your Blood Group " | 35 | label="Select your Blood Group " |
36 | :items="bloodGroupList" | 36 | :items="bloodGroupList" |
37 | :rules="bloodGroupRules" | 37 | :rules="bloodGroupRules" |
38 | required | 38 | required |
39 | ></v-autocomplete> | 39 | ></v-autocomplete> |
40 | </v-flex> | 40 | </v-flex> |
41 | </v-layout> | 41 | </v-layout> |
42 | </v-flex> | 42 | </v-flex> |
43 | <v-flex xs12 sm12 lg4 v-if="genderShow"> | 43 | <v-flex xs12 sm12 lg4 v-if="genderShow"> |
44 | <v-layout> | 44 | <v-layout> |
45 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 45 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
46 | <label class="right">Gender:</label> | 46 | <label class="right">Gender:</label> |
47 | </v-flex> | 47 | </v-flex> |
48 | <v-flex xs7 sm6 lg8 class="ml-2"> | 48 | <v-flex xs7 sm6 lg8 class="ml-2"> |
49 | <v-autocomplete | 49 | <v-autocomplete |
50 | v-model="report.gender" | 50 | v-model="report.gender" |
51 | label="Select your gender " | 51 | label="Select your gender " |
52 | :items="gender" | 52 | :items="gender" |
53 | :rules="genderRules" | 53 | :rules="genderRules" |
54 | required | 54 | required |
55 | ></v-autocomplete> | 55 | ></v-autocomplete> |
56 | </v-flex> | 56 | </v-flex> |
57 | </v-layout> | 57 | </v-layout> |
58 | </v-flex> | 58 | </v-flex> |
59 | <v-flex xs12 sm12 lg4 v-if="TransportShow"> | 59 | <v-flex xs12 sm12 lg4 v-if="TransportShow"> |
60 | <v-layout> | 60 | <v-layout> |
61 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 61 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
62 | <label class="right">Route:</label> | 62 | <label class="right">Route:</label> |
63 | </v-flex> | 63 | </v-flex> |
64 | <v-flex xs7 sm6 lg8 class="ml-2"> | 64 | <v-flex xs7 sm6 lg8 class="ml-2"> |
65 | <v-autocomplete | 65 | <v-autocomplete |
66 | v-model="report.route" | 66 | v-model="report.route" |
67 | label="Select your gender " | 67 | label="Select your gender " |
68 | :items="route" | 68 | :items="route" |
69 | :rules="routeRules" | 69 | :rules="routeRules" |
70 | required | 70 | required |
71 | ></v-autocomplete> | 71 | ></v-autocomplete> |
72 | </v-flex> | 72 | </v-flex> |
73 | </v-layout> | 73 | </v-layout> |
74 | </v-flex> | 74 | </v-flex> |
75 | <v-flex xs12 sm12 lg4 v-if="HostelShow"> | 75 | <v-flex xs12 sm12 lg4 v-if="HostelShow"> |
76 | <v-layout> | 76 | <v-layout> |
77 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 77 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
78 | <label class="right">Hostel:</label> | 78 | <label class="right">Hostel:</label> |
79 | </v-flex> | 79 | </v-flex> |
80 | <v-flex xs7 sm6 lg8 class="ml-2"> | 80 | <v-flex xs7 sm6 lg8 class="ml-2"> |
81 | <v-autocomplete | 81 | <v-autocomplete |
82 | v-model="report.route" | 82 | v-model="report.route" |
83 | label="Select your hostel " | 83 | label="Select your hostel " |
84 | :items="hostelList" | 84 | :items="hostelList" |
85 | :rules="hostelRules" | 85 | :rules="hostelRules" |
86 | required | 86 | required |
87 | ></v-autocomplete> | 87 | ></v-autocomplete> |
88 | </v-flex> | 88 | </v-flex> |
89 | </v-layout> | 89 | </v-layout> |
90 | </v-flex> | 90 | </v-flex> |
91 | <v-flex xs12 sm12 lg4 v-if="countryShow"> | 91 | <v-flex xs12 sm12 lg4 v-if="countryShow"> |
92 | <v-layout> | 92 | <v-layout> |
93 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 93 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
94 | <label class="right">Country :</label> | 94 | <label class="right">Country :</label> |
95 | </v-flex> | 95 | </v-flex> |
96 | <v-flex xs7 sm6 lg8 class="ml-2"> | 96 | <v-flex xs7 sm6 lg8 class="ml-2"> |
97 | <v-autocomplete | 97 | <v-autocomplete |
98 | v-model="report.country" | 98 | v-model="report.country" |
99 | label="Select your Country " | 99 | label="Select your Country " |
100 | :items="countryList" | 100 | :items="countryList" |
101 | :rules="countryRules" | 101 | :rules="countryRules" |
102 | required | 102 | required |
103 | ></v-autocomplete> | 103 | ></v-autocomplete> |
104 | </v-flex> | 104 | </v-flex> |
105 | </v-layout> | 105 | </v-layout> |
106 | </v-flex> | 106 | </v-flex> |
107 | <!-- <v-flex xs12 sm12 lg4 v-show="BirthdayShow"> | 107 | <!-- <v-flex xs12 sm12 lg4 v-show="BirthdayShow"> |
108 | <v-layout> | 108 | <v-layout> |
109 | <v-flex xs3 sm6 lg4 class="subheading mt-4"> | 109 | <v-flex xs3 sm6 lg4 class="subheading mt-4"> |
110 | <label class="right">Country :</label> | 110 | <label class="right">Country :</label> |
111 | </v-flex> | 111 | </v-flex> |
112 | <v-flex xs12 sm12 lg8 class="ml-2"> | 112 | <v-flex xs12 sm12 lg8 class="ml-2"> |
113 | <v-select | 113 | <v-select |
114 | v-model="report.country" | 114 | v-model="report.country" |
115 | label="Select your Country " | 115 | label="Select your Country " |
116 | :items="countryList" | 116 | :items="countryList" |
117 | required | 117 | required |
118 | ></v-select> | 118 | ></v-select> |
119 | </v-flex> | 119 | </v-flex> |
120 | </v-layout> | 120 | </v-layout> |
121 | </v-flex>--> | 121 | </v-flex>--> |
122 | <v-flex xs12 sm12 lg4 v-if="classShow"> | 122 | <v-flex xs12 sm12 lg4 v-if="classShow"> |
123 | <v-layout> | 123 | <v-layout> |
124 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> | 124 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> |
125 | <label class="right">Class:</label> | 125 | <label class="right">Class:</label> |
126 | </v-flex> | 126 | </v-flex> |
127 | <v-flex xs7 sm6 lg8 class="ml-2"> | 127 | <v-flex xs7 sm6 lg8 class="ml-2"> |
128 | <v-autocomplete | 128 | <v-autocomplete |
129 | v-model="report.classId" | 129 | v-model="report.classId" |
130 | label="Select your class" | 130 | label="Select your class" |
131 | type="text" | 131 | type="text" |
132 | :rules="classRules" | 132 | :rules="classRules" |
133 | :items="classList" | 133 | :items="classList" |
134 | item-text="classNum" | 134 | item-text="classNum" |
135 | item-value="_id" | 135 | item-value="_id" |
136 | @change="getSections(report.classId)" | 136 | @change="getSections(report.classId)" |
137 | required | 137 | required |
138 | ></v-autocomplete> | 138 | ></v-autocomplete> |
139 | </v-flex> | 139 | </v-flex> |
140 | </v-layout> | 140 | </v-layout> |
141 | </v-flex> | 141 | </v-flex> |
142 | <v-flex xs12 sm12 lg4 v-if="sectionShow"> | 142 | <v-flex xs12 sm12 lg4 v-if="sectionShow"> |
143 | <v-layout> | 143 | <v-layout> |
144 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> | 144 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> |
145 | <label class="right">Section:</label> | 145 | <label class="right">Section:</label> |
146 | </v-flex> | 146 | </v-flex> |
147 | <v-flex xs7 sm6 lg8 class="ml-2"> | 147 | <v-flex xs7 sm6 lg8 class="ml-2"> |
148 | <v-autocomplete | 148 | <v-autocomplete |
149 | :items="addSection" | 149 | :items="addSection" |
150 | label="Select your Section" | 150 | label="Select your Section" |
151 | v-model="report.sectionId" | 151 | v-model="report.sectionId" |
152 | :rules="sectionRules" | 152 | :rules="sectionRules" |
153 | item-text="name" | 153 | item-text="name" |
154 | item-value="_id" | 154 | item-value="_id" |
155 | name="Select Section" | 155 | name="Select Section" |
156 | required | 156 | required |
157 | ></v-autocomplete> | 157 | ></v-autocomplete> |
158 | </v-flex> | 158 | </v-flex> |
159 | </v-layout> | 159 | </v-layout> |
160 | </v-flex> | 160 | </v-flex> |
161 | <v-flex xs12 sm12 lg4 class="hidden-xs-only hidden-sm-only pl-5"> | 161 | <v-flex xs12 sm12 lg4 class="hidden-xs-only hidden-sm-only pl-5"> |
162 | <v-btn | 162 | <v-btn |
163 | @click="getStudents" | 163 | @click="getStudents" |
164 | round | 164 | round |
165 | dark | 165 | dark |
166 | :loading="loading" | 166 | :loading="loading" |
167 | class="open-dialog-button mt-3 ml-5" | 167 | class="open-dialog-button mt-3 ml-5" |
168 | >Get Report</v-btn> | 168 | >Get Report</v-btn> |
169 | </v-flex> | 169 | </v-flex> |
170 | <v-flex xs12 sm12 lg4 class="hidden-lg-only hidden-md-only hidden-xl-only"> | 170 | <v-flex xs12 sm12 lg4 class="hidden-lg-only hidden-md-only hidden-xl-only"> |
171 | <v-btn | 171 | <v-btn |
172 | @click="getStudents" | 172 | @click="getStudents" |
173 | round | 173 | round |
174 | dark | 174 | dark |
175 | :loading="loading" | 175 | :loading="loading" |
176 | class="mt-3 right" | 176 | class="mt-3 right" |
177 | >Get Report</v-btn> | 177 | >Get Report</v-btn> |
178 | </v-flex> | 178 | </v-flex> |
179 | </v-layout> | 179 | </v-layout> |
180 | </v-flex> | 180 | </v-flex> |
181 | </v-form> | 181 | </v-form> |
182 | </v-card> | 182 | </v-card> |
183 | <v-layout v-show="showTable"> | 183 | <v-layout v-show="showTable"> |
184 | <v-flex xs12> | 184 | <v-flex xs12> |
185 | <v-card class="transparent elevation-0"> | 185 | <v-card class="transparent elevation-0"> |
186 | <v-layout> | 186 | <v-layout> |
187 | <v-flex xs12> | 187 | <v-flex xs12> |
188 | <v-btn class="open-dialog-button right" round dark @click="printStudentReport()"> | 188 | <v-btn class="open-dialog-button right" round dark @click="printStudentReport()"> |
189 | 189 | ||
190 | <v-icon right dark>print</v-icon> | 190 | <v-icon right dark>print</v-icon> |
191 | </v-btn> | 191 | </v-btn> |
192 | </v-flex> | 192 | </v-flex> |
193 | </v-layout> | 193 | </v-layout> |
194 | <v-layout> | 194 | <v-layout> |
195 | <v-flex xs12 sm12 md12 class="text-xs-center"> | 195 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
196 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | 196 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
197 | <p class="title">{{ userData.name }}</p> | 197 | <p class="title">{{ userData.name }}</p> |
198 | <p>{{ userData.address }}</p> | 198 | <p>{{ userData.address }}</p> |
199 | </v-flex> | 199 | </v-flex> |
200 | <v-flex xs12 sm12 md12 class="text-xs-center"> | 200 | <v-flex xs12 sm12 md12 class="text-xs-center" v-for="(studentReport,i) in getStudentsReportList" :key="i"> |
201 | <v-avatar> | ||
202 | <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" /> | ||
203 | <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" /> | ||
204 | </v-avatar> | ||
205 | <p | ||
206 | style="font-size:20px;margin:0px;margin-bottom:4px;" | ||
207 | >{{ studentReport.name }}</p> | ||
208 | <p | ||
209 | style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;" | ||
210 | > Class : {{ studentReport.classId.classNum }}</p> | ||
211 | <p | ||
212 | style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;" | ||
213 | > Section : {{ studentReport.sectionId.name }}</p> | ||
214 | <p | ||
215 | style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;" | ||
216 | > RollNo : {{ studentReport.rollNo }}</p> | ||
201 | </v-flex> | 217 | </v-flex> |
202 | </v-layout> | 218 | </v-layout> |
203 | <v-data-table | 219 | <v-data-table |
204 | :headers="headers" | 220 | :headers="headers" |
205 | :items="getStudentsReportList" | 221 | :items="getStudentsReportList" |
206 | :pagination.sync="pagination" | 222 | :pagination.sync="pagination" |
207 | :search="search" | 223 | :search="search" |
208 | > | 224 | > |
209 | <template slot="items" slot-scope="props"> | 225 | <template slot="items" slot-scope="props"> |
210 | <tr class="tr"> | 226 | <tr class="tr"> |
211 | <td class="td td-row">{{ props.index + 1}}</td> | 227 | <td class="td td-row">{{ props.index + 1}}</td> |
212 | <td id="td" class="text-xs-center"> | 228 | <td id="td" class="text-xs-center"> |
213 | <v-avatar> | 229 | <v-avatar> |
214 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 230 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
215 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 231 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
216 | </v-avatar> | 232 | </v-avatar> |
217 | </td> | 233 | </td> |
218 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> | 234 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> |
219 | <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> | 235 | <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> |
220 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> | 236 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> |
221 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> | 237 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> |
222 | <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td> | 238 | <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td> |
223 | </tr> | 239 | </tr> |
224 | </template> | 240 | </template> |
225 | <v-alert | 241 | <v-alert |
226 | slot="no-results" | 242 | slot="no-results" |
227 | :value="true" | 243 | :value="true" |
228 | color="error" | 244 | color="error" |
229 | icon="warning" | 245 | icon="warning" |
230 | >Your search for "{{ search }}" found no results.</v-alert> | 246 | >Your search for "{{ search }}" found no results.</v-alert> |
231 | </v-data-table> | 247 | </v-data-table> |
232 | </v-card> | 248 | </v-card> |
233 | <v-flex xs12 id="printMe" v-show="hidePrintStudentReport"> | 249 | <v-flex xs12 id="printMe" v-show="hidePrintStudentReport"> |
234 | <v-layout> | 250 | <v-layout> |
235 | <v-flex xs12 style="text-align:center;margin-bottom:10px"> | 251 | <v-flex xs12 style="text-align:center;margin-bottom:10px"> |
236 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | 252 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
237 | <p class="title">{{ userData.name }}</p> | 253 | <p class="title">{{ userData.name }}</p> |
238 | <p>{{ userData.address }}</p> | 254 | <p>{{ userData.address }}</p> |
239 | </v-flex> | 255 | </v-flex> |
240 | </v-layout> | 256 | </v-layout> |
241 | <table | 257 | <table |
242 | class="mb-5 tableRsponsive feeTypeTable" | 258 | class="mb-5 tableRsponsive feeTypeTable" |
243 | style="border: 1px solid lightgrey; | 259 | style="border: 1px solid lightgrey; |
244 | border-collapse: collapse;!important | 260 | border-collapse: collapse;!important |
245 | table-layout: auto !important; | 261 | table-layout: auto !important; |
246 | width: 100% !important;" | 262 | width: 100% !important;" |
247 | > | 263 | > |
248 | <thead style="border: 1px solid lightgrey !important;"> | 264 | <thead style="border: 1px solid lightgrey !important;"> |
249 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 265 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
250 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Profile Pic</td> | 266 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Profile Pic</td> |
251 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> | 267 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> |
252 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Roll No</td> | 268 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Roll No</td> |
253 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> | 269 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> |
254 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Class</td> | 270 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Class</td> |
255 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Section</td> | 271 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Section</td> |
256 | </tr> | 272 | </tr> |
257 | </thead> | 273 | </thead> |
258 | <tbody style="border: 1px solid lightgrey !important;"> | 274 | <tbody style="border: 1px solid lightgrey !important;"> |
259 | <tr v-for="(studentReport,i) in getStudentsReportList" :key="i"> | 275 | <tr v-for="(studentReport,i) in getStudentsReportList" :key="i"> |
260 | <td style="border: 1px solid lightgrey !important;padding: 6px;"> | 276 | <td style="border: 1px solid lightgrey !important;padding: 6px;"> |
261 | <v-avatar> | 277 | <v-avatar> |
262 | <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" /> | 278 | <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" /> |
263 | <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" /> | 279 | <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" /> |
264 | </v-avatar> | 280 | </v-avatar> |
265 | </td> | 281 | </td> |
266 | <td | 282 | <td |
267 | style="border: 1px solid lightgrey !important;padding: 6px;" | 283 | style="border: 1px solid lightgrey !important;padding: 6px;" |
268 | >{{ studentReport.name }}</td> | 284 | >{{ studentReport.name }}</td> |
269 | <!-- <td | 285 | <!-- <td |
270 | style="border: 1px solid lightgrey !important;padding: 6px;" | 286 | style="border: 1px solid lightgrey !important;padding: 6px;" |
271 | >{{ studentReport.rollNo }}</td>--> | 287 | >{{ studentReport.rollNo }}</td>--> |
272 | <td | 288 | <td |
273 | style="border: 1px solid lightgrey !important;padding: 6px;" | 289 | style="border: 1px solid lightgrey !important;padding: 6px;" |
274 | >{{ studentReport.email }}</td> | 290 | >{{ studentReport.email }}</td> |
275 | <td | 291 | <td |
276 | style="border: 1px solid lightgrey !important;padding: 6px;" | 292 | style="border: 1px solid lightgrey !important;padding: 6px;" |
277 | >{{ studentReport.classId.classNum }}</td> | 293 | >{{ studentReport.classId.classNum }}</td> |
278 | <td | 294 | <td |
279 | style="border: 1px solid lightgrey !important;padding: 6px;" | 295 | style="border: 1px solid lightgrey !important;padding: 6px;" |
280 | >{{ studentReport.sectionId.name }}</td> | 296 | >{{ studentReport.sectionId.name }}</td> |
281 | </tr> | 297 | </tr> |
282 | </tbody> | 298 | </tbody> |
283 | </table> | 299 | </table> |
284 | </v-flex> | 300 | </v-flex> |
285 | </v-flex> | 301 | </v-flex> |
286 | </v-layout> | 302 | </v-layout> |
287 | <div class="loader" v-if="showLoader"> | 303 | <div class="loader" v-if="showLoader"> |
288 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 304 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
289 | </div> | 305 | </div> |
290 | </v-container> | 306 | </v-container> |
291 | </template> | 307 | </template> |
292 | 308 | ||
293 | <script> | 309 | <script> |
294 | import http from "@/Services/http.js"; | 310 | import http from "@/Services/http.js"; |
295 | import countryList from "@/script/country.js"; | 311 | import countryList from "@/script/country.js"; |
296 | 312 | ||
297 | import moment from "moment"; | 313 | import moment from "moment"; |
298 | 314 | ||
299 | export default { | 315 | export default { |
300 | data: () => ({ | 316 | data: () => ({ |
301 | snackbar: false, | 317 | snackbar: false, |
302 | color: "", | 318 | color: "", |
303 | y: "top", | 319 | y: "top", |
304 | x: "right", | 320 | x: "right", |
305 | mode: "", | 321 | mode: "", |
306 | timeout: 10000, | 322 | timeout: 10000, |
307 | text: "", | 323 | text: "", |
308 | loading: false, | 324 | loading: false, |
309 | valid: true, | 325 | valid: true, |
310 | search: "", | 326 | search: "", |
311 | showLoader: false, | 327 | showLoader: false, |
312 | bloodGroup: false, | 328 | bloodGroup: false, |
313 | genderShow: false, | 329 | genderShow: false, |
314 | countryShow: false, | 330 | countryShow: false, |
315 | TransportShow: false, | 331 | TransportShow: false, |
316 | HostelShow: false, | 332 | HostelShow: false, |
317 | BirthdayShow: false, | 333 | BirthdayShow: false, |
318 | sectionShow: false, | 334 | sectionShow: false, |
319 | showTable: false, | 335 | showTable: false, |
320 | classShow: true, | 336 | classShow: true, |
321 | hidePrintStudentReport: false, | 337 | hidePrintStudentReport: false, |
322 | addSection: [], | 338 | addSection: [], |
323 | pagination: { | 339 | pagination: { |
324 | rowsPerPage: 10 | 340 | rowsPerPage: 10 |
325 | }, | 341 | }, |
326 | formRules: [v => !!v || "Form For is required"], | 342 | formRules: [v => !!v || "Form For is required"], |
327 | bloodGroupRules: [v => !!v || "Blood group is required"], | 343 | bloodGroupRules: [v => !!v || "Blood group is required"], |
328 | classRules: [v => !!v || "Class is required"], | 344 | classRules: [v => !!v || "Class is required"], |
329 | sectionRules: [v => !!v || "Class is required"], | 345 | sectionRules: [v => !!v || "Class is required"], |
330 | genderRules: [v => !!v || "Gender is required"], | 346 | genderRules: [v => !!v || "Gender is required"], |
331 | routeRules: [v => !!v || "RouteI is required"], | 347 | routeRules: [v => !!v || "RouteI is required"], |
332 | hostelRules: [v => !!v || "Hostel is required"], | 348 | hostelRules: [v => !!v || "Hostel is required"], |
333 | countryRules: [v => !!v || "Country is required"], | 349 | countryRules: [v => !!v || "Country is required"], |
334 | headers: [ | 350 | headers: [ |
335 | { | 351 | { |
336 | align: "", | 352 | align: "", |
337 | text: "No", | 353 | text: "No", |
338 | sortable: false, | 354 | sortable: false, |
339 | value: "No" | 355 | value: "No" |
340 | }, | 356 | }, |
341 | { | 357 | { |
342 | text: "Profile Pic", | 358 | text: "Profile Pic", |
343 | vaue: "profilePicUrl", | 359 | vaue: "profilePicUrl", |
344 | sortable: false, | 360 | sortable: false, |
345 | align: "center" | 361 | align: "center" |
346 | }, | 362 | }, |
347 | { | 363 | { |
348 | text: "Name", | 364 | text: "Name", |
349 | vaue: "name", | 365 | vaue: "name", |
350 | sortable: false, | 366 | sortable: false, |
351 | align: "center" | 367 | align: "center" |
352 | }, | 368 | }, |
353 | { | 369 | { |
354 | text: "Roll No.", | 370 | text: "Roll No.", |
355 | value: "rollNo", | 371 | value: "rollNo", |
356 | sortable: false, | 372 | sortable: false, |
357 | align: "center" | 373 | align: "center" |
358 | }, | 374 | }, |
359 | { | 375 | { |
360 | text: "Email", | 376 | text: "Email", |
361 | value: "email", | 377 | value: "email", |
362 | sortable: false, | 378 | sortable: false, |
363 | align: "center" | 379 | align: "center" |
364 | }, | 380 | }, |
365 | { | 381 | { |
366 | text: "Class", | 382 | text: "Class", |
367 | value: "classId", | 383 | value: "classId", |
368 | sortable: false, | 384 | sortable: false, |
369 | align: "center" | 385 | align: "center" |
370 | }, | 386 | }, |
371 | { | 387 | { |
372 | text: "Section", | 388 | text: "Section", |
373 | value: "sectionId", | 389 | value: "sectionId", |
374 | sortable: false, | 390 | sortable: false, |
375 | align: "center" | 391 | align: "center" |
376 | } | 392 | } |
377 | ], | 393 | ], |
378 | classList: [], | 394 | classList: [], |
379 | report: {}, | 395 | report: {}, |
380 | userData: {}, | 396 | userData: {}, |
381 | markData: [], | 397 | markData: [], |
382 | formList: [ | 398 | formList: [ |
383 | { | 399 | { |
384 | name: "Blood Group", | 400 | name: "Blood Group", |
385 | value: "bloodGroup" | 401 | value: "bloodGroup" |
386 | }, | 402 | }, |
387 | "Country", | 403 | "Country", |
388 | "Gender", | 404 | "Gender", |
389 | "Transport", | 405 | "Transport", |
390 | "Hostel" | 406 | "Hostel" |
391 | // "Birthday" | 407 | // "Birthday" |
392 | ], | 408 | ], |
393 | bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"], | 409 | bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"], |
394 | gender: ["Male", "female"], | 410 | gender: ["Male", "female"], |
395 | getStudentsReportList: [], | 411 | getStudentsReportList: [], |
396 | studentReort: "", | 412 | studentReort: "", |
397 | countryList: [], | 413 | countryList: [], |
398 | route: [], | 414 | route: [], |
399 | Hostel: [], | 415 | Hostel: [], |
400 | hostelList: [], | 416 | hostelList: [], |
401 | token: "" | 417 | token: "" |
402 | }), | 418 | }), |
403 | methods: { | 419 | methods: { |
404 | clear() { | 420 | clear() { |
405 | this.$refs.form.reset(); | 421 | this.$refs.form.reset(); |
406 | }, | 422 | }, |
407 | getClass() { | 423 | getClass() { |
408 | this.showLoader = true; | 424 | this.showLoader = true; |
409 | http() | 425 | http() |
410 | .get("/getClassesList", { | 426 | .get("/getClassesList", { |
411 | headers: { Authorization: "Bearer " + this.token } | 427 | headers: { Authorization: "Bearer " + this.token } |
412 | }) | 428 | }) |
413 | .then(response => { | 429 | .then(response => { |
414 | this.classList = response.data.data; | 430 | this.classList = response.data.data; |
415 | this.showLoader = false; | 431 | this.showLoader = false; |
416 | }) | 432 | }) |
417 | .catch(err => { | 433 | .catch(err => { |
418 | this.showLoader = false; | 434 | this.showLoader = false; |
419 | if (error.response.status === 401) { | 435 | if (error.response.status === 401) { |
420 | this.$router.replace({ path: "/" }); | 436 | this.$router.replace({ path: "/" }); |
421 | this.$store.dispatch("setToken", null); | 437 | this.$store.dispatch("setToken", null); |
422 | this.$store.dispatch("Id", null); | 438 | this.$store.dispatch("Id", null); |
423 | this.$store.dispatch("Role", null); | 439 | this.$store.dispatch("Role", null); |
424 | } | 440 | } |
425 | }); | 441 | }); |
426 | }, | 442 | }, |
427 | getReport() { | 443 | getReport() { |
428 | if (this.report.form === "bloodGroup") { | 444 | if (this.report.form === "bloodGroup") { |
429 | this.bloodGroup = true; | 445 | this.bloodGroup = true; |
430 | this.genderShow = false; | 446 | this.genderShow = false; |
431 | this.TransportShow = false; | 447 | this.TransportShow = false; |
432 | this.countryShow = false; | 448 | this.countryShow = false; |
433 | this.BirthdayShow = false; | 449 | this.BirthdayShow = false; |
434 | this.HostelShow = false; | 450 | this.HostelShow = false; |
435 | this.classShow = false; | 451 | this.classShow = false; |
436 | this.sectionShow = false; | 452 | this.sectionShow = false; |
437 | } | 453 | } |
438 | if (this.report.form === "Gender") { | 454 | if (this.report.form === "Gender") { |
439 | this.genderShow = true; | 455 | this.genderShow = true; |
440 | this.bloodGroup = false; | 456 | this.bloodGroup = false; |
441 | this.TransportShow = false; | 457 | this.TransportShow = false; |
442 | this.BirthdayShow = false; | 458 | this.BirthdayShow = false; |
443 | this.countryShow = false; | 459 | this.countryShow = false; |
444 | this.HostelShow = false; | 460 | this.HostelShow = false; |
445 | this.classShow = true; | 461 | this.classShow = true; |
446 | } | 462 | } |
447 | if (this.report.form === "Transport") { | 463 | if (this.report.form === "Transport") { |
448 | this.TransportShow = true; | 464 | this.TransportShow = true; |
449 | this.genderShow = false; | 465 | this.genderShow = false; |
450 | this.bloodGroup = false; | 466 | this.bloodGroup = false; |
451 | this.BirthdayShow = false; | 467 | this.BirthdayShow = false; |
452 | this.countryShow = false; | 468 | this.countryShow = false; |
453 | this.HostelShow = false; | 469 | this.HostelShow = false; |
454 | this.classShow = true; | 470 | this.classShow = true; |
455 | } | 471 | } |
456 | if (this.report.form === "Country") { | 472 | if (this.report.form === "Country") { |
457 | this.countryShow = true; | 473 | this.countryShow = true; |
458 | this.TransportShow = false; | 474 | this.TransportShow = false; |
459 | this.genderShow = false; | 475 | this.genderShow = false; |
460 | this.bloodGroup = false; | 476 | this.bloodGroup = false; |
461 | this.BirthdayShow = false; | 477 | this.BirthdayShow = false; |
462 | this.HostelShow = false; | 478 | this.HostelShow = false; |
463 | this.classShow = true; | 479 | this.classShow = true; |
464 | } | 480 | } |
465 | if (this.report.form === "Hostel") { | 481 | if (this.report.form === "Hostel") { |
466 | this.HostelShow = true; | 482 | this.HostelShow = true; |
467 | this.TransportShow = false; | 483 | this.TransportShow = false; |
468 | this.genderShow = false; | 484 | this.genderShow = false; |
469 | this.bloodGroup = false; | 485 | this.bloodGroup = false; |
470 | this.countryShow = false; | 486 | this.countryShow = false; |
471 | this.BirthdayShow = false; | 487 | this.BirthdayShow = false; |
472 | this.classShow = true; | 488 | this.classShow = true; |
473 | } | 489 | } |
474 | if (this.report.form === "Birthday") { | 490 | if (this.report.form === "Birthday") { |
475 | this.BirthdayShow = true; | 491 | this.BirthdayShow = true; |
476 | this.TransportShow = false; | 492 | this.TransportShow = false; |
477 | this.genderShow = false; | 493 | this.genderShow = false; |
478 | this.HostelShow = false; | 494 | this.HostelShow = false; |
479 | this.bloodGroup = false; | 495 | this.bloodGroup = false; |
480 | this.countryShow = false; | 496 | this.countryShow = false; |
481 | this.classShow = true; | 497 | this.classShow = true; |
482 | } | 498 | } |
483 | }, | 499 | }, |
484 | getStudents() { | 500 | getStudents() { |
485 | if (this.$refs.form.validate()) { | 501 | if (this.$refs.form.validate()) { |
486 | this.showLoader = true; | 502 | this.showLoader = true; |
487 | http() | 503 | http() |
488 | .get("/getStudentReport", { | 504 | .get("/getStudentReport", { |
489 | params: { | 505 | params: { |
490 | bloodGroup: this.report.bloodGroup, | 506 | bloodGroup: this.report.bloodGroup, |
491 | country: this.report.country, | 507 | country: this.report.country, |
492 | gender: this.report.gender, | 508 | gender: this.report.gender, |
493 | classId: this.report.classId, | 509 | classId: this.report.classId, |
494 | sectionId: this.report.sectionId | 510 | sectionId: this.report.sectionId |
495 | }, | 511 | }, |
496 | headers: { Authorization: "Bearer " + this.token } | 512 | headers: { Authorization: "Bearer " + this.token } |
497 | }) | 513 | }) |
498 | .then(response => { | 514 | .then(response => { |
499 | this.getStudentsReportList = response.data.data; | 515 | this.getStudentsReportList = response.data.data; |
500 | this.showTable = true; | 516 | this.showTable = true; |
501 | this.showLoader = false; | 517 | this.showLoader = false; |
502 | this.clear(); | 518 | this.clear(); |
503 | // console.log("getSectionsList=====>", response.data.data); | 519 | // console.log("getSectionsList=====>", response.data.data); |
504 | }) | 520 | }) |
505 | .catch(error => { | 521 | .catch(error => { |
506 | console.log("err====>", error); | 522 | console.log("err====>", error); |
507 | this.showLoader = false; | 523 | this.showLoader = false; |
508 | }); | 524 | }); |
509 | } | 525 | } |
510 | }, | 526 | }, |
511 | getSections() { | 527 | getSections() { |
512 | this.sectionShow = true; | 528 | this.sectionShow = true; |
513 | this.showLoader = true; | 529 | this.showLoader = true; |
514 | http() | 530 | http() |
515 | .get( | 531 | .get( |
516 | "/getSectionsList", | 532 | "/getSectionsList", |
517 | { params: { classId: this.report.classId } }, | 533 | { params: { classId: this.report.classId } }, |
518 | { | 534 | { |
519 | headers: { Authorization: "Bearer " + this.token } | 535 | headers: { Authorization: "Bearer " + this.token } |
520 | } | 536 | } |
521 | ) | 537 | ) |
522 | .then(response => { | 538 | .then(response => { |
523 | this.addSection = response.data.data; | 539 | this.addSection = response.data.data; |
524 | this.showLoader = false; | 540 | this.showLoader = false; |
525 | }) | 541 | }) |
526 | .catch(error => { | 542 | .catch(error => { |
527 | console.log("err====>", error); | 543 | console.log("err====>", error); |
528 | this.showLoader = false; | 544 | this.showLoader = false; |
529 | }); | 545 | }); |
530 | }, | 546 | }, |
531 | // getFormList() { | 547 | // getFormList() { |
532 | // this.showLoader = true; | 548 | // this.showLoader = true; |
533 | // http() | 549 | // http() |
534 | // .get("/getExamsList", { | 550 | // .get("/getExamsList", { |
535 | // headers: { Authorization: "Bearer " + this.token } | 551 | // headers: { Authorization: "Bearer " + this.token } |
536 | // }) | 552 | // }) |
537 | // .then(response => { | 553 | // .then(response => { |
538 | // this.formList = response.data.data; | 554 | // this.formList = response.data.data; |
539 | // this.showLoader = false; | 555 | // this.showLoader = false; |
540 | // }) | 556 | // }) |
541 | // .catch(error => { | 557 | // .catch(error => { |
542 | // // console.log("err====>", err); | 558 | // // console.log("err====>", err); |
543 | // this.showLoader = false; | 559 | // this.showLoader = false; |
544 | // this.snackbar = true; | 560 | // this.snackbar = true; |
545 | // this.text = error.response.data.message; | 561 | // this.text = error.response.data.message; |
546 | // if (error.response.status === 401) { | 562 | // if (error.response.status === 401) { |
547 | // this.$router.replace({ path: "/" }); | 563 | // this.$router.replace({ path: "/" }); |
548 | // this.$store.dispatch("setToken", null); | 564 | // this.$store.dispatch("setToken", null); |
549 | // this.$store.dispatch("Id", null); | 565 | // this.$store.dispatch("Id", null); |
550 | // } | 566 | // } |
551 | // }); | 567 | // }); |
552 | // } | 568 | // } |
553 | printStudentReport() { | 569 | printStudentReport() { |
554 | this.$htmlToPaper("printMe"); | 570 | this.$htmlToPaper("printMe"); |
555 | }, | 571 | }, |
556 | getUserData() { | 572 | getUserData() { |
557 | http() | 573 | http() |
558 | .get("/getParticularUserDetail") | 574 | .get("/getParticularUserDetail") |
559 | .then(response => { | 575 | .then(response => { |
560 | this.userData = response.data.data; | 576 | this.userData = response.data.data; |
561 | }) | 577 | }) |
562 | .catch(error => { | 578 | .catch(error => { |
563 | // if (error.response.status === 401) { | 579 | // if (error.response.status === 401) { |
564 | // this.$router.replace({ path: "/" }); | 580 | // this.$router.replace({ path: "/" }); |
565 | // this.$store.dispatch("setToken", null); | 581 | // this.$store.dispatch("setToken", null); |
566 | // this.$store.dispatch("Id", null); | 582 | // this.$store.dispatch("Id", null); |
567 | // } | 583 | // } |
568 | }); | 584 | }); |
569 | } | 585 | } |
570 | }, | 586 | }, |
571 | mounted() { | 587 | mounted() { |
572 | this.token = this.$store.state.token; | 588 | this.token = this.$store.state.token; |
573 | const getCountryList = countryList(); | 589 | const getCountryList = countryList(); |
574 | this.countryList = getCountryList; | 590 | this.countryList = getCountryList; |
575 | this.getUserData(); | 591 | this.getUserData(); |
576 | // console.log("getindustryList", this.countryList); | 592 | // console.log("getindustryList", this.countryList); |
577 | // this.getExamList(); | 593 | // this.getExamList(); |
578 | this.getClass(); | 594 | this.getClass(); |
579 | }, | 595 | }, |
580 | created() { | 596 | created() { |
581 | this.$root.$on("app:search", search => { | 597 | this.$root.$on("app:search", search => { |
582 | this.search = search; | 598 | this.search = search; |
583 | }); | 599 | }); |
584 | }, | 600 | }, |
585 | beforeDestroy() { | 601 | beforeDestroy() { |
586 | // dont forget to remove the listener | 602 | // dont forget to remove the listener |
587 | this.$root.$off("app:search"); | 603 | this.$root.$off("app:search"); |
588 | } | 604 | } |
589 | }; | 605 | }; |
590 | </script> | 606 | </script> |
591 | <style scoped> | 607 | <style scoped> |
592 | .active { | 608 | .active { |
593 | background-color: gray; | 609 | background-color: gray; |
594 | color: white !important; | 610 | color: white !important; |
595 | } | 611 | } |
596 | .activebtn { | 612 | .activebtn { |
597 | color: black !important; | 613 | color: black !important; |
598 | } | 614 | } |
599 | </style>s |