Browse Source

审计内容页面增加导出按钮

master
sige 1 year ago
parent
commit
cf955fb97b
  1. 31
      src/components/Audit.vue
  2. 4
      src/components/Setting/index.vue

31
src/components/Audit.vue

@ -59,6 +59,8 @@
</svg>
</div>
<div class="page_wrap">
<div class="btn mb" @click="exportAudit">导出审计</div>
<el-pagination
background
layout="prev, pager, next"
@ -81,12 +83,13 @@
<script setup>
import { ref, onMounted } from 'vue'
import { useWebSocketStore, useAuditStore } from '@/store'
import { getUserBehaviorRecordDescJSON } from '@/mock/command'
import { useWebSocketStore, useAuditStore, useSettingStore } from '@/store'
import { getUserBehaviorRecordDescJSON, exportUserBehaviorRecordJSON } from '@/mock/command'
import moment from 'moment'
const webSocketStore = useWebSocketStore()
const auditStore = useAuditStore()
const settingStore = useSettingStore()
onMounted(() => {
//
@ -99,6 +102,12 @@ const handleCurrentPageChange = page => {
webSocketStore.sendCommandMsg(getUserBehaviorRecordDescJSON(page - 1, 6))
auditStore.updateAuditLoading(true)
}
const exportAudit = () => {
settingStore.updateExportText('导出审计中')
settingStore.updateExportLoading(true)
webSocketStore.sendCommandMsg(exportUserBehaviorRecordJSON)
}
</script>
<style lang="scss" scoped>
@ -187,7 +196,7 @@ const handleCurrentPageChange = page => {
padding-right: 32px;
display: flex;
align-items: center;
justify-content: flex-end;
justify-content: space-between;
}
}
.wrapper {
@ -215,4 +224,20 @@ const handleCurrentPageChange = page => {
white-space: nowrap;
}
}
.btn {
background: #06518b;
display: flex;
align-items: center;
justify-content: center;
width: 147px;
height: 30px;
border-radius: 30px;
font-family: Source Han Sans CN;
font-size: 20px;
font-weight: normal;
line-height: normal;
letter-spacing: 0.1em;
color: #ffffff;
margin-left: 32px;
}
</style>

4
src/components/Setting/index.vue

@ -21,11 +21,11 @@
<p :class="activeTab == 4 ? 'title active' : 'title'">日期/时间设置</p>
<div :class="activeTab == 4 ? 'btn style-btn' : 'dis_btn'">配置</div>
</div>
<div class="tab_wrap" @click="changeActiveTab(5)">
<!-- <div class="tab_wrap" @click="changeActiveTab(5)">
<p class="active_line" v-show="activeTab == 5"></p>
<p :class="activeTab == 5 ? 'title active' : 'title'">审计管理</p>
<div :class="activeTab == 5 ? 'btn style-btn' : 'dis_btn'">操作</div>
</div>
</div> -->
<!-- <div class="tab_wrap" @click="changeActiveTab(6)">
<p class="active_line" v-show="activeTab == 6"></p>
<p :class="activeTab == 6 ? 'title active' : 'title'">消毒记录管理</p>

Loading…
Cancel
Save