96 lines
2.8 KiB
Vue
96 lines
2.8 KiB
Vue
<template>
|
|
<v-card class="xs12 md12 mt-2" flat>
|
|
<!-- <v-card-title primary-title class="pt-1 pb-1 pl-2 pr-2">
|
|
<div>
|
|
<h3 class="headline mb-0">Histori Pasien</h3>
|
|
</div>
|
|
</v-card-title> -->
|
|
|
|
<v-card-text class="pt-1 pb-1 pl-2 pr-2">
|
|
<v-data-table :headers="headers" :items="histories"
|
|
hide-actions class="elevation-1">
|
|
<template slot="items" slot-scope="props">
|
|
<td class="text-xs-left pa-2" >{{ format_date(props.item.T_OrderHeaderDate) }}</td>
|
|
<td class="text-xs-left pa-2" >{{ props.item.T_OrderHeaderLabNumber}}</td>
|
|
<td class="pa-2" >{{ props.item.T_TestName }}</td>
|
|
<td class="text-xs-right pa-1">
|
|
<v-btn color="primary" dark small class="one-btn-icon ma-0" @click="getMe(props.item.T_OrderHeaderID)">
|
|
<v-icon small>save_alt</v-icon>
|
|
</v-btn>
|
|
</td>
|
|
</template>
|
|
|
|
</v-data-table>
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
</template>
|
|
|
|
<style scoped>
|
|
table.v-table tbody td,table.v-table tbody th {
|
|
height: 40px;
|
|
}
|
|
|
|
table.v-table thead tr {
|
|
height: 40px;
|
|
}
|
|
|
|
.one-btn-icon { font-size: 1.5em; float: right }
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
computed : {
|
|
histories(){
|
|
return this.$store.state.history.histories
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
headers: [
|
|
{
|
|
text: "TANGGAL",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "20%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "NO. LAB",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "20%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "PEMERIKSAAN",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "50%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "USE",
|
|
align: "right",
|
|
sortable: false,
|
|
width: "10%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
}
|
|
]
|
|
};
|
|
},
|
|
|
|
methods : {
|
|
format_date(d) {
|
|
return d.substr(0, 10).split('-').reverse().join('-')
|
|
},
|
|
|
|
getMe(id) {
|
|
this.$store.dispatch('px/search_pxs', id)
|
|
}
|
|
}
|
|
}
|
|
</script>
|