* исправил нумерацию пациентов
This commit is contained in:
@@ -56,6 +56,18 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
}
|
||||
]
|
||||
|
||||
// Функция для добавления номеров
|
||||
const addRowNumbers = (data, page = 1, perPage = 15) => {
|
||||
if (!Array.isArray(data)) return data
|
||||
|
||||
const startFrom = ((page - 1) * perPage) + 1
|
||||
|
||||
return data.map((item, index) => ({
|
||||
...item,
|
||||
num: startFrom + index
|
||||
}))
|
||||
|
||||
}
|
||||
const patientsData = ref({
|
||||
plan: [],
|
||||
emergency: [],
|
||||
@@ -212,5 +224,6 @@ export const useReportStore = defineStore('reportStore', () => {
|
||||
getReportInfo,
|
||||
sendReportForm,
|
||||
resetReportForm,
|
||||
addRowNumbers,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user