Blame view
src/pages/Report/idCard.vue
37.7 KB
7c435b5bb
|
1 2 3 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 82 83 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 126 127 128 129 130 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 207 208 209 210 211 212 213 214 215 216 217 |
<template> <v-container fluid class="body-color"> <!-- **** Id Card Report Table **** --> <v-card flat class="elevation-0 transparent"> <v-form ref="form" v-model="valid" lazy-validation> <v-flex xs12 sm12 lg12> <v-layout wrap> <v-flex xs12 sm12 lg3> <v-layout> <v-flex xs3 sm6 lg4 class="subheading mt-4"> <label class="right">Id Card For:</label> </v-flex> <v-flex xs7 sm6 lg8 class="ml-2"> <v-autocomplete v-model="getReport.role" label="Please Select" :items="getRoles" item-text="name" item-value="role" :rules="cardRules" @change="getRoleInputs(getReport.role)" required ></v-autocomplete> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg3 v-if="this.showClass"> <v-layout> <v-flex xs3 sm6 lg2 class="subheading mt-4"> <label class="right">Class:</label> </v-flex> <v-flex xs9 sm6 lg8 class="ml-2"> <v-select v-model="getReport.classId" label="Select Class" :items="classList" item-text="classNum" item-value="_id" :rules="classRules" @change="getSections(getReport.classId)" required ></v-select> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg3 v-if="getReport.classId"> <v-layout> <v-flex xs3 sm6 lg2 class="subheading mt-4"> <label class="right">Section:</label> </v-flex> <v-flex xs9 sm6 lg8 class="ml-2"> <v-select :items="addSection" label="Select Section" v-model="getReport.sectionId" item-text="name" item-value="_id" name="Select Section" @change="getStudents" :rules="sectionRules" required ></v-select> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg3 v-if="getReport.sectionId"> <v-layout> <v-flex xs3 sm6 lg2 class="subheading mt-4"> <label class="right">Student:</label> </v-flex> <v-flex xs9 sm6 lg8 class="ml-2"> <v-select :items="getStudentsList" label="Select Student" v-model="getReport._id" item-text="name" item-value="_id" :rules="studentRules" required ></v-select> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg3 v-if="this.showTeacher"> <v-layout> <v-flex xs3 sm6 lg2 class="subheading mt-4"> <label class="right">Teacher:</label> </v-flex> <v-flex xs9 sm6 lg8 class="ml-2"> <v-select v-model="getReport._id" label="Select Teacher" :items="teacherList" item-text="name" item-value="_id" :rules="teacherRules" required ></v-select> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg3 v-if="this.showAdmin"> <v-layout> <v-flex xs3 sm6 lg2 class="subheading mt-4"> <label class="right">Admin:</label> </v-flex> <v-flex xs9 sm6 lg8 class="ml-2"> <v-select v-model="getReport._id" label="Select Admin" :items="userData" item-text="name" item-value="_id" :rules="adminRules" required ></v-select> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg3 v-if="this.showAccountant"> <v-layout> <v-flex xs3 sm6 lg2 class="subheading mt-4"> <label class="right">Accountant:</label> </v-flex> <v-flex xs9 sm6 lg8 class="ml-2"> <v-select v-model="getReport._id" label="Select Accountant" :items="Users" item-text="name" item-value="_id" :rules="accountantRules" required ></v-select> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg3 v-if="this.showLibrarian"> <v-layout> <v-flex xs3 sm6 lg2 class="subheading mt-4"> <label class="right">Librarian:</label> </v-flex> <v-flex xs9 sm6 lg8 class="ml-2"> <v-select v-model="getReport._id" label="Select Librarian" :items="Users" item-text="name" item-value="_id" :rules="librarianRules" required ></v-select> </v-flex> </v-layout> </v-flex> <v-flex xs12 sm12 lg4> <v-layout> <v-flex xs4 sm4 lg3 class="subheading mt-4"> <label class="right">Type:</label> </v-flex> <v-flex xs7 sm6 lg8 class="ml-2"> <v-autocomplete label="Please Select" type="text" :rules="typeRules" :items="typeList" v-model="getReport.form" item-text="name" item-value="value" @change="getReport(getReport.form)" required ></v-autocomplete> </v-flex> </v-layout> </v-flex> <!-- <v-flex xs12 sm12 lg4> <v-layout> <v-flex xs4 sm4 lg3 class="subheading mt-4"> <label class="right">Background:</label> </v-flex> <v-flex xs7 sm6 lg8 class="ml-2"> <v-autocomplete label="Please Select" type="text" :rules="backgroundRules" :items="backgroundList" required ></v-autocomplete> </v-flex> </v-layout> </v-flex>--> <v-flex xs12 sm12 lg4 class="hidden-xs-only hidden-sm-only pl-5"> <v-btn @click="getCards" round dark :loading="loading" class="open-dialog-button mt-3 ml-5" >Get Report</v-btn> </v-flex> </v-layout> </v-flex> </v-form> </v-card> <div v-if="frontPart"> <v-layout v-show="showReport"> <v-flex xs12> <v-card class="transparent elevation-0"> <v-layout> <v-flex xs12> <v-btn class="open-dialog-button right" round dark @click="prindIDCardReport()"> Print <v-icon right dark>print</v-icon> </v-btn> </v-flex> </v-layout> <v-container grid-list-md> |
36883961f
|
218 219 |
<v-layout class="col-sm-12"> <div class="idcardreport"> |
7c435b5bb
|
220 |
<div class="icard-front"> |
37cb39130
|
221 222 |
<img src="/static/icon/shape1.png" alt="shape" class="shape1"/> <img src="/static/logo.png" alt="logo" class="logo"/> |
7c435b5bb
|
223 |
<h2>{{ userData.name }}</h2> |
37cb39130
|
224 225 |
<img :src="getCard.profilePicUrl" v-if="getCard.profilePicUrl" class="icard-img"/> <img src="/static/icon/user.png" v-else-if="!getCard.profilePicUrl" class="icard-img"/> |
7c435b5bb
|
226 |
<div class="Data" v-if="this.getReport.role === 4"> |
37cb39130
|
227 228 |
<h3 style="text-align: center;"> <!-- <span> |
7c435b5bb
|
229 |
<b>Name</b> |
37cb39130
|
230 231 232 |
</span> --> {{ getCard.studentData.name }} </h3> |
7c435b5bb
|
233 234 |
</div> <div class="Data" v-if="this.getReport.role === 4"> |
37cb39130
|
235 236 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
237 |
<b>Class</b> |
37cb39130
|
238 239 |
</span> --> {{ getCard.studentData.classId.classNum }} |
7c435b5bb
|
240 241 242 |
</p> </div> <div class="Data" v-if="this.getReport.role === 4"> |
37cb39130
|
243 244 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
245 |
<b>Section</b> |
37cb39130
|
246 247 |
</span> --> {{ getCard.studentData.sectionId.name }} |
7c435b5bb
|
248 249 250 |
</p> </div> <div class="Data" v-if="this.getReport.role === 4"> |
37cb39130
|
251 252 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
253 |
<b>Roll No</b> |
37cb39130
|
254 255 |
</span> --> {{ getCard.studentData.rollNo }} |
7c435b5bb
|
256 |
</p> |
37cb39130
|
257 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2"/> |
7c435b5bb
|
258 |
</div> |
36883961f
|
259 |
<!-- <div class="Data" v-if="this.getReport.role === 4"> |
7c435b5bb
|
260 261 262 263 264 265 |
<p> <span> <b>Blood Group</b> </span> : {{ getCard.studentData.bloodGroup }} </p> |
36883961f
|
266 |
</div>--> |
7c435b5bb
|
267 |
<div class="Data" v-if="this.getReport.role === 3"> |
37cb39130
|
268 269 |
<h3 style="text-align: center;"> <!-- <span> |
7c435b5bb
|
270 |
<b>Name</b> |
37cb39130
|
271 272 273 |
</span> --> {{ getCard.teachersData.name }} </h3> |
7c435b5bb
|
274 275 |
</div> <div class="Data" v-if="this.getReport.role === 3"> |
37cb39130
|
276 277 |
<p style="text-align: center;"> <!-- <span> |
36883961f
|
278 |
<b>Phone No</b> |
37cb39130
|
279 280 |
</span> --> {{ getCard.teachersData.mobileNo }} |
7c435b5bb
|
281 282 283 |
</p> </div> <div class="Data" v-if="this.getReport.role === 3"> |
37cb39130
|
284 285 |
<p style="text-align: center;"> <!-- <span> |
36883961f
|
286 |
<b>Joining Date</b> |
37cb39130
|
287 288 |
</span> --> {{ getCard.teachersData.joinDate }} |
7c435b5bb
|
289 290 291 |
</p> </div> <div class="Data" v-if="this.getReport.role === 3"> |
37cb39130
|
292 293 |
<p style="text-align: center;"> <!-- <span> |
36883961f
|
294 |
<b>Email</b> |
37cb39130
|
295 296 |
</span> --> {{ getCard.teachersData.email }} |
7c435b5bb
|
297 |
</p> |
37cb39130
|
298 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2"/> |
7c435b5bb
|
299 300 |
</div> <div class="Data" v-if="this.getReport.role === 2"> |
37cb39130
|
301 302 |
<h3 style="text-align: center;"> <!-- <span> |
7c435b5bb
|
303 |
<b>Name</b> |
37cb39130
|
304 305 306 |
</span> --> {{ getCard.adminData.name }} </h3> |
7c435b5bb
|
307 308 |
</div> <div class="Data" v-if="this.getReport.role === 2"> |
37cb39130
|
309 310 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
311 |
<b>Establishment Year</b> |
37cb39130
|
312 313 |
</span> --> {{ getCard.adminData.establishmentYear }} |
7c435b5bb
|
314 315 316 |
</p> </div> <div class="Data" v-if="this.getReport.role === 2"> |
37cb39130
|
317 318 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
319 |
<b>Joining Date</b> |
37cb39130
|
320 321 |
</span> --> {{ getCard.adminData.joinDate }} |
7c435b5bb
|
322 323 324 |
</p> </div> <div class="Data" v-if="this.getReport.role === 2"> |
37cb39130
|
325 326 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
327 |
<b>Phone No</b> |
37cb39130
|
328 329 |
</span> --> {{ getCard.adminData.mobile }} |
7c435b5bb
|
330 331 332 |
</p> </div> <div class="Data" v-if="this.getReport.role === 2"> |
37cb39130
|
333 334 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
335 |
<b>Email</b> |
37cb39130
|
336 337 |
</span> --> {{ getCard.adminData.email }} |
7c435b5bb
|
338 |
</p> |
37cb39130
|
339 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2"/> |
7c435b5bb
|
340 341 |
</div> <div class="Data" v-if="this.getReport.role === 6"> |
37cb39130
|
342 343 |
<h3 style="text-align: center;"> <!-- <span> |
7c435b5bb
|
344 |
<b>Name</b> |
37cb39130
|
345 346 347 |
</span> --> {{ getCard.usersData.name }} </h3> |
7c435b5bb
|
348 349 |
</div> <div class="Data" v-if="this.getReport.role === 6"> |
37cb39130
|
350 351 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
352 |
<b>Email</b> |
37cb39130
|
353 354 |
</span> --> {{ getCard.usersData.email }} |
7c435b5bb
|
355 356 357 |
</p> </div> <div class="Data" v-if="this.getReport.role === 6"> |
37cb39130
|
358 359 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
360 |
<b>Phone No</b> |
37cb39130
|
361 362 |
</span> --> {{ getCard.usersData.phone }} |
7c435b5bb
|
363 364 365 |
</p> </div> <div class="Data" v-if="this.getReport.role === 6"> |
37cb39130
|
366 367 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
368 |
<b>Gender</b> |
37cb39130
|
369 370 |
</span> --> {{ getCard.usersData.gender }} |
7c435b5bb
|
371 372 373 |
</p> </div> <div class="Data" v-if="this.getReport.role === 6"> |
37cb39130
|
374 375 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
376 |
<b>Joining Date</b> |
37cb39130
|
377 378 |
</span> --> {{ getCard.usersData.joiningDate }} |
7c435b5bb
|
379 |
</p> |
37cb39130
|
380 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2"/> |
7c435b5bb
|
381 382 |
</div> <div class="Data" v-if="this.getReport.role === 7"> |
37cb39130
|
383 384 |
<h3 style="text-align: center;"> <!-- <span> |
7c435b5bb
|
385 |
<b>Name</b> |
37cb39130
|
386 387 388 |
</span> --> {{ getCard.usersData.name }} </h3> |
7c435b5bb
|
389 390 |
</div> <div class="Data" v-if="this.getReport.role === 7"> |
37cb39130
|
391 392 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
393 |
<b>Email</b> |
37cb39130
|
394 395 |
</span> --> {{ getCard.usersData.email }} |
7c435b5bb
|
396 397 398 |
</p> </div> <div class="Data" v-if="this.getReport.role === 7"> |
37cb39130
|
399 400 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
401 |
<b>Phone No</b> |
37cb39130
|
402 403 |
</span> --> {{ getCard.usersData.phone }} |
7c435b5bb
|
404 405 406 |
</p> </div> <div class="Data" v-if="this.getReport.role === 7"> |
37cb39130
|
407 408 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
409 |
<b>Gender</b> |
37cb39130
|
410 411 |
</span> --> {{ getCard.usersData.gender }} |
7c435b5bb
|
412 413 414 |
</p> </div> <div class="Data" v-if="this.getReport.role === 7"> |
37cb39130
|
415 416 |
<p style="text-align: center;"> <!-- <span> |
7c435b5bb
|
417 |
<b>Joining Date</b> |
37cb39130
|
418 419 |
</span> --> {{ getCard.usersData.joiningDate }} |
7c435b5bb
|
420 |
</p> |
37cb39130
|
421 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2"/> |
7c435b5bb
|
422 423 |
</div> </div> |
36883961f
|
424 |
</div> |
7c435b5bb
|
425 426 427 428 |
</v-layout> </v-container> </v-card> <v-flex xs12 id="printMe" v-show="hideprintIdCard"> |
cc7844a9d
|
429 |
<!-- <v-layout class="col-sm-12" > --> |
37cb39130
|
430 431 |
<div class="idcardreport"> <div class="print-data"> |
cc7844a9d
|
432 433 434 |
<img src="/static/icon/shape1.png" alt="shape" class="shape1" style="padding-left: 25%;"/> <img src="/static/logo.png" alt="logo" class="logo" style="width: 70px; height: 70px; margin-left: 12%;"/> <h2 style="text-align: center;">{{ userData.name }}</h2> |
37cb39130
|
435 436 437 |
<img :src="getCards.profilePicUrl" v-if="getCards.profilePicUrl" |
cc7844a9d
|
438 439 |
style="margin-top: 31px; margin-left: 45%;" |
37cb39130
|
440 441 442 443 |
/> <img src="/static/icon/user.png" v-else-if="!getCards.profilePicUrl" |
cc7844a9d
|
444 445 |
style="margin-top: 31px; margin-left: 45%;" |
37cb39130
|
446 447 448 449 |
/> <table class="mb-5 tableRsponsive feeTypeTable" style="table-layout: auto !important; |
cc7844a9d
|
450 451 |
width: 100% !important; " |
7c435b5bb
|
452 |
> |
37cb39130
|
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
<!-- <thead style="border: 1px solid lightgrey !important;"> <tr style="border: 1px solid lightgrey !important;padding:4px;" v-if="this.getReport.role === 4" > <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Class</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Section</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Roll No</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Blood Group</td> </tr> <tr style="border: 1px solid lightgrey !important;padding:4px;" v-if="this.getReport.role === 3" > <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Phone No</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Joining Date</td> </tr> <tr style="border: 1px solid lightgrey !important;padding:4px;" v-if="this.getReport.role === 2" > <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> <td style="border: 1px solid lightgrey !important;padding: 6px;" >Establishment Year</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Joining Date</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Phone No</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> </tr> <tr style="border: 1px solid lightgrey !important;padding:4px;" v-if="this.getReport.role === 6" > <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Phone No</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Gender</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Joining Date</td> </tr> <tr style="border: 1px solid lightgrey !important;padding:4px;" v-if="this.getReport.role === 7" > <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Phone No</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Gender</td> <td style="border: 1px solid lightgrey !important;padding: 6px;">Joining Date</td> </tr> </thead> --> <tbody style="border: 1px solid lightgrey !important;"> <tr v-if="this.getReport.role === 4" > <h3 style="text-align: center;">{{ getCard.studentData.name }}</h3> <p style="text-align: center;">{{ getCard.studentData.classId.classNum }}</p> <p style="text-align: center;">{{ getCard.studentData.sectionId.name }}</p> <p style="text-align: center;">{{ getCard.studentData.rollNo }}</p> <p style="text-align: center;">{{ getCard.studentData.bloodGroup }}</p> |
cc7844a9d
|
515 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2" style="padding-left: 75%;"/> |
37cb39130
|
516 517 518 519 520 521 522 523 |
</tr> <tr v-if="this.getReport.role === 3" > <h3 style="text-align: center;">{{ getCard.teachersData.name }}</h3> <p style="text-align: center;">{{ getCard.teachersData.email }}</p> <p style="text-align: center;">{{ getCard.teachersData.mobileNo }}</p> <p style="text-align: center;">{{ getCard.teachersData.joinDate }}</p> |
cc7844a9d
|
524 |
<img src="static/icon/shape2.png" alt="shape2" class="rightside" style="padding-left: 75%;"/> |
37cb39130
|
525 526 527 528 529 530 531 532 533 |
</tr> <tr v-if="this.getReport.role === 2" > <h3 style="text-align: center;">{{ getCard.adminData.name }}</h3> <p style="text-align: center;">{{ getCard.adminData.establishmentYear }}</p> <p style="text-align: center;">{{ getCard.adminData.joinDate }}</p> <p style="text-align: center;">{{ getCard.adminData.mobile }}</p> <p style="text-align: center;">{{ getCard.adminData.email }}</p> |
cc7844a9d
|
534 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2" style="padding-left: 75%;"/> |
37cb39130
|
535 536 537 538 539 540 541 542 543 |
</tr> <tr v-if="this.getReport.role === 6" > <h3 style="text-align: center;">{{ getCard.usersData.name }}</h3> <p style="text-align: center;">{{ getCard.usersData.email }}</p> <p style="text-align: center;">{{ getCard.usersData.phone }}</p> <p style="text-align: center;">{{ getCard.usersData.gender }}</p> <p style="text-align: center;">{{ getCard.usersData.joiningDate }}</p> |
cc7844a9d
|
544 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2" style="padding-left: 75%;"/> |
37cb39130
|
545 546 547 548 549 550 551 552 553 |
</tr> <tr v-if="this.getReport.role === 7" > <h3 style="text-align: center;">{{ getCard.usersData.name }}</h3> <p style="text-align: center;">{{ getCard.usersData.email }}</p> <p style="text-align: center;">{{ getCard.usersData.phone }}</p> <p style="text-align: center;">{{ getCard.usersData.gender }}</p> <p style="text-align: center;">{{ getCard.usersData.joiningDate }}</p> |
cc7844a9d
|
554 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2" style="padding-left: 75%;"/> |
37cb39130
|
555 556 557 558 559 |
</tr> </tbody> </table> </div> </div> |
cc7844a9d
|
560 |
<!-- </v-layout> --> |
7c435b5bb
|
561 562 563 564 |
</v-flex> </v-flex> </v-layout> </div> |
36883961f
|
565 |
<div v-if="backPart" class="col-sm-12"> |
7c435b5bb
|
566 567 |
<v-layout v-show="showReport"> <v-flex xs12> |
36883961f
|
568 569 570 |
<v-card class="transparent elevation-0"> <v-layout> <v-flex xs12> |
37cb39130
|
571 |
<v-btn class="open-dialog-button right" round dark @click="prindIDCardReport()"> |
36883961f
|
572 573 |
Print <v-icon right dark>print</v-icon> |
37cb39130
|
574 |
</v-btn> |
36883961f
|
575 576 |
</v-flex> </v-layout> |
cc7844a9d
|
577 578 |
<div class="icard-data"> <div class="idcardreport"> |
37cb39130
|
579 580 581 582 |
<div class="icard-back"> <img src="/static/icon/shape1.png" alt="shape" class="shape1"/> <img src="/static/logo.png" alt="logo" class="logo" /> <h2>{{userData.name}}</h2> |
cc7844a9d
|
583 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2"/> |
37cb39130
|
584 585 586 587 588 589 |
<div class="school-address"> <p>{{ userData.address }}, {{ userData.pinCode }}</p> </div> <!-- <div class="icard-bottom"> <div class="qrcode"> <img src="/static/icon/qr-code.png" alt="icon" /> |
7c435b5bb
|
590 |
</div> |
37cb39130
|
591 592 |
<div class="session"> <span>Session: 2019-2020</span> |
7c435b5bb
|
593 |
</div> |
37cb39130
|
594 |
</div> --> |
37cb39130
|
595 |
</div> |
cc7844a9d
|
596 |
</div> |
37cb39130
|
597 |
</div> |
36883961f
|
598 |
</v-card> |
cc7844a9d
|
599 600 |
<div class="icard-data" id="printMe" v-show="hidebackprintIdCard"> <div class="idcardreport" style="margin-top: 25%;"> |
37cb39130
|
601 |
<div class="back-icard"> |
cc7844a9d
|
602 603 604 605 |
<img src="/static/icon/shape1.png" alt="shape" class="shape1" style="padding-left: 25%;"/> <img src="/static/logo.png" alt="logo" class="logo" style="width: 50px; height: 50px; margin-left: 12%;"/> <h2 style="text-align: center;">{{ userData.name }}</h2> <div class="address" style="text-align: center;"> |
37cb39130
|
606 607 |
<p>{{ userData.address }}, {{ userData.pinCode }}</p> </div> |
cc7844a9d
|
608 |
<img src="static/icon/shape2.png" alt="shape2" class="shape2" style="padding-left: 75%;"/> |
37cb39130
|
609 |
</div> |
cc7844a9d
|
610 611 |
</div> </div> |
7c435b5bb
|
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 |
</v-flex> </v-layout> </div> </v-container> </template> <script> import http from "@/Services/http.js"; import moment from "moment"; export default { data: () => ({ valid: true, report: {}, userData: {}, loading: false, showReport: false, frontPart: false, backPart: false, showClass: false, showTeacher: false, showAdmin: false, showAccountant: false, showLibrarian: false, hideprintIdCard: false, |
37cb39130
|
638 |
hidebackprintIdCard: false, |
7c435b5bb
|
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
getRoles: [], classList: [], getCard: [], addSection: [], getStudentsList: [], teacherList: [], userData: [], Users: [], cardRules: [v => !!v || "Id-Card Field is required"], classRules: [v => !!v || "Class Field is required"], sectionRules: [v => !!v || "Section Field is required"], studentRules: [v => !!v || "Student Field is required"], teacherRules: [v => !!v || "Teacher Field is required"], adminRules: [v => !!v || "Admin Field is required"], accountantRules: [v => !!v || "Accountant Field is required"], librarianRules: [v => !!v || "Librarian Field is required"], typeRules: [v => !!v || "Type is required"], backgroundRules: [v => !!v || "Background is required"], typeList: [ { name: "Front Part", value: "frontPart" }, { name: "Back Part", value: "backPart" } ], backgroundList: ["Yes", "No"] }), mounted() { this.token = this.$store.state.token; this.getUserData(); this.getRole(); }, methods: { getReport() { if (this.getReport.form === "frontPart") { this.frontPart = true; this.backPart = false; } if (this.getReport.form === "backPart") { this.frontPart = false; this.backPart = true; } }, getRoleInputs(role) { // console.log("role", role); if (role === 4) { // console.log("role", role); this.showClass = true; this.getClass(); } if (role === 3) { this.showTeacher = true; this.getTeacherList(); } if (role === 2) { this.showAdmin = true; this.getUserData(); } if (role === 6) { this.showAccountant = true; this.getUsersList(); } if (role === 7) { this.showLibrarian = true; this.getUsersList(); } }, prindIDCardReport() { // Pass the element id here this.$htmlToPaper("printMe"); }, getUserData() { http() .get("/getParticularUserDetail") .then(response => { this.userData = response.data.data; // this.adminList = response.data.data; }) .catch(error => { // if (error.response.status === 401) { // this.$router.replace({ path: "/" }); // this.$store.dispatch("setToken", null); // this.$store.dispatch("Id", null); // } }); }, getRole() { this.showLoader = true; http() .get("/getRolesList", { headers: { Authorization: "Bearer " + this.token } }) .then(response => { |
36883961f
|
742 743 |
this.getRoles = response.data.data; if (this.getRoles[0].role !== 1) { |
7c435b5bb
|
744 |
this.getRoles = response.data.data; |
36883961f
|
745 746 |
console.log("bdhcbkguvhb", this.getRoles[0].role); } |
7c435b5bb
|
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 |
// this.role = response.data.data; // console.log("this.role", this.role); this.showLoader = false; }) .catch(error => { this.showLoader = false; // if (error.response.status === 401) { // this.$router.replace({ path: "/" }); // this.$store.dispatch("setToken", null); // this.$store.dispatch("Id", null); // this.$store.dispatch("Role", null); // } }); }, getClass() { console.log("get classes"); this.showLoader = true; http() .get("/getClassesList", { headers: { Authorization: "Bearer " + this.token } }) .then(response => { this.classList = response.data.data; this.showLoader = false; }) .catch(error => { this.showLoader = false; // console.log("err====>", err); }); }, getSections(_id) { this.showLoader = true; http() .get( "/getSectionsList", { params: { classId: _id } }, { headers: { Authorization: "Bearer " + this.token } } ) .then(response => { this.addSection = response.data.data; this.showLoader = false; }) .catch(err => { this.showLoader = false; // console.log("err====>", err); }); }, getStudents() { this.showLoader = true; http() .get("/getStudentWithClass", { params: { classId: this.getReport.classId, sectionId: this.getReport.sectionId } }) .then(response => { this.getStudentsList = response.data.data; this.showLoader = false; }) .catch(error => { console.log("err====>", error); this.showLoader = false; }); }, getCards() { http() .get("/getIdCardDetail", { headers: { Authorization: "Bearer " + this.token }, params: { profileId: this.getReport._id, role: this.getReport.role } }) .then(response => { this.getCard = response.data.data; this.showLoader = false; this.showReport = true; }) .catch(error => { this.showLoader = false; }); }, getTeacherList() { this.showLoader = true; var token = this.$store.state.token; http() .get("/getTeachersList", { headers: { Authorization: "Bearer " + token } }) .then(response => { this.teacherList = response.data.data; this.showLoader = false; }) .catch(error => { this.showLoader = false; if (error.response.status === 401) { this.$router.replace({ path: "/" }); this.$store.dispatch("setToken", null); this.$store.dispatch("Id", null); } }); }, getUsersList() { this.showLoader = true; var token = this.$store.state.token; http() .get("/getUsersList", { headers: { Authorization: "Bearer " + token } }) .then(response => { this.Users = response.data.data; this.showLoader = false; }) .catch(error => { this.showLoader = false; if (error.response.status === 401) { this.$router.replace({ path: "/" }); this.$store.dispatch("setToken", null); this.$store.dispatch("Id", null); } }); }, getParentDetails() { http() .get("getParentsList", { headers: { Authorization: "Bearer " + this.$store.state.token } }) .then(response => { this.parentsList = response.data.data; }) .catch(error => { // console.log("err====>", error.response.data.message); this.showLoader = false; if (error.response.status === 401) { this.$router.replace({ path: "/" }); this.$store.dispatch("setToken", null); this.$store.dispatch("Id", null); this.$store.dispatch("Role", null); } }); } } }; </script> <style scoped> .Data { width: 100%; float: left; margin-bottom: 0px; padding: 0 15px; font-size: 14px; margin-top: 5px; text-align: justify; } |
36883961f
|
909 910 911 912 913 914 915 916 |
.idcardreport { font-family: arial; max-width: 794px; max-height: 1123px; margin-left: auto; margin-right: auto; -webkit-print-color-adjust: exact; } |
cc7844a9d
|
917 918 919 920 |
.idcardreport1 { text-align: center; margin-left: 35%; } |
7c435b5bb
|
921 922 |
.icard-front { margin: 3px; |
36883961f
|
923 |
float: left; |
37cb39130
|
924 925 926 927 928 929 930 931 932 933 |
/* border: 1px solid #000; */ padding: 10px; /* width: 55%; */ text-align: center; height: 95%; } .print-data { margin: 3px; float: left; /* border: 1px solid #000; */ |
7c435b5bb
|
934 |
padding: 10px; |
37cb39130
|
935 |
/* width: 55%; */ |
7c435b5bb
|
936 |
text-align: center; |
37cb39130
|
937 938 939 940 941 942 943 |
height: 95%; } .shape1 { float: left; } .shape2 { float: right; |
7c435b5bb
|
944 |
} |
cc7844a9d
|
945 946 947 |
.rightside { float: right !important; } |
36883961f
|
948 |
.icard-front h2 { |
37cb39130
|
949 950 951 952 953 954 955 956 957 958 959 960 961 |
font-size: 30px; } .icard-back h2 { font-size: 30px; } .print-data h2 { font-size: 30px; text-align: center; } .print-data img { width: 70px; height: 70px; margin-bottom: 5px; |
7c435b5bb
|
962 963 |
} .icard-front img { |
37cb39130
|
964 965 966 967 968 969 970 971 972 973 |
width: 70px; height: 70px; margin-bottom: 5px; } .icard-back img { width: 50px; height: 50px; margin-bottom: 5px; } .icard-img { |
7c435b5bb
|
974 975 976 |
width: 50px; height: 50px; margin-bottom: 5px; |
37cb39130
|
977 978 |
margin-top: 5px; border: 1px solid #ddd; |
7c435b5bb
|
979 980 |
} .icard-data { |
36883961f
|
981 |
/* font-family: Arial; */ |
7c435b5bb
|
982 983 984 985 986 987 988 989 |
max-width: 794px; max-height: 1123px; margin-left: auto; margin-right: auto; -webkit-print-color-adjust: exact; } .icard-back { margin: 3px; |
37cb39130
|
990 991 992 993 994 995 996 997 998 999 |
/* float: left; */ /* border: 1px solid #000; */ padding: 10px; /* width: 55%; */ text-align: center; /* height: 95%; */ /* margin-top: 35%; */ } .back-icard { margin: 3px; |
7c435b5bb
|
1000 |
padding: 10px; |
7c435b5bb
|
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 |
} .icard-back h3 { background-color: #000; color: #fff; font-size: 13px; padding: 5px 0px; margin: 5px; margin-top: 13px; } .icard-back h5 { font-size: 11px; color: #000; font-weight: bold; padding: 5px 0px; } |
37cb39130
|
1016 |
/* .icard-back p { |
7c435b5bb
|
1017 1018 1019 1020 |
font-size: 15px; color: #000; font-weight: 500px; line-height: 17px; |
37cb39130
|
1021 |
} */ |
7c435b5bb
|
1022 1023 1024 1025 1026 |
.school-address { /* width: 40%; */ font-weight: 500px; color: #000; } |
cc7844a9d
|
1027 1028 1029 1030 1031 |
.address { font-weight: 500px; color: #000; text-align: center; } |
7c435b5bb
|
1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 |
.icard-bottom { padding-top: 5px; text-align: center; } .qrcode { float: left; width: 50%; } .qrcode img { width: 60px; height: 60px; |
37cb39130
|
1043 |
margin-top: 15px; |
7c435b5bb
|
1044 1045 1046 1047 |
} .session { float: right; width: 70%; |
37cb39130
|
1048 |
margin-top: 15px; |
7c435b5bb
|
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 |
} @media screen and (max-width: 360px) { .icard-front { width: 316px; height: 418px; float: inherit; } .icard-back { float: left; } } </style> |