add slicing worklist
This commit is contained in:
106
worklist/components/filter.vue
Normal file
106
worklist/components/filter.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="bg-white rounded-lg" fluid>
|
||||
<v-row>
|
||||
<v-col cols="3">
|
||||
<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="formatDate()"
|
||||
:label="$t('message.filter.date')"
|
||||
prepend-inner-icon="mdi-calendar"
|
||||
hide-details
|
||||
readonly
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
v-bind="props"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
hide-header
|
||||
show-adjacent-months
|
||||
rounded="lg"
|
||||
color="primary"
|
||||
v-model="date"
|
||||
@update:modelValue="menuStartDate=false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="9">
|
||||
<div class="d-flex justify-end ga-6">
|
||||
<v-select
|
||||
:label="$t('message.filter.worklist')"
|
||||
variant="outlined"
|
||||
hide-details
|
||||
density="compact"
|
||||
menu-icon="mdi-chevron-down"
|
||||
:items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
|
||||
></v-select>
|
||||
<v-btn
|
||||
variant="flat"
|
||||
style="height: auto; width: 40px;"
|
||||
class="bg-primary rounded-lg">
|
||||
<iconify-icon
|
||||
style="font-size: 1.5rem;"
|
||||
icon="fluent:search-20-regular"
|
||||
></iconify-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "Filter",
|
||||
data() {
|
||||
return {
|
||||
menuStartDate: false,
|
||||
menuEndDate: false,
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
date: {
|
||||
get() {
|
||||
return this.$store.state.worklist.date;
|
||||
},
|
||||
set(val) {
|
||||
console.log(val)
|
||||
this.$store.commit("worklist/setDate", val);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatDate() {
|
||||
if (!this.date) return null;
|
||||
|
||||
return moment(this.date).format("DD-MM-YYYY");
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null;
|
||||
|
||||
const [day, month, year] = date.split("-");
|
||||
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
|
||||
},
|
||||
},
|
||||
wacth: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
131
worklist/components/listWorklist.vue
Normal file
131
worklist/components/listWorklist.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="bg-white rounded-lg" fluid>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xpatients"
|
||||
return-object
|
||||
hide-default-footer
|
||||
>
|
||||
<template v-slot:headers="{ columns }">
|
||||
<tr>
|
||||
<td width="15%" class="pa-4 bg-secondary-lighten font-weight-bold">
|
||||
{{ $t('message.headerWorklist.test') }}
|
||||
</td>
|
||||
<td class="pa-1 bg-secondary-lighten font-weight-bold">
|
||||
<span class="position-relative" style="top:6px;">
|
||||
{{ $t('message.headerWorklist.patient') }}
|
||||
</span>
|
||||
<span class="text-black float-right mr-3" style="font-size:20px;">
|
||||
{{ staff }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:item="{ item }">
|
||||
<tr>
|
||||
<td>
|
||||
<p class="mt-2 font-weight-medium text-uppercase">{{ item.T_TestName }}</p>
|
||||
<p class="text-grey">{{ item.T_TestCode }}</p>
|
||||
<p class="mb-2 text-black">Total pasien : {{ item.patients.length }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<v-row class="flex-wrap">
|
||||
<v-sheet v-for="(p, i) in item.patients" v-bind:key="i" class="pr-3 row-pointer">
|
||||
<v-sheet :class="p.is_received == 'Y' ? 'text-uppercase bg-primary-lighten text-primary box-y':'text-uppercase text-black box-n'">
|
||||
<p class="font-weight-medium">{{ p.name }}</p>
|
||||
<p >{{ p.number }}</p>
|
||||
</v-sheet>
|
||||
</v-sheet>
|
||||
</v-row>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.row-pointer :hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > td,
|
||||
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > th,
|
||||
.v-table .v-table__wrapper > table > thead > tr > th {
|
||||
border-bottom: dashed 1px #EEEEEE;
|
||||
}
|
||||
|
||||
.box-y {
|
||||
display: flex;
|
||||
width: 202px;
|
||||
padding: 8px 12px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E3F2FD;
|
||||
}
|
||||
.box-n {
|
||||
display: flex;
|
||||
width: 202px;
|
||||
padding: 8px 12px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E0E0E0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "ListPatient",
|
||||
data() {
|
||||
return {
|
||||
staff: "BELUM ADA STAFF",
|
||||
headers: [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'test',
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
title: this.$t('message.headerWorklist.test'),
|
||||
class: "bg-secondary-lighten font-weight-bold",
|
||||
},
|
||||
{
|
||||
align: 'start',
|
||||
key: 'patient',
|
||||
sortable: false,
|
||||
width: "85%",
|
||||
title: this.$t('message.headerWorklist.patient'),
|
||||
class: "bg-secondary-lighten font-weight-bold",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
xpatients() {
|
||||
return this.$store.state.worklist.patients
|
||||
},
|
||||
selected_patient: {
|
||||
get() {
|
||||
return this.$store.state.worklist.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist/setSelectedPatient", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
wacth: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
50
worklist/components/mainWorklist.vue
Normal file
50
worklist/components/mainWorklist.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<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-col cols="12" md="12" sm="12" xs="12">
|
||||
<list-worklist-component></list-worklist-component>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-main>
|
||||
</v-app>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
import NavbarComponent from "../../globalcomponent/one-navbar.vue";
|
||||
import filterComponent from "./filter.vue";
|
||||
import listWorklistComponent from "./listWorklist.vue";
|
||||
export default {
|
||||
name: "MainWorklist",
|
||||
components: {
|
||||
"one-navbar": NavbarComponent,
|
||||
"filter-component": filterComponent,
|
||||
"list-worklist-component": listWorklistComponent
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
wacth: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user