2828 />
2929 </div >
3030
31- <div class =" flex-between complex-search" >
32- <el-select
33- v-model =" filter_type"
34- class =" complex-search__left"
35- @change =" changeFilterHandle"
36- style =" width : 120px "
37- >
38- <el-option
39- v-for =" item in filterOptions"
40- :key =" item.value"
41- :label =" item.label"
42- :value =" item.value"
43- />
44- </el-select >
45- <el-select
46- v-if =" filter_type === 'status'"
47- v-model =" filter_status"
48- @change =" changeStatusHandle"
49- style =" width : 220px "
50- clearable
51- >
52- <el-option
53- v-for =" item in statusOptions"
54- :key =" item.value"
55- :label =" item.label"
56- :value =" item.value"
31+ <div style =" display : flex ;" >
32+ <div class =" flex-between complex-search" >
33+ <el-select
34+ v-model =" filter_type"
35+ class =" complex-search__left"
36+ @change =" changeFilterHandle"
37+ style =" width : 120px "
38+ >
39+ <el-option
40+ v-for =" item in filterOptions"
41+ :key =" item.value"
42+ :label =" item.label"
43+ :value =" item.value"
44+ />
45+ </el-select >
46+ <el-select
47+ v-if =" filter_type === 'status'"
48+ v-model =" filter_status"
49+ @change =" changeStatusHandle"
50+ style =" width : 220px "
51+ clearable
52+ >
53+ <el-option
54+ v-for =" item in statusOptions"
55+ :key =" item.value"
56+ :label =" item.label"
57+ :value =" item.value"
58+ />
59+ </el-select >
60+ <el-input
61+ v-else
62+ v-model =" searchValue"
63+ @change =" getList"
64+ :placeholder =" $t('common.search')"
65+ prefix-icon =" Search"
66+ style =" width : 220px "
67+ clearable
5768 />
58- </el-select >
59- <el-input
60- v-else
61- v-model =" searchValue"
62- @change =" getList"
63- :placeholder =" $t('common.search')"
64- prefix-icon =" Search"
65- style =" width : 220px "
66- clearable
67- />
69+ </div >
70+ <el-button @click =" exportLog" style =" margin-left : 10px ;" >{{ $t('common.export') }}</el-button >
6871 </div >
6972 </div >
7073
@@ -275,7 +278,7 @@ function handleSizeChange() {
275278 getList ()
276279}
277280
278- function getList () {
281+ function getRequestParams () {
279282 let obj: any = {
280283 start_time: daterange .value .start_time ,
281284 end_time: daterange .value .end_time
@@ -289,7 +292,11 @@ function getList() {
289292 if (operateTypeArr .value .length > 0 ) {
290293 obj [' menu' ] = JSON .stringify (operateTypeArr .value )
291294 }
292- return operateLog .getOperateLog (paginationConfig , obj , loading ).then ((res ) => {
295+ return obj
296+ }
297+
298+ function getList() {
299+ return operateLog .getOperateLog (paginationConfig , getRequestParams (), loading ).then ((res ) => {
293300 tableData .value = res .data .records
294301 paginationConfig .total = res .data .total
295302 })
@@ -306,6 +313,10 @@ function getMenuList() {
306313 })
307314}
308315
316+ const exportLog = () => {
317+ operateLog .exportOperateLog (getRequestParams (), loading )
318+ }
319+
309320onMounted (() => {
310321 getMenuList ()
311322 changeDayHandle (history_day .value )
0 commit comments