* добавил удаление карты, если она была добавлена не из МИС
* добавил диалог при удалении карты * добавил сохранение движения * добавил вывод сохраненного отчета * изменил логику сохранения отчета
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<script setup>
|
||||
import {NFlex, NButton} from 'naive-ui'
|
||||
import {TbPencil, TbTrash} from 'vue-icons-plus/tb'
|
||||
import {computed} from "vue";
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object
|
||||
}
|
||||
})
|
||||
const emits = defineEmits(['clickEdit', 'clickDelete'])
|
||||
|
||||
const onClickEdit = () => {
|
||||
emits('clickEdit', props.row.id)
|
||||
}
|
||||
const onClickDelete = () => {
|
||||
emits('clickDelete', props.row.id)
|
||||
}
|
||||
|
||||
const isMisType = computed(() => props.row.source_type === 'mis')
|
||||
const isManualType = computed(() => props.row.source_type === 'manual')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NFlex align="center" justify="end">
|
||||
<NButton v-if="isManualType" type="error" secondary size="tiny" @click="onClickDelete">
|
||||
<template #icon>
|
||||
<TbTrash />
|
||||
</template>
|
||||
Удалить
|
||||
</NButton>
|
||||
<NButton secondary size="tiny" @click="onClickEdit">
|
||||
<template #icon>
|
||||
<TbPencil />
|
||||
</template>
|
||||
Редактировать
|
||||
</NButton>
|
||||
</NFlex>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -160,10 +160,10 @@ const onChangeSearch = (historyId) => {
|
||||
form.value.urgency_id = res.data.urgency_id
|
||||
form.value.visit_result_id = res.data.visit_result_id
|
||||
|
||||
form.value.birth_date = res.data.birth_date ? format(new Date(res.data.birth_date), 'yyyy-MM-dd HH:mm:ss') : null
|
||||
form.value.death_date = res.data.death_date ? format(new Date(res.data.death_date), 'yyyy-MM-dd HH:mm:ss') : null
|
||||
form.value.extract_date = res.data.extract_date ? format(new Date(res.data.extract_date), 'yyyy-MM-dd HH:mm:ss') : null
|
||||
form.value.recipient_date = res.data.recipient_date ? format(new Date(res.data.recipient_date), 'yyyy-MM-dd HH:mm:ss') : null
|
||||
form.value.birth_date = res.data.birth_date
|
||||
form.value.death_date = res.data.death_date
|
||||
form.value.extract_date = res.data.extract_date
|
||||
form.value.recipient_date = res.data.recipient_date
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ const props = defineProps({
|
||||
|
||||
const form = ref({
|
||||
patient_source: 'mis',
|
||||
original_id: null,
|
||||
patient_id: null,
|
||||
full_name: '',
|
||||
urgency_id: 1,
|
||||
@@ -128,7 +129,9 @@ const fetchPatient = async (historyId) => {
|
||||
loading.value = true
|
||||
await axios.get(`/api/nurse/patients/${historyId}`)
|
||||
.then(res => {
|
||||
form.value.patient_source = res.data.source_type
|
||||
form.value.patient_id = historyId
|
||||
form.value.original_id = res.data.original_id
|
||||
form.value.full_name = res.data.full_name
|
||||
form.value.urgency_id = res.data.urgency_id
|
||||
form.value.visit_result_id = res.data.visit_result_id
|
||||
|
||||
Reference in New Issue
Block a user