· 6 years ago · Sep 14, 2019, 12:20 AM
1<template>
2 <div style="display:contents;width: 100%">
3 <tr>
4 <td>{{ (item || {}).index }}</td>
5 <td :colspan="7">{{ (item || {}).name }}</td>
6 <td>{{ ((item || {}).satuan || {}).name }}</td>
7 <td class="text-xs-center">
8 <v-switch color="primary" :title="(item || {}).pusat == 1 ? 'Aktif' : 'Tidak Aktif'" :input-value="(item || {}).pusat" style="top:10px;position:relative;" />
9 </td>
10 <td class="text-xs-center">
11 <v-switch color="primary" :title="(item || {}).province == 1 ? 'Aktif' : 'Tidak Aktif'" :input-value="(item || {}).province" style="top:10px;position:relative;" />
12 </td>
13 <td class="text-xs-center">
14 <v-switch color="primary" :title="(item || {}).regencies == 1 ? 'Aktif' : 'Tidak Aktif'" :input-value="(item || {}).regencies" style="top:10px;position:relative;" />
15 </td>
16 </tr>
17
18 <tr v-if="(item.children || [])[0]" v-for="(ch, i) in (item.children || [])" :key="i">
19 <td>{{ (ch || {}).index }}</td>
20 <td :colspan="7">{{ (ch || {}).name }}</td>
21 <td>{{ ((ch || {}).satuan || {}).name }}</td>
22 <td class="text-xs-center">
23 <v-switch color="primary" :title="(ch || {}).pusat == 1 ? 'Aktif' : 'Tidak Aktif'" :input-value="(ch || {}).pusat" style="top:10px;position:relative;" />
24 </td>
25 <td class="text-xs-center">
26 <v-switch color="primary" :title="(ch || {}).province == 1 ? 'Aktif' : 'Tidak Aktif'" :input-value="(ch || {}).province" style="top:10px;position:relative;" />
27 </td>
28 <td class="text-xs-center">
29 <v-switch color="primary" :title="(item || {}).regencies == 1 ? 'Aktif' : 'Tidak Aktif'" :input-value="(ch || {}).regencies" style="top:10px;position:relative;" />
30 </td>
31 <tr/>
32
33 <tr v-if="((ch || {}).children || [])[0]" v-for="(child, i) in ((ch || {}).children || [])" :key="i">
34 <td colspan="100">
35 <TableChild v-if="((ch || {}).children || [])[0]" :item="((ch || {}).children || [])" v-for="(child, idx) in ((ch || {}).children || [])" :key="idx" />
36 </td>
37 <tr/>
38 </div>
39</template>
40
41<style scoped>
42.outine-2 {
43 border: 2px solid white;
44}
45.card--flex-toolbar {
46 margin-top: -104px;
47}
48.learn-more-btn {
49 text-transform: initial;
50 text-decoration: underline;
51}
52.mytable {
53 border-top: solid 1px #ccc;
54}
55
56.mytable thead tr {
57 height: 35px !important;
58}
59
60.mytable tbody tr td{
61 padding: 0 15px !important;
62
63}
64
65.mytable th {
66 padding: 5px !important;
67 border-right: solid 1px #ccc;
68}
69
70.mytable tbody td {
71 border-right: solid 1px #ccc;
72}
73</style>
74<script>
75import api from 'lib/api'
76import auth from 'lib/auth'
77import i18n from 'lib/i18n'
78import TableChild from 'lib/TableChild'
79
80export default {
81 props : ['item', 'counter'],
82 components : { TableChild },
83
84 data(){
85 return {}
86 },
87
88 methods: {
89
90 },
91
92 watitem: {
93
94 },
95}
96</script>