Добавлен вывод отчетов от системы
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import AppLayout from "../../Layouts/AppLayout.vue";
|
||||
import {useReportStore} from "../../Stores/report.js";
|
||||
import {onMounted, ref, watch, provide} from "vue";
|
||||
import {onMounted, ref, watch, provide, computed} from "vue";
|
||||
import {useAuthStore} from "../../Stores/auth.js";
|
||||
import {
|
||||
NFormItem,
|
||||
@@ -184,6 +184,17 @@ const syncPageProps = (pageProps = props) => {
|
||||
|
||||
onMounted(syncPageProps)
|
||||
|
||||
const reportCreator = computed(() => {
|
||||
if (latestReportObj.value === null) return ''
|
||||
if (latestReportObj.value.doctor.LPUDoctorID === 0) return 'Отчет создан системой'
|
||||
else return `Отчет создан: ${latestReportObj.value.doctor.FAM_V} ${latestReportObj.value.doctor.IM_V} ${latestReportObj.value.doctor.OT_V}`
|
||||
})
|
||||
const reportCreatorType = computed(() => {
|
||||
if (latestReportObj.value === null) return 'warning'
|
||||
if (latestReportObj.value.doctor.LPUDoctorID === 0) return 'error'
|
||||
else return 'warning'
|
||||
})
|
||||
|
||||
watch(() => props, (newProps) => {
|
||||
syncPageProps(newProps)
|
||||
}, {
|
||||
@@ -206,8 +217,8 @@ watch(() => props, (newProps) => {
|
||||
<NTag type="info" :bordered="false">
|
||||
{{ department.name_full }}
|
||||
</NTag>
|
||||
<NTag v-if="props.latestReport" type="warning" :bordered="false">
|
||||
Отчет создан: {{ `${props.latestReport.doctor.FAM_V} ${props.latestReport.doctor.IM_V} ${props.latestReport.doctor.OT_V}` }}
|
||||
<NTag v-if="props.latestReport" :type="reportCreatorType" :bordered="false">
|
||||
{{ reportCreator }}
|
||||
</NTag>
|
||||
</NSpace>
|
||||
<DatePickerQuery :date="dates" :is-head-or-admin="true" class="text-lg!" />
|
||||
|
||||
Reference in New Issue
Block a user