Files
FE_CPONE/test/vuex/pasien01/components/patientSearchResult.vue
2026-04-27 10:13:31 +07:00

92 lines
4.6 KiB
Vue

<template>
<v-card class="xs12 md12 mt-2" >
<v-data-table :headers="headers" :items="patients"
:loading="isLoading"
hide-actions class="elevation-1">
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.mr }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.name }}</td>
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.hp }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.dob }}</td>
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.address }}</td>
</template>
</v-data-table>
</v-card>
</template>
<style scoped>
table.v-table tbody td,table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
</style>
<script>
module.exports = {
data() {
return {
query: "",
headers: [
{
text: "NO RM",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NAMA",
align: "left",
sortable: false,
value: "name",
width: "25%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "HP",
align: "left",
sortable: false,
value: "hp",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "DOB",
align: "left",
sortable: false,
value: "dob",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "ALAMAT",
align: "left",
sortable: false,
value: "address",
class: "pa-2 blue lighten-3 white--text"
}
],
isLoading: true,
patients: [
{"hp":"08985945837", "mr": "MR-18107237", "name": "Pasien Umum", "sex": "Perempuan", "address": "Klero\r\nKabupaten Semarang", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107238", "name": "Heri Suryawan", "sex": "Laki - laki", "address": "Ampel", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107239", "name": "LUKA MODRIC", "sex": "Laki - laki", "address": "Jl. Raya No 1", "action":"", "dob":"19-09-1992", "selected":true},
{"hp":"08985945837", "mr": "MR-18107247", "name": "Tyas Medika Pranandita", "sex": "Laki - laki", "address": "KP. Karangpanas", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107248", "name": "Astrid", "sex": "Perempuan", "address": "Jl. Ketintang Raya No.81", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107249", "name": "Happy", "sex": "Perempuan", "address": "Karangpanas", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107251", "name": "Juan Alexis Sukir", "sex": "Laki - laki", "address": "Jl. Sawi", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107252", "name": "Alexander Wang", "sex": "Laki - laki", "address": "Jl. Mangga Muda No. 7", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107253", "name": "CILA CILANI", "sex": "Perempuan", "address": "Jl. Duren PInang No. 67", "action":"", "dob":"19-09-1992", "selected":false},
{"hp":"08985945837", "mr": "MR-18107254", "name": "Untung Suropati", "sex": "Laki - laki", "address": "Pasar Kapling Semarang", "action":"", "dob":"19-09-1992", "selected":false}
]
};
}
}
</script>