* добавил диалог при удалении карты * добавил сохранение движения * добавил вывод сохраненного отчета * изменил логику сохранения отчета
43 lines
1.1 KiB
Vue
43 lines
1.1 KiB
Vue
<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>
|