first commit
This commit is contained in:
42
resources/js/Layouts/AppLayout.vue
Normal file
42
resources/js/Layouts/AppLayout.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<script setup>
|
||||
import { NLayout, NH1, NLayoutSider, NFlex, NButton, NConfigProvider, ruRU, dateRuRU } from "naive-ui";
|
||||
import SideMenu from "./Components/SideMenu.vue";
|
||||
import { generate } from '@arco-design/color'
|
||||
|
||||
const colors = generate('#EC6608', {
|
||||
list: true,
|
||||
})
|
||||
const themeOverrides = {
|
||||
common: {
|
||||
primaryColor: colors[5],
|
||||
primaryColorHover: colors[4],
|
||||
primaryColorSuppl: colors[4],
|
||||
primaryColorPressed: colors[6],
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NConfigProvider :theme-overrides="themeOverrides" :locale="ruRU" :date-locale="dateRuRU">
|
||||
<NLayout class="h-screen">
|
||||
<NLayout position="absolute" has-sider>
|
||||
<NLayoutSider
|
||||
:native-scrollbar="false"
|
||||
bordered
|
||||
>
|
||||
<SideMenu />
|
||||
</NLayoutSider>
|
||||
<NLayout content-class="p-6 pt-2 relative" :native-scrollbar="false">
|
||||
<div>
|
||||
<slot name="header" />
|
||||
</div>
|
||||
<slot />
|
||||
</NLayout>
|
||||
</NLayout>
|
||||
</NLayout>
|
||||
</NConfigProvider>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
63
resources/js/Layouts/Components/SideMenu.vue
Normal file
63
resources/js/Layouts/Components/SideMenu.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<script setup>
|
||||
import {computed, ref} from "vue";
|
||||
import {useAppStore} from "../../Stores/App.js";
|
||||
import {NMenu} from 'naive-ui'
|
||||
|
||||
const { collapsed } = useAppStore()
|
||||
|
||||
const menuItems = [
|
||||
{
|
||||
label: 'СофтИнфо',
|
||||
key: 'si',
|
||||
children: [
|
||||
{
|
||||
label: 'Стационарные карты',
|
||||
key: 'web.si.stt'
|
||||
},
|
||||
{
|
||||
label: 'Амбулаторные карты',
|
||||
key: 'web.si.amb'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'МИС',
|
||||
key: 'mis',
|
||||
children: [
|
||||
{
|
||||
label: 'Стационарные карты',
|
||||
key: 'web.mis.stt'
|
||||
},
|
||||
{
|
||||
label: 'Амбулаторные карты',
|
||||
key: 'web.mis.amb'
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
const menu = ref(null)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NMenu
|
||||
ref="menu"
|
||||
class="side-menu"
|
||||
accordion
|
||||
:indent="18"
|
||||
:collapsed-icon-size="22"
|
||||
:collapsed-width="64"
|
||||
:collapsed="collapsed"
|
||||
:options="menuItems"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.side-menu:not(.n-menu--collapsed) .n-menu-item-content::before {
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
.side-menu:not(.n-menu--collapsed) .n-menu-item-content.n-menu-item-content--selected::before {
|
||||
border-left: 4px solid #EC6608;
|
||||
}
|
||||
</style>
|
||||
24
resources/js/Layouts/Default/Index.vue
Normal file
24
resources/js/Layouts/Default/Index.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="wh-full flex">
|
||||
<aside
|
||||
class="flex-col flex-shrink-0 transition-width-300"
|
||||
:class="appStore.collapsed ? 'w-64' : 'w-220'"
|
||||
border-r="1px solid light_border dark:dark_border"
|
||||
>
|
||||
<SideBar />
|
||||
</aside>
|
||||
|
||||
<article class="w-0 flex-col flex-1">
|
||||
<AppHeader class="h-60 flex-shrink-0" />
|
||||
<slot />
|
||||
</article>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
12
resources/js/Layouts/Default/SideBar/Index.vue
Normal file
12
resources/js/Layouts/Default/SideBar/Index.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SideLogo border-b="1px solid light_border dark:dark_border" />
|
||||
<SideMenu class="cus-scroll-y mt-4 h-0 flex-1" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
78
resources/js/Pages/Home/DataTable/Index.vue
Normal file
78
resources/js/Pages/Home/DataTable/Index.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<script setup>
|
||||
import {NDataTable, NEllipsis} from "naive-ui"
|
||||
import {h, ref} from "vue"
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
maxHeight: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
minHeight: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
})
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '№ карты',
|
||||
key: 'nkarta',
|
||||
width: 100,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.nkarta })
|
||||
},
|
||||
{
|
||||
title: 'ФИО',
|
||||
key: 'fullname',
|
||||
width: 250,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.fullname })
|
||||
},
|
||||
{
|
||||
title: 'Дата рождения',
|
||||
key: 'dr',
|
||||
width: 130,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.dr })
|
||||
},
|
||||
{
|
||||
title: 'Дата поступления',
|
||||
key: 'mpostdate',
|
||||
width: 150,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.mpostdate })
|
||||
},
|
||||
{
|
||||
title: 'Дата выписки',
|
||||
key: 'menddate',
|
||||
width: 130,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.menddate })
|
||||
},
|
||||
{
|
||||
title: '№ архива',
|
||||
key: 'narhiv',
|
||||
width: 120,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.narhiv })
|
||||
},
|
||||
{
|
||||
title: 'Дата архива',
|
||||
key: 'datearhiv',
|
||||
width: 130,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.datearhiv })
|
||||
},
|
||||
{
|
||||
title: 'Статус',
|
||||
key: 'status',
|
||||
width: 100,
|
||||
render: (row) => h(NEllipsis, null, { default: () => row.status || '-' })
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NDataTable remote striped :columns="columns" :max-height="maxHeight" size="small" :min-height="minHeight" :data="data" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
29
resources/js/Pages/Home/Index.vue
Normal file
29
resources/js/Pages/Home/Index.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<script setup>
|
||||
import AppLayout from "../../Layouts/AppLayout.vue"
|
||||
import TableCards from './DataTable/Index.vue'
|
||||
import { NInput, NFlex, NDivider, NDatePicker } from 'naive-ui'
|
||||
|
||||
const props = defineProps({
|
||||
cards: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout>
|
||||
<template #header>
|
||||
<NFlex class="py-4" align="center" :wrap="false">
|
||||
<NInput placeholder="Поиск по ФИО, № карты" />
|
||||
<NDivider vertical />
|
||||
<NDatePicker type="daterange" clearable start-placeholder="Дата выписки с" end-placeholder="по" />
|
||||
</NFlex>
|
||||
</template>
|
||||
<TableCards :data="cards.data" min-height="calc(100vh - 136px)" max-height="calc(100vh - 136px)" />
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
15
resources/js/Stores/App.js
Normal file
15
resources/js/Stores/App.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {defineStore} from "pinia";
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
state: () => ({
|
||||
collapsed: false,
|
||||
}),
|
||||
actions: {
|
||||
switchCollapsed() {
|
||||
this.collapsed = !this.collapsed
|
||||
},
|
||||
setCollapsed(b) {
|
||||
this.collapsed = b
|
||||
},
|
||||
}
|
||||
})
|
||||
5
resources/js/Stores/Permission.js
Normal file
5
resources/js/Stores/Permission.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import {defineStore} from "pinia";
|
||||
|
||||
export const usePermissionStore = defineStore('permission', {
|
||||
|
||||
})
|
||||
21
resources/js/app.js
Normal file
21
resources/js/app.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import './bootstrap';
|
||||
import '../css/app.css';
|
||||
import { createApp, h } from 'vue'
|
||||
import { createInertiaApp } from '@inertiajs/vue3'
|
||||
import {createPinia} from "pinia";
|
||||
|
||||
createInertiaApp({
|
||||
id: 'kartoteka',
|
||||
resolve: name => {
|
||||
const pages = import.meta.glob('./Pages/**/*.vue', { eager: true })
|
||||
return pages[`./Pages/${name}.vue`]
|
||||
},
|
||||
setup({ el, App, props, plugin }) {
|
||||
const pinia = createPinia()
|
||||
|
||||
createApp({ render: () => h(App, props) })
|
||||
.use(plugin)
|
||||
.use(pinia)
|
||||
.mount(el)
|
||||
},
|
||||
})
|
||||
4
resources/js/bootstrap.js
vendored
Normal file
4
resources/js/bootstrap.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import axios from 'axios';
|
||||
window.axios = axios;
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
Reference in New Issue
Block a user