This commit is contained in:
44
src/components/business/OperationLogsDialog.vue
Normal file
44
src/components/business/OperationLogsDialog.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<ElDrawer
|
||||
v-model="dialogVisible"
|
||||
title="操作审计日志"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<OperationLogsCard :asset-identifier="identifier" />
|
||||
</ElDrawer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { ElDrawer } from 'element-plus'
|
||||
import OperationLogsCard from '@/views/asset-management/asset-information/components/OperationLogsCard.vue'
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean
|
||||
identifier?: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [value: boolean]
|
||||
}>()
|
||||
|
||||
const dialogVisible = ref(props.modelValue)
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
dialogVisible.value = val
|
||||
}
|
||||
)
|
||||
|
||||
watch(dialogVisible, (val) => {
|
||||
emit('update:modelValue', val)
|
||||
})
|
||||
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user