ini punya ahdan
This commit is contained in:
17
app.vue
17
app.vue
@@ -1,11 +1,26 @@
|
||||
<template>
|
||||
|
||||
<VApp>
|
||||
<!-- <Navbar/> -->
|
||||
|
||||
<VMain>
|
||||
<navbar/>
|
||||
<NuxtPage/>
|
||||
|
||||
</VMain>
|
||||
|
||||
|
||||
</VApp>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const user = useCookie('user')
|
||||
import { componentNames } from '#build/components';
|
||||
import { components } from 'vuetify/dist/vuetify-labs.js';
|
||||
import Appfooter from './components/footer.vue';
|
||||
{
|
||||
name:'App'
|
||||
component: {
|
||||
Appfooter
|
||||
}
|
||||
}
|
||||
</script>
|
||||
BIN
assets/img/logo_rssa.png
Normal file
BIN
assets/img/logo_rssa.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
@@ -1,25 +1,97 @@
|
||||
<template>
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<v-app-bar color="#009244" height="100">
|
||||
<v-app-bar-nav-icon variant="text" @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
|
||||
|
||||
<img src="assets\img\logo_rssa.png" alt="" style="display: flex; height: 80px;">
|
||||
|
||||
|
||||
|
||||
|
||||
<v-btn v-if="hide==true" @click="navigateTo('/logout')">
|
||||
<v-icon>ph:sign-out</v-icon>
|
||||
logout
|
||||
</v-btn>
|
||||
</v-app-bar>
|
||||
<v-navigation-drawer
|
||||
v-model="drawer"
|
||||
location="left"
|
||||
|
||||
temporary
|
||||
>
|
||||
|
||||
<v-list>
|
||||
<v-list-item prepend-icon="mdi-home" title="Home" to="/"></v-list-item>
|
||||
|
||||
<v-list-group value="SimRS">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
prepend-icon="mdi-file-outline"
|
||||
title="SimRS"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
|
||||
<v-list-item
|
||||
title="Surat Kontrol"
|
||||
to="/Surat-Kontrol"
|
||||
></v-list-item>
|
||||
|
||||
</v-list-group>
|
||||
<v-list-group prepend-icon="mdi-cloud-upload" value="Satu Rssa">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
title="Satu Rssa"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
title="logapi"
|
||||
to="/satu_rssa/logapi"
|
||||
></v-list-item>
|
||||
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
title="Kunjungan Pasien"
|
||||
to="/satu_rssa/kunjungan_pasien"
|
||||
></v-list-item>
|
||||
|
||||
|
||||
</v-list-group>
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script>
|
||||
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';
|
||||
}
|
||||
// console.log(hide);
|
||||
export default {
|
||||
data: () => ({
|
||||
drawer: false,
|
||||
group: null,
|
||||
|
||||
}),
|
||||
|
||||
watch: {
|
||||
group () {
|
||||
this.drawer = false
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
33
components/footer.vue
Normal file
33
components/footer.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<UFooter :links="links">
|
||||
<template #left>
|
||||
Copyright © {{ new Date().getFullYear() }}
|
||||
</template>
|
||||
|
||||
<template #right>
|
||||
<UButton icon="i-simple-icons-x" color="gray" variant="ghost" to="https://x.com/nuxt_js" target="_blank" />
|
||||
<UButton icon="i-simple-icons-discord" color="gray" variant="ghost" to="https://discord.com/invite/ps2h6QT" target="_blank" />
|
||||
<UButton icon="i-simple-icons-github" color="gray" variant="ghost" to="https://github.com/nuxt/nuxt" target="_blank" />
|
||||
</template>
|
||||
</UFooter>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
{
|
||||
name: 'Appfooter'
|
||||
}
|
||||
|
||||
const links = [{
|
||||
label: 'Nuxt UI',
|
||||
to: 'https://ui.nuxt.com/'
|
||||
}, {
|
||||
label: 'Nuxt Docs',
|
||||
to: 'https://nuxt.com'
|
||||
}, {
|
||||
label: 'Nuxt Studio',
|
||||
to: 'https://nuxt.studio'
|
||||
}]
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
81
components/sidebar.vue
Normal file
81
components/sidebar.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<v-navigation-drawer app v-model="drawer.data" temporary color="light" :width="300">
|
||||
<v-list>
|
||||
<v-list-item prepend-icon="mdi-home" title="Home"></v-list-item>
|
||||
|
||||
<v-list-group value="Users">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
prepend-icon="mdi-account-circle"
|
||||
title="Users"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
<v-list-group value="Admin">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
title="Admin"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
<v-list-item
|
||||
v-for="([title, icon], i) in admins"
|
||||
:key="i"
|
||||
:prepend-icon="icon"
|
||||
:title="title"
|
||||
:value="title"
|
||||
></v-list-item>
|
||||
</v-list-group>
|
||||
|
||||
<v-list-group value="Actions">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
title="Actions"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
<v-list-item
|
||||
v-for="([title, icon], i) in cruds"
|
||||
:key="i"
|
||||
:prepend-icon="icon"
|
||||
:title="title"
|
||||
:value="title"
|
||||
></v-list-item>
|
||||
</v-list-group>
|
||||
</v-list-group>
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Link } from "#build/components";
|
||||
import {reactive} from "vue";
|
||||
const drawer = reactive({
|
||||
data:false
|
||||
})
|
||||
|
||||
|
||||
const toggleDrawer = () => {
|
||||
if (drawer.data == true) {
|
||||
drawer.data=false
|
||||
}else{
|
||||
drawer.data=true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
const admins= [
|
||||
['Management', 'mdi-account-multiple-outline','/'],
|
||||
['Settings', 'mdi-cog-outline'],
|
||||
];
|
||||
const cruds= [
|
||||
['Create', 'mdi-plus-outline'],
|
||||
['Read', 'mdi-file-outline'],
|
||||
['Update', 'mdi-update'],
|
||||
['Delete', 'mdi-delete'],
|
||||
];
|
||||
</script>
|
||||
81
layouts/default.vue
Normal file
81
layouts/default.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<v-navigation-drawer app v-model="drawer.data" temporary color="light" :width="300">
|
||||
<v-list>
|
||||
<v-list-item prepend-icon="mdi-home" title="Home"></v-list-item>
|
||||
|
||||
<v-list-group value="Users">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
prepend-icon="mdi-account-circle"
|
||||
title="Users"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
<v-list-group value="Admin">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
title="Admin"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
<v-list-item
|
||||
v-for="([title, icon], i) in admins"
|
||||
:key="i"
|
||||
:prepend-icon="icon"
|
||||
:title="title"
|
||||
:value="title"
|
||||
></v-list-item>
|
||||
</v-list-group>
|
||||
|
||||
<v-list-group value="Actions">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item
|
||||
v-bind="props"
|
||||
title="Actions"
|
||||
></v-list-item>
|
||||
</template>
|
||||
|
||||
<v-list-item
|
||||
v-for="([title, icon], i) in cruds"
|
||||
:key="i"
|
||||
:prepend-icon="icon"
|
||||
:title="title"
|
||||
:value="title"
|
||||
></v-list-item>
|
||||
</v-list-group>
|
||||
</v-list-group>
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Link } from "#build/components";
|
||||
import {reactive} from "vue";
|
||||
const drawer = reactive({
|
||||
data:false
|
||||
})
|
||||
|
||||
|
||||
const toggleDrawer = () => {
|
||||
if (drawer.data == true) {
|
||||
drawer.data=false
|
||||
}else{
|
||||
drawer.data=true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
const admins= [
|
||||
['Management', 'mdi-account-multiple-outline','/'],
|
||||
['Settings', 'mdi-cog-outline'],
|
||||
];
|
||||
const cruds= [
|
||||
['Create', 'mdi-plus-outline'],
|
||||
['Read', 'mdi-file-outline'],
|
||||
['Update', 'mdi-update'],
|
||||
['Delete', 'mdi-delete'],
|
||||
];
|
||||
</script>
|
||||
@@ -14,6 +14,7 @@ export default defineNuxtConfig({
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
css: ["vuetify/styles"],
|
||||
typescript:{shim:false},
|
||||
build: {transpile: ["vuetify"]},
|
||||
|
||||
4574
package-lock.json
generated
4574
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@@ -10,20 +10,29 @@
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/content": "^2.13.4",
|
||||
"@nuxt/devtools": "^1.6.3",
|
||||
"@nuxtjs/color-mode": "^3.5.2",
|
||||
"@pinia/nuxt": "^0.5.5",
|
||||
"axios": "^1.7.7",
|
||||
"nuxt": "^3.13.0",
|
||||
"nuxt-sweetalert2": "^1.0.0",
|
||||
"pinia": "^2.2.4",
|
||||
"sweetalert2": "^11.14.5",
|
||||
"vite-plugin-vuetify": "^2.0.4",
|
||||
"vue": "^3.0.0",
|
||||
"vue-router": "latest",
|
||||
"vue-sweetalert2": "^5.0.11",
|
||||
"vuetify": "^3.7.0-beta.1",
|
||||
"vuetify-nuxt-module": "^0.18.2",
|
||||
"vue-router": "latest"
|
||||
"vuetify-nuxt-module": "^0.18.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/icon": "^1.5.1",
|
||||
"@nuxtjs/google-fonts": "^3.0.0-1",
|
||||
"@nuxtjs/tailwindcss": "^6.12.2",
|
||||
"daisyui": "^4.12.20",
|
||||
"nuxt-icon": "^1.0.0-beta.7",
|
||||
"sass-embedded": "^1.80.5"
|
||||
"sass-embedded": "^1.80.5",
|
||||
"tailwindcss": "^3.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
370
pages/Surat-Kontrol/index.vue
Normal file
370
pages/Surat-Kontrol/index.vue
Normal file
@@ -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>
|
||||
267
pages/index.vue
267
pages/index.vue
@@ -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>
|
||||
170
pages/notif.vue
170
pages/notif.vue
@@ -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>
|
||||
<VCard width="850" class="ma-auto" >
|
||||
<VCardTitle class="text-center">
|
||||
|
||||
<!-- <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>
|
||||
</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"
|
||||
|
||||
<template v-slot:actions>
|
||||
<v-spacer></v-spacer>
|
||||
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-btn @click="dialog.dialog=false">
|
||||
Tidak
|
||||
</v-btn>
|
||||
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-btn @click="aksi()">
|
||||
Ya
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-card>
|
||||
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
|
||||
|
||||
166
pages/satu_rssa/kunjungan_pasien/index.vue
Normal file
166
pages/satu_rssa/kunjungan_pasien/index.vue
Normal file
@@ -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>
|
||||
108
pages/satu_rssa/logapi/index.vue
Normal file
108
pages/satu_rssa/logapi/index.vue
Normal file
@@ -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>
|
||||
@@ -4,7 +4,7 @@ import { VDateInput } from 'vuetify/labs/VDateInput'
|
||||
// import { VDataTable } from 'vuetify/labs/VDataTable'
|
||||
|
||||
const myTheme: ThemeDefinition = {//untuk mengatur tema terang atau gelap
|
||||
dark:true,
|
||||
dark:false,
|
||||
colors:{
|
||||
primary:"#3b82f6",
|
||||
}
|
||||
|
||||
18
server/api/satu_rssa/logapi/index.post.ts
Normal file
18
server/api/satu_rssa/logapi/index.post.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import axios from "axios";
|
||||
export default defineEventHandler(async (event) => {
|
||||
const body = await readBody(event)
|
||||
console.log(body)
|
||||
try {
|
||||
console.log("MASUK DALAM SINI")
|
||||
const response = await axios.post("http://10.10.150.129:8082/api/suratkontrol/datalog", body);
|
||||
console.log(response.data)
|
||||
return response.data
|
||||
} catch (error) {
|
||||
console.error("Error posting to surat kontrol API:", error);
|
||||
|
||||
throw createError({
|
||||
statusCode: 500,
|
||||
statusMessage: "Failed to fetch data from surat kontrol API",
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -7,7 +7,7 @@ export default defineEventHandler(async (event) => {
|
||||
console.log("masuk")
|
||||
|
||||
try {
|
||||
const response = await axios.post("http://10.10.150.129:8082/api/suratkontrol/cari", body)
|
||||
const response = await axios.post("http://10.10.150.129:8082/api/suratkontrol/carinew", body)
|
||||
// const response = await axios.post("http://10.10.150.129:8082/api/suratkontrol/insert/", body);
|
||||
// console.log(response)
|
||||
return response.data
|
||||
|
||||
@@ -56,64 +56,21 @@ export const useSubspesialisStore = defineStore("Subspesialises", () => {
|
||||
};
|
||||
});
|
||||
|
||||
// export const useSurkonStore = defineStore("Surkon", () => {
|
||||
// const subspesialis = ref<any[]>([]);
|
||||
// const loadSubspesialis = async () => {
|
||||
// try {
|
||||
// subspesialis.value = await $fetch("/api/surkon/get");
|
||||
// } catch (error) {
|
||||
// console.error("Failed to load subspesialis:", error);
|
||||
// }
|
||||
// };
|
||||
|
||||
// return {
|
||||
// subspesialis,
|
||||
// loadSubspesialis,
|
||||
// };
|
||||
// });
|
||||
|
||||
export const useSubspesialisStorePost = defineStore("SubspesialisProses", () => {
|
||||
// Create state for holding users
|
||||
const surkon = ref<any[]>([]);
|
||||
// const data_edit = ref<any[]>([]);
|
||||
const data_edit = ref<any>(null);
|
||||
const proses_edit = async (payload: Record<string, any>) => {
|
||||
// try {
|
||||
// surkon.value = await $fetch("/api/surkon/post", {
|
||||
// method: "POST",
|
||||
// headers: {
|
||||
// "Content-Type": "application/json",
|
||||
// },
|
||||
// body: JSON.stringify(payload)
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.error("Failed to load surkon:", error);
|
||||
// }
|
||||
// data_edit.value = [payload]
|
||||
|
||||
data_edit.value = payload
|
||||
};
|
||||
|
||||
// Function to load user data
|
||||
/*const loadSurKon = async (payload: Record<string, any>) => {
|
||||
try {
|
||||
// console.log("APA INI")
|
||||
surkon.value = await $fetch("/api/surkon/post",{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
// body: JSON.stringify(payload._value)
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Failed to load surkon:", error);
|
||||
}
|
||||
// console.log(payload)
|
||||
};*/
|
||||
|
||||
|
||||
return {
|
||||
surkon,
|
||||
// loadSurKon,
|
||||
|
||||
proses_edit,
|
||||
data_edit
|
||||
};
|
||||
@@ -171,6 +128,29 @@ export const useSurkonStorePost = defineStore("SuratKontrol", () => {
|
||||
};
|
||||
});
|
||||
|
||||
export const useDataLogAPIGet = defineStore("DataLogAPI", () => {
|
||||
const dataLogAPI = ref<any[]>([]);
|
||||
const loadDataLogAPI = async (reqDataLogAPI: Record<string, any>) => {
|
||||
try {
|
||||
console.log("REQ", reqDataLogAPI)
|
||||
dataLogAPI.value = await $fetch("/api/satu_rssa/logapi", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(reqDataLogAPI)
|
||||
});
|
||||
console.log(dataLogAPI.value)
|
||||
} catch (error) {
|
||||
console.error("Failed to load data log api:", error);
|
||||
}
|
||||
};
|
||||
return{
|
||||
dataLogAPI,
|
||||
loadDataLogAPI,
|
||||
}
|
||||
})
|
||||
|
||||
//Path:stores/users.ts
|
||||
if (import.meta.hot) {
|
||||
// import.meta.hot.accept(acceptHMRUpdate(useUsersStore, import.meta.hot))
|
||||
|
||||
Reference in New Issue
Block a user