ini punya ahdan
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
<template>
|
||||
<v-app-bar>
|
||||
<v-app-bar-title>Hello</v-app-bar-title>
|
||||
<v-spacer />
|
||||
<v-btn @click="toggleTheme">
|
||||
<v-icon>ph:sun</v-icon>
|
||||
toggle thema</v-btn>
|
||||
</v-app-bar>
|
||||
|
||||
<VContainer class="central">
|
||||
<v-alert
|
||||
class="mb-5"
|
||||
@@ -23,20 +17,6 @@
|
||||
<VForm
|
||||
ref="form"
|
||||
@submit.prevent="form_proses">
|
||||
<!-- <VTextField
|
||||
label="name"
|
||||
:counter="10"
|
||||
required
|
||||
/>
|
||||
<VTextField
|
||||
label="Description"
|
||||
/>
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
type="submit"
|
||||
block>
|
||||
SAVE
|
||||
</VBtn> -->
|
||||
<v-container>
|
||||
<v-row justify="space-around">
|
||||
<v-col cols="12" md="6">
|
||||
@@ -147,12 +127,24 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
type="submit"
|
||||
block>
|
||||
S I M P A N
|
||||
</VBtn>
|
||||
<v-row>
|
||||
<v-col col="12" md="6">
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
to="/Surat-Kontrol"
|
||||
block>
|
||||
K E M B A L I
|
||||
</VBtn>
|
||||
</v-col>
|
||||
<v-col col="12" md="6">
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
type="submit"
|
||||
block>
|
||||
S I M P A N
|
||||
</VBtn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</VForm>
|
||||
</VCardText>
|
||||
@@ -240,16 +232,6 @@ const form_proses = async() => {
|
||||
}
|
||||
}
|
||||
const title = computed(()=>data_edit.value ? 'UBAH DATA' : "TAMBAH DATA")
|
||||
|
||||
/*const form_proses = async() => {
|
||||
if(payload.idxdaftar){
|
||||
console.log(payload.idxdaftar)
|
||||
loadSurKon(payload);
|
||||
navigateTo(`/`)
|
||||
}else{
|
||||
console.log("kosong")
|
||||
}
|
||||
}*/
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-main>
|
||||
<v-container>
|
||||
<v-card title="List Surat Kontrol" flat>
|
||||
<div variant="outline">
|
||||
|
||||
<VForm v-model="valid" @submit.prevent="form_proses" :key="formkey">
|
||||
<v-container >
|
||||
<v-row>
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field
|
||||
v-model="tanggal_awal"
|
||||
label="Tanggal Awal"
|
||||
type="date"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field
|
||||
v-model="tanggal_akhir"
|
||||
label="Tanggal Akhir"
|
||||
type="date"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="3">
|
||||
<v-autocomplete
|
||||
label="Poliklinik"
|
||||
v-model="poliklinik"
|
||||
:items="subspesialis"
|
||||
item-title="Subspesialis"
|
||||
item-value="id"
|
||||
dense
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field
|
||||
v-model="noRM"
|
||||
label="No RM" />
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field
|
||||
v-model="noSEP"
|
||||
label="No SEP" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
type="submit">
|
||||
C A R I
|
||||
</VBtn>
|
||||
|
||||
<VBtn
|
||||
class="text-none text-subtitle-1 pe-2"
|
||||
color="#5865f2"
|
||||
size="small"
|
||||
variant="flat"
|
||||
to="Surat-Kontrol/formSurkon" >
|
||||
tambah
|
||||
</VBtn>
|
||||
|
||||
</v-container>
|
||||
</VForm>
|
||||
</div>
|
||||
|
||||
<v-text-field v-model="search" label="Search" prepend-inner-icon="mdi-magnify" variant="outlined" hide-details single-line class="rounded elevation-1"></v-text-field>
|
||||
<v-data-table class="elevation-1" :headers="headers" :items="surkon.list_data" F :search="search">
|
||||
|
||||
<template v-slot:item.action="{ item }" >
|
||||
<v-dialog v-model="dialog" max-width="750" >
|
||||
<template v-slot:activator="{ props: activatorProps }">
|
||||
<v-btn small v-bind="activatorProps" class="mr-2" @click="proses_edit(item)"><v-icon>mdi-pencil</v-icon>Edit</v-btn>
|
||||
<v-btn color="red" @click="modal_hapus(item)"><v-icon>mdi-delete</v-icon>Delete</v-btn>
|
||||
</template>
|
||||
|
||||
|
||||
<VCard width="750" class="ma-auto">
|
||||
<VCardTitle class="text-center">
|
||||
Data Edit
|
||||
</VCardTitle>
|
||||
<VCardText>
|
||||
<VForm ref="form" @submit.prevent="form_proses">
|
||||
<v-container>
|
||||
<v-row justify="space-around">
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*ID belum terisi']"
|
||||
name="idxdaftar"
|
||||
v-model="dataedit.idxdaftar"
|
||||
label="idx daftar"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*No SEP belum terisi']"
|
||||
name="noSEP"
|
||||
v-model="dataedit.noSEP"
|
||||
label="No.SEP"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*kode HFIS belum terisi']"
|
||||
name="kodeHFIS"
|
||||
v-model="dataedit.kodeHFIS"
|
||||
label="kode HFIS"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*ID dokter belum terisi']"
|
||||
name="id_dokter"
|
||||
v-model="dataedit.id_dokter"
|
||||
label="ID dokter"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*kode Poli belum terisi']"
|
||||
name="kodePoli"
|
||||
v-model="dataedit.kodePoli"
|
||||
label="kode Poli"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*Sub spesialis belum terisi']"
|
||||
name="subspesialis"
|
||||
v-model="dataedit.subspesialis"
|
||||
label="sub spesialis"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*tanggal rencana kontrol belum terisi']"
|
||||
name="tglRencanaKontrol"
|
||||
v-model="dataedit.tglRencanaKontrol"
|
||||
label="tanggal rencana kontrol"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*Nama Dokter belum terisi']"
|
||||
name="user"
|
||||
v-model="dataedit.user"
|
||||
label="Nama Dokter"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*kode diagnosa belum terisi']"
|
||||
name="kode_diagnosa"
|
||||
v-model="dataedit.kode_diagnosa"
|
||||
label="kode diagnosa"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*Nama diagnosa belum terisi']"
|
||||
name="nama_diagnosa"
|
||||
v-model="dataedit.nama_diagnosa"
|
||||
label="Nama Diagnosa"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*tipe surkon belum terisi']"
|
||||
name="tipe_surkon"
|
||||
v-model="dataedit.tipe_surkon"
|
||||
label="tipe surkon"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field :rules="[v => !!v || '*tipe rawat belum terisi']"
|
||||
name="tipe_rawat"
|
||||
v-model="dataedit.tipe_rawat"
|
||||
label="tipe rawat"
|
||||
v-if="aksi == true"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col col="12" md="6">
|
||||
<VBtn variant="tonal" @click="dialog.dialog=false" block> K E M B A L I </VBtn>
|
||||
</v-col>
|
||||
<v-col col="12" md="6">
|
||||
<VBtn variant="tonal" type="submit"block>S I M P A N</VBtn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</VForm>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
|
||||
</v-dialog>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
</v-container>
|
||||
</v-main>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
import { ref, reactive } from "vue";
|
||||
import Swal from "sweetalert2";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
|
||||
|
||||
const noRM = ref('');
|
||||
const noSEP = ref('');
|
||||
const tanggal_awal = ref('');
|
||||
const tanggal_akhir = ref('');
|
||||
const poliklinik = ref('');
|
||||
|
||||
// const itemsPerPage= 5;
|
||||
const search = ref("");
|
||||
const headers = [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
},
|
||||
{ key: 'Nomor_surat_kontrol', title: 'Nomor surat kontrol' },
|
||||
{ key: 'Nomor_sep', title: 'Nomor sep' },
|
||||
{ key: 'Tanggal_cetak_surat_kontrol', title: 'Tanggal Entry' },
|
||||
{ key: 'Tanggal_rencana_kontrol', title: 'Tanggal Rencana Kontrol' },
|
||||
{ key: 'No_rm', title: 'Nomor Rekam Medik' },
|
||||
{ key: 'NamaDokter', title: 'Nama Dokter' },
|
||||
{ text: "", value: "action", title:'Aksi' },
|
||||
];
|
||||
|
||||
|
||||
const payload = {
|
||||
|
||||
no_rm: "",
|
||||
no_sep: "",
|
||||
poliklinik: "",
|
||||
tanggal_awal: "",
|
||||
tanggal_akhir: "",
|
||||
tipe_surkon : "1",
|
||||
offset: "0",
|
||||
};
|
||||
|
||||
const { surkon } = storeToRefs(useSurkonStorePost());
|
||||
const { loadSurKon } = useSurkonStorePost();
|
||||
|
||||
|
||||
const { subspesialis,loadSubspesialisData } = useSubspesialisStore();
|
||||
const headers2 = [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
},
|
||||
{ key: 'id', title: 'ID' },
|
||||
{ key: 'Kode', title: 'Kode' },
|
||||
{ key: 'Subspesialis', title: 'Subspesialis' },
|
||||
{ key: 'FK_daftar_spesialis_ID', title: 'FK_daftar_spesialis_ID' },
|
||||
{ key: 'Spesialis', title: 'Spesialis' },
|
||||
{ text: "", value: "action" },
|
||||
];
|
||||
|
||||
|
||||
const form_proses = async() => {
|
||||
payload.no_rm = noRM._value;
|
||||
payload.no_sep = noSEP._value;
|
||||
payload.tanggal_awal = tanggal_awal._value;
|
||||
payload.tanggal_akhir = tanggal_akhir._value;
|
||||
payload.poliklinik = poliklinik._value.toString();
|
||||
Swal.fire({
|
||||
|
||||
title: 'Berhasil Menampilkan Data' ,
|
||||
icon: 'success',
|
||||
showConfirmButton: false,
|
||||
timer: 1000,
|
||||
})
|
||||
|
||||
loadSurKon(payload);
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
loadSubspesialisData();
|
||||
});
|
||||
|
||||
const dataedit = reactive({
|
||||
idxdaftar: '',
|
||||
noSEP: '',
|
||||
kodeHFIS: '',
|
||||
id_dokter: '',
|
||||
kodePoli: '',
|
||||
subspesialis: '',
|
||||
tglRencanaKontrol: '',
|
||||
user: '',
|
||||
kode_diagnosa: '',
|
||||
nama_diagnosa: '',
|
||||
tipe_surkon: '',
|
||||
tipe_rawat: '',
|
||||
})
|
||||
const proses_edit = (item)=>{
|
||||
const {data_edit} = storeToRefs(useSurkonStorePost());
|
||||
|
||||
const { proses_edit } = useSurkonStorePost();
|
||||
proses_edit(item);
|
||||
var aksi = false;
|
||||
watchEffect(() => {
|
||||
if (data_edit.value) {
|
||||
aksi=true;
|
||||
dataedit.idxdaftar = data_edit.value.Idx_daftar || '';
|
||||
dataedit.noSEP = data_edit.value.Nomor_sep || '';
|
||||
dataedit.kodeHFIS = data_edit.value.kodeHFIS || '';//?
|
||||
dataedit.id_dokter = data_edit.value.id_dokter || '';
|
||||
dataedit.kodePoli = data_edit.value.Kode_poli || '';
|
||||
dataedit.subspesialis = data_edit.value.Subspesialis || '';
|
||||
dataedit.tglRencanaKontrol = data_edit.value.Tanggal_rencana_kontrol || '';
|
||||
dataedit.user = data_edit.value.NamaDokter || '';
|
||||
dataedit.kode_diagnosa = data_edit.value.Kode_diagnosa || '';
|
||||
dataedit.nama_diagnosa = data_edit.value.Nama_diagnosa || '';
|
||||
dataedit.tipe_surkon = data_edit.value.Tipe_SurKon || '';
|
||||
dataedit.tipe_rawat = data_edit.value.tipe_rawat || '';//?
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const dialog = ref(false);
|
||||
const hapusData = ref('');
|
||||
|
||||
const modal_hapus = (item) => {
|
||||
hapusData.value = item;
|
||||
|
||||
|
||||
}
|
||||
|
||||
const proses_hapus = () => {
|
||||
console.log("proses hapus")
|
||||
console.log(hapusData.value)
|
||||
// console.log(hapusData.value.id)
|
||||
dialog.dialog = false;
|
||||
}
|
||||
const tambah = reactive({
|
||||
dialog:false
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
+3
-264
@@ -1,270 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-app>
|
||||
<v-app-bar>
|
||||
<v-app-bar-title>Hello</v-app-bar-title>
|
||||
<v-spacer />
|
||||
<v-btn @click="toggleTheme">
|
||||
<v-icon>ph:sun</v-icon>
|
||||
toggle thema</v-btn>
|
||||
</v-app-bar>
|
||||
<v-main>
|
||||
<!-- <v-container>
|
||||
<v-card title="List Surat Kontrol" flat>
|
||||
<template v-slot:text>
|
||||
<v-text-field v-model="search" label="Search" prepend-inner-icon="mdi-magnify" variant="outlined" hide-details single-line></v-text-field>
|
||||
</template>
|
||||
<vcontainer>
|
||||
|
||||
<v-data-table :headers="headers" :items="subspesialis" F :search="search"></v-data-table>
|
||||
</v-card>
|
||||
</v-container> -->
|
||||
<v-container>
|
||||
<v-card title="List Surat Kontrol" flat>
|
||||
<template v-slot:text>
|
||||
<v-text-field v-model="search" label="Search" prepend-inner-icon="mdi-magnify" variant="outlined" hide-details single-line class="rounded elevation-1"></v-text-field>
|
||||
</template>
|
||||
|
||||
<template>
|
||||
<VForm v-model="valid"
|
||||
@submit.prevent="form_proses">
|
||||
<v-container >
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
v-model="tanggal_awal"
|
||||
label="Tanggal Awal"
|
||||
type="date"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
v-model="tanggal_akhir"
|
||||
label="Tanggal Akhir"
|
||||
type="date"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<!-- <v-select
|
||||
v-model="poliklinik"
|
||||
:items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
|
||||
label="Subspesialis"
|
||||
variant="outlined"
|
||||
/> -->
|
||||
<v-autocomplete
|
||||
label="Poliklinik"
|
||||
v-model="poliklinik"
|
||||
:items="subspesialis"
|
||||
item-title="Subspesialis"
|
||||
item-value="id"
|
||||
dense
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!-- <v-row>
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="firstname"
|
||||
:counter="10"
|
||||
:rules="nameRules"
|
||||
label="First name"
|
||||
required
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="lastname"
|
||||
:counter="10"
|
||||
:rules="nameRules"
|
||||
label="Last name"
|
||||
required
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
cols="12"
|
||||
md="4"
|
||||
>
|
||||
<v-text-field
|
||||
v-model="email"
|
||||
:rules="emailRules"
|
||||
label="E-mail"
|
||||
required
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
type="submit">
|
||||
C A R I
|
||||
</VBtn>
|
||||
</v-container>
|
||||
</VForm>
|
||||
</template>
|
||||
<v-data-table :headers="headers" :items="surkon.list_data" F :search="search">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-icon small class="mr-2" @click="proses_edit(item)">mdi-pencil</v-icon>
|
||||
<v-icon small @click="modal_hapus(item)">mdi-delete</v-icon>
|
||||
<!-- <v-btn>OPEN</v-btn> -->
|
||||
</template>
|
||||
</v-data-table>
|
||||
<!-- <v-data-table :headers="headers2" :items="subspesialis" F :search="search">
|
||||
<template v-slot:item.action="{ item }">
|
||||
<v-icon small class="mr-2" @click="proses_edit(item)">mdi-pencil</v-icon>
|
||||
<v-icon small @click="deleteTutorial(item)">mdi-delete</v-icon>
|
||||
</template>
|
||||
</v-data-table> -->
|
||||
</v-card>
|
||||
</v-container>
|
||||
<!-- Dialog Konfirmasi Hapus -->
|
||||
<v-dialog v-model="dialog.dialog" max-width="400" persistent>
|
||||
<!-- <template v-slot:activator="{ props: activatorProps }">
|
||||
<v-btn v-bind="activatorProps" style="display: none;">Open Dialog</v-btn>
|
||||
</template> -->
|
||||
|
||||
<v-card>
|
||||
<v-toolbar dense flat class="body-2 font-weight-bold px-5">
|
||||
Konfirmasi
|
||||
</v-toolbar>
|
||||
<v-row class="ma-1">
|
||||
<v-col cols="12">
|
||||
Yakin akan dihapus?
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<template v-slot:actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="dialog.dialog = false">Tidak</v-btn>
|
||||
<v-btn @click="proses_hapus()">Ya</v-btn>
|
||||
</template>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</div>
|
||||
</vcontainer>
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
import { ref, reactive } from "vue";
|
||||
import { useTheme } from "vuetify";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
const theme = useTheme();
|
||||
const tanggal_awal = ref(null);
|
||||
const tanggal_akhir = ref(null);
|
||||
const poliklinik = ref(null);
|
||||
function toggleTheme () {
|
||||
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'myTheme';
|
||||
}
|
||||
|
||||
// const itemsPerPage= 5;
|
||||
const search = ref("");
|
||||
const headers = [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
},
|
||||
{ key: 'Nomor_surat_kontrol', title: 'Nomor surat kontrol' },
|
||||
{ key: 'Nomor_sep', title: 'Nomor sep' },
|
||||
{ key: 'Tanggal_cetak_surat_kontrol', title: 'Tanggal Entry' },
|
||||
{ key: 'Tanggal_rencana_kontrol', title: 'Tanggal Rencana Kontrol' },
|
||||
{ key: 'No_rm', title: 'Nomor Rekam Medik' },
|
||||
{ key: 'NamaDokter', title: 'Nama Dokter' },
|
||||
{ text: "", value: "action", title:'Aksi' },
|
||||
];
|
||||
const payload = {
|
||||
// no_rm: "",
|
||||
// no_sep: "",
|
||||
// poliklinik: "",
|
||||
// tanggal_awal: "2024-10-16",
|
||||
// tanggal_akhir: "2024-11-30",
|
||||
// tipe_surkon : "0",
|
||||
// offset: "0",
|
||||
// limit: "10",
|
||||
no_rm: "",
|
||||
no_sep: "",
|
||||
poliklinik: "",
|
||||
tanggal_awal: "",
|
||||
tanggal_akhir: "",
|
||||
tipe_surkon : "1",
|
||||
offset: "0",
|
||||
limit: "10",
|
||||
};
|
||||
|
||||
const { surkon } = storeToRefs(useSurkonStorePost());
|
||||
const { loadSurKon } = useSurkonStorePost();
|
||||
|
||||
|
||||
const { subspesialis,loadSubspesialisData } = useSubspesialisStore();
|
||||
const headers2 = [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
},
|
||||
{ key: 'id', title: 'ID' },
|
||||
{ key: 'Kode', title: 'Kode' },
|
||||
{ key: 'Subspesialis', title: 'Subspesialis' },
|
||||
{ key: 'FK_daftar_spesialis_ID', title: 'FK_daftar_spesialis_ID' },
|
||||
{ key: 'Spesialis', title: 'Spesialis' },
|
||||
{ text: "", value: "action" },
|
||||
];
|
||||
|
||||
// console.log(subspesialis)
|
||||
const form_proses = async() => {
|
||||
// console.log(payload.tanggal_awal, typeof payload.tanggal_awal);
|
||||
// loadSurKon(payload);
|
||||
payload.tanggal_awal = tanggal_awal._value;
|
||||
payload.tanggal_akhir = tanggal_akhir._value;
|
||||
payload.poliklinik = poliklinik._value.toString();
|
||||
console.log(payload)
|
||||
// console.log(subspesialis)
|
||||
loadSurKon(payload);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// console.log(subspesialis)
|
||||
|
||||
onMounted(() => {
|
||||
// loadSurKon(payload);
|
||||
loadSubspesialisData();
|
||||
});
|
||||
|
||||
|
||||
const proses_edit = (item)=>{
|
||||
// console.log(item)
|
||||
const { proses_edit } = useSurkonStorePost();
|
||||
proses_edit(item);
|
||||
navigateTo(`/formSurkon`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const dialog = reactive({
|
||||
dialog: false,
|
||||
});
|
||||
const hapusData = ref(null);
|
||||
|
||||
const modal_hapus = (item) => {
|
||||
hapusData.value = item;
|
||||
dialog.dialog = true;
|
||||
}
|
||||
|
||||
const proses_hapus = () => {
|
||||
console.log("proses hapus")
|
||||
console.log(hapusData.value)
|
||||
// console.log(hapusData.value.id)
|
||||
dialog.dialog = false;
|
||||
}
|
||||
<script>
|
||||
|
||||
</script>
|
||||
+143
-35
@@ -8,45 +8,156 @@
|
||||
</v-app-bar>
|
||||
|
||||
|
||||
<div class="text-center pa-4">
|
||||
<div class="text-center pa-4" >
|
||||
<v-dialog
|
||||
v-model="dialog.dialog"
|
||||
max-width="400"
|
||||
persistent
|
||||
max-width="850"
|
||||
>
|
||||
<template v-slot:activator="{ props: activatorProps }">
|
||||
<v-btn v-bind="activatorProps">
|
||||
Open Dialog
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<!-- <v-card
|
||||
prepend-icon="mdi-map-marker"
|
||||
text="Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running."
|
||||
title="Use Google's location service?"
|
||||
> -->
|
||||
<v-card>
|
||||
<v-toolbar dense flat class="body-2 font-weight-bold px-5">
|
||||
Konfirmasi
|
||||
</v-toolbar>
|
||||
<v-row class="ma-1">
|
||||
<v-col cols="12">
|
||||
Yakin akan dihapus ?
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<template v-slot:actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn @click="dialog.dialog=false">
|
||||
Tidak
|
||||
</v-btn>
|
||||
|
||||
<v-btn @click="aksi()">
|
||||
Ya
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-card>
|
||||
<VCard width="850" class="ma-auto" >
|
||||
<VCardTitle class="text-center">
|
||||
|
||||
</VCardTitle>
|
||||
<VCardText>
|
||||
<VForm
|
||||
ref="form"
|
||||
>
|
||||
<v-container>
|
||||
<v-row justify="space-around">
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*ID belum terisi']"
|
||||
name="idxdaftar"
|
||||
|
||||
label="idx daftar"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*No SEP belum terisi']"
|
||||
name="noSEP"
|
||||
|
||||
label="No.SEP"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*kode HFIS belum terisi']"
|
||||
name="kodeHFIS"
|
||||
|
||||
label="kode HFIS"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*ID dokter belum terisi']"
|
||||
name="id_dokter"
|
||||
|
||||
label="ID dokter"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*kode Poli belum terisi']"
|
||||
name="kodePoli"
|
||||
|
||||
label="kode Poli"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*Sub spesialis belum terisi']"
|
||||
name="subspesialis"
|
||||
|
||||
label="sub spesialis"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*tanggal rencana kontrol belum terisi']"
|
||||
name="tglRencanaKontrol"
|
||||
|
||||
label="tanggal rencana kontrol"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*Nama Dokter belum terisi']"
|
||||
name="user"
|
||||
|
||||
label="Nama Dokter"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*kode diagnosa belum terisi']"
|
||||
name="kode_diagnosa"
|
||||
|
||||
label="kode diagnosa"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*Nama diagnosa belum terisi']"
|
||||
name="nama_diagnosa"
|
||||
|
||||
label="Nama Diagnosa"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*tipe surkon belum terisi']"
|
||||
name="tipe_surkon"
|
||||
|
||||
label="tipe surkon"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
:rules="[v => !!v || '*tipe rawat belum terisi']"
|
||||
name="tipe_rawat"
|
||||
|
||||
label="tipe rawat"
|
||||
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col col="12" md="6">
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
to="/"
|
||||
block>
|
||||
K E M B A L I
|
||||
</VBtn>
|
||||
</v-col>
|
||||
<v-col col="12" md="6">
|
||||
<VBtn
|
||||
variant="tonal"
|
||||
type="submit"
|
||||
block>
|
||||
S I M P A N
|
||||
</VBtn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</VForm>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
</v-dialog>
|
||||
</div>
|
||||
|
||||
@@ -56,10 +167,7 @@
|
||||
import { ref } from "vue";
|
||||
import { useTheme } from "vuetify";
|
||||
import { storeToRefs } from "pinia";
|
||||
const theme = useTheme();
|
||||
function toggleTheme () {
|
||||
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'myTheme';
|
||||
}
|
||||
|
||||
|
||||
const dialog = reactive({
|
||||
dialog:false
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-main>
|
||||
<v-container>
|
||||
<v-card title="List Kunjungan pasien" flat>
|
||||
|
||||
|
||||
<v-text-field v-model="search" label="Search" prepend-inner-icon="mdi-magnify" variant="outlined" hide-details single-line class="rounded elevation-1"></v-text-field>
|
||||
<v-data-table class="elevation-1" :headers="headers" :items="surkon.list_data" F :search="search">
|
||||
</v-data-table>
|
||||
|
||||
</v-card>
|
||||
</v-container>
|
||||
</v-main>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
import { ref, reactive } from "vue";
|
||||
import Swal from "sweetalert2";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
|
||||
|
||||
const noRM = ref('');
|
||||
const noSEP = ref('');
|
||||
const tanggal_awal = ref('');
|
||||
const tanggal_akhir = ref('');
|
||||
const poliklinik = ref('');
|
||||
|
||||
// const itemsPerPage= 5;
|
||||
const search = ref("");
|
||||
const headers = [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
},
|
||||
{ key: 'Nomor_surat_kontrol', title: 'Tanggal Masuk' },
|
||||
{ key: 'Nomor_sep', title: 'Jam Masuk' },
|
||||
{ key: 'Tanggal_cetak_surat_kontrol', title: 'Nomer Rekam Medik' },
|
||||
{ key: 'Tanggal_rencana_kontrol', title: 'Nama' },
|
||||
{ key: 'No_rm', title: 'Umur' },
|
||||
{ key: '', title: 'Jenis Kelamin' },
|
||||
{ key: '', title: 'Ruang' },
|
||||
{ key: '', title: 'Dpjp' },
|
||||
];
|
||||
|
||||
|
||||
const payload = {
|
||||
|
||||
no_rm: "",
|
||||
no_sep: "",
|
||||
poliklinik: "",
|
||||
tanggal_awal: "",
|
||||
tanggal_akhir: "",
|
||||
tipe_surkon : "1",
|
||||
offset: "0",
|
||||
};
|
||||
|
||||
const { surkon } = storeToRefs(useSurkonStorePost());
|
||||
const { loadSurKon } = useSurkonStorePost();
|
||||
|
||||
|
||||
const { subspesialis,loadSubspesialisData } = useSubspesialisStore();
|
||||
const headers2 = [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
},
|
||||
{ key: 'id', title: 'ID' },
|
||||
{ key: 'Kode', title: 'Kode' },
|
||||
{ key: 'Subspesialis', title: 'Subspesialis' },
|
||||
{ key: 'FK_daftar_spesialis_ID', title: 'FK_daftar_spesialis_ID' },
|
||||
{ key: 'Spesialis', title: 'Spesialis' },
|
||||
{ text: "", value: "action" },
|
||||
];
|
||||
|
||||
|
||||
const form_proses = async() => {
|
||||
payload.no_rm = noRM._value;
|
||||
payload.no_sep = noSEP._value;
|
||||
payload.tanggal_awal = tanggal_awal._value;
|
||||
payload.tanggal_akhir = tanggal_akhir._value;
|
||||
payload.poliklinik = poliklinik._value.toString();
|
||||
Swal.fire({
|
||||
|
||||
title: 'Berhasil Menampilkan Data' ,
|
||||
icon: 'success',
|
||||
showConfirmButton: false,
|
||||
timer: 1000,
|
||||
})
|
||||
|
||||
loadSurKon(payload);
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
loadSubspesialisData();
|
||||
});
|
||||
|
||||
const dataedit = reactive({
|
||||
idxdaftar: '',
|
||||
noSEP: '',
|
||||
kodeHFIS: '',
|
||||
id_dokter: '',
|
||||
kodePoli: '',
|
||||
subspesialis: '',
|
||||
tglRencanaKontrol: '',
|
||||
user: '',
|
||||
kode_diagnosa: '',
|
||||
nama_diagnosa: '',
|
||||
tipe_surkon: '',
|
||||
tipe_rawat: '',
|
||||
})
|
||||
const proses_edit = (item)=>{
|
||||
const {data_edit} = storeToRefs(useSurkonStorePost());
|
||||
|
||||
const { proses_edit } = useSurkonStorePost();
|
||||
proses_edit(item);
|
||||
var aksi = false;
|
||||
watchEffect(() => {
|
||||
if (data_edit.value) {
|
||||
aksi=true;
|
||||
dataedit.idxdaftar = data_edit.value.Idx_daftar || '';
|
||||
dataedit.noSEP = data_edit.value.Nomor_sep || '';
|
||||
dataedit.kodeHFIS = data_edit.value.kodeHFIS || '';//?
|
||||
dataedit.id_dokter = data_edit.value.id_dokter || '';
|
||||
dataedit.kodePoli = data_edit.value.Kode_poli || '';
|
||||
dataedit.subspesialis = data_edit.value.Subspesialis || '';
|
||||
dataedit.tglRencanaKontrol = data_edit.value.Tanggal_rencana_kontrol || '';
|
||||
dataedit.user = data_edit.value.NamaDokter || '';
|
||||
dataedit.kode_diagnosa = data_edit.value.Kode_diagnosa || '';
|
||||
dataedit.nama_diagnosa = data_edit.value.Nama_diagnosa || '';
|
||||
dataedit.tipe_surkon = data_edit.value.Tipe_SurKon || '';
|
||||
dataedit.tipe_rawat = data_edit.value.tipe_rawat || '';//?
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const dialog = ref(false);
|
||||
const hapusData = ref('');
|
||||
|
||||
const modal_hapus = (item) => {
|
||||
hapusData.value = item;
|
||||
|
||||
|
||||
}
|
||||
|
||||
const proses_hapus = () => {
|
||||
console.log("proses hapus")
|
||||
console.log(hapusData.value)
|
||||
// console.log(hapusData.value.id)
|
||||
dialog.dialog = false;
|
||||
}
|
||||
const tambah = reactive({
|
||||
dialog:false
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-app>
|
||||
<v-main>
|
||||
<v-container>
|
||||
<v-card title="List Surat Kontrol" flat>
|
||||
<template v-slot:text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<div class="border-thin">
|
||||
<VForm
|
||||
@submit.prevent="get_data">
|
||||
<v-container >
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
v-model="reqDataLogAPI.Tanggal_awal"
|
||||
label="Tanggal Awal"
|
||||
type="date"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<v-text-field
|
||||
v-model="reqDataLogAPI.Tanggal_akhir"
|
||||
label="Tanggal Akhir"
|
||||
type="date"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<v-autocomplete
|
||||
v-model="reqDataLogAPI.Tipe_rawat"
|
||||
label="Tipe Rawat"
|
||||
:items="['RI', 'RJ']"
|
||||
dense
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<VBtn class="mb-5"
|
||||
variant="tonal"
|
||||
type="submit">
|
||||
C A R I
|
||||
</VBtn>
|
||||
|
||||
</v-container>
|
||||
</VForm>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-text-field v-model="search" label="Search" prepend-inner-icon="mdi-magnify" variant="outlined" hide-details single-line class="rounded elevation-1"></v-text-field>
|
||||
</v-row>
|
||||
<!-- </template>
|
||||
<template> -->
|
||||
</template>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="dataLogAPI"
|
||||
:search="search">
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue";
|
||||
import { useTheme } from "vuetify";
|
||||
import { storeToRefs } from "pinia";
|
||||
import Swal from 'sweetalert2'
|
||||
const search = ref("");
|
||||
const today = new Date();
|
||||
const date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
|
||||
console.log("DATE : ", date)
|
||||
const headers = [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
},
|
||||
{ key: 'date_created', title: 'Tanggal terbuat' },
|
||||
{ key: 'User_agent', title: 'Dokter' },
|
||||
{ key: 'URL', title: 'URL' },
|
||||
{ key: 'Method', title: 'Method' },
|
||||
{ key: 'Request_string', title: 'Request' },
|
||||
{ key: 'Respon_string', title: 'Respon' },
|
||||
{ key: 'Comment', title: 'Comment' },
|
||||
];
|
||||
const reqDataLogAPI = reactive({
|
||||
Tipe_rawat : "RI",
|
||||
Tanggal_awal : date,
|
||||
Tanggal_akhir : date,
|
||||
})
|
||||
const { dataLogAPI } = storeToRefs(useDataLogAPIGet());
|
||||
const { loadDataLogAPI } = useDataLogAPIGet();
|
||||
|
||||
const get_data = async() => {
|
||||
console.log(reqDataLogAPI.Tanggal_awal)
|
||||
console.log(reqDataLogAPI.Tanggal_akhir)
|
||||
console.log("REQ",reqDataLogAPI)
|
||||
loadDataLogAPI(reqDataLogAPI);
|
||||
JSON.stringify(dataLogAPI.Request)
|
||||
JSON.stringify(dataLogAPI.Respon)
|
||||
console.log("DATA", dataLogAPI)
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user