|
|
@ -1,10 +1,53 @@ |
|
|
|
<template> |
|
|
|
<div class="export_excel_container"> |
|
|
|
<div class="btn">导出消毒相关日志</div> |
|
|
|
<div class="btn mb" @click="exportAudit">导出审计</div> |
|
|
|
<div class="btn mb" @click="exportRecord">导出消毒记录</div> |
|
|
|
<div class="btn mb" @click="clearAudit">清空审计</div> |
|
|
|
<div class="btn" @click="clearRecord">清空消毒记录</div> |
|
|
|
<van-overlay :show="settingStore.exportLoading" z-index="3"> |
|
|
|
<div class="wrapper" @click.stop> |
|
|
|
<div class="block"> |
|
|
|
<van-loading /> |
|
|
|
<p class="shutdown_text">{{ settingStore.exportText }}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</van-overlay> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup></script> |
|
|
|
<script setup> |
|
|
|
import { ref } from 'vue' |
|
|
|
import { |
|
|
|
exportUserBehaviorRecordJSON, |
|
|
|
exportDisinfectionRecordJSON, |
|
|
|
cleanDisinfectionRecordJSON, |
|
|
|
cleanUserBehaviorRecordJSON, |
|
|
|
} from '@/mock/command' |
|
|
|
import { useWebSocketStore, useSettingStore } from '@/store' |
|
|
|
|
|
|
|
const webSocketStore = useWebSocketStore() |
|
|
|
const settingStore = useSettingStore() |
|
|
|
|
|
|
|
const exportAudit = () => { |
|
|
|
settingStore.updateExportText('导出审计中') |
|
|
|
settingStore.updateExportLoading(true) |
|
|
|
webSocketStore.sendCommandMsg(exportUserBehaviorRecordJSON) |
|
|
|
} |
|
|
|
|
|
|
|
const exportRecord = () => { |
|
|
|
settingStore.updateExportText('导出消毒记录中') |
|
|
|
settingStore.updateExportLoading(true) |
|
|
|
webSocketStore.sendCommandMsg(exportDisinfectionRecordJSON) |
|
|
|
} |
|
|
|
|
|
|
|
const clearAudit = () => { |
|
|
|
webSocketStore.sendCommandMsg(cleanDisinfectionRecordJSON) |
|
|
|
} |
|
|
|
|
|
|
|
const clearRecord = () => { |
|
|
|
webSocketStore.sendCommandMsg(cleanUserBehaviorRecordJSON) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.export_excel_container { |
|
|
@ -15,6 +58,7 @@ |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
box-sizing: border-box; |
|
|
|
flex-direction: column; |
|
|
|
.btn { |
|
|
|
background: #06518b; |
|
|
|
display: flex; |
|
|
@ -30,5 +74,8 @@ |
|
|
|
letter-spacing: 0.1em; |
|
|
|
color: #ffffff; |
|
|
|
} |
|
|
|
.mb { |
|
|
|
margin-bottom: 16px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |