* добавлены операции и услуги операций
* добавлена выборка и подсчет по датам для роли зав. * переключатель ролей * выбор отделений для роли зав.
This commit is contained in:
@@ -8,6 +8,9 @@ import {useAuthStore} from "../../../Stores/auth.js";
|
||||
import {storeToRefs} from "pinia";
|
||||
import {RiAddCircleLine} from 'vue-icons-plus/ri'
|
||||
import {useReportStore} from "../../../Stores/report.js";
|
||||
import ReportSelectDate from "../../../Components/ReportSelectDate.vue";
|
||||
import DepartmentSelect from "../../../Components/DepartmentSelect.vue";
|
||||
import UnwantedEventModal from "./UnwantedEventModal.vue";
|
||||
|
||||
const props = defineProps({
|
||||
mode: {
|
||||
@@ -34,6 +37,8 @@ const {reportInfo} = storeToRefs(reportStore)
|
||||
const isFillableMode = computed(() => props.mode.toLowerCase() === 'fillable')
|
||||
const isReadonlyMode = computed(() => props.mode.toLowerCase() === 'readonly')
|
||||
|
||||
const openUnwantedEventModal = ref(false)
|
||||
|
||||
const selectDepartment = ref(0)
|
||||
|
||||
const currentDate = computed(() => {
|
||||
@@ -48,17 +53,17 @@ const currentDate = computed(() => {
|
||||
<template>
|
||||
<NCard>
|
||||
<NFlex vertical>
|
||||
<NFlex align="center" justify="space-between">
|
||||
<NH2 v-if="isFillableMode" class="mb-0!">
|
||||
{{ currentDate }}
|
||||
</NH2>
|
||||
<NDatePicker v-if="isReadonlyMode" />
|
||||
<NFlex align="center" justify="space-between" :wrap="false">
|
||||
<NTag v-if="isFillableMode" type="info" :bordered="false">
|
||||
{{ authStore.userDepartment.name_full }}
|
||||
</NTag>
|
||||
<DepartmentSelect v-if="isReadonlyMode" />
|
||||
|
||||
<NFlex align="center" :wrap="false">
|
||||
<NTag v-if="isFillableMode" type="info" :bordered="false">
|
||||
{{ authStore.userDepartment.name_full }}
|
||||
</NTag>
|
||||
<NSelect v-if="isReadonlyMode" v-model:value="selectDepartment" :options="departments" />
|
||||
<NH2 v-if="isFillableMode" class="mb-0!">
|
||||
{{ currentDate }}
|
||||
</NH2>
|
||||
<ReportSelectDate v-if="isReadonlyMode" />
|
||||
</NFlex>
|
||||
</NFlex>
|
||||
|
||||
@@ -80,9 +85,33 @@ const currentDate = computed(() => {
|
||||
</template>
|
||||
</NStatistic>
|
||||
</NCol>
|
||||
<NCol :span="5">
|
||||
<NStatistic label="Поступило">
|
||||
<template #default>
|
||||
<NSkeleton v-if="reportStore.isLoadReportInfo" round class="w-[70px]! mt-2 h-[29px]!" />
|
||||
<span v-else>{{ reportStore.reportInfo?.department.recipientCount }}</span>
|
||||
</template>
|
||||
</NStatistic>
|
||||
</NCol>
|
||||
<NCol :span="5">
|
||||
<NStatistic label="Выбыло">
|
||||
<template #default>
|
||||
<NSkeleton v-if="reportStore.isLoadReportInfo" round class="w-[70px]! mt-2 h-[29px]!" />
|
||||
<span v-else>{{ reportStore.reportInfo?.department.extractCount }}</span>
|
||||
</template>
|
||||
</NStatistic>
|
||||
</NCol>
|
||||
<NCol :span="5">
|
||||
<NStatistic label="Состоит">
|
||||
<template #default>
|
||||
<NSkeleton v-if="reportStore.isLoadReportInfo" round class="w-[70px]! mt-2 h-[29px]!" />
|
||||
<span v-else>{{ reportStore.reportInfo?.department.currentCount }}</span>
|
||||
</template>
|
||||
</NStatistic>
|
||||
</NCol>
|
||||
</NRow>
|
||||
|
||||
<NButton type="primary" secondary>
|
||||
<NButton type="error" secondary @click="openUnwantedEventModal = true">
|
||||
<template #icon>
|
||||
<RiAddCircleLine />
|
||||
</template>
|
||||
@@ -91,6 +120,8 @@ const currentDate = computed(() => {
|
||||
</NFlex>
|
||||
</NFlex>
|
||||
</NCard>
|
||||
|
||||
<UnwantedEventModal v-model:open="openUnwantedEventModal" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user