first commit

This commit is contained in:
brusnitsyn
2025-11-30 23:04:45 +09:00
commit c9a392f84f
76 changed files with 15085 additions and 0 deletions

45
resources/css/app.css Normal file
View File

@@ -0,0 +1,45 @@
@import 'tailwindcss';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@layer base {
@font-face {
font-family: "v-sans";
font-weight: 400;
src: url("/fonts/Golos-Text_Regular.woff2");
}
@font-face {
font-family: "v-sans";
font-weight: 500;
src: url("/fonts/Golos-Text_Medium.woff2");
}
@font-face {
font-family: "v-sans";
font-weight: 600;
src: url("/fonts/Golos-Text_DemiBold.woff2");
}
@font-face {
font-family: "v-sans";
font-weight: 700;
src: url("/fonts/Golos-Text_Bold.woff2");
}
@font-face {
font-family: "v-sans";
font-weight: 800;
src: url("/fonts/Golos-Text_Black.woff2");
}
}
@theme {
--primary-color: rgb(236, 102, 8);
--font-sans: 'v-sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
}

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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
},
}
})

View File

@@ -0,0 +1,5 @@
import {defineStore} from "pinia";
export const usePermissionStore = defineStore('permission', {
})

21
resources/js/app.js Normal file
View 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
View File

@@ -0,0 +1,4 @@
import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Styles / Scripts -->
@if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot')))
@vite(['resources/js/app.js'])
@inertiaHead
@endif
</head>
<body>
@inertia('kartoteka')
</body>
</html>