Feat: List Patient
This commit is contained in:
166
list-patient/components/barcodeDialog.vue
Normal file
166
list-patient/components/barcodeDialog.vue
Normal file
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<v-dialog v-model="menuBarcode" width="900">
|
||||
<v-card>
|
||||
<v-card-item class="bg-primary py-3 elevation-6">
|
||||
<v-card-title>
|
||||
{{ $t("message.barcode.title") }}
|
||||
</v-card-title>
|
||||
</v-card-item>
|
||||
<v-card-text class="pt-5">
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="printItem"
|
||||
hide-default-footer
|
||||
height="200"
|
||||
>
|
||||
<template v-slot:headers="{ columns }">
|
||||
<tr>
|
||||
<template v-for="column in columns" :key="column.key">
|
||||
<td
|
||||
:class="[
|
||||
'bg-primary-lighten',
|
||||
column.class,
|
||||
{ 'd-flex justify-center': column.key === 'checkbox' },
|
||||
]"
|
||||
:style="{ minWidth: column.width, textAlign: column.align }"
|
||||
>
|
||||
<template v-if="column.key === 'checkbox'">
|
||||
<v-checkbox
|
||||
v-model="allSelected"
|
||||
color="primary"
|
||||
:indeterminate="someSelected"
|
||||
@update:modelValue="selectAll(!allSelected)"
|
||||
></v-checkbox>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>{{ column.title }}</span>
|
||||
</template>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-slot:item="{ item }">
|
||||
<tr>
|
||||
<td class="d-flex justify-center">
|
||||
<v-checkbox
|
||||
v-model="selected"
|
||||
color="primary"
|
||||
:value="item"
|
||||
@update:modelValue="onSomeSelected()"
|
||||
></v-checkbox>
|
||||
</td>
|
||||
<td>
|
||||
<p class="font-weight-medium">{{ item.specimen }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class="font-weight-medium">{{ item.barcode }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class="w-100 d-flex justify-center cursor-pointer">
|
||||
<iconify-icon
|
||||
style="font-size: 1.5rem; color: #00bcd4"
|
||||
icon="fluent:print-48-regular"
|
||||
></iconify-icon>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions class="d-flex justify-space-between px-7">
|
||||
<v-btn
|
||||
:text="$t('message.barcode.close')"
|
||||
variant="text"
|
||||
class="text-error"
|
||||
@click="onCloseMenuBarcode()"
|
||||
></v-btn>
|
||||
<div>
|
||||
<v-btn
|
||||
:text="$t('message.barcode.printRobo')"
|
||||
variant="flat"
|
||||
class="bg-info text-white"
|
||||
@click="onCloseMenuBarcode()"
|
||||
></v-btn>
|
||||
<v-btn
|
||||
:text="$t('message.barcode.printSelected')"
|
||||
variant="flat"
|
||||
class="bg-secondary-darken text-white"
|
||||
@click="onCloseMenuBarcode()"
|
||||
></v-btn>
|
||||
</div>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "BarcodeDialog",
|
||||
data() {
|
||||
return {
|
||||
selected: [],
|
||||
allSelected: false,
|
||||
someSelected: false,
|
||||
headers: [
|
||||
{
|
||||
title: "",
|
||||
key: "checkbox",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.barcode.specimen"),
|
||||
key: "specimen",
|
||||
align: "start",
|
||||
sortable: false,
|
||||
width: "30%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.barcode.barcode"),
|
||||
key: "barcode",
|
||||
align: "start",
|
||||
sortable: false,
|
||||
width: "30%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.barcode.action"),
|
||||
key: "action",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "30%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
menuBarcode() {
|
||||
return this.$store.state.collection.menuBarcode;
|
||||
},
|
||||
printItem() {
|
||||
return this.$store.state.collection.printItem;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onCloseMenuBarcode() {
|
||||
this.$store.commit("setMenuBarcode", false);
|
||||
},
|
||||
selectAll(boolean) {
|
||||
if (!boolean) this.selected = this.printItem;
|
||||
else this.selected = [];
|
||||
},
|
||||
onSomeSelected() {
|
||||
this.someSelected =
|
||||
this.selected.length !== 0 &&
|
||||
this.selected.length !== this.printItem.length;
|
||||
if (this.selected.length === this.printItem.length)
|
||||
this.allSelected = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
95
list-patient/components/changeBirthdayDialog.vue
Normal file
95
list-patient/components/changeBirthdayDialog.vue
Normal file
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<v-dialog v-model="menuChangeBirthday" width="900">
|
||||
<v-card>
|
||||
<v-card-item class="bg-primary py-3 elevation-6">
|
||||
<v-card-title>
|
||||
{{ $t("message.changeBirthday.title") }}
|
||||
</v-card-title>
|
||||
</v-card-item>
|
||||
<v-card-text
|
||||
class="font-weight-bold d-flex justify-center ga-3 text-h6 pt-5"
|
||||
>
|
||||
<v-menu
|
||||
v-model="menuBirthday"
|
||||
:close-on-content-click="false"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="330px"
|
||||
max-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-text-field
|
||||
:model-value="formatBirthday()"
|
||||
:label="$t('message.changeBirthday.datePicker')"
|
||||
prepend-inner-icon="mdi-calendar"
|
||||
hide-details
|
||||
readonly
|
||||
variant="outlined"
|
||||
v-bind="props"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
hide-header
|
||||
show-adjacent-months
|
||||
rounded="lg"
|
||||
color="primary"
|
||||
v-model="birthday"
|
||||
@update:modelValue="menuBirthday = false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions class="px-7">
|
||||
<v-btn
|
||||
:text="$t('message.changeBirthday.close')"
|
||||
variant="text"
|
||||
class="text-error"
|
||||
@click="onCloseMenuChangeBirthday()"
|
||||
></v-btn>
|
||||
<v-btn
|
||||
:text="$t('message.changeBirthday.save')"
|
||||
variant="text"
|
||||
class="text-primary"
|
||||
@click="onSaveChangeBirthday()"
|
||||
></v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ChangeBirthdayDialog",
|
||||
data() {
|
||||
return {
|
||||
menuBirthday: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
menuChangeBirthday() {
|
||||
return this.$store.state.collection.menuChangeBirthday;
|
||||
},
|
||||
birthday: {
|
||||
get() {
|
||||
return this.$store.state.collection.birthday;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("setBirthday", val);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onCloseMenuChangeBirthday() {
|
||||
this.$store.commit("setMenuChangeBirthday", false);
|
||||
},
|
||||
formatBirthday() {
|
||||
if (!this.birthday) return null;
|
||||
|
||||
return moment(this.birthday).format("DD-MM-YYYY");
|
||||
},
|
||||
onSaveChangeBirthday() {
|
||||
this.$store.commit("setMenuChangeBirthday", false);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
166
list-patient/components/filter.vue
Normal file
166
list-patient/components/filter.vue
Normal file
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="bg-white rounded-lg" fluid>
|
||||
<v-row>
|
||||
<v-col cols="2.2">
|
||||
<div class="d-flex align-center ga-2">
|
||||
<v-menu
|
||||
v-model="menuStartDate"
|
||||
:close-on-content-click="false"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
max-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-text-field
|
||||
:model-value="formatStartDate()"
|
||||
:label="$t('message.filter.startDate')"
|
||||
prepend-inner-icon="mdi-calendar"
|
||||
hide-details
|
||||
readonly
|
||||
variant="outlined"
|
||||
v-bind="props"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
hide-header
|
||||
show-adjacent-months
|
||||
rounded="lg"
|
||||
color="primary"
|
||||
v-model="startDate"
|
||||
@update:modelValue="menuStartDate = false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="2.2">
|
||||
<div class="d-flex align-center ga-2">
|
||||
<v-menu
|
||||
v-model="menuEndDate"
|
||||
:close-on-content-click="false"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
max-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-text-field
|
||||
:model-value="formatEndDate()"
|
||||
:label="$t('message.filter.endDate')"
|
||||
prepend-inner-icon="mdi-calendar"
|
||||
hide-details
|
||||
readonly
|
||||
variant="outlined"
|
||||
v-bind="props"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
hide-header
|
||||
show-adjacent-months
|
||||
rounded="lg"
|
||||
color="primary"
|
||||
v-model="endDate"
|
||||
@update:modelValue="menuEndDate = false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="2.2">
|
||||
<v-text-field
|
||||
:label="$t('message.filter.noRegOrName')"
|
||||
append-inner-icon="mdi-magnify"
|
||||
hide-details
|
||||
variant="outlined"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="2.2">
|
||||
<v-autocomplete
|
||||
:label="$t('message.filter.doctor')"
|
||||
variant="outlined"
|
||||
hide-details
|
||||
menu-icon="mdi-chevron-down"
|
||||
:items="doctor_dropdown"
|
||||
></v-autocomplete>
|
||||
</v-col>
|
||||
<v-col cols="2.2">
|
||||
<v-autocomplete
|
||||
:label="$t('message.filter.customerComplaint')"
|
||||
variant="outlined"
|
||||
hide-details
|
||||
menu-icon="mdi-chevron-down"
|
||||
:items="cust_complaint_dropdown"
|
||||
></v-autocomplete>
|
||||
</v-col>
|
||||
<v-col cols="1">
|
||||
<div
|
||||
style="
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
"
|
||||
class="rounded-lg bg-primary pa-2 h-100 pointer"
|
||||
>
|
||||
<iconify-icon
|
||||
style="font-size: 2rem"
|
||||
icon="fluent:search-20-regular"
|
||||
></iconify-icon>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "Filter",
|
||||
data() {
|
||||
return {
|
||||
menuStartDate: false,
|
||||
menuEndDate: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
startDate: {
|
||||
get() {
|
||||
return this.$store.state.collection.startDate;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("setStartDate", val);
|
||||
},
|
||||
},
|
||||
endDate: {
|
||||
get() {
|
||||
return this.$store.state.collection.endDate;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("setEndDate", val);
|
||||
},
|
||||
},
|
||||
doctor_dropdown: {
|
||||
get() {
|
||||
return this.$store.state.collection.doctor_dropdown;
|
||||
},
|
||||
},
|
||||
cust_complaint_dropdown: {
|
||||
get() {
|
||||
return this.$store.state.collection.cust_complaint_dropdown;
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatStartDate() {
|
||||
if (!this.startDate) return null;
|
||||
|
||||
return moment(this.startDate).format("DD-MM-YYYY");
|
||||
},
|
||||
formatEndDate() {
|
||||
if (!this.endDate) return null;
|
||||
|
||||
return moment(this.endDate).format("DD-MM-YYYY");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
102
list-patient/components/infoDialog.vue
Normal file
102
list-patient/components/infoDialog.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<v-dialog v-model="menuSelectedPatient" max-width="900">
|
||||
<v-card>
|
||||
<v-card-item class="bg-primary py-3">
|
||||
<v-card-title>
|
||||
{{ $t("message.infoDialog.title") }}
|
||||
</v-card-title>
|
||||
</v-card-item>
|
||||
<v-card-text
|
||||
class="font-weight-bold d-flex justify-center ga-3 text-h6 pt-5"
|
||||
>
|
||||
<p>{{ selectedPatient.noReg1 }}</p>
|
||||
<p>/</p>
|
||||
<p v-if="selectedPatient.noReg2" class="text-error">
|
||||
{{ selectedPatient.noReg2 }}
|
||||
</p>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-space-between px-7">
|
||||
<div>
|
||||
<v-btn
|
||||
v-if="selectedPatient.process"
|
||||
:text="$t('message.infoDialog.material')"
|
||||
variant="flat"
|
||||
class="bg-primary text-white"
|
||||
@click="onMenuMaterial()"
|
||||
></v-btn>
|
||||
<v-btn
|
||||
:text="$t('message.infoDialog.barcode')"
|
||||
variant="flat"
|
||||
class="bg-info text-white"
|
||||
@click="onMenuBarcode(selectedPatient.noReg2)"
|
||||
></v-btn>
|
||||
<v-btn
|
||||
:text="$t('message.infoDialog.changeBirthday')"
|
||||
variant="flat"
|
||||
class="bg-secondary-darken text-white"
|
||||
@click="onMenuChangeBirthday(selectedPatient.birthday)"
|
||||
></v-btn>
|
||||
</div>
|
||||
<v-btn
|
||||
:text="$t('message.infoDialog.close')"
|
||||
variant="text"
|
||||
class="text-error"
|
||||
@click="onDiselectPatient()"
|
||||
></v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "InfoDialog",
|
||||
computed: {
|
||||
menuSelectedPatient() {
|
||||
return this.$store.state.collection.menuSelectedPatient;
|
||||
},
|
||||
selectedPatient() {
|
||||
return this.$store.state.collection.selectedPatient;
|
||||
},
|
||||
menuMaterial() {
|
||||
return this.$store.state.collection.menuMaterial;
|
||||
},
|
||||
menuBarcode() {
|
||||
return this.$store.state.collection.menuBarcode;
|
||||
},
|
||||
menuChangeBirthday() {
|
||||
return this.$store.state.collection.menuChangeBirthday;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onDiselectPatient() {
|
||||
this.$store.commit("setMenuSelectedPatient", false);
|
||||
setTimeout(() => this.$store.commit("setSelectedPatient", {}), 1000);
|
||||
},
|
||||
onMenuChangeBirthday(birthday) {
|
||||
this.$store.commit("setMenuChangeBirthday", true);
|
||||
const time = birthday.split("-");
|
||||
this.$store.commit(
|
||||
"setBirthday",
|
||||
new Date(Date.parse(`${time[1]}/${time[0]}/${time[2]}`))
|
||||
);
|
||||
},
|
||||
onMenuBarcode(noReg) {
|
||||
this.$store.commit("setMenuBarcode", true);
|
||||
this.$store.commit("setPrintItem", [
|
||||
{
|
||||
specimen: this.$t("message.barcode.form"),
|
||||
barcode: noReg,
|
||||
},
|
||||
{
|
||||
specimen: this.$t("message.barcode.label"),
|
||||
barcode: noReg,
|
||||
},
|
||||
]);
|
||||
},
|
||||
onMenuMaterial() {
|
||||
this.$store.commit("setMenuMaterial", true);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
268
list-patient/components/lists.vue
Normal file
268
list-patient/components/lists.vue
Normal file
@@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="bg-white rounded-lg" fluid>
|
||||
<div
|
||||
class="bg-secondary-lighten rounded-lg d-flex justify-space-between pa-5 mb-5"
|
||||
>
|
||||
<h3 class="primary-lighten">
|
||||
{{ $t("message.tableListPatient.title") }}
|
||||
</h3>
|
||||
<h3 class="primary-lighten">{{ patients.length }}</h3>
|
||||
</div>
|
||||
<v-data-table
|
||||
v-model:page="page"
|
||||
height="275px"
|
||||
:items="patients"
|
||||
:headers="headers"
|
||||
:items-per-page="itemsPerPage"
|
||||
hide-default-footer
|
||||
class="row-pointer"
|
||||
>
|
||||
<template v-slot:headers="{ columns }">
|
||||
<tr>
|
||||
<template v-for="column in columns" :key="column.key">
|
||||
<td
|
||||
:class="column.class"
|
||||
:style="{ width: column.width, textAlign: column.align }"
|
||||
>
|
||||
<span>{{ column.title }}</span>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-slot:item="{ item }">
|
||||
<tr>
|
||||
<td>
|
||||
<v-btn
|
||||
icon="mdi-pencil"
|
||||
variant="flat"
|
||||
:class="[
|
||||
'rounded-0 w-100 h-100 pa-2 text-white',
|
||||
{ 'bg-info': item.process },
|
||||
{ 'bg-secondary': !item.process },
|
||||
]"
|
||||
@click="onSelectPatient(item)"
|
||||
></v-btn>
|
||||
</td>
|
||||
<td>
|
||||
<p class="font-weight-medium">{{ item.no }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p class="font-weight-medium mt-2">{{ item.noReg1 }}</p>
|
||||
<p
|
||||
v-if="item.noReg2"
|
||||
class="font-weight-medium text-error mb-2"
|
||||
>
|
||||
{{ item.noReg2 }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p class="mt-2 mb-2" style="font-size: 12px">{{ item.name }}</p>
|
||||
<p class="mb-2">
|
||||
<v-chip label size="small">
|
||||
{{ item.staff }}
|
||||
</v-chip>
|
||||
</p>
|
||||
<p class="mb-2">
|
||||
<v-chip label size="small">
|
||||
{{ item.orderTime }}
|
||||
</v-chip>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<p style="font-size: 12px">{{ item.agreement }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p class="mt-2" style="font-size: 12px">{{ item.doctor.no }}</p>
|
||||
<p class="mb-2" style="font-size: 12px">
|
||||
{{ item.doctor.name }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p
|
||||
v-for="result in item.result"
|
||||
:key="result"
|
||||
style="font-size: 12px"
|
||||
>
|
||||
{{ result }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p
|
||||
v-for="inspection in item.inspection"
|
||||
:key="inspection"
|
||||
style="font-size: 12px"
|
||||
>
|
||||
{{ inspection }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p v-for="delivery in item.delivery">
|
||||
<v-chip variant="flat" color="primary" class="rounded">{{
|
||||
delivery
|
||||
}}</v-chip>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p class="font-weight-medium">{{ item.total.all }}</p>
|
||||
<p v-if="item.total.disc" class="font-weight-medium text-error">
|
||||
{{ item.total.disc }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:bottom>
|
||||
<div class="text-center pt-2">
|
||||
<v-pagination v-model="page" :length="pageCount"></v-pagination>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-container>
|
||||
</div>
|
||||
|
||||
<info-dialog></info-dialog>
|
||||
<change-birthday-dialog></change-birthday-dialog>
|
||||
<barcode-dialog></barcode-dialog>
|
||||
<material-dialog></material-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InfoDialogComponent from "./infoDialog.vue";
|
||||
import ChangeBirthdayDialogComponent from "./changeBirthdayDialog.vue";
|
||||
import BarcodeDialogComponent from "./barcodeDialog.vue";
|
||||
import MaterialDialogComponent from "./materialDialog.vue";
|
||||
|
||||
export default {
|
||||
name: "MainLists",
|
||||
components: {
|
||||
"info-dialog": InfoDialogComponent,
|
||||
"change-birthday-dialog": ChangeBirthdayDialogComponent,
|
||||
"barcode-dialog": BarcodeDialogComponent,
|
||||
"material-dialog": MaterialDialogComponent,
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
itemsPerPage: 3,
|
||||
headers: [
|
||||
{
|
||||
title: "",
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "actionButton",
|
||||
width: "4%",
|
||||
class: "",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.no"),
|
||||
align: "center",
|
||||
sortable: false,
|
||||
key: "no",
|
||||
width: "4%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.noreg"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "12%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.name"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "12%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.agreement"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "14%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.doctor"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "12%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.result"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "14%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.inspection"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "12%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.delivery"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "12%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
title: this.$t("message.tableListPatient.total"),
|
||||
align: "start",
|
||||
sortable: false,
|
||||
key: "noreg",
|
||||
width: "4%",
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
patients() {
|
||||
return this.$store.state.collection.patients;
|
||||
},
|
||||
pageCount() {
|
||||
return Math.ceil(this.patients.length / this.itemsPerPage);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onSelectPatient(patient) {
|
||||
this.$store.commit("setMenuSelectedPatient", true);
|
||||
this.$store.commit("setSelectedPatient", patient);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.row-pointer >>> tbody tr :hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
40
list-patient/components/main.vue
Normal file
40
list-patient/components/main.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<v-app id="inspire">
|
||||
<one-navbar></one-navbar>
|
||||
<v-main>
|
||||
<div class="pa-5 bg-primary-lighten ml-2 rounded-xl h-100">
|
||||
<v-row>
|
||||
<v-col cols="12" md="12" sm="12" xs="12">
|
||||
<filter-component></filter-component>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="12" sm="12" xs="12">
|
||||
<list-component></list-component>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script type="module">
|
||||
import NavbarComponent from "../../globalcomponent/one-navbar.vue";
|
||||
import FilterComponent from "./filter.vue";
|
||||
import ListComponent from "./lists.vue";
|
||||
|
||||
export default {
|
||||
name: "ListPatient",
|
||||
components: {
|
||||
"one-navbar": NavbarComponent,
|
||||
"filter-component": FilterComponent,
|
||||
"list-component": ListComponent,
|
||||
},
|
||||
mountend() {},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
53
list-patient/components/materialDialog.vue
Normal file
53
list-patient/components/materialDialog.vue
Normal file
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<v-dialog v-model="menuMaterial" width="900">
|
||||
<v-card>
|
||||
<v-card-item class="bg-primary py-3">
|
||||
<v-card-title>
|
||||
{{ $t("message.material.title") }}
|
||||
</v-card-title>
|
||||
</v-card-item>
|
||||
<v-card-text class="pt-5">
|
||||
<div>
|
||||
<h3 class="mb-4">{{ $t("message.material.materialYet") }}</h3>
|
||||
<v-chip variant="flat" color="error" class="rounded">{{
|
||||
$t("message.material.blood")
|
||||
}}</v-chip>
|
||||
</div>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions class="px-7">
|
||||
<v-btn
|
||||
:text="$t('message.material.correct')"
|
||||
variant="text"
|
||||
class="text-primary"
|
||||
@click="onCorrectMenuMaterial()"
|
||||
></v-btn>
|
||||
<v-btn
|
||||
:text="$t('message.material.cancel')"
|
||||
variant="text"
|
||||
class="text-error"
|
||||
@click="onCancelMenuMaterial()"
|
||||
></v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "MaterialDialog",
|
||||
computed: {
|
||||
menuMaterial() {
|
||||
return this.$store.state.collection.menuMaterial;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onCancelMenuMaterial() {
|
||||
this.$store.commit("setMenuMaterial", false);
|
||||
},
|
||||
onCorrectMenuMaterial() {
|
||||
this.$store.commit("setMenuMaterial", false);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user