* исправление подсчета операций пациентов
* поправил поле выбора даты * добавил индикатор в контроле * окно выбора пользователя для сводной * привязка окна для ввода причины контроля * добавил привязку историй пациентов для просмотра статистики по дням * поправил фиксацию фио ответственного, убрал при диапазоне * отключение ролей адм и зав от реплики
This commit is contained in:
@@ -23,7 +23,9 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
|
||||
const dataOnReport = ref(null)
|
||||
|
||||
const reportInfo = ref(null)
|
||||
const reportInfo = ref({
|
||||
userId: null
|
||||
})
|
||||
const isLoadReportInfo = ref(false)
|
||||
|
||||
const patientColumns = [
|
||||
@@ -60,6 +62,9 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
|
||||
const reportForm = ref({})
|
||||
|
||||
// Пользователи которые находятся в том же отделении что и авторизованный пользователь
|
||||
const departmentUsers = ref([])
|
||||
|
||||
// Нежелательные события
|
||||
const unwantedEvents = ref([])
|
||||
|
||||
@@ -79,6 +84,7 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
observationPatients: patientsData.value['observation'],
|
||||
unwantedEvents: unwantedEvents.value,
|
||||
dates: timestampCurrentRange.value,
|
||||
userId: reportInfo.value.userId,
|
||||
...assignForm
|
||||
}
|
||||
|
||||
@@ -102,13 +108,25 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
|
||||
const getReportInfo = async () => {
|
||||
isLoadReportInfo.value = true
|
||||
await axios.get('/api/report')
|
||||
const queryParams = {
|
||||
userId: reportInfo.value.userId
|
||||
}
|
||||
await axios.get(`/api/report`, {
|
||||
params: queryParams
|
||||
})
|
||||
.then((res) => {
|
||||
reportInfo.value = res.data
|
||||
reportInfo.value = {
|
||||
...reportInfo.value,
|
||||
...res.data
|
||||
}
|
||||
|
||||
reportForm.value.metrika_item_3 = reportInfo.value.department?.recipientCount
|
||||
reportForm.value.metrika_item_7 = reportInfo.value.department?.extractCount
|
||||
reportForm.value.metrika_item_8 = reportInfo.value.department?.currentCount
|
||||
reportForm.value.metrika_item_8 = reportInfo.value.department?.currentCounts
|
||||
|
||||
reportForm.value.metrika_item_9 = reportInfo.value.department?.deadCount
|
||||
reportForm.value.metrika_item_10 = reportInfo.value.department?.surgicalCount[1]
|
||||
reportForm.value.metrika_item_11 = reportInfo.value.department?.surgicalCount[0]
|
||||
|
||||
unwantedEvents.value = reportInfo.value.report.unwantedEvents
|
||||
|
||||
@@ -125,9 +143,19 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
const getDataOnReportDate = async (dateRange) => {
|
||||
isLoadReportInfo.value = true
|
||||
timestampCurrentRange.value = dateRange
|
||||
await axios.get(`/api/report?startAt=${timestampCurrentRange.value[0]}&endAt=${timestampCurrentRange.value[1]}`)
|
||||
const queryParams = {
|
||||
userId: reportInfo.value.userId,
|
||||
startAt: timestampCurrentRange.value[0],
|
||||
endAt: timestampCurrentRange.value[1],
|
||||
}
|
||||
await axios.get(`/api/report`, {
|
||||
params: queryParams
|
||||
})
|
||||
.then((res) => {
|
||||
reportInfo.value = res.data
|
||||
reportInfo.value = {
|
||||
...reportInfo.value,
|
||||
...res.data
|
||||
}
|
||||
|
||||
reportForm.value.metrika_item_3 = reportInfo.value.department?.recipientCount
|
||||
reportForm.value.metrika_item_7 = reportInfo.value.department?.extractCount
|
||||
@@ -155,6 +183,7 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
patientsData,
|
||||
reportInfo,
|
||||
reportForm,
|
||||
departmentUsers,
|
||||
unwantedEvents,
|
||||
|
||||
getColumnsByKey,
|
||||
|
||||
Reference in New Issue
Block a user