* добавил удаление карты, если она была добавлена не из МИС
* добавил диалог при удалении карты * добавил сохранение движения * добавил вывод сохраненного отчета * изменил логику сохранения отчета
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>
|
||||
Reference in New Issue
Block a user