Initial import
This commit is contained in:
@@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<!-- <v-subheader>
|
||||
<h3 class="title">DAFTAR PASIEN</h3>
|
||||
</v-subheader> -->
|
||||
<hr style="border-top:0px solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="pxs"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pt-2 pb-2 pr-2 green--text" v-bind:class="[margin_left(props.item), validation_color(props.item)]"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'N'" colspan="7">
|
||||
{{ props.item.t_testname }}
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pt-2 pb-2 pr-2 green--text" v-bind:class="[margin_left(props.item), validation_color(props.item)]"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
{{ props.item.t_testname }}
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="[is_selected(props.item), validation_color(props.item)]"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'" style="position: relative">
|
||||
<v-textarea
|
||||
label=""
|
||||
solo
|
||||
rows=1
|
||||
hide-details
|
||||
v-on:keyup="update_result(props.index, $event.target.value)"
|
||||
:value="props.item.result"
|
||||
flat
|
||||
readonly
|
||||
></v-textarea>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="[is_selected(props.item), validation_color(props.item)]"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="[is_selected(props.item), validation_color(props.item)]"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
-
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="[is_selected(props.item), validation_color(props.item)]"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
-
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pa-2" v-bind:class="[is_selected(props.item), validation_color(props.item)]"
|
||||
@click="select(props.index, props.item)" v-if="props.item.is_result == 'Y'">
|
||||
<v-textarea
|
||||
label=""
|
||||
solo
|
||||
rows=1
|
||||
hide-details
|
||||
v-on:keyup="update_note(props.index, $event.target.value)"
|
||||
:value="props.item.note"
|
||||
flat
|
||||
readonly
|
||||
></v-textarea>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-center pa-1" v-if="props.item.is_result == 'Y'" v-bind:class="[validation_color(props.item)]" @click="select(props.index, props.item)">
|
||||
<div class="text-xs-center">
|
||||
<div class="text-xs-center">
|
||||
<v-checkbox label="__" :input-value="validation(props.item)" false-value="N" true-value="Y" @change="validation_change($event, props.index)" class="mt-1 mr-1 ml-0 mb-0 cb-auto-ver" hide-details
|
||||
:disabled="props.item.validation_old=='Y'"
|
||||
></v-checkbox>
|
||||
|
||||
<!-- <v-btn fab
|
||||
:dark="props.item.sample_handling_perfect == 'Y'"
|
||||
:disabled="props.item.sample_handling_perfect != 'Y'"
|
||||
small color="lighten-2" class="ma-0" v-bind:class="props.item.mr_state == 'N' ? 'red' : 'green'" @click="mr(props.item.id)">
|
||||
MR
|
||||
</v-btn> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="text-xs-center pa-1" v-if="props.item.is_result == 'Y'" v-bind:class="[validation_color(props.item)]">
|
||||
<div class="text-xs-center">
|
||||
<div class="text-xs-center">
|
||||
<!-- <v-checkbox label="" :input-value="validation(props.item)" value="Y" false-value="N" @change="validation_change($event, props.index)" class="mt-1 mr-1 ml-0 mb-0 cb-auto-ver"></v-checkbox> -->
|
||||
|
||||
<v-btn fab
|
||||
:dark="props.item.sample_handling_perfect == 'Y'"
|
||||
small :color="delta_color(props.item) + ' lighten-2'" class="ma-0" @click="select(props.index, props.item); mr(props.item.id)">
|
||||
MR
|
||||
</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
|
||||
<one-process-re-rerun-result></one-process-re-rerun-result>
|
||||
<one-process-re-history></one-process-re-history>
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:timeout="5000"
|
||||
bottom right
|
||||
>
|
||||
{{ save_text }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
flat
|
||||
@click="snackbar = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
|
||||
<v-snackbar
|
||||
v-model="snackbar_err"
|
||||
:timeout="5000"
|
||||
bottom right
|
||||
color="red"
|
||||
>
|
||||
{{ err_text }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
flat
|
||||
@click="snackbar_err = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
|
||||
<one-process-rv-dialog-trend></one-process-rv-dialog-trend>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
/* table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
} */
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.btn_rerun {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 2px
|
||||
}
|
||||
|
||||
.v-btn--floating {
|
||||
border-radius: 0%;
|
||||
}
|
||||
|
||||
/* .cb-auto-ver {
|
||||
float: left;
|
||||
} */
|
||||
|
||||
.cb-auto-ver .v-icon {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.cb-auto-ver label {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.v-btn--floating.v-btn--small {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.v-input--selection-controls__ripple {
|
||||
position: relative !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-process-re-rerun-result': httpVueLoader('./oneProcessReRerunResult.vue'),
|
||||
'one-process-re-history': httpVueLoader('./oneProcessReHistory.vue'),
|
||||
'one-process-rv-dialog-trend': httpVueLoader('./oneProcessRvDialogTrend.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
save_text: "Data berhasil dikonfirmasi.",
|
||||
err_text: "Tidak ada data yang perlu dikonfirmasi !",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HASIL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "FLAG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NILAI NORMAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "UNIT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "CATATAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "VALIDASI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MR",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (idx, item) {
|
||||
this.$store.commit('re_px/update_selected_px', item)
|
||||
this.$store.commit('re_px/update_selected_px_idx', idx)
|
||||
// this.$store.commit('ver_validation/update_selected_sent_sample', item)
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
margin_left (item) {
|
||||
if (item.level == 3 || item.level == 2)
|
||||
return 'pl-5'
|
||||
|
||||
return 'pl-2'
|
||||
},
|
||||
|
||||
rerun_me () {
|
||||
this.$store.commit('re_px/update_dialog_rerun', true)
|
||||
},
|
||||
|
||||
update_result(idx, result) {
|
||||
|
||||
let x = this.$store.state.re_px.pxs
|
||||
x[idx]['result'] = result
|
||||
|
||||
this.$store.commit('re_px/update_pxs', {records:x})
|
||||
},
|
||||
|
||||
update_note(idx, note) {
|
||||
|
||||
let x = this.$store.state.re_px.pxs
|
||||
x[idx]['note'] = note
|
||||
|
||||
this.$store.commit('re_px/update_pxs', {records:x})
|
||||
},
|
||||
|
||||
validation(i) {
|
||||
if (i.validation == "N" || i.validation == "Y")
|
||||
return i.validation
|
||||
|
||||
if (i.sample_handling_perfect != "Y")
|
||||
return "N"
|
||||
|
||||
if (i.mr_state == "N")
|
||||
return "N"
|
||||
|
||||
return "Y"
|
||||
},
|
||||
|
||||
validation_change(e, idx) {
|
||||
|
||||
if (e == null) e = "N"
|
||||
let x = this.$store.state.re_px.pxs
|
||||
x[idx].validation = e
|
||||
|
||||
this.$store.commit("re_px/update_pxs", {records:x})
|
||||
},
|
||||
|
||||
mr(x) {
|
||||
this.$store.dispatch('re_px/mr_state')
|
||||
this.$store.commit('re_px/update_dialog_trend', true)
|
||||
},
|
||||
|
||||
validation_color(i) {
|
||||
if (i.validation_old == "Y")
|
||||
return "green lighten-4"
|
||||
|
||||
return""
|
||||
},
|
||||
|
||||
delta_color(x) {
|
||||
if (x.sample_handling_perfect == "N")
|
||||
return "grey"
|
||||
|
||||
if (x.mr_state == "N")
|
||||
return "red"
|
||||
|
||||
return "green"
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
pxs () {
|
||||
return this.$store.state.re_px.pxs
|
||||
},
|
||||
|
||||
icon_info () {
|
||||
return window.BASE_URL + '/one-ui/apps/image/info.png'
|
||||
},
|
||||
|
||||
snackbar : {
|
||||
get () { return this.$store.state.re_px.snackbar },
|
||||
set (v) { this.$store.commit('re_px/update_snackbar', v) }
|
||||
},
|
||||
|
||||
snackbar_err : {
|
||||
get () { return this.$store.state.re_px.snackbar_err },
|
||||
set (v) { this.$store.commit('re_px/update_snackbar_err', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
// this.$store.dispatch('re_patient/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user